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AmBhrS,EAAKE,EACpC,CAQCo2S,qBAAqBt2S,EAAKF,GACvB,OAAOA,EAAQmrS,sBAAsBjrS,EACzC,CAeC44S,iBAAiB5K,EAAgB1xR,GAC9B,OAAO8vR,GAAWC,UAAU2B,EAAgB1xR,EAChD,CAKCu8R,oBAAoB3rS,GACjB,OAAOk/R,GAAWO,aAAaz/R,EACnC,CAKC4rS,qBAAqB5rS,GAClB,OAAOk/R,GAAWa,cAAc//R,EACpC,CAQCq5J,YAAY77J,EAAOqT,GAChB,OAAO,IAAIkwR,GAAQvjS,EAAOqT,EAC9B,CAGCg7R,cAAc7rS,GACX,OAAO+gS,GAAQqD,UAAUpkS,EAC7B,CAMC8rS,cAAcl5S,GACX,OAAOmuS,GAAQoD,UAAUvxS,EAC7B,CACAm5S,mBAAmBpvS,GACf,OAAO,IAAI2lS,MAAe3lS,EAC9B,EAQA,MAAMmvV,GAAmB,8CACvBC,GAAmB,2DACnBC,GAAoB,oEACpBC,GAAmB,uEACnBC,GAAoB,sEAGpBC,GAA6B,qCAC7BC,GAAc,IAAIhrH,IAAI,CAExB,QACA,SACA,OACA,QACA,SACA,MACA,SACA,UACA,QACA,OACA,QACA,SACA,OACA,OACA,OACA,OAEA,SAEA,YACA,eACA,aACA,QACA,QACA,SACA,iBACA,aACA,QACA,YACA,YACA,aACA,YACA,QACA,iBACA,WACA,UACA,OACA,WACA,WACA,gBACA,WACA,YACA,WACA,YACA,cACA,iBACA,aACA,aACA,UACA,aACA,eACA,gBACA,gBACA,gBACA,gBACA,aACA,WACA,cACA,UACA,UACA,aACA,YACA,cACA,cACA,YACA,aACA,OACA,YACA,cACA,OACA,WACA,UACA,YACA,SACA,QACA,QACA,WACA,gBACA,YACA,eACA,YACA,aACA,YACA,uBACA,YACA,aACA,YACA,YACA,cACA,gBACA,eACA,iBACA,iBACA,iBACA,cACA,YACA,QACA,UACA,mBACA,aACA,eACA,eACA,iBACA,kBACA,oBACA,kBACA,kBACA,eACA,YACA,YACA,WACA,cAC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,CAEA9xX,aACEhsE,KAAK+9b,qBACP,CAEAA,sBAC6B/9b,KAAKg+b,iBAAiB,2BAC9Bvvb,MAAK,CAACsmF,EAAQ/yF,KAC/B,IAAI07b,GAAgB17b,GAAS27b,gBAAgB,GAEjD,CAIAK,iBAAiB59b,GACf,OAAOJ,KAAK89b,OAAO5wa,KAAK9sB,GAAUw8K,QAAQx8K,EAC5C,0HCZFmD,OAAOiJ,OAAS+2K,KAChBhgL,OAAOlB,EAAIkhL,KAEXlhL,IAAE,WACAA,GAAE2K,GAAG4yB,KAAO,WACR,OAAO5/B,KAAKiM,MAChB,CACF,IAGAhM,KAAAA,QAQAsD,OAAOgS,WAAa0ob,KAEpB35W,EAAQ,MAERjiF,GAAEnB,UAAUiP,OAAM,KAChB,IAAI0tb,GAAYx7b,GAAE,SAAS2pE,YAAY","sources":["webpack://eqapol/webpack/runtime/create fake namespace object","webpack://eqapol/./app/assets/javascripts/ sync ^(","webpack://eqapol/../../shared/node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js","webpack://eqapol/./vendor/assets/javascripts/autocomplete-rails.js","webpack://eqapol/./vendor/assets/javascripts/handlebars.js","webpack://eqapol/./vendor/assets/javascripts/jquery.dropdown.js","webpack://eqapol/./vendor/assets/javascripts/jquery.limitmaxlength.js","webpack://eqapol/./vendor/assets/javascripts/jquery.table.drag.select/jquery.table.drag.select.js","webpack://eqapol/./vendor/assets/javascripts/jrowclick.js","webpack://eqapol/../../shared/node_modules/c3/c3.js","webpack://eqapol/../../shared/node_modules/chosen-js/chosen.jquery.js","webpack://eqapol/./app/assets/javascripts/a3_r5.coffee","webpack://eqapol/./app/assets/javascripts/adder.coffee","webpack://eqapol/./app/assets/javascripts/aliquots.coffee","webpack://eqapol/./app/assets/javascripts/application.coffee","webpack://eqapol/./app/assets/javascripts/assays.coffee","webpack://eqapol/./app/assets/javascripts/assemblies.coffee","webpack://eqapol/./app/assets/javascripts/complex_forms.coffee","webpack://eqapol/./app/assets/javascripts/conversations.coffee","webpack://eqapol/./app/assets/javascripts/conversations_search.coffee","webpack://eqapol/./app/assets/javascripts/date_pickers.coffee","webpack://eqapol/./app/assets/javascripts/dhe_id.coffee","webpack://eqapol/./app/assets/javascripts/donors.coffee","webpack://eqapol/./app/assets/javascripts/endotoxin_test_results.coffee","webpack://eqapol/./app/assets/javascripts/ep_report_form.coffee","webpack://eqapol/./app/assets/javascripts/feeders_selector.coffee","webpack://eqapol/./app/assets/javascripts/fiebig_band_adder.coffee","webpack://eqapol/./app/assets/javascripts/field_toggler.coffee","webpack://eqapol/./app/assets/javascripts/forms.coffee","webpack://eqapol/./app/assets/javascripts/generate_report_form.coffee","webpack://eqapol/./app/assets/javascripts/graph_image.coffee","webpack://eqapol/./app/assets/javascripts/iqa_web_form.coffee","webpack://eqapol/./app/assets/javascripts/key_fields.coffee","webpack://eqapol/./app/assets/javascripts/lag.coffee","webpack://eqapol/./app/assets/javascripts/lag_biostatistician_view.coffee","webpack://eqapol/./app/assets/javascripts/lag_submission_form.coffee","webpack://eqapol/./app/assets/javascripts/linearities.coffee","webpack://eqapol/./app/assets/javascripts/linearity_results.coffee","webpack://eqapol/./app/assets/javascripts/locations.coffee","webpack://eqapol/./app/assets/javascripts/modal.coffee","webpack://eqapol/./app/assets/javascripts/notes.coffee","webpack://eqapol/./app/assets/javascripts/order_reagents.coffee","webpack://eqapol/./app/assets/javascripts/performance_report.coffee","webpack://eqapol/./app/assets/javascripts/performance_report_form.coffee","webpack://eqapol/./app/assets/javascripts/plate_tools.coffee","webpack://eqapol/./app/assets/javascripts/polymorphic_results.coffee","webpack://eqapol/./app/assets/javascripts/proficiency_test_enrollments.coffee","webpack://eqapol/./app/assets/javascripts/proficiency_tests.coffee","webpack://eqapol/./app/assets/javascripts/programs.coffee","webpack://eqapol/./app/assets/javascripts/qualifying_studies_report.coffee","webpack://eqapol/./app/assets/javascripts/quantification_picker.coffee","webpack://eqapol/./app/assets/javascripts/registration_fields.coffee","webpack://eqapol/./app/assets/javascripts/resource_upload.coffee","webpack://eqapol/./app/assets/javascripts/scorecard_create_form.coffee","webpack://eqapol/./app/assets/javascripts/scorecard_edit_form.coffee","webpack://eqapol/./app/assets/javascripts/search.coffee","webpack://eqapol/./app/assets/javascripts/sga.coffee","webpack://eqapol/./app/assets/javascripts/shipments.coffee","webpack://eqapol/./app/assets/javascripts/sites.coffee","webpack://eqapol/./app/assets/javascripts/specimen_test.coffee","webpack://eqapol/./app/assets/javascripts/specimens.coffee","webpack://eqapol/./app/assets/javascripts/tabbed_section.coffee","webpack://eqapol/./app/assets/javascripts/test_characterizations.coffee","webpack://eqapol/./app/assets/javascripts/test_result_filter.coffee","webpack://eqapol/./app/assets/javascripts/trial_groups.coffee","webpack://eqapol/./app/assets/javascripts/uploader.coffee","webpack://eqapol/./app/assets/javascripts/users.coffee","webpack://eqapol/./app/assets/javascripts/validation_tools.coffee","webpack://eqapol/./app/assets/javascripts/validations.coffee","webpack://eqapol/../../shared/node_modules/color-convert/conversions.js","webpack://eqapol/../../shared/node_modules/color-convert/index.js","webpack://eqapol/../../shared/node_modules/color-convert/route.js","webpack://eqapol/../../shared/node_modules/color-name/index.js","webpack://eqapol/../../shared/node_modules/d3/d3.js","webpack://eqapol/../../shared/node_modules/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js","webpack://eqapol/../../shared/node_modules/jquery-mousewheel/jquery.mousewheel.js","webpack://eqapol/../../shared/node_modules/jquery-query-object/jquery.query-object.js","webpack://eqapol/../../shared/node_modules/jquery-tooltipster/js/jquery.tooltipster.min.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/data.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/disable-selection.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/focusable.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/form-reset-mixin.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/form.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/ie.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/keycode.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/labels.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/plugin.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/position.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/safe-active-element.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/safe-blur.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/scroll-parent.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/tabbable.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/unique-id.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/version.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widget.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/autocomplete.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/button.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/checkboxradio.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/controlgroup.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/dialog.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/draggable.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/menu.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/mouse.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/resizable.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/sortable.js","webpack://eqapol/../../shared/node_modules/jquery-ui/ui/widgets/tabs.js","webpack://eqapol/../../shared/node_modules/jquery-validation/dist/jquery.validate.js","webpack://eqapol/../../shared/node_modules/jquery.browser/dist/jquery.browser.js","webpack://eqapol/../../shared/node_modules/jquery.event.drag/jquery.event.drag.js","webpack://eqapol/../../shared/node_modules/jquery.event.drag/jquery.event.drag.live.js","webpack://eqapol/../../shared/node_modules/jquery.tipsy/src/jquery.tipsy.js","webpack://eqapol/../../shared/node_modules/jquery/dist/jquery.js","webpack://eqapol/../../shared/node_modules/jquery_nested_form/vendor/assets/javascripts/jquery_nested_form.js","webpack://eqapol/../../shared/node_modules/lodash/lodash.js","webpack://eqapol/../../shared/node_modules/moment/locale/af.js","webpack://eqapol/../../shared/node_modules/moment/locale/ar-ly.js","webpack://eqapol/../../shared/node_modules/moment/locale/ar-ma.js","webpack://eqapol/../../shared/node_modules/moment/locale/ar-sa.js","webpack://eqapol/../../shared/node_modules/moment/locale/ar-tn.js","webpack://eqapol/../../shared/node_modules/moment/locale/ar.js","webpack://eqapol/../../shared/node_modules/moment/locale/az.js","webpack://eqapol/../../shared/node_modules/moment/locale/be.js","webpack://eqapol/../../shared/node_modules/moment/locale/bg.js","webpack://eqapol/../../shared/node_modules/moment/locale/bn.js","webpack://eqapol/../../shared/node_modules/moment/locale/bo.js","webpack://eqapol/../../shared/node_modules/moment/locale/br.js","webpack://eqapol/../../shared/node_modules/moment/locale/bs.js","webpack://eqapol/../../shared/node_modules/moment/locale/ca.js","webpack://eqapol/../../shared/node_modules/moment/locale/cs.js","webpack://eqapol/../../shared/node_modules/moment/locale/cv.js","webpack://eqapol/../../shared/node_modules/moment/locale/cy.js","webpack://eqapol/../../shared/node_modules/moment/locale/da.js","webpack://eqapol/../../shared/node_modules/moment/locale/de-at.js","webpack://eqapol/../../shared/node_modules/moment/locale/de.js","webpack://eqapol/../../shared/node_modules/moment/locale/dv.js","webpack://eqapol/../../shared/node_modules/moment/locale/el.js","webpack://eqapol/../../shared/node_modules/moment/locale/en-au.js","webpack://eqapol/../../shared/node_modules/moment/locale/en-ca.js","webpack://eqapol/../../shared/node_modules/moment/locale/en-gb.js","webpack://eqapol/../../shared/node_modules/moment/locale/en-ie.js","webpack://eqapol/../../shared/node_modules/moment/locale/en-nz.js","webpack://eqapol/../../shared/node_modules/moment/locale/eo.js","webpack://eqapol/../../shared/node_modules/moment/locale/es-do.js","webpack://eqapol/../../shared/node_modules/moment/locale/es.js","webpack://eqapol/../../shared/node_modules/moment/locale/et.js","webpack://eqapol/../../shared/node_modules/moment/locale/eu.js","webpack://eqapol/../../shared/node_modules/moment/locale/fa.js","webpack://eqapol/../../shared/node_modules/moment/locale/fi.js","webpack://eqapol/../../shared/node_modules/moment/locale/fo.js","webpack://eqapol/../../shared/node_modules/moment/locale/fr-ca.js","webpack://eqapol/../../shared/node_modules/moment/locale/fr-ch.js","webpack://eqapol/../../shared/node_modules/moment/locale/fr.js","webpack://eqapol/../../shared/node_modules/moment/locale/fy.js","webpack://eqapol/../../shared/node_modules/moment/locale/gd.js","webpack://eqapol/../../shared/node_modules/moment/locale/gl.js","webpack://eqapol/../../shared/node_modules/moment/locale/he.js","webpack://eqapol/../../shared/node_modules/moment/locale/hi.js","webpack://eqapol/../../shared/node_modules/moment/locale/hr.js","webpack://eqapol/../../shared/node_modules/moment/locale/hu.js","webpack://eqapol/../../shared/node_modules/moment/locale/hy-am.js","webpack://eqapol/../../shared/node_modules/moment/locale/id.js","webpack://eqapol/../../shared/node_modules/moment/locale/is.js","webpack://eqapol/../../shared/node_modules/moment/locale/it.js","webpack://eqapol/../../shared/node_modules/moment/locale/ja.js","webpack://eqapol/../../shared/node_modules/moment/locale/jv.js","webpack://eqapol/../../shared/node_modules/moment/locale/ka.js","webpack://eqapol/../../shared/node_modules/moment/locale/kk.js","webpack://eqapol/../../shared/node_modules/moment/locale/km.js","webpack://eqapol/../../shared/node_modules/moment/locale/ko.js","webpack://eqapol/../../shared/node_modules/moment/locale/ky.js","webpack://eqapol/../../shared/node_modules/moment/locale/lb.js","webpack://eqapol/../../shared/node_modules/moment/locale/lo.js","webpack://eqapol/../../shared/node_modules/moment/locale/lt.js","webpack://eqapol/../../shared/node_modules/moment/locale/lv.js","webpack://eqapol/../../shared/node_modules/moment/locale/me.js","webpack://eqapol/../../shared/node_modules/moment/locale/mi.js","webpack://eqapol/../../shared/node_modules/moment/locale/mk.js","webpack://eqapol/../../shared/node_modules/moment/locale/ml.js","webpack://eqapol/../../shared/node_modules/moment/locale/mr.js","webpack://eqapol/../../shared/node_modules/moment/locale/ms-my.js","webpack://eqapol/../../shared/node_modules/moment/locale/ms.js","webpack://eqapol/../../shared/node_modules/moment/locale/my.js","webpack://eqapol/../../shared/node_modules/moment/locale/nb.js","webpack://eqapol/../../shared/node_modules/moment/locale/ne.js","webpack://eqapol/../../shared/node_modules/moment/locale/nl.js","webpack://eqapol/../../shared/node_modules/moment/locale/nn.js","webpack://eqapol/../../shared/node_modules/moment/locale/pa-in.js","webpack://eqapol/../../shared/node_modules/moment/locale/pl.js","webpack://eqapol/../../shared/node_modules/moment/locale/pt-br.js","webpack://eqapol/../../shared/node_modules/moment/locale/pt.js","webpack://eqapol/../../shared/node_modules/moment/locale/ro.js","webpack://eqapol/../../shared/node_modules/moment/locale/ru.js","webpack://eqapol/../../shared/node_modules/moment/locale/se.js","webpack://eqapol/../../shared/node_modules/moment/locale/si.js","webpack://eqapol/../../shared/node_modules/moment/locale/sk.js","webpack://eqapol/../../shared/node_modules/moment/locale/sl.js","webpack://eqapol/../../shared/node_modules/moment/locale/sq.js","webpack://eqapol/../../shared/node_modules/moment/locale/sr-cyrl.js","webpack://eqapol/../../shared/node_modules/moment/locale/sr.js","webpack://eqapol/../../shared/node_modules/moment/locale/ss.js","webpack://eqapol/../../shared/node_modules/moment/locale/sv.js","webpack://eqapol/../../shared/node_modules/moment/locale/sw.js","webpack://eqapol/../../shared/node_modules/moment/locale/ta.js","webpack://eqapol/../../shared/node_modules/moment/locale/te.js","webpack://eqapol/../../shared/node_modules/moment/locale/th.js","webpack://eqapol/../../shared/node_modules/moment/locale/tl-ph.js","webpack://eqapol/../../shared/node_modules/moment/locale/tlh.js","webpack://eqapol/../../shared/node_modules/moment/locale/tr.js","webpack://eqapol/../../shared/node_modules/moment/locale/tzl.js","webpack://eqapol/../../shared/node_modules/moment/locale/tzm-latn.js","webpack://eqapol/../../shared/node_modules/moment/locale/tzm.js","webpack://eqapol/../../shared/node_modules/moment/locale/uk.js","webpack://eqapol/../../shared/node_modules/moment/locale/uz.js","webpack://eqapol/../../shared/node_modules/moment/locale/vi.js","webpack://eqapol/../../shared/node_modules/moment/locale/x-pseudo.js","webpack://eqapol/../../shared/node_modules/moment/locale/zh-cn.js","webpack://eqapol/../../shared/node_modules/moment/locale/zh-hk.js","webpack://eqapol/../../shared/node_modules/moment/locale/zh-tw.js","webpack://eqapol/../../shared/node_modules/moment/locale/ sync ^\\.\\/.*$","webpack://eqapol/../../shared/node_modules/moment/moment.js","webpack://eqapol/../../shared/node_modules/select2/index.js","webpack://eqapol/../../shared/node_modules/select2/select2.js","webpack://eqapol/../../shared/node_modules/underscore/underscore.js","webpack://eqapol/webpack/bootstrap","webpack://eqapol/webpack/runtime/compat get default export","webpack://eqapol/webpack/runtime/define property getters","webpack://eqapol/webpack/runtime/global","webpack://eqapol/webpack/runtime/hasOwnProperty shorthand","webpack://eqapol/webpack/runtime/make namespace object","webpack://eqapol/webpack/runtime/node module decorator","webpack://eqapol/../../shared/node_modules/lodash-es/isObject.js","webpack://eqapol/../../shared/node_modules/lodash-es/_freeGlobal.js","webpack://eqapol/../../shared/node_modules/lodash-es/_root.js","webpack://eqapol/../../shared/node_modules/lodash-es/_Symbol.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getRawTag.js","webpack://eqapol/../../shared/node_modules/lodash-es/_objectToString.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseGetTag.js","webpack://eqapol/../../shared/node_modules/lodash-es/isArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/isObjectLike.js","webpack://eqapol/../../shared/node_modules/lodash-es/isString.js","webpack://eqapol/../../shared/node_modules/lodash-es/_overArg.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getPrototype.js","webpack://eqapol/../../shared/node_modules/lodash-es/isPlainObject.js","webpack://eqapol/../../shared/node_modules/lodash-es/eq.js","webpack://eqapol/../../shared/node_modules/lodash-es/_assocIndexOf.js","webpack://eqapol/../../shared/node_modules/lodash-es/_listCacheDelete.js","webpack://eqapol/../../shared/node_modules/lodash-es/_ListCache.js","webpack://eqapol/../../shared/node_modules/lodash-es/_listCacheClear.js","webpack://eqapol/../../shared/node_modules/lodash-es/_listCacheGet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_listCacheHas.js","webpack://eqapol/../../shared/node_modules/lodash-es/_listCacheSet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_isMasked.js","webpack://eqapol/../../shared/node_modules/lodash-es/isFunction.js","webpack://eqapol/../../shared/node_modules/lodash-es/_coreJsData.js","webpack://eqapol/../../shared/node_modules/lodash-es/_toSource.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsNative.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getNative.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getValue.js","webpack://eqapol/../../shared/node_modules/lodash-es/_Map.js","webpack://eqapol/../../shared/node_modules/lodash-es/_nativeCreate.js","webpack://eqapol/../../shared/node_modules/lodash-es/_hashGet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_hashHas.js","webpack://eqapol/../../shared/node_modules/lodash-es/_Hash.js","webpack://eqapol/../../shared/node_modules/lodash-es/_hashClear.js","webpack://eqapol/../../shared/node_modules/lodash-es/_hashDelete.js","webpack://eqapol/../../shared/node_modules/lodash-es/_hashSet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getMapData.js","webpack://eqapol/../../shared/node_modules/lodash-es/_isKeyable.js","webpack://eqapol/../../shared/node_modules/lodash-es/_MapCache.js","webpack://eqapol/../../shared/node_modules/lodash-es/_mapCacheClear.js","webpack://eqapol/../../shared/node_modules/lodash-es/_mapCacheDelete.js","webpack://eqapol/../../shared/node_modules/lodash-es/_mapCacheGet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_mapCacheHas.js","webpack://eqapol/../../shared/node_modules/lodash-es/_mapCacheSet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_Stack.js","webpack://eqapol/../../shared/node_modules/lodash-es/_stackClear.js","webpack://eqapol/../../shared/node_modules/lodash-es/_stackDelete.js","webpack://eqapol/../../shared/node_modules/lodash-es/_stackGet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_stackHas.js","webpack://eqapol/../../shared/node_modules/lodash-es/_stackSet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_defineProperty.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseAssignValue.js","webpack://eqapol/../../shared/node_modules/lodash-es/_assignValue.js","webpack://eqapol/../../shared/node_modules/lodash-es/_copyObject.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsArguments.js","webpack://eqapol/../../shared/node_modules/lodash-es/isArguments.js","webpack://eqapol/../../shared/node_modules/lodash-es/isBuffer.js","webpack://eqapol/../../shared/node_modules/lodash-es/stubFalse.js","webpack://eqapol/../../shared/node_modules/lodash-es/_isIndex.js","webpack://eqapol/../../shared/node_modules/lodash-es/isLength.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsTypedArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseUnary.js","webpack://eqapol/../../shared/node_modules/lodash-es/_nodeUtil.js","webpack://eqapol/../../shared/node_modules/lodash-es/isTypedArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_arrayLikeKeys.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseTimes.js","webpack://eqapol/../../shared/node_modules/lodash-es/_isPrototype.js","webpack://eqapol/../../shared/node_modules/lodash-es/_nativeKeys.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseKeys.js","webpack://eqapol/../../shared/node_modules/lodash-es/isArrayLike.js","webpack://eqapol/../../shared/node_modules/lodash-es/keys.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseKeysIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_nativeKeysIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/keysIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_cloneBuffer.js","webpack://eqapol/../../shared/node_modules/lodash-es/_copyArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/stubArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getSymbols.js","webpack://eqapol/../../shared/node_modules/lodash-es/_arrayFilter.js","webpack://eqapol/../../shared/node_modules/lodash-es/_arrayPush.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getSymbolsIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseGetAllKeys.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getAllKeys.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getAllKeysIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_DataView.js","webpack://eqapol/../../shared/node_modules/lodash-es/_Promise.js","webpack://eqapol/../../shared/node_modules/lodash-es/_Set.js","webpack://eqapol/../../shared/node_modules/lodash-es/_WeakMap.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getTag.js","webpack://eqapol/../../shared/node_modules/lodash-es/_initCloneArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_Uint8Array.js","webpack://eqapol/../../shared/node_modules/lodash-es/_cloneArrayBuffer.js","webpack://eqapol/../../shared/node_modules/lodash-es/_cloneRegExp.js","webpack://eqapol/../../shared/node_modules/lodash-es/_cloneSymbol.js","webpack://eqapol/../../shared/node_modules/lodash-es/_cloneTypedArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_initCloneByTag.js","webpack://eqapol/../../shared/node_modules/lodash-es/_cloneDataView.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseCreate.js","webpack://eqapol/../../shared/node_modules/lodash-es/_initCloneObject.js","webpack://eqapol/../../shared/node_modules/lodash-es/isMap.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsMap.js","webpack://eqapol/../../shared/node_modules/lodash-es/isSet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsSet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseClone.js","webpack://eqapol/../../shared/node_modules/lodash-es/_copySymbolsIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseAssignIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_copySymbols.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseAssign.js","webpack://eqapol/../../shared/node_modules/lodash-es/_arrayEach.js","webpack://eqapol/../../shared/node_modules/lodash-es/cloneDeepWith.js","webpack://eqapol/../../shared/node_modules/lodash-es/isElement.js","webpack://eqapol/../../shared/node_modules/lodash-es/_assignMergeValue.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseFor.js","webpack://eqapol/../../shared/node_modules/lodash-es/_createBaseFor.js","webpack://eqapol/../../shared/node_modules/lodash-es/_safeGet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseMergeDeep.js","webpack://eqapol/../../shared/node_modules/lodash-es/isArrayLikeObject.js","webpack://eqapol/../../shared/node_modules/lodash-es/toPlainObject.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseMerge.js","webpack://eqapol/../../shared/node_modules/lodash-es/identity.js","webpack://eqapol/../../shared/node_modules/lodash-es/_overRest.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseSetToString.js","webpack://eqapol/../../shared/node_modules/lodash-es/constant.js","webpack://eqapol/../../shared/node_modules/lodash-es/_shortOut.js","webpack://eqapol/../../shared/node_modules/lodash-es/_setToString.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseRest.js","webpack://eqapol/../../shared/node_modules/lodash-es/_apply.js","webpack://eqapol/../../shared/node_modules/lodash-es/_createAssigner.js","webpack://eqapol/../../shared/node_modules/lodash-es/_isIterateeCall.js","webpack://eqapol/../../shared/node_modules/lodash-es/merge.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-utils/dist/index.js","webpack://eqapol/../../shared/node_modules/lodash-es/clone.js","webpack://eqapol/../../shared/node_modules/lodash-es/isSymbol.js","webpack://eqapol/../../shared/node_modules/lodash-es/_isKey.js","webpack://eqapol/../../shared/node_modules/lodash-es/memoize.js","webpack://eqapol/../../shared/node_modules/lodash-es/_stringToPath.js","webpack://eqapol/../../shared/node_modules/lodash-es/_memoizeCapped.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseToString.js","webpack://eqapol/../../shared/node_modules/lodash-es/_arrayMap.js","webpack://eqapol/../../shared/node_modules/lodash-es/toString.js","webpack://eqapol/../../shared/node_modules/lodash-es/_castPath.js","webpack://eqapol/../../shared/node_modules/lodash-es/_toKey.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseGet.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseSlice.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseUnset.js","webpack://eqapol/../../shared/node_modules/lodash-es/_parent.js","webpack://eqapol/../../shared/node_modules/lodash-es/last.js","webpack://eqapol/../../shared/node_modules/lodash-es/get.js","webpack://eqapol/../../shared/node_modules/lodash-es/set.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseSet.js","webpack://eqapol/../../shared/node_modules/lodash-es/assignIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/now.js","webpack://eqapol/../../shared/node_modules/lodash-es/_trimmedEndIndex.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseTrim.js","webpack://eqapol/../../shared/node_modules/lodash-es/toNumber.js","webpack://eqapol/../../shared/node_modules/lodash-es/debounce.js","webpack://eqapol/../../shared/node_modules/lodash-es/_SetCache.js","webpack://eqapol/../../shared/node_modules/lodash-es/_setCacheAdd.js","webpack://eqapol/../../shared/node_modules/lodash-es/_setCacheHas.js","webpack://eqapol/../../shared/node_modules/lodash-es/_arraySome.js","webpack://eqapol/../../shared/node_modules/lodash-es/_cacheHas.js","webpack://eqapol/../../shared/node_modules/lodash-es/_equalArrays.js","webpack://eqapol/../../shared/node_modules/lodash-es/_mapToArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_setToArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_equalByTag.js","webpack://eqapol/../../shared/node_modules/lodash-es/_equalObjects.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsEqualDeep.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsEqual.js","webpack://eqapol/../../shared/node_modules/lodash-es/cloneDeep.js","webpack://eqapol/../../shared/node_modules/lodash-es/isEqual.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-engine/dist/index.js","webpack://eqapol/../../shared/node_modules/lodash-es/unset.js","webpack://eqapol/../../shared/node_modules/lodash-es/isEqualWith.js","webpack://eqapol/../../shared/node_modules/lodash-es/throttle.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-core/dist/index.js","webpack://eqapol/../../shared/node_modules/lodash-es/escapeRegExp.js","webpack://eqapol/../../shared/node_modules/color-parse/index.mjs","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/utils/math.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/utils/convert.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/utils/compare.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/utils/dom.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/components/slider.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/components/hue.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/components/saturation.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/components/color-picker.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/styles/color-picker.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/styles/hue.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/styles/saturation.js","webpack://eqapol/../../shared/node_modules/vanilla-colorful/lib/entrypoints/hex.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-ui/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-typing/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-enter/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseForOwn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_isStrictComparable.js","webpack://eqapol/../../shared/node_modules/lodash-es/_matchesStrictComparable.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseMatches.js","webpack://eqapol/../../shared/node_modules/lodash-es/_getMatchData.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIsMatch.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseHasIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/hasIn.js","webpack://eqapol/../../shared/node_modules/lodash-es/_hasPath.js","webpack://eqapol/../../shared/node_modules/lodash-es/property.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseProperty.js","webpack://eqapol/../../shared/node_modules/lodash-es/_basePropertyDeep.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseIteratee.js","webpack://eqapol/../../shared/node_modules/lodash-es/_baseMatchesProperty.js","webpack://eqapol/../../shared/node_modules/lodash-es/mapValues.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-widget/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-undo/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-font/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-heading/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-image/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-indent/dist/index.js","webpack://eqapol/../../shared/node_modules/lodash-es/_castSlice.js","webpack://eqapol/../../shared/node_modules/lodash-es/_hasUnicode.js","webpack://eqapol/../../shared/node_modules/lodash-es/_unicodeToArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_stringToArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/_asciiToArray.js","webpack://eqapol/../../shared/node_modules/lodash-es/upperFirst.js","webpack://eqapol/../../shared/node_modules/lodash-es/_createCaseFirst.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-link/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-list/dist/index.js","webpack://eqapol/../../shared/node_modules/marked/lib/marked.esm.js","webpack://eqapol/../../shared/node_modules/turndown/lib/turndown.browser.es.js","webpack://eqapol/../../shared/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-mention/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-table/dist/index.js","webpack://eqapol/./app/client/src/CkeditorManager.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js","webpack://eqapol/../../shared/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js","webpack://eqapol/./app/client/src/Initializer.js","webpack://eqapol/./app/client/packs/application.js"],"sourcesContent":["var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var map = {\n\t\"./a3_r5.coffee\": 4468,\n\t\"./adder.coffee\": 6329,\n\t\"./aliquots.coffee\": 7318,\n\t\"./application.coffee\": 5320,\n\t\"./assays.coffee\": 7232,\n\t\"./assemblies.coffee\": 4078,\n\t\"./complex_forms.coffee\": 9366,\n\t\"./conversations.coffee\": 8169,\n\t\"./conversations_search.coffee\": 7707,\n\t\"./date_pickers.coffee\": 2738,\n\t\"./dhe_id.coffee\": 9475,\n\t\"./donors.coffee\": 1887,\n\t\"./endotoxin_test_results.coffee\": 3608,\n\t\"./ep_report_form.coffee\": 7128,\n\t\"./feeders_selector.coffee\": 5359,\n\t\"./fiebig_band_adder.coffee\": 9761,\n\t\"./field_toggler.coffee\": 8187,\n\t\"./forms.coffee\": 5160,\n\t\"./generate_report_form.coffee\": 4169,\n\t\"./graph_image.coffee\": 4586,\n\t\"./iqa_web_form.coffee\": 3745,\n\t\"./key_fields.coffee\": 4514,\n\t\"./lag.coffee\": 6273,\n\t\"./lag_biostatistician_view.coffee\": 2762,\n\t\"./lag_submission_form.coffee\": 3307,\n\t\"./linearities.coffee\": 8966,\n\t\"./linearity_results.coffee\": 2474,\n\t\"./locations.coffee\": 268,\n\t\"./modal.coffee\": 2357,\n\t\"./notes.coffee\": 6561,\n\t\"./order_reagents.coffee\": 5811,\n\t\"./performance_report.coffee\": 6890,\n\t\"./performance_report_form.coffee\": 1089,\n\t\"./plate_tools.coffee\": 4709,\n\t\"./polymorphic_results.coffee\": 3448,\n\t\"./proficiency_test_enrollments.coffee\": 6760,\n\t\"./proficiency_tests.coffee\": 937,\n\t\"./programs.coffee\": 2255,\n\t\"./qualifying_studies_report.coffee\": 3097,\n\t\"./quantification_picker.coffee\": 1764,\n\t\"./registration_fields.coffee\": 8622,\n\t\"./resource_upload.coffee\": 8344,\n\t\"./scorecard_create_form.coffee\": 1438,\n\t\"./scorecard_edit_form.coffee\": 5554,\n\t\"./search.coffee\": 8336,\n\t\"./sga.coffee\": 7044,\n\t\"./shipments.coffee\": 8495,\n\t\"./sites.coffee\": 1702,\n\t\"./specimen_test.coffee\": 4744,\n\t\"./specimens.coffee\": 1294,\n\t\"./tabbed_section.coffee\": 2687,\n\t\"./test_characterizations.coffee\": 7898,\n\t\"./test_result_filter.coffee\": 1350,\n\t\"./trial_groups.coffee\": 8968,\n\t\"./uploader.coffee\": 281,\n\t\"./users.coffee\": 8184,\n\t\"./validation_tools.coffee\": 8597,\n\t\"./validations.coffee\": 5814\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 5993;","/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */;\n\n(function() {\n  var context = this;\n\n  (function() {\n    (function() {\n      this.Rails = {\n        linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n        buttonClickSelector: {\n          selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n          exclude: 'form button'\n        },\n        inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n        formSubmitSelector: 'form:not([data-turbo=true])',\n        formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n        formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n        formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n        fileInputSelector: 'input[name][type=file]:not([disabled])',\n        linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n        buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n      };\n\n    }).call(this);\n  }).call(context);\n\n  var Rails = context.Rails;\n\n  (function() {\n    (function() {\n      var nonce;\n\n      nonce = null;\n\n      Rails.loadCSPNonce = function() {\n        var ref;\n        return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n      };\n\n      Rails.cspNonce = function() {\n        return nonce != null ? nonce : Rails.loadCSPNonce();\n      };\n\n    }).call(this);\n    (function() {\n      var expando, m;\n\n      m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n      Rails.matches = function(element, selector) {\n        if (selector.exclude != null) {\n          return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n        } else {\n          return m.call(element, selector);\n        }\n      };\n\n      expando = '_ujsData';\n\n      Rails.getData = function(element, key) {\n        var ref;\n        return (ref = element[expando]) != null ? ref[key] : void 0;\n      };\n\n      Rails.setData = function(element, key, value) {\n        if (element[expando] == null) {\n          element[expando] = {};\n        }\n        return element[expando][key] = value;\n      };\n\n      Rails.$ = function(selector) {\n        return Array.prototype.slice.call(document.querySelectorAll(selector));\n      };\n\n    }).call(this);\n    (function() {\n      var $, csrfParam, csrfToken;\n\n      $ = Rails.$;\n\n      csrfToken = Rails.csrfToken = function() {\n        var meta;\n        meta = document.querySelector('meta[name=csrf-token]');\n        return meta && meta.content;\n      };\n\n      csrfParam = Rails.csrfParam = function() {\n        var meta;\n        meta = document.querySelector('meta[name=csrf-param]');\n        return meta && meta.content;\n      };\n\n      Rails.CSRFProtection = function(xhr) {\n        var token;\n        token = csrfToken();\n        if (token != null) {\n          return xhr.setRequestHeader('X-CSRF-Token', token);\n        }\n      };\n\n      Rails.refreshCSRFTokens = function() {\n        var param, token;\n        token = csrfToken();\n        param = csrfParam();\n        if ((token != null) && (param != null)) {\n          return $('form input[name=\"' + param + '\"]').forEach(function(input) {\n            return input.value = token;\n          });\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var CustomEvent, fire, matches, preventDefault;\n\n      matches = Rails.matches;\n\n      CustomEvent = window.CustomEvent;\n\n      if (typeof CustomEvent !== 'function') {\n        CustomEvent = function(event, params) {\n          var evt;\n          evt = document.createEvent('CustomEvent');\n          evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n          return evt;\n        };\n        CustomEvent.prototype = window.Event.prototype;\n        preventDefault = CustomEvent.prototype.preventDefault;\n        CustomEvent.prototype.preventDefault = function() {\n          var result;\n          result = preventDefault.call(this);\n          if (this.cancelable && !this.defaultPrevented) {\n            Object.defineProperty(this, 'defaultPrevented', {\n              get: function() {\n                return true;\n              }\n            });\n          }\n          return result;\n        };\n      }\n\n      fire = Rails.fire = function(obj, name, data) {\n        var event;\n        event = new CustomEvent(name, {\n          bubbles: true,\n          cancelable: true,\n          detail: data\n        });\n        obj.dispatchEvent(event);\n        return !event.defaultPrevented;\n      };\n\n      Rails.stopEverything = function(e) {\n        fire(e.target, 'ujs:everythingStopped');\n        e.preventDefault();\n        e.stopPropagation();\n        return e.stopImmediatePropagation();\n      };\n\n      Rails.delegate = function(element, selector, eventType, handler) {\n        return element.addEventListener(eventType, function(e) {\n          var target;\n          target = e.target;\n          while (!(!(target instanceof Element) || matches(target, selector))) {\n            target = target.parentNode;\n          }\n          if (target instanceof Element && handler.call(target, e) === false) {\n            e.preventDefault();\n            return e.stopPropagation();\n          }\n        });\n      };\n\n    }).call(this);\n    (function() {\n      var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n\n      cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n\n      AcceptHeaders = {\n        '*': '*/*',\n        text: 'text/plain',\n        html: 'text/html',\n        xml: 'application/xml, text/xml',\n        json: 'application/json, text/javascript',\n        script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n      };\n\n      Rails.ajax = function(options) {\n        var xhr;\n        options = prepareOptions(options);\n        xhr = createXHR(options, function() {\n          var ref, response;\n          response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n          if (Math.floor(xhr.status / 100) === 2) {\n            if (typeof options.success === \"function\") {\n              options.success(response, xhr.statusText, xhr);\n            }\n          } else {\n            if (typeof options.error === \"function\") {\n              options.error(response, xhr.statusText, xhr);\n            }\n          }\n          return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n        });\n        if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {\n          return false;\n        }\n        if (xhr.readyState === XMLHttpRequest.OPENED) {\n          return xhr.send(options.data);\n        }\n      };\n\n      prepareOptions = function(options) {\n        options.url = options.url || location.href;\n        options.type = options.type.toUpperCase();\n        if (options.type === 'GET' && options.data) {\n          if (options.url.indexOf('?') < 0) {\n            options.url += '?' + options.data;\n          } else {\n            options.url += '&' + options.data;\n          }\n        }\n        if (AcceptHeaders[options.dataType] == null) {\n          options.dataType = '*';\n        }\n        options.accept = AcceptHeaders[options.dataType];\n        if (options.dataType !== '*') {\n          options.accept += ', */*; q=0.01';\n        }\n        return options;\n      };\n\n      createXHR = function(options, done) {\n        var xhr;\n        xhr = new XMLHttpRequest();\n        xhr.open(options.type, options.url, true);\n        xhr.setRequestHeader('Accept', options.accept);\n        if (typeof options.data === 'string') {\n          xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n        }\n        if (!options.crossDomain) {\n          xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n          CSRFProtection(xhr);\n        }\n        xhr.withCredentials = !!options.withCredentials;\n        xhr.onreadystatechange = function() {\n          if (xhr.readyState === XMLHttpRequest.DONE) {\n            return done(xhr);\n          }\n        };\n        return xhr;\n      };\n\n      processResponse = function(response, type) {\n        var parser, script;\n        if (typeof response === 'string' && typeof type === 'string') {\n          if (type.match(/\\bjson\\b/)) {\n            try {\n              response = JSON.parse(response);\n            } catch (error) {}\n          } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n            script = document.createElement('script');\n            script.setAttribute('nonce', cspNonce());\n            script.text = response;\n            document.head.appendChild(script).parentNode.removeChild(script);\n          } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n            parser = new DOMParser();\n            type = type.replace(/;.+/, '');\n            try {\n              response = parser.parseFromString(response, type);\n            } catch (error) {}\n          }\n        }\n        return response;\n      };\n\n      Rails.href = function(element) {\n        return element.href;\n      };\n\n      Rails.isCrossDomain = function(url) {\n        var e, originAnchor, urlAnchor;\n        originAnchor = document.createElement('a');\n        originAnchor.href = location.href;\n        urlAnchor = document.createElement('a');\n        try {\n          urlAnchor.href = url;\n          return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));\n        } catch (error) {\n          e = error;\n          return true;\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var matches, toArray;\n\n      matches = Rails.matches;\n\n      toArray = function(e) {\n        return Array.prototype.slice.call(e);\n      };\n\n      Rails.serializeElement = function(element, additionalParam) {\n        var inputs, params;\n        inputs = [element];\n        if (matches(element, 'form')) {\n          inputs = toArray(element.elements);\n        }\n        params = [];\n        inputs.forEach(function(input) {\n          if (!input.name || input.disabled) {\n            return;\n          }\n          if (matches(input, 'fieldset[disabled] *')) {\n            return;\n          }\n          if (matches(input, 'select')) {\n            return toArray(input.options).forEach(function(option) {\n              if (option.selected) {\n                return params.push({\n                  name: input.name,\n                  value: option.value\n                });\n              }\n            });\n          } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n            return params.push({\n              name: input.name,\n              value: input.value\n            });\n          }\n        });\n        if (additionalParam) {\n          params.push(additionalParam);\n        }\n        return params.map(function(param) {\n          if (param.name != null) {\n            return (encodeURIComponent(param.name)) + \"=\" + (encodeURIComponent(param.value));\n          } else {\n            return param;\n          }\n        }).join('&');\n      };\n\n      Rails.formElements = function(form, selector) {\n        if (matches(form, 'form')) {\n          return toArray(form.elements).filter(function(el) {\n            return matches(el, selector);\n          });\n        } else {\n          return toArray(form.querySelectorAll(selector));\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var allowAction, fire, stopEverything;\n\n      fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n      Rails.handleConfirm = function(e) {\n        if (!allowAction(this)) {\n          return stopEverything(e);\n        }\n      };\n\n      Rails.confirm = function(message, element) {\n        return confirm(message);\n      };\n\n      allowAction = function(element) {\n        var answer, callback, message;\n        message = element.getAttribute('data-confirm');\n        if (!message) {\n          return true;\n        }\n        answer = false;\n        if (fire(element, 'confirm')) {\n          try {\n            answer = Rails.confirm(message, element);\n          } catch (error) {}\n          callback = fire(element, 'confirm:complete', [answer]);\n        }\n        return answer && callback;\n      };\n\n    }).call(this);\n    (function() {\n      var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n\n      matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n      Rails.handleDisabledElement = function(e) {\n        var element;\n        element = this;\n        if (element.disabled) {\n          return stopEverything(e);\n        }\n      };\n\n      Rails.enableElement = function(e) {\n        var element;\n        if (e instanceof Event) {\n          if (isXhrRedirect(e)) {\n            return;\n          }\n          element = e.target;\n        } else {\n          element = e;\n        }\n        if (matches(element, Rails.linkDisableSelector)) {\n          return enableLinkElement(element);\n        } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n          return enableFormElement(element);\n        } else if (matches(element, Rails.formSubmitSelector)) {\n          return enableFormElements(element);\n        }\n      };\n\n      Rails.disableElement = function(e) {\n        var element;\n        element = e instanceof Event ? e.target : e;\n        if (matches(element, Rails.linkDisableSelector)) {\n          return disableLinkElement(element);\n        } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n          return disableFormElement(element);\n        } else if (matches(element, Rails.formSubmitSelector)) {\n          return disableFormElements(element);\n        }\n      };\n\n      disableLinkElement = function(element) {\n        var replacement;\n        if (getData(element, 'ujs:disabled')) {\n          return;\n        }\n        replacement = element.getAttribute('data-disable-with');\n        if (replacement != null) {\n          setData(element, 'ujs:enable-with', element.innerHTML);\n          element.innerHTML = replacement;\n        }\n        element.addEventListener('click', stopEverything);\n        return setData(element, 'ujs:disabled', true);\n      };\n\n      enableLinkElement = function(element) {\n        var originalText;\n        originalText = getData(element, 'ujs:enable-with');\n        if (originalText != null) {\n          element.innerHTML = originalText;\n          setData(element, 'ujs:enable-with', null);\n        }\n        element.removeEventListener('click', stopEverything);\n        return setData(element, 'ujs:disabled', null);\n      };\n\n      disableFormElements = function(form) {\n        return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n      };\n\n      disableFormElement = function(element) {\n        var replacement;\n        if (getData(element, 'ujs:disabled')) {\n          return;\n        }\n        replacement = element.getAttribute('data-disable-with');\n        if (replacement != null) {\n          if (matches(element, 'button')) {\n            setData(element, 'ujs:enable-with', element.innerHTML);\n            element.innerHTML = replacement;\n          } else {\n            setData(element, 'ujs:enable-with', element.value);\n            element.value = replacement;\n          }\n        }\n        element.disabled = true;\n        return setData(element, 'ujs:disabled', true);\n      };\n\n      enableFormElements = function(form) {\n        return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n      };\n\n      enableFormElement = function(element) {\n        var originalText;\n        originalText = getData(element, 'ujs:enable-with');\n        if (originalText != null) {\n          if (matches(element, 'button')) {\n            element.innerHTML = originalText;\n          } else {\n            element.value = originalText;\n          }\n          setData(element, 'ujs:enable-with', null);\n        }\n        element.disabled = false;\n        return setData(element, 'ujs:disabled', null);\n      };\n\n      isXhrRedirect = function(event) {\n        var ref, xhr;\n        xhr = (ref = event.detail) != null ? ref[0] : void 0;\n        return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n      };\n\n    }).call(this);\n    (function() {\n      var stopEverything;\n\n      stopEverything = Rails.stopEverything;\n\n      Rails.handleMethod = function(e) {\n        var csrfParam, csrfToken, form, formContent, href, link, method;\n        link = this;\n        method = link.getAttribute('data-method');\n        if (!method) {\n          return;\n        }\n        href = Rails.href(link);\n        csrfToken = Rails.csrfToken();\n        csrfParam = Rails.csrfParam();\n        form = document.createElement('form');\n        formContent = \"<input name='_method' value='\" + method + \"' type='hidden' />\";\n        if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {\n          formContent += \"<input name='\" + csrfParam + \"' value='\" + csrfToken + \"' type='hidden' />\";\n        }\n        formContent += '<input type=\"submit\" />';\n        form.method = 'post';\n        form.action = href;\n        form.target = link.target;\n        form.innerHTML = formContent;\n        form.style.display = 'none';\n        document.body.appendChild(form);\n        form.querySelector('[type=\"submit\"]').click();\n        return stopEverything(e);\n      };\n\n    }).call(this);\n    (function() {\n      var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,\n        slice = [].slice;\n\n      matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n      isRemote = function(element) {\n        var value;\n        value = element.getAttribute('data-remote');\n        return (value != null) && value !== 'false';\n      };\n\n      Rails.handleRemote = function(e) {\n        var button, data, dataType, element, method, url, withCredentials;\n        element = this;\n        if (!isRemote(element)) {\n          return true;\n        }\n        if (!fire(element, 'ajax:before')) {\n          fire(element, 'ajax:stopped');\n          return false;\n        }\n        withCredentials = element.getAttribute('data-with-credentials');\n        dataType = element.getAttribute('data-type') || 'script';\n        if (matches(element, Rails.formSubmitSelector)) {\n          button = getData(element, 'ujs:submit-button');\n          method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n          url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n          if (method.toUpperCase() === 'GET') {\n            url = url.replace(/\\?.*$/, '');\n          }\n          if (element.enctype === 'multipart/form-data') {\n            data = new FormData(element);\n            if (button != null) {\n              data.append(button.name, button.value);\n            }\n          } else {\n            data = serializeElement(element, button);\n          }\n          setData(element, 'ujs:submit-button', null);\n          setData(element, 'ujs:submit-button-formmethod', null);\n          setData(element, 'ujs:submit-button-formaction', null);\n        } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n          method = element.getAttribute('data-method');\n          url = element.getAttribute('data-url');\n          data = serializeElement(element, element.getAttribute('data-params'));\n        } else {\n          method = element.getAttribute('data-method');\n          url = Rails.href(element);\n          data = element.getAttribute('data-params');\n        }\n        ajax({\n          type: method || 'GET',\n          url: url,\n          data: data,\n          dataType: dataType,\n          beforeSend: function(xhr, options) {\n            if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n              return fire(element, 'ajax:send', [xhr]);\n            } else {\n              fire(element, 'ajax:stopped');\n              return false;\n            }\n          },\n          success: function() {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:success', args);\n          },\n          error: function() {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:error', args);\n          },\n          complete: function() {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:complete', args);\n          },\n          crossDomain: isCrossDomain(url),\n          withCredentials: (withCredentials != null) && withCredentials !== 'false'\n        });\n        return stopEverything(e);\n      };\n\n      Rails.formSubmitButtonClick = function(e) {\n        var button, form;\n        button = this;\n        form = button.form;\n        if (!form) {\n          return;\n        }\n        if (button.name) {\n          setData(form, 'ujs:submit-button', {\n            name: button.name,\n            value: button.value\n          });\n        }\n        setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n        setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n        return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n      };\n\n      Rails.preventInsignificantClick = function(e) {\n        var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n        link = this;\n        method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n        data = link.getAttribute('data-params');\n        metaClick = e.metaKey || e.ctrlKey;\n        insignificantMetaClick = metaClick && method === 'GET' && !data;\n        nonPrimaryMouseClick = (e.button != null) && e.button !== 0;\n        if (nonPrimaryMouseClick || insignificantMetaClick) {\n          return e.stopImmediatePropagation();\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n\n      fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n      if ((typeof jQuery !== \"undefined\" && jQuery !== null) && (jQuery.ajax != null)) {\n        if (jQuery.rails) {\n          throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n        }\n        jQuery.rails = Rails;\n        jQuery.ajaxPrefilter(function(options, originalOptions, xhr) {\n          if (!options.crossDomain) {\n            return CSRFProtection(xhr);\n          }\n        });\n      }\n\n      Rails.start = function() {\n        if (window._rails_loaded) {\n          throw new Error('rails-ujs has already been loaded!');\n        }\n        window.addEventListener('pageshow', function() {\n          $(Rails.formEnableSelector).forEach(function(el) {\n            if (getData(el, 'ujs:disabled')) {\n              return enableElement(el);\n            }\n          });\n          return $(Rails.linkDisableSelector).forEach(function(el) {\n            if (getData(el, 'ujs:disabled')) {\n              return enableElement(el);\n            }\n          });\n        });\n        delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n        delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n        delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.linkClickSelector, 'click', disableElement);\n        delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n        delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n        delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n        delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n        delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n        delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n        delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n        delegate(document, Rails.formSubmitSelector, 'submit', function(e) {\n          return setTimeout((function() {\n            return disableElement(e);\n          }), 13);\n        });\n        delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n        delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n        document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n        document.addEventListener('DOMContentLoaded', loadCSPNonce);\n        return window._rails_loaded = true;\n      };\n\n      if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n        Rails.start();\n      }\n\n    }).call(this);\n  }).call(this);\n\n  if (typeof module === \"object\" && module.exports) {\n    module.exports = Rails;\n  } else if (typeof define === \"function\" && define.amd) {\n    define(Rails);\n  }\n}).call(this);\n","!function(t){t.fn.railsAutocomplete=function(e){var a=function(){this.railsAutoCompleter||(this.railsAutoCompleter=new t.railsAutocomplete(this))};if(void 0!==t.fn.on){if(!e)return;return t(document).on(\"focus\",e,a)}return this.live(\"focus\",a)},t.railsAutocomplete=function(t){var e=t;this.init(e)},t.railsAutocomplete.options={showNoMatches:!0,noMatchesLabel:\"no existing match\"},t.railsAutocomplete.fn=t.railsAutocomplete.prototype={railsAutocomplete:\"0.0.1\"},t.railsAutocomplete.fn.extend=t.railsAutocomplete.extend=t.extend,t.railsAutocomplete.fn.extend({init:function(e){function a(t){return t.split(e.delimiter)}function i(t){return a(t).pop().replace(/^\\s+/,\"\")}e.delimiter=t(e).attr(\"data-delimiter\")||null,e.min_length=t(e).attr(\"data-min-length\")||t(e).attr(\"min-length\")||2,e.append_to=t(e).attr(\"data-append-to\")||null,e.autoFocus=t(e).attr(\"data-auto-focus\")||!1,t(e).autocomplete({appendTo:e.append_to,autoFocus:e.autoFocus,delay:t(e).attr(\"delay\")||0,source:function(a,r){var n=this.element[0],o={term:i(a.term)};t(e).attr(\"data-autocomplete-fields\")&&t.each(t.parseJSON(t(e).attr(\"data-autocomplete-fields\")),function(e,a){o[e]=t(a).val()}),t.getJSON(t(e).attr(\"data-autocomplete\"),o,function(){var a={};t.extend(a,t.railsAutocomplete.options),t.each(a,function(i,r){if(a.hasOwnProperty(i)){var n=t(e).attr(\"data-\"+i);a[i]=n?n:r}}),0==arguments[0].length&&t.inArray(a.showNoMatches,[!0,\"true\"])>=0&&(arguments[0]=[],arguments[0][0]={id:\"\",label:a.noMatchesLabel}),t(arguments[0]).each(function(a,i){var r={};r[i.id]=i,t(e).data(r)}),r.apply(null,arguments),t(n).trigger(\"railsAutocomplete.source\",arguments)})},change:function(e,a){if(t(this).is(\"[data-id-element]\")&&\"\"!==t(t(this).attr(\"data-id-element\")).val()&&(t(t(this).attr(\"data-id-element\")).val(a.item?a.item.id:\"\").trigger(\"change\"),t(this).attr(\"data-update-elements\"))){var i=t.parseJSON(t(this).attr(\"data-update-elements\")),r=a.item?t(this).data(a.item.id.toString()):{};if(i&&\"\"===t(i.id).val())return;for(var n in i){var o=t(i[n]);o.is(\":checkbox\")?null!=r[n]&&o.prop(\"checked\",r[n]):o.val(a.item?r[n]:\"\").trigger(\"change\")}}},search:function(){var t=i(this.value);return t.length<e.min_length?!1:void 0},focus:function(){return!1},select:function(i,r){if(r.item.value=r.item.value.toString(),-1!=r.item.value.toLowerCase().indexOf(\"no match\")||-1!=r.item.value.toLowerCase().indexOf(\"too many results\"))return t(this).trigger(\"railsAutocomplete.noMatch\",r),!1;var n=a(this.value);if(n.pop(),n.push(r.item.value),null!=e.delimiter)n.push(\"\"),this.value=n.join(e.delimiter);else if(this.value=n.join(\"\"),t(this).attr(\"data-id-element\")&&t(t(this).attr(\"data-id-element\")).val(r.item.id).trigger(\"change\"),t(this).attr(\"data-update-elements\")){var o=r.item,l=-1!=r.item.value.indexOf(\"Create New\")?!0:!1,u=t.parseJSON(t(this).attr(\"data-update-elements\"));for(var s in u)\"checkbox\"===t(u[s]).attr(\"type\")?o[s]===!0||1===o[s]?t(u[s]).attr(\"checked\",\"checked\"):t(u[s]).removeAttr(\"checked\"):l&&o[s]&&-1==o[s].indexOf(\"Create New\")||!l?t(u[s]).val(o[s]).trigger(\"change\"):t(u[s]).val(\"\").trigger(\"change\")}var c=this.value;return t(this).bind(\"keyup.clearId\",function(){t.trim(t(this).val())!=t.trim(c)&&(t(t(this).attr(\"data-id-element\")).val(\"\").trigger(\"change\"),t(this).unbind(\"keyup.clearId\"))}),t(e).trigger(\"railsAutocomplete.select\",r),!1}}),t(e).trigger(\"railsAutocomplete.init\")}}),t(document).ready(function(){t(\"input[data-autocomplete]\").railsAutocomplete(\"input[data-autocomplete]\")})}(jQuery);\n","/*!\n\n handlebars v2.0.0\n\nCopyright (C) 2011-2014 by Yehuda Katz\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n@license\n*/\n/* exported Handlebars */\n(function (root, factory) {\n  if (typeof define === 'function' && define.amd) {\n    define([], factory);\n  } else if (typeof exports === 'object') {\n    module.exports = factory();\n  } else {\n    root.Handlebars = root.Handlebars || factory();\n  }\n}(this, function () {\n// handlebars/safe-string.js\nvar __module4__ = (function() {\n  \"use strict\";\n  var __exports__;\n  // Build out our basic SafeString type\n  function SafeString(string) {\n    this.string = string;\n  }\n\n  SafeString.prototype.toString = function() {\n    return \"\" + this.string;\n  };\n\n  __exports__ = SafeString;\n  return __exports__;\n})();\n\n// handlebars/utils.js\nvar __module3__ = (function(__dependency1__) {\n  \"use strict\";\n  var __exports__ = {};\n  /*jshint -W004 */\n  var SafeString = __dependency1__;\n\n  var escape = {\n    \"&\": \"&amp;\",\n    \"<\": \"&lt;\",\n    \">\": \"&gt;\",\n    '\"': \"&quot;\",\n    \"'\": \"&#x27;\",\n    \"`\": \"&#x60;\"\n  };\n\n  var badChars = /[&<>\"'`]/g;\n  var possible = /[&<>\"'`]/;\n\n  function escapeChar(chr) {\n    return escape[chr];\n  }\n\n  function extend(obj /* , ...source */) {\n    for (var i = 1; i < arguments.length; i++) {\n      for (var key in arguments[i]) {\n        if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {\n          obj[key] = arguments[i][key];\n        }\n      }\n    }\n\n    return obj;\n  }\n\n  __exports__.extend = extend;var toString = Object.prototype.toString;\n  __exports__.toString = toString;\n  // Sourced from lodash\n  // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\n  var isFunction = function(value) {\n    return typeof value === 'function';\n  };\n  // fallback for older versions of Chrome and Safari\n  /* istanbul ignore next */\n  if (isFunction(/x/)) {\n    isFunction = function(value) {\n      return typeof value === 'function' && toString.call(value) === '[object Function]';\n    };\n  }\n  var isFunction;\n  __exports__.isFunction = isFunction;\n  /* istanbul ignore next */\n  var isArray = Array.isArray || function(value) {\n    return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;\n  };\n  __exports__.isArray = isArray;\n\n  function escapeExpression(string) {\n    // don't escape SafeStrings, since they're already safe\n    if (string instanceof SafeString) {\n      return string.toString();\n    } else if (string == null) {\n      return \"\";\n    } else if (!string) {\n      return string + '';\n    }\n\n    // Force a string conversion as this will be done by the append regardless and\n    // the regex test will do this transparently behind the scenes, causing issues if\n    // an object's to string has escaped characters in it.\n    string = \"\" + string;\n\n    if(!possible.test(string)) { return string; }\n    return string.replace(badChars, escapeChar);\n  }\n\n  __exports__.escapeExpression = escapeExpression;function isEmpty(value) {\n    if (!value && value !== 0) {\n      return true;\n    } else if (isArray(value) && value.length === 0) {\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  __exports__.isEmpty = isEmpty;function appendContextPath(contextPath, id) {\n    return (contextPath ? contextPath + '.' : '') + id;\n  }\n\n  __exports__.appendContextPath = appendContextPath;\n  return __exports__;\n})(__module4__);\n\n// handlebars/exception.js\nvar __module5__ = (function() {\n  \"use strict\";\n  var __exports__;\n\n  var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];\n\n  function Exception(message, node) {\n    var line;\n    if (node && node.firstLine) {\n      line = node.firstLine;\n\n      message += ' - ' + line + ':' + node.firstColumn;\n    }\n\n    var tmp = Error.prototype.constructor.call(this, message);\n\n    // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n    for (var idx = 0; idx < errorProps.length; idx++) {\n      this[errorProps[idx]] = tmp[errorProps[idx]];\n    }\n\n    if (line) {\n      this.lineNumber = line;\n      this.column = node.firstColumn;\n    }\n  }\n\n  Exception.prototype = new Error();\n\n  __exports__ = Exception;\n  return __exports__;\n})();\n\n// handlebars/base.js\nvar __module2__ = (function(__dependency1__, __dependency2__) {\n  \"use strict\";\n  var __exports__ = {};\n  var Utils = __dependency1__;\n  var Exception = __dependency2__;\n\n  var VERSION = \"2.0.0\";\n  __exports__.VERSION = VERSION;var COMPILER_REVISION = 6;\n  __exports__.COMPILER_REVISION = COMPILER_REVISION;\n  var REVISION_CHANGES = {\n    1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n    2: '== 1.0.0-rc.3',\n    3: '== 1.0.0-rc.4',\n    4: '== 1.x.x',\n    5: '== 2.0.0-alpha.x',\n    6: '>= 2.0.0-beta.1'\n  };\n  __exports__.REVISION_CHANGES = REVISION_CHANGES;\n  var isArray = Utils.isArray,\n      isFunction = Utils.isFunction,\n      toString = Utils.toString,\n      objectType = '[object Object]';\n\n  function HandlebarsEnvironment(helpers, partials) {\n    this.helpers = helpers || {};\n    this.partials = partials || {};\n\n    registerDefaultHelpers(this);\n  }\n\n  __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {\n    constructor: HandlebarsEnvironment,\n\n    logger: logger,\n    log: log,\n\n    registerHelper: function(name, fn) {\n      if (toString.call(name) === objectType) {\n        if (fn) { throw new Exception('Arg not supported with multiple helpers'); }\n        Utils.extend(this.helpers, name);\n      } else {\n        this.helpers[name] = fn;\n      }\n    },\n    unregisterHelper: function(name) {\n      delete this.helpers[name];\n    },\n\n    registerPartial: function(name, partial) {\n      if (toString.call(name) === objectType) {\n        Utils.extend(this.partials,  name);\n      } else {\n        this.partials[name] = partial;\n      }\n    },\n    unregisterPartial: function(name) {\n      delete this.partials[name];\n    }\n  };\n\n  function registerDefaultHelpers(instance) {\n    instance.registerHelper('helperMissing', function(/* [args, ]options */) {\n      if(arguments.length === 1) {\n        // A missing field in a {{foo}} constuct.\n        return undefined;\n      } else {\n        // Someone is actually trying to call something, blow up.\n        throw new Exception(\"Missing helper: '\" + arguments[arguments.length-1].name + \"'\");\n      }\n    });\n\n    instance.registerHelper('blockHelperMissing', function(context, options) {\n      var inverse = options.inverse,\n          fn = options.fn;\n\n      if(context === true) {\n        return fn(this);\n      } else if(context === false || context == null) {\n        return inverse(this);\n      } else if (isArray(context)) {\n        if(context.length > 0) {\n          if (options.ids) {\n            options.ids = [options.name];\n          }\n\n          return instance.helpers.each(context, options);\n        } else {\n          return inverse(this);\n        }\n      } else {\n        if (options.data && options.ids) {\n          var data = createFrame(options.data);\n          data.contextPath = Utils.appendContextPath(options.data.contextPath, options.name);\n          options = {data: data};\n        }\n\n        return fn(context, options);\n      }\n    });\n\n    instance.registerHelper('each', function(context, options) {\n      if (!options) {\n        throw new Exception('Must pass iterator to #each');\n      }\n\n      var fn = options.fn, inverse = options.inverse;\n      var i = 0, ret = \"\", data;\n\n      var contextPath;\n      if (options.data && options.ids) {\n        contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';\n      }\n\n      if (isFunction(context)) { context = context.call(this); }\n\n      if (options.data) {\n        data = createFrame(options.data);\n      }\n\n      if(context && typeof context === 'object') {\n        if (isArray(context)) {\n          for(var j = context.length; i<j; i++) {\n            if (data) {\n              data.index = i;\n              data.first = (i === 0);\n              data.last  = (i === (context.length-1));\n\n              if (contextPath) {\n                data.contextPath = contextPath + i;\n              }\n            }\n            ret = ret + fn(context[i], { data: data });\n          }\n        } else {\n          for(var key in context) {\n            if(context.hasOwnProperty(key)) {\n              if(data) {\n                data.key = key;\n                data.index = i;\n                data.first = (i === 0);\n\n                if (contextPath) {\n                  data.contextPath = contextPath + key;\n                }\n              }\n              ret = ret + fn(context[key], {data: data});\n              i++;\n            }\n          }\n        }\n      }\n\n      if(i === 0){\n        ret = inverse(this);\n      }\n\n      return ret;\n    });\n\n    instance.registerHelper('if', function(conditional, options) {\n      if (isFunction(conditional)) { conditional = conditional.call(this); }\n\n      // Default behavior is to render the positive path if the value is truthy and not empty.\n      // The `includeZero` option may be set to treat the condtional as purely not empty based on the\n      // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.\n      if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) {\n        return options.inverse(this);\n      } else {\n        return options.fn(this);\n      }\n    });\n\n    instance.registerHelper('unless', function(conditional, options) {\n      return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash});\n    });\n\n    instance.registerHelper('with', function(context, options) {\n      if (isFunction(context)) { context = context.call(this); }\n\n      var fn = options.fn;\n\n      if (!Utils.isEmpty(context)) {\n        if (options.data && options.ids) {\n          var data = createFrame(options.data);\n          data.contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]);\n          options = {data:data};\n        }\n\n        return fn(context, options);\n      } else {\n        return options.inverse(this);\n      }\n    });\n\n    instance.registerHelper('log', function(message, options) {\n      var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;\n      instance.log(level, message);\n    });\n\n    instance.registerHelper('lookup', function(obj, field) {\n      return obj && obj[field];\n    });\n  }\n\n  var logger = {\n    methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },\n\n    // State enum\n    DEBUG: 0,\n    INFO: 1,\n    WARN: 2,\n    ERROR: 3,\n    level: 3,\n\n    // can be overridden in the host environment\n    log: function(level, message) {\n      if (logger.level <= level) {\n        var method = logger.methodMap[level];\n        if (typeof console !== 'undefined' && console[method]) {\n          console[method].call(console, message);\n        }\n      }\n    }\n  };\n  __exports__.logger = logger;\n  var log = logger.log;\n  __exports__.log = log;\n  var createFrame = function(object) {\n    var frame = Utils.extend({}, object);\n    frame._parent = object;\n    return frame;\n  };\n  __exports__.createFrame = createFrame;\n  return __exports__;\n})(__module3__, __module5__);\n\n// handlebars/runtime.js\nvar __module6__ = (function(__dependency1__, __dependency2__, __dependency3__) {\n  \"use strict\";\n  var __exports__ = {};\n  var Utils = __dependency1__;\n  var Exception = __dependency2__;\n  var COMPILER_REVISION = __dependency3__.COMPILER_REVISION;\n  var REVISION_CHANGES = __dependency3__.REVISION_CHANGES;\n  var createFrame = __dependency3__.createFrame;\n\n  function checkRevision(compilerInfo) {\n    var compilerRevision = compilerInfo && compilerInfo[0] || 1,\n        currentRevision = COMPILER_REVISION;\n\n    if (compilerRevision !== currentRevision) {\n      if (compilerRevision < currentRevision) {\n        var runtimeVersions = REVISION_CHANGES[currentRevision],\n            compilerVersions = REVISION_CHANGES[compilerRevision];\n        throw new Exception(\"Template was precompiled with an older version of Handlebars than the current runtime. \"+\n              \"Please update your precompiler to a newer version (\"+runtimeVersions+\") or downgrade your runtime to an older version (\"+compilerVersions+\").\");\n      } else {\n        // Use the embedded version info since the runtime doesn't know about this revision yet\n        throw new Exception(\"Template was precompiled with a newer version of Handlebars than the current runtime. \"+\n              \"Please update your runtime to a newer version (\"+compilerInfo[1]+\").\");\n      }\n    }\n  }\n\n  __exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial\n\n  function template(templateSpec, env) {\n    /* istanbul ignore next */\n    if (!env) {\n      throw new Exception(\"No environment passed to template\");\n    }\n    if (!templateSpec || !templateSpec.main) {\n      throw new Exception('Unknown template object: ' + typeof templateSpec);\n    }\n\n    // Note: Using env.VM references rather than local var references throughout this section to allow\n    // for external users to override these as psuedo-supported APIs.\n    env.VM.checkRevision(templateSpec.compiler);\n\n    var invokePartialWrapper = function(partial, indent, name, context, hash, helpers, partials, data, depths) {\n      if (hash) {\n        context = Utils.extend({}, context, hash);\n      }\n\n      var result = env.VM.invokePartial.call(this, partial, name, context, helpers, partials, data, depths);\n\n      if (result == null && env.compile) {\n        var options = { helpers: helpers, partials: partials, data: data, depths: depths };\n        partials[name] = env.compile(partial, { data: data !== undefined, compat: templateSpec.compat }, env);\n        result = partials[name](context, options);\n      }\n      if (result != null) {\n        if (indent) {\n          var lines = result.split('\\n');\n          for (var i = 0, l = lines.length; i < l; i++) {\n            if (!lines[i] && i + 1 === l) {\n              break;\n            }\n\n            lines[i] = indent + lines[i];\n          }\n          result = lines.join('\\n');\n        }\n        return result;\n      } else {\n        throw new Exception(\"The partial \" + name + \" could not be compiled when running in runtime-only mode\");\n      }\n    };\n\n    // Just add water\n    var container = {\n      lookup: function(depths, name) {\n        var len = depths.length;\n        for (var i = 0; i < len; i++) {\n          if (depths[i] && depths[i][name] != null) {\n            return depths[i][name];\n          }\n        }\n      },\n      lambda: function(current, context) {\n        return typeof current === 'function' ? current.call(context) : current;\n      },\n\n      escapeExpression: Utils.escapeExpression,\n      invokePartial: invokePartialWrapper,\n\n      fn: function(i) {\n        return templateSpec[i];\n      },\n\n      programs: [],\n      program: function(i, data, depths) {\n        var programWrapper = this.programs[i],\n            fn = this.fn(i);\n        if (data || depths) {\n          programWrapper = program(this, i, fn, data, depths);\n        } else if (!programWrapper) {\n          programWrapper = this.programs[i] = program(this, i, fn);\n        }\n        return programWrapper;\n      },\n\n      data: function(data, depth) {\n        while (data && depth--) {\n          data = data._parent;\n        }\n        return data;\n      },\n      merge: function(param, common) {\n        var ret = param || common;\n\n        if (param && common && (param !== common)) {\n          ret = Utils.extend({}, common, param);\n        }\n\n        return ret;\n      },\n\n      noop: env.VM.noop,\n      compilerInfo: templateSpec.compiler\n    };\n\n    var ret = function(context, options) {\n      options = options || {};\n      var data = options.data;\n\n      ret._setup(options);\n      if (!options.partial && templateSpec.useData) {\n        data = initData(context, data);\n      }\n      var depths;\n      if (templateSpec.useDepths) {\n        depths = options.depths ? [context].concat(options.depths) : [context];\n      }\n\n      return templateSpec.main.call(container, context, container.helpers, container.partials, data, depths);\n    };\n    ret.isTop = true;\n\n    ret._setup = function(options) {\n      if (!options.partial) {\n        container.helpers = container.merge(options.helpers, env.helpers);\n\n        if (templateSpec.usePartial) {\n          container.partials = container.merge(options.partials, env.partials);\n        }\n      } else {\n        container.helpers = options.helpers;\n        container.partials = options.partials;\n      }\n    };\n\n    ret._child = function(i, data, depths) {\n      if (templateSpec.useDepths && !depths) {\n        throw new Exception('must pass parent depths');\n      }\n\n      return program(container, i, templateSpec[i], data, depths);\n    };\n    return ret;\n  }\n\n  __exports__.template = template;function program(container, i, fn, data, depths) {\n    var prog = function(context, options) {\n      options = options || {};\n\n      return fn.call(container, context, container.helpers, container.partials, options.data || data, depths && [context].concat(depths));\n    };\n    prog.program = i;\n    prog.depth = depths ? depths.length : 0;\n    return prog;\n  }\n\n  __exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data, depths) {\n    var options = { partial: true, helpers: helpers, partials: partials, data: data, depths: depths };\n\n    if(partial === undefined) {\n      throw new Exception(\"The partial \" + name + \" could not be found\");\n    } else if(partial instanceof Function) {\n      return partial(context, options);\n    }\n  }\n\n  __exports__.invokePartial = invokePartial;function noop() { return \"\"; }\n\n  __exports__.noop = noop;function initData(context, data) {\n    if (!data || !('root' in data)) {\n      data = data ? createFrame(data) : {};\n      data.root = context;\n    }\n    return data;\n  }\n  return __exports__;\n})(__module3__, __module5__, __module2__);\n\n// handlebars.runtime.js\nvar __module1__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {\n  \"use strict\";\n  var __exports__;\n  /*globals Handlebars: true */\n  var base = __dependency1__;\n\n  // Each of these augment the Handlebars object. No need to setup here.\n  // (This is done to easily share code between commonjs and browse envs)\n  var SafeString = __dependency2__;\n  var Exception = __dependency3__;\n  var Utils = __dependency4__;\n  var runtime = __dependency5__;\n\n  // For compatibility and usage outside of module systems, make the Handlebars object a namespace\n  var create = function() {\n    var hb = new base.HandlebarsEnvironment();\n\n    Utils.extend(hb, base);\n    hb.SafeString = SafeString;\n    hb.Exception = Exception;\n    hb.Utils = Utils;\n    hb.escapeExpression = Utils.escapeExpression;\n\n    hb.VM = runtime;\n    hb.template = function(spec) {\n      return runtime.template(spec, hb);\n    };\n\n    return hb;\n  };\n\n  var Handlebars = create();\n  Handlebars.create = create;\n\n  Handlebars['default'] = Handlebars;\n\n  __exports__ = Handlebars;\n  return __exports__;\n})(__module2__, __module4__, __module5__, __module3__, __module6__);\n\n// handlebars/compiler/ast.js\nvar __module7__ = (function(__dependency1__) {\n  \"use strict\";\n  var __exports__;\n  var Exception = __dependency1__;\n\n  function LocationInfo(locInfo) {\n    locInfo = locInfo || {};\n    this.firstLine   = locInfo.first_line;\n    this.firstColumn = locInfo.first_column;\n    this.lastColumn  = locInfo.last_column;\n    this.lastLine    = locInfo.last_line;\n  }\n\n  var AST = {\n    ProgramNode: function(statements, strip, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"program\";\n      this.statements = statements;\n      this.strip = strip;\n    },\n\n    MustacheNode: function(rawParams, hash, open, strip, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"mustache\";\n      this.strip = strip;\n\n      // Open may be a string parsed from the parser or a passed boolean flag\n      if (open != null && open.charAt) {\n        // Must use charAt to support IE pre-10\n        var escapeFlag = open.charAt(3) || open.charAt(2);\n        this.escaped = escapeFlag !== '{' && escapeFlag !== '&';\n      } else {\n        this.escaped = !!open;\n      }\n\n      if (rawParams instanceof AST.SexprNode) {\n        this.sexpr = rawParams;\n      } else {\n        // Support old AST API\n        this.sexpr = new AST.SexprNode(rawParams, hash);\n      }\n\n      // Support old AST API that stored this info in MustacheNode\n      this.id = this.sexpr.id;\n      this.params = this.sexpr.params;\n      this.hash = this.sexpr.hash;\n      this.eligibleHelper = this.sexpr.eligibleHelper;\n      this.isHelper = this.sexpr.isHelper;\n    },\n\n    SexprNode: function(rawParams, hash, locInfo) {\n      LocationInfo.call(this, locInfo);\n\n      this.type = \"sexpr\";\n      this.hash = hash;\n\n      var id = this.id = rawParams[0];\n      var params = this.params = rawParams.slice(1);\n\n      // a mustache is definitely a helper if:\n      // * it is an eligible helper, and\n      // * it has at least one parameter or hash segment\n      this.isHelper = !!(params.length || hash);\n\n      // a mustache is an eligible helper if:\n      // * its id is simple (a single part, not `this` or `..`)\n      this.eligibleHelper = this.isHelper || id.isSimple;\n\n      // if a mustache is an eligible helper but not a definite\n      // helper, it is ambiguous, and will be resolved in a later\n      // pass or at runtime.\n    },\n\n    PartialNode: function(partialName, context, hash, strip, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type         = \"partial\";\n      this.partialName  = partialName;\n      this.context      = context;\n      this.hash = hash;\n      this.strip = strip;\n\n      this.strip.inlineStandalone = true;\n    },\n\n    BlockNode: function(mustache, program, inverse, strip, locInfo) {\n      LocationInfo.call(this, locInfo);\n\n      this.type = 'block';\n      this.mustache = mustache;\n      this.program  = program;\n      this.inverse  = inverse;\n      this.strip = strip;\n\n      if (inverse && !program) {\n        this.isInverse = true;\n      }\n    },\n\n    RawBlockNode: function(mustache, content, close, locInfo) {\n      LocationInfo.call(this, locInfo);\n\n      if (mustache.sexpr.id.original !== close) {\n        throw new Exception(mustache.sexpr.id.original + \" doesn't match \" + close, this);\n      }\n\n      content = new AST.ContentNode(content, locInfo);\n\n      this.type = 'block';\n      this.mustache = mustache;\n      this.program = new AST.ProgramNode([content], {}, locInfo);\n    },\n\n    ContentNode: function(string, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"content\";\n      this.original = this.string = string;\n    },\n\n    HashNode: function(pairs, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"hash\";\n      this.pairs = pairs;\n    },\n\n    IdNode: function(parts, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"ID\";\n\n      var original = \"\",\n          dig = [],\n          depth = 0,\n          depthString = '';\n\n      for(var i=0,l=parts.length; i<l; i++) {\n        var part = parts[i].part;\n        original += (parts[i].separator || '') + part;\n\n        if (part === \"..\" || part === \".\" || part === \"this\") {\n          if (dig.length > 0) {\n            throw new Exception(\"Invalid path: \" + original, this);\n          } else if (part === \"..\") {\n            depth++;\n            depthString += '../';\n          } else {\n            this.isScoped = true;\n          }\n        } else {\n          dig.push(part);\n        }\n      }\n\n      this.original = original;\n      this.parts    = dig;\n      this.string   = dig.join('.');\n      this.depth    = depth;\n      this.idName   = depthString + this.string;\n\n      // an ID is simple if it only has one part, and that part is not\n      // `..` or `this`.\n      this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;\n\n      this.stringModeValue = this.string;\n    },\n\n    PartialNameNode: function(name, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"PARTIAL_NAME\";\n      this.name = name.original;\n    },\n\n    DataNode: function(id, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"DATA\";\n      this.id = id;\n      this.stringModeValue = id.stringModeValue;\n      this.idName = '@' + id.stringModeValue;\n    },\n\n    StringNode: function(string, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"STRING\";\n      this.original =\n        this.string =\n        this.stringModeValue = string;\n    },\n\n    NumberNode: function(number, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"NUMBER\";\n      this.original =\n        this.number = number;\n      this.stringModeValue = Number(number);\n    },\n\n    BooleanNode: function(bool, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"BOOLEAN\";\n      this.bool = bool;\n      this.stringModeValue = bool === \"true\";\n    },\n\n    CommentNode: function(comment, locInfo) {\n      LocationInfo.call(this, locInfo);\n      this.type = \"comment\";\n      this.comment = comment;\n\n      this.strip = {\n        inlineStandalone: true\n      };\n    }\n  };\n\n\n  // Must be exported as an object rather than the root of the module as the jison lexer\n  // most modify the object to operate properly.\n  __exports__ = AST;\n  return __exports__;\n})(__module5__);\n\n// handlebars/compiler/parser.js\nvar __module9__ = (function() {\n  \"use strict\";\n  var __exports__;\n  /* jshint ignore:start */\n  /* istanbul ignore next */\n  /* Jison generated parser */\n  var handlebars = (function(){\n  var parser = {trace: function trace() { },\n  yy: {},\n  symbols_: {\"error\":2,\"root\":3,\"program\":4,\"EOF\":5,\"program_repetition0\":6,\"statement\":7,\"mustache\":8,\"block\":9,\"rawBlock\":10,\"partial\":11,\"CONTENT\":12,\"COMMENT\":13,\"openRawBlock\":14,\"END_RAW_BLOCK\":15,\"OPEN_RAW_BLOCK\":16,\"sexpr\":17,\"CLOSE_RAW_BLOCK\":18,\"openBlock\":19,\"block_option0\":20,\"closeBlock\":21,\"openInverse\":22,\"block_option1\":23,\"OPEN_BLOCK\":24,\"CLOSE\":25,\"OPEN_INVERSE\":26,\"inverseAndProgram\":27,\"INVERSE\":28,\"OPEN_ENDBLOCK\":29,\"path\":30,\"OPEN\":31,\"OPEN_UNESCAPED\":32,\"CLOSE_UNESCAPED\":33,\"OPEN_PARTIAL\":34,\"partialName\":35,\"param\":36,\"partial_option0\":37,\"partial_option1\":38,\"sexpr_repetition0\":39,\"sexpr_option0\":40,\"dataName\":41,\"STRING\":42,\"NUMBER\":43,\"BOOLEAN\":44,\"OPEN_SEXPR\":45,\"CLOSE_SEXPR\":46,\"hash\":47,\"hash_repetition_plus0\":48,\"hashSegment\":49,\"ID\":50,\"EQUALS\":51,\"DATA\":52,\"pathSegments\":53,\"SEP\":54,\"$accept\":0,\"$end\":1},\n  terminals_: {2:\"error\",5:\"EOF\",12:\"CONTENT\",13:\"COMMENT\",15:\"END_RAW_BLOCK\",16:\"OPEN_RAW_BLOCK\",18:\"CLOSE_RAW_BLOCK\",24:\"OPEN_BLOCK\",25:\"CLOSE\",26:\"OPEN_INVERSE\",28:\"INVERSE\",29:\"OPEN_ENDBLOCK\",31:\"OPEN\",32:\"OPEN_UNESCAPED\",33:\"CLOSE_UNESCAPED\",34:\"OPEN_PARTIAL\",42:\"STRING\",43:\"NUMBER\",44:\"BOOLEAN\",45:\"OPEN_SEXPR\",46:\"CLOSE_SEXPR\",50:\"ID\",51:\"EQUALS\",52:\"DATA\",54:\"SEP\"},\n  productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],\n  performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {\n\n  var $0 = $$.length - 1;\n  switch (yystate) {\n  case 1: yy.prepareProgram($$[$0-1].statements, true); return $$[$0-1];\n  break;\n  case 2:this.$ = new yy.ProgramNode(yy.prepareProgram($$[$0]), {}, this._$);\n  break;\n  case 3:this.$ = $$[$0];\n  break;\n  case 4:this.$ = $$[$0];\n  break;\n  case 5:this.$ = $$[$0];\n  break;\n  case 6:this.$ = $$[$0];\n  break;\n  case 7:this.$ = new yy.ContentNode($$[$0], this._$);\n  break;\n  case 8:this.$ = new yy.CommentNode($$[$0], this._$);\n  break;\n  case 9:this.$ = new yy.RawBlockNode($$[$0-2], $$[$0-1], $$[$0], this._$);\n  break;\n  case 10:this.$ = new yy.MustacheNode($$[$0-1], null, '', '', this._$);\n  break;\n  case 11:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], false, this._$);\n  break;\n  case 12:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], true, this._$);\n  break;\n  case 13:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);\n  break;\n  case 14:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);\n  break;\n  case 15:this.$ = { strip: yy.stripFlags($$[$0-1], $$[$0-1]), program: $$[$0] };\n  break;\n  case 16:this.$ = {path: $$[$0-1], strip: yy.stripFlags($$[$0-2], $$[$0])};\n  break;\n  case 17:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);\n  break;\n  case 18:this.$ = new yy.MustacheNode($$[$0-1], null, $$[$0-2], yy.stripFlags($$[$0-2], $$[$0]), this._$);\n  break;\n  case 19:this.$ = new yy.PartialNode($$[$0-3], $$[$0-2], $$[$0-1], yy.stripFlags($$[$0-4], $$[$0]), this._$);\n  break;\n  case 20:this.$ = new yy.PartialNode($$[$0-2], undefined, $$[$0-1], yy.stripFlags($$[$0-3], $$[$0]), this._$);\n  break;\n  case 21:this.$ = new yy.SexprNode([$$[$0-2]].concat($$[$0-1]), $$[$0], this._$);\n  break;\n  case 22:this.$ = new yy.SexprNode([$$[$0]], null, this._$);\n  break;\n  case 23:this.$ = $$[$0];\n  break;\n  case 24:this.$ = new yy.StringNode($$[$0], this._$);\n  break;\n  case 25:this.$ = new yy.NumberNode($$[$0], this._$);\n  break;\n  case 26:this.$ = new yy.BooleanNode($$[$0], this._$);\n  break;\n  case 27:this.$ = $$[$0];\n  break;\n  case 28:$$[$0-1].isHelper = true; this.$ = $$[$0-1];\n  break;\n  case 29:this.$ = new yy.HashNode($$[$0], this._$);\n  break;\n  case 30:this.$ = [$$[$0-2], $$[$0]];\n  break;\n  case 31:this.$ = new yy.PartialNameNode($$[$0], this._$);\n  break;\n  case 32:this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0], this._$), this._$);\n  break;\n  case 33:this.$ = new yy.PartialNameNode(new yy.NumberNode($$[$0], this._$));\n  break;\n  case 34:this.$ = new yy.DataNode($$[$0], this._$);\n  break;\n  case 35:this.$ = new yy.IdNode($$[$0], this._$);\n  break;\n  case 36: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];\n  break;\n  case 37:this.$ = [{part: $$[$0]}];\n  break;\n  case 38:this.$ = [];\n  break;\n  case 39:$$[$0-1].push($$[$0]);\n  break;\n  case 48:this.$ = [];\n  break;\n  case 49:$$[$0-1].push($$[$0]);\n  break;\n  case 52:this.$ = [$$[$0]];\n  break;\n  case 53:$$[$0-1].push($$[$0]);\n  break;\n  }\n  },\n  table: [{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],\n  defaultActions: {4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},\n  parseError: function parseError(str, hash) {\n      throw new Error(str);\n  },\n  parse: function parse(input) {\n      var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n      this.lexer.setInput(input);\n      this.lexer.yy = this.yy;\n      this.yy.lexer = this.lexer;\n      this.yy.parser = this;\n      if (typeof this.lexer.yylloc == \"undefined\")\n          this.lexer.yylloc = {};\n      var yyloc = this.lexer.yylloc;\n      lstack.push(yyloc);\n      var ranges = this.lexer.options && this.lexer.options.ranges;\n      if (typeof this.yy.parseError === \"function\")\n          this.parseError = this.yy.parseError;\n      function popStack(n) {\n          stack.length = stack.length - 2 * n;\n          vstack.length = vstack.length - n;\n          lstack.length = lstack.length - n;\n      }\n      function lex() {\n          var token;\n          token = self.lexer.lex() || 1;\n          if (typeof token !== \"number\") {\n              token = self.symbols_[token] || token;\n          }\n          return token;\n      }\n      var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n      while (true) {\n          state = stack[stack.length - 1];\n          if (this.defaultActions[state]) {\n              action = this.defaultActions[state];\n          } else {\n              if (symbol === null || typeof symbol == \"undefined\") {\n                  symbol = lex();\n              }\n              action = table[state] && table[state][symbol];\n          }\n          if (typeof action === \"undefined\" || !action.length || !action[0]) {\n              var errStr = \"\";\n              if (!recovering) {\n                  expected = [];\n                  for (p in table[state])\n                      if (this.terminals_[p] && p > 2) {\n                          expected.push(\"'\" + this.terminals_[p] + \"'\");\n                      }\n                  if (this.lexer.showPosition) {\n                      errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + this.lexer.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n                  } else {\n                      errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == 1?\"end of input\":\"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n                  }\n                  this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});\n              }\n          }\n          if (action[0] instanceof Array && action.length > 1) {\n              throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n          }\n          switch (action[0]) {\n          case 1:\n              stack.push(symbol);\n              vstack.push(this.lexer.yytext);\n              lstack.push(this.lexer.yylloc);\n              stack.push(action[1]);\n              symbol = null;\n              if (!preErrorSymbol) {\n                  yyleng = this.lexer.yyleng;\n                  yytext = this.lexer.yytext;\n                  yylineno = this.lexer.yylineno;\n                  yyloc = this.lexer.yylloc;\n                  if (recovering > 0)\n                      recovering--;\n              } else {\n                  symbol = preErrorSymbol;\n                  preErrorSymbol = null;\n              }\n              break;\n          case 2:\n              len = this.productions_[action[1]][1];\n              yyval.$ = vstack[vstack.length - len];\n              yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};\n              if (ranges) {\n                  yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n              }\n              r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);\n              if (typeof r !== \"undefined\") {\n                  return r;\n              }\n              if (len) {\n                  stack = stack.slice(0, -1 * len * 2);\n                  vstack = vstack.slice(0, -1 * len);\n                  lstack = lstack.slice(0, -1 * len);\n              }\n              stack.push(this.productions_[action[1]][0]);\n              vstack.push(yyval.$);\n              lstack.push(yyval._$);\n              newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n              stack.push(newState);\n              break;\n          case 3:\n              return true;\n          }\n      }\n      return true;\n  }\n  };\n  /* Jison generated lexer */\n  var lexer = (function(){\n  var lexer = ({EOF:1,\n  parseError:function parseError(str, hash) {\n          if (this.yy.parser) {\n              this.yy.parser.parseError(str, hash);\n          } else {\n              throw new Error(str);\n          }\n      },\n  setInput:function (input) {\n          this._input = input;\n          this._more = this._less = this.done = false;\n          this.yylineno = this.yyleng = 0;\n          this.yytext = this.matched = this.match = '';\n          this.conditionStack = ['INITIAL'];\n          this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};\n          if (this.options.ranges) this.yylloc.range = [0,0];\n          this.offset = 0;\n          return this;\n      },\n  input:function () {\n          var ch = this._input[0];\n          this.yytext += ch;\n          this.yyleng++;\n          this.offset++;\n          this.match += ch;\n          this.matched += ch;\n          var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n          if (lines) {\n              this.yylineno++;\n              this.yylloc.last_line++;\n          } else {\n              this.yylloc.last_column++;\n          }\n          if (this.options.ranges) this.yylloc.range[1]++;\n\n          this._input = this._input.slice(1);\n          return ch;\n      },\n  unput:function (ch) {\n          var len = ch.length;\n          var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n          this._input = ch + this._input;\n          this.yytext = this.yytext.substr(0, this.yytext.length-len-1);\n          //this.yyleng -= len;\n          this.offset -= len;\n          var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n          this.match = this.match.substr(0, this.match.length-1);\n          this.matched = this.matched.substr(0, this.matched.length-1);\n\n          if (lines.length-1) this.yylineno -= lines.length-1;\n          var r = this.yylloc.range;\n\n          this.yylloc = {first_line: this.yylloc.first_line,\n            last_line: this.yylineno+1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:\n                this.yylloc.first_column - len\n            };\n\n          if (this.options.ranges) {\n              this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n          }\n          return this;\n      },\n  more:function () {\n          this._more = true;\n          return this;\n      },\n  less:function (n) {\n          this.unput(this.match.slice(n));\n      },\n  pastInput:function () {\n          var past = this.matched.substr(0, this.matched.length - this.match.length);\n          return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n      },\n  upcomingInput:function () {\n          var next = this.match;\n          if (next.length < 20) {\n              next += this._input.substr(0, 20-next.length);\n          }\n          return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\\n/g, \"\");\n      },\n  showPosition:function () {\n          var pre = this.pastInput();\n          var c = new Array(pre.length + 1).join(\"-\");\n          return pre + this.upcomingInput() + \"\\n\" + c+\"^\";\n      },\n  next:function () {\n          if (this.done) {\n              return this.EOF;\n          }\n          if (!this._input) this.done = true;\n\n          var token,\n              match,\n              tempMatch,\n              index,\n              col,\n              lines;\n          if (!this._more) {\n              this.yytext = '';\n              this.match = '';\n          }\n          var rules = this._currentRules();\n          for (var i=0;i < rules.length; i++) {\n              tempMatch = this._input.match(this.rules[rules[i]]);\n              if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                  match = tempMatch;\n                  index = i;\n                  if (!this.options.flex) break;\n              }\n          }\n          if (match) {\n              lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n              if (lines) this.yylineno += lines.length;\n              this.yylloc = {first_line: this.yylloc.last_line,\n                             last_line: this.yylineno+1,\n                             first_column: this.yylloc.last_column,\n                             last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length};\n              this.yytext += match[0];\n              this.match += match[0];\n              this.matches = match;\n              this.yyleng = this.yytext.length;\n              if (this.options.ranges) {\n                  this.yylloc.range = [this.offset, this.offset += this.yyleng];\n              }\n              this._more = false;\n              this._input = this._input.slice(match[0].length);\n              this.matched += match[0];\n              token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);\n              if (this.done && this._input) this.done = false;\n              if (token) return token;\n              else return;\n          }\n          if (this._input === \"\") {\n              return this.EOF;\n          } else {\n              return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\\n'+this.showPosition(),\n                      {text: \"\", token: null, line: this.yylineno});\n          }\n      },\n  lex:function lex() {\n          var r = this.next();\n          if (typeof r !== 'undefined') {\n              return r;\n          } else {\n              return this.lex();\n          }\n      },\n  begin:function begin(condition) {\n          this.conditionStack.push(condition);\n      },\n  popState:function popState() {\n          return this.conditionStack.pop();\n      },\n  _currentRules:function _currentRules() {\n          return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;\n      },\n  topState:function () {\n          return this.conditionStack[this.conditionStack.length-2];\n      },\n  pushState:function begin(condition) {\n          this.begin(condition);\n      }});\n  lexer.options = {};\n  lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\n\n  function strip(start, end) {\n    return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng-end);\n  }\n\n\n  var YYSTATE=YY_START\n  switch($avoiding_name_collisions) {\n  case 0:\n                                     if(yy_.yytext.slice(-2) === \"\\\\\\\\\") {\n                                       strip(0,1);\n                                       this.begin(\"mu\");\n                                     } else if(yy_.yytext.slice(-1) === \"\\\\\") {\n                                       strip(0,1);\n                                       this.begin(\"emu\");\n                                     } else {\n                                       this.begin(\"mu\");\n                                     }\n                                     if(yy_.yytext) return 12;\n\n  break;\n  case 1:return 12;\n  break;\n  case 2:\n                                     this.popState();\n                                     return 12;\n\n  break;\n  case 3:\n                                    yy_.yytext = yy_.yytext.substr(5, yy_.yyleng-9);\n                                    this.popState();\n                                    return 15;\n\n  break;\n  case 4: return 12;\n  break;\n  case 5:strip(0,4); this.popState(); return 13;\n  break;\n  case 6:return 45;\n  break;\n  case 7:return 46;\n  break;\n  case 8: return 16;\n  break;\n  case 9:\n                                    this.popState();\n                                    this.begin('raw');\n                                    return 18;\n\n  break;\n  case 10:return 34;\n  break;\n  case 11:return 24;\n  break;\n  case 12:return 29;\n  break;\n  case 13:this.popState(); return 28;\n  break;\n  case 14:this.popState(); return 28;\n  break;\n  case 15:return 26;\n  break;\n  case 16:return 26;\n  break;\n  case 17:return 32;\n  break;\n  case 18:return 31;\n  break;\n  case 19:this.popState(); this.begin('com');\n  break;\n  case 20:strip(3,5); this.popState(); return 13;\n  break;\n  case 21:return 31;\n  break;\n  case 22:return 51;\n  break;\n  case 23:return 50;\n  break;\n  case 24:return 50;\n  break;\n  case 25:return 54;\n  break;\n  case 26:// ignore whitespace\n  break;\n  case 27:this.popState(); return 33;\n  break;\n  case 28:this.popState(); return 25;\n  break;\n  case 29:yy_.yytext = strip(1,2).replace(/\\\\\"/g,'\"'); return 42;\n  break;\n  case 30:yy_.yytext = strip(1,2).replace(/\\\\'/g,\"'\"); return 42;\n  break;\n  case 31:return 52;\n  break;\n  case 32:return 44;\n  break;\n  case 33:return 44;\n  break;\n  case 34:return 43;\n  break;\n  case 35:return 50;\n  break;\n  case 36:yy_.yytext = strip(1,2); return 50;\n  break;\n  case 37:return 'INVALID';\n  break;\n  case 38:return 5;\n  break;\n  }\n  };\n  lexer.rules = [/^(?:[^\\x00]*?(?=(\\{\\{)))/,/^(?:[^\\x00]+)/,/^(?:[^\\x00]{2,}?(?=(\\{\\{|\\\\\\{\\{|\\\\\\\\\\{\\{|$)))/,/^(?:\\{\\{\\{\\{\\/[^\\s!\"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=[=}\\s\\/.])\\}\\}\\}\\})/,/^(?:[^\\x00]*?(?=(\\{\\{\\{\\{\\/)))/,/^(?:[\\s\\S]*?--\\}\\})/,/^(?:\\()/,/^(?:\\))/,/^(?:\\{\\{\\{\\{)/,/^(?:\\}\\}\\}\\})/,/^(?:\\{\\{(~)?>)/,/^(?:\\{\\{(~)?#)/,/^(?:\\{\\{(~)?\\/)/,/^(?:\\{\\{(~)?\\^\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\s*else\\s*(~)?\\}\\})/,/^(?:\\{\\{(~)?\\^)/,/^(?:\\{\\{(~)?\\s*else\\b)/,/^(?:\\{\\{(~)?\\{)/,/^(?:\\{\\{(~)?&)/,/^(?:\\{\\{!--)/,/^(?:\\{\\{![\\s\\S]*?\\}\\})/,/^(?:\\{\\{(~)?)/,/^(?:=)/,/^(?:\\.\\.)/,/^(?:\\.(?=([=~}\\s\\/.)])))/,/^(?:[\\/.])/,/^(?:\\s+)/,/^(?:\\}(~)?\\}\\})/,/^(?:(~)?\\}\\})/,/^(?:\"(\\\\[\"]|[^\"])*\")/,/^(?:'(\\\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\\s)])))/,/^(?:false(?=([~}\\s)])))/,/^(?:-?[0-9]+(?:\\.[0-9]+)?(?=([~}\\s)])))/,/^(?:([^\\s!\"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=([=~}\\s\\/.)]))))/,/^(?:\\[[^\\]]*\\])/,/^(?:.)/,/^(?:$)/];\n  lexer.conditions = {\"mu\":{\"rules\":[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],\"inclusive\":false},\"emu\":{\"rules\":[2],\"inclusive\":false},\"com\":{\"rules\":[5],\"inclusive\":false},\"raw\":{\"rules\":[3,4],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,38],\"inclusive\":true}};\n  return lexer;})()\n  parser.lexer = lexer;\n  function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;\n  return new Parser;\n  })();__exports__ = handlebars;\n  /* jshint ignore:end */\n  return __exports__;\n})();\n\n// handlebars/compiler/helpers.js\nvar __module10__ = (function(__dependency1__) {\n  \"use strict\";\n  var __exports__ = {};\n  var Exception = __dependency1__;\n\n  function stripFlags(open, close) {\n    return {\n      left: open.charAt(2) === '~',\n      right: close.charAt(close.length-3) === '~'\n    };\n  }\n\n  __exports__.stripFlags = stripFlags;\n  function prepareBlock(mustache, program, inverseAndProgram, close, inverted, locInfo) {\n    /*jshint -W040 */\n    if (mustache.sexpr.id.original !== close.path.original) {\n      throw new Exception(mustache.sexpr.id.original + ' doesn\\'t match ' + close.path.original, mustache);\n    }\n\n    var inverse = inverseAndProgram && inverseAndProgram.program;\n\n    var strip = {\n      left: mustache.strip.left,\n      right: close.strip.right,\n\n      // Determine the standalone candiacy. Basically flag our content as being possibly standalone\n      // so our parent can determine if we actually are standalone\n      openStandalone: isNextWhitespace(program.statements),\n      closeStandalone: isPrevWhitespace((inverse || program).statements)\n    };\n\n    if (mustache.strip.right) {\n      omitRight(program.statements, null, true);\n    }\n\n    if (inverse) {\n      var inverseStrip = inverseAndProgram.strip;\n\n      if (inverseStrip.left) {\n        omitLeft(program.statements, null, true);\n      }\n      if (inverseStrip.right) {\n        omitRight(inverse.statements, null, true);\n      }\n      if (close.strip.left) {\n        omitLeft(inverse.statements, null, true);\n      }\n\n      // Find standalone else statments\n      if (isPrevWhitespace(program.statements)\n          && isNextWhitespace(inverse.statements)) {\n\n        omitLeft(program.statements);\n        omitRight(inverse.statements);\n      }\n    } else {\n      if (close.strip.left) {\n        omitLeft(program.statements, null, true);\n      }\n    }\n\n    if (inverted) {\n      return new this.BlockNode(mustache, inverse, program, strip, locInfo);\n    } else {\n      return new this.BlockNode(mustache, program, inverse, strip, locInfo);\n    }\n  }\n\n  __exports__.prepareBlock = prepareBlock;\n  function prepareProgram(statements, isRoot) {\n    for (var i = 0, l = statements.length; i < l; i++) {\n      var current = statements[i],\n          strip = current.strip;\n\n      if (!strip) {\n        continue;\n      }\n\n      var _isPrevWhitespace = isPrevWhitespace(statements, i, isRoot, current.type === 'partial'),\n          _isNextWhitespace = isNextWhitespace(statements, i, isRoot),\n\n          openStandalone = strip.openStandalone && _isPrevWhitespace,\n          closeStandalone = strip.closeStandalone && _isNextWhitespace,\n          inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;\n\n      if (strip.right) {\n        omitRight(statements, i, true);\n      }\n      if (strip.left) {\n        omitLeft(statements, i, true);\n      }\n\n      if (inlineStandalone) {\n        omitRight(statements, i);\n\n        if (omitLeft(statements, i)) {\n          // If we are on a standalone node, save the indent info for partials\n          if (current.type === 'partial') {\n            current.indent = (/([ \\t]+$)/).exec(statements[i-1].original) ? RegExp.$1 : '';\n          }\n        }\n      }\n      if (openStandalone) {\n        omitRight((current.program || current.inverse).statements);\n\n        // Strip out the previous content node if it's whitespace only\n        omitLeft(statements, i);\n      }\n      if (closeStandalone) {\n        // Always strip the next node\n        omitRight(statements, i);\n\n        omitLeft((current.inverse || current.program).statements);\n      }\n    }\n\n    return statements;\n  }\n\n  __exports__.prepareProgram = prepareProgram;function isPrevWhitespace(statements, i, isRoot) {\n    if (i === undefined) {\n      i = statements.length;\n    }\n\n    // Nodes that end with newlines are considered whitespace (but are special\n    // cased for strip operations)\n    var prev = statements[i-1],\n        sibling = statements[i-2];\n    if (!prev) {\n      return isRoot;\n    }\n\n    if (prev.type === 'content') {\n      return (sibling || !isRoot ? (/\\r?\\n\\s*?$/) : (/(^|\\r?\\n)\\s*?$/)).test(prev.original);\n    }\n  }\n  function isNextWhitespace(statements, i, isRoot) {\n    if (i === undefined) {\n      i = -1;\n    }\n\n    var next = statements[i+1],\n        sibling = statements[i+2];\n    if (!next) {\n      return isRoot;\n    }\n\n    if (next.type === 'content') {\n      return (sibling || !isRoot ? (/^\\s*?\\r?\\n/) : (/^\\s*?(\\r?\\n|$)/)).test(next.original);\n    }\n  }\n\n  // Marks the node to the right of the position as omitted.\n  // I.e. {{foo}}' ' will mark the ' ' node as omitted.\n  //\n  // If i is undefined, then the first child will be marked as such.\n  //\n  // If mulitple is truthy then all whitespace will be stripped out until non-whitespace\n  // content is met.\n  function omitRight(statements, i, multiple) {\n    var current = statements[i == null ? 0 : i + 1];\n    if (!current || current.type !== 'content' || (!multiple && current.rightStripped)) {\n      return;\n    }\n\n    var original = current.string;\n    current.string = current.string.replace(multiple ? (/^\\s+/) : (/^[ \\t]*\\r?\\n?/), '');\n    current.rightStripped = current.string !== original;\n  }\n\n  // Marks the node to the left of the position as omitted.\n  // I.e. ' '{{foo}} will mark the ' ' node as omitted.\n  //\n  // If i is undefined then the last child will be marked as such.\n  //\n  // If mulitple is truthy then all whitespace will be stripped out until non-whitespace\n  // content is met.\n  function omitLeft(statements, i, multiple) {\n    var current = statements[i == null ? statements.length - 1 : i - 1];\n    if (!current || current.type !== 'content' || (!multiple && current.leftStripped)) {\n      return;\n    }\n\n    // We omit the last node if it's whitespace only and not preceeded by a non-content node.\n    var original = current.string;\n    current.string = current.string.replace(multiple ? (/\\s+$/) : (/[ \\t]+$/), '');\n    current.leftStripped = current.string !== original;\n    return current.leftStripped;\n  }\n  return __exports__;\n})(__module5__);\n\n// handlebars/compiler/base.js\nvar __module8__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__) {\n  \"use strict\";\n  var __exports__ = {};\n  var parser = __dependency1__;\n  var AST = __dependency2__;\n  var Helpers = __dependency3__;\n  var extend = __dependency4__.extend;\n\n  __exports__.parser = parser;\n\n  var yy = {};\n  extend(yy, Helpers, AST);\n\n  function parse(input) {\n    // Just return if an already-compile AST was passed in.\n    if (input.constructor === AST.ProgramNode) { return input; }\n\n    parser.yy = yy;\n\n    return parser.parse(input);\n  }\n\n  __exports__.parse = parse;\n  return __exports__;\n})(__module9__, __module7__, __module10__, __module3__);\n\n// handlebars/compiler/compiler.js\nvar __module11__ = (function(__dependency1__, __dependency2__) {\n  \"use strict\";\n  var __exports__ = {};\n  var Exception = __dependency1__;\n  var isArray = __dependency2__.isArray;\n\n  var slice = [].slice;\n\n  function Compiler() {}\n\n  __exports__.Compiler = Compiler;// the foundHelper register will disambiguate helper lookup from finding a\n  // function in a context. This is necessary for mustache compatibility, which\n  // requires that context functions in blocks are evaluated by blockHelperMissing,\n  // and then proceed as if the resulting value was provided to blockHelperMissing.\n\n  Compiler.prototype = {\n    compiler: Compiler,\n\n    equals: function(other) {\n      var len = this.opcodes.length;\n      if (other.opcodes.length !== len) {\n        return false;\n      }\n\n      for (var i = 0; i < len; i++) {\n        var opcode = this.opcodes[i],\n            otherOpcode = other.opcodes[i];\n        if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {\n          return false;\n        }\n      }\n\n      // We know that length is the same between the two arrays because they are directly tied\n      // to the opcode behavior above.\n      len = this.children.length;\n      for (i = 0; i < len; i++) {\n        if (!this.children[i].equals(other.children[i])) {\n          return false;\n        }\n      }\n\n      return true;\n    },\n\n    guid: 0,\n\n    compile: function(program, options) {\n      this.opcodes = [];\n      this.children = [];\n      this.depths = {list: []};\n      this.options = options;\n      this.stringParams = options.stringParams;\n      this.trackIds = options.trackIds;\n\n      // These changes will propagate to the other compiler components\n      var knownHelpers = this.options.knownHelpers;\n      this.options.knownHelpers = {\n        'helperMissing': true,\n        'blockHelperMissing': true,\n        'each': true,\n        'if': true,\n        'unless': true,\n        'with': true,\n        'log': true,\n        'lookup': true\n      };\n      if (knownHelpers) {\n        for (var name in knownHelpers) {\n          this.options.knownHelpers[name] = knownHelpers[name];\n        }\n      }\n\n      return this.accept(program);\n    },\n\n    accept: function(node) {\n      return this[node.type](node);\n    },\n\n    program: function(program) {\n      var statements = program.statements;\n\n      for(var i=0, l=statements.length; i<l; i++) {\n        this.accept(statements[i]);\n      }\n      this.isSimple = l === 1;\n\n      this.depths.list = this.depths.list.sort(function(a, b) {\n        return a - b;\n      });\n\n      return this;\n    },\n\n    compileProgram: function(program) {\n      var result = new this.compiler().compile(program, this.options);\n      var guid = this.guid++, depth;\n\n      this.usePartial = this.usePartial || result.usePartial;\n\n      this.children[guid] = result;\n\n      for(var i=0, l=result.depths.list.length; i<l; i++) {\n        depth = result.depths.list[i];\n\n        if(depth < 2) { continue; }\n        else { this.addDepth(depth - 1); }\n      }\n\n      return guid;\n    },\n\n    block: function(block) {\n      var mustache = block.mustache,\n          program = block.program,\n          inverse = block.inverse;\n\n      if (program) {\n        program = this.compileProgram(program);\n      }\n\n      if (inverse) {\n        inverse = this.compileProgram(inverse);\n      }\n\n      var sexpr = mustache.sexpr;\n      var type = this.classifySexpr(sexpr);\n\n      if (type === \"helper\") {\n        this.helperSexpr(sexpr, program, inverse);\n      } else if (type === \"simple\") {\n        this.simpleSexpr(sexpr);\n\n        // now that the simple mustache is resolved, we need to\n        // evaluate it by executing `blockHelperMissing`\n        this.opcode('pushProgram', program);\n        this.opcode('pushProgram', inverse);\n        this.opcode('emptyHash');\n        this.opcode('blockValue', sexpr.id.original);\n      } else {\n        this.ambiguousSexpr(sexpr, program, inverse);\n\n        // now that the simple mustache is resolved, we need to\n        // evaluate it by executing `blockHelperMissing`\n        this.opcode('pushProgram', program);\n        this.opcode('pushProgram', inverse);\n        this.opcode('emptyHash');\n        this.opcode('ambiguousBlockValue');\n      }\n\n      this.opcode('append');\n    },\n\n    hash: function(hash) {\n      var pairs = hash.pairs, i, l;\n\n      this.opcode('pushHash');\n\n      for(i=0, l=pairs.length; i<l; i++) {\n        this.pushParam(pairs[i][1]);\n      }\n      while(i--) {\n        this.opcode('assignToHash', pairs[i][0]);\n      }\n      this.opcode('popHash');\n    },\n\n    partial: function(partial) {\n      var partialName = partial.partialName;\n      this.usePartial = true;\n\n      if (partial.hash) {\n        this.accept(partial.hash);\n      } else {\n        this.opcode('push', 'undefined');\n      }\n\n      if (partial.context) {\n        this.accept(partial.context);\n      } else {\n        this.opcode('getContext', 0);\n        this.opcode('pushContext');\n      }\n\n      this.opcode('invokePartial', partialName.name, partial.indent || '');\n      this.opcode('append');\n    },\n\n    content: function(content) {\n      if (content.string) {\n        this.opcode('appendContent', content.string);\n      }\n    },\n\n    mustache: function(mustache) {\n      this.sexpr(mustache.sexpr);\n\n      if(mustache.escaped && !this.options.noEscape) {\n        this.opcode('appendEscaped');\n      } else {\n        this.opcode('append');\n      }\n    },\n\n    ambiguousSexpr: function(sexpr, program, inverse) {\n      var id = sexpr.id,\n          name = id.parts[0],\n          isBlock = program != null || inverse != null;\n\n      this.opcode('getContext', id.depth);\n\n      this.opcode('pushProgram', program);\n      this.opcode('pushProgram', inverse);\n\n      this.ID(id);\n\n      this.opcode('invokeAmbiguous', name, isBlock);\n    },\n\n    simpleSexpr: function(sexpr) {\n      var id = sexpr.id;\n\n      if (id.type === 'DATA') {\n        this.DATA(id);\n      } else if (id.parts.length) {\n        this.ID(id);\n      } else {\n        // Simplified ID for `this`\n        this.addDepth(id.depth);\n        this.opcode('getContext', id.depth);\n        this.opcode('pushContext');\n      }\n\n      this.opcode('resolvePossibleLambda');\n    },\n\n    helperSexpr: function(sexpr, program, inverse) {\n      var params = this.setupFullMustacheParams(sexpr, program, inverse),\n          id = sexpr.id,\n          name = id.parts[0];\n\n      if (this.options.knownHelpers[name]) {\n        this.opcode('invokeKnownHelper', params.length, name);\n      } else if (this.options.knownHelpersOnly) {\n        throw new Exception(\"You specified knownHelpersOnly, but used the unknown helper \" + name, sexpr);\n      } else {\n        id.falsy = true;\n\n        this.ID(id);\n        this.opcode('invokeHelper', params.length, id.original, id.isSimple);\n      }\n    },\n\n    sexpr: function(sexpr) {\n      var type = this.classifySexpr(sexpr);\n\n      if (type === \"simple\") {\n        this.simpleSexpr(sexpr);\n      } else if (type === \"helper\") {\n        this.helperSexpr(sexpr);\n      } else {\n        this.ambiguousSexpr(sexpr);\n      }\n    },\n\n    ID: function(id) {\n      this.addDepth(id.depth);\n      this.opcode('getContext', id.depth);\n\n      var name = id.parts[0];\n      if (!name) {\n        // Context reference, i.e. `{{foo .}}` or `{{foo ..}}`\n        this.opcode('pushContext');\n      } else {\n        this.opcode('lookupOnContext', id.parts, id.falsy, id.isScoped);\n      }\n    },\n\n    DATA: function(data) {\n      this.options.data = true;\n      this.opcode('lookupData', data.id.depth, data.id.parts);\n    },\n\n    STRING: function(string) {\n      this.opcode('pushString', string.string);\n    },\n\n    NUMBER: function(number) {\n      this.opcode('pushLiteral', number.number);\n    },\n\n    BOOLEAN: function(bool) {\n      this.opcode('pushLiteral', bool.bool);\n    },\n\n    comment: function() {},\n\n    // HELPERS\n    opcode: function(name) {\n      this.opcodes.push({ opcode: name, args: slice.call(arguments, 1) });\n    },\n\n    addDepth: function(depth) {\n      if(depth === 0) { return; }\n\n      if(!this.depths[depth]) {\n        this.depths[depth] = true;\n        this.depths.list.push(depth);\n      }\n    },\n\n    classifySexpr: function(sexpr) {\n      var isHelper   = sexpr.isHelper;\n      var isEligible = sexpr.eligibleHelper;\n      var options    = this.options;\n\n      // if ambiguous, we can possibly resolve the ambiguity now\n      // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.\n      if (isEligible && !isHelper) {\n        var name = sexpr.id.parts[0];\n\n        if (options.knownHelpers[name]) {\n          isHelper = true;\n        } else if (options.knownHelpersOnly) {\n          isEligible = false;\n        }\n      }\n\n      if (isHelper) { return \"helper\"; }\n      else if (isEligible) { return \"ambiguous\"; }\n      else { return \"simple\"; }\n    },\n\n    pushParams: function(params) {\n      for(var i=0, l=params.length; i<l; i++) {\n        this.pushParam(params[i]);\n      }\n    },\n\n    pushParam: function(val) {\n      if (this.stringParams) {\n        if(val.depth) {\n          this.addDepth(val.depth);\n        }\n        this.opcode('getContext', val.depth || 0);\n        this.opcode('pushStringParam', val.stringModeValue, val.type);\n\n        if (val.type === 'sexpr') {\n          // Subexpressions get evaluated and passed in\n          // in string params mode.\n          this.sexpr(val);\n        }\n      } else {\n        if (this.trackIds) {\n          this.opcode('pushId', val.type, val.idName || val.stringModeValue);\n        }\n        this.accept(val);\n      }\n    },\n\n    setupFullMustacheParams: function(sexpr, program, inverse) {\n      var params = sexpr.params;\n      this.pushParams(params);\n\n      this.opcode('pushProgram', program);\n      this.opcode('pushProgram', inverse);\n\n      if (sexpr.hash) {\n        this.hash(sexpr.hash);\n      } else {\n        this.opcode('emptyHash');\n      }\n\n      return params;\n    }\n  };\n\n  function precompile(input, options, env) {\n    if (input == null || (typeof input !== 'string' && input.constructor !== env.AST.ProgramNode)) {\n      throw new Exception(\"You must pass a string or Handlebars AST to Handlebars.precompile. You passed \" + input);\n    }\n\n    options = options || {};\n    if (!('data' in options)) {\n      options.data = true;\n    }\n    if (options.compat) {\n      options.useDepths = true;\n    }\n\n    var ast = env.parse(input);\n    var environment = new env.Compiler().compile(ast, options);\n    return new env.JavaScriptCompiler().compile(environment, options);\n  }\n\n  __exports__.precompile = precompile;function compile(input, options, env) {\n    if (input == null || (typeof input !== 'string' && input.constructor !== env.AST.ProgramNode)) {\n      throw new Exception(\"You must pass a string or Handlebars AST to Handlebars.compile. You passed \" + input);\n    }\n\n    options = options || {};\n\n    if (!('data' in options)) {\n      options.data = true;\n    }\n    if (options.compat) {\n      options.useDepths = true;\n    }\n\n    var compiled;\n\n    function compileInput() {\n      var ast = env.parse(input);\n      var environment = new env.Compiler().compile(ast, options);\n      var templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);\n      return env.template(templateSpec);\n    }\n\n    // Template is only compiled on first use and cached after that point.\n    var ret = function(context, options) {\n      if (!compiled) {\n        compiled = compileInput();\n      }\n      return compiled.call(this, context, options);\n    };\n    ret._setup = function(options) {\n      if (!compiled) {\n        compiled = compileInput();\n      }\n      return compiled._setup(options);\n    };\n    ret._child = function(i, data, depths) {\n      if (!compiled) {\n        compiled = compileInput();\n      }\n      return compiled._child(i, data, depths);\n    };\n    return ret;\n  }\n\n  __exports__.compile = compile;function argEquals(a, b) {\n    if (a === b) {\n      return true;\n    }\n\n    if (isArray(a) && isArray(b) && a.length === b.length) {\n      for (var i = 0; i < a.length; i++) {\n        if (!argEquals(a[i], b[i])) {\n          return false;\n        }\n      }\n      return true;\n    }\n  }\n  return __exports__;\n})(__module5__, __module3__);\n\n// handlebars/compiler/javascript-compiler.js\nvar __module12__ = (function(__dependency1__, __dependency2__) {\n  \"use strict\";\n  var __exports__;\n  var COMPILER_REVISION = __dependency1__.COMPILER_REVISION;\n  var REVISION_CHANGES = __dependency1__.REVISION_CHANGES;\n  var Exception = __dependency2__;\n\n  function Literal(value) {\n    this.value = value;\n  }\n\n  function JavaScriptCompiler() {}\n\n  JavaScriptCompiler.prototype = {\n    // PUBLIC API: You can override these methods in a subclass to provide\n    // alternative compiled forms for name lookup and buffering semantics\n    nameLookup: function(parent, name /* , type*/) {\n      if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {\n        return parent + \".\" + name;\n      } else {\n        return parent + \"['\" + name + \"']\";\n      }\n    },\n    depthedLookup: function(name) {\n      this.aliases.lookup = 'this.lookup';\n\n      return 'lookup(depths, \"' + name + '\")';\n    },\n\n    compilerInfo: function() {\n      var revision = COMPILER_REVISION,\n          versions = REVISION_CHANGES[revision];\n      return [revision, versions];\n    },\n\n    appendToBuffer: function(string) {\n      if (this.environment.isSimple) {\n        return \"return \" + string + \";\";\n      } else {\n        return {\n          appendToBuffer: true,\n          content: string,\n          toString: function() { return \"buffer += \" + string + \";\"; }\n        };\n      }\n    },\n\n    initializeBuffer: function() {\n      return this.quotedString(\"\");\n    },\n\n    namespace: \"Handlebars\",\n    // END PUBLIC API\n\n    compile: function(environment, options, context, asObject) {\n      this.environment = environment;\n      this.options = options;\n      this.stringParams = this.options.stringParams;\n      this.trackIds = this.options.trackIds;\n      this.precompile = !asObject;\n\n      this.name = this.environment.name;\n      this.isChild = !!context;\n      this.context = context || {\n        programs: [],\n        environments: []\n      };\n\n      this.preamble();\n\n      this.stackSlot = 0;\n      this.stackVars = [];\n      this.aliases = {};\n      this.registers = { list: [] };\n      this.hashes = [];\n      this.compileStack = [];\n      this.inlineStack = [];\n\n      this.compileChildren(environment, options);\n\n      this.useDepths = this.useDepths || environment.depths.list.length || this.options.compat;\n\n      var opcodes = environment.opcodes,\n          opcode,\n          i,\n          l;\n\n      for (i = 0, l = opcodes.length; i < l; i++) {\n        opcode = opcodes[i];\n\n        this[opcode.opcode].apply(this, opcode.args);\n      }\n\n      // Flush any trailing content that might be pending.\n      this.pushSource('');\n\n      /* istanbul ignore next */\n      if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {\n        throw new Exception('Compile completed with content left on stack');\n      }\n\n      var fn = this.createFunctionContext(asObject);\n      if (!this.isChild) {\n        var ret = {\n          compiler: this.compilerInfo(),\n          main: fn\n        };\n        var programs = this.context.programs;\n        for (i = 0, l = programs.length; i < l; i++) {\n          if (programs[i]) {\n            ret[i] = programs[i];\n          }\n        }\n\n        if (this.environment.usePartial) {\n          ret.usePartial = true;\n        }\n        if (this.options.data) {\n          ret.useData = true;\n        }\n        if (this.useDepths) {\n          ret.useDepths = true;\n        }\n        if (this.options.compat) {\n          ret.compat = true;\n        }\n\n        if (!asObject) {\n          ret.compiler = JSON.stringify(ret.compiler);\n          ret = this.objectLiteral(ret);\n        }\n\n        return ret;\n      } else {\n        return fn;\n      }\n    },\n\n    preamble: function() {\n      // track the last context pushed into place to allow skipping the\n      // getContext opcode when it would be a noop\n      this.lastContext = 0;\n      this.source = [];\n    },\n\n    createFunctionContext: function(asObject) {\n      var varDeclarations = '';\n\n      var locals = this.stackVars.concat(this.registers.list);\n      if(locals.length > 0) {\n        varDeclarations += \", \" + locals.join(\", \");\n      }\n\n      // Generate minimizer alias mappings\n      for (var alias in this.aliases) {\n        if (this.aliases.hasOwnProperty(alias)) {\n          varDeclarations += ', ' + alias + '=' + this.aliases[alias];\n        }\n      }\n\n      var params = [\"depth0\", \"helpers\", \"partials\", \"data\"];\n\n      if (this.useDepths) {\n        params.push('depths');\n      }\n\n      // Perform a second pass over the output to merge content when possible\n      var source = this.mergeSource(varDeclarations);\n\n      if (asObject) {\n        params.push(source);\n\n        return Function.apply(this, params);\n      } else {\n        return 'function(' + params.join(',') + ') {\\n  ' + source + '}';\n      }\n    },\n    mergeSource: function(varDeclarations) {\n      var source = '',\n          buffer,\n          appendOnly = !this.forceBuffer,\n          appendFirst;\n\n      for (var i = 0, len = this.source.length; i < len; i++) {\n        var line = this.source[i];\n        if (line.appendToBuffer) {\n          if (buffer) {\n            buffer = buffer + '\\n    + ' + line.content;\n          } else {\n            buffer = line.content;\n          }\n        } else {\n          if (buffer) {\n            if (!source) {\n              appendFirst = true;\n              source = buffer + ';\\n  ';\n            } else {\n              source += 'buffer += ' + buffer + ';\\n  ';\n            }\n            buffer = undefined;\n          }\n          source += line + '\\n  ';\n\n          if (!this.environment.isSimple) {\n            appendOnly = false;\n          }\n        }\n      }\n\n      if (appendOnly) {\n        if (buffer || !source) {\n          source += 'return ' + (buffer || '\"\"') + ';\\n';\n        }\n      } else {\n        varDeclarations += \", buffer = \" + (appendFirst ? '' : this.initializeBuffer());\n        if (buffer) {\n          source += 'return buffer + ' + buffer + ';\\n';\n        } else {\n          source += 'return buffer;\\n';\n        }\n      }\n\n      if (varDeclarations) {\n        source = 'var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\\n  ') + source;\n      }\n\n      return source;\n    },\n\n    // [blockValue]\n    //\n    // On stack, before: hash, inverse, program, value\n    // On stack, after: return value of blockHelperMissing\n    //\n    // The purpose of this opcode is to take a block of the form\n    // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and\n    // replace it on the stack with the result of properly\n    // invoking blockHelperMissing.\n    blockValue: function(name) {\n      this.aliases.blockHelperMissing = 'helpers.blockHelperMissing';\n\n      var params = [this.contextName(0)];\n      this.setupParams(name, 0, params);\n\n      var blockName = this.popStack();\n      params.splice(1, 0, blockName);\n\n      this.push('blockHelperMissing.call(' + params.join(', ') + ')');\n    },\n\n    // [ambiguousBlockValue]\n    //\n    // On stack, before: hash, inverse, program, value\n    // Compiler value, before: lastHelper=value of last found helper, if any\n    // On stack, after, if no lastHelper: same as [blockValue]\n    // On stack, after, if lastHelper: value\n    ambiguousBlockValue: function() {\n      this.aliases.blockHelperMissing = 'helpers.blockHelperMissing';\n\n      // We're being a bit cheeky and reusing the options value from the prior exec\n      var params = [this.contextName(0)];\n      this.setupParams('', 0, params, true);\n\n      this.flushInline();\n\n      var current = this.topStack();\n      params.splice(1, 0, current);\n\n      this.pushSource(\"if (!\" + this.lastHelper + \") { \" + current + \" = blockHelperMissing.call(\" + params.join(\", \") + \"); }\");\n    },\n\n    // [appendContent]\n    //\n    // On stack, before: ...\n    // On stack, after: ...\n    //\n    // Appends the string value of `content` to the current buffer\n    appendContent: function(content) {\n      if (this.pendingContent) {\n        content = this.pendingContent + content;\n      }\n\n      this.pendingContent = content;\n    },\n\n    // [append]\n    //\n    // On stack, before: value, ...\n    // On stack, after: ...\n    //\n    // Coerces `value` to a String and appends it to the current buffer.\n    //\n    // If `value` is truthy, or 0, it is coerced into a string and appended\n    // Otherwise, the empty string is appended\n    append: function() {\n      // Force anything that is inlined onto the stack so we don't have duplication\n      // when we examine local\n      this.flushInline();\n      var local = this.popStack();\n      this.pushSource('if (' + local + ' != null) { ' + this.appendToBuffer(local) + ' }');\n      if (this.environment.isSimple) {\n        this.pushSource(\"else { \" + this.appendToBuffer(\"''\") + \" }\");\n      }\n    },\n\n    // [appendEscaped]\n    //\n    // On stack, before: value, ...\n    // On stack, after: ...\n    //\n    // Escape `value` and append it to the buffer\n    appendEscaped: function() {\n      this.aliases.escapeExpression = 'this.escapeExpression';\n\n      this.pushSource(this.appendToBuffer(\"escapeExpression(\" + this.popStack() + \")\"));\n    },\n\n    // [getContext]\n    //\n    // On stack, before: ...\n    // On stack, after: ...\n    // Compiler value, after: lastContext=depth\n    //\n    // Set the value of the `lastContext` compiler value to the depth\n    getContext: function(depth) {\n      this.lastContext = depth;\n    },\n\n    // [pushContext]\n    //\n    // On stack, before: ...\n    // On stack, after: currentContext, ...\n    //\n    // Pushes the value of the current context onto the stack.\n    pushContext: function() {\n      this.pushStackLiteral(this.contextName(this.lastContext));\n    },\n\n    // [lookupOnContext]\n    //\n    // On stack, before: ...\n    // On stack, after: currentContext[name], ...\n    //\n    // Looks up the value of `name` on the current context and pushes\n    // it onto the stack.\n    lookupOnContext: function(parts, falsy, scoped) {\n      /*jshint -W083 */\n      var i = 0,\n          len = parts.length;\n\n      if (!scoped && this.options.compat && !this.lastContext) {\n        // The depthed query is expected to handle the undefined logic for the root level that\n        // is implemented below, so we evaluate that directly in compat mode\n        this.push(this.depthedLookup(parts[i++]));\n      } else {\n        this.pushContext();\n      }\n\n      for (; i < len; i++) {\n        this.replaceStack(function(current) {\n          var lookup = this.nameLookup(current, parts[i], 'context');\n          // We want to ensure that zero and false are handled properly if the context (falsy flag)\n          // needs to have the special handling for these values.\n          if (!falsy) {\n            return ' != null ? ' + lookup + ' : ' + current;\n          } else {\n            // Otherwise we can use generic falsy handling\n            return ' && ' + lookup;\n          }\n        });\n      }\n    },\n\n    // [lookupData]\n    //\n    // On stack, before: ...\n    // On stack, after: data, ...\n    //\n    // Push the data lookup operator\n    lookupData: function(depth, parts) {\n      /*jshint -W083 */\n      if (!depth) {\n        this.pushStackLiteral('data');\n      } else {\n        this.pushStackLiteral('this.data(data, ' + depth + ')');\n      }\n\n      var len = parts.length;\n      for (var i = 0; i < len; i++) {\n        this.replaceStack(function(current) {\n          return ' && ' + this.nameLookup(current, parts[i], 'data');\n        });\n      }\n    },\n\n    // [resolvePossibleLambda]\n    //\n    // On stack, before: value, ...\n    // On stack, after: resolved value, ...\n    //\n    // If the `value` is a lambda, replace it on the stack by\n    // the return value of the lambda\n    resolvePossibleLambda: function() {\n      this.aliases.lambda = 'this.lambda';\n\n      this.push('lambda(' + this.popStack() + ', ' + this.contextName(0) + ')');\n    },\n\n    // [pushStringParam]\n    //\n    // On stack, before: ...\n    // On stack, after: string, currentContext, ...\n    //\n    // This opcode is designed for use in string mode, which\n    // provides the string value of a parameter along with its\n    // depth rather than resolving it immediately.\n    pushStringParam: function(string, type) {\n      this.pushContext();\n      this.pushString(type);\n\n      // If it's a subexpression, the string result\n      // will be pushed after this opcode.\n      if (type !== 'sexpr') {\n        if (typeof string === 'string') {\n          this.pushString(string);\n        } else {\n          this.pushStackLiteral(string);\n        }\n      }\n    },\n\n    emptyHash: function() {\n      this.pushStackLiteral('{}');\n\n      if (this.trackIds) {\n        this.push('{}'); // hashIds\n      }\n      if (this.stringParams) {\n        this.push('{}'); // hashContexts\n        this.push('{}'); // hashTypes\n      }\n    },\n    pushHash: function() {\n      if (this.hash) {\n        this.hashes.push(this.hash);\n      }\n      this.hash = {values: [], types: [], contexts: [], ids: []};\n    },\n    popHash: function() {\n      var hash = this.hash;\n      this.hash = this.hashes.pop();\n\n      if (this.trackIds) {\n        this.push('{' + hash.ids.join(',') + '}');\n      }\n      if (this.stringParams) {\n        this.push('{' + hash.contexts.join(',') + '}');\n        this.push('{' + hash.types.join(',') + '}');\n      }\n\n      this.push('{\\n    ' + hash.values.join(',\\n    ') + '\\n  }');\n    },\n\n    // [pushString]\n    //\n    // On stack, before: ...\n    // On stack, after: quotedString(string), ...\n    //\n    // Push a quoted version of `string` onto the stack\n    pushString: function(string) {\n      this.pushStackLiteral(this.quotedString(string));\n    },\n\n    // [push]\n    //\n    // On stack, before: ...\n    // On stack, after: expr, ...\n    //\n    // Push an expression onto the stack\n    push: function(expr) {\n      this.inlineStack.push(expr);\n      return expr;\n    },\n\n    // [pushLiteral]\n    //\n    // On stack, before: ...\n    // On stack, after: value, ...\n    //\n    // Pushes a value onto the stack. This operation prevents\n    // the compiler from creating a temporary variable to hold\n    // it.\n    pushLiteral: function(value) {\n      this.pushStackLiteral(value);\n    },\n\n    // [pushProgram]\n    //\n    // On stack, before: ...\n    // On stack, after: program(guid), ...\n    //\n    // Push a program expression onto the stack. This takes\n    // a compile-time guid and converts it into a runtime-accessible\n    // expression.\n    pushProgram: function(guid) {\n      if (guid != null) {\n        this.pushStackLiteral(this.programExpression(guid));\n      } else {\n        this.pushStackLiteral(null);\n      }\n    },\n\n    // [invokeHelper]\n    //\n    // On stack, before: hash, inverse, program, params..., ...\n    // On stack, after: result of helper invocation\n    //\n    // Pops off the helper's parameters, invokes the helper,\n    // and pushes the helper's return value onto the stack.\n    //\n    // If the helper is not found, `helperMissing` is called.\n    invokeHelper: function(paramSize, name, isSimple) {\n      this.aliases.helperMissing = 'helpers.helperMissing';\n\n      var nonHelper = this.popStack();\n      var helper = this.setupHelper(paramSize, name);\n\n      var lookup = (isSimple ? helper.name + ' || ' : '') + nonHelper + ' || helperMissing';\n      this.push('((' + lookup + ').call(' + helper.callParams + '))');\n    },\n\n    // [invokeKnownHelper]\n    //\n    // On stack, before: hash, inverse, program, params..., ...\n    // On stack, after: result of helper invocation\n    //\n    // This operation is used when the helper is known to exist,\n    // so a `helperMissing` fallback is not required.\n    invokeKnownHelper: function(paramSize, name) {\n      var helper = this.setupHelper(paramSize, name);\n      this.push(helper.name + \".call(\" + helper.callParams + \")\");\n    },\n\n    // [invokeAmbiguous]\n    //\n    // On stack, before: hash, inverse, program, params..., ...\n    // On stack, after: result of disambiguation\n    //\n    // This operation is used when an expression like `{{foo}}`\n    // is provided, but we don't know at compile-time whether it\n    // is a helper or a path.\n    //\n    // This operation emits more code than the other options,\n    // and can be avoided by passing the `knownHelpers` and\n    // `knownHelpersOnly` flags at compile-time.\n    invokeAmbiguous: function(name, helperCall) {\n      this.aliases.functionType = '\"function\"';\n      this.aliases.helperMissing = 'helpers.helperMissing';\n      this.useRegister('helper');\n\n      var nonHelper = this.popStack();\n\n      this.emptyHash();\n      var helper = this.setupHelper(0, name, helperCall);\n\n      var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');\n\n      this.push(\n        '((helper = (helper = ' + helperName + ' || ' + nonHelper + ') != null ? helper : helperMissing'\n          + (helper.paramsInit ? '),(' + helper.paramsInit : '') + '),'\n        + '(typeof helper === functionType ? helper.call(' + helper.callParams + ') : helper))');\n    },\n\n    // [invokePartial]\n    //\n    // On stack, before: context, ...\n    // On stack after: result of partial invocation\n    //\n    // This operation pops off a context, invokes a partial with that context,\n    // and pushes the result of the invocation back.\n    invokePartial: function(name, indent) {\n      var params = [this.nameLookup('partials', name, 'partial'), \"'\" + indent + \"'\", \"'\" + name + \"'\", this.popStack(), this.popStack(), \"helpers\", \"partials\"];\n\n      if (this.options.data) {\n        params.push(\"data\");\n      } else if (this.options.compat) {\n        params.push('undefined');\n      }\n      if (this.options.compat) {\n        params.push('depths');\n      }\n\n      this.push(\"this.invokePartial(\" + params.join(\", \") + \")\");\n    },\n\n    // [assignToHash]\n    //\n    // On stack, before: value, ..., hash, ...\n    // On stack, after: ..., hash, ...\n    //\n    // Pops a value off the stack and assigns it to the current hash\n    assignToHash: function(key) {\n      var value = this.popStack(),\n          context,\n          type,\n          id;\n\n      if (this.trackIds) {\n        id = this.popStack();\n      }\n      if (this.stringParams) {\n        type = this.popStack();\n        context = this.popStack();\n      }\n\n      var hash = this.hash;\n      if (context) {\n        hash.contexts.push(\"'\" + key + \"': \" + context);\n      }\n      if (type) {\n        hash.types.push(\"'\" + key + \"': \" + type);\n      }\n      if (id) {\n        hash.ids.push(\"'\" + key + \"': \" + id);\n      }\n      hash.values.push(\"'\" + key + \"': (\" + value + \")\");\n    },\n\n    pushId: function(type, name) {\n      if (type === 'ID' || type === 'DATA') {\n        this.pushString(name);\n      } else if (type === 'sexpr') {\n        this.pushStackLiteral('true');\n      } else {\n        this.pushStackLiteral('null');\n      }\n    },\n\n    // HELPERS\n\n    compiler: JavaScriptCompiler,\n\n    compileChildren: function(environment, options) {\n      var children = environment.children, child, compiler;\n\n      for(var i=0, l=children.length; i<l; i++) {\n        child = children[i];\n        compiler = new this.compiler();\n\n        var index = this.matchExistingProgram(child);\n\n        if (index == null) {\n          this.context.programs.push('');     // Placeholder to prevent name conflicts for nested children\n          index = this.context.programs.length;\n          child.index = index;\n          child.name = 'program' + index;\n          this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);\n          this.context.environments[index] = child;\n\n          this.useDepths = this.useDepths || compiler.useDepths;\n        } else {\n          child.index = index;\n          child.name = 'program' + index;\n        }\n      }\n    },\n    matchExistingProgram: function(child) {\n      for (var i = 0, len = this.context.environments.length; i < len; i++) {\n        var environment = this.context.environments[i];\n        if (environment && environment.equals(child)) {\n          return i;\n        }\n      }\n    },\n\n    programExpression: function(guid) {\n      var child = this.environment.children[guid],\n          depths = child.depths.list,\n          useDepths = this.useDepths,\n          depth;\n\n      var programParams = [child.index, 'data'];\n\n      if (useDepths) {\n        programParams.push('depths');\n      }\n\n      return 'this.program(' + programParams.join(', ') + ')';\n    },\n\n    useRegister: function(name) {\n      if(!this.registers[name]) {\n        this.registers[name] = true;\n        this.registers.list.push(name);\n      }\n    },\n\n    pushStackLiteral: function(item) {\n      return this.push(new Literal(item));\n    },\n\n    pushSource: function(source) {\n      if (this.pendingContent) {\n        this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent)));\n        this.pendingContent = undefined;\n      }\n\n      if (source) {\n        this.source.push(source);\n      }\n    },\n\n    pushStack: function(item) {\n      this.flushInline();\n\n      var stack = this.incrStack();\n      this.pushSource(stack + \" = \" + item + \";\");\n      this.compileStack.push(stack);\n      return stack;\n    },\n\n    replaceStack: function(callback) {\n      var prefix = '',\n          inline = this.isInline(),\n          stack,\n          createdStack,\n          usedLiteral;\n\n      /* istanbul ignore next */\n      if (!this.isInline()) {\n        throw new Exception('replaceStack on non-inline');\n      }\n\n      // We want to merge the inline statement into the replacement statement via ','\n      var top = this.popStack(true);\n\n      if (top instanceof Literal) {\n        // Literals do not need to be inlined\n        prefix = stack = top.value;\n        usedLiteral = true;\n      } else {\n        // Get or create the current stack name for use by the inline\n        createdStack = !this.stackSlot;\n        var name = !createdStack ? this.topStackName() : this.incrStack();\n\n        prefix = '(' + this.push(name) + ' = ' + top + ')';\n        stack = this.topStack();\n      }\n\n      var item = callback.call(this, stack);\n\n      if (!usedLiteral) {\n        this.popStack();\n      }\n      if (createdStack) {\n        this.stackSlot--;\n      }\n      this.push('(' + prefix + item + ')');\n    },\n\n    incrStack: function() {\n      this.stackSlot++;\n      if(this.stackSlot > this.stackVars.length) { this.stackVars.push(\"stack\" + this.stackSlot); }\n      return this.topStackName();\n    },\n    topStackName: function() {\n      return \"stack\" + this.stackSlot;\n    },\n    flushInline: function() {\n      var inlineStack = this.inlineStack;\n      if (inlineStack.length) {\n        this.inlineStack = [];\n        for (var i = 0, len = inlineStack.length; i < len; i++) {\n          var entry = inlineStack[i];\n          if (entry instanceof Literal) {\n            this.compileStack.push(entry);\n          } else {\n            this.pushStack(entry);\n          }\n        }\n      }\n    },\n    isInline: function() {\n      return this.inlineStack.length;\n    },\n\n    popStack: function(wrapped) {\n      var inline = this.isInline(),\n          item = (inline ? this.inlineStack : this.compileStack).pop();\n\n      if (!wrapped && (item instanceof Literal)) {\n        return item.value;\n      } else {\n        if (!inline) {\n          /* istanbul ignore next */\n          if (!this.stackSlot) {\n            throw new Exception('Invalid stack pop');\n          }\n          this.stackSlot--;\n        }\n        return item;\n      }\n    },\n\n    topStack: function() {\n      var stack = (this.isInline() ? this.inlineStack : this.compileStack),\n          item = stack[stack.length - 1];\n\n      if (item instanceof Literal) {\n        return item.value;\n      } else {\n        return item;\n      }\n    },\n\n    contextName: function(context) {\n      if (this.useDepths && context) {\n        return 'depths[' + context + ']';\n      } else {\n        return 'depth' + context;\n      }\n    },\n\n    quotedString: function(str) {\n      return '\"' + str\n        .replace(/\\\\/g, '\\\\\\\\')\n        .replace(/\"/g, '\\\\\"')\n        .replace(/\\n/g, '\\\\n')\n        .replace(/\\r/g, '\\\\r')\n        .replace(/\\u2028/g, '\\\\u2028')   // Per Ecma-262 7.3 + 7.8.4\n        .replace(/\\u2029/g, '\\\\u2029') + '\"';\n    },\n\n    objectLiteral: function(obj) {\n      var pairs = [];\n\n      for (var key in obj) {\n        if (obj.hasOwnProperty(key)) {\n          pairs.push(this.quotedString(key) + ':' + obj[key]);\n        }\n      }\n\n      return '{' + pairs.join(',') + '}';\n    },\n\n    setupHelper: function(paramSize, name, blockHelper) {\n      var params = [],\n          paramsInit = this.setupParams(name, paramSize, params, blockHelper);\n      var foundHelper = this.nameLookup('helpers', name, 'helper');\n\n      return {\n        params: params,\n        paramsInit: paramsInit,\n        name: foundHelper,\n        callParams: [this.contextName(0)].concat(params).join(\", \")\n      };\n    },\n\n    setupOptions: function(helper, paramSize, params) {\n      var options = {}, contexts = [], types = [], ids = [], param, inverse, program;\n\n      options.name = this.quotedString(helper);\n      options.hash = this.popStack();\n\n      if (this.trackIds) {\n        options.hashIds = this.popStack();\n      }\n      if (this.stringParams) {\n        options.hashTypes = this.popStack();\n        options.hashContexts = this.popStack();\n      }\n\n      inverse = this.popStack();\n      program = this.popStack();\n\n      // Avoid setting fn and inverse if neither are set. This allows\n      // helpers to do a check for `if (options.fn)`\n      if (program || inverse) {\n        if (!program) {\n          program = 'this.noop';\n        }\n\n        if (!inverse) {\n          inverse = 'this.noop';\n        }\n\n        options.fn = program;\n        options.inverse = inverse;\n      }\n\n      // The parameters go on to the stack in order (making sure that they are evaluated in order)\n      // so we need to pop them off the stack in reverse order\n      var i = paramSize;\n      while (i--) {\n        param = this.popStack();\n        params[i] = param;\n\n        if (this.trackIds) {\n          ids[i] = this.popStack();\n        }\n        if (this.stringParams) {\n          types[i] = this.popStack();\n          contexts[i] = this.popStack();\n        }\n      }\n\n      if (this.trackIds) {\n        options.ids = \"[\" + ids.join(\",\") + \"]\";\n      }\n      if (this.stringParams) {\n        options.types = \"[\" + types.join(\",\") + \"]\";\n        options.contexts = \"[\" + contexts.join(\",\") + \"]\";\n      }\n\n      if (this.options.data) {\n        options.data = \"data\";\n      }\n\n      return options;\n    },\n\n    // the params and contexts arguments are passed in arrays\n    // to fill in\n    setupParams: function(helperName, paramSize, params, useRegister) {\n      var options = this.objectLiteral(this.setupOptions(helperName, paramSize, params));\n\n      if (useRegister) {\n        this.useRegister('options');\n        params.push('options');\n        return 'options=' + options;\n      } else {\n        params.push(options);\n        return '';\n      }\n    }\n  };\n\n  var reservedWords = (\n    \"break else new var\" +\n    \" case finally return void\" +\n    \" catch for switch while\" +\n    \" continue function this with\" +\n    \" default if throw\" +\n    \" delete in try\" +\n    \" do instanceof typeof\" +\n    \" abstract enum int short\" +\n    \" boolean export interface static\" +\n    \" byte extends long super\" +\n    \" char final native synchronized\" +\n    \" class float package throws\" +\n    \" const goto private transient\" +\n    \" debugger implements protected volatile\" +\n    \" double import public let yield\"\n  ).split(\" \");\n\n  var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};\n\n  for(var i=0, l=reservedWords.length; i<l; i++) {\n    compilerWords[reservedWords[i]] = true;\n  }\n\n  JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {\n    return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);\n  };\n\n  __exports__ = JavaScriptCompiler;\n  return __exports__;\n})(__module2__, __module5__);\n\n// handlebars.js\nvar __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {\n  \"use strict\";\n  var __exports__;\n  /*globals Handlebars: true */\n  var Handlebars = __dependency1__;\n\n  // Compiler imports\n  var AST = __dependency2__;\n  var Parser = __dependency3__.parser;\n  var parse = __dependency3__.parse;\n  var Compiler = __dependency4__.Compiler;\n  var compile = __dependency4__.compile;\n  var precompile = __dependency4__.precompile;\n  var JavaScriptCompiler = __dependency5__;\n\n  var _create = Handlebars.create;\n  var create = function() {\n    var hb = _create();\n\n    hb.compile = function(input, options) {\n      return compile(input, options, hb);\n    };\n    hb.precompile = function (input, options) {\n      return precompile(input, options, hb);\n    };\n\n    hb.AST = AST;\n    hb.Compiler = Compiler;\n    hb.JavaScriptCompiler = JavaScriptCompiler;\n    hb.Parser = Parser;\n    hb.parse = parse;\n\n    return hb;\n  };\n\n  Handlebars = create();\n  Handlebars.create = create;\n\n  Handlebars['default'] = Handlebars;\n\n  __exports__ = Handlebars;\n  return __exports__;\n})(__module1__, __module7__, __module8__, __module11__, __module12__);\n\n  return __module0__;\n}));\n","$(document).ready(function(){\n\tif($(\"ul.dropdown\").length) {\n\t\t$(\"ul.dropdown li\").dropdown();\n\t}\n});\n\n$.fn.dropdown = function() {\n\treturn this.each(function() {\n\t\t$(this).hover(function(){\n\t\t\tclearTimeout($(this).data('timeout'));\n\t\t\t$(this).addClass(\"hover\");\n\t\t\t$('> .with-group',this).addClass(\"open\");\n\t\t\t$('ul:first',this).css('visibility', 'visible');\n\t\t},function(){\n\t\t\tvar _this = this;\n\t\t\tvar t = setTimeout(function() {\n\t\t\t\t$(_this).removeClass(\"hover\");\n\t\t\t\t$('.open',_this).removeClass(\"open\");\n\t\t\t\t$('ul:first',_this).css('visibility', 'hidden');\n\t\t\t}, 100);\n\t\t\t$(this).data('timeout', t);\n\t\t});\n\t});\n};\n","jQuery.fn.limitMaxlength = function(options){\n\n  var settings = jQuery.extend({\n    attribute: \"maxlength\",\n    onLimit: function(){},\n    onEdit: function(){}\n  }, options);\n  \n  // Event handler to limit the textarea\n  var onEdit = function(){\n    var textarea = jQuery(this);\n    var maxlength = parseInt(textarea.attr(settings.attribute));\n\n    if(textarea.val().length > maxlength){\n      textarea.val(textarea.val().substr(0, maxlength));\n      \n      // Call the onlimit handler within the scope of the textarea\n      jQuery.proxy(settings.onLimit, this)();\n    }\n    \n    // Call the onEdit handler within the scope of the textarea\n    jQuery.proxy(settings.onEdit, this)(maxlength - textarea.val().length);\n  }\n\n  this.each(onEdit);\n\n  return this.keyup(onEdit)\n        .keydown(onEdit)\n        .focus(onEdit);\n}\n\n$(document).ready(function(){\n  var onEditCallback = function(remaining){\n    $(this).siblings('.charsRemaining').text(remaining + \" characters remaining\");\n    \n    // if(remaining > 0){\n    //   $(this).css('background-color', 'white');\n    // }\n  }\n  \n  var onLimitCallback = function(){\n    // $(this).css('background-color', '#FFFFDD');\n  }\n\n  $('textarea[maxlength]').limitMaxlength({\n    onEdit: onEditCallback,\n    onLimit: onLimitCallback\n  });\n});","(function ( $ ) {\n\n  $.fn.drag_select = function(options) {\n    var settings = $.extend({\n        // These are the defaults.\n        select_color: \"#EFF1F9\",\n        on_row_select: null,\n        table_row_selector: null\n    }, options );\n\n    if (settings.table_row_selector == null) {\n      return false;\n    }\n\n\n    jQuery(document).on('dragstart', settings.table_selector, function(event) {\n      var row = jQuery(event.target).closest(\"tr\");\n      var the_table = row.closest(\"table\");\n      the_table.data(\"drag-select.start-row\", row);\n    });\n\n    if(settings.on_row_select != null) {\n      jQuery(document).on('drag', settings.table_selector, function(event) {\n        var end_row = jQuery(event.target).closest(\"tr\");\n        var the_table = end_row.closest(\"table\");\n        var start_row = the_table.data(\"drag-select.start-row\");\n        settings.on_row_select.apply(this, [event, start_row, end_row]);\n      });\n\n    }\n\n    jQuery(document).on('dragend', settings.table_selector, function(event) {\n      var end_row = jQuery(event.target).closest(\"tr\");\n      var the_table = end_row.closest(\"table\");\n      var start_row = the_table.data(\"drag-select.start-row\");\n      if ((typeof start_row != \"undefined\") && (typeof end_row != \"undefined\")) {\n        DragSelect.selectRowRange(start_row, end_row);\n      }\n      the_table.data(\"drag-select.start-row\", null);\n    });\n\n    return this;\n  };\n\n}( jQuery ));\n\n\nvar DragSelect = {\nselectRowRange: function(start_row, end_row) {\n  if((typeof start_row == \"undefined\") || (typeof end_row == \"undefined\")) {\n    return false;\n  }\n  var start_table = start_row.closest(\"table\");\n  var end_table = end_row.closest(\"table\");\n  if(start_table[0] == end_table[0]) {\n    var all_rows = start_table.find(\"tr\");\n    var start_index = all_rows.index(start_row);\n    var end_index = all_rows.index(end_row);\n    if(end_index < start_index) {\n      var swap_temp = start_index;\n      start_index = end_index;\n      end_index = swap_temp;\n    }\n    var selected_rows = all_rows.slice(start_index, end_index+1);\n    selected_rows.trigger(\"drag-select.selected\");\n  }\n  else {\n    log(\"start table is not the same as the end table\");\n  }\n},\npreSelectRowRange: function(start_row, end_row) {\n  var table = start_row.closest(\"table\");\n  var all_rows = table.find(\"tr\");\n  var start_index = all_rows.index(start_row);\n  var end_index = all_rows.index(end_row);\n  if(end_index < start_index) {\n    var swap_temp = start_index;\n    start_index = end_index;\n    end_index = swap_temp;\n  }\n  all_rows.removeClass(\"drag-select-selected\");\n  var selected_rows = all_rows.slice(start_index, end_index+1);\n  selected_rows.addClass(\"drag-select-selected\");\n}\n};\n","var Rowclick = function() {\n  var obj = {};\n\n\n  obj.init = function( element, options ) {\n      obj.element = element;\n      if(typeof options == \"undefined\") { options = []; }\n      var defaults = {\n        on_click: obj.on_click,\n        row_click: obj.row_click,\n        link_class: \"rowclick\",\n        hide_links: false,\n        allow_links: false\n      };\n      obj.options = jQuery(options).extend(defaults);\n\n      if(obj.options.hide_links) {\n        obj.element.find(\"a.\"+obj.options.link_class).each(function(index, link) {\n          jQuery(link).hide();\n        });\n      }\n\n      var that = obj;\n      obj.element.bind('click', function(event) {\n        that.options.on_click(event);\n      });\n  };\n\n\n  obj.on_click = function(event) {\n    // Don't do row click if the user clicked on a link in the row.\n    if((!obj.options.allow_links) && (event.target.nodeName == \"A\" || event.target.nodeName == \"INPUT\")) {\n      return false;\n    }\n\n    var target = jQuery(event.target);\n    var row = target.closest(\"tr\");\n    obj.row_click(row);\n  };\n\n  obj.row_click = function(row) {\n    var link = row.find(\"a.\"+obj.options.link_class).first();\n    if((link) && (link != [])) {\n      this.click_link(link.get(0));\n      //window.location.href = link.attr('href');\n    }\n  };\n\n  obj.click_link = function(link) {\n      var cancelled = false;\n\n      if (document.createEvent) {\n          var event = document.createEvent(\"MouseEvents\");\n          event.initMouseEvent(\"click\", true, true, window,\n              0, 0, 0, 0, 0,\n              false, false, false, false,\n              0, null);\n          cancelled = !link.dispatchEvent(event);\n      }\n      else if (link.fireEvent) {\n          cancelled = !link.fireEvent(\"onclick\");\n      }\n\n      if (!cancelled) {\n          window.location = link.href;\n      }\n  };\n\n  return obj;\n};\n\n\n// JQueryize it\n(function($){\n\t$.fn.jrowclick = function(options) {\n\t\t return this.each(function() {\n\t\t   var element = $(this);\n       var row_click = new Rowclick();\n       row_click.init(element, options);\n\t\t });\n\t};\n})(jQuery);\n\n\n// Helper method to allow extending/merging objects\n// Object.prototype.extend = function(destination) {\n//    for (var property in this) {\n//        if (this.hasOwnProperty(property)) {\n//            destination[property] = this[property];\n//        }\n//    }\n//    return destination;\n// };\n","(function (window) {\n    'use strict';\n\n    /*global define, module, exports, require */\n\n    var c3 = { version: \"0.4.11\" };\n\n    var c3_chart_fn,\n        c3_chart_internal_fn,\n        c3_chart_internal_axis_fn;\n\n    function API(owner) {\n        this.owner = owner;\n    }\n\n    function inherit(base, derived) {\n\n        if (Object.create) {\n            derived.prototype = Object.create(base.prototype);\n        } else {\n            var f = function f() {};\n            f.prototype = base.prototype;\n            derived.prototype = new f();\n        }\n\n        derived.prototype.constructor = derived;\n\n        return derived;\n    }\n\n    function Chart(config) {\n        var $$ = this.internal = new ChartInternal(this);\n        $$.loadConfig(config);\n\n        $$.beforeInit(config);\n        $$.init();\n        $$.afterInit(config);\n\n        // bind \"this\" to nested API\n        (function bindThis(fn, target, argThis) {\n            Object.keys(fn).forEach(function (key) {\n                target[key] = fn[key].bind(argThis);\n                if (Object.keys(fn[key]).length > 0) {\n                    bindThis(fn[key], target[key], argThis);\n                }\n            });\n        })(c3_chart_fn, this, this);\n    }\n\n    function ChartInternal(api) {\n        var $$ = this;\n        $$.d3 = window.d3 ? window.d3 : typeof require !== 'undefined' ? require(\"d3\") : undefined;\n        $$.api = api;\n        $$.config = $$.getDefaultConfig();\n        $$.data = {};\n        $$.cache = {};\n        $$.axes = {};\n    }\n\n    c3.generate = function (config) {\n        return new Chart(config);\n    };\n\n    c3.chart = {\n        fn: Chart.prototype,\n        internal: {\n            fn: ChartInternal.prototype,\n            axis: {\n                fn: Axis.prototype\n            }\n        }\n    };\n    c3_chart_fn = c3.chart.fn;\n    c3_chart_internal_fn = c3.chart.internal.fn;\n    c3_chart_internal_axis_fn = c3.chart.internal.axis.fn;\n\n    c3_chart_internal_fn.beforeInit = function () {\n        // can do something\n    };\n    c3_chart_internal_fn.afterInit = function () {\n        // can do something\n    };\n    c3_chart_internal_fn.init = function () {\n        var $$ = this, config = $$.config;\n\n        $$.initParams();\n\n        if (config.data_url) {\n            $$.convertUrlToData(config.data_url, config.data_mimeType, config.data_headers, config.data_keys, $$.initWithData);\n        }\n        else if (config.data_json) {\n            $$.initWithData($$.convertJsonToData(config.data_json, config.data_keys));\n        }\n        else if (config.data_rows) {\n            $$.initWithData($$.convertRowsToData(config.data_rows));\n        }\n        else if (config.data_columns) {\n            $$.initWithData($$.convertColumnsToData(config.data_columns));\n        }\n        else {\n            throw Error('url or json or rows or columns is required.');\n        }\n    };\n\n    c3_chart_internal_fn.initParams = function () {\n        var $$ = this, d3 = $$.d3, config = $$.config;\n\n        // MEMO: clipId needs to be unique because it conflicts when multiple charts exist\n        $$.clipId = \"c3-\" + (+new Date()) + '-clip',\n        $$.clipIdForXAxis = $$.clipId + '-xaxis',\n        $$.clipIdForYAxis = $$.clipId + '-yaxis',\n        $$.clipIdForGrid = $$.clipId + '-grid',\n        $$.clipIdForSubchart = $$.clipId + '-subchart',\n        $$.clipPath = $$.getClipPath($$.clipId),\n        $$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis),\n        $$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis);\n        $$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid),\n        $$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart),\n\n        $$.dragStart = null;\n        $$.dragging = false;\n        $$.flowing = false;\n        $$.cancelClick = false;\n        $$.mouseover = false;\n        $$.transiting = false;\n\n        $$.color = $$.generateColor();\n        $$.levelColor = $$.generateLevelColor();\n\n        $$.dataTimeFormat = config.data_xLocaltime ? d3.time.format : d3.time.format.utc;\n        $$.axisTimeFormat = config.axis_x_localtime ? d3.time.format : d3.time.format.utc;\n        $$.defaultAxisTimeFormat = $$.axisTimeFormat.multi([\n            [\".%L\", function (d) { return d.getMilliseconds(); }],\n            [\":%S\", function (d) { return d.getSeconds(); }],\n            [\"%I:%M\", function (d) { return d.getMinutes(); }],\n            [\"%I %p\", function (d) { return d.getHours(); }],\n            [\"%-m/%-d\", function (d) { return d.getDay() && d.getDate() !== 1; }],\n            [\"%-m/%-d\", function (d) { return d.getDate() !== 1; }],\n            [\"%-m/%-d\", function (d) { return d.getMonth(); }],\n            [\"%Y/%-m/%-d\", function () { return true; }]\n        ]);\n\n        $$.hiddenTargetIds = [];\n        $$.hiddenLegendIds = [];\n        $$.focusedTargetIds = [];\n        $$.defocusedTargetIds = [];\n\n        $$.xOrient = config.axis_rotated ? \"left\" : \"bottom\";\n        $$.yOrient = config.axis_rotated ? (config.axis_y_inner ? \"top\" : \"bottom\") : (config.axis_y_inner ? \"right\" : \"left\");\n        $$.y2Orient = config.axis_rotated ? (config.axis_y2_inner ? \"bottom\" : \"top\") : (config.axis_y2_inner ? \"left\" : \"right\");\n        $$.subXOrient = config.axis_rotated ? \"left\" : \"bottom\";\n\n        $$.isLegendRight = config.legend_position === 'right';\n        $$.isLegendInset = config.legend_position === 'inset';\n        $$.isLegendTop = config.legend_inset_anchor === 'top-left' || config.legend_inset_anchor === 'top-right';\n        $$.isLegendLeft = config.legend_inset_anchor === 'top-left' || config.legend_inset_anchor === 'bottom-left';\n        $$.legendStep = 0;\n        $$.legendItemWidth = 0;\n        $$.legendItemHeight = 0;\n\n        $$.currentMaxTickWidths = {\n            x: 0,\n            y: 0,\n            y2: 0\n        };\n\n        $$.rotated_padding_left = 30;\n        $$.rotated_padding_right = config.axis_rotated && !config.axis_x_show ? 0 : 30;\n        $$.rotated_padding_top = 5;\n\n        $$.withoutFadeIn = {};\n\n        $$.intervalForObserveInserted = undefined;\n\n        $$.axes.subx = d3.selectAll([]); // needs when excluding subchart.js\n    };\n\n    c3_chart_internal_fn.initChartElements = function () {\n        if (this.initBar) { this.initBar(); }\n        if (this.initLine) { this.initLine(); }\n        if (this.initArc) { this.initArc(); }\n        if (this.initGauge) { this.initGauge(); }\n        if (this.initText) { this.initText(); }\n    };\n\n    c3_chart_internal_fn.initWithData = function (data) {\n        var $$ = this, d3 = $$.d3, config = $$.config;\n        var defs, main, binding = true;\n\n        $$.axis = new Axis($$);\n\n        if ($$.initPie) { $$.initPie(); }\n        if ($$.initBrush) { $$.initBrush(); }\n        if ($$.initZoom) { $$.initZoom(); }\n\n        if (!config.bindto) {\n            $$.selectChart = d3.selectAll([]);\n        }\n        else if (typeof config.bindto.node === 'function') {\n            $$.selectChart = config.bindto;\n        }\n        else {\n            $$.selectChart = d3.select(config.bindto);\n        }\n        if ($$.selectChart.empty()) {\n            $$.selectChart = d3.select(document.createElement('div')).style('opacity', 0);\n            $$.observeInserted($$.selectChart);\n            binding = false;\n        }\n        $$.selectChart.html(\"\").classed(\"c3\", true);\n\n        // Init data as targets\n        $$.data.xs = {};\n        $$.data.targets = $$.convertDataToTargets(data);\n\n        if (config.data_filter) {\n            $$.data.targets = $$.data.targets.filter(config.data_filter);\n        }\n\n        // Set targets to hide if needed\n        if (config.data_hide) {\n            $$.addHiddenTargetIds(config.data_hide === true ? $$.mapToIds($$.data.targets) : config.data_hide);\n        }\n        if (config.legend_hide) {\n            $$.addHiddenLegendIds(config.legend_hide === true ? $$.mapToIds($$.data.targets) : config.legend_hide);\n        }\n\n        // when gauge, hide legend // TODO: fix\n        if ($$.hasType('gauge')) {\n            config.legend_show = false;\n        }\n\n        // Init sizes and scales\n        $$.updateSizes();\n        $$.updateScales();\n\n        // Set domains for each scale\n        $$.x.domain(d3.extent($$.getXDomain($$.data.targets)));\n        $$.y.domain($$.getYDomain($$.data.targets, 'y'));\n        $$.y2.domain($$.getYDomain($$.data.targets, 'y2'));\n        $$.subX.domain($$.x.domain());\n        $$.subY.domain($$.y.domain());\n        $$.subY2.domain($$.y2.domain());\n\n        // Save original x domain for zoom update\n        $$.orgXDomain = $$.x.domain();\n\n        // Set initialized scales to brush and zoom\n        if ($$.brush) { $$.brush.scale($$.subX); }\n        if (config.zoom_enabled) { $$.zoom.scale($$.x); }\n\n        /*-- Basic Elements --*/\n\n        // Define svgs\n        $$.svg = $$.selectChart.append(\"svg\")\n            .style(\"overflow\", \"hidden\")\n            .on('mouseenter', function () { return config.onmouseover.call($$); })\n            .on('mouseleave', function () { return config.onmouseout.call($$); });\n\n        if ($$.config.svg_classname) {\n            $$.svg.attr('class', $$.config.svg_classname);\n        }\n\n        // Define defs\n        defs = $$.svg.append(\"defs\");\n        $$.clipChart = $$.appendClip(defs, $$.clipId);\n        $$.clipXAxis = $$.appendClip(defs, $$.clipIdForXAxis);\n        $$.clipYAxis = $$.appendClip(defs, $$.clipIdForYAxis);\n        $$.clipGrid = $$.appendClip(defs, $$.clipIdForGrid);\n        $$.clipSubchart = $$.appendClip(defs, $$.clipIdForSubchart);\n        $$.updateSvgSize();\n\n        // Define regions\n        main = $$.main = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate('main'));\n\n        if ($$.initSubchart) { $$.initSubchart(); }\n        if ($$.initTooltip) { $$.initTooltip(); }\n        if ($$.initLegend) { $$.initLegend(); }\n        if ($$.initTitle) { $$.initTitle(); }\n\n        /*-- Main Region --*/\n\n        // text when empty\n        main.append(\"text\")\n            .attr(\"class\", CLASS.text + ' ' + CLASS.empty)\n            .attr(\"text-anchor\", \"middle\") // horizontal centering of text at x position in all browsers.\n            .attr(\"dominant-baseline\", \"middle\"); // vertical centering of text at y position in all browsers, except IE.\n\n        // Regions\n        $$.initRegion();\n\n        // Grids\n        $$.initGrid();\n\n        // Define g for chart area\n        main.append('g')\n            .attr(\"clip-path\", $$.clipPath)\n            .attr('class', CLASS.chart);\n\n        // Grid lines\n        if (config.grid_lines_front) { $$.initGridLines(); }\n\n        // Cover whole with rects for events\n        $$.initEventRect();\n\n        // Define g for chart\n        $$.initChartElements();\n\n        // if zoom privileged, insert rect to forefront\n        // TODO: is this needed?\n        main.insert('rect', config.zoom_privileged ? null : 'g.' + CLASS.regions)\n            .attr('class', CLASS.zoomRect)\n            .attr('width', $$.width)\n            .attr('height', $$.height)\n            .style('opacity', 0)\n            .on(\"dblclick.zoom\", null);\n\n        // Set default extent if defined\n        if (config.axis_x_extent) { $$.brush.extent($$.getDefaultExtent()); }\n\n        // Add Axis\n        $$.axis.init();\n\n        // Set targets\n        $$.updateTargets($$.data.targets);\n\n        // Draw with targets\n        if (binding) {\n            $$.updateDimension();\n            $$.config.oninit.call($$);\n            $$.redraw({\n                withTransition: false,\n                withTransform: true,\n                withUpdateXDomain: true,\n                withUpdateOrgXDomain: true,\n                withTransitionForAxis: false\n            });\n        }\n\n        // Bind resize event\n        $$.bindResize();\n\n        // export element of the chart\n        $$.api.element = $$.selectChart.node();\n    };\n\n    c3_chart_internal_fn.smoothLines = function (el, type) {\n        var $$ = this;\n        if (type === 'grid') {\n            el.each(function () {\n                var g = $$.d3.select(this),\n                    x1 = g.attr('x1'),\n                    x2 = g.attr('x2'),\n                    y1 = g.attr('y1'),\n                    y2 = g.attr('y2');\n                g.attr({\n                    'x1': Math.ceil(x1),\n                    'x2': Math.ceil(x2),\n                    'y1': Math.ceil(y1),\n                    'y2': Math.ceil(y2)\n                });\n            });\n        }\n    };\n\n\n    c3_chart_internal_fn.updateSizes = function () {\n        var $$ = this, config = $$.config;\n        var legendHeight = $$.legend ? $$.getLegendHeight() : 0,\n            legendWidth = $$.legend ? $$.getLegendWidth() : 0,\n            legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legendHeight,\n            hasArc = $$.hasArcType(),\n            xAxisHeight = config.axis_rotated || hasArc ? 0 : $$.getHorizontalAxisHeight('x'),\n            subchartHeight = config.subchart_show && !hasArc ? (config.subchart_size_height + xAxisHeight) : 0;\n\n        $$.currentWidth = $$.getCurrentWidth();\n        $$.currentHeight = $$.getCurrentHeight();\n\n        // for main\n        $$.margin = config.axis_rotated ? {\n            top: $$.getHorizontalAxisHeight('y2') + $$.getCurrentPaddingTop(),\n            right: hasArc ? 0 : $$.getCurrentPaddingRight(),\n            bottom: $$.getHorizontalAxisHeight('y') + legendHeightForBottom + $$.getCurrentPaddingBottom(),\n            left: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft())\n        } : {\n            top: 4 + $$.getCurrentPaddingTop(), // for top tick text\n            right: hasArc ? 0 : $$.getCurrentPaddingRight(),\n            bottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(),\n            left: hasArc ? 0 : $$.getCurrentPaddingLeft()\n        };\n\n        // for subchart\n        $$.margin2 = config.axis_rotated ? {\n            top: $$.margin.top,\n            right: NaN,\n            bottom: 20 + legendHeightForBottom,\n            left: $$.rotated_padding_left\n        } : {\n            top: $$.currentHeight - subchartHeight - legendHeightForBottom,\n            right: NaN,\n            bottom: xAxisHeight + legendHeightForBottom,\n            left: $$.margin.left\n        };\n\n        // for legend\n        $$.margin3 = {\n            top: 0,\n            right: NaN,\n            bottom: 0,\n            left: 0\n        };\n        if ($$.updateSizeForLegend) { $$.updateSizeForLegend(legendHeight, legendWidth); }\n\n        $$.width = $$.currentWidth - $$.margin.left - $$.margin.right;\n        $$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom;\n        if ($$.width < 0) { $$.width = 0; }\n        if ($$.height < 0) { $$.height = 0; }\n\n        $$.width2 = config.axis_rotated ? $$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width;\n        $$.height2 = config.axis_rotated ? $$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom;\n        if ($$.width2 < 0) { $$.width2 = 0; }\n        if ($$.height2 < 0) { $$.height2 = 0; }\n\n        // for arc\n        $$.arcWidth = $$.width - ($$.isLegendRight ? legendWidth + 10 : 0);\n        $$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10);\n        if ($$.hasType('gauge') && !config.gauge_fullCircle) {\n            $$.arcHeight += $$.height - $$.getGaugeLabelHeight();\n        }\n        if ($$.updateRadius) { $$.updateRadius(); }\n\n        if ($$.isLegendRight && hasArc) {\n            $$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1;\n        }\n    };\n\n    c3_chart_internal_fn.updateTargets = function (targets) {\n        var $$ = this;\n\n        /*-- Main --*/\n\n        //-- Text --//\n        $$.updateTargetsForText(targets);\n\n        //-- Bar --//\n        $$.updateTargetsForBar(targets);\n\n        //-- Line --//\n        $$.updateTargetsForLine(targets);\n\n        //-- Arc --//\n        if ($$.hasArcType() && $$.updateTargetsForArc) { $$.updateTargetsForArc(targets); }\n\n        /*-- Sub --*/\n\n        if ($$.updateTargetsForSubchart) { $$.updateTargetsForSubchart(targets); }\n\n        // Fade-in each chart\n        $$.showTargets();\n    };\n    c3_chart_internal_fn.showTargets = function () {\n        var $$ = this;\n        $$.svg.selectAll('.' + CLASS.target).filter(function (d) { return $$.isTargetToShow(d.id); })\n          .transition().duration($$.config.transition_duration)\n            .style(\"opacity\", 1);\n    };\n\n    c3_chart_internal_fn.redraw = function (options, transitions) {\n        var $$ = this, main = $$.main, d3 = $$.d3, config = $$.config;\n        var areaIndices = $$.getShapeIndices($$.isAreaType), barIndices = $$.getShapeIndices($$.isBarType), lineIndices = $$.getShapeIndices($$.isLineType);\n        var withY, withSubchart, withTransition, withTransitionForExit, withTransitionForAxis,\n            withTransform, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain, withLegend,\n            withEventRect, withDimension, withUpdateXAxis;\n        var hideAxis = $$.hasArcType();\n        var drawArea, drawBar, drawLine, xForText, yForText;\n        var duration, durationForExit, durationForAxis;\n        var waitForDraw, flow;\n        var targetsToShow = $$.filterTargetsToShow($$.data.targets), tickValues, i, intervalForCulling, xDomainForZoom;\n        var xv = $$.xv.bind($$), cx, cy;\n\n        options = options || {};\n        withY = getOption(options, \"withY\", true);\n        withSubchart = getOption(options, \"withSubchart\", true);\n        withTransition = getOption(options, \"withTransition\", true);\n        withTransform = getOption(options, \"withTransform\", false);\n        withUpdateXDomain = getOption(options, \"withUpdateXDomain\", false);\n        withUpdateOrgXDomain = getOption(options, \"withUpdateOrgXDomain\", false);\n        withTrimXDomain = getOption(options, \"withTrimXDomain\", true);\n        withUpdateXAxis = getOption(options, \"withUpdateXAxis\", withUpdateXDomain);\n        withLegend = getOption(options, \"withLegend\", false);\n        withEventRect = getOption(options, \"withEventRect\", true);\n        withDimension = getOption(options, \"withDimension\", true);\n        withTransitionForExit = getOption(options, \"withTransitionForExit\", withTransition);\n        withTransitionForAxis = getOption(options, \"withTransitionForAxis\", withTransition);\n\n        duration = withTransition ? config.transition_duration : 0;\n        durationForExit = withTransitionForExit ? duration : 0;\n        durationForAxis = withTransitionForAxis ? duration : 0;\n\n        transitions = transitions || $$.axis.generateTransitions(durationForAxis);\n\n        // update legend and transform each g\n        if (withLegend && config.legend_show) {\n            $$.updateLegend($$.mapToIds($$.data.targets), options, transitions);\n        } else if (withDimension) {\n            // need to update dimension (e.g. axis.y.tick.values) because y tick values should change\n            // no need to update axis in it because they will be updated in redraw()\n            $$.updateDimension(true);\n        }\n\n        // MEMO: needed for grids calculation\n        if ($$.isCategorized() && targetsToShow.length === 0) {\n            $$.x.domain([0, $$.axes.x.selectAll('.tick').size()]);\n        }\n\n        if (targetsToShow.length) {\n            $$.updateXDomain(targetsToShow, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain);\n            if (!config.axis_x_tick_values) {\n                tickValues = $$.axis.updateXAxisTickValues(targetsToShow);\n            }\n        } else {\n            $$.xAxis.tickValues([]);\n            $$.subXAxis.tickValues([]);\n        }\n\n        if (config.zoom_rescale && !options.flow) {\n            xDomainForZoom = $$.x.orgDomain();\n        }\n\n        $$.y.domain($$.getYDomain(targetsToShow, 'y', xDomainForZoom));\n        $$.y2.domain($$.getYDomain(targetsToShow, 'y2', xDomainForZoom));\n\n        if (!config.axis_y_tick_values && config.axis_y_tick_count) {\n            $$.yAxis.tickValues($$.axis.generateTickValues($$.y.domain(), config.axis_y_tick_count));\n        }\n        if (!config.axis_y2_tick_values && config.axis_y2_tick_count) {\n            $$.y2Axis.tickValues($$.axis.generateTickValues($$.y2.domain(), config.axis_y2_tick_count));\n        }\n\n        // axes\n        $$.axis.redraw(transitions, hideAxis);\n\n        // Update axis label\n        $$.axis.updateLabels(withTransition);\n\n        // show/hide if manual culling needed\n        if ((withUpdateXDomain || withUpdateXAxis) && targetsToShow.length) {\n            if (config.axis_x_tick_culling && tickValues) {\n                for (i = 1; i < tickValues.length; i++) {\n                    if (tickValues.length / i < config.axis_x_tick_culling_max) {\n                        intervalForCulling = i;\n                        break;\n                    }\n                }\n                $$.svg.selectAll('.' + CLASS.axisX + ' .tick text').each(function (e) {\n                    var index = tickValues.indexOf(e);\n                    if (index >= 0) {\n                        d3.select(this).style('display', index % intervalForCulling ? 'none' : 'block');\n                    }\n                });\n            } else {\n                $$.svg.selectAll('.' + CLASS.axisX + ' .tick text').style('display', 'block');\n            }\n        }\n\n        // setup drawer - MEMO: these must be called after axis updated\n        drawArea = $$.generateDrawArea ? $$.generateDrawArea(areaIndices, false) : undefined;\n        drawBar = $$.generateDrawBar ? $$.generateDrawBar(barIndices) : undefined;\n        drawLine = $$.generateDrawLine ? $$.generateDrawLine(lineIndices, false) : undefined;\n        xForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, true);\n        yForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, false);\n\n        // Update sub domain\n        if (withY) {\n            $$.subY.domain($$.getYDomain(targetsToShow, 'y'));\n            $$.subY2.domain($$.getYDomain(targetsToShow, 'y2'));\n        }\n\n        // xgrid focus\n        $$.updateXgridFocus();\n\n        // Data empty label positioning and text.\n        main.select(\"text.\" + CLASS.text + '.' + CLASS.empty)\n            .attr(\"x\", $$.width / 2)\n            .attr(\"y\", $$.height / 2)\n            .text(config.data_empty_label_text)\n          .transition()\n            .style('opacity', targetsToShow.length ? 0 : 1);\n\n        // grid\n        $$.updateGrid(duration);\n\n        // rect for regions\n        $$.updateRegion(duration);\n\n        // bars\n        $$.updateBar(durationForExit);\n\n        // lines, areas and cricles\n        $$.updateLine(durationForExit);\n        $$.updateArea(durationForExit);\n        $$.updateCircle();\n\n        // text\n        if ($$.hasDataLabel()) {\n            $$.updateText(durationForExit);\n        }\n\n        // title\n        if ($$.redrawTitle) { $$.redrawTitle(); }\n\n        // arc\n        if ($$.redrawArc) { $$.redrawArc(duration, durationForExit, withTransform); }\n\n        // subchart\n        if ($$.redrawSubchart) {\n            $$.redrawSubchart(withSubchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices);\n        }\n\n        // circles for select\n        main.selectAll('.' + CLASS.selectedCircles)\n            .filter($$.isBarType.bind($$))\n            .selectAll('circle')\n            .remove();\n\n        // event rects will redrawn when flow called\n        if (config.interaction_enabled && !options.flow && withEventRect) {\n            $$.redrawEventRect();\n            if ($$.updateZoom) { $$.updateZoom(); }\n        }\n\n        // update circleY based on updated parameters\n        $$.updateCircleY();\n\n        // generate circle x/y functions depending on updated params\n        cx = ($$.config.axis_rotated ? $$.circleY : $$.circleX).bind($$);\n        cy = ($$.config.axis_rotated ? $$.circleX : $$.circleY).bind($$);\n\n        if (options.flow) {\n            flow = $$.generateFlow({\n                targets: targetsToShow,\n                flow: options.flow,\n                duration: options.flow.duration,\n                drawBar: drawBar,\n                drawLine: drawLine,\n                drawArea: drawArea,\n                cx: cx,\n                cy: cy,\n                xv: xv,\n                xForText: xForText,\n                yForText: yForText\n            });\n        }\n\n        if ((duration || flow) && $$.isTabVisible()) { // Only use transition if tab visible. See #938.\n            // transition should be derived from one transition\n            d3.transition().duration(duration).each(function () {\n                var transitionsToWait = [];\n\n                // redraw and gather transitions\n                [\n                    $$.redrawBar(drawBar, true),\n                    $$.redrawLine(drawLine, true),\n                    $$.redrawArea(drawArea, true),\n                    $$.redrawCircle(cx, cy, true),\n                    $$.redrawText(xForText, yForText, options.flow, true),\n                    $$.redrawRegion(true),\n                    $$.redrawGrid(true),\n                ].forEach(function (transitions) {\n                    transitions.forEach(function (transition) {\n                        transitionsToWait.push(transition);\n                    });\n                });\n\n                // Wait for end of transitions to call flow and onrendered callback\n                waitForDraw = $$.generateWait();\n                transitionsToWait.forEach(function (t) {\n                    waitForDraw.add(t);\n                });\n            })\n            .call(waitForDraw, function () {\n                if (flow) {\n                    flow();\n                }\n                if (config.onrendered) {\n                    config.onrendered.call($$);\n                }\n            });\n        }\n        else {\n            $$.redrawBar(drawBar);\n            $$.redrawLine(drawLine);\n            $$.redrawArea(drawArea);\n            $$.redrawCircle(cx, cy);\n            $$.redrawText(xForText, yForText, options.flow);\n            $$.redrawRegion();\n            $$.redrawGrid();\n            if (config.onrendered) {\n                config.onrendered.call($$);\n            }\n        }\n\n        // update fadein condition\n        $$.mapToIds($$.data.targets).forEach(function (id) {\n            $$.withoutFadeIn[id] = true;\n        });\n    };\n\n    c3_chart_internal_fn.updateAndRedraw = function (options) {\n        var $$ = this, config = $$.config, transitions;\n        options = options || {};\n        // same with redraw\n        options.withTransition = getOption(options, \"withTransition\", true);\n        options.withTransform = getOption(options, \"withTransform\", false);\n        options.withLegend = getOption(options, \"withLegend\", false);\n        // NOT same with redraw\n        options.withUpdateXDomain = true;\n        options.withUpdateOrgXDomain = true;\n        options.withTransitionForExit = false;\n        options.withTransitionForTransform = getOption(options, \"withTransitionForTransform\", options.withTransition);\n        // MEMO: this needs to be called before updateLegend and it means this ALWAYS needs to be called)\n        $$.updateSizes();\n        // MEMO: called in updateLegend in redraw if withLegend\n        if (!(options.withLegend && config.legend_show)) {\n            transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0);\n            // Update scales\n            $$.updateScales();\n            $$.updateSvgSize();\n            // Update g positions\n            $$.transformAll(options.withTransitionForTransform, transitions);\n        }\n        // Draw with new sizes & scales\n        $$.redraw(options, transitions);\n    };\n    c3_chart_internal_fn.redrawWithoutRescale = function () {\n        this.redraw({\n            withY: false,\n            withSubchart: false,\n            withEventRect: false,\n            withTransitionForAxis: false\n        });\n    };\n\n    c3_chart_internal_fn.isTimeSeries = function () {\n        return this.config.axis_x_type === 'timeseries';\n    };\n    c3_chart_internal_fn.isCategorized = function () {\n        return this.config.axis_x_type.indexOf('categor') >= 0;\n    };\n    c3_chart_internal_fn.isCustomX = function () {\n        var $$ = this, config = $$.config;\n        return !$$.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));\n    };\n\n    c3_chart_internal_fn.isTimeSeriesY = function () {\n        return this.config.axis_y_type === 'timeseries';\n    };\n\n    c3_chart_internal_fn.getTranslate = function (target) {\n        var $$ = this, config = $$.config, x, y;\n        if (target === 'main') {\n            x = asHalfPixel($$.margin.left);\n            y = asHalfPixel($$.margin.top);\n        } else if (target === 'context') {\n            x = asHalfPixel($$.margin2.left);\n            y = asHalfPixel($$.margin2.top);\n        } else if (target === 'legend') {\n            x = $$.margin3.left;\n            y = $$.margin3.top;\n        } else if (target === 'x') {\n            x = 0;\n            y = config.axis_rotated ? 0 : $$.height;\n        } else if (target === 'y') {\n            x = 0;\n            y = config.axis_rotated ? $$.height : 0;\n        } else if (target === 'y2') {\n            x = config.axis_rotated ? 0 : $$.width;\n            y = config.axis_rotated ? 1 : 0;\n        } else if (target === 'subx') {\n            x = 0;\n            y = config.axis_rotated ? 0 : $$.height2;\n        } else if (target === 'arc') {\n            x = $$.arcWidth / 2;\n            y = $$.arcHeight / 2;\n        }\n        return \"translate(\" + x + \",\" + y + \")\";\n    };\n    c3_chart_internal_fn.initialOpacity = function (d) {\n        return d.value !== null && this.withoutFadeIn[d.id] ? 1 : 0;\n    };\n    c3_chart_internal_fn.initialOpacityForCircle = function (d) {\n        return d.value !== null && this.withoutFadeIn[d.id] ? this.opacityForCircle(d) : 0;\n    };\n    c3_chart_internal_fn.opacityForCircle = function (d) {\n        var opacity = this.config.point_show ? 1 : 0;\n        return isValue(d.value) ? (this.isScatterType(d) ? 0.5 : opacity) : 0;\n    };\n    c3_chart_internal_fn.opacityForText = function () {\n        return this.hasDataLabel() ? 1 : 0;\n    };\n    c3_chart_internal_fn.xx = function (d) {\n        return d ? this.x(d.x) : null;\n    };\n    c3_chart_internal_fn.xv = function (d) {\n        var $$ = this, value = d.value;\n        if ($$.isTimeSeries()) {\n            value = $$.parseDate(d.value);\n        }\n        else if ($$.isCategorized() && typeof d.value === 'string') {\n            value = $$.config.axis_x_categories.indexOf(d.value);\n        }\n        return Math.ceil($$.x(value));\n    };\n    c3_chart_internal_fn.yv = function (d) {\n        var $$ = this,\n            yScale = d.axis && d.axis === 'y2' ? $$.y2 : $$.y;\n        return Math.ceil(yScale(d.value));\n    };\n    c3_chart_internal_fn.subxx = function (d) {\n        return d ? this.subX(d.x) : null;\n    };\n\n    c3_chart_internal_fn.transformMain = function (withTransition, transitions) {\n        var $$ = this,\n            xAxis, yAxis, y2Axis;\n        if (transitions && transitions.axisX) {\n            xAxis = transitions.axisX;\n        } else {\n            xAxis  = $$.main.select('.' + CLASS.axisX);\n            if (withTransition) { xAxis = xAxis.transition(); }\n        }\n        if (transitions && transitions.axisY) {\n            yAxis = transitions.axisY;\n        } else {\n            yAxis = $$.main.select('.' + CLASS.axisY);\n            if (withTransition) { yAxis = yAxis.transition(); }\n        }\n        if (transitions && transitions.axisY2) {\n            y2Axis = transitions.axisY2;\n        } else {\n            y2Axis = $$.main.select('.' + CLASS.axisY2);\n            if (withTransition) { y2Axis = y2Axis.transition(); }\n        }\n        (withTransition ? $$.main.transition() : $$.main).attr(\"transform\", $$.getTranslate('main'));\n        xAxis.attr(\"transform\", $$.getTranslate('x'));\n        yAxis.attr(\"transform\", $$.getTranslate('y'));\n        y2Axis.attr(\"transform\", $$.getTranslate('y2'));\n        $$.main.select('.' + CLASS.chartArcs).attr(\"transform\", $$.getTranslate('arc'));\n    };\n    c3_chart_internal_fn.transformAll = function (withTransition, transitions) {\n        var $$ = this;\n        $$.transformMain(withTransition, transitions);\n        if ($$.config.subchart_show) { $$.transformContext(withTransition, transitions); }\n        if ($$.legend) { $$.transformLegend(withTransition); }\n    };\n\n    c3_chart_internal_fn.updateSvgSize = function () {\n        var $$ = this,\n            brush = $$.svg.select(\".c3-brush .background\");\n        $$.svg.attr('width', $$.currentWidth).attr('height', $$.currentHeight);\n        $$.svg.selectAll(['#' + $$.clipId, '#' + $$.clipIdForGrid]).select('rect')\n            .attr('width', $$.width)\n            .attr('height', $$.height);\n        $$.svg.select('#' + $$.clipIdForXAxis).select('rect')\n            .attr('x', $$.getXAxisClipX.bind($$))\n            .attr('y', $$.getXAxisClipY.bind($$))\n            .attr('width', $$.getXAxisClipWidth.bind($$))\n            .attr('height', $$.getXAxisClipHeight.bind($$));\n        $$.svg.select('#' + $$.clipIdForYAxis).select('rect')\n            .attr('x', $$.getYAxisClipX.bind($$))\n            .attr('y', $$.getYAxisClipY.bind($$))\n            .attr('width', $$.getYAxisClipWidth.bind($$))\n            .attr('height', $$.getYAxisClipHeight.bind($$));\n        $$.svg.select('#' + $$.clipIdForSubchart).select('rect')\n            .attr('width', $$.width)\n            .attr('height', brush.size() ? brush.attr('height') : 0);\n        $$.svg.select('.' + CLASS.zoomRect)\n            .attr('width', $$.width)\n            .attr('height', $$.height);\n        // MEMO: parent div's height will be bigger than svg when <!DOCTYPE html>\n        $$.selectChart.style('max-height', $$.currentHeight + \"px\");\n    };\n\n\n    c3_chart_internal_fn.updateDimension = function (withoutAxis) {\n        var $$ = this;\n        if (!withoutAxis) {\n            if ($$.config.axis_rotated) {\n                $$.axes.x.call($$.xAxis);\n                $$.axes.subx.call($$.subXAxis);\n            } else {\n                $$.axes.y.call($$.yAxis);\n                $$.axes.y2.call($$.y2Axis);\n            }\n        }\n        $$.updateSizes();\n        $$.updateScales();\n        $$.updateSvgSize();\n        $$.transformAll(false);\n    };\n\n    c3_chart_internal_fn.observeInserted = function (selection) {\n        var $$ = this, observer;\n        if (typeof MutationObserver === 'undefined') {\n            window.console.error(\"MutationObserver not defined.\");\n            return;\n        }\n        observer= new MutationObserver(function (mutations) {\n            mutations.forEach(function (mutation) {\n                if (mutation.type === 'childList' && mutation.previousSibling) {\n                    observer.disconnect();\n                    // need to wait for completion of load because size calculation requires the actual sizes determined after that completion\n                    $$.intervalForObserveInserted = window.setInterval(function () {\n                        // parentNode will NOT be null when completed\n                        if (selection.node().parentNode) {\n                            window.clearInterval($$.intervalForObserveInserted);\n                            $$.updateDimension();\n                            if ($$.brush) { $$.brush.update(); }\n                            $$.config.oninit.call($$);\n                            $$.redraw({\n                                withTransform: true,\n                                withUpdateXDomain: true,\n                                withUpdateOrgXDomain: true,\n                                withTransition: false,\n                                withTransitionForTransform: false,\n                                withLegend: true\n                            });\n                            selection.transition().style('opacity', 1);\n                        }\n                    }, 10);\n                }\n            });\n        });\n        observer.observe(selection.node(), {attributes: true, childList: true, characterData: true});\n    };\n\n    c3_chart_internal_fn.bindResize = function () {\n        var $$ = this, config = $$.config;\n\n        $$.resizeFunction = $$.generateResize();\n\n        $$.resizeFunction.add(function () {\n            config.onresize.call($$);\n        });\n        if (config.resize_auto) {\n            $$.resizeFunction.add(function () {\n                if ($$.resizeTimeout !== undefined) {\n                    window.clearTimeout($$.resizeTimeout);\n                }\n                $$.resizeTimeout = window.setTimeout(function () {\n                    delete $$.resizeTimeout;\n                    $$.api.flush();\n                }, 100);\n            });\n        }\n        $$.resizeFunction.add(function () {\n            config.onresized.call($$);\n        });\n\n        if (window.attachEvent) {\n            window.attachEvent('onresize', $$.resizeFunction);\n        } else if (window.addEventListener) {\n            window.addEventListener('resize', $$.resizeFunction, false);\n        } else {\n            // fallback to this, if this is a very old browser\n            var wrapper = window.onresize;\n            if (!wrapper) {\n                // create a wrapper that will call all charts\n                wrapper = $$.generateResize();\n            } else if (!wrapper.add || !wrapper.remove) {\n                // there is already a handler registered, make sure we call it too\n                wrapper = $$.generateResize();\n                wrapper.add(window.onresize);\n            }\n            // add this graph to the wrapper, we will be removed if the user calls destroy\n            wrapper.add($$.resizeFunction);\n            window.onresize = wrapper;\n        }\n    };\n\n    c3_chart_internal_fn.generateResize = function () {\n        var resizeFunctions = [];\n        function callResizeFunctions() {\n            resizeFunctions.forEach(function (f) {\n                f();\n            });\n        }\n        callResizeFunctions.add = function (f) {\n            resizeFunctions.push(f);\n        };\n        callResizeFunctions.remove = function (f) {\n            for (var i = 0; i < resizeFunctions.length; i++) {\n                if (resizeFunctions[i] === f) {\n                    resizeFunctions.splice(i, 1);\n                    break;\n                }\n            }\n        };\n        return callResizeFunctions;\n    };\n\n    c3_chart_internal_fn.endall = function (transition, callback) {\n        var n = 0;\n        transition\n            .each(function () { ++n; })\n            .each(\"end\", function () {\n                if (!--n) { callback.apply(this, arguments); }\n            });\n    };\n    c3_chart_internal_fn.generateWait = function () {\n        var transitionsToWait = [],\n            f = function (transition, callback) {\n                var timer = setInterval(function () {\n                    var done = 0;\n                    transitionsToWait.forEach(function (t) {\n                        if (t.empty()) {\n                            done += 1;\n                            return;\n                        }\n                        try {\n                            t.transition();\n                        } catch (e) {\n                            done += 1;\n                        }\n                    });\n                    if (done === transitionsToWait.length) {\n                        clearInterval(timer);\n                        if (callback) { callback(); }\n                    }\n                }, 10);\n            };\n        f.add = function (transition) {\n            transitionsToWait.push(transition);\n        };\n        return f;\n    };\n\n    c3_chart_internal_fn.parseDate = function (date) {\n        var $$ = this, parsedDate;\n        if (date instanceof Date) {\n            parsedDate = date;\n        } else if (typeof date === 'string') {\n            parsedDate = $$.dataTimeFormat($$.config.data_xFormat).parse(date);\n        } else if (typeof date === 'number' && !isNaN(date)) {\n            parsedDate = new Date(+date);\n        }\n        if (!parsedDate || isNaN(+parsedDate)) {\n            window.console.error(\"Failed to parse x '\" + date + \"' to Date object\");\n        }\n        return parsedDate;\n    };\n\n    c3_chart_internal_fn.isTabVisible = function () {\n        var hidden;\n        if (typeof document.hidden !== \"undefined\") { // Opera 12.10 and Firefox 18 and later support\n            hidden = \"hidden\";\n        } else if (typeof document.mozHidden !== \"undefined\") {\n            hidden = \"mozHidden\";\n        } else if (typeof document.msHidden !== \"undefined\") {\n            hidden = \"msHidden\";\n        } else if (typeof document.webkitHidden !== \"undefined\") {\n            hidden = \"webkitHidden\";\n        }\n\n        return document[hidden] ? false : true;\n    };\n\n    c3_chart_internal_fn.getDefaultConfig = function () {\n        var config = {\n            bindto: '#chart',\n            svg_classname: undefined,\n            size_width: undefined,\n            size_height: undefined,\n            padding_left: undefined,\n            padding_right: undefined,\n            padding_top: undefined,\n            padding_bottom: undefined,\n            resize_auto: true,\n            zoom_enabled: false,\n            zoom_extent: undefined,\n            zoom_privileged: false,\n            zoom_rescale: false,\n            zoom_onzoom: function () {},\n            zoom_onzoomstart: function () {},\n            zoom_onzoomend: function () {},\n            zoom_x_min: undefined,\n            zoom_x_max: undefined,\n            interaction_brighten: true,\n            interaction_enabled: true,\n            onmouseover: function () {},\n            onmouseout: function () {},\n            onresize: function () {},\n            onresized: function () {},\n            oninit: function () {},\n            onrendered: function () {},\n            transition_duration: 350,\n            data_x: undefined,\n            data_xs: {},\n            data_xFormat: '%Y-%m-%d',\n            data_xLocaltime: true,\n            data_xSort: true,\n            data_idConverter: function (id) { return id; },\n            data_names: {},\n            data_classes: {},\n            data_groups: [],\n            data_axes: {},\n            data_type: undefined,\n            data_types: {},\n            data_labels: {},\n            data_order: 'desc',\n            data_regions: {},\n            data_color: undefined,\n            data_colors: {},\n            data_hide: false,\n            data_filter: undefined,\n            data_selection_enabled: false,\n            data_selection_grouped: false,\n            data_selection_isselectable: function () { return true; },\n            data_selection_multiple: true,\n            data_selection_draggable: false,\n            data_onclick: function () {},\n            data_onmouseover: function () {},\n            data_onmouseout: function () {},\n            data_onselected: function () {},\n            data_onunselected: function () {},\n            data_url: undefined,\n            data_headers: undefined,\n            data_json: undefined,\n            data_rows: undefined,\n            data_columns: undefined,\n            data_mimeType: undefined,\n            data_keys: undefined,\n            // configuration for no plot-able data supplied.\n            data_empty_label_text: \"\",\n            // subchart\n            subchart_show: false,\n            subchart_size_height: 60,\n            subchart_axis_x_show: true,\n            subchart_onbrush: function () {},\n            // color\n            color_pattern: [],\n            color_threshold: {},\n            // legend\n            legend_show: true,\n            legend_hide: false,\n            legend_position: 'bottom',\n            legend_inset_anchor: 'top-left',\n            legend_inset_x: 10,\n            legend_inset_y: 0,\n            legend_inset_step: undefined,\n            legend_item_onclick: undefined,\n            legend_item_onmouseover: undefined,\n            legend_item_onmouseout: undefined,\n            legend_equally: false,\n            legend_padding: 0,\n            legend_item_tile_width: 10,\n            legend_item_tile_height: 10,\n            // axis\n            axis_rotated: false,\n            axis_x_show: true,\n            axis_x_type: 'indexed',\n            axis_x_localtime: true,\n            axis_x_categories: [],\n            axis_x_tick_centered: false,\n            axis_x_tick_format: undefined,\n            axis_x_tick_culling: {},\n            axis_x_tick_culling_max: 10,\n            axis_x_tick_count: undefined,\n            axis_x_tick_fit: true,\n            axis_x_tick_values: null,\n            axis_x_tick_rotate: 0,\n            axis_x_tick_outer: true,\n            axis_x_tick_multiline: true,\n            axis_x_tick_width: null,\n            axis_x_max: undefined,\n            axis_x_min: undefined,\n            axis_x_padding: {},\n            axis_x_height: undefined,\n            axis_x_extent: undefined,\n            axis_x_label: {},\n            axis_y_show: true,\n            axis_y_type: undefined,\n            axis_y_max: undefined,\n            axis_y_min: undefined,\n            axis_y_inverted: false,\n            axis_y_center: undefined,\n            axis_y_inner: undefined,\n            axis_y_label: {},\n            axis_y_tick_format: undefined,\n            axis_y_tick_outer: true,\n            axis_y_tick_values: null,        \n            axis_y_tick_rotate: 0,\n            axis_y_tick_count: undefined,\n            axis_y_tick_time_value: undefined,\n            axis_y_tick_time_interval: undefined,\n            axis_y_padding: {},\n            axis_y_default: undefined,\n            axis_y2_show: false,\n            axis_y2_max: undefined,\n            axis_y2_min: undefined,\n            axis_y2_inverted: false,\n            axis_y2_center: undefined,\n            axis_y2_inner: undefined,\n            axis_y2_label: {},\n            axis_y2_tick_format: undefined,\n            axis_y2_tick_outer: true,\n            axis_y2_tick_values: null,\n            axis_y2_tick_count: undefined,\n            axis_y2_padding: {},\n            axis_y2_default: undefined,\n            // grid\n            grid_x_show: false,\n            grid_x_type: 'tick',\n            grid_x_lines: [],\n            grid_y_show: false,\n            // not used\n            // grid_y_type: 'tick',\n            grid_y_lines: [],\n            grid_y_ticks: 10,\n            grid_focus_show: true,\n            grid_lines_front: true,\n            // point - point of each data\n            point_show: true,\n            point_r: 2.5,\n            point_sensitivity: 10,\n            point_focus_expand_enabled: true,\n            point_focus_expand_r: undefined,\n            point_select_r: undefined,\n            // line\n            line_connectNull: false,\n            line_step_type: 'step',\n            // bar\n            bar_width: undefined,\n            bar_width_ratio: 0.6,\n            bar_width_max: undefined,\n            bar_zerobased: true,\n            // area\n            area_zerobased: true,\n            area_above: false,\n            // pie\n            pie_label_show: true,\n            pie_label_format: undefined,\n            pie_label_threshold: 0.05,\n            pie_label_ratio: undefined,\n            pie_expand: {},\n            pie_expand_duration: 50,\n            // gauge\n            gauge_fullCircle: false,\n            gauge_label_show: true,\n            gauge_label_format: undefined,\n            gauge_min: 0,\n            gauge_max: 100,\n            gauge_startingAngle: -1 * Math.PI/2,\n            gauge_units: undefined,\n            gauge_width: undefined,\n            gauge_expand: {},\n            gauge_expand_duration: 50,\n            // donut\n            donut_label_show: true,\n            donut_label_format: undefined,\n            donut_label_threshold: 0.05,\n            donut_label_ratio: undefined,\n            donut_width: undefined,\n            donut_title: \"\",\n            donut_expand: {},\n            donut_expand_duration: 50,\n            // spline\n            spline_interpolation_type: 'cardinal',\n            // region - region to change style\n            regions: [],\n            // tooltip - show when mouseover on each data\n            tooltip_show: true,\n            tooltip_grouped: true,\n            tooltip_format_title: undefined,\n            tooltip_format_name: undefined,\n            tooltip_format_value: undefined,\n            tooltip_position: undefined,\n            tooltip_contents: function (d, defaultTitleFormat, defaultValueFormat, color) {\n                return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : '';\n            },\n            tooltip_init_show: false,\n            tooltip_init_x: 0,\n            tooltip_init_position: {top: '0px', left: '50px'},\n            tooltip_onshow: function () {},\n            tooltip_onhide: function () {},\n            // title\n            title_text: undefined,\n            title_padding: {\n                top: 0,\n                right: 0,\n                bottom: 0,\n                left: 0\n            },\n            title_position: 'top-center',\n        };\n\n        Object.keys(this.additionalConfig).forEach(function (key) {\n            config[key] = this.additionalConfig[key];\n        }, this);\n\n        return config;\n    };\n    c3_chart_internal_fn.additionalConfig = {};\n\n    c3_chart_internal_fn.loadConfig = function (config) {\n        var this_config = this.config, target, keys, read;\n        function find() {\n            var key = keys.shift();\n    //        console.log(\"key =>\", key, \", target =>\", target);\n            if (key && target && typeof target === 'object' && key in target) {\n                target = target[key];\n                return find();\n            }\n            else if (!key) {\n                return target;\n            }\n            else {\n                return undefined;\n            }\n        }\n        Object.keys(this_config).forEach(function (key) {\n            target = config;\n            keys = key.split('_');\n            read = find();\n    //        console.log(\"CONFIG : \", key, read);\n            if (isDefined(read)) {\n                this_config[key] = read;\n            }\n        });\n    };\n\n    c3_chart_internal_fn.getScale = function (min, max, forTimeseries) {\n        return (forTimeseries ? this.d3.time.scale() : this.d3.scale.linear()).range([min, max]);\n    };\n    c3_chart_internal_fn.getX = function (min, max, domain, offset) {\n        var $$ = this,\n            scale = $$.getScale(min, max, $$.isTimeSeries()),\n            _scale = domain ? scale.domain(domain) : scale, key;\n        // Define customized scale if categorized axis\n        if ($$.isCategorized()) {\n            offset = offset || function () { return 0; };\n            scale = function (d, raw) {\n                var v = _scale(d) + offset(d);\n                return raw ? v : Math.ceil(v);\n            };\n        } else {\n            scale = function (d, raw) {\n                var v = _scale(d);\n                return raw ? v : Math.ceil(v);\n            };\n        }\n        // define functions\n        for (key in _scale) {\n            scale[key] = _scale[key];\n        }\n        scale.orgDomain = function () {\n            return _scale.domain();\n        };\n        // define custom domain() for categorized axis\n        if ($$.isCategorized()) {\n            scale.domain = function (domain) {\n                if (!arguments.length) {\n                    domain = this.orgDomain();\n                    return [domain[0], domain[1] + 1];\n                }\n                _scale.domain(domain);\n                return scale;\n            };\n        }\n        return scale;\n    };\n    c3_chart_internal_fn.getY = function (min, max, domain) {\n        var scale = this.getScale(min, max, this.isTimeSeriesY());\n        if (domain) { scale.domain(domain); }\n        return scale;\n    };\n    c3_chart_internal_fn.getYScale = function (id) {\n        return this.axis.getId(id) === 'y2' ? this.y2 : this.y;\n    };\n    c3_chart_internal_fn.getSubYScale = function (id) {\n        return this.axis.getId(id) === 'y2' ? this.subY2 : this.subY;\n    };\n    c3_chart_internal_fn.updateScales = function () {\n        var $$ = this, config = $$.config,\n            forInit = !$$.x;\n        // update edges\n        $$.xMin = config.axis_rotated ? 1 : 0;\n        $$.xMax = config.axis_rotated ? $$.height : $$.width;\n        $$.yMin = config.axis_rotated ? 0 : $$.height;\n        $$.yMax = config.axis_rotated ? $$.width : 1;\n        $$.subXMin = $$.xMin;\n        $$.subXMax = $$.xMax;\n        $$.subYMin = config.axis_rotated ? 0 : $$.height2;\n        $$.subYMax = config.axis_rotated ? $$.width2 : 1;\n        // update scales\n        $$.x = $$.getX($$.xMin, $$.xMax, forInit ? undefined : $$.x.orgDomain(), function () { return $$.xAxis.tickOffset(); });\n        $$.y = $$.getY($$.yMin, $$.yMax, forInit ? config.axis_y_default : $$.y.domain());\n        $$.y2 = $$.getY($$.yMin, $$.yMax, forInit ? config.axis_y2_default : $$.y2.domain());\n        $$.subX = $$.getX($$.xMin, $$.xMax, $$.orgXDomain, function (d) { return d % 1 ? 0 : $$.subXAxis.tickOffset(); });\n        $$.subY = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y_default : $$.subY.domain());\n        $$.subY2 = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y2_default : $$.subY2.domain());\n        // update axes\n        $$.xAxisTickFormat = $$.axis.getXAxisTickFormat();\n        $$.xAxisTickValues = $$.axis.getXAxisTickValues();\n        $$.yAxisTickValues = $$.axis.getYAxisTickValues();\n        $$.y2AxisTickValues = $$.axis.getY2AxisTickValues();\n\n        $$.xAxis = $$.axis.getXAxis($$.x, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer);\n        $$.subXAxis = $$.axis.getXAxis($$.subX, $$.subXOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer);\n        $$.yAxis = $$.axis.getYAxis($$.y, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, config.axis_y_tick_outer);\n        $$.y2Axis = $$.axis.getYAxis($$.y2, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, config.axis_y2_tick_outer);\n\n        // Set initialized scales to brush and zoom\n        if (!forInit) {\n            if ($$.brush) { $$.brush.scale($$.subX); }\n            if (config.zoom_enabled) { $$.zoom.scale($$.x); }\n        }\n        // update for arc\n        if ($$.updateArc) { $$.updateArc(); }\n    };\n\n    c3_chart_internal_fn.getYDomainMin = function (targets) {\n        var $$ = this, config = $$.config,\n            ids = $$.mapToIds(targets), ys = $$.getValuesAsIdKeyed(targets),\n            j, k, baseId, idsInGroup, id, hasNegativeValue;\n        if (config.data_groups.length > 0) {\n            hasNegativeValue = $$.hasNegativeValueInTargets(targets);\n            for (j = 0; j < config.data_groups.length; j++) {\n                // Determine baseId\n                idsInGroup = config.data_groups[j].filter(function (id) { return ids.indexOf(id) >= 0; });\n                if (idsInGroup.length === 0) { continue; }\n                baseId = idsInGroup[0];\n                // Consider negative values\n                if (hasNegativeValue && ys[baseId]) {\n                    ys[baseId].forEach(function (v, i) {\n                        ys[baseId][i] = v < 0 ? v : 0;\n                    });\n                }\n                // Compute min\n                for (k = 1; k < idsInGroup.length; k++) {\n                    id = idsInGroup[k];\n                    if (! ys[id]) { continue; }\n                    ys[id].forEach(function (v, i) {\n                        if ($$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasNegativeValue && +v > 0)) {\n                            ys[baseId][i] += +v;\n                        }\n                    });\n                }\n            }\n        }\n        return $$.d3.min(Object.keys(ys).map(function (key) { return $$.d3.min(ys[key]); }));\n    };\n    c3_chart_internal_fn.getYDomainMax = function (targets) {\n        var $$ = this, config = $$.config,\n            ids = $$.mapToIds(targets), ys = $$.getValuesAsIdKeyed(targets),\n            j, k, baseId, idsInGroup, id, hasPositiveValue;\n        if (config.data_groups.length > 0) {\n            hasPositiveValue = $$.hasPositiveValueInTargets(targets);\n            for (j = 0; j < config.data_groups.length; j++) {\n                // Determine baseId\n                idsInGroup = config.data_groups[j].filter(function (id) { return ids.indexOf(id) >= 0; });\n                if (idsInGroup.length === 0) { continue; }\n                baseId = idsInGroup[0];\n                // Consider positive values\n                if (hasPositiveValue && ys[baseId]) {\n                    ys[baseId].forEach(function (v, i) {\n                        ys[baseId][i] = v > 0 ? v : 0;\n                    });\n                }\n                // Compute max\n                for (k = 1; k < idsInGroup.length; k++) {\n                    id = idsInGroup[k];\n                    if (! ys[id]) { continue; }\n                    ys[id].forEach(function (v, i) {\n                        if ($$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasPositiveValue && +v < 0)) {\n                            ys[baseId][i] += +v;\n                        }\n                    });\n                }\n            }\n        }\n        return $$.d3.max(Object.keys(ys).map(function (key) { return $$.d3.max(ys[key]); }));\n    };\n    c3_chart_internal_fn.getYDomain = function (targets, axisId, xDomain) {\n        var $$ = this, config = $$.config,\n            targetsByAxisId = targets.filter(function (t) { return $$.axis.getId(t.id) === axisId; }),\n            yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId,\n            yMin = axisId === 'y2' ? config.axis_y2_min : config.axis_y_min,\n            yMax = axisId === 'y2' ? config.axis_y2_max : config.axis_y_max,\n            yDomainMin = $$.getYDomainMin(yTargets),\n            yDomainMax = $$.getYDomainMax(yTargets),\n            domain, domainLength, padding, padding_top, padding_bottom,\n            center = axisId === 'y2' ? config.axis_y2_center : config.axis_y_center,\n            yDomainAbs, lengths, diff, ratio, isAllPositive, isAllNegative,\n            isZeroBased = ($$.hasType('bar', yTargets) && config.bar_zerobased) || ($$.hasType('area', yTargets) && config.area_zerobased),\n            isInverted = axisId === 'y2' ? config.axis_y2_inverted : config.axis_y_inverted,\n            showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated,\n            showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;\n\n        // MEMO: avoid inverting domain unexpectedly\n        yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? (yDomainMin < yMax ? yDomainMin : yMax - 10) : yDomainMin;\n        yDomainMax = isValue(yMax) ? yMax : isValue(yMin) ? (yMin < yDomainMax ? yDomainMax : yMin + 10) : yDomainMax;\n\n        if (yTargets.length === 0) { // use current domain if target of axisId is none\n            return axisId === 'y2' ? $$.y2.domain() : $$.y.domain();\n        }\n        if (isNaN(yDomainMin)) { // set minimum to zero when not number\n            yDomainMin = 0;\n        }\n        if (isNaN(yDomainMax)) { // set maximum to have same value as yDomainMin\n            yDomainMax = yDomainMin;\n        }\n        if (yDomainMin === yDomainMax) {\n            yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0;\n        }\n        isAllPositive = yDomainMin >= 0 && yDomainMax >= 0;\n        isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;\n\n        // Cancel zerobased if axis_*_min / axis_*_max specified\n        if ((isValue(yMin) && isAllPositive) || (isValue(yMax) && isAllNegative)) {\n            isZeroBased = false;\n        }\n\n        // Bar/Area chart should be 0-based if all positive|negative\n        if (isZeroBased) {\n            if (isAllPositive) { yDomainMin = 0; }\n            if (isAllNegative) { yDomainMax = 0; }\n        }\n\n        domainLength = Math.abs(yDomainMax - yDomainMin);\n        padding = padding_top = padding_bottom = domainLength * 0.1;\n\n        if (typeof center !== 'undefined') {\n            yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));\n            yDomainMax = center + yDomainAbs;\n            yDomainMin = center - yDomainAbs;\n        }\n        // add padding for data label\n        if (showHorizontalDataLabel) {\n            lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, 'width');\n            diff = diffDomain($$.y.range());\n            ratio = [lengths[0] / diff, lengths[1] / diff];\n            padding_top += domainLength * (ratio[1] / (1 - ratio[0] - ratio[1]));\n            padding_bottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1]));\n        } else if (showVerticalDataLabel) {\n            lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, 'height');\n            padding_top += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength);\n            padding_bottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength);\n        }\n        if (axisId === 'y' && notEmpty(config.axis_y_padding)) {\n            padding_top = $$.axis.getPadding(config.axis_y_padding, 'top', padding_top, domainLength);\n            padding_bottom = $$.axis.getPadding(config.axis_y_padding, 'bottom', padding_bottom, domainLength);\n        }\n        if (axisId === 'y2' && notEmpty(config.axis_y2_padding)) {\n            padding_top = $$.axis.getPadding(config.axis_y2_padding, 'top', padding_top, domainLength);\n            padding_bottom = $$.axis.getPadding(config.axis_y2_padding, 'bottom', padding_bottom, domainLength);\n        }\n        // Bar/Area chart should be 0-based if all positive|negative\n        if (isZeroBased) {\n            if (isAllPositive) { padding_bottom = yDomainMin; }\n            if (isAllNegative) { padding_top = -yDomainMax; }\n        }\n        domain = [yDomainMin - padding_bottom, yDomainMax + padding_top];\n        return isInverted ? domain.reverse() : domain;\n    };\n    c3_chart_internal_fn.getXDomainMin = function (targets) {\n        var $$ = this, config = $$.config;\n        return isDefined(config.axis_x_min) ?\n            ($$.isTimeSeries() ? this.parseDate(config.axis_x_min) : config.axis_x_min) :\n        $$.d3.min(targets, function (t) { return $$.d3.min(t.values, function (v) { return v.x; }); });\n    };\n    c3_chart_internal_fn.getXDomainMax = function (targets) {\n        var $$ = this, config = $$.config;\n        return isDefined(config.axis_x_max) ?\n            ($$.isTimeSeries() ? this.parseDate(config.axis_x_max) : config.axis_x_max) :\n        $$.d3.max(targets, function (t) { return $$.d3.max(t.values, function (v) { return v.x; }); });\n    };\n    c3_chart_internal_fn.getXDomainPadding = function (domain) {\n        var $$ = this, config = $$.config,\n            diff = domain[1] - domain[0],\n            maxDataCount, padding, paddingLeft, paddingRight;\n        if ($$.isCategorized()) {\n            padding = 0;\n        } else if ($$.hasType('bar')) {\n            maxDataCount = $$.getMaxDataCount();\n            padding = maxDataCount > 1 ? (diff / (maxDataCount - 1)) / 2 : 0.5;\n        } else {\n            padding = diff * 0.01;\n        }\n        if (typeof config.axis_x_padding === 'object' && notEmpty(config.axis_x_padding)) {\n            paddingLeft = isValue(config.axis_x_padding.left) ? config.axis_x_padding.left : padding;\n            paddingRight = isValue(config.axis_x_padding.right) ? config.axis_x_padding.right : padding;\n        } else if (typeof config.axis_x_padding === 'number') {\n            paddingLeft = paddingRight = config.axis_x_padding;\n        } else {\n            paddingLeft = paddingRight = padding;\n        }\n        return {left: paddingLeft, right: paddingRight};\n    };\n    c3_chart_internal_fn.getXDomain = function (targets) {\n        var $$ = this,\n            xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)],\n            firstX = xDomain[0], lastX = xDomain[1],\n            padding = $$.getXDomainPadding(xDomain),\n            min = 0, max = 0;\n        // show center of x domain if min and max are the same\n        if ((firstX - lastX) === 0 && !$$.isCategorized()) {\n            if ($$.isTimeSeries()) {\n                firstX = new Date(firstX.getTime() * 0.5);\n                lastX = new Date(lastX.getTime() * 1.5);\n            } else {\n                firstX = firstX === 0 ? 1 : (firstX * 0.5);\n                lastX = lastX === 0 ? -1 : (lastX * 1.5);\n            }\n        }\n        if (firstX || firstX === 0) {\n            min = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left;\n        }\n        if (lastX || lastX === 0) {\n            max = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right;\n        }\n        return [min, max];\n    };\n    c3_chart_internal_fn.updateXDomain = function (targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {\n        var $$ = this, config = $$.config;\n\n        if (withUpdateOrgXDomain) {\n            $$.x.domain(domain ? domain : $$.d3.extent($$.getXDomain(targets)));\n            $$.orgXDomain = $$.x.domain();\n            if (config.zoom_enabled) { $$.zoom.scale($$.x).updateScaleExtent(); }\n            $$.subX.domain($$.x.domain());\n            if ($$.brush) { $$.brush.scale($$.subX); }\n        }\n        if (withUpdateXDomain) {\n            $$.x.domain(domain ? domain : (!$$.brush || $$.brush.empty()) ? $$.orgXDomain : $$.brush.extent());\n            if (config.zoom_enabled) { $$.zoom.scale($$.x).updateScaleExtent(); }\n        }\n\n        // Trim domain when too big by zoom mousemove event\n        if (withTrim) { $$.x.domain($$.trimXDomain($$.x.orgDomain())); }\n\n        return $$.x.domain();\n    };\n    c3_chart_internal_fn.trimXDomain = function (domain) {\n        var zoomDomain = this.getZoomDomain(),\n            min = zoomDomain[0], max = zoomDomain[1];\n        if (domain[0] <= min) {\n            domain[1] = +domain[1] + (min - domain[0]);\n            domain[0] = min;\n        }\n        if (max <= domain[1]) {\n            domain[0] = +domain[0] - (domain[1] - max);\n            domain[1] = max;\n        }\n        return domain;\n    };\n\n    c3_chart_internal_fn.isX = function (key) {\n        var $$ = this, config = $$.config;\n        return (config.data_x && key === config.data_x) || (notEmpty(config.data_xs) && hasValue(config.data_xs, key));\n    };\n    c3_chart_internal_fn.isNotX = function (key) {\n        return !this.isX(key);\n    };\n    c3_chart_internal_fn.getXKey = function (id) {\n        var $$ = this, config = $$.config;\n        return config.data_x ? config.data_x : notEmpty(config.data_xs) ? config.data_xs[id] : null;\n    };\n    c3_chart_internal_fn.getXValuesOfXKey = function (key, targets) {\n        var $$ = this,\n            xValues, ids = targets && notEmpty(targets) ? $$.mapToIds(targets) : [];\n        ids.forEach(function (id) {\n            if ($$.getXKey(id) === key) {\n                xValues = $$.data.xs[id];\n            }\n        });\n        return xValues;\n    };\n    c3_chart_internal_fn.getIndexByX = function (x) {\n        var $$ = this,\n            data = $$.filterByX($$.data.targets, x);\n        return data.length ? data[0].index : null;\n    };\n    c3_chart_internal_fn.getXValue = function (id, i) {\n        var $$ = this;\n        return id in $$.data.xs && $$.data.xs[id] && isValue($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;\n    };\n    c3_chart_internal_fn.getOtherTargetXs = function () {\n        var $$ = this,\n            idsForX = Object.keys($$.data.xs);\n        return idsForX.length ? $$.data.xs[idsForX[0]] : null;\n    };\n    c3_chart_internal_fn.getOtherTargetX = function (index) {\n        var xs = this.getOtherTargetXs();\n        return xs && index < xs.length ? xs[index] : null;\n    };\n    c3_chart_internal_fn.addXs = function (xs) {\n        var $$ = this;\n        Object.keys(xs).forEach(function (id) {\n            $$.config.data_xs[id] = xs[id];\n        });\n    };\n    c3_chart_internal_fn.hasMultipleX = function (xs) {\n        return this.d3.set(Object.keys(xs).map(function (id) { return xs[id]; })).size() > 1;\n    };\n    c3_chart_internal_fn.isMultipleX = function () {\n        return notEmpty(this.config.data_xs) || !this.config.data_xSort || this.hasType('scatter');\n    };\n    c3_chart_internal_fn.addName = function (data) {\n        var $$ = this, name;\n        if (data) {\n            name = $$.config.data_names[data.id];\n            data.name = name !== undefined ? name : data.id;\n        }\n        return data;\n    };\n    c3_chart_internal_fn.getValueOnIndex = function (values, index) {\n        var valueOnIndex = values.filter(function (v) { return v.index === index; });\n        return valueOnIndex.length ? valueOnIndex[0] : null;\n    };\n    c3_chart_internal_fn.updateTargetX = function (targets, x) {\n        var $$ = this;\n        targets.forEach(function (t) {\n            t.values.forEach(function (v, i) {\n                v.x = $$.generateTargetX(x[i], t.id, i);\n            });\n            $$.data.xs[t.id] = x;\n        });\n    };\n    c3_chart_internal_fn.updateTargetXs = function (targets, xs) {\n        var $$ = this;\n        targets.forEach(function (t) {\n            if (xs[t.id]) {\n                $$.updateTargetX([t], xs[t.id]);\n            }\n        });\n    };\n    c3_chart_internal_fn.generateTargetX = function (rawX, id, index) {\n        var $$ = this, x;\n        if ($$.isTimeSeries()) {\n            x = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index));\n        }\n        else if ($$.isCustomX() && !$$.isCategorized()) {\n            x = isValue(rawX) ? +rawX : $$.getXValue(id, index);\n        }\n        else {\n            x = index;\n        }\n        return x;\n    };\n    c3_chart_internal_fn.cloneTarget = function (target) {\n        return {\n            id : target.id,\n            id_org : target.id_org,\n            values : target.values.map(function (d) {\n                return {x: d.x, value: d.value, id: d.id};\n            })\n        };\n    };\n    c3_chart_internal_fn.updateXs = function () {\n        var $$ = this;\n        if ($$.data.targets.length) {\n            $$.xs = [];\n            $$.data.targets[0].values.forEach(function (v) {\n                $$.xs[v.index] = v.x;\n            });\n        }\n    };\n    c3_chart_internal_fn.getPrevX = function (i) {\n        var x = this.xs[i - 1];\n        return typeof x !== 'undefined' ? x : null;\n    };\n    c3_chart_internal_fn.getNextX = function (i) {\n        var x = this.xs[i + 1];\n        return typeof x !== 'undefined' ? x : null;\n    };\n    c3_chart_internal_fn.getMaxDataCount = function () {\n        var $$ = this;\n        return $$.d3.max($$.data.targets, function (t) { return t.values.length; });\n    };\n    c3_chart_internal_fn.getMaxDataCountTarget = function (targets) {\n        var length = targets.length, max = 0, maxTarget;\n        if (length > 1) {\n            targets.forEach(function (t) {\n                if (t.values.length > max) {\n                    maxTarget = t;\n                    max = t.values.length;\n                }\n            });\n        } else {\n            maxTarget = length ? targets[0] : null;\n        }\n        return maxTarget;\n    };\n    c3_chart_internal_fn.getEdgeX = function (targets) {\n        var $$ = this;\n        return !targets.length ? [0, 0] : [\n            $$.d3.min(targets, function (t) { return t.values[0].x; }),\n            $$.d3.max(targets, function (t) { return t.values[t.values.length - 1].x; })\n        ];\n    };\n    c3_chart_internal_fn.mapToIds = function (targets) {\n        return targets.map(function (d) { return d.id; });\n    };\n    c3_chart_internal_fn.mapToTargetIds = function (ids) {\n        var $$ = this;\n        return ids ? [].concat(ids) : $$.mapToIds($$.data.targets);\n    };\n    c3_chart_internal_fn.hasTarget = function (targets, id) {\n        var ids = this.mapToIds(targets), i;\n        for (i = 0; i < ids.length; i++) {\n            if (ids[i] === id) {\n                return true;\n            }\n        }\n        return false;\n    };\n    c3_chart_internal_fn.isTargetToShow = function (targetId) {\n        return this.hiddenTargetIds.indexOf(targetId) < 0;\n    };\n    c3_chart_internal_fn.isLegendToShow = function (targetId) {\n        return this.hiddenLegendIds.indexOf(targetId) < 0;\n    };\n    c3_chart_internal_fn.filterTargetsToShow = function (targets) {\n        var $$ = this;\n        return targets.filter(function (t) { return $$.isTargetToShow(t.id); });\n    };\n    c3_chart_internal_fn.mapTargetsToUniqueXs = function (targets) {\n        var $$ = this;\n        var xs = $$.d3.set($$.d3.merge(targets.map(function (t) { return t.values.map(function (v) { return +v.x; }); }))).values();\n        xs = $$.isTimeSeries() ? xs.map(function (x) { return new Date(+x); }) : xs.map(function (x) { return +x; });\n        return xs.sort(function (a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; });\n    };\n    c3_chart_internal_fn.addHiddenTargetIds = function (targetIds) {\n        this.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds);\n    };\n    c3_chart_internal_fn.removeHiddenTargetIds = function (targetIds) {\n        this.hiddenTargetIds = this.hiddenTargetIds.filter(function (id) { return targetIds.indexOf(id) < 0; });\n    };\n    c3_chart_internal_fn.addHiddenLegendIds = function (targetIds) {\n        this.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds);\n    };\n    c3_chart_internal_fn.removeHiddenLegendIds = function (targetIds) {\n        this.hiddenLegendIds = this.hiddenLegendIds.filter(function (id) { return targetIds.indexOf(id) < 0; });\n    };\n    c3_chart_internal_fn.getValuesAsIdKeyed = function (targets) {\n        var ys = {};\n        targets.forEach(function (t) {\n            ys[t.id] = [];\n            t.values.forEach(function (v) {\n                ys[t.id].push(v.value);\n            });\n        });\n        return ys;\n    };\n    c3_chart_internal_fn.checkValueInTargets = function (targets, checker) {\n        var ids = Object.keys(targets), i, j, values;\n        for (i = 0; i < ids.length; i++) {\n            values = targets[ids[i]].values;\n            for (j = 0; j < values.length; j++) {\n                if (checker(values[j].value)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    c3_chart_internal_fn.hasNegativeValueInTargets = function (targets) {\n        return this.checkValueInTargets(targets, function (v) { return v < 0; });\n    };\n    c3_chart_internal_fn.hasPositiveValueInTargets = function (targets) {\n        return this.checkValueInTargets(targets, function (v) { return v > 0; });\n    };\n    c3_chart_internal_fn.isOrderDesc = function () {\n        var config = this.config;\n        return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'desc';\n    };\n    c3_chart_internal_fn.isOrderAsc = function () {\n        var config = this.config;\n        return typeof(config.data_order) === 'string' && config.data_order.toLowerCase() === 'asc';\n    };\n    c3_chart_internal_fn.orderTargets = function (targets) {\n        var $$ = this, config = $$.config, orderAsc = $$.isOrderAsc(), orderDesc = $$.isOrderDesc();\n        if (orderAsc || orderDesc) {\n            targets.sort(function (t1, t2) {\n                var reducer = function (p, c) { return p + Math.abs(c.value); };\n                var t1Sum = t1.values.reduce(reducer, 0),\n                    t2Sum = t2.values.reduce(reducer, 0);\n                return orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;\n            });\n        } else if (isFunction(config.data_order)) {\n            targets.sort(config.data_order);\n        } // TODO: accept name array for order\n        return targets;\n    };\n    c3_chart_internal_fn.filterByX = function (targets, x) {\n        return this.d3.merge(targets.map(function (t) { return t.values; })).filter(function (v) { return v.x - x === 0; });\n    };\n    c3_chart_internal_fn.filterRemoveNull = function (data) {\n        return data.filter(function (d) { return isValue(d.value); });\n    };\n    c3_chart_internal_fn.filterByXDomain = function (targets, xDomain) {\n        return targets.map(function (t) {\n            return {\n                id: t.id,\n                id_org: t.id_org,\n                values: t.values.filter(function (v) {\n                    return xDomain[0] <= v.x && v.x <= xDomain[1];\n                })\n            };\n        });\n    };\n    c3_chart_internal_fn.hasDataLabel = function () {\n        var config = this.config;\n        if (typeof config.data_labels === 'boolean' && config.data_labels) {\n            return true;\n        } else if (typeof config.data_labels === 'object' && notEmpty(config.data_labels)) {\n            return true;\n        }\n        return false;\n    };\n    c3_chart_internal_fn.getDataLabelLength = function (min, max, key) {\n        var $$ = this,\n            lengths = [0, 0], paddingCoef = 1.3;\n        $$.selectChart.select('svg').selectAll('.dummy')\n            .data([min, max])\n            .enter().append('text')\n            .text(function (d) { return $$.dataLabelFormat(d.id)(d); })\n            .each(function (d, i) {\n                lengths[i] = this.getBoundingClientRect()[key] * paddingCoef;\n            })\n            .remove();\n        return lengths;\n    };\n    c3_chart_internal_fn.isNoneArc = function (d) {\n        return this.hasTarget(this.data.targets, d.id);\n    },\n    c3_chart_internal_fn.isArc = function (d) {\n        return 'data' in d && this.hasTarget(this.data.targets, d.data.id);\n    };\n    c3_chart_internal_fn.findSameXOfValues = function (values, index) {\n        var i, targetX = values[index].x, sames = [];\n        for (i = index - 1; i >= 0; i--) {\n            if (targetX !== values[i].x) { break; }\n            sames.push(values[i]);\n        }\n        for (i = index; i < values.length; i++) {\n            if (targetX !== values[i].x) { break; }\n            sames.push(values[i]);\n        }\n        return sames;\n    };\n\n    c3_chart_internal_fn.findClosestFromTargets = function (targets, pos) {\n        var $$ = this, candidates;\n\n        // map to array of closest points of each target\n        candidates = targets.map(function (target) {\n            return $$.findClosest(target.values, pos);\n        });\n\n        // decide closest point and return\n        return $$.findClosest(candidates, pos);\n    };\n    c3_chart_internal_fn.findClosest = function (values, pos) {\n        var $$ = this, minDist = $$.config.point_sensitivity, closest;\n\n        // find mouseovering bar\n        values.filter(function (v) { return v && $$.isBarType(v.id); }).forEach(function (v) {\n            var shape = $$.main.select('.' + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + ' .' + CLASS.bar + '-' + v.index).node();\n            if (!closest && $$.isWithinBar(shape)) {\n                closest = v;\n            }\n        });\n\n        // find closest point from non-bar\n        values.filter(function (v) { return v && !$$.isBarType(v.id); }).forEach(function (v) {\n            var d = $$.dist(v, pos);\n            if (d < minDist) {\n                minDist = d;\n                closest = v;\n            }\n        });\n\n        return closest;\n    };\n    c3_chart_internal_fn.dist = function (data, pos) {\n        var $$ = this, config = $$.config,\n            xIndex = config.axis_rotated ? 1 : 0,\n            yIndex = config.axis_rotated ? 0 : 1,\n            y = $$.circleY(data, data.index),\n            x = $$.x(data.x);\n        return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));\n    };\n    c3_chart_internal_fn.convertValuesToStep = function (values) {\n        var converted = [].concat(values), i;\n\n        if (!this.isCategorized()) {\n            return values;\n        }\n\n        for (i = values.length + 1; 0 < i; i--) {\n            converted[i] = converted[i - 1];\n        }\n\n        converted[0] = {\n            x: converted[0].x - 1,\n            value: converted[0].value,\n            id: converted[0].id\n        };\n        converted[values.length + 1] = {\n            x: converted[values.length].x + 1,\n            value: converted[values.length].value,\n            id: converted[values.length].id\n        };\n\n        return converted;\n    };\n    c3_chart_internal_fn.updateDataAttributes = function (name, attrs) {\n        var $$ = this, config = $$.config, current = config['data_' + name];\n        if (typeof attrs === 'undefined') { return current; }\n        Object.keys(attrs).forEach(function (id) {\n            current[id] = attrs[id];\n        });\n        $$.redraw({withLegend: true});\n        return current;\n    };\n\n    c3_chart_internal_fn.convertUrlToData = function (url, mimeType, headers, keys, done) {\n        var $$ = this, type = mimeType ? mimeType : 'csv';\n        var req = $$.d3.xhr(url);\n        if (headers) {\n            Object.keys(headers).forEach(function (header) {\n                req.header(header, headers[header]);\n            });\n        }\n        req.get(function (error, data) {\n            var d;\n            if (!data) {\n                throw new Error(error.responseURL + ' ' + error.status + ' (' + error.statusText + ')');\n            }\n            if (type === 'json') {\n                d = $$.convertJsonToData(JSON.parse(data.response), keys);\n            } else if (type === 'tsv') {\n                d = $$.convertTsvToData(data.response);\n            } else {\n                d = $$.convertCsvToData(data.response);\n            }\n            done.call($$, d);\n        });\n    };\n    c3_chart_internal_fn.convertXsvToData = function (xsv, parser) {\n        var rows = parser.parseRows(xsv), d;\n        if (rows.length === 1) {\n            d = [{}];\n            rows[0].forEach(function (id) {\n                d[0][id] = null;\n            });\n        } else {\n            d = parser.parse(xsv);\n        }\n        return d;\n    };\n    c3_chart_internal_fn.convertCsvToData = function (csv) {\n        return this.convertXsvToData(csv, this.d3.csv);\n    };\n    c3_chart_internal_fn.convertTsvToData = function (tsv) {\n        return this.convertXsvToData(tsv, this.d3.tsv);\n    };\n    c3_chart_internal_fn.convertJsonToData = function (json, keys) {\n        var $$ = this,\n            new_rows = [], targetKeys, data;\n        if (keys) { // when keys specified, json would be an array that includes objects\n            if (keys.x) {\n                targetKeys = keys.value.concat(keys.x);\n                $$.config.data_x = keys.x;\n            } else {\n                targetKeys = keys.value;\n            }\n            new_rows.push(targetKeys);\n            json.forEach(function (o) {\n                var new_row = [];\n                targetKeys.forEach(function (key) {\n                    // convert undefined to null because undefined data will be removed in convertDataToTargets()\n                    var v = $$.findValueInJson(o, key);\n                    if (isUndefined(v)) {\n                        v = null;\n                    }\n                    new_row.push(v);\n                });\n                new_rows.push(new_row);\n            });\n            data = $$.convertRowsToData(new_rows);\n        } else {\n            Object.keys(json).forEach(function (key) {\n                new_rows.push([key].concat(json[key]));\n            });\n            data = $$.convertColumnsToData(new_rows);\n        }\n        return data;\n    };\n    c3_chart_internal_fn.findValueInJson = function (object, path) {\n        path = path.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties (replace [] with .)\n        path = path.replace(/^\\./, '');           // strip a leading dot\n        var pathArray = path.split('.');\n        for (var i = 0; i < pathArray.length; ++i) {\n            var k = pathArray[i];\n            if (k in object) {\n                object = object[k];\n            } else {\n                return;\n            }\n        }\n        return object;\n    };\n    c3_chart_internal_fn.convertRowsToData = function (rows) {\n        var keys = rows[0], new_row = {}, new_rows = [], i, j;\n        for (i = 1; i < rows.length; i++) {\n            new_row = {};\n            for (j = 0; j < rows[i].length; j++) {\n                if (isUndefined(rows[i][j])) {\n                    throw new Error(\"Source data is missing a component at (\" + i + \",\" + j + \")!\");\n                }\n                new_row[keys[j]] = rows[i][j];\n            }\n            new_rows.push(new_row);\n        }\n        return new_rows;\n    };\n    c3_chart_internal_fn.convertColumnsToData = function (columns) {\n        var new_rows = [], i, j, key;\n        for (i = 0; i < columns.length; i++) {\n            key = columns[i][0];\n            for (j = 1; j < columns[i].length; j++) {\n                if (isUndefined(new_rows[j - 1])) {\n                    new_rows[j - 1] = {};\n                }\n                if (isUndefined(columns[i][j])) {\n                    throw new Error(\"Source data is missing a component at (\" + i + \",\" + j + \")!\");\n                }\n                new_rows[j - 1][key] = columns[i][j];\n            }\n        }\n        return new_rows;\n    };\n    c3_chart_internal_fn.convertDataToTargets = function (data, appendXs) {\n        var $$ = this, config = $$.config,\n            ids = $$.d3.keys(data[0]).filter($$.isNotX, $$),\n            xs = $$.d3.keys(data[0]).filter($$.isX, $$),\n            targets;\n\n        // save x for update data by load when custom x and c3.x API\n        ids.forEach(function (id) {\n            var xKey = $$.getXKey(id);\n\n            if ($$.isCustomX() || $$.isTimeSeries()) {\n                // if included in input data\n                if (xs.indexOf(xKey) >= 0) {\n                    $$.data.xs[id] = (appendXs && $$.data.xs[id] ? $$.data.xs[id] : []).concat(\n                        data.map(function (d) { return d[xKey]; })\n                            .filter(isValue)\n                            .map(function (rawX, i) { return $$.generateTargetX(rawX, id, i); })\n                    );\n                }\n                // if not included in input data, find from preloaded data of other id's x\n                else if (config.data_x) {\n                    $$.data.xs[id] = $$.getOtherTargetXs();\n                }\n                // if not included in input data, find from preloaded data\n                else if (notEmpty(config.data_xs)) {\n                    $$.data.xs[id] = $$.getXValuesOfXKey(xKey, $$.data.targets);\n                }\n                // MEMO: if no x included, use same x of current will be used\n            } else {\n                $$.data.xs[id] = data.map(function (d, i) { return i; });\n            }\n        });\n\n\n        // check x is defined\n        ids.forEach(function (id) {\n            if (!$$.data.xs[id]) {\n                throw new Error('x is not defined for id = \"' + id + '\".');\n            }\n        });\n\n        // convert to target\n        targets = ids.map(function (id, index) {\n            var convertedId = config.data_idConverter(id);\n            return {\n                id: convertedId,\n                id_org: id,\n                values: data.map(function (d, i) {\n                    var xKey = $$.getXKey(id), rawX = d[xKey],\n                        value = d[id] !== null && !isNaN(d[id]) ? +d[id] : null, x;\n                    // use x as categories if custom x and categorized\n                    if ($$.isCustomX() && $$.isCategorized() && index === 0 && !isUndefined(rawX)) {\n                        if (index === 0 && i === 0) {\n                            config.axis_x_categories = [];\n                        }\n                        x = config.axis_x_categories.indexOf(rawX);\n                        if (x === -1) {\n                            x = config.axis_x_categories.length;\n                            config.axis_x_categories.push(rawX);\n                        }\n                    } else {\n                        x  = $$.generateTargetX(rawX, id, i);\n                    }\n                    // mark as x = undefined if value is undefined and filter to remove after mapped\n                    if (isUndefined(d[id]) || $$.data.xs[id].length <= i) {\n                        x = undefined;\n                    }\n                    return {x: x, value: value, id: convertedId};\n                }).filter(function (v) { return isDefined(v.x); })\n            };\n        });\n\n        // finish targets\n        targets.forEach(function (t) {\n            var i;\n            // sort values by its x\n            if (config.data_xSort) {\n                t.values = t.values.sort(function (v1, v2) {\n                    var x1 = v1.x || v1.x === 0 ? v1.x : Infinity,\n                        x2 = v2.x || v2.x === 0 ? v2.x : Infinity;\n                    return x1 - x2;\n                });\n            }\n            // indexing each value\n            i = 0;\n            t.values.forEach(function (v) {\n                v.index = i++;\n            });\n            // this needs to be sorted because its index and value.index is identical\n            $$.data.xs[t.id].sort(function (v1, v2) {\n                return v1 - v2;\n            });\n        });\n\n        // cache information about values\n        $$.hasNegativeValue = $$.hasNegativeValueInTargets(targets);\n        $$.hasPositiveValue = $$.hasPositiveValueInTargets(targets);\n\n        // set target types\n        if (config.data_type) {\n            $$.setTargetType($$.mapToIds(targets).filter(function (id) { return ! (id in config.data_types); }), config.data_type);\n        }\n\n        // cache as original id keyed\n        targets.forEach(function (d) {\n            $$.addCache(d.id_org, d);\n        });\n\n        return targets;\n    };\n\n    c3_chart_internal_fn.load = function (targets, args) {\n        var $$ = this;\n        if (targets) {\n            // filter loading targets if needed\n            if (args.filter) {\n                targets = targets.filter(args.filter);\n            }\n            // set type if args.types || args.type specified\n            if (args.type || args.types) {\n                targets.forEach(function (t) {\n                    var type = args.types && args.types[t.id] ? args.types[t.id] : args.type;\n                    $$.setTargetType(t.id, type);\n                });\n            }\n            // Update/Add data\n            $$.data.targets.forEach(function (d) {\n                for (var i = 0; i < targets.length; i++) {\n                    if (d.id === targets[i].id) {\n                        d.values = targets[i].values;\n                        targets.splice(i, 1);\n                        break;\n                    }\n                }\n            });\n            $$.data.targets = $$.data.targets.concat(targets); // add remained\n        }\n\n        // Set targets\n        $$.updateTargets($$.data.targets);\n\n        // Redraw with new targets\n        $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});\n\n        if (args.done) { args.done(); }\n    };\n    c3_chart_internal_fn.loadFromArgs = function (args) {\n        var $$ = this;\n        if (args.data) {\n            $$.load($$.convertDataToTargets(args.data), args);\n        }\n        else if (args.url) {\n            $$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, function (data) {\n                $$.load($$.convertDataToTargets(data), args);\n            });\n        }\n        else if (args.json) {\n            $$.load($$.convertDataToTargets($$.convertJsonToData(args.json, args.keys)), args);\n        }\n        else if (args.rows) {\n            $$.load($$.convertDataToTargets($$.convertRowsToData(args.rows)), args);\n        }\n        else if (args.columns) {\n            $$.load($$.convertDataToTargets($$.convertColumnsToData(args.columns)), args);\n        }\n        else {\n            $$.load(null, args);\n        }\n    };\n    c3_chart_internal_fn.unload = function (targetIds, done) {\n        var $$ = this;\n        if (!done) {\n            done = function () {};\n        }\n        // filter existing target\n        targetIds = targetIds.filter(function (id) { return $$.hasTarget($$.data.targets, id); });\n        // If no target, call done and return\n        if (!targetIds || targetIds.length === 0) {\n            done();\n            return;\n        }\n        $$.svg.selectAll(targetIds.map(function (id) { return $$.selectorTarget(id); }))\n            .transition()\n            .style('opacity', 0)\n            .remove()\n            .call($$.endall, done);\n        targetIds.forEach(function (id) {\n            // Reset fadein for future load\n            $$.withoutFadeIn[id] = false;\n            // Remove target's elements\n            if ($$.legend) {\n                $$.legend.selectAll('.' + CLASS.legendItem + $$.getTargetSelectorSuffix(id)).remove();\n            }\n            // Remove target\n            $$.data.targets = $$.data.targets.filter(function (t) {\n                return t.id !== id;\n            });\n        });\n    };\n\n    c3_chart_internal_fn.categoryName = function (i) {\n        var config = this.config;\n        return i < config.axis_x_categories.length ? config.axis_x_categories[i] : i;\n    };\n\n    c3_chart_internal_fn.initEventRect = function () {\n        var $$ = this;\n        $$.main.select('.' + CLASS.chart).append(\"g\")\n            .attr(\"class\", CLASS.eventRects)\n            .style('fill-opacity', 0);\n    };\n    c3_chart_internal_fn.redrawEventRect = function () {\n        var $$ = this, config = $$.config,\n            eventRectUpdate, maxDataCountTarget,\n            isMultipleX = $$.isMultipleX();\n\n        // rects for mouseover\n        var eventRects = $$.main.select('.' + CLASS.eventRects)\n                .style('cursor', config.zoom_enabled ? config.axis_rotated ? 'ns-resize' : 'ew-resize' : null)\n                .classed(CLASS.eventRectsMultiple, isMultipleX)\n                .classed(CLASS.eventRectsSingle, !isMultipleX);\n\n        // clear old rects\n        eventRects.selectAll('.' + CLASS.eventRect).remove();\n\n        // open as public variable\n        $$.eventRect = eventRects.selectAll('.' + CLASS.eventRect);\n\n        if (isMultipleX) {\n            eventRectUpdate = $$.eventRect.data([0]);\n            // enter : only one rect will be added\n            $$.generateEventRectsForMultipleXs(eventRectUpdate.enter());\n            // update\n            $$.updateEventRect(eventRectUpdate);\n            // exit : not needed because always only one rect exists\n        }\n        else {\n            // Set data and update $$.eventRect\n            maxDataCountTarget = $$.getMaxDataCountTarget($$.data.targets);\n            eventRects.datum(maxDataCountTarget ? maxDataCountTarget.values : []);\n            $$.eventRect = eventRects.selectAll('.' + CLASS.eventRect);\n            eventRectUpdate = $$.eventRect.data(function (d) { return d; });\n            // enter\n            $$.generateEventRectsForSingleX(eventRectUpdate.enter());\n            // update\n            $$.updateEventRect(eventRectUpdate);\n            // exit\n            eventRectUpdate.exit().remove();\n        }\n    };\n    c3_chart_internal_fn.updateEventRect = function (eventRectUpdate) {\n        var $$ = this, config = $$.config,\n            x, y, w, h, rectW, rectX;\n\n        // set update selection if null\n        eventRectUpdate = eventRectUpdate || $$.eventRect.data(function (d) { return d; });\n\n        if ($$.isMultipleX()) {\n            // TODO: rotated not supported yet\n            x = 0;\n            y = 0;\n            w = $$.width;\n            h = $$.height;\n        }\n        else {\n            if (($$.isCustomX() || $$.isTimeSeries()) && !$$.isCategorized()) {\n\n                // update index for x that is used by prevX and nextX\n                $$.updateXs();\n\n                rectW = function (d) {\n                    var prevX = $$.getPrevX(d.index), nextX = $$.getNextX(d.index);\n\n                    // if there this is a single data point make the eventRect full width (or height)\n                    if (prevX === null && nextX === null) {\n                        return config.axis_rotated ? $$.height : $$.width;\n                    }\n\n                    if (prevX === null) { prevX = $$.x.domain()[0]; }\n                    if (nextX === null) { nextX = $$.x.domain()[1]; }\n\n                    return Math.max(0, ($$.x(nextX) - $$.x(prevX)) / 2);\n                };\n                rectX = function (d) {\n                    var prevX = $$.getPrevX(d.index), nextX = $$.getNextX(d.index),\n                        thisX = $$.data.xs[d.id][d.index];\n\n                    // if there this is a single data point position the eventRect at 0\n                    if (prevX === null && nextX === null) {\n                        return 0;\n                    }\n\n                    if (prevX === null) { prevX = $$.x.domain()[0]; }\n\n                    return ($$.x(thisX) + $$.x(prevX)) / 2;\n                };\n            } else {\n                rectW = $$.getEventRectWidth();\n                rectX = function (d) {\n                    return $$.x(d.x) - (rectW / 2);\n                };\n            }\n            x = config.axis_rotated ? 0 : rectX;\n            y = config.axis_rotated ? rectX : 0;\n            w = config.axis_rotated ? $$.width : rectW;\n            h = config.axis_rotated ? rectW : $$.height;\n        }\n\n        eventRectUpdate\n            .attr('class', $$.classEvent.bind($$))\n            .attr(\"x\", x)\n            .attr(\"y\", y)\n            .attr(\"width\", w)\n            .attr(\"height\", h);\n    };\n    c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {\n        var $$ = this, d3 = $$.d3, config = $$.config;\n        eventRectEnter.append(\"rect\")\n            .attr(\"class\", $$.classEvent.bind($$))\n            .style(\"cursor\", config.data_selection_enabled && config.data_selection_grouped ? \"pointer\" : null)\n            .on('mouseover', function (d) {\n                var index = d.index;\n\n                if ($$.dragging || $$.flowing) { return; } // do nothing while dragging/flowing\n                if ($$.hasArcType()) { return; }\n\n                // Expand shapes for selection\n                if (config.point_focus_expand_enabled) { $$.expandCircles(index, null, true); }\n                $$.expandBars(index, null, true);\n\n                // Call event handler\n                $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {\n                    config.data_onmouseover.call($$.api, d);\n                });\n            })\n            .on('mouseout', function (d) {\n                var index = d.index;\n                if (!$$.config) { return; } // chart is destroyed\n                if ($$.hasArcType()) { return; }\n                $$.hideXGridFocus();\n                $$.hideTooltip();\n                // Undo expanded shapes\n                $$.unexpandCircles();\n                $$.unexpandBars();\n                // Call event handler\n                $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {\n                    config.data_onmouseout.call($$.api, d);\n                });\n            })\n            .on('mousemove', function (d) {\n                var selectedData, index = d.index,\n                    eventRect = $$.svg.select('.' + CLASS.eventRect + '-' + index);\n\n                if ($$.dragging || $$.flowing) { return; } // do nothing while dragging/flowing\n                if ($$.hasArcType()) { return; }\n\n                if ($$.isStepType(d) && $$.config.line_step_type === 'step-after' && d3.mouse(this)[0] < $$.x($$.getXValue(d.id, index))) {\n                    index -= 1;\n                }\n\n                // Show tooltip\n                selectedData = $$.filterTargetsToShow($$.data.targets).map(function (t) {\n                    return $$.addName($$.getValueOnIndex(t.values, index));\n                });\n\n                if (config.tooltip_grouped) {\n                    $$.showTooltip(selectedData, this);\n                    $$.showXGridFocus(selectedData);\n                }\n\n                if (config.tooltip_grouped && (!config.data_selection_enabled || config.data_selection_grouped)) {\n                    return;\n                }\n\n                $$.main.selectAll('.' + CLASS.shape + '-' + index)\n                    .each(function () {\n                        d3.select(this).classed(CLASS.EXPANDED, true);\n                        if (config.data_selection_enabled) {\n                            eventRect.style('cursor', config.data_selection_grouped ? 'pointer' : null);\n                        }\n                        if (!config.tooltip_grouped) {\n                            $$.hideXGridFocus();\n                            $$.hideTooltip();\n                            if (!config.data_selection_grouped) {\n                                $$.unexpandCircles(index);\n                                $$.unexpandBars(index);\n                            }\n                        }\n                    })\n                    .filter(function (d) {\n                        return $$.isWithinShape(this, d);\n                    })\n                    .each(function (d) {\n                        if (config.data_selection_enabled && (config.data_selection_grouped || config.data_selection_isselectable(d))) {\n                            eventRect.style('cursor', 'pointer');\n                        }\n                        if (!config.tooltip_grouped) {\n                            $$.showTooltip([d], this);\n                            $$.showXGridFocus([d]);\n                            if (config.point_focus_expand_enabled) { $$.expandCircles(index, d.id, true); }\n                            $$.expandBars(index, d.id, true);\n                        }\n                    });\n            })\n            .on('click', function (d) {\n                var index = d.index;\n                if ($$.hasArcType() || !$$.toggleShape) { return; }\n                if ($$.cancelClick) {\n                    $$.cancelClick = false;\n                    return;\n                }\n                if ($$.isStepType(d) && config.line_step_type === 'step-after' && d3.mouse(this)[0] < $$.x($$.getXValue(d.id, index))) {\n                    index -= 1;\n                }\n                $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {\n                    if (config.data_selection_grouped || $$.isWithinShape(this, d)) {\n                        $$.toggleShape(this, d, index);\n                        $$.config.data_onclick.call($$.api, d, this);\n                    }\n                });\n            })\n            .call(\n                config.data_selection_draggable && $$.drag ? (\n                    d3.behavior.drag().origin(Object)\n                        .on('drag', function () { $$.drag(d3.mouse(this)); })\n                        .on('dragstart', function () { $$.dragstart(d3.mouse(this)); })\n                        .on('dragend', function () { $$.dragend(); })\n                ) : function () {}\n            );\n    };\n\n    c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter) {\n        var $$ = this, d3 = $$.d3, config = $$.config;\n\n        function mouseout() {\n            $$.svg.select('.' + CLASS.eventRect).style('cursor', null);\n            $$.hideXGridFocus();\n            $$.hideTooltip();\n            $$.unexpandCircles();\n            $$.unexpandBars();\n        }\n\n        eventRectEnter.append('rect')\n            .attr('x', 0)\n            .attr('y', 0)\n            .attr('width', $$.width)\n            .attr('height', $$.height)\n            .attr('class', CLASS.eventRect)\n            .on('mouseout', function () {\n                if (!$$.config) { return; } // chart is destroyed\n                if ($$.hasArcType()) { return; }\n                mouseout();\n            })\n            .on('mousemove', function () {\n                var targetsToShow = $$.filterTargetsToShow($$.data.targets);\n                var mouse, closest, sameXData, selectedData;\n\n                if ($$.dragging) { return; } // do nothing when dragging\n                if ($$.hasArcType(targetsToShow)) { return; }\n\n                mouse = d3.mouse(this);\n                closest = $$.findClosestFromTargets(targetsToShow, mouse);\n\n                if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) {\n                    config.data_onmouseout.call($$.api, $$.mouseover);\n                    $$.mouseover = undefined;\n                }\n\n                if (! closest) {\n                    mouseout();\n                    return;\n                }\n\n                if ($$.isScatterType(closest) || !config.tooltip_grouped) {\n                    sameXData = [closest];\n                } else {\n                    sameXData = $$.filterByX(targetsToShow, closest.x);\n                }\n\n                // show tooltip when cursor is close to some point\n                selectedData = sameXData.map(function (d) {\n                    return $$.addName(d);\n                });\n                $$.showTooltip(selectedData, this);\n\n                // expand points\n                if (config.point_focus_expand_enabled) {\n                    $$.expandCircles(closest.index, closest.id, true);\n                }\n                $$.expandBars(closest.index, closest.id, true);\n\n                // Show xgrid focus line\n                $$.showXGridFocus(selectedData);\n\n                // Show cursor as pointer if point is close to mouse position\n                if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {\n                    $$.svg.select('.' + CLASS.eventRect).style('cursor', 'pointer');\n                    if (!$$.mouseover) {\n                        config.data_onmouseover.call($$.api, closest);\n                        $$.mouseover = closest;\n                    }\n                }\n            })\n            .on('click', function () {\n                var targetsToShow = $$.filterTargetsToShow($$.data.targets);\n                var mouse, closest;\n                if ($$.hasArcType(targetsToShow)) { return; }\n\n                mouse = d3.mouse(this);\n                closest = $$.findClosestFromTargets(targetsToShow, mouse);\n                if (! closest) { return; }\n                // select if selection enabled\n                if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {\n                    $$.main.selectAll('.' + CLASS.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll('.' + CLASS.shape + '-' + closest.index).each(function () {\n                        if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {\n                            $$.toggleShape(this, closest, closest.index);\n                            $$.config.data_onclick.call($$.api, closest, this);\n                        }\n                    });\n                }\n            })\n            .call(\n                config.data_selection_draggable && $$.drag ? (\n                    d3.behavior.drag().origin(Object)\n                        .on('drag', function () { $$.drag(d3.mouse(this)); })\n                        .on('dragstart', function () { $$.dragstart(d3.mouse(this)); })\n                        .on('dragend', function () { $$.dragend(); })\n                ) : function () {}\n            );\n    };\n    c3_chart_internal_fn.dispatchEvent = function (type, index, mouse) {\n        var $$ = this,\n            selector = '.' + CLASS.eventRect + (!$$.isMultipleX() ? '-' + index : ''),\n            eventRect = $$.main.select(selector).node(),\n            box = eventRect.getBoundingClientRect(),\n            x = box.left + (mouse ? mouse[0] : 0),\n            y = box.top + (mouse ? mouse[1] : 0),\n            event = document.createEvent(\"MouseEvents\");\n\n        event.initMouseEvent(type, true, true, window, 0, x, y, x, y,\n                             false, false, false, false, 0, null);\n        eventRect.dispatchEvent(event);\n    };\n\n    c3_chart_internal_fn.getCurrentWidth = function () {\n        var $$ = this, config = $$.config;\n        return config.size_width ? config.size_width : $$.getParentWidth();\n    };\n    c3_chart_internal_fn.getCurrentHeight = function () {\n        var $$ = this, config = $$.config,\n            h = config.size_height ? config.size_height : $$.getParentHeight();\n        return h > 0 ? h : 320 / ($$.hasType('gauge') && !config.gauge_fullCircle ? 2 : 1); \n    };\n    c3_chart_internal_fn.getCurrentPaddingTop = function () {\n        var $$ = this,\n            config = $$.config,\n            padding = isValue(config.padding_top) ? config.padding_top : 0;\n        if ($$.title && $$.title.node()) {\n            padding += $$.getTitlePadding();\n        }\n        return padding;\n    };\n    c3_chart_internal_fn.getCurrentPaddingBottom = function () {\n        var config = this.config;\n        return isValue(config.padding_bottom) ? config.padding_bottom : 0;\n    };\n    c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {\n        var $$ = this, config = $$.config;\n        if (isValue(config.padding_left)) {\n            return config.padding_left;\n        } else if (config.axis_rotated) {\n            return !config.axis_x_show ? 1 : Math.max(ceil10($$.getAxisWidthByAxisId('x', withoutRecompute)), 40);\n        } else if (!config.axis_y_show || config.axis_y_inner) { // && !config.axis_rotated\n            return $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1;\n        } else {\n            return ceil10($$.getAxisWidthByAxisId('y', withoutRecompute));\n        }\n    };\n    c3_chart_internal_fn.getCurrentPaddingRight = function () {\n        var $$ = this, config = $$.config,\n            defaultPadding = 10, legendWidthOnRight = $$.isLegendRight ? $$.getLegendWidth() + 20 : 0;\n        if (isValue(config.padding_right)) {\n            return config.padding_right + 1; // 1 is needed not to hide tick line\n        } else if (config.axis_rotated) {\n            return defaultPadding + legendWidthOnRight;\n        } else if (!config.axis_y2_show || config.axis_y2_inner) { // && !config.axis_rotated\n            return 2 + legendWidthOnRight + ($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0);\n        } else {\n            return ceil10($$.getAxisWidthByAxisId('y2')) + legendWidthOnRight;\n        }\n    };\n\n    c3_chart_internal_fn.getParentRectValue = function (key) {\n        var parent = this.selectChart.node(), v;\n        while (parent && parent.tagName !== 'BODY') {\n            try {\n                v = parent.getBoundingClientRect()[key];\n            } catch(e) {\n                if (key === 'width') {\n                    // In IE in certain cases getBoundingClientRect\n                    // will cause an \"unspecified error\"\n                    v = parent.offsetWidth;\n                }\n            }\n            if (v) {\n                break;\n            }\n            parent = parent.parentNode;\n        }\n        return v;\n    };\n    c3_chart_internal_fn.getParentWidth = function () {\n        return this.getParentRectValue('width');\n    };\n    c3_chart_internal_fn.getParentHeight = function () {\n        var h = this.selectChart.style('height');\n        return h.indexOf('px') > 0 ? +h.replace('px', '') : 0;\n    };\n\n\n    c3_chart_internal_fn.getSvgLeft = function (withoutRecompute) {\n        var $$ = this, config = $$.config,\n            hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner),\n            leftAxisClass = config.axis_rotated ? CLASS.axisX : CLASS.axisY,\n            leftAxis = $$.main.select('.' + leftAxisClass).node(),\n            svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {right: 0},\n            chartRect = $$.selectChart.node().getBoundingClientRect(),\n            hasArc = $$.hasArcType(),\n            svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute));\n        return svgLeft > 0 ? svgLeft : 0;\n    };\n\n\n    c3_chart_internal_fn.getAxisWidthByAxisId = function (id, withoutRecompute) {\n        var $$ = this, position = $$.axis.getLabelPositionById(id);\n        return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40);\n    };\n    c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) {\n        var $$ = this, config = $$.config, h = 30;\n        if (axisId === 'x' && !config.axis_x_show) { return 8; }\n        if (axisId === 'x' && config.axis_x_height) { return config.axis_x_height; }\n        if (axisId === 'y' && !config.axis_y_show) { \n            return config.legend_show && !$$.isLegendRight && !$$.isLegendInset ? 10 : 1; \n        }\n        if (axisId === 'y2' && !config.axis_y2_show) { return $$.rotated_padding_top; }\n        // Calculate x axis height when tick rotated\n        if (axisId === 'x' && !config.axis_rotated && config.axis_x_tick_rotate) {\n            h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180);\n        }\n        // Calculate y axis height when tick rotated\n        if (axisId === 'y' && config.axis_rotated && config.axis_y_tick_rotate) {\n            h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180);\n        }\n        return h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === 'y2' ? -10 : 0);\n    };\n\n    c3_chart_internal_fn.getEventRectWidth = function () {\n        return Math.max(0, this.xAxis.tickInterval());\n    };\n\n    c3_chart_internal_fn.getShapeIndices = function (typeFilter) {\n        var $$ = this, config = $$.config,\n            indices = {}, i = 0, j, k;\n        $$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(function (d) {\n            for (j = 0; j < config.data_groups.length; j++) {\n                if (config.data_groups[j].indexOf(d.id) < 0) { continue; }\n                for (k = 0; k < config.data_groups[j].length; k++) {\n                    if (config.data_groups[j][k] in indices) {\n                        indices[d.id] = indices[config.data_groups[j][k]];\n                        break;\n                    }\n                }\n            }\n            if (isUndefined(indices[d.id])) { indices[d.id] = i++; }\n        });\n        indices.__max__ = i - 1;\n        return indices;\n    };\n    c3_chart_internal_fn.getShapeX = function (offset, targetsNum, indices, isSub) {\n        var $$ = this, scale = isSub ? $$.subX : $$.x;\n        return function (d) {\n            var index = d.id in indices ? indices[d.id] : 0;\n            return d.x || d.x === 0 ? scale(d.x) - offset * (targetsNum / 2 - index) : 0;\n        };\n    };\n    c3_chart_internal_fn.getShapeY = function (isSub) {\n        var $$ = this;\n        return function (d) {\n            var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id);\n            return scale(d.value);\n        };\n    };\n    c3_chart_internal_fn.getShapeOffset = function (typeFilter, indices, isSub) {\n        var $$ = this,\n            targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))),\n            targetIds = targets.map(function (t) { return t.id; });\n        return function (d, i) {\n            var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id),\n                y0 = scale(0), offset = y0;\n            targets.forEach(function (t) {\n                var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;\n                if (t.id === d.id || indices[t.id] !== indices[d.id]) { return; }\n                if (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) {\n                    // check if the x values line up\n                    if (typeof values[i] === 'undefined' || +values[i].x !== +d.x) {  // \"+\" for timeseries\n                        // if not, try to find the value that does line up\n                        i = -1;\n                        values.forEach(function (v, j) {\n                            if (v.x === d.x) {\n                                i = j;\n                            }\n                        });\n                    }\n                    if (i in values && values[i].value * d.value >= 0) {\n                        offset += scale(values[i].value) - y0;\n                    }\n                }\n            });\n            return offset;\n        };\n    };\n    c3_chart_internal_fn.isWithinShape = function (that, d) {\n        var $$ = this,\n            shape = $$.d3.select(that), isWithin;\n        if (!$$.isTargetToShow(d.id)) {\n            isWithin = false;\n        }\n        else if (that.nodeName === 'circle') {\n            isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScale(d.id)(d.value)) : $$.isWithinCircle(that, $$.pointSelectR(d) * 1.5);\n        }\n        else if (that.nodeName === 'path') {\n            isWithin = shape.classed(CLASS.bar) ? $$.isWithinBar(that) : true;\n        }\n        return isWithin;\n    };\n\n\n    c3_chart_internal_fn.getInterpolate = function (d) {\n        var $$ = this,\n            interpolation = $$.isInterpolationType($$.config.spline_interpolation_type) ? $$.config.spline_interpolation_type : 'cardinal';\n        return $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? $$.config.line_step_type : \"linear\";\n    };\n\n    c3_chart_internal_fn.initLine = function () {\n        var $$ = this;\n        $$.main.select('.' + CLASS.chart).append(\"g\")\n            .attr(\"class\", CLASS.chartLines);\n    };\n    c3_chart_internal_fn.updateTargetsForLine = function (targets) {\n        var $$ = this, config = $$.config,\n            mainLineUpdate, mainLineEnter,\n            classChartLine = $$.classChartLine.bind($$),\n            classLines = $$.classLines.bind($$),\n            classAreas = $$.classAreas.bind($$),\n            classCircles = $$.classCircles.bind($$),\n            classFocus = $$.classFocus.bind($$);\n        mainLineUpdate = $$.main.select('.' + CLASS.chartLines).selectAll('.' + CLASS.chartLine)\n            .data(targets)\n            .attr('class', function (d) { return classChartLine(d) + classFocus(d); });\n        mainLineEnter = mainLineUpdate.enter().append('g')\n            .attr('class', classChartLine)\n            .style('opacity', 0)\n            .style(\"pointer-events\", \"none\");\n        // Lines for each data\n        mainLineEnter.append('g')\n            .attr(\"class\", classLines);\n        // Areas\n        mainLineEnter.append('g')\n            .attr('class', classAreas);\n        // Circles for each data point on lines\n        mainLineEnter.append('g')\n            .attr(\"class\", function (d) { return $$.generateClass(CLASS.selectedCircles, d.id); });\n        mainLineEnter.append('g')\n            .attr(\"class\", classCircles)\n            .style(\"cursor\", function (d) { return config.data_selection_isselectable(d) ? \"pointer\" : null; });\n        // Update date for selected circles\n        targets.forEach(function (t) {\n            $$.main.selectAll('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll('.' + CLASS.selectedCircle).each(function (d) {\n                d.value = t.values[d.index].value;\n            });\n        });\n        // MEMO: can not keep same color...\n        //mainLineUpdate.exit().remove();\n    };\n    c3_chart_internal_fn.updateLine = function (durationForExit) {\n        var $$ = this;\n        $$.mainLine = $$.main.selectAll('.' + CLASS.lines).selectAll('.' + CLASS.line)\n            .data($$.lineData.bind($$));\n        $$.mainLine.enter().append('path')\n            .attr('class', $$.classLine.bind($$))\n            .style(\"stroke\", $$.color);\n        $$.mainLine\n            .style(\"opacity\", $$.initialOpacity.bind($$))\n            .style('shape-rendering', function (d) { return $$.isStepType(d) ? 'crispEdges' : ''; })\n            .attr('transform', null);\n        $$.mainLine.exit().transition().duration(durationForExit)\n            .style('opacity', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawLine = function (drawLine, withTransition) {\n        return [\n            (withTransition ? this.mainLine.transition(Math.random().toString()) : this.mainLine)\n                .attr(\"d\", drawLine)\n                .style(\"stroke\", this.color)\n                .style(\"opacity\", 1)\n        ];\n    };\n    c3_chart_internal_fn.generateDrawLine = function (lineIndices, isSub) {\n        var $$ = this, config = $$.config,\n            line = $$.d3.svg.line(),\n            getPoints = $$.generateGetLinePoints(lineIndices, isSub),\n            yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,\n            xValue = function (d) { return (isSub ? $$.subxx : $$.xx).call($$, d); },\n            yValue = function (d, i) {\n                return config.data_groups.length > 0 ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)(d.value);\n            };\n\n        line = config.axis_rotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue);\n        if (!config.line_connectNull) { line = line.defined(function (d) { return d.value != null; }); }\n        return function (d) {\n            var values = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values,\n                x = isSub ? $$.x : $$.subX, y = yScaleGetter.call($$, d.id), x0 = 0, y0 = 0, path;\n            if ($$.isLineType(d)) {\n                if (config.data_regions[d.id]) {\n                    path = $$.lineWithRegions(values, x, y, config.data_regions[d.id]);\n                } else {\n                    if ($$.isStepType(d)) { values = $$.convertValuesToStep(values); }\n                    path = line.interpolate($$.getInterpolate(d))(values);\n                }\n            } else {\n                if (values[0]) {\n                    x0 = x(values[0].x);\n                    y0 = y(values[0].value);\n                }\n                path = config.axis_rotated ? \"M \" + y0 + \" \" + x0 : \"M \" + x0 + \" \" + y0;\n            }\n            return path ? path : \"M 0 0\";\n        };\n    };\n    c3_chart_internal_fn.generateGetLinePoints = function (lineIndices, isSub) { // partial duplication of generateGetBarPoints\n        var $$ = this, config = $$.config,\n            lineTargetsNum = lineIndices.__max__ + 1,\n            x = $$.getShapeX(0, lineTargetsNum, lineIndices, !!isSub),\n            y = $$.getShapeY(!!isSub),\n            lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, !!isSub),\n            yScale = isSub ? $$.getSubYScale : $$.getYScale;\n        return function (d, i) {\n            var y0 = yScale.call($$, d.id)(0),\n                offset = lineOffset(d, i) || y0, // offset is for stacked area chart\n                posX = x(d), posY = y(d);\n            // fix posY not to overflow opposite quadrant\n            if (config.axis_rotated) {\n                if ((0 < d.value && posY < y0) || (d.value < 0 && y0 < posY)) { posY = y0; }\n            }\n            // 1 point that marks the line position\n            return [\n                [posX, posY - (y0 - offset)],\n                [posX, posY - (y0 - offset)], // needed for compatibility\n                [posX, posY - (y0 - offset)], // needed for compatibility\n                [posX, posY - (y0 - offset)]  // needed for compatibility\n            ];\n        };\n    };\n\n\n    c3_chart_internal_fn.lineWithRegions = function (d, x, y, _regions) {\n        var $$ = this, config = $$.config,\n            prev = -1, i, j,\n            s = \"M\", sWithRegion,\n            xp, yp, dx, dy, dd, diff, diffx2,\n            xOffset = $$.isCategorized() ? 0.5 : 0,\n            xValue, yValue,\n            regions = [];\n\n        function isWithinRegions(x, regions) {\n            var i;\n            for (i = 0; i < regions.length; i++) {\n                if (regions[i].start < x && x <= regions[i].end) { return true; }\n            }\n            return false;\n        }\n\n        // Check start/end of regions\n        if (isDefined(_regions)) {\n            for (i = 0; i < _regions.length; i++) {\n                regions[i] = {};\n                if (isUndefined(_regions[i].start)) {\n                    regions[i].start = d[0].x;\n                } else {\n                    regions[i].start = $$.isTimeSeries() ? $$.parseDate(_regions[i].start) : _regions[i].start;\n                }\n                if (isUndefined(_regions[i].end)) {\n                    regions[i].end = d[d.length - 1].x;\n                } else {\n                    regions[i].end = $$.isTimeSeries() ? $$.parseDate(_regions[i].end) : _regions[i].end;\n                }\n            }\n        }\n\n        // Set scales\n        xValue = config.axis_rotated ? function (d) { return y(d.value); } : function (d) { return x(d.x); };\n        yValue = config.axis_rotated ? function (d) { return x(d.x); } : function (d) { return y(d.value); };\n\n        // Define svg generator function for region\n        function generateM(points) {\n            return 'M' + points[0][0] + ' ' + points[0][1] + ' ' + points[1][0] + ' ' + points[1][1];\n        }\n        if ($$.isTimeSeries()) {\n            sWithRegion = function (d0, d1, j, diff) {\n                var x0 = d0.x.getTime(), x_diff = d1.x - d0.x,\n                    xv0 = new Date(x0 + x_diff * j),\n                    xv1 = new Date(x0 + x_diff * (j + diff)),\n                    points;\n                if (config.axis_rotated) {\n                    points = [[y(yp(j)), x(xv0)], [y(yp(j + diff)), x(xv1)]];\n                } else {\n                    points = [[x(xv0), y(yp(j))], [x(xv1), y(yp(j + diff))]];\n                }\n                return generateM(points);\n            };\n        } else {\n            sWithRegion = function (d0, d1, j, diff) {\n                var points;\n                if (config.axis_rotated) {\n                    points = [[y(yp(j), true), x(xp(j))], [y(yp(j + diff), true), x(xp(j + diff))]];\n                } else {\n                    points = [[x(xp(j), true), y(yp(j))], [x(xp(j + diff), true), y(yp(j + diff))]];\n                }\n                return generateM(points);\n            };\n        }\n\n        // Generate\n        for (i = 0; i < d.length; i++) {\n\n            // Draw as normal\n            if (isUndefined(regions) || ! isWithinRegions(d[i].x, regions)) {\n                s += \" \" + xValue(d[i]) + \" \" + yValue(d[i]);\n            }\n            // Draw with region // TODO: Fix for horizotal charts\n            else {\n                xp = $$.getScale(d[i - 1].x + xOffset, d[i].x + xOffset, $$.isTimeSeries());\n                yp = $$.getScale(d[i - 1].value, d[i].value);\n\n                dx = x(d[i].x) - x(d[i - 1].x);\n                dy = y(d[i].value) - y(d[i - 1].value);\n                dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n                diff = 2 / dd;\n                diffx2 = diff * 2;\n\n                for (j = diff; j <= 1; j += diffx2) {\n                    s += sWithRegion(d[i - 1], d[i], j, diff);\n                }\n            }\n            prev = d[i].x;\n        }\n\n        return s;\n    };\n\n\n    c3_chart_internal_fn.updateArea = function (durationForExit) {\n        var $$ = this, d3 = $$.d3;\n        $$.mainArea = $$.main.selectAll('.' + CLASS.areas).selectAll('.' + CLASS.area)\n            .data($$.lineData.bind($$));\n        $$.mainArea.enter().append('path')\n            .attr(\"class\", $$.classArea.bind($$))\n            .style(\"fill\", $$.color)\n            .style(\"opacity\", function () { $$.orgAreaOpacity = +d3.select(this).style('opacity'); return 0; });\n        $$.mainArea\n            .style(\"opacity\", $$.orgAreaOpacity);\n        $$.mainArea.exit().transition().duration(durationForExit)\n            .style('opacity', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawArea = function (drawArea, withTransition) {\n        return [\n            (withTransition ? this.mainArea.transition(Math.random().toString()) : this.mainArea)\n                .attr(\"d\", drawArea)\n                .style(\"fill\", this.color)\n                .style(\"opacity\", this.orgAreaOpacity)\n        ];\n    };\n    c3_chart_internal_fn.generateDrawArea = function (areaIndices, isSub) {\n        var $$ = this, config = $$.config, area = $$.d3.svg.area(),\n            getPoints = $$.generateGetAreaPoints(areaIndices, isSub),\n            yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,\n            xValue = function (d) { return (isSub ? $$.subxx : $$.xx).call($$, d); },\n            value0 = function (d, i) {\n                return config.data_groups.length > 0 ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.getAreaBaseValue(d.id));\n            },\n            value1 = function (d, i) {\n                return config.data_groups.length > 0 ? getPoints(d, i)[1][1] : yScaleGetter.call($$, d.id)(d.value);\n            };\n\n        area = config.axis_rotated ? area.x0(value0).x1(value1).y(xValue) : area.x(xValue).y0(config.area_above ? 0 : value0).y1(value1);\n        if (!config.line_connectNull) {\n            area = area.defined(function (d) { return d.value !== null; });\n        }\n\n        return function (d) {\n            var values = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values,\n                x0 = 0, y0 = 0, path;\n            if ($$.isAreaType(d)) {\n                if ($$.isStepType(d)) { values = $$.convertValuesToStep(values); }\n                path = area.interpolate($$.getInterpolate(d))(values);\n            } else {\n                if (values[0]) {\n                    x0 = $$.x(values[0].x);\n                    y0 = $$.getYScale(d.id)(values[0].value);\n                }\n                path = config.axis_rotated ? \"M \" + y0 + \" \" + x0 : \"M \" + x0 + \" \" + y0;\n            }\n            return path ? path : \"M 0 0\";\n        };\n    };\n    c3_chart_internal_fn.getAreaBaseValue = function () {\n        return 0;\n    };\n    c3_chart_internal_fn.generateGetAreaPoints = function (areaIndices, isSub) { // partial duplication of generateGetBarPoints\n        var $$ = this, config = $$.config,\n            areaTargetsNum = areaIndices.__max__ + 1,\n            x = $$.getShapeX(0, areaTargetsNum, areaIndices, !!isSub),\n            y = $$.getShapeY(!!isSub),\n            areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub),\n            yScale = isSub ? $$.getSubYScale : $$.getYScale;\n        return function (d, i) {\n            var y0 = yScale.call($$, d.id)(0),\n                offset = areaOffset(d, i) || y0, // offset is for stacked area chart\n                posX = x(d), posY = y(d);\n            // fix posY not to overflow opposite quadrant\n            if (config.axis_rotated) {\n                if ((0 < d.value && posY < y0) || (d.value < 0 && y0 < posY)) { posY = y0; }\n            }\n            // 1 point that marks the area position\n            return [\n                [posX, offset],\n                [posX, posY - (y0 - offset)],\n                [posX, posY - (y0 - offset)], // needed for compatibility\n                [posX, offset] // needed for compatibility\n            ];\n        };\n    };\n\n\n    c3_chart_internal_fn.updateCircle = function () {\n        var $$ = this;\n        $$.mainCircle = $$.main.selectAll('.' + CLASS.circles).selectAll('.' + CLASS.circle)\n            .data($$.lineOrScatterData.bind($$));\n        $$.mainCircle.enter().append(\"circle\")\n            .attr(\"class\", $$.classCircle.bind($$))\n            .attr(\"r\", $$.pointR.bind($$))\n            .style(\"fill\", $$.color);\n        $$.mainCircle\n            .style(\"opacity\", $$.initialOpacityForCircle.bind($$));\n        $$.mainCircle.exit().remove();\n    };\n    c3_chart_internal_fn.redrawCircle = function (cx, cy, withTransition) {\n        var selectedCircles = this.main.selectAll('.' + CLASS.selectedCircle);\n        return [\n            (withTransition ? this.mainCircle.transition(Math.random().toString()) : this.mainCircle)\n                .style('opacity', this.opacityForCircle.bind(this))\n                .style(\"fill\", this.color)\n                .attr(\"cx\", cx)\n                .attr(\"cy\", cy),\n            (withTransition ? selectedCircles.transition(Math.random().toString()) : selectedCircles)\n                .attr(\"cx\", cx)\n                .attr(\"cy\", cy)\n        ];\n    };\n    c3_chart_internal_fn.circleX = function (d) {\n        return d.x || d.x === 0 ? this.x(d.x) : null;\n    };\n    c3_chart_internal_fn.updateCircleY = function () {\n        var $$ = this, lineIndices, getPoints;\n        if ($$.config.data_groups.length > 0) {\n            lineIndices = $$.getShapeIndices($$.isLineType),\n            getPoints = $$.generateGetLinePoints(lineIndices);\n            $$.circleY = function (d, i) {\n                return getPoints(d, i)[0][1];\n            };\n        } else {\n            $$.circleY = function (d) {\n                return $$.getYScale(d.id)(d.value);\n            };\n        }\n    };\n    c3_chart_internal_fn.getCircles = function (i, id) {\n        var $$ = this;\n        return (id ? $$.main.selectAll('.' + CLASS.circles + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll('.' + CLASS.circle + (isValue(i) ? '-' + i : ''));\n    };\n    c3_chart_internal_fn.expandCircles = function (i, id, reset) {\n        var $$ = this,\n            r = $$.pointExpandedR.bind($$);\n        if (reset) { $$.unexpandCircles(); }\n        $$.getCircles(i, id)\n            .classed(CLASS.EXPANDED, true)\n            .attr('r', r);\n    };\n    c3_chart_internal_fn.unexpandCircles = function (i) {\n        var $$ = this,\n            r = $$.pointR.bind($$);\n        $$.getCircles(i)\n            .filter(function () { return $$.d3.select(this).classed(CLASS.EXPANDED); })\n            .classed(CLASS.EXPANDED, false)\n            .attr('r', r);\n    };\n    c3_chart_internal_fn.pointR = function (d) {\n        var $$ = this, config = $$.config;\n        return $$.isStepType(d) ? 0 : (isFunction(config.point_r) ? config.point_r(d) : config.point_r);\n    };\n    c3_chart_internal_fn.pointExpandedR = function (d) {\n        var $$ = this, config = $$.config;\n        return config.point_focus_expand_enabled ? (config.point_focus_expand_r ? config.point_focus_expand_r : $$.pointR(d) * 1.75) : $$.pointR(d);\n    };\n    c3_chart_internal_fn.pointSelectR = function (d) {\n        var $$ = this, config = $$.config;\n        return isFunction(config.point_select_r) ? config.point_select_r(d) : ((config.point_select_r) ? config.point_select_r : $$.pointR(d) * 4);\n    };\n    c3_chart_internal_fn.isWithinCircle = function (that, r) {\n        var d3 = this.d3,\n            mouse = d3.mouse(that), d3_this = d3.select(that),\n            cx = +d3_this.attr(\"cx\"), cy = +d3_this.attr(\"cy\");\n        return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < r;\n    };\n    c3_chart_internal_fn.isWithinStep = function (that, y) {\n        return Math.abs(y - this.d3.mouse(that)[1]) < 30;\n    };\n\n    c3_chart_internal_fn.initBar = function () {\n        var $$ = this;\n        $$.main.select('.' + CLASS.chart).append(\"g\")\n            .attr(\"class\", CLASS.chartBars);\n    };\n    c3_chart_internal_fn.updateTargetsForBar = function (targets) {\n        var $$ = this, config = $$.config,\n            mainBarUpdate, mainBarEnter,\n            classChartBar = $$.classChartBar.bind($$),\n            classBars = $$.classBars.bind($$),\n            classFocus = $$.classFocus.bind($$);\n        mainBarUpdate = $$.main.select('.' + CLASS.chartBars).selectAll('.' + CLASS.chartBar)\n            .data(targets)\n            .attr('class', function (d) { return classChartBar(d) + classFocus(d); });\n        mainBarEnter = mainBarUpdate.enter().append('g')\n            .attr('class', classChartBar)\n            .style('opacity', 0)\n            .style(\"pointer-events\", \"none\");\n        // Bars for each data\n        mainBarEnter.append('g')\n            .attr(\"class\", classBars)\n            .style(\"cursor\", function (d) { return config.data_selection_isselectable(d) ? \"pointer\" : null; });\n\n    };\n    c3_chart_internal_fn.updateBar = function (durationForExit) {\n        var $$ = this,\n            barData = $$.barData.bind($$),\n            classBar = $$.classBar.bind($$),\n            initialOpacity = $$.initialOpacity.bind($$),\n            color = function (d) { return $$.color(d.id); };\n        $$.mainBar = $$.main.selectAll('.' + CLASS.bars).selectAll('.' + CLASS.bar)\n            .data(barData);\n        $$.mainBar.enter().append('path')\n            .attr(\"class\", classBar)\n            .style(\"stroke\", color)\n            .style(\"fill\", color);\n        $$.mainBar\n            .style(\"opacity\", initialOpacity);\n        $$.mainBar.exit().transition().duration(durationForExit)\n            .style('opacity', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawBar = function (drawBar, withTransition) {\n        return [\n            (withTransition ? this.mainBar.transition(Math.random().toString()) : this.mainBar)\n                .attr('d', drawBar)\n                .style(\"fill\", this.color)\n                .style(\"opacity\", 1)\n        ];\n    };\n    c3_chart_internal_fn.getBarW = function (axis, barTargetsNum) {\n        var $$ = this, config = $$.config,\n            w = typeof config.bar_width === 'number' ? config.bar_width : barTargetsNum ? (axis.tickInterval() * config.bar_width_ratio) / barTargetsNum : 0;\n        return config.bar_width_max && w > config.bar_width_max ? config.bar_width_max : w;\n    };\n    c3_chart_internal_fn.getBars = function (i, id) {\n        var $$ = this;\n        return (id ? $$.main.selectAll('.' + CLASS.bars + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll('.' + CLASS.bar + (isValue(i) ? '-' + i : ''));\n    };\n    c3_chart_internal_fn.expandBars = function (i, id, reset) {\n        var $$ = this;\n        if (reset) { $$.unexpandBars(); }\n        $$.getBars(i, id).classed(CLASS.EXPANDED, true);\n    };\n    c3_chart_internal_fn.unexpandBars = function (i) {\n        var $$ = this;\n        $$.getBars(i).classed(CLASS.EXPANDED, false);\n    };\n    c3_chart_internal_fn.generateDrawBar = function (barIndices, isSub) {\n        var $$ = this, config = $$.config,\n            getPoints = $$.generateGetBarPoints(barIndices, isSub);\n        return function (d, i) {\n            // 4 points that make a bar\n            var points = getPoints(d, i);\n\n            // switch points if axis is rotated, not applicable for sub chart\n            var indexX = config.axis_rotated ? 1 : 0;\n            var indexY = config.axis_rotated ? 0 : 1;\n\n            var path = 'M ' + points[0][indexX] + ',' + points[0][indexY] + ' ' +\n                    'L' + points[1][indexX] + ',' + points[1][indexY] + ' ' +\n                    'L' + points[2][indexX] + ',' + points[2][indexY] + ' ' +\n                    'L' + points[3][indexX] + ',' + points[3][indexY] + ' ' +\n                    'z';\n\n            return path;\n        };\n    };\n    c3_chart_internal_fn.generateGetBarPoints = function (barIndices, isSub) {\n        var $$ = this,\n            axis = isSub ? $$.subXAxis : $$.xAxis,\n            barTargetsNum = barIndices.__max__ + 1,\n            barW = $$.getBarW(axis, barTargetsNum),\n            barX = $$.getShapeX(barW, barTargetsNum, barIndices, !!isSub),\n            barY = $$.getShapeY(!!isSub),\n            barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub),\n            yScale = isSub ? $$.getSubYScale : $$.getYScale;\n        return function (d, i) {\n            var y0 = yScale.call($$, d.id)(0),\n                offset = barOffset(d, i) || y0, // offset is for stacked bar chart\n                posX = barX(d), posY = barY(d);\n            // fix posY not to overflow opposite quadrant\n            if ($$.config.axis_rotated) {\n                if ((0 < d.value && posY < y0) || (d.value < 0 && y0 < posY)) { posY = y0; }\n            }\n            // 4 points that make a bar\n            return [\n                [posX, offset],\n                [posX, posY - (y0 - offset)],\n                [posX + barW, posY - (y0 - offset)],\n                [posX + barW, offset]\n            ];\n        };\n    };\n    c3_chart_internal_fn.isWithinBar = function (that) {\n        var mouse = this.d3.mouse(that), box = that.getBoundingClientRect(),\n            seg0 = that.pathSegList.getItem(0), seg1 = that.pathSegList.getItem(1),\n            x = Math.min(seg0.x, seg1.x), y = Math.min(seg0.y, seg1.y),\n            w = box.width, h = box.height, offset = 2,\n            sx = x - offset, ex = x + w + offset, sy = y + h + offset, ey = y - offset;\n        return sx < mouse[0] && mouse[0] < ex && ey < mouse[1] && mouse[1] < sy;\n    };\n\n    c3_chart_internal_fn.initText = function () {\n        var $$ = this;\n        $$.main.select('.' + CLASS.chart).append(\"g\")\n            .attr(\"class\", CLASS.chartTexts);\n        $$.mainText = $$.d3.selectAll([]);\n    };\n    c3_chart_internal_fn.updateTargetsForText = function (targets) {\n        var $$ = this, mainTextUpdate, mainTextEnter,\n            classChartText = $$.classChartText.bind($$),\n            classTexts = $$.classTexts.bind($$),\n            classFocus = $$.classFocus.bind($$);\n        mainTextUpdate = $$.main.select('.' + CLASS.chartTexts).selectAll('.' + CLASS.chartText)\n            .data(targets)\n            .attr('class', function (d) { return classChartText(d) + classFocus(d); });\n        mainTextEnter = mainTextUpdate.enter().append('g')\n            .attr('class', classChartText)\n            .style('opacity', 0)\n            .style(\"pointer-events\", \"none\");\n        mainTextEnter.append('g')\n            .attr('class', classTexts);\n    };\n    c3_chart_internal_fn.updateText = function (durationForExit) {\n        var $$ = this, config = $$.config,\n            barOrLineData = $$.barOrLineData.bind($$),\n            classText = $$.classText.bind($$);\n        $$.mainText = $$.main.selectAll('.' + CLASS.texts).selectAll('.' + CLASS.text)\n            .data(barOrLineData);\n        $$.mainText.enter().append('text')\n            .attr(\"class\", classText)\n            .attr('text-anchor', function (d) { return config.axis_rotated ? (d.value < 0 ? 'end' : 'start') : 'middle'; })\n            .style(\"stroke\", 'none')\n            .style(\"fill\", function (d) { return $$.color(d); })\n            .style(\"fill-opacity\", 0);\n        $$.mainText\n            .text(function (d, i, j) { return $$.dataLabelFormat(d.id)(d.value, d.id, i, j); });\n        $$.mainText.exit()\n            .transition().duration(durationForExit)\n            .style('fill-opacity', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawText = function (xForText, yForText, forFlow, withTransition) {\n        return [\n            (withTransition ? this.mainText.transition() : this.mainText)\n                .attr('x', xForText)\n                .attr('y', yForText)\n                .style(\"fill\", this.color)\n                .style(\"fill-opacity\", forFlow ? 0 : this.opacityForText.bind(this))\n        ];\n    };\n    c3_chart_internal_fn.getTextRect = function (text, cls, element) {\n        var dummy = this.d3.select('body').append('div').classed('c3', true),\n            svg = dummy.append(\"svg\").style('visibility', 'hidden').style('position', 'fixed').style('top', 0).style('left', 0),\n            font = this.d3.select(element).style('font'),\n            rect;\n        svg.selectAll('.dummy')\n            .data([text])\n          .enter().append('text')\n            .classed(cls ? cls : \"\", true)\n            .style('font', font)\n            .text(text)\n          .each(function () { rect = this.getBoundingClientRect(); });\n        dummy.remove();\n        return rect;\n    };\n    c3_chart_internal_fn.generateXYForText = function (areaIndices, barIndices, lineIndices, forX) {\n        var $$ = this,\n            getAreaPoints = $$.generateGetAreaPoints(areaIndices, false),\n            getBarPoints = $$.generateGetBarPoints(barIndices, false),\n            getLinePoints = $$.generateGetLinePoints(lineIndices, false),\n            getter = forX ? $$.getXForText : $$.getYForText;\n        return function (d, i) {\n            var getPoints = $$.isAreaType(d) ? getAreaPoints : $$.isBarType(d) ? getBarPoints : getLinePoints;\n            return getter.call($$, getPoints(d, i), d, this);\n        };\n    };\n    c3_chart_internal_fn.getXForText = function (points, d, textElement) {\n        var $$ = this,\n            box = textElement.getBoundingClientRect(), xPos, padding;\n        if ($$.config.axis_rotated) {\n            padding = $$.isBarType(d) ? 4 : 6;\n            xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1);\n        } else {\n            xPos = $$.hasType('bar') ? (points[2][0] + points[0][0]) / 2 : points[0][0];\n        }\n        // show labels regardless of the domain if value is null\n        if (d.value === null) {\n            if (xPos > $$.width) {\n                xPos = $$.width - box.width;\n            } else if (xPos < 0) {\n                xPos = 4;\n            }\n        }\n        return xPos;\n    };\n    c3_chart_internal_fn.getYForText = function (points, d, textElement) {\n        var $$ = this,\n            box = textElement.getBoundingClientRect(),\n            yPos;\n        if ($$.config.axis_rotated) {\n            yPos = (points[0][0] + points[2][0] + box.height * 0.6) / 2;\n        } else {\n            yPos = points[2][1];\n            if (d.value < 0  || (d.value === 0 && !$$.hasPositiveValue)) {\n                yPos += box.height;\n                if ($$.isBarType(d) && $$.isSafari()) {\n                    yPos -= 3;\n                }\n                else if (!$$.isBarType(d) && $$.isChrome()) {\n                    yPos += 3;\n                }\n            } else {\n                yPos += $$.isBarType(d) ? -3 : -6;\n            }\n        }\n        // show labels regardless of the domain if value is null\n        if (d.value === null && !$$.config.axis_rotated) {\n            if (yPos < box.height) {\n                yPos = box.height;\n            } else if (yPos > this.height) {\n                yPos = this.height - 4;\n            }\n        }\n        return yPos;\n    };\n\n    c3_chart_internal_fn.setTargetType = function (targetIds, type) {\n        var $$ = this, config = $$.config;\n        $$.mapToTargetIds(targetIds).forEach(function (id) {\n            $$.withoutFadeIn[id] = (type === config.data_types[id]);\n            config.data_types[id] = type;\n        });\n        if (!targetIds) {\n            config.data_type = type;\n        }\n    };\n    c3_chart_internal_fn.hasType = function (type, targets) {\n        var $$ = this, types = $$.config.data_types, has = false;\n        targets = targets || $$.data.targets;\n        if (targets && targets.length) {\n            targets.forEach(function (target) {\n                var t = types[target.id];\n                if ((t && t.indexOf(type) >= 0) || (!t && type === 'line')) {\n                    has = true;\n                }\n            });\n        } else if (Object.keys(types).length) {\n            Object.keys(types).forEach(function (id) {\n                if (types[id] === type) { has = true; }\n            });\n        } else {\n            has = $$.config.data_type === type;\n        }\n        return has;\n    };\n    c3_chart_internal_fn.hasArcType = function (targets) {\n        return this.hasType('pie', targets) || this.hasType('donut', targets) || this.hasType('gauge', targets);\n    };\n    c3_chart_internal_fn.isLineType = function (d) {\n        var config = this.config, id = isString(d) ? d : d.id;\n        return !config.data_types[id] || ['line', 'spline', 'area', 'area-spline', 'step', 'area-step'].indexOf(config.data_types[id]) >= 0;\n    };\n    c3_chart_internal_fn.isStepType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return ['step', 'area-step'].indexOf(this.config.data_types[id]) >= 0;\n    };\n    c3_chart_internal_fn.isSplineType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return ['spline', 'area-spline'].indexOf(this.config.data_types[id]) >= 0;\n    };\n    c3_chart_internal_fn.isAreaType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return ['area', 'area-spline', 'area-step'].indexOf(this.config.data_types[id]) >= 0;\n    };\n    c3_chart_internal_fn.isBarType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return this.config.data_types[id] === 'bar';\n    };\n    c3_chart_internal_fn.isScatterType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return this.config.data_types[id] === 'scatter';\n    };\n    c3_chart_internal_fn.isPieType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return this.config.data_types[id] === 'pie';\n    };\n    c3_chart_internal_fn.isGaugeType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return this.config.data_types[id] === 'gauge';\n    };\n    c3_chart_internal_fn.isDonutType = function (d) {\n        var id = isString(d) ? d : d.id;\n        return this.config.data_types[id] === 'donut';\n    };\n    c3_chart_internal_fn.isArcType = function (d) {\n        return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d);\n    };\n    c3_chart_internal_fn.lineData = function (d) {\n        return this.isLineType(d) ? [d] : [];\n    };\n    c3_chart_internal_fn.arcData = function (d) {\n        return this.isArcType(d.data) ? [d] : [];\n    };\n    /* not used\n     function scatterData(d) {\n     return isScatterType(d) ? d.values : [];\n     }\n     */\n    c3_chart_internal_fn.barData = function (d) {\n        return this.isBarType(d) ? d.values : [];\n    };\n    c3_chart_internal_fn.lineOrScatterData = function (d) {\n        return this.isLineType(d) || this.isScatterType(d) ? d.values : [];\n    };\n    c3_chart_internal_fn.barOrLineData = function (d) {\n        return this.isBarType(d) || this.isLineType(d) ? d.values : [];\n    };\n    c3_chart_internal_fn.isInterpolationType = function (type) {\n        return ['linear', 'linear-closed', 'basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'monotone'].indexOf(type) >= 0;\n    };\n\n    c3_chart_internal_fn.initGrid = function () {\n        var $$ = this, config = $$.config, d3 = $$.d3;\n        $$.grid = $$.main.append('g')\n            .attr(\"clip-path\", $$.clipPathForGrid)\n            .attr('class', CLASS.grid);\n        if (config.grid_x_show) {\n            $$.grid.append(\"g\").attr(\"class\", CLASS.xgrids);\n        }\n        if (config.grid_y_show) {\n            $$.grid.append('g').attr('class', CLASS.ygrids);\n        }\n        if (config.grid_focus_show) {\n            $$.grid.append('g')\n                .attr(\"class\", CLASS.xgridFocus)\n                .append('line')\n                .attr('class', CLASS.xgridFocus);\n        }\n        $$.xgrid = d3.selectAll([]);\n        if (!config.grid_lines_front) { $$.initGridLines(); }\n    };\n    c3_chart_internal_fn.initGridLines = function () {\n        var $$ = this, d3 = $$.d3;\n        $$.gridLines = $$.main.append('g')\n            .attr(\"clip-path\", $$.clipPathForGrid)\n            .attr('class', CLASS.grid + ' ' + CLASS.gridLines);\n        $$.gridLines.append('g').attr(\"class\", CLASS.xgridLines);\n        $$.gridLines.append('g').attr('class', CLASS.ygridLines);\n        $$.xgridLines = d3.selectAll([]);\n    };\n    c3_chart_internal_fn.updateXGrid = function (withoutUpdate) {\n        var $$ = this, config = $$.config, d3 = $$.d3,\n            xgridData = $$.generateGridData(config.grid_x_type, $$.x),\n            tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;\n\n        $$.xgridAttr = config.axis_rotated ? {\n            'x1': 0,\n            'x2': $$.width,\n            'y1': function (d) { return $$.x(d) - tickOffset; },\n            'y2': function (d) { return $$.x(d) - tickOffset; }\n        } : {\n            'x1': function (d) { return $$.x(d) + tickOffset; },\n            'x2': function (d) { return $$.x(d) + tickOffset; },\n            'y1': 0,\n            'y2': $$.height\n        };\n\n        $$.xgrid = $$.main.select('.' + CLASS.xgrids).selectAll('.' + CLASS.xgrid)\n            .data(xgridData);\n        $$.xgrid.enter().append('line').attr(\"class\", CLASS.xgrid);\n        if (!withoutUpdate) {\n            $$.xgrid.attr($$.xgridAttr)\n                .style(\"opacity\", function () { return +d3.select(this).attr(config.axis_rotated ? 'y1' : 'x1') === (config.axis_rotated ? $$.height : 0) ? 0 : 1; });\n        }\n        $$.xgrid.exit().remove();\n    };\n\n    c3_chart_internal_fn.updateYGrid = function () {\n        var $$ = this, config = $$.config,\n            gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks);\n        $$.ygrid = $$.main.select('.' + CLASS.ygrids).selectAll('.' + CLASS.ygrid)\n            .data(gridValues);\n        $$.ygrid.enter().append('line')\n            .attr('class', CLASS.ygrid);\n        $$.ygrid.attr(\"x1\", config.axis_rotated ? $$.y : 0)\n            .attr(\"x2\", config.axis_rotated ? $$.y : $$.width)\n            .attr(\"y1\", config.axis_rotated ? 0 : $$.y)\n            .attr(\"y2\", config.axis_rotated ? $$.height : $$.y);\n        $$.ygrid.exit().remove();\n        $$.smoothLines($$.ygrid, 'grid');\n    };\n\n    c3_chart_internal_fn.gridTextAnchor = function (d) {\n        return d.position ? d.position : \"end\";\n    };\n    c3_chart_internal_fn.gridTextDx = function (d) {\n        return d.position === 'start' ? 4 : d.position === 'middle' ? 0 : -4;\n    };\n    c3_chart_internal_fn.xGridTextX = function (d) {\n        return d.position === 'start' ? -this.height : d.position === 'middle' ? -this.height / 2 : 0;\n    };\n    c3_chart_internal_fn.yGridTextX = function (d) {\n        return d.position === 'start' ? 0 : d.position === 'middle' ? this.width / 2 : this.width;\n    };\n    c3_chart_internal_fn.updateGrid = function (duration) {\n        var $$ = this, main = $$.main, config = $$.config,\n            xgridLine, ygridLine, yv;\n\n        // hide if arc type\n        $$.grid.style('visibility', $$.hasArcType() ? 'hidden' : 'visible');\n\n        main.select('line.' + CLASS.xgridFocus).style(\"visibility\", \"hidden\");\n        if (config.grid_x_show) {\n            $$.updateXGrid();\n        }\n        $$.xgridLines = main.select('.' + CLASS.xgridLines).selectAll('.' + CLASS.xgridLine)\n            .data(config.grid_x_lines);\n        // enter\n        xgridLine = $$.xgridLines.enter().append('g')\n            .attr(\"class\", function (d) { return CLASS.xgridLine + (d['class'] ? ' ' + d['class'] : ''); });\n        xgridLine.append('line')\n            .style(\"opacity\", 0);\n        xgridLine.append('text')\n            .attr(\"text-anchor\", $$.gridTextAnchor)\n            .attr(\"transform\", config.axis_rotated ? \"\" : \"rotate(-90)\")\n            .attr('dx', $$.gridTextDx)\n            .attr('dy', -5)\n            .style(\"opacity\", 0);\n        // udpate\n        // done in d3.transition() of the end of this function\n        // exit\n        $$.xgridLines.exit().transition().duration(duration)\n            .style(\"opacity\", 0)\n            .remove();\n\n        // Y-Grid\n        if (config.grid_y_show) {\n            $$.updateYGrid();\n        }\n        $$.ygridLines = main.select('.' + CLASS.ygridLines).selectAll('.' + CLASS.ygridLine)\n            .data(config.grid_y_lines);\n        // enter\n        ygridLine = $$.ygridLines.enter().append('g')\n            .attr(\"class\", function (d) { return CLASS.ygridLine + (d['class'] ? ' ' + d['class'] : ''); });\n        ygridLine.append('line')\n            .style(\"opacity\", 0);\n        ygridLine.append('text')\n            .attr(\"text-anchor\", $$.gridTextAnchor)\n            .attr(\"transform\", config.axis_rotated ? \"rotate(-90)\" : \"\")\n            .attr('dx', $$.gridTextDx)\n            .attr('dy', -5)\n            .style(\"opacity\", 0);\n        // update\n        yv = $$.yv.bind($$);\n        $$.ygridLines.select('line')\n          .transition().duration(duration)\n            .attr(\"x1\", config.axis_rotated ? yv : 0)\n            .attr(\"x2\", config.axis_rotated ? yv : $$.width)\n            .attr(\"y1\", config.axis_rotated ? 0 : yv)\n            .attr(\"y2\", config.axis_rotated ? $$.height : yv)\n            .style(\"opacity\", 1);\n        $$.ygridLines.select('text')\n          .transition().duration(duration)\n            .attr(\"x\", config.axis_rotated ? $$.xGridTextX.bind($$) : $$.yGridTextX.bind($$))\n            .attr(\"y\", yv)\n            .text(function (d) { return d.text; })\n            .style(\"opacity\", 1);\n        // exit\n        $$.ygridLines.exit().transition().duration(duration)\n            .style(\"opacity\", 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawGrid = function (withTransition) {\n        var $$ = this, config = $$.config, xv = $$.xv.bind($$),\n            lines = $$.xgridLines.select('line'),\n            texts = $$.xgridLines.select('text');\n        return [\n            (withTransition ? lines.transition() : lines)\n                .attr(\"x1\", config.axis_rotated ? 0 : xv)\n                .attr(\"x2\", config.axis_rotated ? $$.width : xv)\n                .attr(\"y1\", config.axis_rotated ? xv : 0)\n                .attr(\"y2\", config.axis_rotated ? xv : $$.height)\n                .style(\"opacity\", 1),\n            (withTransition ? texts.transition() : texts)\n                .attr(\"x\", config.axis_rotated ? $$.yGridTextX.bind($$) : $$.xGridTextX.bind($$))\n                .attr(\"y\", xv)\n                .text(function (d) { return d.text; })\n                .style(\"opacity\", 1)\n        ];\n    };\n    c3_chart_internal_fn.showXGridFocus = function (selectedData) {\n        var $$ = this, config = $$.config,\n            dataToShow = selectedData.filter(function (d) { return d && isValue(d.value); }),\n            focusEl = $$.main.selectAll('line.' + CLASS.xgridFocus),\n            xx = $$.xx.bind($$);\n        if (! config.tooltip_show) { return; }\n        // Hide when scatter plot exists\n        if ($$.hasType('scatter') || $$.hasArcType()) { return; }\n        focusEl\n            .style(\"visibility\", \"visible\")\n            .data([dataToShow[0]])\n            .attr(config.axis_rotated ? 'y1' : 'x1', xx)\n            .attr(config.axis_rotated ? 'y2' : 'x2', xx);\n        $$.smoothLines(focusEl, 'grid');\n    };\n    c3_chart_internal_fn.hideXGridFocus = function () {\n        this.main.select('line.' + CLASS.xgridFocus).style(\"visibility\", \"hidden\");\n    };\n    c3_chart_internal_fn.updateXgridFocus = function () {\n        var $$ = this, config = $$.config;\n        $$.main.select('line.' + CLASS.xgridFocus)\n            .attr(\"x1\", config.axis_rotated ? 0 : -10)\n            .attr(\"x2\", config.axis_rotated ? $$.width : -10)\n            .attr(\"y1\", config.axis_rotated ? -10 : 0)\n            .attr(\"y2\", config.axis_rotated ? -10 : $$.height);\n    };\n    c3_chart_internal_fn.generateGridData = function (type, scale) {\n        var $$ = this,\n            gridData = [], xDomain, firstYear, lastYear, i,\n            tickNum = $$.main.select(\".\" + CLASS.axisX).selectAll('.tick').size();\n        if (type === 'year') {\n            xDomain = $$.getXDomain();\n            firstYear = xDomain[0].getFullYear();\n            lastYear = xDomain[1].getFullYear();\n            for (i = firstYear; i <= lastYear; i++) {\n                gridData.push(new Date(i + '-01-01 00:00:00'));\n            }\n        } else {\n            gridData = scale.ticks(10);\n            if (gridData.length > tickNum) { // use only int\n                gridData = gridData.filter(function (d) { return (\"\" + d).indexOf('.') < 0; });\n            }\n        }\n        return gridData;\n    };\n    c3_chart_internal_fn.getGridFilterToRemove = function (params) {\n        return params ? function (line) {\n            var found = false;\n            [].concat(params).forEach(function (param) {\n                if ((('value' in param && line.value === param.value) || ('class' in param && line['class'] === param['class']))) {\n                    found = true;\n                }\n            });\n            return found;\n        } : function () { return true; };\n    };\n    c3_chart_internal_fn.removeGridLines = function (params, forX) {\n        var $$ = this, config = $$.config,\n            toRemove = $$.getGridFilterToRemove(params),\n            toShow = function (line) { return !toRemove(line); },\n            classLines = forX ? CLASS.xgridLines : CLASS.ygridLines,\n            classLine = forX ? CLASS.xgridLine : CLASS.ygridLine;\n        $$.main.select('.' + classLines).selectAll('.' + classLine).filter(toRemove)\n            .transition().duration(config.transition_duration)\n            .style('opacity', 0).remove();\n        if (forX) {\n            config.grid_x_lines = config.grid_x_lines.filter(toShow);\n        } else {\n            config.grid_y_lines = config.grid_y_lines.filter(toShow);\n        }\n    };\n\n    c3_chart_internal_fn.initTooltip = function () {\n        var $$ = this, config = $$.config, i;\n        $$.tooltip = $$.selectChart\n            .style(\"position\", \"relative\")\n          .append(\"div\")\n            .attr('class', CLASS.tooltipContainer)\n            .style(\"position\", \"absolute\")\n            .style(\"pointer-events\", \"none\")\n            .style(\"display\", \"none\");\n        // Show tooltip if needed\n        if (config.tooltip_init_show) {\n            if ($$.isTimeSeries() && isString(config.tooltip_init_x)) {\n                config.tooltip_init_x = $$.parseDate(config.tooltip_init_x);\n                for (i = 0; i < $$.data.targets[0].values.length; i++) {\n                    if (($$.data.targets[0].values[i].x - config.tooltip_init_x) === 0) { break; }\n                }\n                config.tooltip_init_x = i;\n            }\n            $$.tooltip.html(config.tooltip_contents.call($$, $$.data.targets.map(function (d) {\n                return $$.addName(d.values[config.tooltip_init_x]);\n            }), $$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType()), $$.color));\n            $$.tooltip.style(\"top\", config.tooltip_init_position.top)\n                .style(\"left\", config.tooltip_init_position.left)\n                .style(\"display\", \"block\");\n        }\n    };\n    c3_chart_internal_fn.getTooltipContent = function (d, defaultTitleFormat, defaultValueFormat, color) {\n        var $$ = this, config = $$.config,\n            titleFormat = config.tooltip_format_title || defaultTitleFormat,\n            nameFormat = config.tooltip_format_name || function (name) { return name; },\n            valueFormat = config.tooltip_format_value || defaultValueFormat,\n            text, i, title, value, name, bgcolor,\n            orderAsc = $$.isOrderAsc();\n\n        if (config.data_groups.length === 0) {\n            d.sort(function(a, b){\n                var v1 = a ? a.value : null, v2 = b ? b.value : null;\n                return orderAsc ? v1 - v2 : v2 - v1;\n            });\n        } else {\n            var ids = $$.orderTargets($$.data.targets).map(function (i) {\n                return i.id;\n            });\n            d.sort(function(a, b) {\n                var v1 = a ? a.value : null, v2 = b ? b.value : null;\n                if (v1 > 0 && v2 > 0) {\n                    v1 = a ? ids.indexOf(a.id) : null;\n                    v2 = b ? ids.indexOf(b.id) : null;\n                }\n                return orderAsc ? v1 - v2 : v2 - v1;\n            });\n        }\n\n        for (i = 0; i < d.length; i++) {\n            if (! (d[i] && (d[i].value || d[i].value === 0))) { continue; }\n\n            if (! text) {\n                title = sanitise(titleFormat ? titleFormat(d[i].x) : d[i].x);\n                text = \"<table class='\" + $$.CLASS.tooltip + \"'>\" + (title || title === 0 ? \"<tr><th colspan='2'>\" + title + \"</th></tr>\" : \"\");\n            }\n\n            value = sanitise(valueFormat(d[i].value, d[i].ratio, d[i].id, d[i].index, d));\n            if (value !== undefined) {\n                // Skip elements when their name is set to null\n                if (d[i].name === null) { continue; }\n                name = sanitise(nameFormat(d[i].name, d[i].ratio, d[i].id, d[i].index));\n                bgcolor = $$.levelColor ? $$.levelColor(d[i].value) : color(d[i].id);\n\n                text += \"<tr class='\" + $$.CLASS.tooltipName + \"-\" + $$.getTargetSelectorSuffix(d[i].id) + \"'>\";\n                text += \"<td class='name'><span style='background-color:\" + bgcolor + \"'></span>\" + name + \"</td>\";\n                text += \"<td class='value'>\" + value + \"</td>\";\n                text += \"</tr>\";\n            }\n        }\n        return text + \"</table>\";\n    };\n    c3_chart_internal_fn.tooltipPosition = function (dataToShow, tWidth, tHeight, element) {\n        var $$ = this, config = $$.config, d3 = $$.d3;\n        var svgLeft, tooltipLeft, tooltipRight, tooltipTop, chartRight;\n        var forArc = $$.hasArcType(),\n            mouse = d3.mouse(element);\n      // Determin tooltip position\n        if (forArc) {\n            tooltipLeft = (($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2) + mouse[0];\n            tooltipTop = ($$.height / 2) + mouse[1] + 20;\n        } else {\n            svgLeft = $$.getSvgLeft(true);\n            if (config.axis_rotated) {\n                tooltipLeft = svgLeft + mouse[0] + 100;\n                tooltipRight = tooltipLeft + tWidth;\n                chartRight = $$.currentWidth - $$.getCurrentPaddingRight();\n                tooltipTop = $$.x(dataToShow[0].x) + 20;\n            } else {\n                tooltipLeft = svgLeft + $$.getCurrentPaddingLeft(true) + $$.x(dataToShow[0].x) + 20;\n                tooltipRight = tooltipLeft + tWidth;\n                chartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight();\n                tooltipTop = mouse[1] + 15;\n            }\n\n            if (tooltipRight > chartRight) {\n                // 20 is needed for Firefox to keep tooltip width\n                tooltipLeft -= tooltipRight - chartRight + 20;\n            }\n            if (tooltipTop + tHeight > $$.currentHeight) {\n                tooltipTop -= tHeight + 30;\n            }\n        }\n        if (tooltipTop < 0) {\n            tooltipTop = 0;\n        }\n        return {top: tooltipTop, left: tooltipLeft};\n    };\n    c3_chart_internal_fn.showTooltip = function (selectedData, element) {\n        var $$ = this, config = $$.config;\n        var tWidth, tHeight, position;\n        var forArc = $$.hasArcType(),\n            dataToShow = selectedData.filter(function (d) { return d && isValue(d.value); }),\n            positionFunction = config.tooltip_position || c3_chart_internal_fn.tooltipPosition;\n        if (dataToShow.length === 0 || !config.tooltip_show) {\n            return;\n        }\n        $$.tooltip.html(config.tooltip_contents.call($$, selectedData, $$.axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color)).style(\"display\", \"block\");\n\n        // Get tooltip dimensions\n        tWidth = $$.tooltip.property('offsetWidth');\n        tHeight = $$.tooltip.property('offsetHeight');\n\n        position = positionFunction.call(this, dataToShow, tWidth, tHeight, element);\n        // Set tooltip\n        $$.tooltip\n            .style(\"top\", position.top + \"px\")\n            .style(\"left\", position.left + 'px');\n    };\n    c3_chart_internal_fn.hideTooltip = function () {\n        this.tooltip.style(\"display\", \"none\");\n    };\n\n    c3_chart_internal_fn.initLegend = function () {\n        var $$ = this;\n        $$.legendItemTextBox = {};\n        $$.legendHasRendered = false;\n        $$.legend = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate('legend'));\n        if (!$$.config.legend_show) {\n            $$.legend.style('visibility', 'hidden');\n            $$.hiddenLegendIds = $$.mapToIds($$.data.targets);\n            return;\n        }\n        // MEMO: call here to update legend box and tranlate for all\n        // MEMO: translate will be upated by this, so transform not needed in updateLegend()\n        $$.updateLegendWithDefaults();\n    };\n    c3_chart_internal_fn.updateLegendWithDefaults = function () {\n        var $$ = this;\n        $$.updateLegend($$.mapToIds($$.data.targets), {withTransform: false, withTransitionForTransform: false, withTransition: false});\n    };\n    c3_chart_internal_fn.updateSizeForLegend = function (legendHeight, legendWidth) {\n        var $$ = this, config = $$.config, insetLegendPosition = {\n            top: $$.isLegendTop ? $$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 : $$.currentHeight - legendHeight - $$.getCurrentPaddingBottom() - config.legend_inset_y,\n            left: $$.isLegendLeft ? $$.getCurrentPaddingLeft() + config.legend_inset_x + 0.5 : $$.currentWidth - legendWidth - $$.getCurrentPaddingRight() - config.legend_inset_x + 0.5\n        };\n\n        $$.margin3 = {\n            top: $$.isLegendRight ? 0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - legendHeight,\n            right: NaN,\n            bottom: 0,\n            left: $$.isLegendRight ? $$.currentWidth - legendWidth : $$.isLegendInset ? insetLegendPosition.left : 0\n        };\n    };\n    c3_chart_internal_fn.transformLegend = function (withTransition) {\n        var $$ = this;\n        (withTransition ? $$.legend.transition() : $$.legend).attr(\"transform\", $$.getTranslate('legend'));\n    };\n    c3_chart_internal_fn.updateLegendStep = function (step) {\n        this.legendStep = step;\n    };\n    c3_chart_internal_fn.updateLegendItemWidth = function (w) {\n        this.legendItemWidth = w;\n    };\n    c3_chart_internal_fn.updateLegendItemHeight = function (h) {\n        this.legendItemHeight = h;\n    };\n    c3_chart_internal_fn.getLegendWidth = function () {\n        var $$ = this;\n        return $$.config.legend_show ? $$.isLegendRight || $$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0;\n    };\n    c3_chart_internal_fn.getLegendHeight = function () {\n        var $$ = this, h = 0;\n        if ($$.config.legend_show) {\n            if ($$.isLegendRight) {\n                h = $$.currentHeight;\n            } else {\n                h = Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1);\n            }\n        }\n        return h;\n    };\n    c3_chart_internal_fn.opacityForLegend = function (legendItem) {\n        return legendItem.classed(CLASS.legendItemHidden) ? null : 1;\n    };\n    c3_chart_internal_fn.opacityForUnfocusedLegend = function (legendItem) {\n        return legendItem.classed(CLASS.legendItemHidden) ? null : 0.3;\n    };\n    c3_chart_internal_fn.toggleFocusLegend = function (targetIds, focus) {\n        var $$ = this;\n        targetIds = $$.mapToTargetIds(targetIds);\n        $$.legend.selectAll('.' + CLASS.legendItem)\n            .filter(function (id) { return targetIds.indexOf(id) >= 0; })\n            .classed(CLASS.legendItemFocused, focus)\n          .transition().duration(100)\n            .style('opacity', function () {\n                var opacity = focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend;\n                return opacity.call($$, $$.d3.select(this));\n            });\n    };\n    c3_chart_internal_fn.revertLegend = function () {\n        var $$ = this, d3 = $$.d3;\n        $$.legend.selectAll('.' + CLASS.legendItem)\n            .classed(CLASS.legendItemFocused, false)\n            .transition().duration(100)\n            .style('opacity', function () { return $$.opacityForLegend(d3.select(this)); });\n    };\n    c3_chart_internal_fn.showLegend = function (targetIds) {\n        var $$ = this, config = $$.config;\n        if (!config.legend_show) {\n            config.legend_show = true;\n            $$.legend.style('visibility', 'visible');\n            if (!$$.legendHasRendered) {\n                $$.updateLegendWithDefaults();\n            }\n        }\n        $$.removeHiddenLegendIds(targetIds);\n        $$.legend.selectAll($$.selectorLegends(targetIds))\n            .style('visibility', 'visible')\n            .transition()\n            .style('opacity', function () { return $$.opacityForLegend($$.d3.select(this)); });\n    };\n    c3_chart_internal_fn.hideLegend = function (targetIds) {\n        var $$ = this, config = $$.config;\n        if (config.legend_show && isEmpty(targetIds)) {\n            config.legend_show = false;\n            $$.legend.style('visibility', 'hidden');\n        }\n        $$.addHiddenLegendIds(targetIds);\n        $$.legend.selectAll($$.selectorLegends(targetIds))\n            .style('opacity', 0)\n            .style('visibility', 'hidden');\n    };\n    c3_chart_internal_fn.clearLegendItemTextBoxCache = function () {\n        this.legendItemTextBox = {};\n    };\n    c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) {\n        var $$ = this, config = $$.config;\n        var xForLegend, xForLegendText, xForLegendRect, yForLegend, yForLegendText, yForLegendRect, x1ForLegendTile, x2ForLegendTile, yForLegendTile;\n        var paddingTop = 4, paddingRight = 10, maxWidth = 0, maxHeight = 0, posMin = 10, tileWidth = config.legend_item_tile_width + 5;\n        var l, totalLength = 0, offsets = {}, widths = {}, heights = {}, margins = [0], steps = {}, step = 0;\n        var withTransition, withTransitionForTransform;\n        var texts, rects, tiles, background;\n\n        // Skip elements when their name is set to null\n        targetIds = targetIds.filter(function(id) {\n            return !isDefined(config.data_names[id]) || config.data_names[id] !== null;\n        });\n\n        options = options || {};\n        withTransition = getOption(options, \"withTransition\", true);\n        withTransitionForTransform = getOption(options, \"withTransitionForTransform\", true);\n\n        function getTextBox(textElement, id) {\n            if (!$$.legendItemTextBox[id]) {\n                $$.legendItemTextBox[id] = $$.getTextRect(textElement.textContent, CLASS.legendItem, textElement);\n            }\n            return $$.legendItemTextBox[id];\n        }\n\n        function updatePositions(textElement, id, index) {\n            var reset = index === 0, isLast = index === targetIds.length - 1,\n                box = getTextBox(textElement, id),\n                itemWidth = box.width + tileWidth + (isLast && !($$.isLegendRight || $$.isLegendInset) ? 0 : paddingRight) + config.legend_padding,\n                itemHeight = box.height + paddingTop,\n                itemLength = $$.isLegendRight || $$.isLegendInset ? itemHeight : itemWidth,\n                areaLength = $$.isLegendRight || $$.isLegendInset ? $$.getLegendHeight() : $$.getLegendWidth(),\n                margin, maxLength;\n\n            // MEMO: care about condifion of step, totalLength\n            function updateValues(id, withoutStep) {\n                if (!withoutStep) {\n                    margin = (areaLength - totalLength - itemLength) / 2;\n                    if (margin < posMin) {\n                        margin = (areaLength - itemLength) / 2;\n                        totalLength = 0;\n                        step++;\n                    }\n                }\n                steps[id] = step;\n                margins[step] = $$.isLegendInset ? 10 : margin;\n                offsets[id] = totalLength;\n                totalLength += itemLength;\n            }\n\n            if (reset) {\n                totalLength = 0;\n                step = 0;\n                maxWidth = 0;\n                maxHeight = 0;\n            }\n\n            if (config.legend_show && !$$.isLegendToShow(id)) {\n                widths[id] = heights[id] = steps[id] = offsets[id] = 0;\n                return;\n            }\n\n            widths[id] = itemWidth;\n            heights[id] = itemHeight;\n\n            if (!maxWidth || itemWidth >= maxWidth) { maxWidth = itemWidth; }\n            if (!maxHeight || itemHeight >= maxHeight) { maxHeight = itemHeight; }\n            maxLength = $$.isLegendRight || $$.isLegendInset ? maxHeight : maxWidth;\n\n            if (config.legend_equally) {\n                Object.keys(widths).forEach(function (id) { widths[id] = maxWidth; });\n                Object.keys(heights).forEach(function (id) { heights[id] = maxHeight; });\n                margin = (areaLength - maxLength * targetIds.length) / 2;\n                if (margin < posMin) {\n                    totalLength = 0;\n                    step = 0;\n                    targetIds.forEach(function (id) { updateValues(id); });\n                }\n                else {\n                    updateValues(id, true);\n                }\n            } else {\n                updateValues(id);\n            }\n        }\n\n        if ($$.isLegendInset) {\n            step = config.legend_inset_step ? config.legend_inset_step : targetIds.length;\n            $$.updateLegendStep(step);\n        }\n\n        if ($$.isLegendRight) {\n            xForLegend = function (id) { return maxWidth * steps[id]; };\n            yForLegend = function (id) { return margins[steps[id]] + offsets[id]; };\n        } else if ($$.isLegendInset) {\n            xForLegend = function (id) { return maxWidth * steps[id] + 10; };\n            yForLegend = function (id) { return margins[steps[id]] + offsets[id]; };\n        } else {\n            xForLegend = function (id) { return margins[steps[id]] + offsets[id]; };\n            yForLegend = function (id) { return maxHeight * steps[id]; };\n        }\n        xForLegendText = function (id, i) { return xForLegend(id, i) + 4 + config.legend_item_tile_width; };\n        yForLegendText = function (id, i) { return yForLegend(id, i) + 9; };\n        xForLegendRect = function (id, i) { return xForLegend(id, i); };\n        yForLegendRect = function (id, i) { return yForLegend(id, i) - 5; };\n        x1ForLegendTile = function (id, i) { return xForLegend(id, i) - 2; };\n        x2ForLegendTile = function (id, i) { return xForLegend(id, i) - 2 + config.legend_item_tile_width; };\n        yForLegendTile = function (id, i) { return yForLegend(id, i) + 4; };\n\n        // Define g for legend area\n        l = $$.legend.selectAll('.' + CLASS.legendItem)\n            .data(targetIds)\n            .enter().append('g')\n            .attr('class', function (id) { return $$.generateClass(CLASS.legendItem, id); })\n            .style('visibility', function (id) { return $$.isLegendToShow(id) ? 'visible' : 'hidden'; })\n            .style('cursor', 'pointer')\n            .on('click', function (id) {\n                if (config.legend_item_onclick) {\n                    config.legend_item_onclick.call($$, id);\n                } else {\n                    if ($$.d3.event.altKey) {\n                        $$.api.hide();\n                        $$.api.show(id);\n                    } else {\n                        $$.api.toggle(id);\n                        $$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert();\n                    }\n                }\n            })\n            .on('mouseover', function (id) {\n                if (config.legend_item_onmouseover) {\n                    config.legend_item_onmouseover.call($$, id);\n                }\n                else {\n                    $$.d3.select(this).classed(CLASS.legendItemFocused, true);\n                    if (!$$.transiting && $$.isTargetToShow(id)) {\n                        $$.api.focus(id);\n                    }\n                }\n            })\n            .on('mouseout', function (id) {\n                if (config.legend_item_onmouseout) {\n                    config.legend_item_onmouseout.call($$, id);\n                }\n                else {\n                    $$.d3.select(this).classed(CLASS.legendItemFocused, false);\n                    $$.api.revert();\n                }\n            });\n        l.append('text')\n            .text(function (id) { return isDefined(config.data_names[id]) ? config.data_names[id] : id; })\n            .each(function (id, i) { updatePositions(this, id, i); })\n            .style(\"pointer-events\", \"none\")\n            .attr('x', $$.isLegendRight || $$.isLegendInset ? xForLegendText : -200)\n            .attr('y', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendText);\n        l.append('rect')\n            .attr(\"class\", CLASS.legendItemEvent)\n            .style('fill-opacity', 0)\n            .attr('x', $$.isLegendRight || $$.isLegendInset ? xForLegendRect : -200)\n            .attr('y', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendRect);\n        l.append('line')\n            .attr('class', CLASS.legendItemTile)\n            .style('stroke', $$.color)\n            .style(\"pointer-events\", \"none\")\n            .attr('x1', $$.isLegendRight || $$.isLegendInset ? x1ForLegendTile : -200)\n            .attr('y1', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendTile)\n            .attr('x2', $$.isLegendRight || $$.isLegendInset ? x2ForLegendTile : -200)\n            .attr('y2', $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendTile)\n            .attr('stroke-width', config.legend_item_tile_height);\n\n        // Set background for inset legend\n        background = $$.legend.select('.' + CLASS.legendBackground + ' rect');\n        if ($$.isLegendInset && maxWidth > 0 && background.size() === 0) {\n            background = $$.legend.insert('g', '.' + CLASS.legendItem)\n                .attr(\"class\", CLASS.legendBackground)\n                .append('rect');\n        }\n\n        texts = $$.legend.selectAll('text')\n            .data(targetIds)\n            .text(function (id) { return isDefined(config.data_names[id]) ? config.data_names[id] : id; }) // MEMO: needed for update\n            .each(function (id, i) { updatePositions(this, id, i); });\n        (withTransition ? texts.transition() : texts)\n            .attr('x', xForLegendText)\n            .attr('y', yForLegendText);\n\n        rects = $$.legend.selectAll('rect.' + CLASS.legendItemEvent)\n            .data(targetIds);\n        (withTransition ? rects.transition() : rects)\n            .attr('width', function (id) { return widths[id]; })\n            .attr('height', function (id) { return heights[id]; })\n            .attr('x', xForLegendRect)\n            .attr('y', yForLegendRect);\n\n        tiles = $$.legend.selectAll('line.' + CLASS.legendItemTile)\n                .data(targetIds);\n            (withTransition ? tiles.transition() : tiles)\n                .style('stroke', $$.color)\n                .attr('x1', x1ForLegendTile)\n                .attr('y1', yForLegendTile)\n                .attr('x2', x2ForLegendTile)\n                .attr('y2', yForLegendTile);\n\n        if (background) {\n            (withTransition ? background.transition() : background)\n                .attr('height', $$.getLegendHeight() - 12)\n                .attr('width', maxWidth * (step + 1) + 10);\n        }\n\n        // toggle legend state\n        $$.legend.selectAll('.' + CLASS.legendItem)\n            .classed(CLASS.legendItemHidden, function (id) { return !$$.isTargetToShow(id); });\n\n        // Update all to reflect change of legend\n        $$.updateLegendItemWidth(maxWidth);\n        $$.updateLegendItemHeight(maxHeight);\n        $$.updateLegendStep(step);\n        // Update size and scale\n        $$.updateSizes();\n        $$.updateScales();\n        $$.updateSvgSize();\n        // Update g positions\n        $$.transformAll(withTransitionForTransform, transitions);\n        $$.legendHasRendered = true;\n    };\n\n    c3_chart_internal_fn.initTitle = function () {\n        var $$ = this;\n        $$.title = $$.svg.append(\"text\")\n              .text($$.config.title_text)\n              .attr(\"class\", $$.CLASS.title);\n    };\n    c3_chart_internal_fn.redrawTitle = function () {\n        var $$ = this;\n        $$.title\n              .attr(\"x\", $$.xForTitle.bind($$))\n              .attr(\"y\", $$.yForTitle.bind($$));\n    };\n    c3_chart_internal_fn.xForTitle = function () {\n        var $$ = this, config = $$.config, position = config.title_position || 'left', x;\n        if (position.indexOf('right') >= 0) {\n            x = $$.currentWidth - $$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).width - config.title_padding.right;\n        } else if (position.indexOf('center') >= 0) {\n            x = ($$.currentWidth - $$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).width) / 2;\n        } else { // left\n            x = config.title_padding.left;\n        }\n        return x;\n    };\n    c3_chart_internal_fn.yForTitle = function () {\n        var $$ = this;\n        return $$.config.title_padding.top + $$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).height;\n    };\n    c3_chart_internal_fn.getTitlePadding = function() {\n        var $$ = this;\n        return $$.yForTitle() + $$.config.title_padding.bottom;\n    };\n\n    function Axis(owner) {\n        API.call(this, owner);\n    }\n\n    inherit(API, Axis);\n\n    Axis.prototype.init = function init() {\n\n        var $$ = this.owner, config = $$.config, main = $$.main;\n        $$.axes.x = main.append(\"g\")\n            .attr(\"class\", CLASS.axis + ' ' + CLASS.axisX)\n            .attr(\"clip-path\", $$.clipPathForXAxis)\n            .attr(\"transform\", $$.getTranslate('x'))\n            .style(\"visibility\", config.axis_x_show ? 'visible' : 'hidden');\n        $$.axes.x.append(\"text\")\n            .attr(\"class\", CLASS.axisXLabel)\n            .attr(\"transform\", config.axis_rotated ? \"rotate(-90)\" : \"\")\n            .style(\"text-anchor\", this.textAnchorForXAxisLabel.bind(this));\n        $$.axes.y = main.append(\"g\")\n            .attr(\"class\", CLASS.axis + ' ' + CLASS.axisY)\n            .attr(\"clip-path\", config.axis_y_inner ? \"\" : $$.clipPathForYAxis)\n            .attr(\"transform\", $$.getTranslate('y'))\n            .style(\"visibility\", config.axis_y_show ? 'visible' : 'hidden');\n        $$.axes.y.append(\"text\")\n            .attr(\"class\", CLASS.axisYLabel)\n            .attr(\"transform\", config.axis_rotated ? \"\" : \"rotate(-90)\")\n            .style(\"text-anchor\", this.textAnchorForYAxisLabel.bind(this));\n\n        $$.axes.y2 = main.append(\"g\")\n            .attr(\"class\", CLASS.axis + ' ' + CLASS.axisY2)\n            // clip-path?\n            .attr(\"transform\", $$.getTranslate('y2'))\n            .style(\"visibility\", config.axis_y2_show ? 'visible' : 'hidden');\n        $$.axes.y2.append(\"text\")\n            .attr(\"class\", CLASS.axisY2Label)\n            .attr(\"transform\", config.axis_rotated ? \"\" : \"rotate(-90)\")\n            .style(\"text-anchor\", this.textAnchorForY2AxisLabel.bind(this));\n    };\n    Axis.prototype.getXAxis = function getXAxis(scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) {\n        var $$ = this.owner, config = $$.config,\n            axisParams = {\n                isCategory: $$.isCategorized(),\n                withOuterTick: withOuterTick,\n                tickMultiline: config.axis_x_tick_multiline,\n                tickWidth: config.axis_x_tick_width,\n                tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate,\n                withoutTransition: withoutTransition,\n            },\n            axis = c3_axis($$.d3, axisParams).scale(scale).orient(orient);\n\n        if ($$.isTimeSeries() && tickValues && typeof tickValues !== \"function\") {\n            tickValues = tickValues.map(function (v) { return $$.parseDate(v); });\n        }\n\n        // Set tick\n        axis.tickFormat(tickFormat).tickValues(tickValues);\n        if ($$.isCategorized()) {\n            axis.tickCentered(config.axis_x_tick_centered);\n            if (isEmpty(config.axis_x_tick_culling)) {\n                config.axis_x_tick_culling = false;\n            }\n        }\n\n        return axis;\n    };\n    Axis.prototype.updateXAxisTickValues = function updateXAxisTickValues(targets, axis) {\n        var $$ = this.owner, config = $$.config, tickValues;\n        if (config.axis_x_tick_fit || config.axis_x_tick_count) {\n            tickValues = this.generateTickValues($$.mapTargetsToUniqueXs(targets), config.axis_x_tick_count, $$.isTimeSeries());\n        }\n        if (axis) {\n            axis.tickValues(tickValues);\n        } else {\n            $$.xAxis.tickValues(tickValues);\n            $$.subXAxis.tickValues(tickValues);\n        }\n        return tickValues;\n    };\n    Axis.prototype.getYAxis = function getYAxis(scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) {\n        var $$ = this.owner, config = $$.config,\n            axisParams = {\n                withOuterTick: withOuterTick,\n                withoutTransition: withoutTransition,\n                tickTextRotate: withoutRotateTickText ? 0 : config.axis_y_tick_rotate\n            },\n            axis = c3_axis($$.d3, axisParams).scale(scale).orient(orient).tickFormat(tickFormat);\n        if ($$.isTimeSeriesY()) {\n            axis.ticks($$.d3.time[config.axis_y_tick_time_value], config.axis_y_tick_time_interval);\n        } else {\n            axis.tickValues(tickValues);\n        }\n        return axis;\n    };\n    Axis.prototype.getId = function getId(id) {\n        var config = this.owner.config;\n        return id in config.data_axes ? config.data_axes[id] : 'y';\n    };\n    Axis.prototype.getXAxisTickFormat = function getXAxisTickFormat() {\n        var $$ = this.owner, config = $$.config,\n            format = $$.isTimeSeries() ? $$.defaultAxisTimeFormat : $$.isCategorized() ? $$.categoryName : function (v) { return v < 0 ? v.toFixed(0) : v; };\n        if (config.axis_x_tick_format) {\n            if (isFunction(config.axis_x_tick_format)) {\n                format = config.axis_x_tick_format;\n            } else if ($$.isTimeSeries()) {\n                format = function (date) {\n                    return date ? $$.axisTimeFormat(config.axis_x_tick_format)(date) : \"\";\n                };\n            }\n        }\n        return isFunction(format) ? function (v) { return format.call($$, v); } : format;\n    };\n    Axis.prototype.getTickValues = function getTickValues(tickValues, axis) {\n        return tickValues ? tickValues : axis ? axis.tickValues() : undefined;\n    };\n    Axis.prototype.getXAxisTickValues = function getXAxisTickValues() {\n        return this.getTickValues(this.owner.config.axis_x_tick_values, this.owner.xAxis);\n    };\n    Axis.prototype.getYAxisTickValues = function getYAxisTickValues() {\n        return this.getTickValues(this.owner.config.axis_y_tick_values, this.owner.yAxis);\n    };\n    Axis.prototype.getY2AxisTickValues = function getY2AxisTickValues() {\n        return this.getTickValues(this.owner.config.axis_y2_tick_values, this.owner.y2Axis);\n    };\n    Axis.prototype.getLabelOptionByAxisId = function getLabelOptionByAxisId(axisId) {\n        var $$ = this.owner, config = $$.config, option;\n        if (axisId === 'y') {\n            option = config.axis_y_label;\n        } else if (axisId === 'y2') {\n            option = config.axis_y2_label;\n        } else if (axisId === 'x') {\n            option = config.axis_x_label;\n        }\n        return option;\n    };\n    Axis.prototype.getLabelText = function getLabelText(axisId) {\n        var option = this.getLabelOptionByAxisId(axisId);\n        return isString(option) ? option : option ? option.text : null;\n    };\n    Axis.prototype.setLabelText = function setLabelText(axisId, text) {\n        var $$ = this.owner, config = $$.config,\n            option = this.getLabelOptionByAxisId(axisId);\n        if (isString(option)) {\n            if (axisId === 'y') {\n                config.axis_y_label = text;\n            } else if (axisId === 'y2') {\n                config.axis_y2_label = text;\n            } else if (axisId === 'x') {\n                config.axis_x_label = text;\n            }\n        } else if (option) {\n            option.text = text;\n        }\n    };\n    Axis.prototype.getLabelPosition = function getLabelPosition(axisId, defaultPosition) {\n        var option = this.getLabelOptionByAxisId(axisId),\n            position = (option && typeof option === 'object' && option.position) ? option.position : defaultPosition;\n        return {\n            isInner: position.indexOf('inner') >= 0,\n            isOuter: position.indexOf('outer') >= 0,\n            isLeft: position.indexOf('left') >= 0,\n            isCenter: position.indexOf('center') >= 0,\n            isRight: position.indexOf('right') >= 0,\n            isTop: position.indexOf('top') >= 0,\n            isMiddle: position.indexOf('middle') >= 0,\n            isBottom: position.indexOf('bottom') >= 0\n        };\n    };\n    Axis.prototype.getXAxisLabelPosition = function getXAxisLabelPosition() {\n        return this.getLabelPosition('x', this.owner.config.axis_rotated ? 'inner-top' : 'inner-right');\n    };\n    Axis.prototype.getYAxisLabelPosition = function getYAxisLabelPosition() {\n        return this.getLabelPosition('y', this.owner.config.axis_rotated ? 'inner-right' : 'inner-top');\n    };\n    Axis.prototype.getY2AxisLabelPosition = function getY2AxisLabelPosition() {\n        return this.getLabelPosition('y2', this.owner.config.axis_rotated ? 'inner-right' : 'inner-top');\n    };\n    Axis.prototype.getLabelPositionById = function getLabelPositionById(id) {\n        return id === 'y2' ? this.getY2AxisLabelPosition() : id === 'y' ? this.getYAxisLabelPosition() : this.getXAxisLabelPosition();\n    };\n    Axis.prototype.textForXAxisLabel = function textForXAxisLabel() {\n        return this.getLabelText('x');\n    };\n    Axis.prototype.textForYAxisLabel = function textForYAxisLabel() {\n        return this.getLabelText('y');\n    };\n    Axis.prototype.textForY2AxisLabel = function textForY2AxisLabel() {\n        return this.getLabelText('y2');\n    };\n    Axis.prototype.xForAxisLabel = function xForAxisLabel(forHorizontal, position) {\n        var $$ = this.owner;\n        if (forHorizontal) {\n            return position.isLeft ? 0 : position.isCenter ? $$.width / 2 : $$.width;\n        } else {\n            return position.isBottom ? -$$.height : position.isMiddle ? -$$.height / 2 : 0;\n        }\n    };\n    Axis.prototype.dxForAxisLabel = function dxForAxisLabel(forHorizontal, position) {\n        if (forHorizontal) {\n            return position.isLeft ? \"0.5em\" : position.isRight ? \"-0.5em\" : \"0\";\n        } else {\n            return position.isTop ? \"-0.5em\" : position.isBottom ? \"0.5em\" : \"0\";\n        }\n    };\n    Axis.prototype.textAnchorForAxisLabel = function textAnchorForAxisLabel(forHorizontal, position) {\n        if (forHorizontal) {\n            return position.isLeft ? 'start' : position.isCenter ? 'middle' : 'end';\n        } else {\n            return position.isBottom ? 'start' : position.isMiddle ? 'middle' : 'end';\n        }\n    };\n    Axis.prototype.xForXAxisLabel = function xForXAxisLabel() {\n        return this.xForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition());\n    };\n    Axis.prototype.xForYAxisLabel = function xForYAxisLabel() {\n        return this.xForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());\n    };\n    Axis.prototype.xForY2AxisLabel = function xForY2AxisLabel() {\n        return this.xForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition());\n    };\n    Axis.prototype.dxForXAxisLabel = function dxForXAxisLabel() {\n        return this.dxForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition());\n    };\n    Axis.prototype.dxForYAxisLabel = function dxForYAxisLabel() {\n        return this.dxForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());\n    };\n    Axis.prototype.dxForY2AxisLabel = function dxForY2AxisLabel() {\n        return this.dxForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition());\n    };\n    Axis.prototype.dyForXAxisLabel = function dyForXAxisLabel() {\n        var $$ = this.owner, config = $$.config,\n            position = this.getXAxisLabelPosition();\n        if (config.axis_rotated) {\n            return position.isInner ? \"1.2em\" : -25 - this.getMaxTickWidth('x');\n        } else {\n            return position.isInner ? \"-0.5em\" : config.axis_x_height ? config.axis_x_height - 10 : \"3em\";\n        }\n    };\n    Axis.prototype.dyForYAxisLabel = function dyForYAxisLabel() {\n        var $$ = this.owner,\n            position = this.getYAxisLabelPosition();\n        if ($$.config.axis_rotated) {\n            return position.isInner ? \"-0.5em\" : \"3em\";\n        } else {\n            return position.isInner ? \"1.2em\" : -10 - ($$.config.axis_y_inner ? 0 : (this.getMaxTickWidth('y') + 10));\n        }\n    };\n    Axis.prototype.dyForY2AxisLabel = function dyForY2AxisLabel() {\n        var $$ = this.owner,\n            position = this.getY2AxisLabelPosition();\n        if ($$.config.axis_rotated) {\n            return position.isInner ? \"1.2em\" : \"-2.2em\";\n        } else {\n            return position.isInner ? \"-0.5em\" : 15 + ($$.config.axis_y2_inner ? 0 : (this.getMaxTickWidth('y2') + 15));\n        }\n    };\n    Axis.prototype.textAnchorForXAxisLabel = function textAnchorForXAxisLabel() {\n        var $$ = this.owner;\n        return this.textAnchorForAxisLabel(!$$.config.axis_rotated, this.getXAxisLabelPosition());\n    };\n    Axis.prototype.textAnchorForYAxisLabel = function textAnchorForYAxisLabel() {\n        var $$ = this.owner;\n        return this.textAnchorForAxisLabel($$.config.axis_rotated, this.getYAxisLabelPosition());\n    };\n    Axis.prototype.textAnchorForY2AxisLabel = function textAnchorForY2AxisLabel() {\n        var $$ = this.owner;\n        return this.textAnchorForAxisLabel($$.config.axis_rotated, this.getY2AxisLabelPosition());\n    };\n    Axis.prototype.getMaxTickWidth = function getMaxTickWidth(id, withoutRecompute) {\n        var $$ = this.owner, config = $$.config,\n            maxWidth = 0, targetsToShow, scale, axis, dummy, svg;\n        if (withoutRecompute && $$.currentMaxTickWidths[id]) {\n            return $$.currentMaxTickWidths[id];\n        }\n        if ($$.svg) {\n            targetsToShow = $$.filterTargetsToShow($$.data.targets);\n            if (id === 'y') {\n                scale = $$.y.copy().domain($$.getYDomain(targetsToShow, 'y'));\n                axis = this.getYAxis(scale, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, false, true, true);\n            } else if (id === 'y2') {\n                scale = $$.y2.copy().domain($$.getYDomain(targetsToShow, 'y2'));\n                axis = this.getYAxis(scale, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, false, true, true);\n            } else {\n                scale = $$.x.copy().domain($$.getXDomain(targetsToShow));\n                axis = this.getXAxis(scale, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, false, true, true);\n                this.updateXAxisTickValues(targetsToShow, axis);\n            }\n            dummy = $$.d3.select('body').append('div').classed('c3', true);\n            svg = dummy.append(\"svg\").style('visibility', 'hidden').style('position', 'fixed').style('top', 0).style('left', 0),\n            svg.append('g').call(axis).each(function () {\n                $$.d3.select(this).selectAll('text').each(function () {\n                    var box = this.getBoundingClientRect();\n                    if (maxWidth < box.width) { maxWidth = box.width; }\n                });\n                dummy.remove();\n            });\n        }\n        $$.currentMaxTickWidths[id] = maxWidth <= 0 ? $$.currentMaxTickWidths[id] : maxWidth;\n        return $$.currentMaxTickWidths[id];\n    };\n\n    Axis.prototype.updateLabels = function updateLabels(withTransition) {\n        var $$ = this.owner;\n        var axisXLabel = $$.main.select('.' + CLASS.axisX + ' .' + CLASS.axisXLabel),\n            axisYLabel = $$.main.select('.' + CLASS.axisY + ' .' + CLASS.axisYLabel),\n            axisY2Label = $$.main.select('.' + CLASS.axisY2 + ' .' + CLASS.axisY2Label);\n        (withTransition ? axisXLabel.transition() : axisXLabel)\n            .attr(\"x\", this.xForXAxisLabel.bind(this))\n            .attr(\"dx\", this.dxForXAxisLabel.bind(this))\n            .attr(\"dy\", this.dyForXAxisLabel.bind(this))\n            .text(this.textForXAxisLabel.bind(this));\n        (withTransition ? axisYLabel.transition() : axisYLabel)\n            .attr(\"x\", this.xForYAxisLabel.bind(this))\n            .attr(\"dx\", this.dxForYAxisLabel.bind(this))\n            .attr(\"dy\", this.dyForYAxisLabel.bind(this))\n            .text(this.textForYAxisLabel.bind(this));\n        (withTransition ? axisY2Label.transition() : axisY2Label)\n            .attr(\"x\", this.xForY2AxisLabel.bind(this))\n            .attr(\"dx\", this.dxForY2AxisLabel.bind(this))\n            .attr(\"dy\", this.dyForY2AxisLabel.bind(this))\n            .text(this.textForY2AxisLabel.bind(this));\n    };\n    Axis.prototype.getPadding = function getPadding(padding, key, defaultValue, domainLength) {\n        var p = typeof padding === 'number' ? padding : padding[key];\n        if (!isValue(p)) {\n            return defaultValue;\n        }\n        if (padding.unit === 'ratio') {\n            return padding[key] * domainLength;\n        }\n        // assume padding is pixels if unit is not specified\n        return this.convertPixelsToAxisPadding(p, domainLength);\n    };\n    Axis.prototype.convertPixelsToAxisPadding = function convertPixelsToAxisPadding(pixels, domainLength) {\n        var $$ = this.owner,\n            length = $$.config.axis_rotated ? $$.width : $$.height;\n        return domainLength * (pixels / length);\n    };\n    Axis.prototype.generateTickValues = function generateTickValues(values, tickCount, forTimeSeries) {\n        var tickValues = values, targetCount, start, end, count, interval, i, tickValue;\n        if (tickCount) {\n            targetCount = isFunction(tickCount) ? tickCount() : tickCount;\n            // compute ticks according to tickCount\n            if (targetCount === 1) {\n                tickValues = [values[0]];\n            } else if (targetCount === 2) {\n                tickValues = [values[0], values[values.length - 1]];\n            } else if (targetCount > 2) {\n                count = targetCount - 2;\n                start = values[0];\n                end = values[values.length - 1];\n                interval = (end - start) / (count + 1);\n                // re-construct unique values\n                tickValues = [start];\n                for (i = 0; i < count; i++) {\n                    tickValue = +start + interval * (i + 1);\n                    tickValues.push(forTimeSeries ? new Date(tickValue) : tickValue);\n                }\n                tickValues.push(end);\n            }\n        }\n        if (!forTimeSeries) { tickValues = tickValues.sort(function (a, b) { return a - b; }); }\n        return tickValues;\n    };\n    Axis.prototype.generateTransitions = function generateTransitions(duration) {\n        var $$ = this.owner, axes = $$.axes;\n        return {\n            axisX: duration ? axes.x.transition().duration(duration) : axes.x,\n            axisY: duration ? axes.y.transition().duration(duration) : axes.y,\n            axisY2: duration ? axes.y2.transition().duration(duration) : axes.y2,\n            axisSubX: duration ? axes.subx.transition().duration(duration) : axes.subx\n        };\n    };\n    Axis.prototype.redraw = function redraw(transitions, isHidden) {\n        var $$ = this.owner;\n        $$.axes.x.style(\"opacity\", isHidden ? 0 : 1);\n        $$.axes.y.style(\"opacity\", isHidden ? 0 : 1);\n        $$.axes.y2.style(\"opacity\", isHidden ? 0 : 1);\n        $$.axes.subx.style(\"opacity\", isHidden ? 0 : 1);\n        transitions.axisX.call($$.xAxis);\n        transitions.axisY.call($$.yAxis);\n        transitions.axisY2.call($$.y2Axis);\n        transitions.axisSubX.call($$.subXAxis);\n    };\n\n    c3_chart_internal_fn.getClipPath = function (id) {\n        var isIE9 = window.navigator.appVersion.toLowerCase().indexOf(\"msie 9.\") >= 0;\n        return \"url(\" + (isIE9 ? \"\" : document.URL.split('#')[0]) + \"#\" + id + \")\";\n    };\n    c3_chart_internal_fn.appendClip = function (parent, id) {\n        return parent.append(\"clipPath\").attr(\"id\", id).append(\"rect\");\n    };\n    c3_chart_internal_fn.getAxisClipX = function (forHorizontal) {\n        // axis line width + padding for left\n        var left = Math.max(30, this.margin.left);\n        return forHorizontal ? -(1 + left) : -(left - 1);\n    };\n    c3_chart_internal_fn.getAxisClipY = function (forHorizontal) {\n        return forHorizontal ? -20 : -this.margin.top;\n    };\n    c3_chart_internal_fn.getXAxisClipX = function () {\n        var $$ = this;\n        return $$.getAxisClipX(!$$.config.axis_rotated);\n    };\n    c3_chart_internal_fn.getXAxisClipY = function () {\n        var $$ = this;\n        return $$.getAxisClipY(!$$.config.axis_rotated);\n    };\n    c3_chart_internal_fn.getYAxisClipX = function () {\n        var $$ = this;\n        return $$.config.axis_y_inner ? -1 : $$.getAxisClipX($$.config.axis_rotated);\n    };\n    c3_chart_internal_fn.getYAxisClipY = function () {\n        var $$ = this;\n        return $$.getAxisClipY($$.config.axis_rotated);\n    };\n    c3_chart_internal_fn.getAxisClipWidth = function (forHorizontal) {\n        var $$ = this,\n            left = Math.max(30, $$.margin.left),\n            right = Math.max(30, $$.margin.right);\n        // width + axis line width + padding for left/right\n        return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20;\n    };\n    c3_chart_internal_fn.getAxisClipHeight = function (forHorizontal) {\n        // less than 20 is not enough to show the axis label 'outer' without legend\n        return (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 20;\n    };\n    c3_chart_internal_fn.getXAxisClipWidth = function () {\n        var $$ = this;\n        return $$.getAxisClipWidth(!$$.config.axis_rotated);\n    };\n    c3_chart_internal_fn.getXAxisClipHeight = function () {\n        var $$ = this;\n        return $$.getAxisClipHeight(!$$.config.axis_rotated);\n    };\n    c3_chart_internal_fn.getYAxisClipWidth = function () {\n        var $$ = this;\n        return $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0);\n    };\n    c3_chart_internal_fn.getYAxisClipHeight = function () {\n        var $$ = this;\n        return $$.getAxisClipHeight($$.config.axis_rotated);\n    };\n\n    c3_chart_internal_fn.initPie = function () {\n        var $$ = this, d3 = $$.d3, config = $$.config;\n        $$.pie = d3.layout.pie().value(function (d) {\n            return d.values.reduce(function (a, b) { return a + b.value; }, 0);\n        });\n        if (!config.data_order) {\n            $$.pie.sort(null);\n        }\n    };\n\n    c3_chart_internal_fn.updateRadius = function () {\n        var $$ = this, config = $$.config,\n            w = config.gauge_width || config.donut_width;\n        $$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2;\n        $$.radius = $$.radiusExpanded * 0.95;\n        $$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : 0.6;\n        $$.innerRadius = $$.hasType('donut') || $$.hasType('gauge') ? $$.radius * $$.innerRadiusRatio : 0;\n    };\n\n    c3_chart_internal_fn.updateArc = function () {\n        var $$ = this;\n        $$.svgArc = $$.getSvgArc();\n        $$.svgArcExpanded = $$.getSvgArcExpanded();\n        $$.svgArcExpandedSub = $$.getSvgArcExpanded(0.98);\n    };\n\n    c3_chart_internal_fn.updateAngle = function (d) {\n        var $$ = this, config = $$.config,\n            found = false, index = 0,\n            gMin, gMax, gTic, gValue;\n\n        if (!config) {\n            return null;\n        }\n\n        $$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) {\n            if (! found && t.data.id === d.data.id) {\n                found = true;\n                d = t;\n                d.index = index;\n            }\n            index++;\n        });\n        if (isNaN(d.startAngle)) {\n            d.startAngle = 0;\n        }\n        if (isNaN(d.endAngle)) {\n            d.endAngle = d.startAngle;\n        }\n        if ($$.isGaugeType(d.data)) {\n            gMin = config.gauge_min;\n            gMax = config.gauge_max;\n            gTic = (Math.PI * (config.gauge_fullCircle ? 2 : 1)) / (gMax - gMin);\n            gValue = d.value < gMin ? 0 : d.value < gMax ? d.value - gMin : (gMax - gMin);\n            d.startAngle = config.gauge_startingAngle;\n            d.endAngle = d.startAngle + gTic * gValue;\n        }\n        return found ? d : null;\n    };\n\n    c3_chart_internal_fn.getSvgArc = function () {\n        var $$ = this,\n            arc = $$.d3.svg.arc().outerRadius($$.radius).innerRadius($$.innerRadius),\n            newArc = function (d, withoutUpdate) {\n                var updated;\n                if (withoutUpdate) { return arc(d); } // for interpolate\n                updated = $$.updateAngle(d);\n                return updated ? arc(updated) : \"M 0 0\";\n            };\n        // TODO: extends all function\n        newArc.centroid = arc.centroid;\n        return newArc;\n    };\n\n    c3_chart_internal_fn.getSvgArcExpanded = function (rate) {\n        var $$ = this,\n            arc = $$.d3.svg.arc().outerRadius($$.radiusExpanded * (rate ? rate : 1)).innerRadius($$.innerRadius);\n        return function (d) {\n            var updated = $$.updateAngle(d);\n            return updated ? arc(updated) : \"M 0 0\";\n        };\n    };\n\n    c3_chart_internal_fn.getArc = function (d, withoutUpdate, force) {\n        return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : \"M 0 0\";\n    };\n\n\n    c3_chart_internal_fn.transformForArcLabel = function (d) {\n        var $$ = this, config = $$.config,\n            updated = $$.updateAngle(d), c, x, y, h, ratio, translate = \"\";\n        if (updated && !$$.hasType('gauge')) {\n            c = this.svgArc.centroid(updated);\n            x = isNaN(c[0]) ? 0 : c[0];\n            y = isNaN(c[1]) ? 0 : c[1];\n            h = Math.sqrt(x * x + y * y);\n            if ($$.hasType('donut') && config.donut_label_ratio) {\n                ratio = isFunction(config.donut_label_ratio) ? config.donut_label_ratio(d, $$.radius, h) : config.donut_label_ratio;\n            } else if ($$.hasType('pie') && config.pie_label_ratio) {\n                ratio = isFunction(config.pie_label_ratio) ? config.pie_label_ratio(d, $$.radius, h) : config.pie_label_ratio;\n            } else {\n                ratio = $$.radius && h ? (36 / $$.radius > 0.375 ? 1.175 - 36 / $$.radius : 0.8) * $$.radius / h : 0;\n            }\n            translate = \"translate(\" + (x * ratio) +  ',' + (y * ratio) +  \")\";\n        }\n        return translate;\n    };\n\n    c3_chart_internal_fn.getArcRatio = function (d) {\n        var $$ = this,\n            config = $$.config,\n            whole = Math.PI * ($$.hasType('gauge') && !config.gauge_fullCircle ? 1 : 2);\n        return d ? (d.endAngle - d.startAngle) / whole : null;\n    };\n\n    c3_chart_internal_fn.convertToArcData = function (d) {\n        return this.addName({\n            id: d.data.id,\n            value: d.value,\n            ratio: this.getArcRatio(d),\n            index: d.index\n        });\n    };\n\n    c3_chart_internal_fn.textForArcLabel = function (d) {\n        var $$ = this,\n            updated, value, ratio, id, format;\n        if (! $$.shouldShowArcLabel()) { return \"\"; }\n        updated = $$.updateAngle(d);\n        value = updated ? updated.value : null;\n        ratio = $$.getArcRatio(updated);\n        id = d.data.id;\n        if (! $$.hasType('gauge') && ! $$.meetsArcLabelThreshold(ratio)) { return \"\"; }\n        format = $$.getArcLabelFormat();\n        return format ? format(value, ratio, id) : $$.defaultArcValueFormat(value, ratio);\n    };\n\n    c3_chart_internal_fn.expandArc = function (targetIds) {\n        var $$ = this, interval;\n\n        // MEMO: avoid to cancel transition\n        if ($$.transiting) {\n            interval = window.setInterval(function () {\n                if (!$$.transiting) {\n                    window.clearInterval(interval);\n                    if ($$.legend.selectAll('.c3-legend-item-focused').size() > 0) {\n                        $$.expandArc(targetIds);\n                    }\n                }\n            }, 10);\n            return;\n        }\n\n        targetIds = $$.mapToTargetIds(targetIds);\n\n        $$.svg.selectAll($$.selectorTargets(targetIds, '.' + CLASS.chartArc)).each(function (d) {\n            if (! $$.shouldExpand(d.data.id)) { return; }\n            $$.d3.select(this).selectAll('path')\n                .transition().duration($$.expandDuration(d.data.id))\n                .attr(\"d\", $$.svgArcExpanded)\n                .transition().duration($$.expandDuration(d.data.id) * 2)\n                .attr(\"d\", $$.svgArcExpandedSub)\n                .each(function (d) {\n                    if ($$.isDonutType(d.data)) {\n                        // callback here\n                    }\n                });\n        });\n    };\n\n    c3_chart_internal_fn.unexpandArc = function (targetIds) {\n        var $$ = this;\n\n        if ($$.transiting) { return; }\n\n        targetIds = $$.mapToTargetIds(targetIds);\n\n        $$.svg.selectAll($$.selectorTargets(targetIds, '.' + CLASS.chartArc)).selectAll('path')\n            .transition().duration(function(d) {\n                return $$.expandDuration(d.data.id);\n            })\n            .attr(\"d\", $$.svgArc);\n        $$.svg.selectAll('.' + CLASS.arc)\n            .style(\"opacity\", 1);\n    };\n\n    c3_chart_internal_fn.expandDuration = function (id) {\n        var $$ = this, config = $$.config;\n\n        if ($$.isDonutType(id)) {\n            return config.donut_expand_duration;\n        } else if ($$.isGaugeType(id)) {\n            return config.gauge_expand_duration;\n        } else if ($$.isPieType(id)) {\n            return config.pie_expand_duration;\n        } else {\n            return 50;\n        }\n\n    };\n\n    c3_chart_internal_fn.shouldExpand = function (id) {\n        var $$ = this, config = $$.config;\n        return ($$.isDonutType(id) && config.donut_expand) ||\n               ($$.isGaugeType(id) && config.gauge_expand) ||\n               ($$.isPieType(id) && config.pie_expand);\n    };\n\n    c3_chart_internal_fn.shouldShowArcLabel = function () {\n        var $$ = this, config = $$.config, shouldShow = true;\n        if ($$.hasType('donut')) {\n            shouldShow = config.donut_label_show;\n        } else if ($$.hasType('pie')) {\n            shouldShow = config.pie_label_show;\n        }\n        // when gauge, always true\n        return shouldShow;\n    };\n\n    c3_chart_internal_fn.meetsArcLabelThreshold = function (ratio) {\n        var $$ = this, config = $$.config,\n            threshold = $$.hasType('donut') ? config.donut_label_threshold : config.pie_label_threshold;\n        return ratio >= threshold;\n    };\n\n    c3_chart_internal_fn.getArcLabelFormat = function () {\n        var $$ = this, config = $$.config,\n            format = config.pie_label_format;\n        if ($$.hasType('gauge')) {\n            format = config.gauge_label_format;\n        } else if ($$.hasType('donut')) {\n            format = config.donut_label_format;\n        }\n        return format;\n    };\n\n    c3_chart_internal_fn.getArcTitle = function () {\n        var $$ = this;\n        return $$.hasType('donut') ? $$.config.donut_title : \"\";\n    };\n\n    c3_chart_internal_fn.updateTargetsForArc = function (targets) {\n        var $$ = this, main = $$.main,\n            mainPieUpdate, mainPieEnter,\n            classChartArc = $$.classChartArc.bind($$),\n            classArcs = $$.classArcs.bind($$),\n            classFocus = $$.classFocus.bind($$);\n        mainPieUpdate = main.select('.' + CLASS.chartArcs).selectAll('.' + CLASS.chartArc)\n            .data($$.pie(targets))\n            .attr(\"class\", function (d) { return classChartArc(d) + classFocus(d.data); });\n        mainPieEnter = mainPieUpdate.enter().append(\"g\")\n            .attr(\"class\", classChartArc);\n        mainPieEnter.append('g')\n            .attr('class', classArcs);\n        mainPieEnter.append(\"text\")\n            .attr(\"dy\", $$.hasType('gauge') ? \"-.1em\" : \".35em\")\n            .style(\"opacity\", 0)\n            .style(\"text-anchor\", \"middle\")\n            .style(\"pointer-events\", \"none\");\n        // MEMO: can not keep same color..., but not bad to update color in redraw\n        //mainPieUpdate.exit().remove();\n    };\n\n    c3_chart_internal_fn.initArc = function () {\n        var $$ = this;\n        $$.arcs = $$.main.select('.' + CLASS.chart).append(\"g\")\n            .attr(\"class\", CLASS.chartArcs)\n            .attr(\"transform\", $$.getTranslate('arc'));\n        $$.arcs.append('text')\n            .attr('class', CLASS.chartArcsTitle)\n            .style(\"text-anchor\", \"middle\")\n            .text($$.getArcTitle());\n    };\n\n    c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransform) {\n        var $$ = this, d3 = $$.d3, config = $$.config, main = $$.main,\n            mainArc;\n        mainArc = main.selectAll('.' + CLASS.arcs).selectAll('.' + CLASS.arc)\n            .data($$.arcData.bind($$));\n        mainArc.enter().append('path')\n            .attr(\"class\", $$.classArc.bind($$))\n            .style(\"fill\", function (d) { return $$.color(d.data); })\n            .style(\"cursor\", function (d) { return config.interaction_enabled && config.data_selection_isselectable(d) ? \"pointer\" : null; })\n            .style(\"opacity\", 0)\n            .each(function (d) {\n                if ($$.isGaugeType(d.data)) {\n                    d.startAngle = d.endAngle = config.gauge_startingAngle;\n                }\n                this._current = d;\n            });\n        mainArc\n            .attr(\"transform\", function (d) { return !$$.isGaugeType(d.data) && withTransform ? \"scale(0)\" : \"\"; })\n            .style(\"opacity\", function (d) { return d === this._current ? 0 : 1; })\n            .on('mouseover', config.interaction_enabled ? function (d) {\n                var updated, arcData;\n                if ($$.transiting) { // skip while transiting\n                    return;\n                }\n                updated = $$.updateAngle(d);\n                if (updated) {\n                    arcData = $$.convertToArcData(updated);\n                    // transitions\n                    $$.expandArc(updated.data.id);\n                    $$.api.focus(updated.data.id);\n                    $$.toggleFocusLegend(updated.data.id, true);\n                    $$.config.data_onmouseover(arcData, this);\n                }\n            } : null)\n            .on('mousemove', config.interaction_enabled ? function (d) {\n                var updated = $$.updateAngle(d), arcData, selectedData;\n                if (updated) {\n                    arcData = $$.convertToArcData(updated),\n                    selectedData = [arcData];\n                    $$.showTooltip(selectedData, this);\n                }\n            } : null)\n            .on('mouseout', config.interaction_enabled ? function (d) {\n                var updated, arcData;\n                if ($$.transiting) { // skip while transiting\n                    return;\n                }\n                updated = $$.updateAngle(d);\n                if (updated) {\n                    arcData = $$.convertToArcData(updated);\n                    // transitions\n                    $$.unexpandArc(updated.data.id);\n                    $$.api.revert();\n                    $$.revertLegend();\n                    $$.hideTooltip();\n                    $$.config.data_onmouseout(arcData, this);\n                }\n            } : null)\n            .on('click', config.interaction_enabled ? function (d, i) {\n                var updated = $$.updateAngle(d), arcData;\n                if (updated) {\n                    arcData = $$.convertToArcData(updated);\n                    if ($$.toggleShape) {\n                        $$.toggleShape(this, arcData, i);\n                    }\n                    $$.config.data_onclick.call($$.api, arcData, this);\n                }\n            } : null)\n            .each(function () { $$.transiting = true; })\n            .transition().duration(duration)\n            .attrTween(\"d\", function (d) {\n                var updated = $$.updateAngle(d), interpolate;\n                if (! updated) {\n                    return function () { return \"M 0 0\"; };\n                }\n                //                if (this._current === d) {\n                //                    this._current = {\n                //                        startAngle: Math.PI*2,\n                //                        endAngle: Math.PI*2,\n                //                    };\n                //                }\n                if (isNaN(this._current.startAngle)) {\n                    this._current.startAngle = 0;\n                }\n                if (isNaN(this._current.endAngle)) {\n                    this._current.endAngle = this._current.startAngle;\n                }\n                interpolate = d3.interpolate(this._current, updated);\n                this._current = interpolate(0);\n                return function (t) {\n                    var interpolated = interpolate(t);\n                    interpolated.data = d.data; // data.id will be updated by interporator\n                    return $$.getArc(interpolated, true);\n                };\n            })\n            .attr(\"transform\", withTransform ? \"scale(1)\" : \"\")\n            .style(\"fill\", function (d) {\n                return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data.id);\n            }) // Where gauge reading color would receive customization.\n            .style(\"opacity\", 1)\n            .call($$.endall, function () {\n                $$.transiting = false;\n            });\n        mainArc.exit().transition().duration(durationForExit)\n            .style('opacity', 0)\n            .remove();\n        main.selectAll('.' + CLASS.chartArc).select('text')\n            .style(\"opacity\", 0)\n            .attr('class', function (d) { return $$.isGaugeType(d.data) ? CLASS.gaugeValue : ''; })\n            .text($$.textForArcLabel.bind($$))\n            .attr(\"transform\", $$.transformForArcLabel.bind($$))\n            .style('font-size', function (d) { return $$.isGaugeType(d.data) ? Math.round($$.radius / 5) + 'px' : ''; })\n          .transition().duration(duration)\n            .style(\"opacity\", function (d) { return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? 1 : 0; });\n        main.select('.' + CLASS.chartArcsTitle)\n            .style(\"opacity\", $$.hasType('donut') || $$.hasType('gauge') ? 1 : 0);\n\n        if ($$.hasType('gauge')) {\n            $$.arcs.select('.' + CLASS.chartArcsBackground)\n                .attr(\"d\", function () {\n                    var d = {\n                        data: [{value: config.gauge_max}],\n                        startAngle: config.gauge_startingAngle,\n                        endAngle: -1 * config.gauge_startingAngle\n                    };\n                    return $$.getArc(d, true, true);\n                });\n            $$.arcs.select('.' + CLASS.chartArcsGaugeUnit)\n                .attr(\"dy\", \".75em\")\n                .text(config.gauge_label_show ? config.gauge_units : '');\n            $$.arcs.select('.' + CLASS.chartArcsGaugeMin)\n                .attr(\"dx\", -1 * ($$.innerRadius + (($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2))) + \"px\")\n                .attr(\"dy\", \"1.2em\")\n                .text(config.gauge_label_show ? config.gauge_min : '');\n            $$.arcs.select('.' + CLASS.chartArcsGaugeMax)\n                .attr(\"dx\", $$.innerRadius + (($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2)) + \"px\")\n                .attr(\"dy\", \"1.2em\")\n                .text(config.gauge_label_show ? config.gauge_max : '');\n        }\n    };\n    c3_chart_internal_fn.initGauge = function () {\n        var arcs = this.arcs;\n        if (this.hasType('gauge')) {\n            arcs.append('path')\n                .attr(\"class\", CLASS.chartArcsBackground);\n            arcs.append(\"text\")\n                .attr(\"class\", CLASS.chartArcsGaugeUnit)\n                .style(\"text-anchor\", \"middle\")\n                .style(\"pointer-events\", \"none\");\n            arcs.append(\"text\")\n                .attr(\"class\", CLASS.chartArcsGaugeMin)\n                .style(\"text-anchor\", \"middle\")\n                .style(\"pointer-events\", \"none\");\n            arcs.append(\"text\")\n                .attr(\"class\", CLASS.chartArcsGaugeMax)\n                .style(\"text-anchor\", \"middle\")\n                .style(\"pointer-events\", \"none\");\n        }\n    };\n    c3_chart_internal_fn.getGaugeLabelHeight = function () {\n        return this.config.gauge_label_show ? 20 : 0;\n    };\n\n    c3_chart_internal_fn.initRegion = function () {\n        var $$ = this;\n        $$.region = $$.main.append('g')\n            .attr(\"clip-path\", $$.clipPath)\n            .attr(\"class\", CLASS.regions);\n    };\n    c3_chart_internal_fn.updateRegion = function (duration) {\n        var $$ = this, config = $$.config;\n\n        // hide if arc type\n        $$.region.style('visibility', $$.hasArcType() ? 'hidden' : 'visible');\n\n        $$.mainRegion = $$.main.select('.' + CLASS.regions).selectAll('.' + CLASS.region)\n            .data(config.regions);\n        $$.mainRegion.enter().append('g')\n          .append('rect')\n            .style(\"fill-opacity\", 0);\n        $$.mainRegion\n            .attr('class', $$.classRegion.bind($$));\n        $$.mainRegion.exit().transition().duration(duration)\n            .style(\"opacity\", 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawRegion = function (withTransition) {\n        var $$ = this,\n            regions = $$.mainRegion.selectAll('rect').each(function () {\n                // data is binded to g and it's not transferred to rect (child node) automatically,\n                // then data of each rect has to be updated manually.\n                // TODO: there should be more efficient way to solve this?\n                var parentData = $$.d3.select(this.parentNode).datum();\n                $$.d3.select(this).datum(parentData);\n            }),\n            x = $$.regionX.bind($$),\n            y = $$.regionY.bind($$),\n            w = $$.regionWidth.bind($$),\n            h = $$.regionHeight.bind($$);\n        return [\n            (withTransition ? regions.transition() : regions)\n                .attr(\"x\", x)\n                .attr(\"y\", y)\n                .attr(\"width\", w)\n                .attr(\"height\", h)\n                .style(\"fill-opacity\", function (d) { return isValue(d.opacity) ? d.opacity : 0.1; })\n        ];\n    };\n    c3_chart_internal_fn.regionX = function (d) {\n        var $$ = this, config = $$.config,\n            xPos, yScale = d.axis === 'y' ? $$.y : $$.y2;\n        if (d.axis === 'y' || d.axis === 'y2') {\n            xPos = config.axis_rotated ? ('start' in d ? yScale(d.start) : 0) : 0;\n        } else {\n            xPos = config.axis_rotated ? 0 : ('start' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.start) : d.start) : 0);\n        }\n        return xPos;\n    };\n    c3_chart_internal_fn.regionY = function (d) {\n        var $$ = this, config = $$.config,\n            yPos, yScale = d.axis === 'y' ? $$.y : $$.y2;\n        if (d.axis === 'y' || d.axis === 'y2') {\n            yPos = config.axis_rotated ? 0 : ('end' in d ? yScale(d.end) : 0);\n        } else {\n            yPos = config.axis_rotated ? ('start' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.start) : d.start) : 0) : 0;\n        }\n        return yPos;\n    };\n    c3_chart_internal_fn.regionWidth = function (d) {\n        var $$ = this, config = $$.config,\n            start = $$.regionX(d), end, yScale = d.axis === 'y' ? $$.y : $$.y2;\n        if (d.axis === 'y' || d.axis === 'y2') {\n            end = config.axis_rotated ? ('end' in d ? yScale(d.end) : $$.width) : $$.width;\n        } else {\n            end = config.axis_rotated ? $$.width : ('end' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.end) : d.end) : $$.width);\n        }\n        return end < start ? 0 : end - start;\n    };\n    c3_chart_internal_fn.regionHeight = function (d) {\n        var $$ = this, config = $$.config,\n            start = this.regionY(d), end, yScale = d.axis === 'y' ? $$.y : $$.y2;\n        if (d.axis === 'y' || d.axis === 'y2') {\n            end = config.axis_rotated ? $$.height : ('start' in d ? yScale(d.start) : $$.height);\n        } else {\n            end = config.axis_rotated ? ('end' in d ? $$.x($$.isTimeSeries() ? $$.parseDate(d.end) : d.end) : $$.height) : $$.height;\n        }\n        return end < start ? 0 : end - start;\n    };\n    c3_chart_internal_fn.isRegionOnX = function (d) {\n        return !d.axis || d.axis === 'x';\n    };\n\n    c3_chart_internal_fn.drag = function (mouse) {\n        var $$ = this, config = $$.config, main = $$.main, d3 = $$.d3;\n        var sx, sy, mx, my, minX, maxX, minY, maxY;\n\n        if ($$.hasArcType()) { return; }\n        if (! config.data_selection_enabled) { return; } // do nothing if not selectable\n        if (config.zoom_enabled && ! $$.zoom.altDomain) { return; } // skip if zoomable because of conflict drag dehavior\n        if (!config.data_selection_multiple) { return; } // skip when single selection because drag is used for multiple selection\n\n        sx = $$.dragStart[0];\n        sy = $$.dragStart[1];\n        mx = mouse[0];\n        my = mouse[1];\n        minX = Math.min(sx, mx);\n        maxX = Math.max(sx, mx);\n        minY = (config.data_selection_grouped) ? $$.margin.top : Math.min(sy, my);\n        maxY = (config.data_selection_grouped) ? $$.height : Math.max(sy, my);\n\n        main.select('.' + CLASS.dragarea)\n            .attr('x', minX)\n            .attr('y', minY)\n            .attr('width', maxX - minX)\n            .attr('height', maxY - minY);\n        // TODO: binary search when multiple xs\n        main.selectAll('.' + CLASS.shapes).selectAll('.' + CLASS.shape)\n            .filter(function (d) { return config.data_selection_isselectable(d); })\n            .each(function (d, i) {\n                var shape = d3.select(this),\n                    isSelected = shape.classed(CLASS.SELECTED),\n                    isIncluded = shape.classed(CLASS.INCLUDED),\n                    _x, _y, _w, _h, toggle, isWithin = false, box;\n                if (shape.classed(CLASS.circle)) {\n                    _x = shape.attr(\"cx\") * 1;\n                    _y = shape.attr(\"cy\") * 1;\n                    toggle = $$.togglePoint;\n                    isWithin = minX < _x && _x < maxX && minY < _y && _y < maxY;\n                }\n                else if (shape.classed(CLASS.bar)) {\n                    box = getPathBox(this);\n                    _x = box.x;\n                    _y = box.y;\n                    _w = box.width;\n                    _h = box.height;\n                    toggle = $$.togglePath;\n                    isWithin = !(maxX < _x || _x + _w < minX) && !(maxY < _y || _y + _h < minY);\n                } else {\n                    // line/area selection not supported yet\n                    return;\n                }\n                if (isWithin ^ isIncluded) {\n                    shape.classed(CLASS.INCLUDED, !isIncluded);\n                    // TODO: included/unincluded callback here\n                    shape.classed(CLASS.SELECTED, !isSelected);\n                    toggle.call($$, !isSelected, shape, d, i);\n                }\n            });\n    };\n\n    c3_chart_internal_fn.dragstart = function (mouse) {\n        var $$ = this, config = $$.config;\n        if ($$.hasArcType()) { return; }\n        if (! config.data_selection_enabled) { return; } // do nothing if not selectable\n        $$.dragStart = mouse;\n        $$.main.select('.' + CLASS.chart).append('rect')\n            .attr('class', CLASS.dragarea)\n            .style('opacity', 0.1);\n        $$.dragging = true;\n    };\n\n    c3_chart_internal_fn.dragend = function () {\n        var $$ = this, config = $$.config;\n        if ($$.hasArcType()) { return; }\n        if (! config.data_selection_enabled) { return; } // do nothing if not selectable\n        $$.main.select('.' + CLASS.dragarea)\n            .transition().duration(100)\n            .style('opacity', 0)\n            .remove();\n        $$.main.selectAll('.' + CLASS.shape)\n            .classed(CLASS.INCLUDED, false);\n        $$.dragging = false;\n    };\n\n    c3_chart_internal_fn.selectPoint = function (target, d, i) {\n        var $$ = this, config = $$.config,\n            cx = (config.axis_rotated ? $$.circleY : $$.circleX).bind($$),\n            cy = (config.axis_rotated ? $$.circleX : $$.circleY).bind($$),\n            r = $$.pointSelectR.bind($$);\n        config.data_onselected.call($$.api, d, target.node());\n        // add selected-circle on low layer g\n        $$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + i)\n            .data([d])\n            .enter().append('circle')\n            .attr(\"class\", function () { return $$.generateClass(CLASS.selectedCircle, i); })\n            .attr(\"cx\", cx)\n            .attr(\"cy\", cy)\n            .attr(\"stroke\", function () { return $$.color(d); })\n            .attr(\"r\", function (d) { return $$.pointSelectR(d) * 1.4; })\n            .transition().duration(100)\n            .attr(\"r\", r);\n    };\n    c3_chart_internal_fn.unselectPoint = function (target, d, i) {\n        var $$ = this;\n        $$.config.data_onunselected.call($$.api, d, target.node());\n        // remove selected-circle from low layer g\n        $$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + i)\n            .transition().duration(100).attr('r', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.togglePoint = function (selected, target, d, i) {\n        selected ? this.selectPoint(target, d, i) : this.unselectPoint(target, d, i);\n    };\n    c3_chart_internal_fn.selectPath = function (target, d) {\n        var $$ = this;\n        $$.config.data_onselected.call($$, d, target.node());\n        if ($$.config.interaction_brighten) {\n            target.transition().duration(100)\n                .style(\"fill\", function () { return $$.d3.rgb($$.color(d)).brighter(0.75); });\n        }\n    };\n    c3_chart_internal_fn.unselectPath = function (target, d) {\n        var $$ = this;\n        $$.config.data_onunselected.call($$, d, target.node());\n        if ($$.config.interaction_brighten) {\n            target.transition().duration(100)\n                .style(\"fill\", function () { return $$.color(d); });\n        }\n    };\n    c3_chart_internal_fn.togglePath = function (selected, target, d, i) {\n        selected ? this.selectPath(target, d, i) : this.unselectPath(target, d, i);\n    };\n    c3_chart_internal_fn.getToggle = function (that, d) {\n        var $$ = this, toggle;\n        if (that.nodeName === 'circle') {\n            if ($$.isStepType(d)) {\n                // circle is hidden in step chart, so treat as within the click area\n                toggle = function () {}; // TODO: how to select step chart?\n            } else {\n                toggle = $$.togglePoint;\n            }\n        }\n        else if (that.nodeName === 'path') {\n            toggle = $$.togglePath;\n        }\n        return toggle;\n    };\n    c3_chart_internal_fn.toggleShape = function (that, d, i) {\n        var $$ = this, d3 = $$.d3, config = $$.config,\n            shape = d3.select(that), isSelected = shape.classed(CLASS.SELECTED),\n            toggle = $$.getToggle(that, d).bind($$);\n\n        if (config.data_selection_enabled && config.data_selection_isselectable(d)) {\n            if (!config.data_selection_multiple) {\n                $$.main.selectAll('.' + CLASS.shapes + (config.data_selection_grouped ? $$.getTargetSelectorSuffix(d.id) : \"\")).selectAll('.' + CLASS.shape).each(function (d, i) {\n                    var shape = d3.select(this);\n                    if (shape.classed(CLASS.SELECTED)) { toggle(false, shape.classed(CLASS.SELECTED, false), d, i); }\n                });\n            }\n            shape.classed(CLASS.SELECTED, !isSelected);\n            toggle(!isSelected, shape, d, i);\n        }\n    };\n\n    c3_chart_internal_fn.initBrush = function () {\n        var $$ = this, d3 = $$.d3;\n        $$.brush = d3.svg.brush().on(\"brush\", function () { $$.redrawForBrush(); });\n        $$.brush.update = function () {\n            if ($$.context) { $$.context.select('.' + CLASS.brush).call(this); }\n            return this;\n        };\n        $$.brush.scale = function (scale) {\n            return $$.config.axis_rotated ? this.y(scale) : this.x(scale);\n        };\n    };\n    c3_chart_internal_fn.initSubchart = function () {\n        var $$ = this, config = $$.config,\n            context = $$.context = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate('context')),\n            visibility = config.subchart_show ? 'visible' : 'hidden';\n\n        context.style('visibility', visibility);\n\n        // Define g for chart area\n        context.append('g')\n            .attr(\"clip-path\", $$.clipPathForSubchart)\n            .attr('class', CLASS.chart);\n\n        // Define g for bar chart area\n        context.select('.' + CLASS.chart).append(\"g\")\n            .attr(\"class\", CLASS.chartBars);\n\n        // Define g for line chart area\n        context.select('.' + CLASS.chart).append(\"g\")\n            .attr(\"class\", CLASS.chartLines);\n\n        // Add extent rect for Brush\n        context.append(\"g\")\n            .attr(\"clip-path\", $$.clipPath)\n            .attr(\"class\", CLASS.brush)\n            .call($$.brush);\n\n        // ATTENTION: This must be called AFTER chart added\n        // Add Axis\n        $$.axes.subx = context.append(\"g\")\n            .attr(\"class\", CLASS.axisX)\n            .attr(\"transform\", $$.getTranslate('subx'))\n            .attr(\"clip-path\", config.axis_rotated ? \"\" : $$.clipPathForXAxis)\n            .style(\"visibility\", config.subchart_axis_x_show ? visibility : 'hidden');\n    };\n    c3_chart_internal_fn.updateTargetsForSubchart = function (targets) {\n        var $$ = this, context = $$.context, config = $$.config,\n            contextLineEnter, contextLineUpdate, contextBarEnter, contextBarUpdate,\n            classChartBar = $$.classChartBar.bind($$),\n            classBars = $$.classBars.bind($$),\n            classChartLine = $$.classChartLine.bind($$),\n            classLines = $$.classLines.bind($$),\n            classAreas = $$.classAreas.bind($$);\n\n        if (config.subchart_show) {\n            //-- Bar --//\n            contextBarUpdate = context.select('.' + CLASS.chartBars).selectAll('.' + CLASS.chartBar)\n                .data(targets)\n                .attr('class', classChartBar);\n            contextBarEnter = contextBarUpdate.enter().append('g')\n                .style('opacity', 0)\n                .attr('class', classChartBar);\n            // Bars for each data\n            contextBarEnter.append('g')\n                .attr(\"class\", classBars);\n\n            //-- Line --//\n            contextLineUpdate = context.select('.' + CLASS.chartLines).selectAll('.' + CLASS.chartLine)\n                .data(targets)\n                .attr('class', classChartLine);\n            contextLineEnter = contextLineUpdate.enter().append('g')\n                .style('opacity', 0)\n                .attr('class', classChartLine);\n            // Lines for each data\n            contextLineEnter.append(\"g\")\n                .attr(\"class\", classLines);\n            // Area\n            contextLineEnter.append(\"g\")\n                .attr(\"class\", classAreas);\n\n            //-- Brush --//\n            context.selectAll('.' + CLASS.brush + ' rect')\n                .attr(config.axis_rotated ? \"width\" : \"height\", config.axis_rotated ? $$.width2 : $$.height2);\n        }\n    };\n    c3_chart_internal_fn.updateBarForSubchart = function (durationForExit) {\n        var $$ = this;\n        $$.contextBar = $$.context.selectAll('.' + CLASS.bars).selectAll('.' + CLASS.bar)\n            .data($$.barData.bind($$));\n        $$.contextBar.enter().append('path')\n            .attr(\"class\", $$.classBar.bind($$))\n            .style(\"stroke\", 'none')\n            .style(\"fill\", $$.color);\n        $$.contextBar\n            .style(\"opacity\", $$.initialOpacity.bind($$));\n        $$.contextBar.exit().transition().duration(durationForExit)\n            .style('opacity', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawBarForSubchart = function (drawBarOnSub, withTransition, duration) {\n        (withTransition ? this.contextBar.transition(Math.random().toString()).duration(duration) : this.contextBar)\n            .attr('d', drawBarOnSub)\n            .style('opacity', 1);\n    };\n    c3_chart_internal_fn.updateLineForSubchart = function (durationForExit) {\n        var $$ = this;\n        $$.contextLine = $$.context.selectAll('.' + CLASS.lines).selectAll('.' + CLASS.line)\n            .data($$.lineData.bind($$));\n        $$.contextLine.enter().append('path')\n            .attr('class', $$.classLine.bind($$))\n            .style('stroke', $$.color);\n        $$.contextLine\n            .style(\"opacity\", $$.initialOpacity.bind($$));\n        $$.contextLine.exit().transition().duration(durationForExit)\n            .style('opacity', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawLineForSubchart = function (drawLineOnSub, withTransition, duration) {\n        (withTransition ? this.contextLine.transition(Math.random().toString()).duration(duration) : this.contextLine)\n            .attr(\"d\", drawLineOnSub)\n            .style('opacity', 1);\n    };\n    c3_chart_internal_fn.updateAreaForSubchart = function (durationForExit) {\n        var $$ = this, d3 = $$.d3;\n        $$.contextArea = $$.context.selectAll('.' + CLASS.areas).selectAll('.' + CLASS.area)\n            .data($$.lineData.bind($$));\n        $$.contextArea.enter().append('path')\n            .attr(\"class\", $$.classArea.bind($$))\n            .style(\"fill\", $$.color)\n            .style(\"opacity\", function () { $$.orgAreaOpacity = +d3.select(this).style('opacity'); return 0; });\n        $$.contextArea\n            .style(\"opacity\", 0);\n        $$.contextArea.exit().transition().duration(durationForExit)\n            .style('opacity', 0)\n            .remove();\n    };\n    c3_chart_internal_fn.redrawAreaForSubchart = function (drawAreaOnSub, withTransition, duration) {\n        (withTransition ? this.contextArea.transition(Math.random().toString()).duration(duration) : this.contextArea)\n            .attr(\"d\", drawAreaOnSub)\n            .style(\"fill\", this.color)\n            .style(\"opacity\", this.orgAreaOpacity);\n    };\n    c3_chart_internal_fn.redrawSubchart = function (withSubchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices) {\n        var $$ = this, d3 = $$.d3, config = $$.config,\n            drawAreaOnSub, drawBarOnSub, drawLineOnSub;\n\n        $$.context.style('visibility', config.subchart_show ? 'visible' : 'hidden');\n\n        // subchart\n        if (config.subchart_show) {\n            // reflect main chart to extent on subchart if zoomed\n            if (d3.event && d3.event.type === 'zoom') {\n                $$.brush.extent($$.x.orgDomain()).update();\n            }\n            // update subchart elements if needed\n            if (withSubchart) {\n\n                // extent rect\n                if (!$$.brush.empty()) {\n                    $$.brush.extent($$.x.orgDomain()).update();\n                }\n                // setup drawer - MEMO: this must be called after axis updated\n                drawAreaOnSub = $$.generateDrawArea(areaIndices, true);\n                drawBarOnSub = $$.generateDrawBar(barIndices, true);\n                drawLineOnSub = $$.generateDrawLine(lineIndices, true);\n\n                $$.updateBarForSubchart(duration);\n                $$.updateLineForSubchart(duration);\n                $$.updateAreaForSubchart(duration);\n\n                $$.redrawBarForSubchart(drawBarOnSub, duration, duration);\n                $$.redrawLineForSubchart(drawLineOnSub, duration, duration);\n                $$.redrawAreaForSubchart(drawAreaOnSub, duration, duration);\n            }\n        }\n    };\n    c3_chart_internal_fn.redrawForBrush = function () {\n        var $$ = this, x = $$.x;\n        $$.redraw({\n            withTransition: false,\n            withY: $$.config.zoom_rescale,\n            withSubchart: false,\n            withUpdateXDomain: true,\n            withDimension: false\n        });\n        $$.config.subchart_onbrush.call($$.api, x.orgDomain());\n    };\n    c3_chart_internal_fn.transformContext = function (withTransition, transitions) {\n        var $$ = this, subXAxis;\n        if (transitions && transitions.axisSubX) {\n            subXAxis = transitions.axisSubX;\n        } else {\n            subXAxis = $$.context.select('.' + CLASS.axisX);\n            if (withTransition) { subXAxis = subXAxis.transition(); }\n        }\n        $$.context.attr(\"transform\", $$.getTranslate('context'));\n        subXAxis.attr(\"transform\", $$.getTranslate('subx'));\n    };\n    c3_chart_internal_fn.getDefaultExtent = function () {\n        var $$ = this, config = $$.config,\n            extent = isFunction(config.axis_x_extent) ? config.axis_x_extent($$.getXDomain($$.data.targets)) : config.axis_x_extent;\n        if ($$.isTimeSeries()) {\n            extent = [$$.parseDate(extent[0]), $$.parseDate(extent[1])];\n        }\n        return extent;\n    };\n\n    c3_chart_internal_fn.initZoom = function () {\n        var $$ = this, d3 = $$.d3, config = $$.config, startEvent;\n\n        $$.zoom = d3.behavior.zoom()\n            .on(\"zoomstart\", function () {\n                startEvent = d3.event.sourceEvent;\n                $$.zoom.altDomain = d3.event.sourceEvent.altKey ? $$.x.orgDomain() : null;\n                config.zoom_onzoomstart.call($$.api, d3.event.sourceEvent);\n            })\n            .on(\"zoom\", function () {\n                $$.redrawForZoom.call($$);\n            })\n            .on('zoomend', function () {\n                var event = d3.event.sourceEvent;\n                // if click, do nothing. otherwise, click interaction will be canceled.\n                if (event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY) {\n                    return;\n                }\n                $$.redrawEventRect();\n                $$.updateZoom();\n                config.zoom_onzoomend.call($$.api, $$.x.orgDomain());\n            });\n        $$.zoom.scale = function (scale) {\n            return config.axis_rotated ? this.y(scale) : this.x(scale);\n        };\n        $$.zoom.orgScaleExtent = function () {\n            var extent = config.zoom_extent ? config.zoom_extent : [1, 10];\n            return [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])];\n        };\n        $$.zoom.updateScaleExtent = function () {\n            var ratio = diffDomain($$.x.orgDomain()) / diffDomain($$.getZoomDomain()),\n                extent = this.orgScaleExtent();\n            this.scaleExtent([extent[0] * ratio, extent[1] * ratio]);\n            return this;\n        };\n    };\n    c3_chart_internal_fn.getZoomDomain = function () {\n        var $$ = this, config = $$.config, d3 = $$.d3,\n            min = d3.min([$$.orgXDomain[0], config.zoom_x_min]),\n            max = d3.max([$$.orgXDomain[1], config.zoom_x_max]);\n        return [min, max];\n    };\n    c3_chart_internal_fn.updateZoom = function () {\n        var $$ = this, z = $$.config.zoom_enabled ? $$.zoom : function () {};\n        $$.main.select('.' + CLASS.zoomRect).call(z).on(\"dblclick.zoom\", null);\n        $$.main.selectAll('.' + CLASS.eventRect).call(z).on(\"dblclick.zoom\", null);\n    };\n    c3_chart_internal_fn.redrawForZoom = function () {\n        var $$ = this, d3 = $$.d3, config = $$.config, zoom = $$.zoom, x = $$.x;\n        if (!config.zoom_enabled) {\n            return;\n        }\n        if ($$.filterTargetsToShow($$.data.targets).length === 0) {\n            return;\n        }\n        if (d3.event.sourceEvent.type === 'mousemove' && zoom.altDomain) {\n            x.domain(zoom.altDomain);\n            zoom.scale(x).updateScaleExtent();\n            return;\n        }\n        if ($$.isCategorized() && x.orgDomain()[0] === $$.orgXDomain[0]) {\n            x.domain([$$.orgXDomain[0] - 1e-10, x.orgDomain()[1]]);\n        }\n        $$.redraw({\n            withTransition: false,\n            withY: config.zoom_rescale,\n            withSubchart: false,\n            withEventRect: false,\n            withDimension: false\n        });\n        if (d3.event.sourceEvent.type === 'mousemove') {\n            $$.cancelClick = true;\n        }\n        config.zoom_onzoom.call($$.api, x.orgDomain());\n    };\n\n    c3_chart_internal_fn.generateColor = function () {\n        var $$ = this, config = $$.config, d3 = $$.d3,\n            colors = config.data_colors,\n            pattern = notEmpty(config.color_pattern) ? config.color_pattern : d3.scale.category10().range(),\n            callback = config.data_color,\n            ids = [];\n\n        return function (d) {\n            var id = d.id || (d.data && d.data.id) || d, color;\n\n            // if callback function is provided\n            if (colors[id] instanceof Function) {\n                color = colors[id](d);\n            }\n            // if specified, choose that color\n            else if (colors[id]) {\n                color = colors[id];\n            }\n            // if not specified, choose from pattern\n            else {\n                if (ids.indexOf(id) < 0) { ids.push(id); }\n                color = pattern[ids.indexOf(id) % pattern.length];\n                colors[id] = color;\n            }\n            return callback instanceof Function ? callback(color, d) : color;\n        };\n    };\n    c3_chart_internal_fn.generateLevelColor = function () {\n        var $$ = this, config = $$.config,\n            colors = config.color_pattern,\n            threshold = config.color_threshold,\n            asValue = threshold.unit === 'value',\n            values = threshold.values && threshold.values.length ? threshold.values : [],\n            max = threshold.max || 100;\n        return notEmpty(config.color_threshold) ? function (value) {\n            var i, v, color = colors[colors.length - 1];\n            for (i = 0; i < values.length; i++) {\n                v = asValue ? value : (value * 100 / max);\n                if (v < values[i]) {\n                    color = colors[i];\n                    break;\n                }\n            }\n            return color;\n        } : null;\n    };\n\n    c3_chart_internal_fn.getYFormat = function (forArc) {\n        var $$ = this,\n            formatForY = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.yFormat,\n            formatForY2 = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.y2Format;\n        return function (v, ratio, id) {\n            var format = $$.axis.getId(id) === 'y2' ? formatForY2 : formatForY;\n            return format.call($$, v, ratio);\n        };\n    };\n    c3_chart_internal_fn.yFormat = function (v) {\n        var $$ = this, config = $$.config,\n            format = config.axis_y_tick_format ? config.axis_y_tick_format : $$.defaultValueFormat;\n        return format(v);\n    };\n    c3_chart_internal_fn.y2Format = function (v) {\n        var $$ = this, config = $$.config,\n            format = config.axis_y2_tick_format ? config.axis_y2_tick_format : $$.defaultValueFormat;\n        return format(v);\n    };\n    c3_chart_internal_fn.defaultValueFormat = function (v) {\n        return isValue(v) ? +v : \"\";\n    };\n    c3_chart_internal_fn.defaultArcValueFormat = function (v, ratio) {\n        return (ratio * 100).toFixed(1) + '%';\n    };\n    c3_chart_internal_fn.dataLabelFormat = function (targetId) {\n        var $$ = this, data_labels = $$.config.data_labels,\n            format, defaultFormat = function (v) { return isValue(v) ? +v : \"\"; };\n        // find format according to axis id\n        if (typeof data_labels.format === 'function') {\n            format = data_labels.format;\n        } else if (typeof data_labels.format === 'object') {\n            if (data_labels.format[targetId]) {\n                format = data_labels.format[targetId] === true ? defaultFormat : data_labels.format[targetId];\n            } else {\n                format = function () { return ''; };\n            }\n        } else {\n            format = defaultFormat;\n        }\n        return format;\n    };\n\n    c3_chart_internal_fn.hasCaches = function (ids) {\n        for (var i = 0; i < ids.length; i++) {\n            if (! (ids[i] in this.cache)) { return false; }\n        }\n        return true;\n    };\n    c3_chart_internal_fn.addCache = function (id, target) {\n        this.cache[id] = this.cloneTarget(target);\n    };\n    c3_chart_internal_fn.getCaches = function (ids) {\n        var targets = [], i;\n        for (i = 0; i < ids.length; i++) {\n            if (ids[i] in this.cache) { targets.push(this.cloneTarget(this.cache[ids[i]])); }\n        }\n        return targets;\n    };\n\n    var CLASS = c3_chart_internal_fn.CLASS = {\n        target: 'c3-target',\n        chart: 'c3-chart',\n        chartLine: 'c3-chart-line',\n        chartLines: 'c3-chart-lines',\n        chartBar: 'c3-chart-bar',\n        chartBars: 'c3-chart-bars',\n        chartText: 'c3-chart-text',\n        chartTexts: 'c3-chart-texts',\n        chartArc: 'c3-chart-arc',\n        chartArcs: 'c3-chart-arcs',\n        chartArcsTitle: 'c3-chart-arcs-title',\n        chartArcsBackground: 'c3-chart-arcs-background',\n        chartArcsGaugeUnit: 'c3-chart-arcs-gauge-unit',\n        chartArcsGaugeMax: 'c3-chart-arcs-gauge-max',\n        chartArcsGaugeMin: 'c3-chart-arcs-gauge-min',\n        selectedCircle: 'c3-selected-circle',\n        selectedCircles: 'c3-selected-circles',\n        eventRect: 'c3-event-rect',\n        eventRects: 'c3-event-rects',\n        eventRectsSingle: 'c3-event-rects-single',\n        eventRectsMultiple: 'c3-event-rects-multiple',\n        zoomRect: 'c3-zoom-rect',\n        brush: 'c3-brush',\n        focused: 'c3-focused',\n        defocused: 'c3-defocused',\n        region: 'c3-region',\n        regions: 'c3-regions',\n        title: 'c3-title',\n        tooltipContainer: 'c3-tooltip-container',\n        tooltip: 'c3-tooltip',\n        tooltipName: 'c3-tooltip-name',\n        shape: 'c3-shape',\n        shapes: 'c3-shapes',\n        line: 'c3-line',\n        lines: 'c3-lines',\n        bar: 'c3-bar',\n        bars: 'c3-bars',\n        circle: 'c3-circle',\n        circles: 'c3-circles',\n        arc: 'c3-arc',\n        arcs: 'c3-arcs',\n        area: 'c3-area',\n        areas: 'c3-areas',\n        empty: 'c3-empty',\n        text: 'c3-text',\n        texts: 'c3-texts',\n        gaugeValue: 'c3-gauge-value',\n        grid: 'c3-grid',\n        gridLines: 'c3-grid-lines',\n        xgrid: 'c3-xgrid',\n        xgrids: 'c3-xgrids',\n        xgridLine: 'c3-xgrid-line',\n        xgridLines: 'c3-xgrid-lines',\n        xgridFocus: 'c3-xgrid-focus',\n        ygrid: 'c3-ygrid',\n        ygrids: 'c3-ygrids',\n        ygridLine: 'c3-ygrid-line',\n        ygridLines: 'c3-ygrid-lines',\n        axis: 'c3-axis',\n        axisX: 'c3-axis-x',\n        axisXLabel: 'c3-axis-x-label',\n        axisY: 'c3-axis-y',\n        axisYLabel: 'c3-axis-y-label',\n        axisY2: 'c3-axis-y2',\n        axisY2Label: 'c3-axis-y2-label',\n        legendBackground: 'c3-legend-background',\n        legendItem: 'c3-legend-item',\n        legendItemEvent: 'c3-legend-item-event',\n        legendItemTile: 'c3-legend-item-tile',\n        legendItemHidden: 'c3-legend-item-hidden',\n        legendItemFocused: 'c3-legend-item-focused',\n        dragarea: 'c3-dragarea',\n        EXPANDED: '_expanded_',\n        SELECTED: '_selected_',\n        INCLUDED: '_included_'\n    };\n    c3_chart_internal_fn.generateClass = function (prefix, targetId) {\n        return \" \" + prefix + \" \" + prefix + this.getTargetSelectorSuffix(targetId);\n    };\n    c3_chart_internal_fn.classText = function (d) {\n        return this.generateClass(CLASS.text, d.index);\n    };\n    c3_chart_internal_fn.classTexts = function (d) {\n        return this.generateClass(CLASS.texts, d.id);\n    };\n    c3_chart_internal_fn.classShape = function (d) {\n        return this.generateClass(CLASS.shape, d.index);\n    };\n    c3_chart_internal_fn.classShapes = function (d) {\n        return this.generateClass(CLASS.shapes, d.id);\n    };\n    c3_chart_internal_fn.classLine = function (d) {\n        return this.classShape(d) + this.generateClass(CLASS.line, d.id);\n    };\n    c3_chart_internal_fn.classLines = function (d) {\n        return this.classShapes(d) + this.generateClass(CLASS.lines, d.id);\n    };\n    c3_chart_internal_fn.classCircle = function (d) {\n        return this.classShape(d) + this.generateClass(CLASS.circle, d.index);\n    };\n    c3_chart_internal_fn.classCircles = function (d) {\n        return this.classShapes(d) + this.generateClass(CLASS.circles, d.id);\n    };\n    c3_chart_internal_fn.classBar = function (d) {\n        return this.classShape(d) + this.generateClass(CLASS.bar, d.index);\n    };\n    c3_chart_internal_fn.classBars = function (d) {\n        return this.classShapes(d) + this.generateClass(CLASS.bars, d.id);\n    };\n    c3_chart_internal_fn.classArc = function (d) {\n        return this.classShape(d.data) + this.generateClass(CLASS.arc, d.data.id);\n    };\n    c3_chart_internal_fn.classArcs = function (d) {\n        return this.classShapes(d.data) + this.generateClass(CLASS.arcs, d.data.id);\n    };\n    c3_chart_internal_fn.classArea = function (d) {\n        return this.classShape(d) + this.generateClass(CLASS.area, d.id);\n    };\n    c3_chart_internal_fn.classAreas = function (d) {\n        return this.classShapes(d) + this.generateClass(CLASS.areas, d.id);\n    };\n    c3_chart_internal_fn.classRegion = function (d, i) {\n        return this.generateClass(CLASS.region, i) + ' ' + ('class' in d ? d['class'] : '');\n    };\n    c3_chart_internal_fn.classEvent = function (d) {\n        return this.generateClass(CLASS.eventRect, d.index);\n    };\n    c3_chart_internal_fn.classTarget = function (id) {\n        var $$ = this;\n        var additionalClassSuffix = $$.config.data_classes[id], additionalClass = '';\n        if (additionalClassSuffix) {\n            additionalClass = ' ' + CLASS.target + '-' + additionalClassSuffix;\n        }\n        return $$.generateClass(CLASS.target, id) + additionalClass;\n    };\n    c3_chart_internal_fn.classFocus = function (d) {\n        return this.classFocused(d) + this.classDefocused(d);\n    };\n    c3_chart_internal_fn.classFocused = function (d) {\n        return ' ' + (this.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : '');\n    };\n    c3_chart_internal_fn.classDefocused = function (d) {\n        return ' ' + (this.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : '');\n    };\n    c3_chart_internal_fn.classChartText = function (d) {\n        return CLASS.chartText + this.classTarget(d.id);\n    };\n    c3_chart_internal_fn.classChartLine = function (d) {\n        return CLASS.chartLine + this.classTarget(d.id);\n    };\n    c3_chart_internal_fn.classChartBar = function (d) {\n        return CLASS.chartBar + this.classTarget(d.id);\n    };\n    c3_chart_internal_fn.classChartArc = function (d) {\n        return CLASS.chartArc + this.classTarget(d.data.id);\n    };\n    c3_chart_internal_fn.getTargetSelectorSuffix = function (targetId) {\n        return targetId || targetId === 0 ? ('-' + targetId).replace(/[\\s?!@#$%^&*()_=+,.<>'\":;\\[\\]\\/|~`{}\\\\]/g, '-') : '';\n    };\n    c3_chart_internal_fn.selectorTarget = function (id, prefix) {\n        return (prefix || '') + '.' + CLASS.target + this.getTargetSelectorSuffix(id);\n    };\n    c3_chart_internal_fn.selectorTargets = function (ids, prefix) {\n        var $$ = this;\n        ids = ids || [];\n        return ids.length ? ids.map(function (id) { return $$.selectorTarget(id, prefix); }) : null;\n    };\n    c3_chart_internal_fn.selectorLegend = function (id) {\n        return '.' + CLASS.legendItem + this.getTargetSelectorSuffix(id);\n    };\n    c3_chart_internal_fn.selectorLegends = function (ids) {\n        var $$ = this;\n        return ids && ids.length ? ids.map(function (id) { return $$.selectorLegend(id); }) : null;\n    };\n\n    var isValue = c3_chart_internal_fn.isValue = function (v) {\n        return v || v === 0;\n    },\n        isFunction = c3_chart_internal_fn.isFunction = function (o) {\n            return typeof o === 'function';\n        },\n        isString = c3_chart_internal_fn.isString = function (o) {\n            return typeof o === 'string';\n        },\n        isUndefined = c3_chart_internal_fn.isUndefined = function (v) {\n            return typeof v === 'undefined';\n        },\n        isDefined = c3_chart_internal_fn.isDefined = function (v) {\n            return typeof v !== 'undefined';\n        },\n        ceil10 = c3_chart_internal_fn.ceil10 = function (v) {\n            return Math.ceil(v / 10) * 10;\n        },\n        asHalfPixel = c3_chart_internal_fn.asHalfPixel = function (n) {\n            return Math.ceil(n) + 0.5;\n        },\n        diffDomain = c3_chart_internal_fn.diffDomain = function (d) {\n            return d[1] - d[0];\n        },\n        isEmpty = c3_chart_internal_fn.isEmpty = function (o) {\n            return typeof o === 'undefined' || o === null || (isString(o) && o.length === 0) || (typeof o === 'object' && Object.keys(o).length === 0);\n        },\n        notEmpty = c3_chart_internal_fn.notEmpty = function (o) {\n            return !c3_chart_internal_fn.isEmpty(o);\n        },\n        getOption = c3_chart_internal_fn.getOption = function (options, key, defaultValue) {\n            return isDefined(options[key]) ? options[key] : defaultValue;\n        },\n        hasValue = c3_chart_internal_fn.hasValue = function (dict, value) {\n            var found = false;\n            Object.keys(dict).forEach(function (key) {\n                if (dict[key] === value) { found = true; }\n            });\n            return found;\n        },\n        sanitise = c3_chart_internal_fn.sanitise = function (str) {\n            return typeof str === 'string' ? str.replace(/</g, '&lt;').replace(/>/g, '&gt;') : str;\n        },\n        getPathBox = c3_chart_internal_fn.getPathBox = function (path) {\n            var box = path.getBoundingClientRect(),\n                items = [path.pathSegList.getItem(0), path.pathSegList.getItem(1)],\n                minX = items[0].x, minY = Math.min(items[0].y, items[1].y);\n            return {x: minX, y: minY, width: box.width, height: box.height};\n        };\n\n    c3_chart_fn.focus = function (targetIds) {\n        var $$ = this.internal, candidates;\n\n        targetIds = $$.mapToTargetIds(targetIds);\n        candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))),\n\n        this.revert();\n        this.defocus();\n        candidates.classed(CLASS.focused, true).classed(CLASS.defocused, false);\n        if ($$.hasArcType()) {\n            $$.expandArc(targetIds);\n        }\n        $$.toggleFocusLegend(targetIds, true);\n\n        $$.focusedTargetIds = targetIds;\n        $$.defocusedTargetIds = $$.defocusedTargetIds.filter(function (id) {\n            return targetIds.indexOf(id) < 0;\n        });\n    };\n\n    c3_chart_fn.defocus = function (targetIds) {\n        var $$ = this.internal, candidates;\n\n        targetIds = $$.mapToTargetIds(targetIds);\n        candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))),\n\n        candidates.classed(CLASS.focused, false).classed(CLASS.defocused, true);\n        if ($$.hasArcType()) {\n            $$.unexpandArc(targetIds);\n        }\n        $$.toggleFocusLegend(targetIds, false);\n\n        $$.focusedTargetIds = $$.focusedTargetIds.filter(function (id) {\n            return targetIds.indexOf(id) < 0;\n        });\n        $$.defocusedTargetIds = targetIds;\n    };\n\n    c3_chart_fn.revert = function (targetIds) {\n        var $$ = this.internal, candidates;\n\n        targetIds = $$.mapToTargetIds(targetIds);\n        candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); // should be for all targets\n\n        candidates.classed(CLASS.focused, false).classed(CLASS.defocused, false);\n        if ($$.hasArcType()) {\n            $$.unexpandArc(targetIds);\n        }\n        if ($$.config.legend_show) {\n            $$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));\n            $$.legend.selectAll($$.selectorLegends(targetIds))\n                .filter(function () {\n                    return $$.d3.select(this).classed(CLASS.legendItemFocused);\n                })\n                .classed(CLASS.legendItemFocused, false);\n        }\n\n        $$.focusedTargetIds = [];\n        $$.defocusedTargetIds = [];\n    };\n\n    c3_chart_fn.show = function (targetIds, options) {\n        var $$ = this.internal, targets;\n\n        targetIds = $$.mapToTargetIds(targetIds);\n        options = options || {};\n\n        $$.removeHiddenTargetIds(targetIds);\n        targets = $$.svg.selectAll($$.selectorTargets(targetIds));\n\n        targets.transition()\n            .style('opacity', 1, 'important')\n            .call($$.endall, function () {\n                targets.style('opacity', null).style('opacity', 1);\n            });\n\n        if (options.withLegend) {\n            $$.showLegend(targetIds);\n        }\n\n        $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});\n    };\n\n    c3_chart_fn.hide = function (targetIds, options) {\n        var $$ = this.internal, targets;\n\n        targetIds = $$.mapToTargetIds(targetIds);\n        options = options || {};\n\n        $$.addHiddenTargetIds(targetIds);\n        targets = $$.svg.selectAll($$.selectorTargets(targetIds));\n\n        targets.transition()\n            .style('opacity', 0, 'important')\n            .call($$.endall, function () {\n                targets.style('opacity', null).style('opacity', 0);\n            });\n\n        if (options.withLegend) {\n            $$.hideLegend(targetIds);\n        }\n\n        $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});\n    };\n\n    c3_chart_fn.toggle = function (targetIds, options) {\n        var that = this, $$ = this.internal;\n        $$.mapToTargetIds(targetIds).forEach(function (targetId) {\n            $$.isTargetToShow(targetId) ? that.hide(targetId, options) : that.show(targetId, options);\n        });\n    };\n\n    c3_chart_fn.zoom = function (domain) {\n        var $$ = this.internal;\n        if (domain) {\n            if ($$.isTimeSeries()) {\n                domain = domain.map(function (x) { return $$.parseDate(x); });\n            }\n            $$.brush.extent(domain);\n            $$.redraw({withUpdateXDomain: true, withY: $$.config.zoom_rescale});\n            $$.config.zoom_onzoom.call(this, $$.x.orgDomain());\n        }\n        return $$.brush.extent();\n    };\n    c3_chart_fn.zoom.enable = function (enabled) {\n        var $$ = this.internal;\n        $$.config.zoom_enabled = enabled;\n        $$.updateAndRedraw();\n    };\n    c3_chart_fn.unzoom = function () {\n        var $$ = this.internal;\n        $$.brush.clear().update();\n        $$.redraw({withUpdateXDomain: true});\n    };\n\n    c3_chart_fn.zoom.max = function (max) {\n        var $$ = this.internal, config = $$.config, d3 = $$.d3;\n        if (max === 0 || max) {\n            config.zoom_x_max = d3.max([$$.orgXDomain[1], max]);\n        }\n        else {\n            return config.zoom_x_max;\n        }\n    };\n\n    c3_chart_fn.zoom.min = function (min) {\n        var $$ = this.internal, config = $$.config, d3 = $$.d3;\n        if (min === 0 || min) {\n            config.zoom_x_min = d3.min([$$.orgXDomain[0], min]);\n        }\n        else {\n            return config.zoom_x_min;\n        }\n    };\n\n    c3_chart_fn.zoom.range = function (range) {\n        if (arguments.length) {\n            if (isDefined(range.max)) { this.domain.max(range.max); }\n            if (isDefined(range.min)) { this.domain.min(range.min); }\n        } else {\n            return {\n                max: this.domain.max(),\n                min: this.domain.min()\n            };\n        }\n    };\n\n    c3_chart_fn.load = function (args) {\n        var $$ = this.internal, config = $$.config;\n        // update xs if specified\n        if (args.xs) {\n            $$.addXs(args.xs);\n        }\n        // update names if exists\n        if ('names' in args) {\n            c3_chart_fn.data.names.bind(this)(args.names);\n        }\n        // update classes if exists\n        if ('classes' in args) {\n            Object.keys(args.classes).forEach(function (id) {\n                config.data_classes[id] = args.classes[id];\n            });\n        }\n        // update categories if exists\n        if ('categories' in args && $$.isCategorized()) {\n            config.axis_x_categories = args.categories;\n        }\n        // update axes if exists\n        if ('axes' in args) {\n            Object.keys(args.axes).forEach(function (id) {\n                config.data_axes[id] = args.axes[id];\n            });\n        }\n        // update colors if exists\n        if ('colors' in args) {\n            Object.keys(args.colors).forEach(function (id) {\n                config.data_colors[id] = args.colors[id];\n            });\n        }\n        // use cache if exists\n        if ('cacheIds' in args && $$.hasCaches(args.cacheIds)) {\n            $$.load($$.getCaches(args.cacheIds), args.done);\n            return;\n        }\n        // unload if needed\n        if ('unload' in args) {\n            // TODO: do not unload if target will load (included in url/rows/columns)\n            $$.unload($$.mapToTargetIds((typeof args.unload === 'boolean' && args.unload) ? null : args.unload), function () {\n                $$.loadFromArgs(args);\n            });\n        } else {\n            $$.loadFromArgs(args);\n        }\n    };\n\n    c3_chart_fn.unload = function (args) {\n        var $$ = this.internal;\n        args = args || {};\n        if (args instanceof Array) {\n            args = {ids: args};\n        } else if (typeof args === 'string') {\n            args = {ids: [args]};\n        }\n        $$.unload($$.mapToTargetIds(args.ids), function () {\n            $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});\n            if (args.done) { args.done(); }\n        });\n    };\n\n    c3_chart_fn.flow = function (args) {\n        var $$ = this.internal,\n            targets, data, notfoundIds = [], orgDataCount = $$.getMaxDataCount(),\n            dataCount, domain, baseTarget, baseValue, length = 0, tail = 0, diff, to;\n\n        if (args.json) {\n            data = $$.convertJsonToData(args.json, args.keys);\n        }\n        else if (args.rows) {\n            data = $$.convertRowsToData(args.rows);\n        }\n        else if (args.columns) {\n            data = $$.convertColumnsToData(args.columns);\n        }\n        else {\n            return;\n        }\n        targets = $$.convertDataToTargets(data, true);\n\n        // Update/Add data\n        $$.data.targets.forEach(function (t) {\n            var found = false, i, j;\n            for (i = 0; i < targets.length; i++) {\n                if (t.id === targets[i].id) {\n                    found = true;\n\n                    if (t.values[t.values.length - 1]) {\n                        tail = t.values[t.values.length - 1].index + 1;\n                    }\n                    length = targets[i].values.length;\n\n                    for (j = 0; j < length; j++) {\n                        targets[i].values[j].index = tail + j;\n                        if (!$$.isTimeSeries()) {\n                            targets[i].values[j].x = tail + j;\n                        }\n                    }\n                    t.values = t.values.concat(targets[i].values);\n\n                    targets.splice(i, 1);\n                    break;\n                }\n            }\n            if (!found) { notfoundIds.push(t.id); }\n        });\n\n        // Append null for not found targets\n        $$.data.targets.forEach(function (t) {\n            var i, j;\n            for (i = 0; i < notfoundIds.length; i++) {\n                if (t.id === notfoundIds[i]) {\n                    tail = t.values[t.values.length - 1].index + 1;\n                    for (j = 0; j < length; j++) {\n                        t.values.push({\n                            id: t.id,\n                            index: tail + j,\n                            x: $$.isTimeSeries() ? $$.getOtherTargetX(tail + j) : tail + j,\n                            value: null\n                        });\n                    }\n                }\n            }\n        });\n\n        // Generate null values for new target\n        if ($$.data.targets.length) {\n            targets.forEach(function (t) {\n                var i, missing = [];\n                for (i = $$.data.targets[0].values[0].index; i < tail; i++) {\n                    missing.push({\n                        id: t.id,\n                        index: i,\n                        x: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i,\n                        value: null\n                    });\n                }\n                t.values.forEach(function (v) {\n                    v.index += tail;\n                    if (!$$.isTimeSeries()) {\n                        v.x += tail;\n                    }\n                });\n                t.values = missing.concat(t.values);\n            });\n        }\n        $$.data.targets = $$.data.targets.concat(targets); // add remained\n\n        // check data count because behavior needs to change when it's only one\n        dataCount = $$.getMaxDataCount();\n        baseTarget = $$.data.targets[0];\n        baseValue = baseTarget.values[0];\n\n        // Update length to flow if needed\n        if (isDefined(args.to)) {\n            length = 0;\n            to = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to;\n            baseTarget.values.forEach(function (v) {\n                if (v.x < to) { length++; }\n            });\n        } else if (isDefined(args.length)) {\n            length = args.length;\n        }\n\n        // If only one data, update the domain to flow from left edge of the chart\n        if (!orgDataCount) {\n            if ($$.isTimeSeries()) {\n                if (baseTarget.values.length > 1) {\n                    diff = baseTarget.values[baseTarget.values.length - 1].x - baseValue.x;\n                } else {\n                    diff = baseValue.x - $$.getXDomain($$.data.targets)[0];\n                }\n            } else {\n                diff = 1;\n            }\n            domain = [baseValue.x - diff, baseValue.x];\n            $$.updateXDomain(null, true, true, false, domain);\n        } else if (orgDataCount === 1) {\n            if ($$.isTimeSeries()) {\n                diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2;\n                domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)];\n                $$.updateXDomain(null, true, true, false, domain);\n            }\n        }\n\n        // Set targets\n        $$.updateTargets($$.data.targets);\n\n        // Redraw with new targets\n        $$.redraw({\n            flow: {\n                index: baseValue.index,\n                length: length,\n                duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,\n                done: args.done,\n                orgDataCount: orgDataCount,\n            },\n            withLegend: true,\n            withTransition: orgDataCount > 1,\n            withTrimXDomain: false,\n            withUpdateXAxis: true,\n        });\n    };\n\n    c3_chart_internal_fn.generateFlow = function (args) {\n        var $$ = this, config = $$.config, d3 = $$.d3;\n\n        return function () {\n            var targets = args.targets,\n                flow = args.flow,\n                drawBar = args.drawBar,\n                drawLine = args.drawLine,\n                drawArea = args.drawArea,\n                cx = args.cx,\n                cy = args.cy,\n                xv = args.xv,\n                xForText = args.xForText,\n                yForText = args.yForText,\n                duration = args.duration;\n\n            var translateX, scaleX = 1, transform,\n                flowIndex = flow.index,\n                flowLength = flow.length,\n                flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex),\n                flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength),\n                orgDomain = $$.x.domain(), domain,\n                durationForFlow = flow.duration || duration,\n                done = flow.done || function () {},\n                wait = $$.generateWait();\n\n            var xgrid = $$.xgrid || d3.selectAll([]),\n                xgridLines = $$.xgridLines || d3.selectAll([]),\n                mainRegion = $$.mainRegion || d3.selectAll([]),\n                mainText = $$.mainText || d3.selectAll([]),\n                mainBar = $$.mainBar || d3.selectAll([]),\n                mainLine = $$.mainLine || d3.selectAll([]),\n                mainArea = $$.mainArea || d3.selectAll([]),\n                mainCircle = $$.mainCircle || d3.selectAll([]);\n\n            // set flag\n            $$.flowing = true;\n\n            // remove head data after rendered\n            $$.data.targets.forEach(function (d) {\n                d.values.splice(0, flowLength);\n            });\n\n            // update x domain to generate axis elements for flow\n            domain = $$.updateXDomain(targets, true, true);\n            // update elements related to x scale\n            if ($$.updateXGrid) { $$.updateXGrid(true); }\n\n            // generate transform to flow\n            if (!flow.orgDataCount) { // if empty\n                if ($$.data.targets[0].values.length !== 1) {\n                    translateX = $$.x(orgDomain[0]) - $$.x(domain[0]);\n                } else {\n                    if ($$.isTimeSeries()) {\n                        flowStart = $$.getValueOnIndex($$.data.targets[0].values, 0);\n                        flowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1);\n                        translateX = $$.x(flowStart.x) - $$.x(flowEnd.x);\n                    } else {\n                        translateX = diffDomain(domain) / 2;\n                    }\n                }\n            } else if (flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x)) {\n                translateX = $$.x(orgDomain[0]) - $$.x(domain[0]);\n            } else {\n                if ($$.isTimeSeries()) {\n                    translateX = ($$.x(orgDomain[0]) - $$.x(domain[0]));\n                } else {\n                    translateX = ($$.x(flowStart.x) - $$.x(flowEnd.x));\n                }\n            }\n            scaleX = (diffDomain(orgDomain) / diffDomain(domain));\n            transform = 'translate(' + translateX + ',0) scale(' + scaleX + ',1)';\n\n            $$.hideXGridFocus();\n\n            d3.transition().ease('linear').duration(durationForFlow).each(function () {\n                wait.add($$.axes.x.transition().call($$.xAxis));\n                wait.add(mainBar.transition().attr('transform', transform));\n                wait.add(mainLine.transition().attr('transform', transform));\n                wait.add(mainArea.transition().attr('transform', transform));\n                wait.add(mainCircle.transition().attr('transform', transform));\n                wait.add(mainText.transition().attr('transform', transform));\n                wait.add(mainRegion.filter($$.isRegionOnX).transition().attr('transform', transform));\n                wait.add(xgrid.transition().attr('transform', transform));\n                wait.add(xgridLines.transition().attr('transform', transform));\n            })\n            .call(wait, function () {\n                var i, shapes = [], texts = [], eventRects = [];\n\n                // remove flowed elements\n                if (flowLength) {\n                    for (i = 0; i < flowLength; i++) {\n                        shapes.push('.' + CLASS.shape + '-' + (flowIndex + i));\n                        texts.push('.' + CLASS.text + '-' + (flowIndex + i));\n                        eventRects.push('.' + CLASS.eventRect + '-' + (flowIndex + i));\n                    }\n                    $$.svg.selectAll('.' + CLASS.shapes).selectAll(shapes).remove();\n                    $$.svg.selectAll('.' + CLASS.texts).selectAll(texts).remove();\n                    $$.svg.selectAll('.' + CLASS.eventRects).selectAll(eventRects).remove();\n                    $$.svg.select('.' + CLASS.xgrid).remove();\n                }\n\n                // draw again for removing flowed elements and reverting attr\n                xgrid\n                    .attr('transform', null)\n                    .attr($$.xgridAttr);\n                xgridLines\n                    .attr('transform', null);\n                xgridLines.select('line')\n                    .attr(\"x1\", config.axis_rotated ? 0 : xv)\n                    .attr(\"x2\", config.axis_rotated ? $$.width : xv);\n                xgridLines.select('text')\n                    .attr(\"x\", config.axis_rotated ? $$.width : 0)\n                    .attr(\"y\", xv);\n                mainBar\n                    .attr('transform', null)\n                    .attr(\"d\", drawBar);\n                mainLine\n                    .attr('transform', null)\n                    .attr(\"d\", drawLine);\n                mainArea\n                    .attr('transform', null)\n                    .attr(\"d\", drawArea);\n                mainCircle\n                    .attr('transform', null)\n                    .attr(\"cx\", cx)\n                    .attr(\"cy\", cy);\n                mainText\n                    .attr('transform', null)\n                    .attr('x', xForText)\n                    .attr('y', yForText)\n                    .style('fill-opacity', $$.opacityForText.bind($$));\n                mainRegion\n                    .attr('transform', null);\n                mainRegion.select('rect').filter($$.isRegionOnX)\n                    .attr(\"x\", $$.regionX.bind($$))\n                    .attr(\"width\", $$.regionWidth.bind($$));\n\n                if (config.interaction_enabled) {\n                    $$.redrawEventRect();\n                }\n\n                // callback for end of flow\n                done();\n\n                $$.flowing = false;\n            });\n        };\n    };\n\n    c3_chart_fn.selected = function (targetId) {\n        var $$ = this.internal, d3 = $$.d3;\n        return d3.merge(\n            $$.main.selectAll('.' + CLASS.shapes + $$.getTargetSelectorSuffix(targetId)).selectAll('.' + CLASS.shape)\n                .filter(function () { return d3.select(this).classed(CLASS.SELECTED); })\n                .map(function (d) { return d.map(function (d) { var data = d.__data__; return data.data ? data.data : data; }); })\n        );\n    };\n    c3_chart_fn.select = function (ids, indices, resetOther) {\n        var $$ = this.internal, d3 = $$.d3, config = $$.config;\n        if (! config.data_selection_enabled) { return; }\n        $$.main.selectAll('.' + CLASS.shapes).selectAll('.' + CLASS.shape).each(function (d, i) {\n            var shape = d3.select(this), id = d.data ? d.data.id : d.id,\n                toggle = $$.getToggle(this, d).bind($$),\n                isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,\n                isTargetIndex = !indices || indices.indexOf(i) >= 0,\n                isSelected = shape.classed(CLASS.SELECTED);\n            // line/area selection not supported yet\n            if (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {\n                return;\n            }\n            if (isTargetId && isTargetIndex) {\n                if (config.data_selection_isselectable(d) && !isSelected) {\n                    toggle(true, shape.classed(CLASS.SELECTED, true), d, i);\n                }\n            } else if (isDefined(resetOther) && resetOther) {\n                if (isSelected) {\n                    toggle(false, shape.classed(CLASS.SELECTED, false), d, i);\n                }\n            }\n        });\n    };\n    c3_chart_fn.unselect = function (ids, indices) {\n        var $$ = this.internal, d3 = $$.d3, config = $$.config;\n        if (! config.data_selection_enabled) { return; }\n        $$.main.selectAll('.' + CLASS.shapes).selectAll('.' + CLASS.shape).each(function (d, i) {\n            var shape = d3.select(this), id = d.data ? d.data.id : d.id,\n                toggle = $$.getToggle(this, d).bind($$),\n                isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,\n                isTargetIndex = !indices || indices.indexOf(i) >= 0,\n                isSelected = shape.classed(CLASS.SELECTED);\n            // line/area selection not supported yet\n            if (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {\n                return;\n            }\n            if (isTargetId && isTargetIndex) {\n                if (config.data_selection_isselectable(d)) {\n                    if (isSelected) {\n                        toggle(false, shape.classed(CLASS.SELECTED, false), d, i);\n                    }\n                }\n            }\n        });\n    };\n\n    c3_chart_fn.transform = function (type, targetIds) {\n        var $$ = this.internal,\n            options = ['pie', 'donut'].indexOf(type) >= 0 ? {withTransform: true} : null;\n        $$.transformTo(targetIds, type, options);\n    };\n\n    c3_chart_internal_fn.transformTo = function (targetIds, type, optionsForRedraw) {\n        var $$ = this,\n            withTransitionForAxis = !$$.hasArcType(),\n            options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};\n        options.withTransitionForTransform = false;\n        $$.transiting = false;\n        $$.setTargetType(targetIds, type);\n        $$.updateTargets($$.data.targets); // this is needed when transforming to arc\n        $$.updateAndRedraw(options);\n    };\n\n    c3_chart_fn.groups = function (groups) {\n        var $$ = this.internal, config = $$.config;\n        if (isUndefined(groups)) { return config.data_groups; }\n        config.data_groups = groups;\n        $$.redraw();\n        return config.data_groups;\n    };\n\n    c3_chart_fn.xgrids = function (grids) {\n        var $$ = this.internal, config = $$.config;\n        if (! grids) { return config.grid_x_lines; }\n        config.grid_x_lines = grids;\n        $$.redrawWithoutRescale();\n        return config.grid_x_lines;\n    };\n    c3_chart_fn.xgrids.add = function (grids) {\n        var $$ = this.internal;\n        return this.xgrids($$.config.grid_x_lines.concat(grids ? grids : []));\n    };\n    c3_chart_fn.xgrids.remove = function (params) { // TODO: multiple\n        var $$ = this.internal;\n        $$.removeGridLines(params, true);\n    };\n\n    c3_chart_fn.ygrids = function (grids) {\n        var $$ = this.internal, config = $$.config;\n        if (! grids) { return config.grid_y_lines; }\n        config.grid_y_lines = grids;\n        $$.redrawWithoutRescale();\n        return config.grid_y_lines;\n    };\n    c3_chart_fn.ygrids.add = function (grids) {\n        var $$ = this.internal;\n        return this.ygrids($$.config.grid_y_lines.concat(grids ? grids : []));\n    };\n    c3_chart_fn.ygrids.remove = function (params) { // TODO: multiple\n        var $$ = this.internal;\n        $$.removeGridLines(params, false);\n    };\n\n    c3_chart_fn.regions = function (regions) {\n        var $$ = this.internal, config = $$.config;\n        if (!regions) { return config.regions; }\n        config.regions = regions;\n        $$.redrawWithoutRescale();\n        return config.regions;\n    };\n    c3_chart_fn.regions.add = function (regions) {\n        var $$ = this.internal, config = $$.config;\n        if (!regions) { return config.regions; }\n        config.regions = config.regions.concat(regions);\n        $$.redrawWithoutRescale();\n        return config.regions;\n    };\n    c3_chart_fn.regions.remove = function (options) {\n        var $$ = this.internal, config = $$.config,\n            duration, classes, regions;\n\n        options = options || {};\n        duration = $$.getOption(options, \"duration\", config.transition_duration);\n        classes = $$.getOption(options, \"classes\", [CLASS.region]);\n\n        regions = $$.main.select('.' + CLASS.regions).selectAll(classes.map(function (c) { return '.' + c; }));\n        (duration ? regions.transition().duration(duration) : regions)\n            .style('opacity', 0)\n            .remove();\n\n        config.regions = config.regions.filter(function (region) {\n            var found = false;\n            if (!region['class']) {\n                return true;\n            }\n            region['class'].split(' ').forEach(function (c) {\n                if (classes.indexOf(c) >= 0) { found = true; }\n            });\n            return !found;\n        });\n\n        return config.regions;\n    };\n\n    c3_chart_fn.data = function (targetIds) {\n        var targets = this.internal.data.targets;\n        return typeof targetIds === 'undefined' ? targets : targets.filter(function (t) {\n            return [].concat(targetIds).indexOf(t.id) >= 0;\n        });\n    };\n    c3_chart_fn.data.shown = function (targetIds) {\n        return this.internal.filterTargetsToShow(this.data(targetIds));\n    };\n    c3_chart_fn.data.values = function (targetId) {\n        var targets, values = null;\n        if (targetId) {\n            targets = this.data(targetId);\n            values = targets[0] ? targets[0].values.map(function (d) { return d.value; }) : null;\n        }\n        return values;\n    };\n    c3_chart_fn.data.names = function (names) {\n        this.internal.clearLegendItemTextBoxCache();\n        return this.internal.updateDataAttributes('names', names);\n    };\n    c3_chart_fn.data.colors = function (colors) {\n        return this.internal.updateDataAttributes('colors', colors);\n    };\n    c3_chart_fn.data.axes = function (axes) {\n        return this.internal.updateDataAttributes('axes', axes);\n    };\n\n    c3_chart_fn.category = function (i, category) {\n        var $$ = this.internal, config = $$.config;\n        if (arguments.length > 1) {\n            config.axis_x_categories[i] = category;\n            $$.redraw();\n        }\n        return config.axis_x_categories[i];\n    };\n    c3_chart_fn.categories = function (categories) {\n        var $$ = this.internal, config = $$.config;\n        if (!arguments.length) { return config.axis_x_categories; }\n        config.axis_x_categories = categories;\n        $$.redraw();\n        return config.axis_x_categories;\n    };\n\n    // TODO: fix\n    c3_chart_fn.color = function (id) {\n        var $$ = this.internal;\n        return $$.color(id); // more patterns\n    };\n\n    c3_chart_fn.x = function (x) {\n        var $$ = this.internal;\n        if (arguments.length) {\n            $$.updateTargetX($$.data.targets, x);\n            $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true});\n        }\n        return $$.data.xs;\n    };\n    c3_chart_fn.xs = function (xs) {\n        var $$ = this.internal;\n        if (arguments.length) {\n            $$.updateTargetXs($$.data.targets, xs);\n            $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true});\n        }\n        return $$.data.xs;\n    };\n\n    c3_chart_fn.axis = function () {};\n    c3_chart_fn.axis.labels = function (labels) {\n        var $$ = this.internal;\n        if (arguments.length) {\n            Object.keys(labels).forEach(function (axisId) {\n                $$.axis.setLabelText(axisId, labels[axisId]);\n            });\n            $$.axis.updateLabels();\n        }\n        // TODO: return some values?\n    };\n    c3_chart_fn.axis.max = function (max) {\n        var $$ = this.internal, config = $$.config;\n        if (arguments.length) {\n            if (typeof max === 'object') {\n                if (isValue(max.x)) { config.axis_x_max = max.x; }\n                if (isValue(max.y)) { config.axis_y_max = max.y; }\n                if (isValue(max.y2)) { config.axis_y2_max = max.y2; }\n            } else {\n                config.axis_y_max = config.axis_y2_max = max;\n            }\n            $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true});\n        } else {\n            return {\n                x: config.axis_x_max,\n                y: config.axis_y_max,\n                y2: config.axis_y2_max\n            };\n        }\n    };\n    c3_chart_fn.axis.min = function (min) {\n        var $$ = this.internal, config = $$.config;\n        if (arguments.length) {\n            if (typeof min === 'object') {\n                if (isValue(min.x)) { config.axis_x_min = min.x; }\n                if (isValue(min.y)) { config.axis_y_min = min.y; }\n                if (isValue(min.y2)) { config.axis_y2_min = min.y2; }\n            } else {\n                config.axis_y_min = config.axis_y2_min = min;\n            }\n            $$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true});\n        } else {\n            return {\n                x: config.axis_x_min,\n                y: config.axis_y_min,\n                y2: config.axis_y2_min\n            };\n        }\n    };\n    c3_chart_fn.axis.range = function (range) {\n        if (arguments.length) {\n            if (isDefined(range.max)) { this.axis.max(range.max); }\n            if (isDefined(range.min)) { this.axis.min(range.min); }\n        } else {\n            return {\n                max: this.axis.max(),\n                min: this.axis.min()\n            };\n        }\n    };\n\n    c3_chart_fn.legend = function () {};\n    c3_chart_fn.legend.show = function (targetIds) {\n        var $$ = this.internal;\n        $$.showLegend($$.mapToTargetIds(targetIds));\n        $$.updateAndRedraw({withLegend: true});\n    };\n    c3_chart_fn.legend.hide = function (targetIds) {\n        var $$ = this.internal;\n        $$.hideLegend($$.mapToTargetIds(targetIds));\n        $$.updateAndRedraw({withLegend: true});\n    };\n\n    c3_chart_fn.resize = function (size) {\n        var $$ = this.internal, config = $$.config;\n        config.size_width = size ? size.width : null;\n        config.size_height = size ? size.height : null;\n        this.flush();\n    };\n\n    c3_chart_fn.flush = function () {\n        var $$ = this.internal;\n        $$.updateAndRedraw({withLegend: true, withTransition: false, withTransitionForTransform: false});\n    };\n\n    c3_chart_fn.destroy = function () {\n        var $$ = this.internal;\n\n        window.clearInterval($$.intervalForObserveInserted);\n\n        if ($$.resizeTimeout !== undefined) {\n            window.clearTimeout($$.resizeTimeout);\n        }\n\n        if (window.detachEvent) {\n            window.detachEvent('onresize', $$.resizeFunction);\n        } else if (window.removeEventListener) {\n            window.removeEventListener('resize', $$.resizeFunction);\n        } else {\n            var wrapper = window.onresize;\n            // check if no one else removed our wrapper and remove our resizeFunction from it\n            if (wrapper && wrapper.add && wrapper.remove) {\n                wrapper.remove($$.resizeFunction);\n            }\n        }\n\n        $$.selectChart.classed('c3', false).html(\"\");\n\n        // MEMO: this is needed because the reference of some elements will not be released, then memory leak will happen.\n        Object.keys($$).forEach(function (key) {\n            $$[key] = null;\n        });\n\n        return null;\n    };\n\n    c3_chart_fn.tooltip = function () {};\n    c3_chart_fn.tooltip.show = function (args) {\n        var $$ = this.internal, index, mouse;\n\n        // determine mouse position on the chart\n        if (args.mouse) {\n            mouse = args.mouse;\n        }\n\n        // determine focus data\n        if (args.data) {\n            if ($$.isMultipleX()) {\n                // if multiple xs, target point will be determined by mouse\n                mouse = [$$.x(args.data.x), $$.getYScale(args.data.id)(args.data.value)];\n                index = null;\n            } else {\n                // TODO: when tooltip_grouped = false\n                index = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x);\n            }\n        }\n        else if (typeof args.x !== 'undefined') {\n            index = $$.getIndexByX(args.x);\n        }\n        else if (typeof args.index !== 'undefined') {\n            index = args.index;\n        }\n\n        // emulate mouse events to show\n        $$.dispatchEvent('mouseover', index, mouse);\n        $$.dispatchEvent('mousemove', index, mouse);\n\n        $$.config.tooltip_onshow.call($$, args.data);\n    };\n    c3_chart_fn.tooltip.hide = function () {\n        // TODO: get target data by checking the state of focus\n        this.internal.dispatchEvent('mouseout', 0);\n\n        this.internal.config.tooltip_onhide.call(this);\n    };\n\n    // Features:\n    // 1. category axis\n    // 2. ceil values of translate/x/y to int for half pixel antialiasing\n    // 3. multiline tick text\n    var tickTextCharSize;\n    function c3_axis(d3, params) {\n        var scale = d3.scale.linear(), orient = \"bottom\", innerTickSize = 6, outerTickSize, tickPadding = 3, tickValues = null, tickFormat, tickArguments;\n\n        var tickOffset = 0, tickCulling = true, tickCentered;\n\n        params = params || {};\n        outerTickSize = params.withOuterTick ? 6 : 0;\n\n        function axisX(selection, x) {\n            selection.attr(\"transform\", function (d) {\n                return \"translate(\" + Math.ceil(x(d) + tickOffset) + \", 0)\";\n            });\n        }\n        function axisY(selection, y) {\n            selection.attr(\"transform\", function (d) {\n                return \"translate(0,\" + Math.ceil(y(d)) + \")\";\n            });\n        }\n        function scaleExtent(domain) {\n            var start = domain[0], stop = domain[domain.length - 1];\n            return start < stop ? [ start, stop ] : [ stop, start ];\n        }\n        function generateTicks(scale) {\n            var i, domain, ticks = [];\n            if (scale.ticks) {\n                return scale.ticks.apply(scale, tickArguments);\n            }\n            domain = scale.domain();\n            for (i = Math.ceil(domain[0]); i < domain[1]; i++) {\n                ticks.push(i);\n            }\n            if (ticks.length > 0 && ticks[0] > 0) {\n                ticks.unshift(ticks[0] - (ticks[1] - ticks[0]));\n            }\n            return ticks;\n        }\n        function copyScale() {\n            var newScale = scale.copy(), domain;\n            if (params.isCategory) {\n                domain = scale.domain();\n                newScale.domain([domain[0], domain[1] - 1]);\n            }\n            return newScale;\n        }\n        function textFormatted(v) {\n            var formatted = tickFormat ? tickFormat(v) : v;\n            return typeof formatted !== 'undefined' ? formatted : '';\n        }\n        function getSizeFor1Char(tick) {\n            if (tickTextCharSize) {\n                return tickTextCharSize;\n            }\n            var size = {\n                h: 11.5,\n                w: 5.5\n            };\n            tick.select('text').text(textFormatted).each(function (d) {\n                var box = this.getBoundingClientRect(),\n                    text = textFormatted(d),\n                    h = box.height,\n                    w = text ? (box.width / text.length) : undefined;\n                if (h && w) {\n                    size.h = h;\n                    size.w = w;\n                }\n            }).text('');\n            tickTextCharSize = size;\n            return size;\n        }\n        function transitionise(selection) {\n            return params.withoutTransition ? selection : d3.transition(selection);\n        }\n        function axis(g) {\n            g.each(function () {\n                var g = axis.g = d3.select(this);\n\n                var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = copyScale();\n\n                var ticks = tickValues ? tickValues : generateTicks(scale1),\n                    tick = g.selectAll(\".tick\").data(ticks, scale1),\n                    tickEnter = tick.enter().insert(\"g\", \".domain\").attr(\"class\", \"tick\").style(\"opacity\", 1e-6),\n                    // MEMO: No exit transition. The reason is this transition affects max tick width calculation because old tick will be included in the ticks.\n                    tickExit = tick.exit().remove(),\n                    tickUpdate = transitionise(tick).style(\"opacity\", 1),\n                    tickTransform, tickX, tickY;\n\n                var range = scale.rangeExtent ? scale.rangeExtent() : scaleExtent(scale.range()),\n                    path = g.selectAll(\".domain\").data([ 0 ]),\n                    pathUpdate = (path.enter().append(\"path\").attr(\"class\", \"domain\"), transitionise(path));\n                tickEnter.append(\"line\");\n                tickEnter.append(\"text\");\n\n                var lineEnter = tickEnter.select(\"line\"),\n                    lineUpdate = tickUpdate.select(\"line\"),\n                    textEnter = tickEnter.select(\"text\"),\n                    textUpdate = tickUpdate.select(\"text\");\n\n                if (params.isCategory) {\n                    tickOffset = Math.ceil((scale1(1) - scale1(0)) / 2);\n                    tickX = tickCentered ? 0 : tickOffset;\n                    tickY = tickCentered ? tickOffset : 0;\n                } else {\n                    tickOffset = tickX = 0;\n                }\n\n                var text, tspan, sizeFor1Char = getSizeFor1Char(g.select('.tick')), counts = [];\n                var tickLength = Math.max(innerTickSize, 0) + tickPadding,\n                    isVertical = orient === 'left' || orient === 'right';\n\n                // this should be called only when category axis\n                function splitTickText(d, maxWidth) {\n                    var tickText = textFormatted(d),\n                        subtext, spaceIndex, textWidth, splitted = [];\n\n                    if (Object.prototype.toString.call(tickText) === \"[object Array]\") {\n                        return tickText;\n                    }\n\n                    if (!maxWidth || maxWidth <= 0) {\n                        maxWidth = isVertical ? 95 : params.isCategory ? (Math.ceil(scale1(ticks[1]) - scale1(ticks[0])) - 12) : 110;\n                    }\n\n                    function split(splitted, text) {\n                        spaceIndex = undefined;\n                        for (var i = 1; i < text.length; i++) {\n                            if (text.charAt(i) === ' ') {\n                                spaceIndex = i;\n                            }\n                            subtext = text.substr(0, i + 1);\n                            textWidth = sizeFor1Char.w * subtext.length;\n                            // if text width gets over tick width, split by space index or crrent index\n                            if (maxWidth < textWidth) {\n                                return split(\n                                    splitted.concat(text.substr(0, spaceIndex ? spaceIndex : i)),\n                                    text.slice(spaceIndex ? spaceIndex + 1 : i)\n                                );\n                            }\n                        }\n                        return splitted.concat(text);\n                    }\n\n                    return split(splitted, tickText + \"\");\n                }\n\n                function tspanDy(d, i) {\n                    var dy = sizeFor1Char.h;\n                    if (i === 0) {\n                        if (orient === 'left' || orient === 'right') {\n                            dy = -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3);\n                        } else {\n                            dy = \".71em\";\n                        }\n                    }\n                    return dy;\n                }\n\n                function tickSize(d) {\n                    var tickPosition = scale(d) + (tickCentered ? 0 : tickOffset);\n                    return range[0] < tickPosition && tickPosition < range[1] ? innerTickSize : 0;\n                }\n\n                text = tick.select(\"text\");\n                tspan = text.selectAll('tspan')\n                    .data(function (d, i) {\n                        var splitted = params.tickMultiline ? splitTickText(d, params.tickWidth) : [].concat(textFormatted(d));\n                        counts[i] = splitted.length;\n                        return splitted.map(function (s) {\n                            return { index: i, splitted: s };\n                        });\n                    });\n                tspan.enter().append('tspan');\n                tspan.exit().remove();\n                tspan.text(function (d) { return d.splitted; });\n\n                var rotate = params.tickTextRotate;\n\n                function textAnchorForText(rotate) {\n                    if (!rotate) {\n                        return 'middle';\n                    }\n                    return rotate > 0 ? \"start\" : \"end\";\n                }\n                function textTransform(rotate) {\n                    if (!rotate) {\n                        return '';\n                    }\n                    return \"rotate(\" + rotate + \")\";\n                }\n                function dxForText(rotate) {\n                    if (!rotate) {\n                        return 0;\n                    }\n                    return 8 * Math.sin(Math.PI * (rotate / 180));\n                }\n                function yForText(rotate) {\n                    if (!rotate) {\n                        return tickLength;\n                    }\n                    return 11.5 - 2.5 * (rotate / 15) * (rotate > 0 ? 1 : -1);\n                }\n\n                switch (orient) {\n                case \"bottom\":\n                    {\n                        tickTransform = axisX;\n                        lineEnter.attr(\"y2\", innerTickSize);\n                        textEnter.attr(\"y\", tickLength);\n                        lineUpdate.attr(\"x1\", tickX).attr(\"x2\", tickX).attr(\"y2\", tickSize);\n                        textUpdate.attr(\"x\", 0).attr(\"y\", yForText(rotate))\n                            .style(\"text-anchor\", textAnchorForText(rotate))\n                            .attr(\"transform\", textTransform(rotate));\n                        tspan.attr('x', 0).attr(\"dy\", tspanDy).attr('dx', dxForText(rotate));\n                        pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + outerTickSize + \"V0H\" + range[1] + \"V\" + outerTickSize);\n                        break;\n                    }\n                case \"top\":\n                    {\n                        // TODO: rotated tick text\n                        tickTransform = axisX;\n                        lineEnter.attr(\"y2\", -innerTickSize);\n                        textEnter.attr(\"y\", -tickLength);\n                        lineUpdate.attr(\"x2\", 0).attr(\"y2\", -innerTickSize);\n                        textUpdate.attr(\"x\", 0).attr(\"y\", -tickLength);\n                        text.style(\"text-anchor\", \"middle\");\n                        tspan.attr('x', 0).attr(\"dy\", \"0em\");\n                        pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + -outerTickSize + \"V0H\" + range[1] + \"V\" + -outerTickSize);\n                        break;\n                    }\n                case \"left\":\n                    {\n                        tickTransform = axisY;\n                        lineEnter.attr(\"x2\", -innerTickSize);\n                        textEnter.attr(\"x\", -tickLength);\n                        lineUpdate.attr(\"x2\", -innerTickSize).attr(\"y1\", tickY).attr(\"y2\", tickY);\n                        textUpdate.attr(\"x\", -tickLength).attr(\"y\", tickOffset);\n                        text.style(\"text-anchor\", \"end\");\n                        tspan.attr('x', -tickLength).attr(\"dy\", tspanDy);\n                        pathUpdate.attr(\"d\", \"M\" + -outerTickSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + -outerTickSize);\n                        break;\n                    }\n                case \"right\":\n                    {\n                        tickTransform = axisY;\n                        lineEnter.attr(\"x2\", innerTickSize);\n                        textEnter.attr(\"x\", tickLength);\n                        lineUpdate.attr(\"x2\", innerTickSize).attr(\"y2\", 0);\n                        textUpdate.attr(\"x\", tickLength).attr(\"y\", 0);\n                        text.style(\"text-anchor\", \"start\");\n                        tspan.attr('x', tickLength).attr(\"dy\", tspanDy);\n                        pathUpdate.attr(\"d\", \"M\" + outerTickSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + outerTickSize);\n                        break;\n                    }\n                }\n                if (scale1.rangeBand) {\n                    var x = scale1, dx = x.rangeBand() / 2;\n                    scale0 = scale1 = function (d) {\n                        return x(d) + dx;\n                    };\n                } else if (scale0.rangeBand) {\n                    scale0 = scale1;\n                } else {\n                    tickExit.call(tickTransform, scale1);\n                }\n                tickEnter.call(tickTransform, scale0);\n                tickUpdate.call(tickTransform, scale1);\n            });\n        }\n        axis.scale = function (x) {\n            if (!arguments.length) { return scale; }\n            scale = x;\n            return axis;\n        };\n        axis.orient = function (x) {\n            if (!arguments.length) { return orient; }\n            orient = x in {top: 1, right: 1, bottom: 1, left: 1} ? x + \"\" : \"bottom\";\n            return axis;\n        };\n        axis.tickFormat = function (format) {\n            if (!arguments.length) { return tickFormat; }\n            tickFormat = format;\n            return axis;\n        };\n        axis.tickCentered = function (isCentered) {\n            if (!arguments.length) { return tickCentered; }\n            tickCentered = isCentered;\n            return axis;\n        };\n        axis.tickOffset = function () {\n            return tickOffset;\n        };\n        axis.tickInterval = function () {\n            var interval, length;\n            if (params.isCategory) {\n                interval = tickOffset * 2;\n            }\n            else {\n                length = axis.g.select('path.domain').node().getTotalLength() - outerTickSize * 2;\n                interval = length / axis.g.selectAll('line').size();\n            }\n            return interval === Infinity ? 0 : interval;\n        };\n        axis.ticks = function () {\n            if (!arguments.length) { return tickArguments; }\n            tickArguments = arguments;\n            return axis;\n        };\n        axis.tickCulling = function (culling) {\n            if (!arguments.length) { return tickCulling; }\n            tickCulling = culling;\n            return axis;\n        };\n        axis.tickValues = function (x) {\n            if (typeof x === 'function') {\n                tickValues = function () {\n                    return x(scale.domain());\n                };\n            }\n            else {\n                if (!arguments.length) { return tickValues; }\n                tickValues = x;\n            }\n            return axis;\n        };\n        return axis;\n    }\n\n    c3_chart_internal_fn.isSafari = function () {\n        var ua = window.navigator.userAgent;\n        return ua.indexOf('Safari') >= 0 && ua.indexOf('Chrome') < 0;\n    };\n    c3_chart_internal_fn.isChrome = function () {\n        var ua = window.navigator.userAgent;\n        return ua.indexOf('Chrome') >= 0;\n    };\n\n    /* jshint ignore:start */\n\n    // PhantomJS doesn't have support for Function.prototype.bind, which has caused confusion. Use\n    // this polyfill to avoid the confusion.\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill\n\n    if (!Function.prototype.bind) {\n      Function.prototype.bind = function(oThis) {\n        if (typeof this !== 'function') {\n          // closest thing possible to the ECMAScript 5\n          // internal IsCallable function\n          throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\n        }\n\n        var aArgs   = Array.prototype.slice.call(arguments, 1),\n            fToBind = this,\n            fNOP    = function() {},\n            fBound  = function() {\n              return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));\n            };\n\n        fNOP.prototype = this.prototype;\n        fBound.prototype = new fNOP();\n\n        return fBound;\n      };\n    }\n\n    //SVGPathSeg API polyfill\n    //https://github.com/progers/pathseg\n    //\n    //This is a drop-in replacement for the SVGPathSeg and SVGPathSegList APIs that were removed from\n    //SVG2 (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html), including the latest spec\n    //changes which were implemented in Firefox 43 and Chrome 46.\n    //Chrome 48 removes these APIs, so this polyfill is required.\n\n    (function() { \"use strict\";\n     if (!(\"SVGPathSeg\" in window)) {\n         // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSeg\n         window.SVGPathSeg = function(type, typeAsLetter, owningPathSegList) {\n             this.pathSegType = type;\n             this.pathSegTypeAsLetter = typeAsLetter;\n             this._owningPathSegList = owningPathSegList;\n         }\n\n         SVGPathSeg.PATHSEG_UNKNOWN = 0;\n         SVGPathSeg.PATHSEG_CLOSEPATH = 1;\n         SVGPathSeg.PATHSEG_MOVETO_ABS = 2;\n         SVGPathSeg.PATHSEG_MOVETO_REL = 3;\n         SVGPathSeg.PATHSEG_LINETO_ABS = 4;\n         SVGPathSeg.PATHSEG_LINETO_REL = 5;\n         SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6;\n         SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7;\n         SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8;\n         SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9;\n         SVGPathSeg.PATHSEG_ARC_ABS = 10;\n         SVGPathSeg.PATHSEG_ARC_REL = 11;\n         SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12;\n         SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13;\n         SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14;\n         SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15;\n         SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;\n         SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;\n         SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;\n         SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;\n\n         // Notify owning PathSegList on any changes so they can be synchronized back to the path element.\n         SVGPathSeg.prototype._segmentChanged = function() {\n             if (this._owningPathSegList)\n                 this._owningPathSegList.segmentChanged(this);\n         }\n\n         window.SVGPathSegClosePath = function(owningPathSegList) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CLOSEPATH, \"z\", owningPathSegList);\n         }\n         SVGPathSegClosePath.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegClosePath.prototype.toString = function() { return \"[object SVGPathSegClosePath]\"; }\n         SVGPathSegClosePath.prototype._asPathString = function() { return this.pathSegTypeAsLetter; }\n         SVGPathSegClosePath.prototype.clone = function() { return new SVGPathSegClosePath(undefined); }\n\n         window.SVGPathSegMovetoAbs = function(owningPathSegList, x, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_MOVETO_ABS, \"M\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n         }\n         SVGPathSegMovetoAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegMovetoAbs.prototype.toString = function() { return \"[object SVGPathSegMovetoAbs]\"; }\n         SVGPathSegMovetoAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegMovetoAbs.prototype.clone = function() { return new SVGPathSegMovetoAbs(undefined, this._x, this._y); }\n         Object.defineProperty(SVGPathSegMovetoAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegMovetoAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegMovetoRel = function(owningPathSegList, x, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_MOVETO_REL, \"m\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n         }\n         SVGPathSegMovetoRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegMovetoRel.prototype.toString = function() { return \"[object SVGPathSegMovetoRel]\"; }\n         SVGPathSegMovetoRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegMovetoRel.prototype.clone = function() { return new SVGPathSegMovetoRel(undefined, this._x, this._y); }\n         Object.defineProperty(SVGPathSegMovetoRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegMovetoRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegLinetoAbs = function(owningPathSegList, x, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_ABS, \"L\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n         }\n         SVGPathSegLinetoAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegLinetoAbs.prototype.toString = function() { return \"[object SVGPathSegLinetoAbs]\"; }\n         SVGPathSegLinetoAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegLinetoAbs.prototype.clone = function() { return new SVGPathSegLinetoAbs(undefined, this._x, this._y); }\n         Object.defineProperty(SVGPathSegLinetoAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegLinetoAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegLinetoRel = function(owningPathSegList, x, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_REL, \"l\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n         }\n         SVGPathSegLinetoRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegLinetoRel.prototype.toString = function() { return \"[object SVGPathSegLinetoRel]\"; }\n         SVGPathSegLinetoRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegLinetoRel.prototype.clone = function() { return new SVGPathSegLinetoRel(undefined, this._x, this._y); }\n         Object.defineProperty(SVGPathSegLinetoRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegLinetoRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoCubicAbs = function(owningPathSegList, x, y, x1, y1, x2, y2) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, \"C\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._x1 = x1;\n             this._y1 = y1;\n             this._x2 = x2;\n             this._y2 = y2;\n         }\n         SVGPathSegCurvetoCubicAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoCubicAbs.prototype.toString = function() { return \"[object SVGPathSegCurvetoCubicAbs]\"; }\n         SVGPathSegCurvetoCubicAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x1 + \" \" + this._y1 + \" \" + this._x2 + \" \" + this._y2 + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoCubicAbs.prototype.clone = function() { return new SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2); }\n         Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, \"x1\", { get: function() { return this._x1; }, set: function(x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, \"y1\", { get: function() { return this._y1; }, set: function(y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, \"x2\", { get: function() { return this._x2; }, set: function(x2) { this._x2 = x2; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, \"y2\", { get: function() { return this._y2; }, set: function(y2) { this._y2 = y2; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoCubicRel = function(owningPathSegList, x, y, x1, y1, x2, y2) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, \"c\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._x1 = x1;\n             this._y1 = y1;\n             this._x2 = x2;\n             this._y2 = y2;\n         }\n         SVGPathSegCurvetoCubicRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoCubicRel.prototype.toString = function() { return \"[object SVGPathSegCurvetoCubicRel]\"; }\n         SVGPathSegCurvetoCubicRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x1 + \" \" + this._y1 + \" \" + this._x2 + \" \" + this._y2 + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoCubicRel.prototype.clone = function() { return new SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2); }\n         Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, \"x1\", { get: function() { return this._x1; }, set: function(x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, \"y1\", { get: function() { return this._y1; }, set: function(y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, \"x2\", { get: function() { return this._x2; }, set: function(x2) { this._x2 = x2; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, \"y2\", { get: function() { return this._y2; }, set: function(y2) { this._y2 = y2; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoQuadraticAbs = function(owningPathSegList, x, y, x1, y1) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, \"Q\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._x1 = x1;\n             this._y1 = y1;\n         }\n         SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoQuadraticAbs.prototype.toString = function() { return \"[object SVGPathSegCurvetoQuadraticAbs]\"; }\n         SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x1 + \" \" + this._y1 + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoQuadraticAbs.prototype.clone = function() { return new SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1); }\n         Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, \"x1\", { get: function() { return this._x1; }, set: function(x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, \"y1\", { get: function() { return this._y1; }, set: function(y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoQuadraticRel = function(owningPathSegList, x, y, x1, y1) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, \"q\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._x1 = x1;\n             this._y1 = y1;\n         }\n         SVGPathSegCurvetoQuadraticRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoQuadraticRel.prototype.toString = function() { return \"[object SVGPathSegCurvetoQuadraticRel]\"; }\n         SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x1 + \" \" + this._y1 + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoQuadraticRel.prototype.clone = function() { return new SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1); }\n         Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, \"x1\", { get: function() { return this._x1; }, set: function(x1) { this._x1 = x1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, \"y1\", { get: function() { return this._y1; }, set: function(y1) { this._y1 = y1; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegArcAbs = function(owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_ARC_ABS, \"A\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._r1 = r1;\n             this._r2 = r2;\n             this._angle = angle;\n             this._largeArcFlag = largeArcFlag;\n             this._sweepFlag = sweepFlag;\n         }\n         SVGPathSegArcAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegArcAbs.prototype.toString = function() { return \"[object SVGPathSegArcAbs]\"; }\n         SVGPathSegArcAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._r1 + \" \" + this._r2 + \" \" + this._angle + \" \" + (this._largeArcFlag ? \"1\" : \"0\") + \" \" + (this._sweepFlag ? \"1\" : \"0\") + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegArcAbs.prototype.clone = function() { return new SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag); }\n         Object.defineProperty(SVGPathSegArcAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcAbs.prototype, \"r1\", { get: function() { return this._r1; }, set: function(r1) { this._r1 = r1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcAbs.prototype, \"r2\", { get: function() { return this._r2; }, set: function(r2) { this._r2 = r2; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcAbs.prototype, \"angle\", { get: function() { return this._angle; }, set: function(angle) { this._angle = angle; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcAbs.prototype, \"largeArcFlag\", { get: function() { return this._largeArcFlag; }, set: function(largeArcFlag) { this._largeArcFlag = largeArcFlag; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcAbs.prototype, \"sweepFlag\", { get: function() { return this._sweepFlag; }, set: function(sweepFlag) { this._sweepFlag = sweepFlag; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegArcRel = function(owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_ARC_REL, \"a\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._r1 = r1;\n             this._r2 = r2;\n             this._angle = angle;\n             this._largeArcFlag = largeArcFlag;\n             this._sweepFlag = sweepFlag;\n         }\n         SVGPathSegArcRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegArcRel.prototype.toString = function() { return \"[object SVGPathSegArcRel]\"; }\n         SVGPathSegArcRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._r1 + \" \" + this._r2 + \" \" + this._angle + \" \" + (this._largeArcFlag ? \"1\" : \"0\") + \" \" + (this._sweepFlag ? \"1\" : \"0\") + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegArcRel.prototype.clone = function() { return new SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag); }\n         Object.defineProperty(SVGPathSegArcRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcRel.prototype, \"r1\", { get: function() { return this._r1; }, set: function(r1) { this._r1 = r1; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcRel.prototype, \"r2\", { get: function() { return this._r2; }, set: function(r2) { this._r2 = r2; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcRel.prototype, \"angle\", { get: function() { return this._angle; }, set: function(angle) { this._angle = angle; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcRel.prototype, \"largeArcFlag\", { get: function() { return this._largeArcFlag; }, set: function(largeArcFlag) { this._largeArcFlag = largeArcFlag; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegArcRel.prototype, \"sweepFlag\", { get: function() { return this._sweepFlag; }, set: function(sweepFlag) { this._sweepFlag = sweepFlag; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegLinetoHorizontalAbs = function(owningPathSegList, x) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, \"H\", owningPathSegList);\n             this._x = x;\n         }\n         SVGPathSegLinetoHorizontalAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegLinetoHorizontalAbs.prototype.toString = function() { return \"[object SVGPathSegLinetoHorizontalAbs]\"; }\n         SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x; }\n         SVGPathSegLinetoHorizontalAbs.prototype.clone = function() { return new SVGPathSegLinetoHorizontalAbs(undefined, this._x); }\n         Object.defineProperty(SVGPathSegLinetoHorizontalAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegLinetoHorizontalRel = function(owningPathSegList, x) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, \"h\", owningPathSegList);\n             this._x = x;\n         }\n         SVGPathSegLinetoHorizontalRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegLinetoHorizontalRel.prototype.toString = function() { return \"[object SVGPathSegLinetoHorizontalRel]\"; }\n         SVGPathSegLinetoHorizontalRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x; }\n         SVGPathSegLinetoHorizontalRel.prototype.clone = function() { return new SVGPathSegLinetoHorizontalRel(undefined, this._x); }\n         Object.defineProperty(SVGPathSegLinetoHorizontalRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegLinetoVerticalAbs = function(owningPathSegList, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, \"V\", owningPathSegList);\n             this._y = y;\n         }\n         SVGPathSegLinetoVerticalAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegLinetoVerticalAbs.prototype.toString = function() { return \"[object SVGPathSegLinetoVerticalAbs]\"; }\n         SVGPathSegLinetoVerticalAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._y; }\n         SVGPathSegLinetoVerticalAbs.prototype.clone = function() { return new SVGPathSegLinetoVerticalAbs(undefined, this._y); }\n         Object.defineProperty(SVGPathSegLinetoVerticalAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegLinetoVerticalRel = function(owningPathSegList, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, \"v\", owningPathSegList);\n             this._y = y;\n         }\n         SVGPathSegLinetoVerticalRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegLinetoVerticalRel.prototype.toString = function() { return \"[object SVGPathSegLinetoVerticalRel]\"; }\n         SVGPathSegLinetoVerticalRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._y; }\n         SVGPathSegLinetoVerticalRel.prototype.clone = function() { return new SVGPathSegLinetoVerticalRel(undefined, this._y); }\n         Object.defineProperty(SVGPathSegLinetoVerticalRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoCubicSmoothAbs = function(owningPathSegList, x, y, x2, y2) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, \"S\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._x2 = x2;\n             this._y2 = y2;\n         }\n         SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function() { return \"[object SVGPathSegCurvetoCubicSmoothAbs]\"; }\n         SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x2 + \" \" + this._y2 + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function() { return new SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2); }\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x2\", { get: function() { return this._x2; }, set: function(x2) { this._x2 = x2; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y2\", { get: function() { return this._y2; }, set: function(y2) { this._y2 = y2; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoCubicSmoothRel = function(owningPathSegList, x, y, x2, y2) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, \"s\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n             this._x2 = x2;\n             this._y2 = y2;\n         }\n         SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function() { return \"[object SVGPathSegCurvetoCubicSmoothRel]\"; }\n         SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x2 + \" \" + this._y2 + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function() { return new SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2); }\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, \"x2\", { get: function() { return this._x2; }, set: function(x2) { this._x2 = x2; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, \"y2\", { get: function() { return this._y2; }, set: function(y2) { this._y2 = y2; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoQuadraticSmoothAbs = function(owningPathSegList, x, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, \"T\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n         }\n         SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function() { return \"[object SVGPathSegCurvetoQuadraticSmoothAbs]\"; }\n         SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function() { return new SVGPathSegCurvetoQuadraticSmoothAbs(undefined, this._x, this._y); }\n         Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         window.SVGPathSegCurvetoQuadraticSmoothRel = function(owningPathSegList, x, y) {\n             SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, \"t\", owningPathSegList);\n             this._x = x;\n             this._y = y;\n         }\n         SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(SVGPathSeg.prototype);\n         SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function() { return \"[object SVGPathSegCurvetoQuadraticSmoothRel]\"; }\n         SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + \" \" + this._x + \" \" + this._y; }\n         SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function() { return new SVGPathSegCurvetoQuadraticSmoothRel(undefined, this._x, this._y); }\n         Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"x\", { get: function() { return this._x; }, set: function(x) { this._x = x; this._segmentChanged(); }, enumerable: true });\n         Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"y\", { get: function() { return this._y; }, set: function(y) { this._y = y; this._segmentChanged(); }, enumerable: true });\n\n         // Add createSVGPathSeg* functions to SVGPathElement.\n         // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathElement.\n         SVGPathElement.prototype.createSVGPathSegClosePath = function() { return new SVGPathSegClosePath(undefined); }\n         SVGPathElement.prototype.createSVGPathSegMovetoAbs = function(x, y) { return new SVGPathSegMovetoAbs(undefined, x, y); }\n         SVGPathElement.prototype.createSVGPathSegMovetoRel = function(x, y) { return new SVGPathSegMovetoRel(undefined, x, y); }\n         SVGPathElement.prototype.createSVGPathSegLinetoAbs = function(x, y) { return new SVGPathSegLinetoAbs(undefined, x, y); }\n         SVGPathElement.prototype.createSVGPathSegLinetoRel = function(x, y) { return new SVGPathSegLinetoRel(undefined, x, y); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function(x, y, x1, y1, x2, y2) { return new SVGPathSegCurvetoCubicAbs(undefined, x, y, x1, y1, x2, y2); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function(x, y, x1, y1, x2, y2) { return new SVGPathSegCurvetoCubicRel(undefined, x, y, x1, y1, x2, y2); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function(x, y, x1, y1) { return new SVGPathSegCurvetoQuadraticAbs(undefined, x, y, x1, y1); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function(x, y, x1, y1) { return new SVGPathSegCurvetoQuadraticRel(undefined, x, y, x1, y1); }\n         SVGPathElement.prototype.createSVGPathSegArcAbs = function(x, y, r1, r2, angle, largeArcFlag, sweepFlag) { return new SVGPathSegArcAbs(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag); }\n         SVGPathElement.prototype.createSVGPathSegArcRel = function(x, y, r1, r2, angle, largeArcFlag, sweepFlag) { return new SVGPathSegArcRel(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag); }\n         SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function(x) { return new SVGPathSegLinetoHorizontalAbs(undefined, x); }\n         SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function(x) { return new SVGPathSegLinetoHorizontalRel(undefined, x); }\n         SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function(y) { return new SVGPathSegLinetoVerticalAbs(undefined, y); }\n         SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function(y) { return new SVGPathSegLinetoVerticalRel(undefined, y); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function(x, y, x2, y2) { return new SVGPathSegCurvetoCubicSmoothAbs(undefined, x, y, x2, y2); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function(x, y, x2, y2) { return new SVGPathSegCurvetoCubicSmoothRel(undefined, x, y, x2, y2); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function(x, y) { return new SVGPathSegCurvetoQuadraticSmoothAbs(undefined, x, y); }\n         SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function(x, y) { return new SVGPathSegCurvetoQuadraticSmoothRel(undefined, x, y); }\n     }\n\n     if (!(\"SVGPathSegList\" in window)) {\n         // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGPathSegList\n         window.SVGPathSegList = function(pathElement) {\n             this._pathElement = pathElement;\n             this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n\n             // Use a MutationObserver to catch changes to the path's \"d\" attribute.\n             this._mutationObserverConfig = { \"attributes\": true, \"attributeFilter\": [\"d\"] };\n             this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this));\n             this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n         }\n\n         Object.defineProperty(SVGPathSegList.prototype, \"numberOfItems\", {\n             get: function() {\n                 this._checkPathSynchronizedToList();\n                 return this._list.length;\n             },\n             enumerable: true\n         });\n\n         // Add the pathSegList accessors to SVGPathElement.\n         // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-InterfaceSVGAnimatedPathData\n         Object.defineProperty(SVGPathElement.prototype, \"pathSegList\", {\n             get: function() {\n                 if (!this._pathSegList)\n                     this._pathSegList = new SVGPathSegList(this);\n                 return this._pathSegList;\n             },\n             enumerable: true\n         });\n         // FIXME: The following are not implemented and simply return SVGPathElement.pathSegList.\n         Object.defineProperty(SVGPathElement.prototype, \"normalizedPathSegList\", { get: function() { return this.pathSegList; }, enumerable: true });\n         Object.defineProperty(SVGPathElement.prototype, \"animatedPathSegList\", { get: function() { return this.pathSegList; }, enumerable: true });\n         Object.defineProperty(SVGPathElement.prototype, \"animatedNormalizedPathSegList\", { get: function() { return this.pathSegList; }, enumerable: true });\n\n         // Process any pending mutations to the path element and update the list as needed.\n         // This should be the first call of all public functions and is needed because\n         // MutationObservers are not synchronous so we can have pending asynchronous mutations.\n         SVGPathSegList.prototype._checkPathSynchronizedToList = function() {\n             this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords());\n         }\n\n         SVGPathSegList.prototype._updateListFromPathMutations = function(mutationRecords) {\n             if (!this._pathElement)\n                 return;\n             var hasPathMutations = false;\n             mutationRecords.forEach(function(record) {\n                 if (record.attributeName == \"d\")\n                     hasPathMutations = true;\n             });\n             if (hasPathMutations)\n                 this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n         }\n\n         // Serialize the list and update the path's 'd' attribute.\n         SVGPathSegList.prototype._writeListToPath = function() {\n             this._pathElementMutationObserver.disconnect();\n             this._pathElement.setAttribute(\"d\", SVGPathSegList._pathSegArrayAsString(this._list));\n             this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n         }\n\n         // When a path segment changes the list needs to be synchronized back to the path element.\n         SVGPathSegList.prototype.segmentChanged = function(pathSeg) {\n             this._writeListToPath();\n         }\n\n         SVGPathSegList.prototype.clear = function() {\n             this._checkPathSynchronizedToList();\n\n             this._list.forEach(function(pathSeg) {\n                 pathSeg._owningPathSegList = null;\n             });\n             this._list = [];\n             this._writeListToPath();\n         }\n\n         SVGPathSegList.prototype.initialize = function(newItem) {\n             this._checkPathSynchronizedToList();\n\n             this._list = [newItem];\n             newItem._owningPathSegList = this;\n             this._writeListToPath();\n             return newItem;\n         }\n\n         SVGPathSegList.prototype._checkValidIndex = function(index) {\n             if (isNaN(index) || index < 0 || index >= this.numberOfItems)\n                 throw \"INDEX_SIZE_ERR\";\n         }\n\n         SVGPathSegList.prototype.getItem = function(index) {\n             this._checkPathSynchronizedToList();\n\n             this._checkValidIndex(index);\n             return this._list[index];\n         }\n\n         SVGPathSegList.prototype.insertItemBefore = function(newItem, index) {\n             this._checkPathSynchronizedToList();\n\n             // Spec: If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.\n             if (index > this.numberOfItems)\n                 index = this.numberOfItems;\n             if (newItem._owningPathSegList) {\n                 // SVG2 spec says to make a copy.\n                 newItem = newItem.clone();\n             }\n             this._list.splice(index, 0, newItem);\n             newItem._owningPathSegList = this;\n             this._writeListToPath();\n             return newItem;\n         }\n\n         SVGPathSegList.prototype.replaceItem = function(newItem, index) {\n             this._checkPathSynchronizedToList();\n\n             if (newItem._owningPathSegList) {\n                 // SVG2 spec says to make a copy.\n                 newItem = newItem.clone();\n             }\n             this._checkValidIndex(index);\n             this._list[index] = newItem;\n             newItem._owningPathSegList = this;\n             this._writeListToPath();\n             return newItem;\n         }\n\n         SVGPathSegList.prototype.removeItem = function(index) {\n             this._checkPathSynchronizedToList();\n\n             this._checkValidIndex(index);\n             var item = this._list[index];\n             this._list.splice(index, 1);\n             this._writeListToPath();\n             return item;\n         }\n\n         SVGPathSegList.prototype.appendItem = function(newItem) {\n             this._checkPathSynchronizedToList();\n\n             if (newItem._owningPathSegList) {\n                 // SVG2 spec says to make a copy.\n                 newItem = newItem.clone();\n             }\n             this._list.push(newItem);\n             newItem._owningPathSegList = this;\n             // TODO: Optimize this to just append to the existing attribute.\n             this._writeListToPath();\n             return newItem;\n         }\n\n         SVGPathSegList._pathSegArrayAsString = function(pathSegArray) {\n             var string = \"\";\n             var first = true;\n             pathSegArray.forEach(function(pathSeg) {\n                 if (first) {\n                     first = false;\n                     string += pathSeg._asPathString();\n                 } else {\n                     string += \" \" + pathSeg._asPathString();\n                 }\n             });\n             return string;\n         }\n\n         // This closely follows SVGPathParser::parsePath from Source/core/svg/SVGPathParser.cpp.\n         SVGPathSegList.prototype._parsePath = function(string) {\n             if (!string || string.length == 0)\n                 return [];\n\n             var owningPathSegList = this;\n\n             var Builder = function() {\n                 this.pathSegList = [];\n             }\n\n             Builder.prototype.appendSegment = function(pathSeg) {\n                 this.pathSegList.push(pathSeg);\n             }\n\n             var Source = function(string) {\n                 this._string = string;\n                 this._currentIndex = 0;\n                 this._endIndex = this._string.length;\n                 this._previousCommand = SVGPathSeg.PATHSEG_UNKNOWN;\n\n                 this._skipOptionalSpaces();\n             }\n\n             Source.prototype._isCurrentSpace = function() {\n                 var character = this._string[this._currentIndex];\n                 return character <= \" \" && (character == \" \" || character == \"\\n\" || character == \"\\t\" || character == \"\\r\" || character == \"\\f\");\n             }\n\n             Source.prototype._skipOptionalSpaces = function() {\n                 while (this._currentIndex < this._endIndex && this._isCurrentSpace())\n                     this._currentIndex++;\n                 return this._currentIndex < this._endIndex;\n             }\n\n             Source.prototype._skipOptionalSpacesOrDelimiter = function() {\n                 if (this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != \",\")\n                     return false;\n                 if (this._skipOptionalSpaces()) {\n                     if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \",\") {\n                         this._currentIndex++;\n                         this._skipOptionalSpaces();\n                     }\n                 }\n                 return this._currentIndex < this._endIndex;\n             }\n\n             Source.prototype.hasMoreData = function() {\n                 return this._currentIndex < this._endIndex;\n             }\n\n             Source.prototype.peekSegmentType = function() {\n                 var lookahead = this._string[this._currentIndex];\n                 return this._pathSegTypeFromChar(lookahead);\n             }\n\n             Source.prototype._pathSegTypeFromChar = function(lookahead) {\n                 switch (lookahead) {\n                 case \"Z\":\n                 case \"z\":\n                     return SVGPathSeg.PATHSEG_CLOSEPATH;\n                 case \"M\":\n                     return SVGPathSeg.PATHSEG_MOVETO_ABS;\n                 case \"m\":\n                     return SVGPathSeg.PATHSEG_MOVETO_REL;\n                 case \"L\":\n                     return SVGPathSeg.PATHSEG_LINETO_ABS;\n                 case \"l\":\n                     return SVGPathSeg.PATHSEG_LINETO_REL;\n                 case \"C\":\n                     return SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;\n                 case \"c\":\n                     return SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;\n                 case \"Q\":\n                     return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;\n                 case \"q\":\n                     return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;\n                 case \"A\":\n                     return SVGPathSeg.PATHSEG_ARC_ABS;\n                 case \"a\":\n                     return SVGPathSeg.PATHSEG_ARC_REL;\n                 case \"H\":\n                     return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;\n                 case \"h\":\n                     return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;\n                 case \"V\":\n                     return SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;\n                 case \"v\":\n                     return SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;\n                 case \"S\":\n                     return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;\n                 case \"s\":\n                     return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;\n                 case \"T\":\n                     return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;\n                 case \"t\":\n                     return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;\n                 default:\n                     return SVGPathSeg.PATHSEG_UNKNOWN;\n                 }\n             }\n\n             Source.prototype._nextCommandHelper = function(lookahead, previousCommand) {\n                 // Check for remaining coordinates in the current command.\n                 if ((lookahead == \"+\" || lookahead == \"-\" || lookahead == \".\" || (lookahead >= \"0\" && lookahead <= \"9\")) && previousCommand != SVGPathSeg.PATHSEG_CLOSEPATH) {\n                     if (previousCommand == SVGPathSeg.PATHSEG_MOVETO_ABS)\n                         return SVGPathSeg.PATHSEG_LINETO_ABS;\n                     if (previousCommand == SVGPathSeg.PATHSEG_MOVETO_REL)\n                         return SVGPathSeg.PATHSEG_LINETO_REL;\n                     return previousCommand;\n                 }\n                 return SVGPathSeg.PATHSEG_UNKNOWN;\n             }\n\n             Source.prototype.initialCommandIsMoveTo = function() {\n                 // If the path is empty it is still valid, so return true.\n                 if (!this.hasMoreData())\n                     return true;\n                 var command = this.peekSegmentType();\n                 // Path must start with moveTo.\n                 return command == SVGPathSeg.PATHSEG_MOVETO_ABS || command == SVGPathSeg.PATHSEG_MOVETO_REL;\n             }\n\n             // Parse a number from an SVG path. This very closely follows genericParseNumber(...) from Source/core/svg/SVGParserUtilities.cpp.\n             // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-PathDataBNF\n             Source.prototype._parseNumber = function() {\n                 var exponent = 0;\n                 var integer = 0;\n                 var frac = 1;\n                 var decimal = 0;\n                 var sign = 1;\n                 var expsign = 1;\n\n                 var startIndex = this._currentIndex;\n\n                 this._skipOptionalSpaces();\n\n                 // Read the sign.\n                 if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"+\")\n                     this._currentIndex++;\n                 else if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"-\") {\n                     this._currentIndex++;\n                     sign = -1;\n                 }\n\n                 if (this._currentIndex == this._endIndex || ((this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") && this._string.charAt(this._currentIndex) != \".\"))\n                     // The first character of a number must be one of [0-9+-.].\n                     return undefined;\n\n                 // Read the integer part, build right-to-left.\n                 var startIntPartIndex = this._currentIndex;\n                 while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\")\n                     this._currentIndex++; // Advance to first non-digit.\n\n                 if (this._currentIndex != startIntPartIndex) {\n                     var scanIntPartIndex = this._currentIndex - 1;\n                     var multiplier = 1;\n                     while (scanIntPartIndex >= startIntPartIndex) {\n                         integer += multiplier * (this._string.charAt(scanIntPartIndex--) - \"0\");\n                         multiplier *= 10;\n                     }\n                 }\n\n                 // Read the decimals.\n                 if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \".\") {\n                     this._currentIndex++;\n\n                     // There must be a least one digit following the .\n                     if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\")\n                         return undefined;\n                     while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\")\n                         decimal += (this._string.charAt(this._currentIndex++) - \"0\") * (frac *= 0.1);\n                 }\n\n                 // Read the exponent part.\n                 if (this._currentIndex != startIndex && this._currentIndex + 1 < this._endIndex && (this._string.charAt(this._currentIndex) == \"e\" || this._string.charAt(this._currentIndex) == \"E\") && (this._string.charAt(this._currentIndex + 1) != \"x\" && this._string.charAt(this._currentIndex + 1) != \"m\")) {\n                     this._currentIndex++;\n\n                     // Read the sign of the exponent.\n                     if (this._string.charAt(this._currentIndex) == \"+\") {\n                         this._currentIndex++;\n                     } else if (this._string.charAt(this._currentIndex) == \"-\") {\n                         this._currentIndex++;\n                         expsign = -1;\n                     }\n\n                     // There must be an exponent.\n                     if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\")\n                         return undefined;\n\n                     while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") {\n                         exponent *= 10;\n                         exponent += (this._string.charAt(this._currentIndex) - \"0\");\n                         this._currentIndex++;\n                     }\n                 }\n\n                 var number = integer + decimal;\n                 number *= sign;\n\n                 if (exponent)\n                     number *= Math.pow(10, expsign * exponent);\n\n                 if (startIndex == this._currentIndex)\n                     return undefined;\n\n                 this._skipOptionalSpacesOrDelimiter();\n\n                 return number;\n             }\n\n             Source.prototype._parseArcFlag = function() {\n                 if (this._currentIndex >= this._endIndex)\n                     return undefined;\n                 var flag = false;\n                 var flagChar = this._string.charAt(this._currentIndex++);\n                 if (flagChar == \"0\")\n                     flag = false;\n                 else if (flagChar == \"1\")\n                     flag = true;\n                 else\n                     return undefined;\n\n                 this._skipOptionalSpacesOrDelimiter();\n                 return flag;\n             }\n\n             Source.prototype.parseSegment = function() {\n                 var lookahead = this._string[this._currentIndex];\n                 var command = this._pathSegTypeFromChar(lookahead);\n                 if (command == SVGPathSeg.PATHSEG_UNKNOWN) {\n                     // Possibly an implicit command. Not allowed if this is the first command.\n                     if (this._previousCommand == SVGPathSeg.PATHSEG_UNKNOWN)\n                         return null;\n                     command = this._nextCommandHelper(lookahead, this._previousCommand);\n                     if (command == SVGPathSeg.PATHSEG_UNKNOWN)\n                         return null;\n                 } else {\n                     this._currentIndex++;\n                 }\n\n                 this._previousCommand = command;\n\n                 switch (command) {\n                 case SVGPathSeg.PATHSEG_MOVETO_REL:\n                     return new SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n                 case SVGPathSeg.PATHSEG_MOVETO_ABS:\n                     return new SVGPathSegMovetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n                 case SVGPathSeg.PATHSEG_LINETO_REL:\n                     return new SVGPathSegLinetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n                 case SVGPathSeg.PATHSEG_LINETO_ABS:\n                     return new SVGPathSegLinetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n                 case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:\n                     return new SVGPathSegLinetoHorizontalRel(owningPathSegList, this._parseNumber());\n                 case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:\n                     return new SVGPathSegLinetoHorizontalAbs(owningPathSegList, this._parseNumber());\n                 case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:\n                     return new SVGPathSegLinetoVerticalRel(owningPathSegList, this._parseNumber());\n                 case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:\n                     return new SVGPathSegLinetoVerticalAbs(owningPathSegList, this._parseNumber());\n                 case SVGPathSeg.PATHSEG_CLOSEPATH:\n                     this._skipOptionalSpaces();\n                     return new SVGPathSegClosePath(owningPathSegList);\n                 case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:\n                     var points = {x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n                 case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:\n                     var points = {x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n                 case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:\n                     var points = {x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);\n                 case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:\n                     var points = {x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);\n                 case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:\n                     var points = {x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);\n                 case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:\n                     var points = {x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegCurvetoQuadraticAbs(owningPathSegList, points.x, points.y, points.x1, points.y1);\n                 case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:\n                     return new SVGPathSegCurvetoQuadraticSmoothRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n                 case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:\n                     return new SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n                 case SVGPathSeg.PATHSEG_ARC_REL:\n                     var points = {x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n                 case SVGPathSeg.PATHSEG_ARC_ABS:\n                     var points = {x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber()};\n                     return new SVGPathSegArcAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n                 default:\n                     throw \"Unknown path seg type.\"\n                 }\n             }\n\n             var builder = new Builder();\n             var source = new Source(string);\n\n             if (!source.initialCommandIsMoveTo())\n                 return [];\n             while (source.hasMoreData()) {\n                 var pathSeg = source.parseSegment();\n                 if (!pathSeg)\n                     return [];\n                 builder.appendSegment(pathSeg);\n             }\n\n             return builder.pathSegList;\n         }\n     }\n    }());\n\n    /* jshint ignore:end */\n\n    if (typeof define === 'function' && define.amd) {\n        define(\"c3\", [\"d3\"], function () { return c3; });\n    } else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {\n        module.exports = c3;\n    } else {\n        window.c3 = c3;\n    }\n\n})(window);\n","(function() {\n  var $, AbstractChosen, Chosen, SelectParser,\n    bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n    hasProp = {}.hasOwnProperty;\n\n  SelectParser = (function() {\n    function SelectParser() {\n      this.options_index = 0;\n      this.parsed = [];\n    }\n\n    SelectParser.prototype.add_node = function(child) {\n      if (child.nodeName.toUpperCase() === \"OPTGROUP\") {\n        return this.add_group(child);\n      } else {\n        return this.add_option(child);\n      }\n    };\n\n    SelectParser.prototype.add_group = function(group) {\n      var group_position, i, len, option, ref, results1;\n      group_position = this.parsed.length;\n      this.parsed.push({\n        array_index: group_position,\n        group: true,\n        label: group.label,\n        title: group.title ? group.title : void 0,\n        children: 0,\n        disabled: group.disabled,\n        classes: group.className\n      });\n      ref = group.childNodes;\n      results1 = [];\n      for (i = 0, len = ref.length; i < len; i++) {\n        option = ref[i];\n        results1.push(this.add_option(option, group_position, group.disabled));\n      }\n      return results1;\n    };\n\n    SelectParser.prototype.add_option = function(option, group_position, group_disabled) {\n      if (option.nodeName.toUpperCase() === \"OPTION\") {\n        if (option.text !== \"\") {\n          if (group_position != null) {\n            this.parsed[group_position].children += 1;\n          }\n          this.parsed.push({\n            array_index: this.parsed.length,\n            options_index: this.options_index,\n            value: option.value,\n            text: option.text,\n            html: option.innerHTML,\n            title: option.title ? option.title : void 0,\n            selected: option.selected,\n            disabled: group_disabled === true ? group_disabled : option.disabled,\n            group_array_index: group_position,\n            group_label: group_position != null ? this.parsed[group_position].label : null,\n            classes: option.className,\n            style: option.style.cssText\n          });\n        } else {\n          this.parsed.push({\n            array_index: this.parsed.length,\n            options_index: this.options_index,\n            empty: true\n          });\n        }\n        return this.options_index += 1;\n      }\n    };\n\n    return SelectParser;\n\n  })();\n\n  SelectParser.select_to_array = function(select) {\n    var child, i, len, parser, ref;\n    parser = new SelectParser();\n    ref = select.childNodes;\n    for (i = 0, len = ref.length; i < len; i++) {\n      child = ref[i];\n      parser.add_node(child);\n    }\n    return parser.parsed;\n  };\n\n  AbstractChosen = (function() {\n    function AbstractChosen(form_field, options1) {\n      this.form_field = form_field;\n      this.options = options1 != null ? options1 : {};\n      this.label_click_handler = bind(this.label_click_handler, this);\n      if (!AbstractChosen.browser_is_supported()) {\n        return;\n      }\n      this.is_multiple = this.form_field.multiple;\n      this.set_default_text();\n      this.set_default_values();\n      this.setup();\n      this.set_up_html();\n      this.register_observers();\n      this.on_ready();\n    }\n\n    AbstractChosen.prototype.set_default_values = function() {\n      this.click_test_action = (function(_this) {\n        return function(evt) {\n          return _this.test_active_click(evt);\n        };\n      })(this);\n      this.activate_action = (function(_this) {\n        return function(evt) {\n          return _this.activate_field(evt);\n        };\n      })(this);\n      this.active_field = false;\n      this.mouse_on_container = false;\n      this.results_showing = false;\n      this.result_highlighted = null;\n      this.is_rtl = this.options.rtl || /\\bchosen-rtl\\b/.test(this.form_field.className);\n      this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === \"\" ? this.options.allow_single_deselect : false;\n      this.disable_search_threshold = this.options.disable_search_threshold || 0;\n      this.disable_search = this.options.disable_search || false;\n      this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;\n      this.group_search = this.options.group_search != null ? this.options.group_search : true;\n      this.search_contains = this.options.search_contains || false;\n      this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;\n      this.max_selected_options = this.options.max_selected_options || Infinity;\n      this.inherit_select_classes = this.options.inherit_select_classes || false;\n      this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;\n      this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;\n      this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;\n      this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;\n      this.case_sensitive_search = this.options.case_sensitive_search || false;\n      return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;\n    };\n\n    AbstractChosen.prototype.set_default_text = function() {\n      if (this.form_field.getAttribute(\"data-placeholder\")) {\n        this.default_text = this.form_field.getAttribute(\"data-placeholder\");\n      } else if (this.is_multiple) {\n        this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;\n      } else {\n        this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;\n      }\n      this.default_text = this.escape_html(this.default_text);\n      return this.results_none_found = this.form_field.getAttribute(\"data-no_results_text\") || this.options.no_results_text || AbstractChosen.default_no_result_text;\n    };\n\n    AbstractChosen.prototype.choice_label = function(item) {\n      if (this.include_group_label_in_selected && (item.group_label != null)) {\n        return \"<b class='group-name'>\" + (this.escape_html(item.group_label)) + \"</b>\" + item.html;\n      } else {\n        return item.html;\n      }\n    };\n\n    AbstractChosen.prototype.mouse_enter = function() {\n      return this.mouse_on_container = true;\n    };\n\n    AbstractChosen.prototype.mouse_leave = function() {\n      return this.mouse_on_container = false;\n    };\n\n    AbstractChosen.prototype.input_focus = function(evt) {\n      if (this.is_multiple) {\n        if (!this.active_field) {\n          return setTimeout(((function(_this) {\n            return function() {\n              return _this.container_mousedown();\n            };\n          })(this)), 50);\n        }\n      } else {\n        if (!this.active_field) {\n          return this.activate_field();\n        }\n      }\n    };\n\n    AbstractChosen.prototype.input_blur = function(evt) {\n      if (!this.mouse_on_container) {\n        this.active_field = false;\n        return setTimeout(((function(_this) {\n          return function() {\n            return _this.blur_test();\n          };\n        })(this)), 100);\n      }\n    };\n\n    AbstractChosen.prototype.label_click_handler = function(evt) {\n      if (this.is_multiple) {\n        return this.container_mousedown(evt);\n      } else {\n        return this.activate_field();\n      }\n    };\n\n    AbstractChosen.prototype.results_option_build = function(options) {\n      var content, data, data_content, i, len, ref, shown_results;\n      content = '';\n      shown_results = 0;\n      ref = this.results_data;\n      for (i = 0, len = ref.length; i < len; i++) {\n        data = ref[i];\n        data_content = '';\n        if (data.group) {\n          data_content = this.result_add_group(data);\n        } else {\n          data_content = this.result_add_option(data);\n        }\n        if (data_content !== '') {\n          shown_results++;\n          content += data_content;\n        }\n        if (options != null ? options.first : void 0) {\n          if (data.selected && this.is_multiple) {\n            this.choice_build(data);\n          } else if (data.selected && !this.is_multiple) {\n            this.single_set_selected_text(this.choice_label(data));\n          }\n        }\n        if (shown_results >= this.max_shown_results) {\n          break;\n        }\n      }\n      return content;\n    };\n\n    AbstractChosen.prototype.result_add_option = function(option) {\n      var classes, option_el;\n      if (!option.search_match) {\n        return '';\n      }\n      if (!this.include_option_in_results(option)) {\n        return '';\n      }\n      classes = [];\n      if (!option.disabled && !(option.selected && this.is_multiple)) {\n        classes.push(\"active-result\");\n      }\n      if (option.disabled && !(option.selected && this.is_multiple)) {\n        classes.push(\"disabled-result\");\n      }\n      if (option.selected) {\n        classes.push(\"result-selected\");\n      }\n      if (option.group_array_index != null) {\n        classes.push(\"group-option\");\n      }\n      if (option.classes !== \"\") {\n        classes.push(option.classes);\n      }\n      option_el = document.createElement(\"li\");\n      option_el.className = classes.join(\" \");\n      if (option.style) {\n        option_el.style.cssText = option.style;\n      }\n      option_el.setAttribute(\"data-option-array-index\", option.array_index);\n      option_el.innerHTML = option.highlighted_html || option.html;\n      if (option.title) {\n        option_el.title = option.title;\n      }\n      return this.outerHTML(option_el);\n    };\n\n    AbstractChosen.prototype.result_add_group = function(group) {\n      var classes, group_el;\n      if (!(group.search_match || group.group_match)) {\n        return '';\n      }\n      if (!(group.active_options > 0)) {\n        return '';\n      }\n      classes = [];\n      classes.push(\"group-result\");\n      if (group.classes) {\n        classes.push(group.classes);\n      }\n      group_el = document.createElement(\"li\");\n      group_el.className = classes.join(\" \");\n      group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);\n      if (group.title) {\n        group_el.title = group.title;\n      }\n      return this.outerHTML(group_el);\n    };\n\n    AbstractChosen.prototype.results_update_field = function() {\n      this.set_default_text();\n      if (!this.is_multiple) {\n        this.results_reset_cleanup();\n      }\n      this.result_clear_highlight();\n      this.results_build();\n      if (this.results_showing) {\n        return this.winnow_results();\n      }\n    };\n\n    AbstractChosen.prototype.reset_single_select_options = function() {\n      var i, len, ref, result, results1;\n      ref = this.results_data;\n      results1 = [];\n      for (i = 0, len = ref.length; i < len; i++) {\n        result = ref[i];\n        if (result.selected) {\n          results1.push(result.selected = false);\n        } else {\n          results1.push(void 0);\n        }\n      }\n      return results1;\n    };\n\n    AbstractChosen.prototype.results_toggle = function() {\n      if (this.results_showing) {\n        return this.results_hide();\n      } else {\n        return this.results_show();\n      }\n    };\n\n    AbstractChosen.prototype.results_search = function(evt) {\n      if (this.results_showing) {\n        return this.winnow_results();\n      } else {\n        return this.results_show();\n      }\n    };\n\n    AbstractChosen.prototype.winnow_results = function(options) {\n      var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;\n      this.no_results_clear();\n      results = 0;\n      query = this.get_search_text();\n      escapedQuery = query.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, \"\\\\$&\");\n      regex = this.get_search_regex(escapedQuery);\n      ref = this.results_data;\n      for (i = 0, len = ref.length; i < len; i++) {\n        option = ref[i];\n        option.search_match = false;\n        results_group = null;\n        search_match = null;\n        option.highlighted_html = '';\n        if (this.include_option_in_results(option)) {\n          if (option.group) {\n            option.group_match = false;\n            option.active_options = 0;\n          }\n          if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {\n            results_group = this.results_data[option.group_array_index];\n            if (results_group.active_options === 0 && results_group.search_match) {\n              results += 1;\n            }\n            results_group.active_options += 1;\n          }\n          text = option.group ? option.label : option.text;\n          if (!(option.group && !this.group_search)) {\n            search_match = this.search_string_match(text, regex);\n            option.search_match = search_match != null;\n            if (option.search_match && !option.group) {\n              results += 1;\n            }\n            if (option.search_match) {\n              if (query.length) {\n                startpos = search_match.index;\n                prefix = text.slice(0, startpos);\n                fix = text.slice(startpos, startpos + query.length);\n                suffix = text.slice(startpos + query.length);\n                option.highlighted_html = (this.escape_html(prefix)) + \"<em>\" + (this.escape_html(fix)) + \"</em>\" + (this.escape_html(suffix));\n              }\n              if (results_group != null) {\n                results_group.group_match = true;\n              }\n            } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {\n              option.search_match = true;\n            }\n          }\n        }\n      }\n      this.result_clear_highlight();\n      if (results < 1 && query.length) {\n        this.update_results_content(\"\");\n        return this.no_results(query);\n      } else {\n        this.update_results_content(this.results_option_build());\n        if (!(options != null ? options.skip_highlight : void 0)) {\n          return this.winnow_results_set_highlight();\n        }\n      }\n    };\n\n    AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {\n      var regex_flag, regex_string;\n      regex_string = this.search_contains ? escaped_search_string : \"(^|\\\\s|\\\\b)\" + escaped_search_string + \"[^\\\\s]*\";\n      if (!(this.enable_split_word_search || this.search_contains)) {\n        regex_string = \"^\" + regex_string;\n      }\n      regex_flag = this.case_sensitive_search ? \"\" : \"i\";\n      return new RegExp(regex_string, regex_flag);\n    };\n\n    AbstractChosen.prototype.search_string_match = function(search_string, regex) {\n      var match;\n      match = regex.exec(search_string);\n      if (!this.search_contains && (match != null ? match[1] : void 0)) {\n        match.index += 1;\n      }\n      return match;\n    };\n\n    AbstractChosen.prototype.choices_count = function() {\n      var i, len, option, ref;\n      if (this.selected_option_count != null) {\n        return this.selected_option_count;\n      }\n      this.selected_option_count = 0;\n      ref = this.form_field.options;\n      for (i = 0, len = ref.length; i < len; i++) {\n        option = ref[i];\n        if (option.selected) {\n          this.selected_option_count += 1;\n        }\n      }\n      return this.selected_option_count;\n    };\n\n    AbstractChosen.prototype.choices_click = function(evt) {\n      evt.preventDefault();\n      this.activate_field();\n      if (!(this.results_showing || this.is_disabled)) {\n        return this.results_show();\n      }\n    };\n\n    AbstractChosen.prototype.keydown_checker = function(evt) {\n      var ref, stroke;\n      stroke = (ref = evt.which) != null ? ref : evt.keyCode;\n      this.search_field_scale();\n      if (stroke !== 8 && this.pending_backstroke) {\n        this.clear_backstroke();\n      }\n      switch (stroke) {\n        case 8:\n          this.backstroke_length = this.get_search_field_value().length;\n          break;\n        case 9:\n          if (this.results_showing && !this.is_multiple) {\n            this.result_select(evt);\n          }\n          this.mouse_on_container = false;\n          break;\n        case 13:\n          if (this.results_showing) {\n            evt.preventDefault();\n          }\n          break;\n        case 27:\n          if (this.results_showing) {\n            evt.preventDefault();\n          }\n          break;\n        case 32:\n          if (this.disable_search) {\n            evt.preventDefault();\n          }\n          break;\n        case 38:\n          evt.preventDefault();\n          this.keyup_arrow();\n          break;\n        case 40:\n          evt.preventDefault();\n          this.keydown_arrow();\n          break;\n      }\n    };\n\n    AbstractChosen.prototype.keyup_checker = function(evt) {\n      var ref, stroke;\n      stroke = (ref = evt.which) != null ? ref : evt.keyCode;\n      this.search_field_scale();\n      switch (stroke) {\n        case 8:\n          if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {\n            this.keydown_backstroke();\n          } else if (!this.pending_backstroke) {\n            this.result_clear_highlight();\n            this.results_search();\n          }\n          break;\n        case 13:\n          evt.preventDefault();\n          if (this.results_showing) {\n            this.result_select(evt);\n          }\n          break;\n        case 27:\n          if (this.results_showing) {\n            this.results_hide();\n          }\n          break;\n        case 9:\n        case 16:\n        case 17:\n        case 18:\n        case 38:\n        case 40:\n        case 91:\n          break;\n        default:\n          this.results_search();\n          break;\n      }\n    };\n\n    AbstractChosen.prototype.clipboard_event_checker = function(evt) {\n      if (this.is_disabled) {\n        return;\n      }\n      return setTimeout(((function(_this) {\n        return function() {\n          return _this.results_search();\n        };\n      })(this)), 50);\n    };\n\n    AbstractChosen.prototype.container_width = function() {\n      if (this.options.width != null) {\n        return this.options.width;\n      } else {\n        return this.form_field.offsetWidth + \"px\";\n      }\n    };\n\n    AbstractChosen.prototype.include_option_in_results = function(option) {\n      if (this.is_multiple && (!this.display_selected_options && option.selected)) {\n        return false;\n      }\n      if (!this.display_disabled_options && option.disabled) {\n        return false;\n      }\n      if (option.empty) {\n        return false;\n      }\n      return true;\n    };\n\n    AbstractChosen.prototype.search_results_touchstart = function(evt) {\n      this.touch_started = true;\n      return this.search_results_mouseover(evt);\n    };\n\n    AbstractChosen.prototype.search_results_touchmove = function(evt) {\n      this.touch_started = false;\n      return this.search_results_mouseout(evt);\n    };\n\n    AbstractChosen.prototype.search_results_touchend = function(evt) {\n      if (this.touch_started) {\n        return this.search_results_mouseup(evt);\n      }\n    };\n\n    AbstractChosen.prototype.outerHTML = function(element) {\n      var tmp;\n      if (element.outerHTML) {\n        return element.outerHTML;\n      }\n      tmp = document.createElement(\"div\");\n      tmp.appendChild(element);\n      return tmp.innerHTML;\n    };\n\n    AbstractChosen.prototype.get_single_html = function() {\n      return \"<a class=\\\"chosen-single chosen-default\\\">\\n  <span>\" + this.default_text + \"</span>\\n  <div><b></b></div>\\n</a>\\n<div class=\\\"chosen-drop\\\">\\n  <div class=\\\"chosen-search\\\">\\n    <input class=\\\"chosen-search-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" />\\n  </div>\\n  <ul class=\\\"chosen-results\\\"></ul>\\n</div>\";\n    };\n\n    AbstractChosen.prototype.get_multi_html = function() {\n      return \"<ul class=\\\"chosen-choices\\\">\\n  <li class=\\\"search-field\\\">\\n    <input class=\\\"chosen-search-input\\\" type=\\\"text\\\" autocomplete=\\\"off\\\" value=\\\"\" + this.default_text + \"\\\" />\\n  </li>\\n</ul>\\n<div class=\\\"chosen-drop\\\">\\n  <ul class=\\\"chosen-results\\\"></ul>\\n</div>\";\n    };\n\n    AbstractChosen.prototype.get_no_results_html = function(terms) {\n      return \"<li class=\\\"no-results\\\">\\n  \" + this.results_none_found + \" <span>\" + (this.escape_html(terms)) + \"</span>\\n</li>\";\n    };\n\n    AbstractChosen.browser_is_supported = function() {\n      if (\"Microsoft Internet Explorer\" === window.navigator.appName) {\n        return document.documentMode >= 8;\n      }\n      if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {\n        return false;\n      }\n      return true;\n    };\n\n    AbstractChosen.default_multiple_text = \"Select Some Options\";\n\n    AbstractChosen.default_single_text = \"Select an Option\";\n\n    AbstractChosen.default_no_result_text = \"No results match\";\n\n    return AbstractChosen;\n\n  })();\n\n  $ = jQuery;\n\n  $.fn.extend({\n    chosen: function(options) {\n      if (!AbstractChosen.browser_is_supported()) {\n        return this;\n      }\n      return this.each(function(input_field) {\n        var $this, chosen;\n        $this = $(this);\n        chosen = $this.data('chosen');\n        if (options === 'destroy') {\n          if (chosen instanceof Chosen) {\n            chosen.destroy();\n          }\n          return;\n        }\n        if (!(chosen instanceof Chosen)) {\n          $this.data('chosen', new Chosen(this, options));\n        }\n      });\n    }\n  });\n\n  Chosen = (function(superClass) {\n    extend(Chosen, superClass);\n\n    function Chosen() {\n      return Chosen.__super__.constructor.apply(this, arguments);\n    }\n\n    Chosen.prototype.setup = function() {\n      this.form_field_jq = $(this.form_field);\n      return this.current_selectedIndex = this.form_field.selectedIndex;\n    };\n\n    Chosen.prototype.set_up_html = function() {\n      var container_classes, container_props;\n      container_classes = [\"chosen-container\"];\n      container_classes.push(\"chosen-container-\" + (this.is_multiple ? \"multi\" : \"single\"));\n      if (this.inherit_select_classes && this.form_field.className) {\n        container_classes.push(this.form_field.className);\n      }\n      if (this.is_rtl) {\n        container_classes.push(\"chosen-rtl\");\n      }\n      container_props = {\n        'class': container_classes.join(' '),\n        'title': this.form_field.title\n      };\n      if (this.form_field.id.length) {\n        container_props.id = this.form_field.id.replace(/[^\\w]/g, '_') + \"_chosen\";\n      }\n      this.container = $(\"<div />\", container_props);\n      this.container.width(this.container_width());\n      if (this.is_multiple) {\n        this.container.html(this.get_multi_html());\n      } else {\n        this.container.html(this.get_single_html());\n      }\n      this.form_field_jq.hide().after(this.container);\n      this.dropdown = this.container.find('div.chosen-drop').first();\n      this.search_field = this.container.find('input').first();\n      this.search_results = this.container.find('ul.chosen-results').first();\n      this.search_field_scale();\n      this.search_no_results = this.container.find('li.no-results').first();\n      if (this.is_multiple) {\n        this.search_choices = this.container.find('ul.chosen-choices').first();\n        this.search_container = this.container.find('li.search-field').first();\n      } else {\n        this.search_container = this.container.find('div.chosen-search').first();\n        this.selected_item = this.container.find('.chosen-single').first();\n      }\n      this.results_build();\n      this.set_tab_index();\n      return this.set_label_behavior();\n    };\n\n    Chosen.prototype.on_ready = function() {\n      return this.form_field_jq.trigger(\"chosen:ready\", {\n        chosen: this\n      });\n    };\n\n    Chosen.prototype.register_observers = function() {\n      this.container.on('touchstart.chosen', (function(_this) {\n        return function(evt) {\n          _this.container_mousedown(evt);\n        };\n      })(this));\n      this.container.on('touchend.chosen', (function(_this) {\n        return function(evt) {\n          _this.container_mouseup(evt);\n        };\n      })(this));\n      this.container.on('mousedown.chosen', (function(_this) {\n        return function(evt) {\n          _this.container_mousedown(evt);\n        };\n      })(this));\n      this.container.on('mouseup.chosen', (function(_this) {\n        return function(evt) {\n          _this.container_mouseup(evt);\n        };\n      })(this));\n      this.container.on('mouseenter.chosen', (function(_this) {\n        return function(evt) {\n          _this.mouse_enter(evt);\n        };\n      })(this));\n      this.container.on('mouseleave.chosen', (function(_this) {\n        return function(evt) {\n          _this.mouse_leave(evt);\n        };\n      })(this));\n      this.search_results.on('mouseup.chosen', (function(_this) {\n        return function(evt) {\n          _this.search_results_mouseup(evt);\n        };\n      })(this));\n      this.search_results.on('mouseover.chosen', (function(_this) {\n        return function(evt) {\n          _this.search_results_mouseover(evt);\n        };\n      })(this));\n      this.search_results.on('mouseout.chosen', (function(_this) {\n        return function(evt) {\n          _this.search_results_mouseout(evt);\n        };\n      })(this));\n      this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {\n        return function(evt) {\n          _this.search_results_mousewheel(evt);\n        };\n      })(this));\n      this.search_results.on('touchstart.chosen', (function(_this) {\n        return function(evt) {\n          _this.search_results_touchstart(evt);\n        };\n      })(this));\n      this.search_results.on('touchmove.chosen', (function(_this) {\n        return function(evt) {\n          _this.search_results_touchmove(evt);\n        };\n      })(this));\n      this.search_results.on('touchend.chosen', (function(_this) {\n        return function(evt) {\n          _this.search_results_touchend(evt);\n        };\n      })(this));\n      this.form_field_jq.on(\"chosen:updated.chosen\", (function(_this) {\n        return function(evt) {\n          _this.results_update_field(evt);\n        };\n      })(this));\n      this.form_field_jq.on(\"chosen:activate.chosen\", (function(_this) {\n        return function(evt) {\n          _this.activate_field(evt);\n        };\n      })(this));\n      this.form_field_jq.on(\"chosen:open.chosen\", (function(_this) {\n        return function(evt) {\n          _this.container_mousedown(evt);\n        };\n      })(this));\n      this.form_field_jq.on(\"chosen:close.chosen\", (function(_this) {\n        return function(evt) {\n          _this.close_field(evt);\n        };\n      })(this));\n      this.search_field.on('blur.chosen', (function(_this) {\n        return function(evt) {\n          _this.input_blur(evt);\n        };\n      })(this));\n      this.search_field.on('keyup.chosen', (function(_this) {\n        return function(evt) {\n          _this.keyup_checker(evt);\n        };\n      })(this));\n      this.search_field.on('keydown.chosen', (function(_this) {\n        return function(evt) {\n          _this.keydown_checker(evt);\n        };\n      })(this));\n      this.search_field.on('focus.chosen', (function(_this) {\n        return function(evt) {\n          _this.input_focus(evt);\n        };\n      })(this));\n      this.search_field.on('cut.chosen', (function(_this) {\n        return function(evt) {\n          _this.clipboard_event_checker(evt);\n        };\n      })(this));\n      this.search_field.on('paste.chosen', (function(_this) {\n        return function(evt) {\n          _this.clipboard_event_checker(evt);\n        };\n      })(this));\n      if (this.is_multiple) {\n        return this.search_choices.on('click.chosen', (function(_this) {\n          return function(evt) {\n            _this.choices_click(evt);\n          };\n        })(this));\n      } else {\n        return this.container.on('click.chosen', function(evt) {\n          evt.preventDefault();\n        });\n      }\n    };\n\n    Chosen.prototype.destroy = function() {\n      $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);\n      if (this.form_field_label.length > 0) {\n        this.form_field_label.off('click.chosen');\n      }\n      if (this.search_field[0].tabIndex) {\n        this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;\n      }\n      this.container.remove();\n      this.form_field_jq.removeData('chosen');\n      return this.form_field_jq.show();\n    };\n\n    Chosen.prototype.search_field_disabled = function() {\n      this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');\n      this.container.toggleClass('chosen-disabled', this.is_disabled);\n      this.search_field[0].disabled = this.is_disabled;\n      if (!this.is_multiple) {\n        this.selected_item.off('focus.chosen', this.activate_field);\n      }\n      if (this.is_disabled) {\n        return this.close_field();\n      } else if (!this.is_multiple) {\n        return this.selected_item.on('focus.chosen', this.activate_field);\n      }\n    };\n\n    Chosen.prototype.container_mousedown = function(evt) {\n      var ref;\n      if (this.is_disabled) {\n        return;\n      }\n      if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {\n        evt.preventDefault();\n      }\n      if (!((evt != null) && ($(evt.target)).hasClass(\"search-choice-close\"))) {\n        if (!this.active_field) {\n          if (this.is_multiple) {\n            this.search_field.val(\"\");\n          }\n          $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);\n          this.results_show();\n        } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents(\"a.chosen-single\").length)) {\n          evt.preventDefault();\n          this.results_toggle();\n        }\n        return this.activate_field();\n      }\n    };\n\n    Chosen.prototype.container_mouseup = function(evt) {\n      if (evt.target.nodeName === \"ABBR\" && !this.is_disabled) {\n        return this.results_reset(evt);\n      }\n    };\n\n    Chosen.prototype.search_results_mousewheel = function(evt) {\n      var delta;\n      if (evt.originalEvent) {\n        delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;\n      }\n      if (delta != null) {\n        evt.preventDefault();\n        if (evt.type === 'DOMMouseScroll') {\n          delta = delta * 40;\n        }\n        return this.search_results.scrollTop(delta + this.search_results.scrollTop());\n      }\n    };\n\n    Chosen.prototype.blur_test = function(evt) {\n      if (!this.active_field && this.container.hasClass(\"chosen-container-active\")) {\n        return this.close_field();\n      }\n    };\n\n    Chosen.prototype.close_field = function() {\n      $(this.container[0].ownerDocument).off(\"click.chosen\", this.click_test_action);\n      this.active_field = false;\n      this.results_hide();\n      this.container.removeClass(\"chosen-container-active\");\n      this.clear_backstroke();\n      this.show_search_field_default();\n      this.search_field_scale();\n      return this.search_field.blur();\n    };\n\n    Chosen.prototype.activate_field = function() {\n      if (this.is_disabled) {\n        return;\n      }\n      this.container.addClass(\"chosen-container-active\");\n      this.active_field = true;\n      this.search_field.val(this.search_field.val());\n      return this.search_field.focus();\n    };\n\n    Chosen.prototype.test_active_click = function(evt) {\n      var active_container;\n      active_container = $(evt.target).closest('.chosen-container');\n      if (active_container.length && this.container[0] === active_container[0]) {\n        return this.active_field = true;\n      } else {\n        return this.close_field();\n      }\n    };\n\n    Chosen.prototype.results_build = function() {\n      this.parsing = true;\n      this.selected_option_count = null;\n      this.results_data = SelectParser.select_to_array(this.form_field);\n      if (this.is_multiple) {\n        this.search_choices.find(\"li.search-choice\").remove();\n      } else {\n        this.single_set_selected_text();\n        if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {\n          this.search_field[0].readOnly = true;\n          this.container.addClass(\"chosen-container-single-nosearch\");\n        } else {\n          this.search_field[0].readOnly = false;\n          this.container.removeClass(\"chosen-container-single-nosearch\");\n        }\n      }\n      this.update_results_content(this.results_option_build({\n        first: true\n      }));\n      this.search_field_disabled();\n      this.show_search_field_default();\n      this.search_field_scale();\n      return this.parsing = false;\n    };\n\n    Chosen.prototype.result_do_highlight = function(el) {\n      var high_bottom, high_top, maxHeight, visible_bottom, visible_top;\n      if (el.length) {\n        this.result_clear_highlight();\n        this.result_highlight = el;\n        this.result_highlight.addClass(\"highlighted\");\n        maxHeight = parseInt(this.search_results.css(\"maxHeight\"), 10);\n        visible_top = this.search_results.scrollTop();\n        visible_bottom = maxHeight + visible_top;\n        high_top = this.result_highlight.position().top + this.search_results.scrollTop();\n        high_bottom = high_top + this.result_highlight.outerHeight();\n        if (high_bottom >= visible_bottom) {\n          return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);\n        } else if (high_top < visible_top) {\n          return this.search_results.scrollTop(high_top);\n        }\n      }\n    };\n\n    Chosen.prototype.result_clear_highlight = function() {\n      if (this.result_highlight) {\n        this.result_highlight.removeClass(\"highlighted\");\n      }\n      return this.result_highlight = null;\n    };\n\n    Chosen.prototype.results_show = function() {\n      if (this.is_multiple && this.max_selected_options <= this.choices_count()) {\n        this.form_field_jq.trigger(\"chosen:maxselected\", {\n          chosen: this\n        });\n        return false;\n      }\n      this.container.addClass(\"chosen-with-drop\");\n      this.results_showing = true;\n      this.search_field.focus();\n      this.search_field.val(this.get_search_field_value());\n      this.winnow_results();\n      return this.form_field_jq.trigger(\"chosen:showing_dropdown\", {\n        chosen: this\n      });\n    };\n\n    Chosen.prototype.update_results_content = function(content) {\n      return this.search_results.html(content);\n    };\n\n    Chosen.prototype.results_hide = function() {\n      if (this.results_showing) {\n        this.result_clear_highlight();\n        this.container.removeClass(\"chosen-with-drop\");\n        this.form_field_jq.trigger(\"chosen:hiding_dropdown\", {\n          chosen: this\n        });\n      }\n      return this.results_showing = false;\n    };\n\n    Chosen.prototype.set_tab_index = function(el) {\n      var ti;\n      if (this.form_field.tabIndex) {\n        ti = this.form_field.tabIndex;\n        this.form_field.tabIndex = -1;\n        return this.search_field[0].tabIndex = ti;\n      }\n    };\n\n    Chosen.prototype.set_label_behavior = function() {\n      this.form_field_label = this.form_field_jq.parents(\"label\");\n      if (!this.form_field_label.length && this.form_field.id.length) {\n        this.form_field_label = $(\"label[for='\" + this.form_field.id + \"']\");\n      }\n      if (this.form_field_label.length > 0) {\n        return this.form_field_label.on('click.chosen', this.label_click_handler);\n      }\n    };\n\n    Chosen.prototype.show_search_field_default = function() {\n      if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {\n        this.search_field.val(this.default_text);\n        return this.search_field.addClass(\"default\");\n      } else {\n        this.search_field.val(\"\");\n        return this.search_field.removeClass(\"default\");\n      }\n    };\n\n    Chosen.prototype.search_results_mouseup = function(evt) {\n      var target;\n      target = $(evt.target).hasClass(\"active-result\") ? $(evt.target) : $(evt.target).parents(\".active-result\").first();\n      if (target.length) {\n        this.result_highlight = target;\n        this.result_select(evt);\n        return this.search_field.focus();\n      }\n    };\n\n    Chosen.prototype.search_results_mouseover = function(evt) {\n      var target;\n      target = $(evt.target).hasClass(\"active-result\") ? $(evt.target) : $(evt.target).parents(\".active-result\").first();\n      if (target) {\n        return this.result_do_highlight(target);\n      }\n    };\n\n    Chosen.prototype.search_results_mouseout = function(evt) {\n      if ($(evt.target).hasClass(\"active-result\") || $(evt.target).parents('.active-result').first()) {\n        return this.result_clear_highlight();\n      }\n    };\n\n    Chosen.prototype.choice_build = function(item) {\n      var choice, close_link;\n      choice = $('<li />', {\n        \"class\": \"search-choice\"\n      }).html(\"<span>\" + (this.choice_label(item)) + \"</span>\");\n      if (item.disabled) {\n        choice.addClass('search-choice-disabled');\n      } else {\n        close_link = $('<a />', {\n          \"class\": 'search-choice-close',\n          'data-option-array-index': item.array_index\n        });\n        close_link.on('click.chosen', (function(_this) {\n          return function(evt) {\n            return _this.choice_destroy_link_click(evt);\n          };\n        })(this));\n        choice.append(close_link);\n      }\n      return this.search_container.before(choice);\n    };\n\n    Chosen.prototype.choice_destroy_link_click = function(evt) {\n      evt.preventDefault();\n      evt.stopPropagation();\n      if (!this.is_disabled) {\n        return this.choice_destroy($(evt.target));\n      }\n    };\n\n    Chosen.prototype.choice_destroy = function(link) {\n      if (this.result_deselect(link[0].getAttribute(\"data-option-array-index\"))) {\n        if (this.active_field) {\n          this.search_field.focus();\n        } else {\n          this.show_search_field_default();\n        }\n        if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {\n          this.results_hide();\n        }\n        link.parents('li').first().remove();\n        return this.search_field_scale();\n      }\n    };\n\n    Chosen.prototype.results_reset = function() {\n      this.reset_single_select_options();\n      this.form_field.options[0].selected = true;\n      this.single_set_selected_text();\n      this.show_search_field_default();\n      this.results_reset_cleanup();\n      this.trigger_form_field_change();\n      if (this.active_field) {\n        return this.results_hide();\n      }\n    };\n\n    Chosen.prototype.results_reset_cleanup = function() {\n      this.current_selectedIndex = this.form_field.selectedIndex;\n      return this.selected_item.find(\"abbr\").remove();\n    };\n\n    Chosen.prototype.result_select = function(evt) {\n      var high, item;\n      if (this.result_highlight) {\n        high = this.result_highlight;\n        this.result_clear_highlight();\n        if (this.is_multiple && this.max_selected_options <= this.choices_count()) {\n          this.form_field_jq.trigger(\"chosen:maxselected\", {\n            chosen: this\n          });\n          return false;\n        }\n        if (this.is_multiple) {\n          high.removeClass(\"active-result\");\n        } else {\n          this.reset_single_select_options();\n        }\n        high.addClass(\"result-selected\");\n        item = this.results_data[high[0].getAttribute(\"data-option-array-index\")];\n        item.selected = true;\n        this.form_field.options[item.options_index].selected = true;\n        this.selected_option_count = null;\n        if (this.is_multiple) {\n          this.choice_build(item);\n        } else {\n          this.single_set_selected_text(this.choice_label(item));\n        }\n        if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {\n          if (evt.metaKey || evt.ctrlKey) {\n            this.winnow_results({\n              skip_highlight: true\n            });\n          } else {\n            this.search_field.val(\"\");\n            this.winnow_results();\n          }\n        } else {\n          this.results_hide();\n          this.show_search_field_default();\n        }\n        if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {\n          this.trigger_form_field_change({\n            selected: this.form_field.options[item.options_index].value\n          });\n        }\n        this.current_selectedIndex = this.form_field.selectedIndex;\n        evt.preventDefault();\n        return this.search_field_scale();\n      }\n    };\n\n    Chosen.prototype.single_set_selected_text = function(text) {\n      if (text == null) {\n        text = this.default_text;\n      }\n      if (text === this.default_text) {\n        this.selected_item.addClass(\"chosen-default\");\n      } else {\n        this.single_deselect_control_build();\n        this.selected_item.removeClass(\"chosen-default\");\n      }\n      return this.selected_item.find(\"span\").html(text);\n    };\n\n    Chosen.prototype.result_deselect = function(pos) {\n      var result_data;\n      result_data = this.results_data[pos];\n      if (!this.form_field.options[result_data.options_index].disabled) {\n        result_data.selected = false;\n        this.form_field.options[result_data.options_index].selected = false;\n        this.selected_option_count = null;\n        this.result_clear_highlight();\n        if (this.results_showing) {\n          this.winnow_results();\n        }\n        this.trigger_form_field_change({\n          deselected: this.form_field.options[result_data.options_index].value\n        });\n        this.search_field_scale();\n        return true;\n      } else {\n        return false;\n      }\n    };\n\n    Chosen.prototype.single_deselect_control_build = function() {\n      if (!this.allow_single_deselect) {\n        return;\n      }\n      if (!this.selected_item.find(\"abbr\").length) {\n        this.selected_item.find(\"span\").first().after(\"<abbr class=\\\"search-choice-close\\\"></abbr>\");\n      }\n      return this.selected_item.addClass(\"chosen-single-with-deselect\");\n    };\n\n    Chosen.prototype.get_search_field_value = function() {\n      return this.search_field.val();\n    };\n\n    Chosen.prototype.get_search_text = function() {\n      return $.trim(this.get_search_field_value());\n    };\n\n    Chosen.prototype.escape_html = function(text) {\n      return $('<div/>').text(text).html();\n    };\n\n    Chosen.prototype.winnow_results_set_highlight = function() {\n      var do_high, selected_results;\n      selected_results = !this.is_multiple ? this.search_results.find(\".result-selected.active-result\") : [];\n      do_high = selected_results.length ? selected_results.first() : this.search_results.find(\".active-result\").first();\n      if (do_high != null) {\n        return this.result_do_highlight(do_high);\n      }\n    };\n\n    Chosen.prototype.no_results = function(terms) {\n      var no_results_html;\n      no_results_html = this.get_no_results_html(terms);\n      this.search_results.append(no_results_html);\n      return this.form_field_jq.trigger(\"chosen:no_results\", {\n        chosen: this\n      });\n    };\n\n    Chosen.prototype.no_results_clear = function() {\n      return this.search_results.find(\".no-results\").remove();\n    };\n\n    Chosen.prototype.keydown_arrow = function() {\n      var next_sib;\n      if (this.results_showing && this.result_highlight) {\n        next_sib = this.result_highlight.nextAll(\"li.active-result\").first();\n        if (next_sib) {\n          return this.result_do_highlight(next_sib);\n        }\n      } else {\n        return this.results_show();\n      }\n    };\n\n    Chosen.prototype.keyup_arrow = function() {\n      var prev_sibs;\n      if (!this.results_showing && !this.is_multiple) {\n        return this.results_show();\n      } else if (this.result_highlight) {\n        prev_sibs = this.result_highlight.prevAll(\"li.active-result\");\n        if (prev_sibs.length) {\n          return this.result_do_highlight(prev_sibs.first());\n        } else {\n          if (this.choices_count() > 0) {\n            this.results_hide();\n          }\n          return this.result_clear_highlight();\n        }\n      }\n    };\n\n    Chosen.prototype.keydown_backstroke = function() {\n      var next_available_destroy;\n      if (this.pending_backstroke) {\n        this.choice_destroy(this.pending_backstroke.find(\"a\").first());\n        return this.clear_backstroke();\n      } else {\n        next_available_destroy = this.search_container.siblings(\"li.search-choice\").last();\n        if (next_available_destroy.length && !next_available_destroy.hasClass(\"search-choice-disabled\")) {\n          this.pending_backstroke = next_available_destroy;\n          if (this.single_backstroke_delete) {\n            return this.keydown_backstroke();\n          } else {\n            return this.pending_backstroke.addClass(\"search-choice-focus\");\n          }\n        }\n      }\n    };\n\n    Chosen.prototype.clear_backstroke = function() {\n      if (this.pending_backstroke) {\n        this.pending_backstroke.removeClass(\"search-choice-focus\");\n      }\n      return this.pending_backstroke = null;\n    };\n\n    Chosen.prototype.search_field_scale = function() {\n      var div, i, len, style, style_block, styles, width;\n      if (!this.is_multiple) {\n        return;\n      }\n      style_block = {\n        position: 'absolute',\n        left: '-1000px',\n        top: '-1000px',\n        display: 'none',\n        whiteSpace: 'pre'\n      };\n      styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];\n      for (i = 0, len = styles.length; i < len; i++) {\n        style = styles[i];\n        style_block[style] = this.search_field.css(style);\n      }\n      div = $('<div />').css(style_block);\n      div.text(this.get_search_field_value());\n      $('body').append(div);\n      width = div.width() + 25;\n      div.remove();\n      if (this.container.is(':visible')) {\n        width = Math.min(this.container.outerWidth() - 10, width);\n      }\n      return this.search_field.width(width);\n    };\n\n    Chosen.prototype.trigger_form_field_change = function(extra) {\n      this.form_field_jq.trigger(\"input\", extra);\n      return this.form_field_jq.trigger(\"change\", extra);\n    };\n\n    return Chosen;\n\n  })(AbstractChosen);\n\n}).call(this);\n","$ ->\n  window.A3R5 =\n    disableResultField: (resultField) ->\n      resultField.prop('readonly', 'readonly')\n      resultField.val('')\n      resultField.tipsy('hide')\n      resultField.removeClass('invalid')\n\n    enableResultField: (resultField) ->\n      if resultField.prop('readonly')\n        resultField.prop('readonly', false)\n        resultField.siblings('input[value=numeric]').prop('checked', 'checked')\n\n    validate: ->\n      errors_fields= @errors_fields()\n      if errors_fields.length > 0\n        _.each errors_fields, (field) -> $(field).tipsy('show')\n        alert('The results contain errors. Please review entries before saving.')\n        errors_fields[0].focus()\n        $('.reloading').removeClass('reloading')\n\n      errors_fields.length == 0\n\n    errors_fields: ->\n      $(\".field-with-validation\").filter ->\n        $.before_validation($(@))\n        not $.validate($(@))\n\n  $('.a3r5').on 'change', '.result input[type=text]', (e) ->\n    numericResultField = $(e.target)\n    numericOption = numericResultField.siblings('input[value=numeric]')\n    if numericResultField.val()\n      numericOption.prop('checked', 'checked')\n    else\n      numericOption.prop('checked', false)\n\n  $('.a3r5').on 'change', '.result input[type=radio]', (e) ->\n    resultField = $(e.target).siblings('input[type=text]')\n    A3R5.disableResultField(resultField)\n\n  $('.a3r5').on 'click', '.result input[type=text]', (e) ->\n    resultField = $(e.target)\n    A3R5.enableResultField(resultField)\n\n  $('.a3r5').on 'change keyup keydown', 'input, textarea, select', (e) ->\n    $(this).addClass('changed-input')\n\n  #Only remove changed-input classes if the user is saving the form\n  #Keep changed-input classes if user is submitting the form in case\n  #there are validation errors which prevent the user\n  #from submitting.\n  $('#a3_r5_submission_form_save').on 'click', (e) ->\n    $('.changed-input').removeClass('changed-input')\n    $('.a3r5').addClass('reloading')\n\n  $(window).on 'beforeunload', (e) ->\n    if $('.changed-input').length && !$('.reloading').length\n      return \"You have unsaved changes.\"\n\n  $.extend($.validations, {\n    a3_r5_result: {\n      format: 'float',\n      digits_after_decimal: 1,\n      minimum: 0.1,\n      require_value_in_group_on_submit: true,\n      allow_blank: true\n    }\n  })\n\n  $('#a3_r5_submission_form_submit').click (e) ->\n    if confirm('Are you sure you want to submit your results? Once you submit your results you will no longer be able to make any changes.')\n      $('.a3r5').addClass('reloading')\n      A3R5.validate()\n    else\n      false\n\n  window.A3R5Components =\n    disableComponentOption: (componentSelects, id) ->\n      componentSelects.find(\"option[value=#{id}]\").prop('disabled', 'disabled')\n\n    enableComponentOption: (componentSelects, id) ->\n      componentSelects.find(\"option[value=#{id}]\").prop('disabled', false)\n\n    componentSelectsExcept: (componentSelect) ->\n      $(\"[data-action=removeFromOptions]\").not(componentSelect)\n\n    updateComponentSelectOptions: (componentSelect) ->\n      componentSelects = @componentSelectsExcept(componentSelect)\n      if componentSelect.data('previous-value')\n        @enableComponentOption(componentSelects, componentSelect.data('previous-value'))\n      @disableComponentOption(componentSelects, componentSelect.val())\n      componentSelect.data('previous-value', componentSelect.val())\n\n  $a3r5_components = $('.a3r5_components')\n\n  # Disable selected option and enable previously selected option on other selects\n  $a3r5_components.on 'change', '[data-action=removeFromOptions]', (e) ->\n    componentSelect = $(e.target)\n    A3R5Components.updateComponentSelectOptions(componentSelect)\n\n  # Disable selected options on load\n  $('.a3r5_components [data-action=removeFromOptions]').each (index, componentSelect) ->\n    componentSelects = A3R5Components.componentSelectsExcept(componentSelect)\n    A3R5Components.disableComponentOption(componentSelects, $(componentSelect).val())\n\n  $a3r5_components.on 'nested:fieldAdded', (event) ->\n    # Disable selected options\n    componentSelect = $(event.field).find('select[data-action=removeFromOptions]')\n    $('.a3r5_components [data-action=removeFromOptions] option[disabled]').each (index, disabledOption) ->\n      componentSelect.find(\"option[value=#{$(disabledOption).val()}]\").prop('disabled', 'disabled')\n    # Recalculate display-order\n    recalculateAllSortableLists()\n\n  $a3r5_components.on 'nested:fieldRemoved', (event) ->\n    # Enable previously selected option\n    componentSelect = $(event.field).find('select[data-action=removeFromOptions]')\n    componentSelects = A3R5Components.componentSelectsExcept(componentSelect)\n    A3R5Components.enableComponentOption(componentSelects, componentSelect.data('previous-value'))\n    # Remove display-order hidden field and recalculate display-order\n    $(event.target).find('.display-order').remove()\n    recalculateAllSortableLists()\n\n  $( \".jquery-sortable\" ).sortable\n    stop: (event, ui) ->\n      recalculateDisplayOrder ui.item.parent()\n\n  recalculateDisplayOrder = (parent) ->\n    parent.find('.display-order').each (index, element) ->\n      $(element).val(index)\n\n  recalculateAllSortableLists = ->\n    $('.jquery-sortable').each ->\n      recalculateDisplayOrder($(this))\n","$.addNewUser = () ->\n  new_user = $(\"#user-template\").clone()\n  index = $(\"div.user-fields\").length\n  new_user.attr(\"id\", \"user-fields-#{index}\")\n  new_user.adjust_rails_form_fields(index)\n  $(\"div#users\").append(new_user)\n  new_user.show()\n\n$.addAddress = () ->\n  new_address = $(\"#address-template\").clone()\n  index = $(\"div.address-fields\").length\n  new_address.attr id: \"address-fields-#{index}\"\n  new_address.adjust_rails_form_fields(index)\n  $(\"div#addresses\").append(new_address)\n  new_address.show()\n\n$.addPhoneNumber = () ->\n  new_phone = $(\"#phone-number-template\").clone()\n  index = $(\"div.phone-number-fields\").length\n  new_phone.attr(\"id\", \"phone-number-fields-#{index}\")\n  new_phone.adjust_rails_form_fields(index)\n  $(\"div#phone-numbers\").append(new_phone)\n  new_phone.show()\n\n$.addIqaDonor = () ->\n  index = $(\"div.iqa-donor-fields\").length\n\n  return null if index > $.maxNumberOfDonors()\n\n  new_index = parseInt(index) + 1\n  new_iqa_donor = $(\"#iqa-donor-template\").clone()\n  new_iqa_donor.attr(\"id\", \"iqa-donor-fields-#{new_index}\")\n  new_iqa_donor.adjust_rails_form_fields(new_index)\n\n  name_field = new_iqa_donor.find(\"input[name='proficiency_test[iqa_donors_attributes][#{new_index}][name]']\")\n  name_field.val($.iqaDonorName(index))\n\n  $(\"div#iqa-donors\").append(new_iqa_donor)\n  new_iqa_donor.show()\n  $.hideAddIqaDonorButton() if new_index > $.maxNumberOfDonors()\n\n$.iqaDonorName = (index) ->\n  ['A', 'B', 'C', 'D', 'E', 'F'][index - 1]\n\n# 6 is the max number of donors per trial\n$.maxNumberOfDonors = () ->\n  6\n","$(document).ready ->\n  class Aliquots\n    constructor: ->\n      @container = $.parseJSON($(\"#is-container\").val()) if $('#is-container').length > 0\n\n    add: ->\n      createNewAliquotFields()\n      showRemoveButtonForMultipleAliquots()\n\n    showRemoveButtonForMultipleAliquots = ->\n      if $(\".aliquot-entry\").length <= 1\n        $(\".aliquot-entry:first\").children(\".discard\").children().remove()\n      else\n        # If there isn't a remove button on the first aliquot, then add one.\n        selectedLocation = $(\".aliquot-entry:last\").children().children(\"#location_id\").val()\n        selectedShelf = $(\".aliquot-entry:last\").children().children(\".selected_shelf\").val()\n        $(\".aliquot-entry:last\").children().children(\"#location_id\").val(selectedLocation)\n        $(\".aliquot-entry:last\").children().children(\".selected_shelf\").val(selectedShelf)\n        if $(\".aliquot-entry:first\").children(\".discard\").children().length == 0\n          $(\".aliquot-entry:first\").children(\".discard\").append('<a class=\"delete-link remove-aliquot\">Remove</a>')\n          $(\".aliquot-entry:last\").children(\".discard\").append('<a class=\"delete-link remove-aliquot\">Remove</a>')\n\n    createNewAliquotFields = ->\n      template = $(\".aliquot-entry:last\").clone()\n      template.find(\"input:text, input.aliquot-id\").val \"\"\n      template.adjust_rails_form_fields($(\".aliquot-entry\").length)\n      template.find(\".aliquot-number\").text($(\".aliquot-entry\").length + 1)\n      $(\".aliquot-entry:last\").after template\n\n    remove: (remove_button) ->\n      $(remove_button).parent().parent().remove()\n      # If there is only one aliquot, then remove the ability to remove it. We\n      # cannot allow all of the aliquots to be removed since we use them as a\n      # template for new aliquots.\n      showRemoveButtonForMultipleAliquots()\n      handleExceptions ->\n        total = calculateTotal()\n        unaliquoted = initial_amount()\n        removeFromUnaliquoted(total, unaliquoted)\n\n    initial_amount = ->\n      # total_to_aliquot is a global variable set on page load.\n      total_to_aliquot\n\n\n    is_container: ->\n      @container\n\n    is_valid: ->\n      @valid\n\n    updateTotal: ->\n      $('table input:hidden').attr('disabled', false)\n      handleExceptions =>\n        @valid = false\n        total = calculateTotal()\n        unaliquoted = initial_amount()\n        removeFromUnaliquoted(total, unaliquoted)\n        @valid = true\n\n    removeInvalidFields: ->\n      aliquotList = $(\".aliquot-entry\")\n      for aliquot in aliquotList\n        [quantity, amount, units] = getValues(aliquot)\n        # Remove any empty fields. I might change this to disable.\n        hasNoEmptyFields = handleExceptions ->\n          if aliquots.is_container()\n            unless quantity\n              throw EmptyFieldError\n          else\n            unless amount and quantity\n              throw EmptyFieldError\n          return true\n      # Disable calculated fields if there's nothing to aliquot\n        return false unless hasNoEmptyFields\n      if aliquots.is_container()\n        quantity = getValues(\"#unaliquoted\")\n        if quantity <= 0\n          $(\"#unaliquoted\").children(\"td\").children().attr('disabled','disabled')\n      else\n        [quantity, amount, units] = getValues(\"#unaliquoted\")\n        if amount <= 0 or quantity <= 0\n          $(\"#unaliquoted\").children(\"td\").children().attr('disabled','disabled')\n        [quantity, amount, units] = getValues(\"#unaliquoted-partial\")\n        if amount <= 0 or quantity <= 0\n          $(\"#unaliquoted-partial\").children(\"td\").children().attr('disabled','disabled')\n      return true\n\n    # Calculate the remaining material.\n    calculateUnaliquoted = (total, unaliquoted) ->\n      [unaliquotedQuantity, unaliquotedAmount, unaliquotedUnits] = parseUnaliquoted(unaliquoted)\n      unaliquotedQuantity = parseInt(unaliquotedQuantity, 10)\n      if aliquots.is_container()\n        unaliquotedTotal = unaliquotedQuantity\n      else\n        unaliquotedAmount = parseFloat unaliquotedAmount\n        unaliquotedTotal = convertToMilli(unaliquotedUnits) * unaliquotedAmount * unaliquotedQuantity\n      difference = unaliquotedTotal - total\n      return [difference, unaliquotedAmount, unaliquotedUnits]\n\n    # Remove aliquoted material from the unaliquoted field.\n    # Returns true if not over aliquoted.\n    removeFromUnaliquoted = (total, unaliquoted) ->\n      [difference, unaliquotedAmount, unaliquotedUnits] = calculateUnaliquoted(total, unaliquoted)\n      if difference < 0\n        throw OverAliquotedError\n      [quantity, amount, units] = composeUnaliquoted(difference, unaliquotedAmount, unaliquotedUnits)\n      setValues(\"#unaliquoted\", quantity, amount, units)\n\n    # Pull the starting material from a heading on the page.\n    # Returns [unaliquotedQuantity, unaliquotedAmount, unaliquotedUnits]\n    parseUnaliquoted = (unaliquoted) ->\n      return [unaliquoted.quantity, unaliquoted.amount_per_unit, unaliquoted.units];\n\n    # Convert unaliquoted material into human readable form.\n    composeUnaliquoted = (unaliquoted, amount, units) ->\n      if aliquots.is_container()\n        quantity = unaliquoted\n        return [quantity]\n      else\n        quantity = calculateRemainder(unaliquoted, amount, units)\n        return [quantity, amount, units]\n\n    # Calculate partial units of unaliquoted material.\n    calculateRemainder = (amount, unitAmount, units) ->\n      unitAmount = convertToMilli(units) * unitAmount\n      quantity = Math.floor(amount/unitAmount)\n      showPartialUnaliquoted(amount % unitAmount, units.slice(-1))\n      return quantity\n\n    # Calculate the total aliquoted material.\n    calculateTotal = ->\n      aliquotList = $(\".aliquot-entry\")\n      total = 0\n      for aliquot in aliquotList\n        [quantity, amount, units] = getValues(aliquot)\n        if aliquots.is_container()\n          if quantity\n            total = quantity + total\n        else\n          if quantity and amount\n            total = convertToMilli(units) * amount * quantity + total\n        if quantity <= 0 or amount <= 0\n          throw NegativeError\n      return total\n\n    # Show partial units of unaliquoted material.\n    showPartialUnaliquoted = (remainder, units) ->\n      partial = convertFromMilli remainder, units\n      remainder = Math.round(partial[0] * remainder * 1000000000)/1000000000 # skirt floating point errors\n      # Since partial containers can only have a quantity of 1 or 0, just check to\n      # see if there is any material in the partial.\n      if remainder\n        setValues(\"#unaliquoted-partial\", 1, remainder, partial[1])\n      else\n        setValues(\"#unaliquoted-partial\", 0, remainder, partial[1])\n\n    ## TOOLS\n\n    getValues = (section) ->\n      inputs = $(section).children(\"td\").children(\".aliquot-input\")\n      if aliquots.is_container()\n        quantity = parseInt($(inputs[0]).val(), 10)\n        return [quantity]\n      else\n        quantity = parseInt($(inputs[0]).val(), 10)\n        amount = parseFloat $(inputs[1]).val()\n        units = $(inputs[2]).val()\n\n        return [quantity, amount, units]\n\n    setValues = (section, quantity, amount, units) ->\n      if aliquots.is_container()\n        [quantityField] = $(section).children(\"td\").children(\".aliquot-input\")\n        quantityField.value = quantity\n        return true\n      else\n        [quantityField, amountField, unitsField] = $(section).children(\"td\").children(\".aliquot-input\")\n        quantityField.value = quantity\n        amountField.value = amount\n        unitsField.value = units\n        return true\n\n    # Convert normal or micro units to milli units for easier math.\n    convertToMilli = (units) ->\n      if units == \"L\" or units == \"g\"\n        return 1000000\n      else if units == \"mL\" or units == \"mg\"\n        return 1000\n      # Checks for micro units, did it this way to avoid matching a greek\n      # character, which was causing problems.\n      else\n        return 1\n\n      # Convert back when you are done.\n    convertFromMilli = (amount, unitType) ->\n      amount = Math.abs(amount)\n      if amount / 1000000 >= 1\n        units = unitType\n        factor = 1 / 1000000\n      else if amount /1000 >= 1\n        units = \"m\" + unitType\n        factor = 1/1000\n      else\n        units = \"μ\" + unitType\n        factor = 1\n      return [factor, units]\n\n    handleExceptions = (block) ->\n      try\n        retval = block()\n\n        # Restore non-error state after successfully calling block\n        $(\"#negative-warning\").fadeOut()\n\n        $(\"#unaliquoted\").css(\"border\", \"1px solid rgb(187, 187, 187)\")\n        $(\"#over-aliquoted\").fadeOut()\n\n        return retval\n      catch error\n        if error == OverAliquotedError\n          $(\"#unaliquoted\").css(\"border\", \"1px solid red\")\n          $(\"#over-aliquoted\").fadeIn()\n        else if error == NegativeError\n          $(\"#negative-warning\").fadeIn()\n        else if error == EmptyFieldError\n          $(\"#empty-field-warning\").fadeIn()\n          return false\n        else\n          throw error\n\n    NegativeError = {}\n    OverAliquotedError = {}\n    EmptyFieldError = {}\n\n\n  aliquots = new Aliquots()\n\n  simpleCheck = ->\n    quantity = $(\"#reagent_transaction_quantity\").val()\n    amount = $(\"#reagent_transaction_amount_per_unit\").val()\n    if $.parseJSON($(\"#is-container\").val())\n      unless quantity\n        $(\"#empty-field-warning\").fadeIn()\n        return false\n    else\n      unless amount and quantity\n        $(\"#empty-field-warning\").fadeIn()\n        return false\n    return true\n\n  ###\n  #\n  # Event Handlers\n  #\n  ###\n  $aliquots = $('.aliquots')\n\n  # Add aliquots to the form.\n  $aliquots.on 'click', '.add-aliquot', (e) ->\n    e.preventDefault()\n    aliquots.add()\n\n  # Remove Aliquots from the form.\n  $aliquots.on 'click', '.remove-aliquot', (e) ->\n    e.preventDefault()\n    aliquots.remove(e.target)\n\n  # Raise a dialog window when the user submits invalid data.\n  $(\".reagent-transform\").submit( (e) ->\n    if $(\"#unaliquoted\").length > 0\n      aliquots.updateTotal()\n      return false unless aliquots.is_valid()\n      return aliquots.removeInvalidFields()\n    else if $(\"#reagent_transaction_quantity\").length > 0\n      return simpleCheck()\n\n\n  )\n\n  # Recalculate the remaining materials when the text fields change.\n  $('.aliquot-input').on \"keyup\",  (e) ->\n    aliquots.updateTotal()\n\n  # Recalculate the remaining materials when the text fields change.\n  $('.aliquot-input').on \"change\",  (e) ->\n    aliquots.updateTotal()\n\n","requireAll = (r) ->\n  r.keys().forEach r\n\nrequire(\"jquery.browser\")\nrequire(\"chosen-js/chosen.jquery.js\")\nrequire(\"jquery-ui\")\nrequire(\"jquery-ui/ui/widgets/sortable\")\nrequire(\"jquery-ui/ui/widgets/tabs\")\nrequire(\"jquery-ui/ui/widgets/autocomplete\")\nrequire(\"jquery-ui/ui/widgets/dialog\")\nrequire(\"jquery-query-object\")\nrequire(\"jquery-datetimepicker\")\nrequire(\"jquery.tipsy\")\nrequire(\"jquery-validation\")\nrequire(\"jquery-tooltipster/js/jquery.tooltipster.min\")\nrequire(\"jquery.event.drag\")\nrequire(\"moment\")\nrequire(\"jquery_nested_form\")\nrequire(\"underscore\")\nrequire(\"select2\")\nrequire(\"d3\")\nrequire(\"c3\")\n\nrequireAll(require.context('./', true, /^(?!graph_image).*\\.coffee$/))\n\njQuery.fn.adjust_rails_form_fields = (i, opts={}) ->\n  attributeName = opts['attributeName']\n  clear = opts['clear']\n  if clear?\n    clearRegex = new RegExp(\"_#{clear}$\")\n  if attributeName?\n    attributeIndexPattern = \"\\\\[#{attributeName}\\\\]\"\n    attributeIndex = \"[#{attributeName}]\"\n  else\n    attributeName = ''\n    attributeIndexPattern = ''\n    attributeIndex = ''\n\n  idRegex = new RegExp(\"#{attributeName}_(\\\\d+)_\")\n  nameRegex = new RegExp(\"#{attributeIndexPattern}\\\\[(\\\\d+)\\\\]\")\n\n  this.find('input, label, textarea, select').each () ->\n    element = $(this)\n    elementId = element.attr('id')\n    if elementId?\n      if clearRegex && elementId.match clearRegex\n        element.val('')\n      newId = element.attr('id').replace idRegex, (m,digits) ->\n        \"#{attributeName}_#{i}_\"\n      element.attr('id', newId)\n    if element.attr('name')?\n      newName = element.attr('name').replace nameRegex, (m,digits) ->\n        \"#{attributeIndex}[#{i}]\"\n      element.attr('name', newName)\n    if element.attr('for')?\n      newFor = element.attr('for').replace idRegex, (m,digits) ->\n        \"#{attributeName}_#{i}_\"\n      element.attr('for', newFor)\n    element\n\njQuery.fn.cladeCodeObserver = () ->\n  supernatant_name_field = $('#processing_event_detail_attributes_supernatant_name')\n  original_supernatant_name = supernatant_name_field.val()\n  spiked_plasma_name_field = $('#processing_event_detail_attributes_spiked_plasma_name')\n  original_spiked_plasma_name = spiked_plasma_name_field.val()\n  this.each () ->\n     $(this).keyup ->\n       code = $(this).val().toUpperCase()\n       supernatant_name_field.val(original_supernatant_name.replace(/^DE(\\?+|\\d\\d\\d|[^\\d][^\\d])/, \"DE#{code}\"))\n       spiked_plasma_name_field.val(original_spiked_plasma_name.replace(/^DE(\\?+|\\d\\d\\d|[^\\d][^\\d])/, \"DE#{code}\"))\n\n$.addFormlet = (what) ->\n  parentDiv = $(\"div##{what}s\")\n  currentBands = parentDiv.find(\"div.#{what}\")\n  newBand = currentBands.last().clone()\n  newBand.adjust_rails_form_fields(currentBands.length)\n  currentBands.last().after(newBand)\n  newBand.show()\n\njQuery ->\n  $(\".chosen-select, select.chosen\").chosen(allow_single_deselect: true)\n  $('.chosen-single, .chosen-container-single').css('width','198px')\n  $('.chosen-container-multi').css('width', 'auto')\n  $('.chosen-container-multi').css('min-width', '200px')\n  $('.chosen-container-multi').css('max-width', '600px')\n  $('.chosen-drop').css('width','198px')\n  $('.chosen-search input').css('width','163px')\n  $('.chosen-results li').css('word-wrap','break-word')\n\n\n$ ->\n  $(\"#q_subtype_in\").trigger(\"chosen:updated\")\n  $('.tipsy-tooltip').tipsy()\n\n  #  Toggles the program menu on user edit\n  $('.user_form').on 'click', '.assign-program-manager, .assign-ep-reviewer, .assign-application-manager, .assign-biostatistician, .assign-coa-management', ->\n    role_type = $(this).attr('class')\n    if $(this).prop('checked')\n      $(\".assign-programs.#{role_type}\").slideToggle(300)\n    else\n      $(\".assign-programs.#{role_type}\").slideToggle(300)\n    return true\n\n  # fires the click callback for the checkbox when the page loads\n  $('.assign-program-manager, .assign-ep-reviewer, .assign-application-manager, .assign-biostatistician, .assign-coa-management').each (i,elt) ->\n    if $(elt).prop('checked')\n      role_type = $(elt).attr('class')\n      $(\".assign-programs.#{role_type }\").show(0)\n    return true\n\n  # Used in qualifying_studies/search_orders\n  $('.qualifying_studies_controller').find('.order-id').click ->\n    orderId = $(this).attr('id')\n    $(\"#order_#{orderId}_row\").toggle()\n\n  $('.qualifying_studies_controller').find('.order_item_fulfillment_rows').hide();\n\njQuery ->\n  $.add_datepickers()\n  $('.document-formlets').multipleFileUploader()\n  $(\"form\").validate()\n\n  $(\"[data-action=print]\").click (e) ->\n    window.print()\n    e.preventDefault()\n\n  $.add_quantification_select_trigger()\n\n  $(\"#reset-filter\").on \"click\", ->\n    $(this).parents(\"div.filter\").find(\"input[type=text]\").val(\"\")\n    $(this).parents(\"div.filter\").find(\"input:checkbox\").prop(\"checked\", false)\n    $(this).parents(\"div.filter\").find(\"select\").each (index, select) ->\n      select = $(select)\n      select.val($(\"option:first\"))\n    $(\"#q_subtype_in\").trigger(\"chosen:updated\")\n\n\n  $('a#add-fiebig-band').on 'click', (evtHandler) ->\n    evtHandler.preventDefault()\n    $.addNewFiebigBand()\n\n\n  $('#sga-form').hide()\n  $('#add-sga-button').sgaFormCreator()\n\n  $.add_polymorphic_event_type_trigger()\n  $('#processing_event_detail_attributes_test_type.polymorphic').change()\n\n  $('select.search_equality').on 'change', (evHdlr)->\n    evHdlr.preventDefault()\n    field = $(this).next('input')\n    id    = field.attr 'id'\n    cond  = $(this).val()\n    field.attr(\"name\", \"q[#{id}_#{cond}]\")\n\n  $('span.specimen-select a').feedersSelector()\n  $('span.specimen-reject a').feedersSelector('reject')\n\n  $('#order_site_id').on 'change', (event) ->\n    $(\".shipping-address\").hide()\n    $(\"#shipping-address-\"+this.value).show()\n    $(\"#courier-account-number\").hide()\n\n  $(\"a#add-user\").on \"click\", (event) ->\n    event.preventDefault()\n    $.addNewUser()\n\n  $(\"a#add-address\").on \"click\", (event) ->\n    event.preventDefault()\n    $.addAddress()\n\n  $(\"a#add-phone-number\").on \"click\", (event) ->\n    event.preventDefault()\n    $.addPhoneNumber()\n\n  $(\"a#add-iqa-donor\").on \"click\", (event) ->\n    event.preventDefault()\n    $.addIqaDonor()\n\n  $.hideAddIqaDonorButton = () ->\n    $(\"a#add-iqa-donor\").hide()\n\n  $(\".primary-phone:radio\").on \"click\", (event) ->\n    $(\".primary-phone:radio\").prop(\"checked\", false)\n    $(this).prop(\"checked\", true)\n\n  $(\"a.remove-association\").on \"click\", (event) ->\n    event.preventDefault()\n    $(this).prev(\"input:hidden\").val(1)\n    $(this).closest(\"div.nested-fields\").hide()\n\n  $(\"a.remove-coa\").on \"click\", ->\n    $(this).prev().val(1).prev().hide()\n    $(\"input.new-coa\").show()\n    $(this).hide()\n\n  $(\"input.new-coa\").on \"change\", ->\n    $(\"input#coa-destroy\").val(0)\n\n  $('#select-all-sites').click ->\n    $('input.send-out-site').prop('checked', true).change()\n\n  $('#deselect-all-sites').click ->\n    $('input.send-out-site').prop('checked', false).change()\n\n  $('#merge-all').on 'click', (_event) ->\n    $('input.merge-column:not(:disabled)').prop('checked', true).change()\n\n  $('#merge-none').on 'click', (_event) ->\n    $('input.merge-column:not(:disabled)').prop('checked', false).change()\n\n  $('.send-out-site').on 'change', (event) ->\n    merge_cb = $(this).closest('tr').find('[data_merge_cb]')\n    if $(this).prop('checked') != true\n      merge_cb.prop('checked', false)\n      merge_cb.attr('disabled', true)\n    else\n      merge_cb.attr('disabled', false)\n\n  $('.replace-ep-results a').click (event)->\n    event.preventDefault()\n    self = $(this)\n    container = self.parent('div')\n    hiddenDiv = $(\"##{container.data('hidden-div-id')}\")\n    hiddenDiv.show()\n    container.parent('div').hide()\n\n  $('button.import-results-button').click (event) ->\n    button = $(this)\n    button.text('Importing')\n    button.attr('disabled', true)\n    confirmPrompt = button.data('confirmation-prompt')\n    if (not confirmPrompt?) or confirm(confirmPrompt)\n      jQuery.post($(this).data('url'), (response) ->\n        button.hide() if response['succeeded']\n        $('#flash-messages').html(response['data'])\n      )\n    else\n      button.text('Import')\n      button.attr('disabled', false)\n\n  $('.shipment-receive-check-box').change (event) ->\n    event.preventDefault()\n    self = $(this)\n    container = self.closest('div.shipment-received')\n    widget = self.closest('div.shipment-received-widget')\n    form = container.find('.shipment-received-form')\n    if self.prop('checked') == true\n      form.show()\n    else\n      form.hide()\n\n  $('input.cancel-receive-shipment-button').click (event) ->\n    event.preventDefault()\n    self = $(this)\n    container = self.closest('div.shipment-received')\n    widget = container.find('div.shipment-received-widget')\n    form = self.closest('.shipment-received-form')\n    widget.show()\n    form.hide()\n\n  $('.submission_stream_selector select').change (event) ->\n    self = $(this)\n    urlWithoutStreamNumber = window.location.href.replace /&stream_number=.+$/, \"\"\n    window.location = urlWithoutStreamNumber + \"&stream_number=\" + self.val()\n\n  # Auto-focus on a field when the page loads\n  field = $(\".page_load_focus\").first()\n  field.focus() if field\n\n\n$(document).ready ->\n  $('[data-back-link]').click ->\n    history.back()\n\n  $(\"table.rowclick\").jrowclick()\n\n  # can't make checkboxes readonly w/ html, therefore use this class to mimic standard behavior\n  $(\".readonly_checkbox\").click ->\n    false\n  $(\".readonly_checkbox\").keydown ->\n    false\n\n  # deletes record from UI after an ajax call to destroy\n  $('.delete_record').bind('ajax:success', (event, data, status, xhr) ->\n    $(this).closest('.record_container').fadeOut()\n  )\n\nwindow.emptyEntries = (selector) ->\n  entries = $(selector)\n  filteredEntries = _.filter entries, (entry) -> $(entry).val() == \"\"\n  $ filteredEntries\n\nwindow.allEmptyEntries = (selectors, filters) ->\n  nonEmptyFilters = filters or ['input:visible', 'select:visible', 'textarea:visible']\n  filterString = nonEmptyFilters.join(',')\n  selectorString = selectors.join(',')\n  emptyEntries($(selectorString).find(filterString))\n\nwindow.unique = (arr) ->\n  newArray = []\n  for value in arr\n    if jQuery.inArray(value, newArray) == -1\n      newArray.push(value)\n  newArray\n\nwindow.log = (msg) ->\n  true  if console and console.log and console.log(msg)\n\nwindow.debug = (obj) ->\n  for x of obj\n    console.log \"--Attribute: \" + x\n    console.log obj[x]\n\n# Console-polyfill. MIT license.\n# https://github.com/paulmillr/console-polyfill\n# Make it safe to do console.log() always.\n((con) ->\n  \"use strict\"\n  prop = undefined\n  method = undefined\n  empty = {}\n  dummy = ->\n\n  properties = \"memory\".split(\",\")\n  methods = (\"assert,count,debug,dir,dirxml,error,exception,group,\" + \"groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,\" + \"time,timeEnd,trace,warn\").split(\",\")\n  con[prop] = con[prop] or empty  while prop = properties.pop()\n  con[method] = con[method] or dummy  while method = methods.pop()\n) window.console = window.console or {}\n","$ ->\n  window.Assays =\n    templates: {}\n    selectedWellContents: {}\n    selectedWellUsage: {}\n    concentrationTO: false\n    wellTooltipTO: false\n\n    initialize: ->\n\n      @initializeTabs()\n      @initializeTooltipster()\n      @compileTemplates()\n      @bindEvents()\n\n    initializeTabs: ->\n      $(\"[data-tabs='assays']\").tabs(\n        select: (event, ui) ->\n          if ui.index == 1\n            $('.assay-view-plate-manager').click()\n      )\n\n    initializeTooltipster: ->\n      $('td[data-well]').tooltipster(\n        position: 'bottom'\n        updateAnimation: false\n      )\n\n    compileTemplates: ->\n      self = @\n      $('script[type=\"text/x-handlebars-template\"][data-for=\"assays\"]').each (index, item) ->\n        $item = $(item)\n        self.templates[$item.attr('id')] = Handlebars.compile($item.html())\n\n    sizePlateManager: ->\n      manager = $('.assay-plate-manager')\n      inventoryPalette = $('.assays-inventory-palette')\n      plateList = $('.assay-plates-list')\n      setTimeout(->\n        newHeight = manager.height() - (inventoryPalette.outerHeight() + 16)\n        plateList.height newHeight\n        Assays.sizeSidebar newHeight\n      , 100)\n\n    sizeSidebar: (initialHeight) ->\n      $sidebar = $('.assay-plates-sidebar')\n      $sidebar.height initialHeight\n\n    bindEvents: ->\n      @initializeSelect2()\n      @handleUnsavedChanges()\n      @enablePlateTools()\n      @bindAddNewPlate()\n      self = @\n      $('.assay-view-plate-manager').on 'click', (e) ->\n        e.preventDefault()\n\n        $('.assay-plates-overlay').show(0, ->\n          self.sizePlateManager()\n        )\n\n      $('.assay-plate-manager-close').on 'click', (e) ->\n        $('.assay-plates-overlay').hide()\n\n      $(window).resize @sizePlateManager\n\n      $('.assays_controller').on 'click', '.order-toggle-button', (e) ->\n        orderId = $(this).attr('id')\n        $(\"#order_#{orderId}_row\").toggle()\n\n      $plateList = $('.assay-plates-list')\n      $plateList.on 'click', '.assay-plate-wells td:not(.non-selectable)', @selectCell\n      $plateList.on 'click', '.assay-plate-wells th:gt(0)', @selectColumn\n      $plateList.on 'click', '.assay-plate-wells td.non-selectable', @selectRow\n      $plateList.on 'click', '.assays-plate-deselect-all-wells', @deselectAllWells\n\n      $('.control-button').on 'click', @controlButton\n\n      $inventoryPalette = $('.assays-inventory-palette')\n      $inventoryPalette.on 'click', '.assay-plate-show-add', @showInventoryAddPanel\n      $inventoryPalette.on 'click', '.close-add-options', @hideInventoryAddPanel\n      $inventoryPalette.on 'change', 'select.assay-pallet-tools-select', @addInventorySelectPanel\n      $inventoryPalette.on 'click', '.assay-remove-selector-button', @removeInventorySelectPanel\n\n      $inventoryPalette.on 'click', '.assay-plate-add-inventory-link[data-for!=\"new\"]', @showAddInventoryToSelectorModal\n\n      $document = $(document)\n      $document.off \"click\", \".add_reagent_link\"\n      $document.on \"click\", \".add_reagent_link:not(.add_from_kit_link)\", @addReagentToInventory\n      $document.off \"click\", \".add_specimen_link\"\n      $document.on \"click\", \".add_specimen_link\", @addSpecimenToInventory\n      $document.off \"click\", \".add_item_from_order_link\"\n      $document.on \"click\", \".add_item_from_order_link\", @addItemFromOrderToInventory\n      $document.off \"click\", \".add_from_kit_link\"\n      $document.on \"click\", \".add_from_kit_link\", @addItemFromKitToInventory\n      $document.on \"click\", \"[data-add-new-item-button-type]\", @addNewItemToInventory\n\n      $document.on 'nested:fieldAdded', @addNewPlateToUI\n\n      $inventoryPalette.on 'change', '.assay-inventory-item-selected', @inventoryItemSelected\n\n      $inventoryPalette.on 'click', '.assay-selected-uncheck-all', @uncheckAllSelected\n      $inventoryPalette.on 'click', '.assay-selected-add-to-wells', @addSelectedItemsToWells\n\n      $('.assays-inventory-selected-items-list').on 'change', '.assay-selected-inventory-item', @uncheckSelectedItem\n\n      $('.assay-remove-well-contents-button').on 'click', @removeWellContents\n\n      $('.assay-selected-wells').on 'click', '.remove-item-from-selected-wells', @removeItemFromSelectedWells\n\n      $inventoryPalette.on 'keyup', \".assay-inventory-item-concentration\", @concentrationUpdated\n      $inventoryPalette.on 'keyup', \".assay-inventory-item-concentration-units\", @concentrationUpdated\n      $inventoryPalette.on 'change', \".assay-inventory-item-study-type\", @itemStudyTypeUpdated\n\n      $('.assay-item-add-concentration-button').on 'click', @addItemConcentration\n      $('.assay-item-add-concentration-cancel-button').on 'click', @removeNewItem\n      $('.assay-plate-add-info-button').on 'click', (e) ->\n        action = $('#plate-info-modal').data('action')\n        if action == 'add'\n          Assays.addPlateInfo(e)\n        else\n          PlateTools.duplicatePlate(e)\n      $('.assay-plate-add-info-cancel-button').on 'click', @removeAddDuplicatePlate\n      $('[data-button=\"plates-tab-submit\"]').on 'click', @checkForComment\n      $('[data-button=\"add-comment\"]').on 'click', @addComment\n\n      $inventoryPalette.on 'click', \".assay-inventory-item-options\", @inventoryItemOptions\n      $inventoryPalette.on 'click', \".assay-inventory-item-option-delete-item\", @inventoryItemDeleteOption\n      $inventoryPalette.on 'click', \".assay-inventory-item-option-add-concentration\", @inventoryItemAddConcentrationOption\n\n      $sidebar = $('.assay-plates-sidebar')\n      $sidebar.on 'click', '.collapsible .assays-panel-header', @sidebarPanelHeaderClick\n      $sidebar.on 'change', '.assays-sidebar-well-contents-field', @sidebarWellContentDisplay\n\n      $('td[data-well]').on 'mouseover', @wellMouseover\n      $('td[data-well]').on 'mouseout', @wellMouseout\n\n    wellMouseover: (e) ->\n      if Assays.wellTooltipTO\n        clearTimeout Assays.wellTooltipTO\n\n      Assays.wellTooltipTO = setTimeout(->\n        $well = $(e.currentTarget)\n        tmpl =\n          items: []\n        $well.find('.assay-well-item').each (index, item) ->\n          $row = $(\"[data-assay-inventory-item-id='#{$(item).data('id')}']\").closest('tr')\n          tmpl.items.push(\n            name: $row.find('[data-field=\"name\"]').text()\n            gid: $row.find('[data-field=\"gid-lot\"]').text()\n            concentration: $row.find('td:eq(3)').attr('title')\n            itemType: $row.find('.assay-inventory-item-study-type').find('option:selected').text()\n          )\n        tmpl.control = $.trim($well.find('.assay-well-control-field').val())\n        switch tmpl.control\n          when '' then tmpl.control = \"not a control well\"\n          when '-1' then tmpl.control = 'negative'\n          when '1' then tmpl.control = 'positive'\n        tmpl.results = $.trim($well.find('[data-spot-forming-cells-field]').val())\n        if tmpl.results == ''\n          tmpl.results = 'n/a'\n\n        tooltipHtml = Assays.templates.assays_well_tooltip_content(tmpl)\n        $well.tooltipster 'content', $(tooltipHtml)\n        $well.tooltipster 'show'\n      , 500)\n\n    wellMouseout: (e) ->\n      if Assays.wellTooltipTO\n        clearTimeout Assays.wellTooltipTO\n        Assays.wellTooltipTO = false\n\n    checkForComment: (event) ->\n      event.preventDefault()\n      if Assays._commentAlreadyEntered()\n        $(event.target).closest('form').submit()\n      else\n        Modals.showEditAssayCommentModal()\n\n    _commentAlreadyEntered: ->\n      $('.note-text').val().length > 0\n\n    addComment: (event) ->\n      comment = $('[data-field=\"edit-assay-comment\"]').val()\n      $('[data-assay-comments-section] .note-text').val(comment)\n      Modals.hideEditAssayCommentModal()\n      $('[data-form-for-assay]').submit()\n\n    bindAddNewPlate: () ->\n      $(\"[data-form-for-assay]\").on \"click\", \"[data-add-new-plate-sidebar-button]\", (event) ->\n        event.preventDefault()\n        $(\"[data-add-new-plate-button]\").click()\n\n    sidebarPanelHeaderClick: (e) ->\n      $target = $(e.currentTarget)\n      $target.next(\".control-container-content\").toggle 'collapsed'\n      $target.find('.triangle').toggleClass 'collapsed'\n\n    sidebarWellContentDisplay: (e) ->\n      $checkbox = $(e.currentTarget)\n\n      switch $checkbox.val()\n        when \"controls\" then $('[data-well] .control').toggle()\n        when \"results\" then $('.assay-well-result-display').toggle()\n        else $(\".assay-well-item[data-keyfield='#{$checkbox.val()}']\").toggle()\n\n    refreshWellContentDisplay: (container) ->\n      $container = $(container)\n      wellDetailsCheckboxes = $('.assays-sidebar-well-contents-field')\n      wellDetailsCheckboxes.each (index, item) ->\n        $checkbox = $(item)\n        wellDetailIdentifier = $checkbox.val() # either a KeyFieldName id or a string, such as 'results' or 'controls'\n        wellDetailSelector = switch wellDetailIdentifier\n          when \"controls\" then '[data-well] .control'\n          when \"results\" then '.assay-well-result-display'\n          else \".assay-well-item[data-keyfield='#{wellDetailIdentifier}']\"\n        if $checkbox.prop('checked')\n          $container.find(wellDetailSelector).show()\n        else\n          $container.find(wellDetailSelector).hide()\n\n    concentrationUpdated: (e) ->\n      if Assays.concentrationTO\n        clearTimeout Assays.concentrationTO\n\n      Assays.concentrationTO = setTimeout(->\n        $row = $(e.currentTarget).closest('tr')\n        itemId = $row.data('assay-inventory-item-id')\n        $concentration = $row.find('.assay-inventory-item-concentration')\n        concentration = $concentration.val()\n        units = $row.find('.assay-inventory-item-concentration-units').val()\n        $concentration.closest('td').attr 'title', \"#{concentration} #{units}\"\n\n        Assays.sendConcentrationUpdate itemId, concentration, units\n\n        Assays.concentrationTO = false\n      , 750)\n\n    sendConcentrationUpdate: (itemId, concentration, units) ->\n      dataToSend =\n        concentration: concentration\n        concentration_units: units\n      $.ajax(\n        type: 'PUT'\n        url: \"/assay_inventory_items/#{itemId}\"\n        data: dataToSend\n        success: (data, status, xhr) ->\n          if data.success\n            $row = $(\".assays-inventory-list tr[data-assay-inventory-item-id='#{itemId}']\")\n            $cell = $row.find('.assay-inventory-item-concentration').closest('td')\n            $cell.css\n              'background-color': '#CDE9FF'\n            setTimeout(->\n              $cell.animate(\n                { 'background-color': $cell.closest('tr').css('background-color') }\n                500\n              )\n            , 1500)\n\n            # clear out the modal\n            $dialog = $('.assay-item-concentration-fields')\n            $dialog.find('.assay-new-item-concentration').val ''\n            $dialog.find('.assay-new-item-concentration-units').val ''\n        dataType: 'json'\n      )\n\n    itemStudyTypeUpdated: (e) ->\n      $select = $(e.currentTarget)\n      $row = $select.closest('tr')\n      dataToSend =\n        item_study_type: $select.val()\n      $.ajax(\n        type: 'PUT'\n        url: \"/assay_inventory_items/#{$row.data('assay-inventory-item-id')}\"\n        data: dataToSend\n        success: (data, status, xhr) ->\n          if data.success\n            $cell = $select.closest('td')\n            $cell.css\n              'background-color': '#CDE9FF'\n            setTimeout(->\n              $cell.animate(\n                { 'background-color': '#fff' }\n                500\n              )\n            , 1500)\n        dataType: 'json'\n      )\n\n    addNewPlateToUI: (e) ->\n      if $('.assay-plate-wells[data-plate=\"\"]').size() > 0\n        $('.assay-plate-wells[data-plate=\"\"]').each (index, item) ->\n          $plate = $(item)\n          $plateContainer = Assays.plateContainerFor($plate)\n          PlateTools.setNewPlatePlateToolsDisabledMessage($plateContainer)\n          Modals.showPlateInfoModal $plate, 'add'\n\n    plateContainerFor: (plate) ->\n      $(plate).closest('[data-assay-plate-container]')\n\n    inventoryItemSelected: (e) ->\n      $checkbox = $(e.currentTarget)\n\n      if $checkbox.is(':checked')\n        Assays.addInventoryItemToSelected $checkbox.closest('tr')\n      else\n        Assays.removeInventoryItemFromSelected $checkbox.closest('tr')\n\n    addInventoryItemToSelected: ($inventoryItem) ->\n      concentration = $inventoryItem.find('[data-name=\"concentration\"]').val()\n      concentrationUnits = $inventoryItem.find('[data-name=\"concentration_units\"]').val()\n      $inventory = $inventoryItem.closest('.assay-inventory-selector')\n      $selectedInventory = $('.assays-inventory-selected-items-list')\n      tmpl =\n        item: $inventory.find('h3').text()\n        name: $inventoryItem.find('[data-field=\"name\"]').text()\n        lotGid: $inventoryItem.find('[data-field=\"gid-lot\"]').text()\n        concentration: \"#{concentration} #{concentrationUnits}\"\n        id: $inventoryItem.data('assay-inventory-item-id')\n        inventory: $inventory.data('selector-id')\n\n      if $selectedInventory.find(\"tr[data-inventory='#{tmpl.inventory}']\").size() > 0\n        if confirm \"There is already one item from #{tmpl.item} in the selected list.\n Are you sure you would like add another?\"\n          @buildSelectedInventoryItem tmpl\n        else\n          $checkbox = $inventoryItem.find('[data-checkbox=\"select-assay-inventory-item\"]')\n          $checkbox.prop('checked', false)\n      else\n        @buildSelectedInventoryItem tmpl\n\n    buildSelectedInventoryItem: (tmpl) ->\n      selectedItem = @templates.selected_inventory_item(tmpl)\n      $('.assays-inventory-selected-items-list').find('tbody').append selectedItem\n\n    removeInventoryItemFromSelected: ($inventoryItem) ->\n      id = $inventoryItem.data('assay-inventory-item-id')\n      $('.assays-inventory-selected-items-list').find(\"tr[data-id='#{id}']\").remove()\n\n    uncheckAllSelected: (e) ->\n      e.preventDefault()\n\n      $inventory = $('.assays-inventory-selected-items-list')\n      $inventory.find('.assay-selected-inventory-item:checked').each (index, item) ->\n        $(item).change()\n\n    uncheckSelectedItem: (e) ->\n      $checkbox = $(e.currentTarget)\n\n      $(\".assay-inventory-item-selected[value='#{$checkbox.val()}']\").click()\n\n    addSelectedItemsToWells: (e) ->\n      e.preventDefault()\n\n      $inventory = $('.assays-inventory-selected-items-list')\n      data = []\n      $inventory.find('.assay-selected-inventory-item').each (index, item) ->\n        $row = $(item).closest 'tr'\n        id = $row.data('id')\n        name = \"#{$row.find('td:eq(2)').text()} #{$row.find('td:eq(3)').text()}\"\n        keyfield = $row.data('inventory')\n        display = ''\n        unless $(\".assays-sidebar-well-contents-field[value='#{keyfield}']\").is(':checked')\n          display = ' style=\"display: none;\"'\n        tmpl = \"<div class=\\\"assay-well-item\\\" data-id=\\\"#{id}\\\" data-keyfield=\\\"#{keyfield}\\\" data-unsaved-well-inventory-item#{display}>\n  <input name=\\\"well_%PLATE%_%WELL%_items[]\\\" value=\\\"#{id}\\\" type=\\\"hidden\\\" class=\\\"assay-well-inventory-item-field\\\">\n  #{name}\n</div>\"\n        data.push\n          item:\n            name: name\n            id: id\n          tmpl: tmpl\n\n      $('.assay-plate-wells').find('td.selected').each (index, cell) ->\n        $cell = $(cell)\n\n        for index, item of data\n          plate = $cell.closest('.assay-plate-wells').data('plate')\n          well = $cell.data('well-id')\n          $cell.find(\"input[name='remove_well_#{plate}_#{well}_items[]'][value='#{item.item.id}']\").remove()\n          if $cell.find(\".assay-well-item[data-id='#{item.item.id}']\").size() == 0\n            $cell.find('.fields').append $(item.tmpl.replace('%WELL%', well).replace('%PLATE%', plate))\n            Assays.addWellContentsToSelectedDisplay $cell\n\n    removeWellContents: (e) ->\n      if confirm \"Are you sure you want to remove all contents from the selected well?\"\n        $('.assay-plate-wells').find('td.selected').each (index, well) ->\n          $well = $(well)\n          $well.find('.assay-well-control-field').val('')\n          $well.find('.control').removeClass('negative positive').attr('title', '').html('')\n          $well.find('.assay-well-item').each (itemIndex, item) ->\n            Assays.removeWellItem $well, $(item)\n\n    removeWellItem: ($well, $item) ->\n      hidden = $item.find('.assay-well-inventory-item-field')\n      hidden.remove()\n      hidden.attr('name', 'remove_' + hidden.attr('name'))\n      $well.append hidden\n      $item.remove()\n\n    removeItemFromSelectedWells: (e) ->\n      e.preventDefault()\n      $button = $(e.currentTarget)\n\n      if confirm \"Are you sure you want to remove '#{$.trim($button.text())}' from the selected well(s)?\"\n        $('.assay-plate-wells').find('td.selected').each (index, well) ->\n          $well = $(well)\n          $well.find(\".assay-well-item[data-id='#{$button.data('id')}']\").each (itemIndex, item) ->\n            Assays.removeWellItem $well, $(item)\n\n      delete Assays.selectedWellUsage[$button.data('id')]\n      delete Assays.selectedWellContents[$button.data('id')]\n      Assays.refreshSelectedWellContentList null, [$button.data('id')]\n\n    selectCell: (e) ->\n      $cell = $(e.currentTarget)\n      if $cell.hasClass('non-selectable')\n        return\n\n      $table = $cell.closest('table')\n      $table.find('th.selected-column').removeClass('selected-column')\n      $table.find('td.selected-row').removeClass('selected-row')\n\n      unless e.shiftKey\n        unless e.ctrlKey || e.metaKey\n          $table.find('td.selected').not($cell).each (index, wasSelected) ->\n            $wasSelected = $(wasSelected)\n            $wasSelected.removeClass 'selected'\n            Assays.removeWellContentsFromSelectedDisplay $wasSelected\n\n#        $cell.toggleClass 'selected'\n        if $cell.hasClass('selected')\n          $cell.removeClass 'selected'\n          Assays.removeWellContentsFromSelectedDisplay $cell\n        else\n          $cell.addClass 'selected'\n          Assays.addWellContentsToSelectedDisplay $cell\n      else\n        unless $table.find('td[data-drag-start]').size() > 0\n          $cell.attr('data-drag-start', 1)\n          $cell.closest('table').find('td').not('.selectable').removeClass 'selected'\n        else\n          $start = $table.find('[data-drag-start]')\n          startRow = Number $start.data('row')\n          startColumn = Number $start.data('column')\n          endRow = Number $cell.data('row')\n          endColumn = Number $cell.data('column')\n          selecting = !$start.hasClass('selected')\n\n          if endRow > startRow\n            y1 = startRow\n            y2 = endRow\n          else\n            y1 = endRow\n            y2 = startRow\n\n          if endColumn > startColumn\n            x1 = startColumn\n            x2 = endColumn\n          else\n            x1 = endColumn\n            x2 = startColumn\n\n          for column in [x1..x2]\n            for row in [y1..y2]\n              if (selecting)\n                $cell = $table.find(\"td[data-row='#{row}'][data-column='#{column}']\")\n                $cell.addClass('selected')\n                Assays.addWellContentsToSelectedDisplay $cell\n              else\n                $cell = $table.find(\"td[data-row='#{row}'][data-column='#{column}']\")\n                $cell.removeClass('selected')\n                Assays.removeWellContentsFromSelectedDisplay $cell\n\n          $start.removeAttr('data-drag-start')\n\n    deselectAllWells: (e) ->\n      e.preventDefault()\n\n      $('td[data-well].selected').removeClass 'selected'\n      $('th.non-selectable.selected-column').removeClass 'selected-column'\n      $('td.non-selectable.selected-row').removeClass 'selected-row'\n\n    selectColumn: (e) ->\n      $column = $(e.currentTarget)\n      column = e.currentTarget.cellIndex\n      $column.toggleClass('selected-column')\n      $(e.currentTarget).closest('table').find(\"tr\").find(\"td:eq(#{column})\").each (index, item) ->\n        $item = $(item)\n        if $column.hasClass('selected-column')\n          $item.addClass 'selected'\n          Assays.addWellContentsToSelectedDisplay $item\n        else\n          $item.removeClass 'selected'\n          Assays.removeWellContentsFromSelectedDisplay $item\n\n    selectRow: (e) ->\n      $row = $(e.currentTarget)\n      $row.toggleClass('selected-row')\n      $row.closest('tr').find('td:gt(0)').each (index, item) ->\n        $item = $(item)\n        if $row.hasClass('selected-row')\n          $item.addClass 'selected'\n          Assays.addWellContentsToSelectedDisplay $item\n        else\n          $item.removeClass 'selected'\n          Assays.removeWellContentsFromSelectedDisplay $item\n\n    addWellContentsToSelectedDisplay: ($well) ->\n      self = @\n      toAdd = []\n      $well.find('.assay-well-item').each (index, item) ->\n        $item = $(item)\n        unless self.selectedWellContents.hasOwnProperty($item.data('id'))\n          self.selectedWellContents[$item.data('id')] = $.trim($item.text())\n          toAdd.push $item.data('id')\n        unless self.selectedWellUsage.hasOwnProperty($item.data('id'))\n          self.selectedWellUsage[$item.data('id')] = []\n        unless self.selectedWellUsage[$item.data('id')].indexOf($well.data('well-id')) > -1\n          self.selectedWellUsage[$item.data('id')].push $well.data('well-id')\n\n      @refreshSelectedWellContentList toAdd\n\n    removeWellContentsFromSelectedDisplay: ($well) ->\n      self = @\n      toRemove = []\n      $well.find('.assay-well-item').each (index, item) ->\n        $item = $(item)\n        itemPos = self.selectedWellUsage[$item.data('id')].indexOf($well.data('well-id'))\n        self.selectedWellUsage[$item.data('id')].splice itemPos, 1\n        if self.selectedWellUsage[$item.data('id')].length == 0\n          delete self.selectedWellUsage[$item.data('id')]\n          delete self.selectedWellContents[$item.data('id')]\n          toRemove.push $item.data('id')\n\n      @refreshSelectedWellContentList null, toRemove\n\n    refreshSelectedWellContentList: (toAdd = null, toRemove = null) ->\n      $allList = $('.assays-selected-items-list.common')\n      $someList = $('.assays-selected-items-list.some')\n      $allLists = $('.assays-selected-items-list')\n      numSelected = $('td.selected').size()\n      self = @\n\n      if toAdd\n        for item in toAdd\n          itemData = @selectedWellContents[item]\n          $item = $(\"<a class=\\\"delete-link remove-item-from-selected-wells\\\" data-id=\\\"#{item}\\\" href=\\\"#\\\">#{itemData}</a>\")\n          if numSelected == @selectedWellUsage[item].length\n            $allList.append $item\n          else\n            $someList.append $item\n\n      if toRemove\n        for item in toRemove\n          $allLists.find(\".remove-item-from-selected-wells[data-id='#{item}']\").remove()\n\n      $allList.find('.remove-item-from-selected-wells').each (index, item) ->\n        $item = $(item)\n        unless numSelected == self.selectedWellUsage[$item.data('id')].length\n          $item.remove()\n          unless $someList.find(\".remove-item-from-selected-wells[data-id='#{$item.data('id')}']\").size() > 0\n            $someList.append $item\n      $someList.find('.remove-item-from-selected-wells').each (index, item) ->\n        $item = $(item)\n        if numSelected == self.selectedWellUsage[$item.data('id')].length\n          $item.remove()\n          unless $allList.find(\".remove-item-from-selected-wells[data-id='#{$item.data('id')}']\").size() > 0\n            $allList.append $item\n\n    controlButton: (e) ->\n      rows = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\"]\n      controlType = $(e.currentTarget).data('type')\n      alreadyPositiveCells = []\n      alreadyNegativeCells = []\n      $('.assay-plate-wells').find('td.selected').each (index, item) ->\n        $item = $(item)\n        $control = $item.find('.control')\n        $field = $item.find('.assay-well-control-field')\n        if $control.hasClass('positive') && controlType == 'negative'\n          alreadyPositiveCells.push  \"#{rows[Number($item.data('row')) - 1]}#{$item.data('column')}\"\n        else if $control.hasClass('negative') && controlType == 'positive'\n          alreadyNegativeCells.push  \"#{rows[Number($item.data('row')) - 1]}#{$item.data('column')}\"\n        else if $control.hasClass(\"#{controlType}\")\n          $control.removeClass controlType\n          $control.html ''\n          $field.val null\n        else\n          $control.addClass controlType\n          if controlType == 'negative'\n            $field.val -1\n            $control.html '&ndash;'\n            $control.attr 'title', \"Cell is a Negative Control\"\n          else\n            $field.val 1\n            $control.html '+'\n            $control.attr 'title', \"Cell is a Positive Control\"\n      if alreadyPositiveCells.length > 0\n        alert \"The following cells have already been marked as positive controls: #{alreadyPositiveCells.join(\", \")}\"\n      if alreadyNegativeCells.length > 0\n        alert \"The following cells have already been marked as negative controls: #{alreadyNegativeCells.join(\", \")}\"\n\n    showInventoryAddPanel: (e) ->\n      e.preventDefault()\n\n      $(e.currentTarget).closest('.assays-inventory-list-options').find(\".assay-plate-add-options\").show()\n\n    hideInventoryAddPanel: (e) ->\n      e.preventDefault()\n\n      $(e.currentTarget).closest(\".assay-plate-add-options\").hide()\n\n    addInventorySelectPanel: (e) ->\n      $select = $(e.currentTarget)\n      $selected = $(e.currentTarget).find('option:selected')\n\n      keyFieldId = $selected.val()\n      if keyFieldId == 'Palette Tools'\n        return\n\n      tmpl =\n        header: $selected.text()\n        type: $selected.text().toLowerCase()\n        removable: true\n        id: keyFieldId\n      selectorHtml = window.Assays.templates.assays_inventory_selector(tmpl)\n      $selectorsList = $('.assays-inventory-selectors')\n      $selectorsList.append selectorHtml\n      numSelectors = $selectorsList.find('.assay-inventory-selector').size()\n      $selectorsList.width(385 * numSelectors)\n\n      $selected.attr 'disabled', true\n      $select.find('option:first').prop 'selected', true\n      Assays.addKeyFieldToPlatesSidebar(keyFieldId)\n\n    addKeyFieldToPlatesSidebar: (keyFieldId) ->\n      $wellDetailsKeyField = $(\"[data-well-details-key-field-id='#{keyFieldId}']\")\n      $wellDetailsKeyField.show()\n      $wellDetailsKeyField.find('[data-well-details-key-field-checkbox]').prop('checked', true)\n\n    removeInventorySelectPanel: (e) ->\n      e.preventDefault()\n\n      if confirm(\"Are you sure you want to remove the selected panel?\nThe inventory items from this panel will be removed from all wells.\")\n        $selector = $(e.currentTarget).closest('.assay-inventory-selector')\n        $selector.remove()\n\n        # remove the inventory from this selector from all wells and the sidebar\n        toRemove = []\n        $selector.find('tr[data-assay-inventory-item-id]').each (index, item) ->\n          itemId = $(item).data('assay-inventory-item-id')\n          toRemove.push itemId\n          $(\".remove-item-from-selected-wells[data-id='#{itemId}']\").remove()\n\n        # re-enable in the drop-down\n        $select = $('.assays-inventory-palette').find('select.assay-pallet-tools-select')\n        $select.find(\"option[value='#{$selector.data('selector-id')}']\").removeAttr 'disabled'\n\n        # remove items from the assay's inventory item collection\n        Assays.removeItemsFromSystem toRemove\n        keyFieldId = $selector.data('selector-id')\n        Assays.removeKeyFieldFromPlatesSidebar(keyFieldId)\n\n    removeItemsFromSystem: (toRemove) ->\n      unless typeof toRemove == \"object\"\n        toRemove = [toRemove]\n\n      #remove the item from all wells and the selected panel\n      for itemId in toRemove\n        $(\".assay-well-item[data-id='#{itemId}']\").remove()\n        $(\".assay-selected-inventory-item[value='#{itemId}']\").closest('tr').remove()\n\n      # remove items from the assay's inventory item collection\n      dataToSend =\n        items: toRemove\n      $.post(\n        '/assay_inventory_items/delete_inventory_items'\n        dataToSend\n        (data, status, xhr) ->\n          # nothing to do as this was clean up\n        'json'\n      )\n\n    removeKeyFieldFromPlatesSidebar: (keyFieldId) ->\n      $(\"[data-well-details-key-field-id='#{keyFieldId}']\").hide()\n\n    showAddInventoryToSelectorModal: (e) ->\n      e.preventDefault()\n\n      $button = $(e.currentTarget)\n      type = $button.data('for')\n      $('.assays-inventory-selection-container').removeClass 'selected'\n      $inventory = $button.closest('.assays-inventory-selection-container')\n      $inventory.addClass('selected')\n\n      Modals[\"show#{type}Modal\"](e)\n\n      if type == \"Orders\"\n        $('.assays_controller').find('.order_item_fulfillment_rows').hide()\n\n      $button.closest('.assay-plate-add-options').hide()\n\n    addReagentToInventory: (e) ->\n      e.preventDefault()\n\n      link = $(e.currentTarget)\n      resultId = link.closest('tr').attr('id')\n      sectionType = link.attr('id') # \"new\", \"old\", or \"test\"\n      resultName = link.closest('tr').find('.result_name').html()\n      lotNumer = link.closest('tr').find('[data-lot-number]').data('lot-number')\n\n      tmpl =\n        resultName: resultName\n        resultId: resultId\n        itemStudyType: sectionType\n        lotNumber: lotNumer\n        numberIdentifier: lotNumer\n        type: 'Lot'\n      Assays.addItemToInventory tmpl\n\n    addItemFromKitToInventory: (e) ->\n      e.preventDefault()\n\n      link = $(e.currentTarget)\n      $row = link.closest('tr')\n\n      resultId = $row.attr('id')\n      sectionType = link.attr('id')\n      resultName = $row.find('[data-result-name]').data('result-name')\n      numberIdentifier = $row.find('[data-number-identifier]').val() # lot_number or gid\n      partType = $row.find('[data-part-type]').data('part-type') # Specimen or ReagentVolume\n\n      tmpl =\n        resultName: resultName\n        resultId: resultId\n        itemStudyType: sectionType\n        numberIdentifier: numberIdentifier\n      if partType == 'Specimen'\n        tmpl.type = 'Specimen'\n        tmpl.gid = numberIdentifier\n      else\n        tmpl.type = \"Lot\"\n        tmpl.lotNumber = numberIdentifier\n      Assays.addItemToInventory tmpl\n\n    addNewItemToInventory: (event) ->\n      event.preventDefault()\n\n      link = $(event.currentTarget)\n\n      $form = link.closest('form')\n      if Assays.formValid($form)\n\n        tmpl = Assays.templateForNewItem(link)\n        Assays.addItemToInventory tmpl\n        Assays.clearNewItemModalFields()\n\n    addItemConcentration: (e) ->\n      concentration = ''\n      units = ''\n\n      if e\n        e.preventDefault()\n        $form = $(e.currentTarget).closest('.assay-item-concentration-fields')\n        concentration = $.trim($form.find('.assay-new-item-concentration').val())\n        units = $.trim($form.find('.assay-new-item-concentration-units').val())\n\n        if concentration == ''\n          alert 'A concentration/dilution value is required.'\n          return\n\n      $row = $('#item-concentration-dilution-modal').data 'row'\n      $concentration = $row.find('.assay-inventory-item-concentration')\n      $concentration.val concentration\n      $concentration.closest('td').attr 'title', \"#{concentration} #{units}\"\n      $row.find('.assay-inventory-item-concentration-units').val units\n\n      Modals.hideItemConcentrationModal()\n\n      itemId = $.trim($row.data('item-id'))\n      if itemId == 'foo'\n        itemId = null\n      itemType = $.trim($row.data('item-type'))\n      if itemType == ''\n        itemType = $.trim($row.data('type'))\n      dataToSend =\n        assay_inventory_item:\n          item_id: itemId\n          item_type: itemType\n          concentration: concentration\n          concentration_units: units\n          item_study_type: $row.find('select[data-name=\"item_study_type\"]').val()\n          key_field_name_id: $row.closest('.assay-inventory-selector').data('selector-id')\n          assay_id: $('.edit_assay').data('id')\n          id1_name: $.trim($row.find('[data-field=\"name\"]').text())\n          gid_lot_number: $.trim($row.find('[data-field=\"gid-lot\"]').text())\n      if itemId == null\n        dataToSend.new_assay_item_attributes =\n          name: dataToSend.assay_inventory_item.id1_name\n          number_identifier: dataToSend.assay_inventory_item.gid_lot_number\n          item_type: itemType\n\n      $.post(\n        '/assay_inventory_items.json'\n        dataToSend#tmpl\n        (data) ->\n          $row.data 'item-id', data.item.item_id\n          $row.attr 'data-item-id', data.item.item_id\n          $row.data 'type', data.item.item_type\n          $row.attr 'data-type', data.item.item_type\n          $row.data 'assay-inventory-item-id', data.item.id\n          $row.attr 'data-assay-inventory-item-id', data.item.id\n          $row.find('.assay-inventory-item-selected').val data.item.id\n\n           # re-enable actions now that it's saved\n          $row.find('input, select').prop 'disabled', false\n          $row.find('.assay-inventory-item-options').show()\n\n          # reset the modal\n          if e\n            $form.find('.assay-new-item-concentration').val ''\n            $form.find('.assay-new-item-concentration-units').val ''\n        'json'\n      )\n\n    removeNewItem: (e) ->\n      $('#item-concentration-dilution-modal').data('row').remove()\n      Modals.hideItemConcentrationModal()\n      $('#item-concentration-dilution-modal').data 'row', null\n\n    addPlateInfo: (e) ->\n      e.preventDefault()\n\n      $form = $(e.currentTarget).closest('.assay-plate-info-fields')\n      [lotNumber, uniqueId] = Assays.getPlateInfoFormData $form\n\n      $plate = $('#plate-info-modal').data 'plate'\n      $plateContainer = $plate.closest('.assays-plate')\n      @refreshWellContentDisplay($plateContainer)\n      Assays.setPlateInfo $plateContainer, lotNumber, uniqueId\n\n      Modals.hidePlateInfoModal()\n      Assays.resetPlateInfoForm $form\n\n      $.post(\n        \"/plates_for_assays.json\"\n        {\n          assay: $('.edit_assay').data('id')\n          lot_number: lotNumber\n          unique_id: uniqueId\n        }\n        (data) ->\n          if data.error_messages.length  > 0\n            $plateContainer.remove()\n            alert(\"Error: Unable to create plate. #{data.error_messages}\")\n          else\n            $plate.data 'plate', data.plate.id\n            $plate.attr 'data-plate', data.plate.id\n            $plateContainer.find('[data-plate-id]').val(data.plate.id)\n            $plateContainer.attr 'data-plate-id', data.plate.id\n            $plateContainer.data 'plate-id', data.plate.id\n            for index, well of data.wells\n              $well = $plate.find \"td[data-row='#{well.well_row}'][data-column='#{well.well_column}']\"\n              $well.data 'well-id', well.id\n              $well.attr 'data-well-id', well.id\n              $well.find(\"[data-well-id-field]\").val(well.id)\n            PlateTools.enablePlateToolsMenuInContainer($plateContainer)\n            PlateTools.clearPlateToolsMessage($plateContainer)\n\n        'json'\n      )\n\n    removeAddDuplicatePlate: (e) ->\n      $modal = $('#plate-info-modal')\n      $modal.data('plate').closest('.assays-plate').remove()\n\n      $originalPlate = $('#plate-info-modal').data('originalPlate')\n      Modals.hidePlateInfoModal()\n      PlateTools.enablePlateToolsMenuInContainer($originalPlate)\n      PlateTools.clearPlateToolsMessage($originalPlate)\n      Modals.resetPlateInfoData()\n\n    getPlateInfoFormData: ($form) ->\n      lotNumber = $.trim($form.find('.assay-new-plate-lot-number').val())\n      uniqueId = $.trim($form.find('.assay-new-plate-unique-id').val())\n\n      if lotNumber == ''\n        alert 'A plate lot number is required.'\n        return [null, null]\n      if uniqueId == ''\n        alert 'A plate unique ID is required.'\n        return [null, null]\n\n      [lotNumber, uniqueId]\n\n    resetPlateInfoForm: ($form) ->\n      $form.find('.assay-new-plate-lot-number').val ''\n      $form.find('.assay-new-plate-unique-id').val ''\n\n    setPlateInfo: ($plateContainer, lotNumber, uniqueId) ->\n      $plateContainer.find('.assays-plate-lot-number-field').val lotNumber\n      $plateContainer.find('.assays-plate-unique-id-field').val uniqueId\n\n    inventoryItemOptions: (e) ->\n      $button = $(e.currentTarget)\n      $button.find('.assay-inventory-item-options-panel').toggle()\n\n    inventoryItemDeleteOption: (e) ->\n      e.preventDefault()\n      $button = $(e.currentTarget)\n      $button.find('.assay-inventory-item-options-panel').hide()\n\n      if confirm(\"Are you sure you want to delete this inventory item?\n It will also be removed from any wells it is currently added to.\")\n        $row = $(e.currentTarget).closest('tr')\n        itemId = $row.data('assay-inventory-item-id')\n        Assays.removeItemsFromSystem [itemId]\n        $(\".assay-well-inventory-item-field[value='#{itemId}']\").remove()\n\n        # remove item from inventory list\n        $row.remove()\n\n    inventoryItemAddConcentrationOption: (e) ->\n      e.preventDefault()\n      $target = $(e.currentTarget)\n\n      $row = $target.closest('tr')\n      $target.find('.assay-inventory-item-options-panel').hide()\n      $row.closest('.assays-inventory-selection-container.selected').removeClass 'selected'\n      $row.closest('.assays-inventory-selection-container').addClass 'selected'\n\n      tmpl =\n        resultName: $row.find('[data-field=\"name\"]').text()\n        resultId: $row.data('item-id')\n        itemStudyType: $row.find('.assay-inventory-item-study-type').find('option:selected').text().toLowerCase()\n        type: $row.data('type')\n        numberIdentifier: $row.find('[data-field=\"gid-lot\"]').text()\n      switch tmpl.type\n        when \"Specimen\"\n          tmpl.gid = $row.find('[data-field=\"gid-lot\"]').text()\n        when \"NewAssayItem\"\n          tmpl.resultId = 'foo'\n          tmpl.new_assay_item_attributes = # for params in ajax post\n            name: tmpl.resultName\n            number_identifier: $row.find('[data-field=\"gid-lot\"]').text()\n            item_type: $row.data('item-type')\n        else # eg. when 'Lot' or 'ReagentTransaction'\n          tmpl.lotNumber = $row.find('[data-field=\"gid-lot\"]').text()\n      Assays.addItemToInventory tmpl\n\n    templateForNewItem: (addNewItemButton) ->\n      newItemForm = $('[data-form-for=\"new-assay-item\"]')\n\n      sectionType = addNewItemButton.data(\"add-new-item-button-type\")\n      resultName = newItemForm.find('[data-attribute-name=\"name\"]').val()\n      numberIdentifier = newItemForm.find('[data-attribute-name=\"number-identifier\"]').val()\n      itemType = newItemForm.find('[data-attribute-name=\"type\"]').val()\n\n      tmpl =\n        resultName: resultName\n        itemStudyType: sectionType\n        resultId: 'foo'\n        numberIdentifier: numberIdentifier\n        new_assay_item_attributes: # for params in ajax post\n          name: resultName\n          number_identifier: numberIdentifier\n          item_type: itemType\n\n      if itemType == \"Specimen\"\n        tmpl.gid = numberIdentifier\n        tmpl.type = 'Specimen'\n      else\n        tmpl.lotNumber = numberIdentifier\n        tmpl.type = 'Lot'\n\n      tmpl\n\n    formValid: (form) ->\n      validator = $(form).validate()\n      validator.form()\n\n    clearNewItemModalFields: () ->\n      $('input[data-attribute-name], select[data-attribute-name]', '[data-form-for=\"new-assay-item\"]').each (_index, field) ->\n        $(field).val(\"\")\n\n    addSpecimenToInventory: (e) ->\n      e.preventDefault()\n\n      link = $(e.currentTarget)\n      resultId = link.closest('div.reagent-fields').children('#specimen_id').html()\n      sectionType = link.attr('id') # \"new\", \"old\", or \"test\"\n      resultName = link.closest('div.reagent-fields').children('#result_name').html()#id1\n      gid = link.closest('div.reagent-fields').find('[data-gid]').data('gid')\n\n      tmpl =\n        resultName: resultName\n        resultId: resultId\n        itemStudyType: sectionType\n        gid: gid\n        numberIdentifier: gid\n        type: 'Specimen'\n      Assays.addItemToInventory tmpl\n\n    addItemFromOrderToInventory: (e) ->\n      e.preventDefault()\n\n      link = $(e.currentTarget)\n\n      $fields = link.closest('div.reagent-fields')\n\n      resultId = $fields.data('reagent-id')\n      sectionType = link.attr('id') # \"new\", \"old\", or \"test\"\n      resultName = $fields.data('item-name-id1') # name or id1\n      resultType = $fields.data('item-type')\n      gid = $fields.data('item-gid-lot-num') # gid or lot number\n\n      tmpl =\n        resultName: resultName\n        resultId: resultId\n        itemStudyType: sectionType\n        gid: gid\n        numberIdentifier: gid\n        type: resultType\n      Assays.addItemToInventory tmpl\n\n    addItemToInventory: (tmpl) ->\n      $inventory = $('.assays-inventory-selection-container.selected')\n      newRow = Assays.templates.assays_inventory_item(tmpl)\n      $inventory.find('.assays-inventory-list tbody').append newRow\n      $('.ui-dialog-content:visible').dialog 'close'\n      Assays.sizePlateManager()\n\n      $newRow = $inventory.find(\"tr[data-item-id='#{tmpl.resultId}']:last\")\n\n      if $inventory.data('type') == 'detecting antibodies' || $inventory.data('type') == 'substrate'\n        $('#item-concentration-dilution-modal').data 'row', $newRow\n        Assays.addItemConcentration()\n      else\n        Modals.showItemConcentrationModal $newRow\n\n    initializeSelect2: () ->\n      $keyFieldSelectTags = $(\"[data-key-field-select]\")\n      @activateSelect2($keyFieldSelectTags)\n\n    activateSelect2: (selectField) ->\n      $selectField = $(selectField)\n      select2Options = {\n        placeholder: \"Select a key field\",\n        allowClear: false,\n        width: 'resolve'\n      }\n      if selectField.closest('[data-mode=\"edit\"]').size() > 0\n        select2Options.allowClear = true\n      $selectField.select2(select2Options)\n\n    handleUnsavedChanges: () ->\n      @_markChangedFields()\n      @_cleanupMarkedFieldsOnFormSubmit()\n      @_warnUnsavedChanges()\n\n    _markChangedFields: () ->\n      $('[data-mode=\"edit\"] [data-form-for-assay]').on 'change', 'input, textarea, select', (event) ->\n        $(event.target).addClass('changed-input')\n\n    _cleanupMarkedFieldsOnFormSubmit: () ->\n      $('[data-mode=\"edit\"] [data-form-for-assay]').on 'submit', () ->\n        $('.changed-input').removeClass('changed-input')\n\n    _warnUnsavedChanges: () ->\n      $(window).on 'beforeunload', (event) ->\n        if $('.changed-input').size() > 0\n          return \"You have unsaved changes.\"\n\n    enablePlateTools: () ->\n      $('[data-plate-tools-menu]').prop('disabled', false)\n\n  window.Assays.initialize() if $(\"[data-container-for-assay]\").size() > 0\n","$.toggle_inputs_starting_with = (input_base_name,focus_on_field) ->\n\n  $(\"[name^='#{input_base_name}']\").each (i,elt) ->\n    elt.disabled = !elt.disabled\n    if elt.disabled\n      $(elt).addClass('disabled')\n    else\n      $(elt).removeClass('disabled')\n    true\n\n  $(\"[name^='#{input_base_name}'][type!='hidden'].hide-on-load\").toggle()\n\n  label_base_for = input_base_name.replace(/\\]\\[|[ \\[ \\] ]/g,'_')\n  $(\"label[for^='#{label_base_for}'].hide-on-load\").toggle()\n  $(\"input[name^='#{input_base_name}[#{focus_on_field}]']\").focus()\n\n$(document).ready ->\n  ###\n  Enables the submit button when a field is selected\n  ###\n  $('form.edit_assembly input,textarea').keydown ->\n    $(this).parents('form').find('input[type=\"submit\"]:disabled').attr('disabled',false)\n\n  ###\n  Attaches a handler to the CKEDITOR to enable a form\n  ###\n  $('[data-ckeditor]').on('key',-> $(this.element.$).parents('form').find('input[type=\"submit\"]:disabled').attr('disabled',false) )\n\n  ###\n  Disables all of the hidden fields on the search table\n  ###\n  $('.change-quantity').data('nextStep','Cancel Edit')\n  $('.assembly-table input:hidden').attr('disabled', true)\n  $('.hide-on-load').addClass('hide')\n  $('.hide-on-load,.disable-on-load').attr('disabled',true)\n  $('.change-quantity').click (e) ->\n    $('#assembly_components_submit').attr('disabled',false)\n    $.toggle_inputs_starting_with($(this).data('base-field-name'),'part_count')\n    hide_selector = '[id^=\"'+'current_'+$(this).data('base-field-name').replace(/\\]\\[|[ \\[ \\] ]/g,'_')+'\"]'\n    $(hide_selector).toggle()\n    currentStep = $(this).text()\n    $(this).text($(this).data('nextStep'))\n    $(this).data('nextStep', currentStep)\n    return true\n\n\n  $('.assembly-table input:hidden').attr('disabled', true)\n  $('.disable-on-load').attr('disabled',true)\n  $('.disable-on-load').addClass('disabled')\n\n  ###\n  Registers callback functions to set the part count to 1 and enable form\n  fields on the assembly search screens.\n  ###\n  $('.toggle-inputs').click ->\n     $(\"input[name='\"+$(this).data('base-field-name')+\"[part_count]']\").val('1')\n     $.toggle_inputs_starting_with($(this).data('base-field-name'),'part_count')\n     return true\n\n  ###\n  Triggers the 'click' callback function for all selected elements\n  This alows users to use the back button\n  ###\n  $('.toggle-inputs:checked').each (i,elt) ->\n    $(elt).triggerHandler('click')\n    return true\n\n  toggleOrderableOptions = ->\n    if $(\"#assembly_externally_orderable\").is(':checked')\n      $(\".orderable_options\").show()\n    else\n      $(\".orderable_options\").hide()\n\n  toggleOrderableOptions()\n\n  $(\"#assembly_externally_orderable\").click ->\n    toggleOrderableOptions()\n\n  $('.empty-assembly-row').find('input:checkbox').click ->\n    checkbox = this\n    if checkbox.checked\n      $(\"#dialog-confirm\").dialog\n        resizable: false\n        height: 180\n        width: 500\n        modal: true\n        buttons:\n          \"Ok\": ->\n            $( this ).dialog \"close\"\n          Cancel: ->\n            $(checkbox).attr(checked: false)\n            $.toggle_inputs_starting_with($(checkbox).data('base-field-name'), 'part_count')\n            $( this ).dialog \"close\"\n\n","$ ->\n  $(document).on 'click', '.remove-fields', ->\n    if confirm('Are you sure you want to remove this entry?')\n      $(this).prev('input[type=hidden]').val('1')\n      $(this).closest('.fields-for').hide()\n      event.preventDefault()\n\n  $('.donor-subsection').on 'click', '.remove-and-submit', ->\n    if confirm('Are you sure you want to remove this visit?')\n      $(this).prev('input[type=hidden]').val('1')\n      $(this).closest('form.edit_donor').submit()\n      event.preventDefault()\n\n  $('#complex-form').on 'click', '.add-fields', ->\n    self = $(this)\n    time = new Date().getTime()\n    regexp = new RegExp(self.data('id'), \"g\")\n    if self.hasClass(\"add-link-to-table\")\n      table = $.merge(self.prev('table'), self.parent().prev('table')).first()\n      table.find('tr:last').after(jQuery.parseJSON(self.data('fields')).replace(regexp, time))\n    else\n      self.before(jQuery.parseJSON(self.data('fields')).replace(regexp, time))\n\n    self.trigger('elementAdded')\n    event.preventDefault()\n\n  $('#donor-tabs').on 'click', '.submit-fields-link', ->\n    $(this).closest('form').submit()\n","$ ->\n  # Button to add new conversation\n\n  $(\"[data-type='new-conversation-form']\").hide()\n\n  $(\"[data-action='show-new-conversation-form']\").click (e) ->\n    e.preventDefault()\n    $(\"[data-type='new-conversation-form']\").show()\n    $(e.target).hide()\n\n\n  $(\"[data-action='flag-conversation']\").on \"click\", (e) ->\n    e.preventDefault()\n    self = $(e.target)\n    parent = self.parent()\n    $.get self.attr(\"href\"), {}, ->\n      if(self.text() == \"Flag Conversation\")\n        parent.closest(\"[data-type='conversation']\").addClass(\"flagged\")\n        self.siblings(\"[data-attribute='conversation-title']\").before(\"<img src='/images/flag.png' class='flag' />\")\n        self.text(\"Remove Flag\")\n      else\n        parent.closest(\"[data-type='conversation']\").removeClass(\"flagged\")\n        self.siblings('.flag').remove()\n        self.text(\"Flag Conversation\")\n\n  $(\"[data-action='expand-comments']\").click (e) ->\n    hiddenComments = (e) -> $(e.target).parent().siblings('.hidden-comment')\n\n    if $(e.target).text() != \"View all comments\"\n      e.preventDefault()\n      chunk = $(e.target).data('chunk')\n      hiddenComments(e).slice(0,chunk).removeClass('hidden-comment')\n      unless hiddenComments(e).length\n        if $(e.target).data('limited')\n          $(e.target).attr('href', $(e.target).data('link'))\n          $(e.target).attr('data-action', 'show-all-comments')\n          $(e.target).text(\"View all comments\")\n        else\n          $(e.target).hide()\n\n  # Prompt user about discarded changes and form errors\n\n  $(\"[data-action='leave-conversation']\").click (e) ->\n    if $(\"[data-attribute='new-note']\").val() && !confirm('Discard comment?')\n      e.preventDefault()\n      false\n\n  $(\"form :input\").change ->\n    $(this).closest('form').data('changed', true)\n\n  $(\"[data-action='back-to-conversation']\").click (e) ->\n    if $(\"[data-attribute='edit-conversation']\").data('changed') && !confirm('Discard changes?')\n      e.preventDefault()\n      false\n\n  # Highlight the note if anchor tag is present\n\n  if id = window.location.hash.match(/^#?note_\\d+$/)\n    $anchor = $('body').find(window.location.hash).next('.note')\n    $anchor.addClass('anchored')\n    fromTop = $anchor.position().top\n    $('html,body').animate { scrollTop: fromTop }, 1\n","$ ->\n  # Make table rows links\n\n  $(\"tr[data-link]\").click (e) ->\n    e.preventDefault()\n    window.location.href = $(e.target).closest('tr').data('link')\n\n  # Highlight all associated notes if hovering over conversation tr (search)\n\n  $(\"[data-type='conversation-row']\").hover(\n    (e) -> $(e.target).parent(\"tr[data-type='conversation-row']\").nextUntil(\"[data-type='conversation-row']\", '.linkable-tr').addClass('group-hover'),\n    (e) -> $('.group-hover').removeClass('group-hover'))\n","# Set parser to MomentJS. Default is php-date-formatter which is buggy.\n# https://github.com/xdan/datetimepicker/issues/495\n#\n# Documentation for the datepicker library:\n# https://github.com/xdan/datetimepicker\n# http://xdsoft.net/jqplugins/datetimepicker/\n#\n# The library's javascript is in\n# vendor/assets/javascripts/jquery.datetimepicker.full.js\n\nwindow.dateTimeFormatter =\n  parseDate: (date, format) ->\n    d = moment(date, format)\n    if d.isValid() then d.toDate() else false\n  formatDate: (date, format) ->\n    moment(date).format(format)\n\nwindow.dateTimeFormat = 'MM/DD/YYYY hh:mm A'\n\n$.datetimepicker.setDateFormatter window.dateTimeFormatter\n\n$.add_datepickers = () ->\n  $(\".datepicker\").datetimepicker\n    timepicker: false\n    defaultSelect: true\n    format: 'MM/DD/YYYY'\n    scrollInput: false\n    scrollMonth: false\n    scrollTime: false\n    closeOnDateSelect: true\n\n  $(\".datetimepicker\").datetimepicker\n    scrollInput: false\n    scrollMonth: false\n    scrollTime: false\n    defaultSelect: true\n    format: window.dateTimeFormat\n    formatTime: 'hh:mm A'\n    step: 10\n    closeOnDateSelect: true\n    onClose: (_currentTime, input) ->\n      $inputField = $(input)\n      $(this).val('') if $inputField.hasClass('ui-datepicker-close')\n\n$ ->\n  $('#complex-form').on \"elementAdded\", '.add-fields', ->\n    $.add_datepickers()\n","$.toggle_dhe_id = () ->\n  dhe = $(\".dhe_auth:checked\").val()\n  if(dhe is \"true\")\n    field = $(\"#user_dhe_id\")\n\n    # If the value has been emptied, reset to the default value when we show it again.\n    if(field.val() == \"\")\n      field.val(field.attr(\"defaultValue\"))\n\n    $(\"#dhe-id\").show()\n    field.focus()\n  else\n    $(\"#dhe-id\").hide()\n    $(\"#user_dhe_id\").val('') # Clear out the dhe_id field since this is not a dhe user\n\n$ ->\n  $.toggle_dhe_id()\n\n  $(\".user_form\").on 'click', '.dhe_auth', ->\n    $.toggle_dhe_id()","$ ->\n  window.Eqapol ||= {}\n\n  class DonorTabs\n    constructor: ->\n      @tabs = $(\"#donor-tabs\")\n      @tabs.tabs { selected: this.getTabIndex(@tabs.attr(\"current-tab\") || 'donor-tab') }\n    getTabIndex: (currentTabName) ->\n      links = @tabs.find('ul:first a')\n      hrefs = $.map links, (a) ->\n        $(a).attr \"href\"\n      $.inArray \"##{currentTabName}\", hrefs\n\n  donorTabs = new DonorTabs\n\n  Eqapol.DonorSearch = do ->\n    $donorSearch = $('#donor_search')\n\n    bindProtocols = ->\n      $terminated = $donorSearch.find('#terminated')\n      $donorSearch.on('change', '#protocols', (event) ->\n        if $terminated.val() is ''\n          $terminated.val('false')\n          $terminated.closest('td').effect('highlight', 3000)\n      )\n\n    bindProtocols: bindProtocols\n\n  Eqapol.DonorSearch.bindProtocols()\n\n  $(\"#note-form-modal\").dialog\n    autoOpen: false,\n    height: 410,\n    width: 450,\n    modal: true,\n    buttons:\n      Submit: ->\n        $(this).find(\"form\").submit()\n        $(this).dialog \"close\"\n      Cancel: ->\n        $(this).dialog \"close\"\n\n  showDonorARTMedicines = ->\n    medicineField = $(\"#donor_medicines\").parent()\n    if $(\"#donor_currently_on_art\").is(':checked')\n      medicineField.show()\n    else\n      medicineField.hide()\n\n  showDonorARTMedicines()\n\n  $(\"#donor_currently_on_art\").change(showDonorARTMedicines)\n\n  $.each $(\"table.donor_consents\"), (index, value) ->\n     $(value).find(\"tbody tr:not(:last)\").hide()\n  $(\"a#toggle_consents\").on \"click\", ->\n    $(this).siblings(\"table.donor_consents\").find(\"tbody tr:not([class=new]):not(:last)\").toggle(10)\n    if $(this).text() == \"Show All\" then $(this).text(\"Hide Older Consents\") else $(this).text(\"Show All\")\n    return false\n\n  $(\"a#new_consent\").on \"click\", ->\n    $(this).next(\".donor_consent_form\").slideToggle()\n    $(this).slideToggle()\n    return false\n\n  #$(\".terminated_box:not(:checked)\").closest(\"div.fields\").siblings(\"div.termination\").hide()\n  $(document).on 'click', '.terminated_box', ->\n    if $(this).is(':checked')\n      $(this).closest(\"div.fields\").siblings(\"div.termination\").slideToggle(300)\n    else\n      if confirm(\"Are you sure you want to revoke termination? Revoking termination clears any details or comments.\")\n        $(this).closest(\"div.fields\").siblings(\"div.termination\").slideToggle(300)\n      else\n        $(this).prop('checked', true)\n\n  checkDeferred = ->\n    selectList = $(this)\n    textField = selectList.closest(\".donor-subsection\").find(\".is_deferred_target\")\n    if selectList.val() == \"true\"\n      textField.show()\n      textField.focus()\n    else\n      textField.hide()\n\n  $(\".is_deferred\").on \"change\", checkDeferred\n\n  changeDeferredReason = ->\n    selectList = $(this)\n    textArea = selectList.closest(\".donor-subsection\").find(\".is_deferred_target.details\")\n    if selectList.val() == \"\"\n      textArea.show()\n      textArea.focus()\n    else\n      textArea.hide()\n\n  $(\".is_deferred_target.reason select\").on \"change\", changeDeferredReason\n\n  checkAdverseReaction = ->\n    selectList = $(this)\n    textField = selectList.closest(\".donor-subsection\").find(\".is_adverse_reaction_target\")\n    if selectList.val() == \"true\"\n      textField.show()\n      textField.focus()\n    else\n      textField.hide()\n\n  $(\".is_adverse_reaction\").on \"change\", checkAdverseReaction\n\n  checkOtherVisit = ->\n    checkBox = $(this)\n    textField = checkBox.closest(\".donor-subsection\").find(\".other_visit_type\")\n    if checkBox.prop(\"checked\")\n      textField.show()\n      textField.removeAttr(\"readonly\", \"\").focus()\n    else\n      textField.hide()\n      textField.val(\"\").attr(\"readonly\", \"readonly\")\n\n  $(\".is_other_visit\").on \"change\", checkOtherVisit\n\n#  $(\".dhvi_repository\").change ->\n#    $.ajax {\n#      url: \"/specimen/update_dhvi_repository\"\n#      data: {specimen_id: 4}\n\n  $(\"#donor-form-modal form\").validate\n    rules:\n      \"donor[ptid]\": \"required\"\n      \"donor[study_id]\": \"required\"\n    submitHandler: (form) ->\n      form.submit()\n      $(\"#donor-form-modal\").dialog \"close\"\n\n  $(\"#donor-form-modal\").dialog\n    autoOpen: false,\n    height: 300,\n    width: 500,\n    modal: true,\n    buttons:\n      Submit: ->\n        $(this).find(\"form\").submit()\n      Cancel: ->\n        $(this).dialog \"close\"\n\n  # Show modal on page load if errors exist\n  if $(\"#donor-form-modal div#error_explanation\").is(\"*\")\n    $('#donor-form-modal').dialog('open')\n\n  jQuery(document).on \"drag-select.selected\", \"table.donor-specimens tr\", (event) ->\n    row = jQuery(this)\n    checkbox = row.find(\"input[type='checkbox']\")\n    checkbox.attr \"checked\", \"checked\"\n\n  # This unintentionally (erroneously) makes it so that you can't drag the mouse to select/highlight text on any page in EQAPOL!\n  # So, we're only calling drag_select IF the table exists, i.e. if were on the donor page.\n  if jQuery(\"table.donor-specimens\").length\n    jQuery(\"table.donor-specimens\").disableSelection\n      table_row_selector: \"table.donor-specimens tr\"\n      on_row_select: (event, start_row, end_row) ->\n        DragSelect.preSelectRowRange start_row, end_row  if start_row?\n\n  $('[data-new-donor-button]').on 'click', (event) =>\n    event.preventDefault()\n    $('#donor-form-modal').dialog('open')\n\n  $('[data-new-note-button]').on 'click', (event) =>\n    event.preventDefault()\n    $('#note-form-modal').dialog('open')\n\nwindow.select_aliquots = (checkbox, specimen_id) ->\n  if $(checkbox).prop(\"checked\")\n    $(\".\" + specimen_id + \" input[type='checkbox']\").prop('checked', true)\n  else\n    $(\".\" + specimen_id + \" input[type='checkbox']\").prop('checked', false)\n\n$ ->\n  $('#enrollment-tab').on \"click\", '.add-fields',  ->\n    $('#enrollment-tab').find(\"[data-type='submit']\").show()\n  $('#prescreen-tab').on \"click\", '.add-fields',  ->\n    $('#prescreen-tab').find(\"[data-type='submit']\").show()\n  $('#donation-tab').on \"click\", '.add-fields',  ->\n    $('#donation-tab').find(\"[data-type='submit']\").show()\n\n  $(\"#enrollment-tab form\").validate()\n","$ ->\n  window.EndotoxinTestResults =\n    initialize: ->\n      @bindEvents()\n\n    bindEvents: ->\n      @changeEndotoxinTestResultType()\n      @clearNonselectedTestTypeValue()\n\n    changeEndotoxinTestResultType: ->\n      $(\"[data-endotoxin-result-type]\").on 'change', (event) =>\n        resultFields = $('[data-endotoxin-result]')\n        for resultField in resultFields\n          $resultField = $(resultField)\n          $resultField.prop('disabled', !$resultField.prop('disabled'))\n          $resultField.toggleClass('required')\n          $resultField.val('')\n\n    clearNonselectedTestTypeValue: ->\n      for radioButton in $(\"[data-endotoxin-result-type]\")\n        $radioButton = $(radioButton)\n        buttonSelected = $radioButton.is(':checked')\n        $resultField = @testTypeResultFieldFor($radioButton)\n        unless buttonSelected then $resultField.val('')\n\n    testTypeResultFieldFor: ($radioButton) ->\n      buttonTestType = $radioButton.data('testType')\n      testTypeSelector = \"[data-test-type='#{buttonTestType}']\"\n      $(\"[data-endotoxin-result]#{testTypeSelector}\")\n\n  window.EndotoxinTestResults.initialize()","$ ->\n  window.PerformanceReportForm =\n    programId: null\n    kit_url: \"/ep_reports/kit_types\"\n    ep_url: \"/ep_reports/eps\"\n\n    bindEvents: ->\n      @disableSubmitButton()\n      @bindSelectProgram()\n      @bindSelectKit()\n      @bindSelectEps()\n      @bindSubmitEpReport()\n      @highlightFieldsOnSelect()\n      @backfillFormFromUrlParameters('program_id')\n      @backfillFormFromUrlParameters('ep_id')\n      @backfillFormFromUrlParameters('kit_type')\n\n    disableSubmitButton: ->\n      $('.report_submit input[type=submit]').attr('disabled', 'disabled').addClass('disabled')\n\n    bindSelectProgram: ->\n      $(\"#ep_report_program_id\").select2({ width: 'resolve' })\n      $(\"#ep_report_program_id\").on 'change backfill', (event) =>\n        programId = $(event.currentTarget).val()\n        @setProgramId programId\n        @fetchKitOptions programId\n        @clearField(\"#ep_report_ep_id\", 'ep_id')\n        @clearField(\"#ep_report_kit_type\", 'kit_types')\n\n    bindSelectKit: ->\n      $kitTypeFields = $(\"#ep_report_kit_type\")\n      $kitTypeFields.select2(data: [], width: 'resolve')\n      $kitTypeFields.select2(\"enable\", false)\n      $kitTypeFields.on 'change backfill', (event) =>\n        @clearField(\"#performance_report_ep_ids\", 'ep_ids')\n        @fetchEpOptions @programId, $(event.currentTarget).val().split(\",\")\n\n    bindSelectEps: ->\n      $epFields = $(\"#ep_report_ep_id\")\n      $epFields.select2(data: [], width: 'resolve')\n      $epFields.select2(\"enable\", false)\n      $epFields.on 'select2-close backfill', (event) =>\n        $('.report_submit input[type=submit]').removeAttr('disabled').removeClass('disabled')\n\n    bindSubmitEpReport: ->\n      $('form[name=form-ep_report]').submit (e) => @updateFormAction($(e.currentTarget))\n\n    highlightFieldsOnSelect: ->\n      $('input[type=hidden], select').on 'select2-open', (event) ->\n        $('dl.report_field').removeClass('active')\n        $(event.currentTarget).parents('dl').addClass('active')\n      $('input[type=hidden], select').on 'select2-blur', (event) ->\n        $(event.currentTarget).parents('dl').removeClass('active')\n\n    backfillFormFromUrlParameters: (paramName) ->\n      parameters = @parameters()\n      paramVal = parameters[\"ep_report[#{paramName}]\"]\n      if paramVal\n        if paramVal.indexOf(\"+\") != -1\n          paramVal = paramVal.replace(/\\+/, ' ')\n        if paramName.indexOf(\"_ids\") != -1 || paramName.indexOf(\"criteria_names\") != -1 || paramName.indexOf(\"kit_type\") != -1\n          paramVal = paramVal.split(',')\n        $(\"#ep_report_#{paramName}\").select2('val', paramVal)\n        $(\"#ep_report_#{paramName}\").trigger('backfill')\n\n    setProgramId: (id) ->\n      @programId = id\n\n    fetchKitOptions: (id) ->\n      $.getJSON \"#{@kit_url}?program_id=#{id}\", (eps) =>\n        display = \"block\"\n        if !eps.length\n          display = \"none\"\n          @fetchEpOptions(id)\n        $(\"#ep_report_kit_type\").parents('dl').css(display: display)\n        eps = ({id: ep, text: ep} for ep in eps)\n        $(\"#ep_report_kit_type\").select2\n          data: eps\n          width: 'resolve'\n        $(\"#ep_report_kit_type\").select2(\"enable\", true)\n        $('dl').removeClass('active')\n        $(\"#ep_report_kit_type\").parents('dl').removeClass('js-disabled').addClass('active')\n        $(\"#ep_report_ep_id\").select2(\"enable\", false)\n        $(\"#ep_report_ep_id\").parents('dl').addClass('js-disabled')\n        @backfillFormFromUrlParameters('kit_type')\n\n    epName: (name, kitType) ->\n      name = \"EP#{name} \"\n      kitType = kitType || \"\"\n\n      if kitType == \"EQAPOL\"\n        return name\n      else\n        return name + kitType\n\n    fetchEpOptions: (id, kitTypes=[]) ->\n      kitParams = @parameterizeKitTypes(kitTypes)\n      $.getJSON \"#{@ep_url}?program_id=#{id}#{kitParams}\", (eps) =>\n        eps = ({id: ep.id, text: @epName(ep.name, ep.kitType)} for ep in eps)\n        $(\"#ep_report_ep_id\").select2\n          data: eps\n          width: 'resolve'\n        $(\"#ep_report_ep_id\").select2(\"enable\", true)\n        $('dl').removeClass('active')\n        $(\"#ep_report_ep_id\").parents('dl').removeClass('js-disabled').addClass('active')\n        @backfillFormFromUrlParameters('ep_id')\n\n    parameterizeKitTypes: (kitTypes=[]) ->\n      params = ''\n      (params += \"&kit_types[]=#{kit}\" if kit.length) for kit in kitTypes\n      params\n\n    updateFormAction: ($form) ->\n      submitUrl = window.location.href.replace(/new/, \"#{@programId}\")\n      formParams = $form.serialize()\n      $form.attr('action', \"#{submitUrl}?#{formParams}\")\n\n    parameters: ->\n      search = location.search.substring(1)\n      return {} unless !!search.length\n      search = decodeURI(search).replace(/&/g, '\",\"').replace(/\\=/g,'\":\"')\n      return JSON.parse \"{\\\"#{search}\\\"}\", (key, value) ->\n        return value unless !!key.length\n        return decodeURIComponent(value)\n\n    clearField: (field, backfill) ->\n      $(field).select2(data: [], width: 'resolve')\n      @backfillFormFromUrlParameters(backfill)\n\n  window.PerformanceReportForm.bindEvents() if !!$('.new_ep_report').length\n","jQuery.fn.feedersSelector = (select='select') ->\n  \n  adjustSelected = (selectedTable) ->\n    selectList = ''\n    selectedTable.find('tr.specimen').each () ->\n      selectList += ($(this).attr('id') + ' ')\n      $('input#processing_event_feeder_ids, input#selected_feeder_ids').val(selectList)\n    if selectList is ''\n      $('#selected-feeders-empty').show()\n      $('#selected-feeders').hide()\n    else\n      $('#selected-feeders').show()\n      $('#selected-feeders-empty').hide()\n    \n  selectFeeder = (eventHandler) ->\n    eventHandler.preventDefault()   \n    trigger = $(eventHandler.target)\n    row = $(trigger).closest('tr')\n    if row.find('a').is(':visible')\n      selectedTable = $('#selected-feeders')\n      newRow = row.clone()\n      row.find('a').hide()\n      row.find('span.fc-selected-label').show()\n      newRow.attr('id', row.attr('id').replace('specimen_', 'selected_'))\n      deleteTrigger = newRow.find('span.specimen-select a')\n      deleteTrigger.closest('span').addClass('specimen-reject').removeClass('specimen-select')\n      deleteTrigger.text('Remove')\n      deleteTrigger.click (deselectEventHandler) ->\n        deselectFeeder(deselectEventHandler)\n      selectedTable.append(newRow)\n      adjustSelected(selectedTable)\n    false\n    \n  deselectFeeder = (eventHandler) ->\n    eventHandler.preventDefault()\n    trigger = $(eventHandler.target)\n    row = $(trigger).closest('tr')\n    doppelgangerRow = $(\"tr##{row.attr('id').replace('selected_', 'specimen_')}\")\n    doppelgangerRow.find(\"a\").show()\n    doppelgangerRow.find('span.fc-selected-label').hide()\n    row.remove()\n    adjustSelected($('#selected-feeders'))\n    false\n    \n  if select == 'select'\n    eventFunction = selectFeeder\n  else\n    eventFunction = deselectFeeder\n    \n  this.each () ->\n    trigger = $(this)\n    trigger.click (eventHandler) ->\n      eventFunction(eventHandler)\n","$.addNewFiebigBand = () ->\n  this.addFormlet('fiebig-band')\n","class FieldToggler\n  constructor: (classToToggle) ->\n    @classToToggle = classToToggle\n    @bindToggle()\n\n  bindToggle: ->\n    toggleAttribute = \"#{@classToToggle}-field-toggle\"\n    fieldAttribute = \"toggleable-#{@classToToggle}-field\"\n\n    $(\"[data-#{toggleAttribute}]\").on 'change', (event) =>\n      $checkBox = $(event.target)\n      fieldName = $checkBox.data(toggleAttribute)\n      $fields = $(\"[data-#{fieldAttribute}=#{fieldName}]\")\n      required = @required($checkBox)\n\n      for field in $fields\n        $field = $(field)\n\n        if required\n          @addClass($field)\n        else\n          @removeClass($field)\n\n  # The fields should have the classToToggle when the \"checked\" attribute equals\n  # the \"classToToggle-when-checked\" data attribute. As an example, when\n  # classToToggle is \"required\", the fields should have the \"required\" class\n  # when the box is checked and \"required when checked\" is true or when the box\n  # is unchecked and \"required when unchecked\" is false.\n  required: ($checkBox) ->\n    checkedMeansRequired = $checkBox.data(\"#{@classToToggle}-when-checked\")\n    checked = $checkBox.prop('checked')\n    checkedMeansRequired == checked\n\n  addClass: ($field) ->\n    $field.addClass(@classToToggle)\n\n  removeClass: ($field) ->\n    $field.removeClass(@classToToggle)\n\n\nclass RequiredFieldToggler extends FieldToggler\n  constructor: ->\n    super 'required'\n\n  # In addition to removing the 'required' class, we want to remove any error\n  # messages on the form if the user attempted to submit already with the field\n  # blank but marked as required.\n  removeClass: ($field) ->\n    super $field\n    $field.removeClass('error')\n    $errorMessages = $('label.error[for=\"' + $field.prop('id') + '\"]')\n    $errorMessages.remove()\n\n\nclass DisabledFieldToggler extends FieldToggler\n  constructor: ->\n    super 'disabled'\n\n  # In addition to toggling the 'disabled' class, we want to toggle the disabled\n  # property as well.\n  addClass: ($field) ->\n    super $field\n    $field.prop('disabled', true)\n\n  removeClass: ($field) ->\n    super $field\n    $field.prop('disabled', false)\n\n\n$ ->\n  new RequiredFieldToggler()\n  new DisabledFieldToggler()","$ ->\n  $('#order_trigger_events').change (e) ->\n    value = $(e.target).children('option:selected').text()\n    if value == \"Approved\"\n      $('#approver-fields').show()\n    else\n      $('#approver-fields').hide()\n      $('#order_for_research, #order_from_humans').val('')\n      $('#order_irb_number').attr('readonly', true)\n      $('#order_irb_number').addClass('disabled')\n      $('#order_irb_number').val('')\n\n  order_status = $('#order_trigger_events option:selected').text()\n  if order_status == \"Approved\"\n    $('#approver-fields').show()\n\n  $('#order_for_research, #order_from_humans').change (e) ->\n    if $('#order_for_research').val() == \"true\" && $('#order_from_humans').val() == \"true\"\n      $('#order_irb_number').attr('readonly', false)\n      $('#order_irb_number').attr('disabled', false)\n      $('#order_irb_number').removeClass('disabled')\n    else\n      $('#order_irb_number').attr('readonly', true)\n      $('#order_irb_number').addClass('disabled')\n      $('#order_irb_number').val('')\n\n$.disable_form = ->\n  _gon = if (gon?) then gon else {}\n  unless _gon.exclude_forms? and _gon.exclude_forms instanceof Array\n    _gon.exclude_forms = []\n  $(\"form\").each ->\n    unless $(@).attr('id') in _gon.exclude_forms\n      $(@).attr(\"action\", \"\")\n      $(\"input:submit\", @).remove()\n      $(\"select\", @).each (i, select) ->\n        self = $(select)\n        value = self.find(\"option:selected\").text()\n        self.after $('<input>').attr(\"type\", \"text\").val(value).attr(\"class\", self.attr(\"class\")).attr('title', value)\n        self.remove()\n      $(\"input, textarea\", @).attr(\"readonly\", true).attr(\"disabled\", true)\n","window.GenerateReportForm =\n  programId: null\n  kit_url: \"/generate_reports/kit_types\"\n  ep_url: \"/generate_reports/eps\"\n  program_url: \"/generate_reports/program_type\"\n\n  bindEvents: ->\n    @bindSelectProgram()\n    @bindSelectKit()\n    @bindSelectEps()\n    @highlightFieldsOnSelect()\n    @backfillFormFromUrlParameters('program_id')\n\n  bindSelectProgram: ->\n    $programDropdown = $('[data-selector=\"program\"]')\n    $programDropdown.select2(width: 'resolve')\n    $programDropdown.on 'change backfill', (event) =>\n      programId = $(event.currentTarget).val()\n      @setProgramId programId\n      if programId != ''\n        @fetchKitOptions programId\n        @clearField($('[data-selector=\"ep_ids\"]'), 'ep_ids')\n        @checkProgramType programId\n      else\n        @hideButtons()\n        $kitDropdown = $('[data-selector=\"kit_types\"]')\n        $epsDropdown = $(\"#generate_report_ep_ids\")\n        $kitDropdown.parents('dl').css(display: 'none')\n        $epsDropdown.parents('dl').css(display: 'none')\n    $programDropdown.trigger('change')\n\n  checkProgramType: (id) ->\n    $.getJSON \"#{@program_url}?program_id=#{id}\", (program) =>\n      if program.program_name == 'Multiplex'\n        @showGenerateReportButton()\n      else\n        @showGenerateGraphButton()\n\n  showGenerateGraphButton: ->\n    $('[data-button=\"graph\"]').show()\n    $('[data-button=\"report\"]').hide()\n\n  showGenerateReportButton: ->\n    $('[data-button=\"report\"]').show()\n    $('[data-button=\"graph\"]').hide()\n\n  hideButtons: ->\n    $('[data-button=\"report\"]').hide()\n    $('[data-button=\"graph\"]').hide()\n\n  bindSelectKit: ->\n    $kitTypeFields = $('[data-selector=\"kit_types\"]')\n    $kitTypeFields.select2(data: [], width: 'resolve', multiple: true)\n    $kitTypeFields.on 'change backfill', (event) =>\n      @clearField($('[data-selector=\"ep_ids\"]'), 'ep_ids')\n      @fetchEpOptions @programId, $(event.currentTarget).val().split(\",\")\n\n  bindSelectEps: ->\n    $epFields = $('[data-selector=\"ep_ids\"]')\n    $epFields.select2(data: [], width: 'resolve', multiple: true)\n\n  highlightFieldsOnSelect: ->\n    $('input[type=hidden], select').on 'select2-open', (event) ->\n      $('dl.report_field').removeClass('active')\n      $(event.currentTarget).parents('dl').addClass('active')\n    $('input[type=hidden], select').on 'select2-blur', (event) ->\n      $(event.currentTarget).parents('dl').removeClass('active')\n\n  backfillFormFromUrlParameters: (paramName) ->\n    parameters = @urlParameters()\n    paramVal = parameters[\"generate_report[#{paramName}]\"]\n    if paramVal\n      if paramVal.indexOf(\"+\") != -1\n        paramVal = paramVal.replace(/\\+/g, ' ')\n      if paramName.indexOf(\"_ids\") != -1 || paramName.indexOf(\"criteria_names\") != -1 || paramName.indexOf(\"kit_types\") != -1\n        paramVal = paramVal.split(',')\n      $(\"#generate_report_#{paramName}\").select2('val', paramVal)\n      $(\"#generate_report_#{paramName}\").trigger('backfill')\n\n  setProgramId: (id) ->\n    @programId = id\n\n  fetchKitOptions: (id) ->\n    $.getJSON \"#{@kit_url}?program_id=#{id}\", (kits) =>\n      display = \"block\"\n      if !kits.length\n        display = \"none\"\n        @fetchEpOptions(id)\n      $kitDropdown = $('[data-selector=\"kit_types\"]')\n      $epsDropdown = $('[data-selector=\"ep_ids\"]')\n\n      $kitDropdown.parents('dl').css(display: display)\n      kits = ({id: kit, text: kit} for kit in kits)\n      $kitDropdown.select2\n        data: kits\n        width: 'resolve'\n      $kitDropdown.select2(\"enable\", true)\n      $('dl').removeClass('active')\n      $kitDropdown.parents('dl').removeClass('js-disabled').addClass('active')\n      $epsDropdown.select2(\"enable\", false)\n      $epsDropdown.parents('dl').addClass('js-disabled')\n      @backfillFormFromUrlParameters('kit_types')\n\n  epName: (name, kitType) ->\n    name = \"EP#{name} \"\n    kitType = kitType || \"\"\n\n    if kitType == \"EQAPOL\"\n      return name\n    else\n      return name + kitType\n\n  fetchEpOptions: (id, kitTypes=[]) ->\n    kitParams = @parameterizeKitTypes(kitTypes)\n\n    $.getJSON \"#{@ep_url}?program_id=#{id}#{kitParams}\", (eps) =>\n      eps = ({id: ep.id, text: @epName(ep.name, ep.kitType)} for ep in eps)\n      $epsDropdown = $(\"#generate_report_ep_ids\")\n      $epsDropdown.select2\n        data: eps\n        width: 'resolve'\n      $epsDropdown.parents('dl').css(display: 'block')\n      $epsDropdown.select2(\"enable\", true)\n      $('dl').removeClass('active')\n      $epsDropdown.parents('dl').removeClass('js-disabled').addClass('active')\n      @backfillFormFromUrlParameters('ep_ids')\n\n  parameterizeKitTypes: (kitTypes=[]) ->\n    params = ''\n    (params += \"&kit_types[]=#{kit}\" if kit.length) for kit in kitTypes\n    params\n\n  urlParameters: ->\n    search = location.search.substring(1)\n    return {} unless !!search.length\n    search = decodeURI(search).replace(/&/g, '\",\"').replace(/\\=/g,'\":\"')\n    return JSON.parse \"{\\\"#{search}\\\"}\", (key, value) ->\n      return value unless !!key.length\n      return decodeURIComponent(value)\n\n  clearField: ($field, backfill) ->\n    $field.select2(data: [], width: 'resolve', multiple: true)\n    $field.val('')\n    @backfillFormFromUrlParameters(backfill)\n\n$ ->\n  window.GenerateReportForm.bindEvents() if $('[data-generate-report]').length > 0\n","window.d3 = require('d3');\nwindow.c3 = require('c3');\n\n## Copied from proficiency_test_enrollments.coffee below. Workaround for\n## stub directive in application.coffee.\n\n$ ->\n  if $(\"#site-scores-graph\").length > 0\n    $siteGraph = $(\"#site-scores-graph\")\n    epName = $('.assay-number-header').data('epName')\n\n    setupGradingLevels = ->\n      gradingLevels = []\n      $.each $('[data-range-upper-bound]'), (i, level) ->\n        gradingLevels.push( parseFloat($(level).data('rangeUpperBound'))+1 )\n      gradingLevels\n\n    window.gradingLevels = setupGradingLevels()\n\n    colorFor = (id, score) ->\n      averageColor =   '#C0C0C0'\n      poorColor =      '#FF0000'\n      fairColor =      '#FFA500'\n      goodColor =      '#009900'\n      excellentColor = '#00009C'\n      blankColor =     '#FFFFFF'\n\n      if /average/i.test(id)    then return averageColor\n      if /poor/i.test(id)       then return poorColor\n      if /fair/i.test(id)       then return fairColor\n      if /good/i.test(id)       then return goodColor\n      if /excellent/i.test(id)  then return excellentColor\n\n      unless score? then return null\n      # order matters\n      if score < 0 then return blankColor\n      if score < (window.gradingLevels[window.gradingLevels.length - 1] || 0) then return poorColor\n      if score < (window.gradingLevels[2] || 0) then return fairColor\n      if score < (window.gradingLevels[1] || 0) then return goodColor\n      if score < (window.gradingLevels[0] || 0) then return excellentColor\n      return averageColor\n\n    chart = c3.generate\n      bindto: '#site-scores-graph'\n      transition:\n        duration: 0\n      size:\n        width: 500\n        height: 150\n      color:\n        pattern: ['#000000']\n      point:\n        r: 5 # radius of dots\n      legend:\n        show: false\n      axis:\n        y:\n          padding:\n            top: 14\n          tick:\n            values: [ 0, 25, 50, 75, 100 ]\n          max: 100\n          min: 0\n        x:\n          type: 'category'\n      tooltip:\n        grouped: false\n      data:\n        rows: []\n        color: (color, d) ->\n          newColor = colorFor(d.id, d.value)\n          unless newColor? then return color\n          newColor\n        x: 'EP Name'\n\n    legendTextMap = {\n      'Average':    'EP Average',\n      'Excellent':  \"Excellent\",\n      'Good':       \"Good\",\n      'Fair':       \"Fair\",\n      'Poor':       \"Poor\",\n    }\n\n    legendItem = (backgroundColor, text) ->\n      \"<span class=\\\"legend-palette\\\" style=\\\"background-color: \" + backgroundColor + \"\\\"></span> \" + text\n\n    siteScoresUrl = $('#site-scores-graph').data('siteScoresUrl')\n    epAverageScoresUrl = $('#site-scores-graph').data('epAverageScoresUrl')\n\n    # Setup Legend\n    d3.select('#site-scores-graph')\n      .insert('div', '.chart')\n      .attr('class', 'legend')\n      .selectAll('span')\n      .data(Object.keys(legendTextMap))\n      .enter()\n      .append('span')\n      .html((id) -> legendItem(colorFor(id), legendTextMap[id]))\n\n    # Below should be deferred objects, but this is a simpler hack\n    $siteGraph.on 'chartLoaded', ->\n      if $(this).data('chartOneRendered') == true && $(this).data('chartTwoRendered') == true\n        # Can't figure out why c3 is giving the Averages a 0.5 opacity\n        # Override here\n        $('.c3-circle').css('opacity', 1)\n        $('.c3-line').css('stroke-dasharray', 5, 5)\n        # This is needed so wkhtmltoimage knows when it's done rendering\n        window.status = 'charts_loaded'\n\n    chart.load\n      type: 'line'\n      url: epAverageScoresUrl\n      done: ->\n        $siteGraph.data('chartOneRendered', true)\n        $siteGraph.trigger('chartLoaded')\n\n    chart.load\n      type: 'scatter'\n      url: siteScoresUrl\n      done: ->\n        $siteGraph.data('chartTwoRendered', true)\n        $siteGraph.trigger('chartLoaded')","# enable other field\n$.enable_other = (e) ->\n  select = $(e.target)\n  if(select.val() == \"Other\")\n    select.closest(\".new-row\").find(\"div.other-field-container\").show().find(\"input:text\").attr \"disabled\", false\n  else\n    select.closest(\".new-row\").find(\"div.other-field-container\").hide().find(\"input:text\").attr \"disabled\", true\n\n# disable the entire iqa form\n$.disable_iqa_form = ->\n  $.disable_form()\n  $(\".premix img\").remove()\n\n$.show_optional_antigen_fields = ->\n  $(\"select.optional_antigen\").each (i, select) ->\n    self = $(select)\n    if self.val()\n      self.closest(\".optional-antigen\").find(\".optional-antigen-results\").find(\".percent\").text(self.val() + \" %\")\n      self.closest(\".optional-antigen\").find(\".optional-antigen-results\").find(\".abs\").text(self.val() + \" Abs\")\n      self.closest(\".optional-antigen\").find(\".optional-antigen-results\").show()\n    else\n      self.closest(\".optional-antigen\").find(\".optional-antigen-results\").hide()\n\n$.iqa_form_validate = (field) ->\n  if field.hasClass(\"format_one_decimal_place\")\n    return $.validate_one_decimal_place_field(field,2)\n\n  if field.hasClass(\"integer-only\")\n    return $.validate_integer_field(field)\n\n$.hide_iqa_validation_messages = ->\n  $(\".field-with-validation.invalid\").each ->\n    $(this).tipsy('hide')\n\n$.show_iqa_validation_message = (field) ->\n  $.hide_iqa_validation_messages\n  field.tipsy('show')\n\n$.iqa_form_tab_selected = (e, ui) ->\n  $.hide_iqa_validation_messages()\n  $(\"#current_tab\").val(ui.index)\n\n$.validate_unreported_phenotype = (field) ->\n  valid = false\n  sample_select = field.find(\".unreported-phenotype-sample\").first()\n  parameter_select = field.find(\".unreported-phenotype-parameter\").first()\n  explanation_select = field.find(\".unreported-phenotype-explanation\").first()\n  other_explanation_field = field.find(\".other_explanation\").first()\n\n  if(((sample_select.val() == \"\") && (parameter_select.val() == \"\") && (explanation_select.val() == \"\")) ||\n    ((sample_select.val() != \"\") && (parameter_select.val() != \"\") && (explanation_select.val() != \"\")))\n      if((explanation_select.val() != \"Other\") || (other_explanation_field.val() != \"\"))\n        valid = true\n\n  if(valid)\n    field.removeClass('invalid')\n    field.attr('original-title', \"\")\n    field.tipsy('hide')\n  else\n    field.addClass('invalid')\n    field.data('errors', \"Please choose a sample, parameter and explanation.\")\n    field.attr('original-title', \"Please choose a sample, parameter and explanation for each unreported phenotype.\")\n    $.hide_iqa_validation_messages()\n    field.tipsy('show')\n\n  return valid\n\niqa_web_form =\n\n  propagate_row_selects: ->\n    # if the user changes a select field, and all the select fields in that row still contain the default value (\"\"),\n    # then propagate the newly selected value to all the other select fields in the row\n    $(\"#immunology select, #optional-antigens select\").change ->\n      thisSelectsCssClass = $(@).attr('class')\n      otherSelectsInRow = $(@).closest(\".group\").find(\"select.\" + thisSelectsCssClass)\n\n      # hack to only get the selected row when dealing w/ sections that have 2 dye rows listed\n      if otherSelectsInRow.length == 10\n        isTopRow = otherSelectsInRow.index($(@)) % 2 == 0\n        if isTopRow\n          otherSelectsInRow = otherSelectsInRow.filter(\":even\")\n        else\n          otherSelectsInRow = otherSelectsInRow.filter(\":odd\")\n\n      otherSelectsInRow = otherSelectsInRow.not(@)\n      selectsInRowWithDefaultValue = otherSelectsInRow.filter ->\n        $(@).val() == ''\n      allSelectsInRowHaveDefaultValue = !otherSelectsInRow.not(selectsInRowWithDefaultValue).length\n\n      if allSelectsInRowHaveDefaultValue\n        thisSelectsValue = $(@).val()\n        otherSelectsInRow.val(thisSelectsValue)\n\n\n  checkForChangesPresentVisibility: (changeIcon) ->\n    correspondingField = changeIcon.prev()\n\n    if correspondingField.is(\":visible\")\n      changeIcon.show()\n    else\n      changeIcon.hide()\n\n\n# this will determine if the explanation field needs to be shown.\n# only show if \"Other\" has been selected from the el dropdown.\ncheckIfOtherExplanationTextfieldNeedsToBeShown = ($explanationSelectDropdown) ->\n  $otherExplantionField = $explanationSelectDropdown.closest(\".unreported-item\").find(\"[id$=other_explanation]\")\n  if $explanationSelectDropdown.val() == \"Other\" then $otherExplantionField.show() else $otherExplantionField.hide()\n\n  iqa_web_form.checkForChangesPresentVisibility($otherExplantionField.next()) if $otherExplantionField.next().hasClass(\"changes-present\")\n  iqa_web_form.checkForChangesPresentVisibility($explanationSelectDropdown.next()) if $explanationSelectDropdown.next().hasClass(\"changes-present\")\n\n###### ON-LOAD ######\n$ ->\n  iqa_web_form.propagate_row_selects()\n  $(\"[data-other-explanation=true]\").each ->\n    checkIfOtherExplanationTextfieldNeedsToBeShown($(@))\n\n  $(\"[data-iqa-web-forms]\").on \"change\", \"[data-other-explanation=true]\", (event)->\n    checkIfOtherExplanationTextfieldNeedsToBeShown($(event.target))\n\n\n  # set up selects with other option on the iqa form\n  $(\"#iqa-result select\").each (i, select) ->\n    if($(select).closest(\".new-row\").find(\"div.other-field-container\").length > 0)\n      other_field = $(select).closest(\".new-row\").find(\"div.other-field-container\").find(\"input:text\")\n      unless $(select).val() == \"Other\"\n        other_field.attr \"disabled\", true\n        other_field.closest(\".other-field-container\").hide()\n      $(select).change $.enable_other\n      $(select).addClass(\"has-other-option\")\n      other_field.addClass(\"other-field\")\n\n      $.enable_other({target: select}) if $(select).val() == \"Other\"\n\n  # only show the antigen fields when something is selected\n  $.show_optional_antigen_fields()\n  $(\"select.optional_antigen\").on \"change\", $.show_optional_antigen_fields\n\n  # this is for removing options from the program select option form\n  $(\".option-destroy\").click (e) ->\n    e.preventDefault()\n    if(confirm(\"Are you sure you want to remove this field option? This cannot be undone.\"))\n      $.ajax $(e.target).attr(\"href\"), success: =>\n        $(e.target).parent(\".option-fields\").html(\"\")\n\n  # add option to program select option form\n  $(\".add-option\").click (e) ->\n    e.preventDefault()\n    new_option = $(\".option-fields:last\").clone()\n    new_option.adjust_rails_form_fields($(\".option-fields\").length)\n    $(\".option-fields:last\").after(new_option)\n    new_option.find(\"input:text\").val(\"\")\n\n  $(\".field-with-validation\").each ->\n    field = $(this)\n    field.tipsy({html: true, fade: false, trigger: 'manual', fallback: 'Value is not valid'})\n\n  $(\".field-with-validation\").blur (e) ->\n    field = $(e.target)\n    $.before_validation(field)\n    $.validate(field)\n\n  $(\".field-with-validation\").keyup (e) ->\n    # Avoid validating field if the tab key is released. (e.g. When the user tabs into the next field.)\n    # Note: When tabbing between fields, the field which the keyup event is fired upon is the field that is being tabbed into, rather than the field that is being tabbed out of.\n    tab_key = 9\n    if e.keyCode == tab_key\n      return true\n    field = $(e.target)\n    $.validate(field)\n\n  $(\".field-with-validation.invalid\").focus (e) ->\n    $.hide_iqa_validation_messages()\n    $(e.target).tipsy('show')\n\n  $(\".field-with-validation\").keydown (e) ->\n    # Allow keys to be pressed if the command/control key is down (so they can reload the page, open a new tab, etc)\n    if e.ctrlKey || e.metaKey\n      return true\n\n    field = $(e.target)\n\n    rules = $.validation_rules_for_field(field)\n    return true if rules.length == 0\n    ruleset = rules[0]\n\n    if ruleset.format? && ruleset.format == 'float'\n      # Allow a decimal point only if there is not already one\n      if ((field.val().indexOf(\".\") >= 0) && (e.keyCode == 190))\n        return false\n\n      # Allow only delete, backspace, tab, enter, period, arrow keys, numbers 0-9, and the numbers 0-9 on the right hand keypad, decimal point, and comma\n       valid_codes = [8,46,9,13,190,37,38,39,40,48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105,110,188]\n       if ($.inArray(e.keyCode, valid_codes) == -1)\n         return false\n       else\n         return true\n\n    if ruleset.format? && ruleset.format == 'integer'\n      # Allow only delete, backspace, tab, enter, arrow keys, numbers 0-9, and the numbers 0-9 on the right hand keypad\n      valid_codes = [8,46,9,13,37,38,39,40,48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105]\n      if ($.inArray(e.keyCode, valid_codes) == -1)\n        return false\n      else\n        return true\n\n  $(\"#iqa-result\").submit (e) ->\n    form = $(this)\n    return false if form.data('submitting')\n    form.data('submitting', true)\n    errors_fields = []\n\n    $(\".field-with-validation\").each ->\n      $.before_validation($(@))\n      if (! $.validate($(this)))\n        errors_fields.push($(this))\n\n    $(\".unreported-phenotyping-record\").each ->\n      if (! $.validate_unreported_phenotype($(this)))\n        errors_fields.push($(this))\n\n    if errors_fields.length > 0\n      try\n        form.data('submitting', false)\n        error_objects = errors_fields.map( (x) -> x.attr('original-title') )\n        error_str = error_objects.join(\"\\n\")\n        alert('The results contain errors. Please review entries before saving.\\n' + error_str)\n        tab_id = errors_fields[0].closest(\".ui-tabs-panel\").attr('id')\n        tab_index = $('.ui-tabs-panel').index($('#'+tab_id))\n        $(\"#iqa-web-form-tabs\").tabs('select', tab_index)\n\n        errors_fields[0].focus()\n\n      return false\n    else\n      return true\n\n  $(\"#view-edits\").click (e) ->\n    e.preventDefault()\n    $(\"#phenotype-edits\").show()\n    $(\"#phenotyping_record_container\").hide()\n\n  $(\"#hide-edits\").click (e) ->\n    e.preventDefault()\n    $(\"#phenotype-edits\").hide()\n    $(\"#phenotyping_record_container\").show()\n\n\n  $(\".premix\").each ->\n    html = $(@).data('imageHtml')\n    $(@).append(html)\n\n  # hide the changes_present icon if the field it represents is also hidden.\n  # conversely, show them when the field is shown.\n  $(\".changes-present\").each ->\n    iqa_web_form.checkForChangesPresentVisibility($(@))\n\n  $(\".checkbox-propagation\").click ->\n    itemsInRow = $(@).parent().parent().next(\".group\").find(\":checkbox\")\n\n    if $(@).hasClass('check') then itemsInRow.prop('checked', true) else itemsInRow.prop('checked', false)\n\n  $.extend($.validations, {\n    white_cell_count: $.standard_float\n    lymphocyte_percent: $.standard_float\n    cd45_bright_cd14: $.bright\n    cd3_percent: $.standard_float\n    cd3_abs: $.standard_integer\n    cd3_cd4_percent: $.standard_float\n    cd3_cd4_abs: $.standard_integer\n    cd3_cd8_percent: $.standard_float\n    cd3_cd8_abs: $.standard_integer\n    tot_cd19_percent: $.standard_float\n    tot_cd19_abs: $.standard_integer\n    cd3_cd19_percent: $.standard_float\n    cd3_cd19_abs: $.standard_integer\n    cd3_cd1656_percent: $.standard_float\n    cd3_cd1656_abs: $.standard_integer\n    opt_antigen_percent: $.standard_float\n    opt_antigen_abs: $.standard_integer\n  })\n\n###### END ON-LOAD ######\n","$ ->\n  window.KeyFields =\n    createKeyFieldNameUrl: \"/key_field_names\"\n    deleteKeyFieldUrl: \"/key_fields/key_field_id\"\n\n    initialize: ->\n      @bindEvents()\n      @showRemoveKeyFieldNewValueButton()\n\n    showRemoveKeyFieldNewValueButton: ->\n      $('.allowed-to-remove-new-value').show()\n\n    bindEvents: ->\n      @addKeyFieldNewValue()\n      @removeKeyFieldNewValue()\n      @removeKeyFieldRow()\n      @addKeyFieldRow()\n      @addKeyFieldName()\n\n    addKeyFieldNewValue: ->\n      $('[data-container-for-assay]').on 'click', '[data-add-new-value-for-key-field]', (event) ->\n        removeButtonContainer = $(event.target).closest('[data-group=\"new-values-for-key-field\"]').find('[data-container=\"remove-key-field-new-value\"]')\n        removeButtonContainer.show()\n      $('[data-container-for-assay]').on 'nested:fieldAdded:new_values', (event) ->\n        field = event.field\n        # mark new value as unsaved\n        field.find('[data-new-value-for-key-field]').addClass('unsaved-key-field-new-value')\n\n    removeKeyFieldNewValue: ->\n      $(\"[data-container-for-assay]\").on 'click', \"[data-action='remove-new-value-for-key-field']\", (event) =>\n        event.preventDefault()\n        removeLink = $(event.target)\n        newValues = removeLink.closest(\"[data-group='new-values-for-key-field']\")\n        lastNewValueField = newValues.find('[data-new-value-for-key-field]').last()\n        lastNewValueField.addClass('removed-key-field-new-value')\n\n        if lastNewValueField.hasClass('unsaved-key-field-new-value')\n          lastNewValueField.remove() # remove new value fields from the DOM if the new value is unsaved\n        else\n          lastNewValueField.find('[data-field=\"delete-key-field-new-value\"]').val(1) # set _delete field to delete the new value record serverside\n\n        unless @_multipleNewValuesPresentForKeyField(newValues)\n          $(event.target).closest('[data-container=\"remove-key-field-new-value\"]').hide()\n\n    _multipleNewValuesPresentForKeyField: (newValues) ->\n      $(newValues).find(\"[data-new-value-for-key-field]:not(.removed-key-field-new-value)\").size() > 1\n\n    removeKeyFieldRow: ->\n      $(\"[data-container-for-assay]\").on 'click', '[data-action=\"remove-unsaved-key-field-row\"]', (event) =>\n        event.preventDefault()\n        $button = $(event.target)\n        $keyFieldRow = $button.closest('[data-key-field-row]')\n        $keyFieldRow.remove()\n\n    addKeyFieldRow: ->\n      $(\"[data-container-for-assay]\").on 'nested:fieldAdded:key_fields', (event) =>\n        $newKeyFieldRow = $(event.field)\n        @_addOldValueField($newKeyFieldRow)\n        @_addNewValueField($newKeyFieldRow)\n\n        @_hideRemoveNewValueFieldButton($newKeyFieldRow)\n\n        @_removeRemoveNewKeyFieldCheckbox($newKeyFieldRow)\n        @_showRemoveNewKeyFieldButton($newKeyFieldRow)\n        @_markKeyFieldRowAsNewRecord($newKeyFieldRow)\n\n        $selectFields = $newKeyFieldRow.find('select')\n        Assays.activateSelect2($selectFields)\n\n    _markKeyFieldRowAsNewRecord: (keyFieldRow) ->\n      $(keyFieldRow).find('[data-key-field-row]').addClass('new-key-field-record')\n\n    _hideRemoveNewValueFieldButton: (newKeyFieldRow) ->\n      $(newKeyFieldRow).find('[data-container=\"remove-key-field-new-value\"]').hide()\n\n    _removeRemoveNewKeyFieldCheckbox: (newKeyFieldRow) ->\n      $(newKeyFieldRow).find('.remove-button-column input[type=\"checkbox\"]').remove()\n\n    _showRemoveNewKeyFieldButton: (newKeyFieldRow) ->\n      $(newKeyFieldRow).find('[data-action=\"remove-unsaved-key-field-row\"]').removeClass('hidden-remove-key-field-button')\n\n    _addOldValueField: (newKeyFieldRow) ->\n      $newKeyFieldRow = $(newKeyFieldRow)\n      $addOldValueButton = $newKeyFieldRow.find('[data-add-old-value-for-key-field]')\n      $addOldValueButton.click()\n\n    _addNewValueField: (newKeyFieldRow) ->\n      $newKeyFieldRow = $(newKeyFieldRow)\n      $addNewValueButton = $newKeyFieldRow.find('[data-add-new-value-for-key-field]')\n      $addNewValueButton.click()\n\n    addKeyFieldName: ->\n      $(\"[data-container-for-assay]\").on 'click', '[data-add-key-field-name]', (event) =>\n        event.preventDefault()\n        keyFieldName = @keyFieldNameField().val()\n        if keyFieldName.length > 0\n          if confirm(\"Are you sure you wish to add the key field type: #{keyFieldName}?\")\n            @_disableAddNewKeyFieldSection()\n            @createNewKeyField(keyFieldName)\n        else\n          alert(\"Please enter a name for the new key field type.\")\n\n    createNewKeyField: (keyFieldName) ->\n      keyFieldNameAttributes = {\n        key_field_name_attributes: {\n          name:  keyFieldName\n        }\n      }\n      @_sendRequestToCreateKeyFieldName(keyFieldNameAttributes)\n\n    keyFieldNameField: () ->\n      $(\"#key_field_name\")\n\n    _sendRequestToCreateKeyFieldName: (keyFieldNameAttributes) ->\n      $('[data-key-field-name-error]').hide()\n\n      $.ajax(\n        url: @createKeyFieldNameUrl,\n        type: \"POST\",\n        data: keyFieldNameAttributes,\n        dataType: \"json\"\n      ).done((data, textStatus, jqXHR) =>\n        @keyFieldNameField().val(\"\")\n        newData = $.parseJSON(jqXHR.responseText)\n        newOptionTag = $('<option>').val(newData.id).html(newData.name)\n        $('select[data-key-field-select]').append(newOptionTag)\n        @_enableAddNewKeyFieldSection()\n      )\n       .fail((data, textStatus, errorThrown) =>\n          $('[data-key-field-name-error]').show()\n          @_enableAddNewKeyFieldSection()\n      )\n\n    _disableAddNewKeyFieldSection: ->\n      $('[data-field=\"new-key-field-name\"]').prop(\"disabled\", true)\n      $('[data-add-key-field-name]').toggle()\n\n    _enableAddNewKeyFieldSection: ->\n      $('[data-field=\"new-key-field-name\"]').prop(\"disabled\", false)\n      $('[data-add-key-field-name]').toggle()\n\n  window.KeyFields.initialize() if $(\"[data-key-fields-section]\").size() > 0\n","$ ->\n  window.Lag =\n    disableResultField: (resultField) ->\n      resultField.prop('readonly', 'readonly')\n      resultField.val('')\n      resultField.tipsy('hide')\n      resultField.removeClass('invalid')\n\n    enableResultField: (resultField) ->\n      if resultField.prop('readonly')\n        resultField.prop('readonly', false)\n        resultField.siblings('input[value=numeric]').prop('checked', 'checked')\n\n    validate: ->\n      errors_fields= @errors_fields()\n      if errors_fields.length > 0\n        _.each errors_fields, (field) -> $(field).tipsy('show')\n        alert('The results contain errors. Please review entries before saving.')\n        errors_fields[0].focus()\n        $('.reloading').removeClass('reloading')\n\n      errors_fields.length == 0\n\n    errors_fields: ->\n      $(\".field-with-validation\").filter ->\n        $.before_validation($(@))\n        not $.validate($(@))\n\n  $('.lag').on 'change', '.result input[type=text]', (e) ->\n    numericResultField = $(e.target)\n    numericOption = numericResultField.siblings('input[value=numeric]')\n    if numericResultField.val()\n      numericOption.prop('checked', 'checked')\n    else\n      numericOption.prop('checked', false)\n\n  $('.lag').on 'change', '.result input[type=radio]', (e) ->\n    resultField = $(e.target).siblings('input[type=text]')\n    Lag.disableResultField(resultField)\n\n  $('.lag').on 'click', '.result input[type=text]', (e) ->\n    resultField = $(e.target)\n    Lag.enableResultField(resultField)\n\n  $('.lag').on 'change keyup keydown', 'input, textarea, select', (e) ->\n    $(this).addClass('changed-input')\n\n  #Only remove changed-input classes if the user is saving the form\n  #Keep changed-input classes if user is submitting the form in case\n  #there are validation errors which prevent the user\n  #from submitting.\n  $('#lag_submission_form_save').on 'click', (e) ->\n    $('.changed-input').removeClass('changed-input')\n    $('.lag').addClass('reloading')\n\n  $(window).on 'beforeunload', (e) ->\n    if $('.changed-input').length && !$('.reloading').length\n      return \"You have unsaved changes.\"\n\n  $.extend($.validations, {\n    lag_result: {\n      format: 'integer',\n      minimum: 20,\n      maximum: 43740,\n      require_value_in_group_on_submit: true,\n      allow_blank: true\n    }\n  })\n\n  $('#lag_submission_form_submit').click (e) ->\n    if confirm('Are you sure you want to submit your results? Once successfully submitted, you will no longer be able to make any changes.')\n      $('.lag').addClass('reloading')\n      Lag.validate()\n    else\n      false\n\n  window.LagComponents =\n    disableComponentOption: (componentSelects, id) ->\n      componentSelects.find(\"option[value=#{id}]\").prop('disabled', 'disabled')\n\n    enableComponentOption: (componentSelects, id) ->\n      componentSelects.find(\"option[value=#{id}]\").prop('disabled', false)\n\n    componentSelectsExcept: (componentSelect) ->\n      $(\"[data-action=removeFromOptions]\").not(componentSelect)\n\n    updateComponentSelectOptions: (componentSelect) ->\n      componentSelects = @componentSelectsExcept(componentSelect)\n      if componentSelect.data('previous-value')\n        @enableComponentOption(componentSelects, componentSelect.data('previous-value'))\n      @disableComponentOption(componentSelects, componentSelect.val())\n      componentSelect.data('previous-value', componentSelect.val())\n\n  $lag_components = $('.lag_components')\n\n  # Disable selected option and enable previously selected option on other selects\n  $lag_components.on 'change', '[data-action=removeFromOptions]', (e) ->\n    componentSelect = $(e.target)\n    LagComponents.updateComponentSelectOptions(componentSelect)\n\n  # Disable selected options on load\n  $('.lag_components [data-action=removeFromOptions]').each (index, componentSelect) ->\n    componentSelects = LagComponents.componentSelectsExcept(componentSelect)\n    LagComponents.disableComponentOption(componentSelects, $(componentSelect).val())\n\n  $lag_components.on 'nested:fieldAdded', (event) ->\n    # Disable selected options\n    componentSelect = $(event.field).find('select[data-action=removeFromOptions]')\n    $('.lag_components [data-action=removeFromOptions] option[disabled]').each (index, disabledOption) ->\n      componentSelect.find(\"option[value=#{$(disabledOption).val()}]\").prop('disabled', 'disabled')\n    # Recalculate display-order\n    recalculateAllSortableLists()\n\n  $lag_components.on 'nested:fieldRemoved', (event) ->\n    # Enable previously selected option\n    componentSelect = $(event.field).find('select[data-action=removeFromOptions]')\n    componentSelects = LagComponents.componentSelectsExcept(componentSelect)\n    LagComponents.enableComponentOption(componentSelects, componentSelect.data('previous-value'))\n    # Remove display-order hidden field and recalculate display-order\n    $(event.target).find('.display-order').remove()\n    recalculateAllSortableLists()\n\n  $(\".jquery-sortable\").sortable\n    stop: (event, ui) ->\n      recalculateDisplayOrder ui.item.parent()\n\n  recalculateDisplayOrder = (parent) ->\n    parent.find('.display-order').each (index, element) ->\n      $(element).val(index)\n\n  recalculateAllSortableLists = ->\n    $('.jquery-sortable').each ->\n      recalculateDisplayOrder($(this))\n","window.LagBiostatisticianView = do ->\n  initialized = false\n  self = {}\n\n  init = ->\n    unless initialized\n      initialized = true\n      self.panelResults = 'panel-results'\n      self.calibratorTestResults = 'calibrator-test-results'\n      self.$tabLinks = $('[data-change-tab]')\n      self.$panelResultsLink = $(\"[data-change-tab='#{self.panelResults}']\")\n      self.$calibratorTestResultsLink = $(\"[data-change-tab='#{self.calibratorTestResults}']\")\n      self.$sections = $('[data-tab-section]')\n      bindEvents()\n      activateAnchorTab()\n\n  bindEvents = ->\n    bindChangeTab()\n\n  bindChangeTab = ->\n    self.$tabLinks.click (e) ->\n      $link = $(e.target)\n      activateTab($link)\n\n  activateTab = ($link) ->\n    sectionId = $link.attr('data-change-tab')\n    $section = $(\"[data-tab-section='#{sectionId}']\")\n    self.$sections.removeClass('active')\n    self.$tabLinks.removeClass('active')\n    $link.addClass('active')\n    $section.addClass('active')\n    $('[data-active-tab-field]').val(sectionId)\n\n  activateAnchorTab = ->\n    hrefAnchor = location.hash.replace('#', '')\n    return unless hrefAnchor.length\n    if hrefAnchor == self.calibratorTestResults\n      activateTab(self.$calibratorTestResultsLink)\n    else if hrefAnchor == self.panelResults\n      activateTab(self.$panelResultsLink)\n\n\n  init: init\n\n$ ->\n  window.LagBiostatisticianView.init() if $(\"[data-attribute='lag-biostatistician-results-view']\")\n","window.LagSubmissionForm = do ->\n  initialized = false\n  self = {}\n\n  init = ->\n    unless initialized\n      initialized = true\n      self.$pasteColumns = $('[data-paste-columns]')\n      self.$naAllConfirmatory = $(\"[data-lag-submission='na-all']\")\n      self.$naConfirmatory = $(\"[data-lag-submission='na']\")\n      setInitialState()\n      attachBehaviors()\n\n  setInitialState = ->\n    disableConfirmatoryResults()\n\n  attachBehaviors = ->\n    bindPasteCalibratorColumns()\n    bindCheckNaAll()\n    bindCheckNa()\n\n  bindPasteCalibratorColumns = ->\n    self.$pasteColumns.on 'paste', ->\n      setTimeout =>\n        $input = $(@)\n        values = $input.val().split(/\\s/)\n        targetContainerId = $input.attr('data-paste-columns')\n        $targets = $('#' + targetContainerId).find('.paste-input')\n        $targets.each (i, target) =>\n          $(target).val(values[i])\n        $input.val('')\n      , 100\n\n  bindCheckNaAll = ->\n    self.$naAllConfirmatory.on 'click', (e) ->\n      $masterCheckbox = $(e.target)\n      checked = $masterCheckbox.prop('checked')\n      $checkboxes = $masterCheckbox.parents('table').find(\"[data-lag-submission='na']\")\n      $checkboxes.each (_, checkbox) ->\n        $checkbox = $(checkbox)\n        if checked\n          $checkbox.prop('checked', true)\n        else\n          $checkbox.prop('checked', false)\n        $checkbox.trigger('change')\n\n  bindCheckNa = ->\n    self.$naConfirmatory.on 'change', (e) ->\n      disableAffectedByNa($(e.target))\n\n  disableConfirmatoryResults = ->\n    self.$naConfirmatory.each (_, e) ->\n      disableAffectedByNa($(e))\n\n  disableAffectedByNa = ($checkbox) ->\n    readonly = $checkbox.is(':checked')\n    $affectedFields = $checkbox.parents('tr').find(\"[data-lag-submission='affected-by-na']\")\n    $affectedFields.prop('readonly', readonly)\n    $affectedFields.each ->\n      # this will clear fields if 'n/a' is readonly, and restore the cleared value if they uncheck 'n/a'\n      $field = $(@)\n      if readonly\n        $field.data('pre-disabled-value', $field.val())\n        $field.val('')\n      else if $field.data('pre-disabled-value')\n        $field.val($field.data('pre-disabled-value'))\n\n  init: init\n\n$ ->\n  window.LagSubmissionForm.init() if $(\"[data-lag-submission='na']\").length\n","jQuery.fn.showOption = (show) ->\n  jQuery(this).toggle show\n  if show\n    jQuery(this).unwrap()  if jQuery(this).parent(\"span.toggleOption\").length\n  else\n    jQuery(this).wrap \"<span class=\\\"toggleOption\\\" style=\\\"display: none;\\\" />\"\n\n$ ->\n  (->\n    remove_selected_options_from_siblings = (element) ->\n      # Loop through all selects that aren't this one, and disable value option and enable previous.\n      siblingSelects = element.closest(\".single-serve-options\").find(\"select\").not(element)\n      previous = element.data('previous-value')\n      value = element.find(\"option:selected\").attr(\"value\")\n\n      element.data('previous-value', value)\n      \n      for sibling in siblingSelects\n        sibling = $(sibling)\n        sid = sibling.attr('id')\n        \n        if value != ''\n          sibling.find(\"option\").filter(\"[value=#{value}]\").showOption(false)\n        if previous != '' && previous != value\n          sibling.find(\"option\").filter(\"[value=#{previous}]\").showOption(true)\n    \n    $(\".single-serve-options select\").each( ->\n      $(@).data('previous-value', $(@).find(\"option:selected\").attr(\"value\")) # Initalize the 'previous-value' for each select\n    ).each( ->\n      remove_selected_options_from_siblings($(@)) # Hide/Show the appropriate options on page load\n    ).change ->\n      remove_selected_options_from_siblings($(@)) # Hide/Show the appropriate options on select change\n  )()\n  \n$ ->\n  toggleSelectionWhenChecked = (checkbox, selector) ->\n    if checkbox.is(\":checked\")\n      $(selector).show()\n    else\n      $(selector).hide()\n  \n  invalidateCheckbox = $(\"#linearity_panel_invalidated\")\n  toggleSelectionWhenChecked(invalidateCheckbox, \"#reason-for-invalidation\")\n  invalidateCheckbox .change ->\n    toggleSelectionWhenChecked($(this), \"#reason-for-invalidation\")","$ ->\n  do initializeTabs = ->\n\n    # Set up jQuery tabs for results\n    resultsTabs = $('#results-tabs')\n    resultsTabs.tabs()\n\n    do initializeMainTabs = ->\n      $('#linearity').tabs()\n\n    do setUpLinks = ->\n      $('#linearity a[href=\"#replicate2\"]').click ->\n        resultsTabs.tabs('option', 'active', 2)\n      $('#linearity a[href=\"#replicate1\"]').click ->\n        resultsTabs.tabs('option', 'active', 1)\n\n\n  do initializeCheckboxes = ->\n    toggleCheckboxesInRow = ->\n      checkboxElement = $(@)\n\n      thisRow = checkboxElement.closest('tr')\n      thisRowType = thisRow.data('row-type')\n\n      form = checkboxElement.closest('form')\n      allRows = form.find(\"tr[data-row-type='#{thisRowType}']\")\n      allBlankRows = allRows.filter ->\n        uncheckedBoxes = $(@).find('input[type=checkbox]').not(checkboxElement).filter ->\n          $(@).prop('checked')\n        uncheckedBoxes.length == 0\n      otherCheckboxes = allBlankRows.find('input[type=checkbox]').not(checkboxElement)\n      if checkboxElement.prop('checked')\n        otherCheckboxes.prop('checked', true)\n      else\n        otherCheckboxes.prop('checked', false)\n    # Removed per conversation with Justin 12/11/13\n    #first_checkbox_in_row = $(\".linearity-replicate tr\").find(\".premixed_mab:first\")\n    #not_first_checkbox_in_row = $(\".linearity-replicate tr\").find(\".premixed_mab\").not(first_checkbox_in_row)\n    #not_first_checkbox_in_row.addClass('disabled')\n    #not_first_checkbox_in_row.click (event) ->\n    #  event.stopPropagation()\n    #  event.preventDefault()\n    #  return false\n    $('.linearity-replicate tr').find(\".premixed_mab:first\").click(toggleCheckboxesInRow)\n\n\n  do initializeSelects = ->\n    toggleOtherSelects = ->\n      selectElement = $(@)\n      selectedValue = $(@).val() # I don't think this is the correct way to get the value?\n\n      thisRow = selectElement.closest('tr')\n      thisRowType = thisRow.data('row-type')\n\n\n      form = selectElement.closest('form')\n      allRows = form.find(\"tr[data-row-type='#{thisRowType}']\")\n      allBlankRows = allRows.filter ->\n        filledSelects = $(@).find('select').not(selectElement).filter ->\n          $(@).val() != ''\n        filledSelects.length == 0\n\n      otherSelects = allBlankRows.find('select').not(selectElement)\n\n      otherSelects.val(selectedValue)\n\n    $('.linearity-replicate select').change(toggleOtherSelects)\n\n\n  do initializeSectionVisibility = ->\n    if gon?\n      do hideSections = ->\n        hide = (el) ->\n          $(el).hide()\n          $(el).removeClass('warn-on-empty')\n        hide el for el in gon.all_mapped_elements\n\n      do showSections = ->\n        # It would be nice to call $(@).val() instead, but `this` is undefined when\n        # this is a self-executing function.\n        platform = $('#platform').val()\n        elementsToShow = gon.platform_mapping[platform]\n\n        show = (el) ->\n          $(el).show()\n          $(el).addClass('warn-on-empty')\n        show el for el in elementsToShow if elementsToShow?\n\n      $('#platform').change(hideSections)\n      $('#platform').change(showSections)\n\n  do initializeSiteSwitcher = ->\n    $('#site-switcher').change ->\n      siteSwitcher = $(this)\n      siteId = siteSwitcher.val()\n      window.location.href = '/linearity/sites/' + siteId\n\n\n  do initializeSubmit = ->\n    do bindSubmitTypeListener = ->\n      buttons = $('#linearity-result').find('input[type=submit]')\n      buttons.click ->\n        submitType = $(@).data('submit-type')\n        $('#submit-type').val(submitType)\n\n    warnOfInvalidData = ->\n      valid = true\n      $(\".field-with-validation:visible\").each ->\n        $.before_validation($(@))\n        if !$.validate($(this))\n          valid = false\n      alert 'The results contain errors. Please review entries before saving.' unless valid\n      valid\n\n    warnOfEmptyFields = ->\n\n      emptyFields = ->\n        platform = $('#platform').val()\n        selectors = gon.platform_mapping[platform] || gon.all_mapped_elements\n        filters = ['.warn-on-empty input[type=text]', '.warn-on-empty select']\n        allEmptyEntries(selectors, filters)\n\n      fieldCount = ->\n        emptyFields().length\n\n      anyEmptyFields = ->\n        fieldCount() > 0\n\n      tabs_missing_data = emptyFields().map (index, field) ->\n        tab_id = $(field).closest(\".linearity_results_tab\").attr('id')\n        $(\".ui-tabs-nav li a[href='#\"+tab_id+\"']\").first().html()\n      tabs_missing_data = unique(tabs_missing_data.toArray())\n\n      if anyEmptyFields()\n        return confirm '' + fieldCount() + ' fields are blank in the following sections: ' + tabs_missing_data.join(\", \") + '. Are you sure you want to submit this data?'\n      else\n        return true\n\n    $('#linearity-result').submit ->\n      formatPercentages()\n      unless $('#submit-type').val() is 'draft'\n        return warnOfInvalidData() and warnOfEmptyFields() and confirm \"Are you ready to submit your results? Once submitted, results cannot be changed.\"\n\n\n  do formatPercentages = ->\n    $('.percentage').each -> $.convert_number_to_float($(@), 2)\n\n  do disableFormIfNecessary = ->\n    if gon?\n      if gon.enable_form? and gon.enable_form is false\n        $.disable_form()\n\n  $.extend($.validations, {\n    integer: $.standard_integer,\n    percentage: $.extended_float,\n    absolute: $.medium_string\n  })\n","$(document).ready ->\n  #\n\n  # Add shelfs to the form.\n  $('.add-shelf').on \"click\", (e) ->\n    e.preventDefault()\n    template = $(\".shelf-entry:last\").clone()\n    template.find(\"input:text\").val \"\"\n    template.adjust_rails_form_fields($(\".shelf-entry\").length)\n    $(\".shelf-entry:last\").after template\n    # If there isn't a discard button on the first shelf, then add one.\n    if $(\".shelf-entry:first\").children(\".discard\").children().length == 0\n      $(\".shelf-entry:first\").children(\".discard\").append('<a class=\"delete-link remove-shelf\">Remove</a>')\n      $(\".shelf-entry:last\").children(\".discard\").append('<a class=\"delete-link remove-shelf\">Remove</a>')\n\n  # Remove shelfs from the form.\n  $('.remove-shelf').on \"click\", (e) ->\n    e.preventDefault()\n    self = $(e.target)\n    self.parent().parent().remove()\n    # If there is only one shelf, then remove the ability to remove it. We\n    # cannot allow all of the shelfs to be removed since we use them as a\n    # template for new shelfs.\n    if $(\".shelf-entry\").length == 1\n      $(\".shelf-entry:first\").children(\".discard\").children().remove()\n\n  $('#location_id').on \"change\", (e) ->\n    selectedLocation= $(e.currentTarget)\n    locationShelves = getShelf(selectedLocation.val())\n    populateShelves(selectedLocation.parent().parent(), locationShelves, selectedLocation.val())\n\n  getShelves = () ->\n    JSON.parse($(\"#locations\").val())\n\n  getShelf = (locationId) ->\n    getShelves()[locationId]\n\n  populateShelves = (parent, shelves, selectedValue) ->\n    parent.children().children(\".selected_shelf\").children().remove()\n    for shelf in shelves\n      parent.children().children(\".selected_shelf\").append(\"<option value='#{shelf[1]}'>#{shelf[0]}</option>\")\n","window.Modals =\n  modals: {}\n  defaultModalSettings:\n    autoOpen: false\n    modal: true\n    height: 600\n    width: 750\n  newItemModalSettings:\n    autoOpen: false\n    modal: true\n    height: 200\n    width: 750\n\n  initReagentModal: ->\n    @modals.reagentModal = $(\"#reagent_modal\")\n    @modals.reagentModal.dialog @defaultModalSettings\n\n  initItemFromKitModal: ->\n    @modals.itemFromKitModal = $(\"#item_from_kit_modal\")\n    @modals.itemFromKitModal.dialog @defaultModalSettings\n\n  initOrdersModal: ->\n    @modals.ordersModal = $(\"#orders_modal\")\n    @modals.ordersModal.dialog @defaultModalSettings\n\n  initSpecimenModal: ->\n    @modals.specimenModal = $(\"#specimen_modal\")\n    specimenModalSettings = $.extend {\n      open: ->\n        form = $(this).find(\"form\")[0]\n        form.dispatchEvent(new Event(\"submit\", { bubbles: true, cancelable: true }))\n    }, @defaultModalSettings\n    @modals.specimenModal.dialog specimenModalSettings\n\n  initNewItemModal: ->\n    @modals.newItemModal = $(\"#new-inventory-item-modal\")\n    @modals.newItemModal.dialog @newItemModalSettings\n\n  initItemConcentrationModal: ->\n    @modals.itemConcentrationModal = $('#item-concentration-dilution-modal')\n    @modals.itemConcentrationModal.dialog @newItemModalSettings\n\n  initPlateInfoModal: ->\n    @modals.plateInfoModal = $('#plate-info-modal')\n    @modals.plateInfoModal.dialog @newItemModalSettings\n\n  initEditAssayCommentModal: ->\n    @modals.editAssayCommentModal = $('#edit-assay-comment-modal')\n    @modals.editAssayCommentModal.dialog @newItemModalSettings\n\n  showReagentModal: (e) ->\n    e.preventDefault()\n\n    unless Modals.modals.reagentModal\n      Modals.initReagentModal()\n\n    populateBridgingResults Modals.modals.reagentModal, []\n    Modals.modals.reagentModal.dialog 'open'\n\n    fields = [\n      '#reagent_modal [data-filter=\"name\"]'\n      '#reagent_modal [data-filter=\"lot-number\"]'\n    ]\n    $(fields.join(', ')).on \"keyup\", (ev) ->\n      searchFields = [\"name\", \"lot_number\"]\n      populateBridgingResults Modals.modals.reagentModal, searchFields\n\n  showItemFromKitModal: (e) ->\n    e.preventDefault()\n\n    unless Modals.modals.itemFromKitModal\n      Modals.initItemFromKitModal()\n\n    populateBridgingResults(Modals.modals.itemFromKitModal, [])\n    Modals.modals.itemFromKitModal.dialog 'open'\n\n    $('#kit_name, #part_name').on \"keyup\", (e) ->\n      searchFields = [\"kit_name\", \"part_name\", \"part_type\"]\n      populateBridgingResults(Modals.modals.itemFromKitModal, searchFields )\n\n    $('#part_type').on \"change\", (e) ->\n      searchFields = [\"kit_name\", \"part_name\", \"part_type\"]\n      populateBridgingResults(Modals.modals.itemFromKitModal, searchFields )\n\n  showOrdersModal: (e) ->\n    e.preventDefault()\n\n    unless Modals.modals.ordersModal\n      Modals.initOrdersModal()\n\n    Modals.modals.ordersModal.dialog 'open'\n\n  showSpecimenModal: (e) ->\n    e.preventDefault()\n\n    unless Modals.modals.specimenModal\n      Modals.initSpecimenModal()\n\n    Modals.modals.specimenModal.dialog 'open'\n\n  showNewItemModal: (e) ->\n    e.preventDefault()\n\n    unless Modals.modals.newItemModal\n      Modals.initNewItemModal()\n\n    Modals.modals.newItemModal.dialog 'open'\n\n  showItemConcentrationModal: ($row) ->\n\n    unless Modals.modals.itemConcentrationModal\n      Modals.initItemConcentrationModal()\n\n    Modals.modals.itemConcentrationModal.dialog 'open'\n\n    $('#item-concentration-dilution-modal').data 'row', $row\n\n  showPlateInfoModal: ($plate, action) ->\n\n    unless Modals.modals.plateInfoModal\n      Modals.initPlateInfoModal()\n\n    Modals.modals.plateInfoModal.dialog 'open'\n\n    $modal = $('#plate-info-modal')\n    $modal.data 'plate', $plate\n    $modal.data 'action', action\n\n  resetPlateInfoData: ->\n    $modal = $('#plate-info-modal')\n    $modal.data 'plate', null\n    $modal.data 'action', null\n    $modal.data 'originalPlate', null\n\n  showEditAssayCommentModal: ->\n    unless Modals.modals.EditAssayCommentModal\n      Modals.initEditAssayCommentModal()\n\n    Modals.modals.editAssayCommentModal.dialog 'open'\n\n  hideItemConcentrationModal: ->\n    if Modals.modals.itemConcentrationModal\n      Modals.modals.itemConcentrationModal.dialog 'close'\n\n  hidePlateInfoModal: ->\n    if Modals.modals.plateInfoModal\n      Modals.modals.plateInfoModal.dialog 'close'\n\n  hideEditAssayCommentModal: ->\n    if Modals.modals.editAssayCommentModal\n      Modals.modals.editAssayCommentModal.dialog 'close'\n\n$(document).ready ->\n## Listeners ##\n  $('#add_reagent_link').on \"click\", Modals.showReagentModal\n  $('#add_item_from_kit_link').on \"click\", Modals.showItemFromKitModal\n  $(\"#add_item_from_orders_link\").on \"click\", Modals.showOrdersModal\n  $('#add_specimen_link').on \"click\", Modals.showSpecimenModal\n\n  $(document).on \"click\", \".add_reagent_link\", (e) ->\n    e.preventDefault()\n    link = $(e.currentTarget)\n    resultId = link.closest('tr').attr('id')\n    sectionType = link.attr('id') # \"new\", \"old\", or \"test\"\n    resultName = link.closest('tr').find('.result_name').html()\n    if not resultType = link.closest('tr').children('#part_type').html()\n      resultType = 'Lot'\n    insertReagentIntoForm(sectionType, resultId, resultName, resultType)\n\n  $(document).on \"click\", \".add_specimen_link\", (e) ->\n    e.preventDefault()\n    link = $(e.currentTarget)\n    resultId = link.closest('div.reagent-fields').children('#specimen_id').html()\n    sectionType = link.attr('id') # \"new\", \"old\", or \"test\"\n    resultName = link.closest('div.reagent-fields').children('#result_name').html()\n    resultType = 'Specimen'\n    insertReagentIntoForm(sectionType, resultId, resultName, resultType)\n\n\n  $(document).on \"click\", \".add_item_from_order_link\", (e) ->\n    e.preventDefault()\n    link = $(e.currentTarget)\n    reagentId = link.closest('div.reagent-fields').data('reagent-id')\n    section = link.attr('id') # \"new\", \"old\", or \"test\"\n    reagentName = link.closest('div.reagent-fields').data('reagent-name')\n    reagentType = link.closest('div.reagent-fields').data('reagent-type')\n    insertReagentIntoForm(section, reagentId, reagentName, reagentType)\n\n## Functions ##\n\npopulateBridgingResults = (reagentSection, searchFields) ->\n  clearBridgingResults(reagentSection)\n  hiddenResults = reagentSection.children(\"#hidden_info\").val()\n  results = JSON.parse(hiddenResults)\n  for result in results\n    if resultMatches(result, searchFields, reagentSection)\n      resultRow = resultRowHtml(result, reagentSection)\n      reagentSection.find(\"#results\").find(\"tbody\").append(resultRow)\n\nclearBridgingResults = (reagentSection) ->\n  reagentSection.find(\"#results\").find(\"tbody\").children().not(\"#header_row\").remove()\n\nresultMatches = (result, searchFields, reagentSection) ->\n  matches = true\n  for searchField in searchFields\n    if not filterMatch(result[searchField], reagentSection.find(\"##{searchField}\").val())\n      matches = false\n  matches\n\nresultRowHtml = (result, reagentSection) ->\n  rowHtml = \"<tr id='#{result.id}'>\"\n  buttonClasses = \"\"\n  if (reagentSection.attr(\"id\") == \"item_from_kit_modal\")\n    rowHtml += \"<td>#{result.kit_name}</td>\"\n    rowHtml += \"<td id='part_type' data-part-type='#{result.part_type}'>#{result.part_type}</td>\"\n    rowHtml += \"<td class='result_name' data-result-name='#{result.part_name}'>#{result.part_name}</td>\"\n    rowHtml += \"<input type='hidden' data-number-identifier value=#{result.part_number_identifier}>\"\n    buttonClasses += \"add_from_kit_link\"\n  else\n    rowHtml += \"<td class='result_name' data-result-name='#{result.name}'>#{result.name}</td>\"\n    rowHtml += \"<td data-lot-number='#{result.lot_number}'>#{result.lot_number}</td>\"\n  rowHtml += \"<td>\"\n  rowHtml += \"<a href='#' id='old' class='add_reagent_link add-link #{buttonClasses}'>Old</a>\"\n  rowHtml += \"<a href='#' id='new' class='add_reagent_link add-link #{buttonClasses}'>New</a>\"\n  rowHtml += \"<a href='#' id='test' class='add_reagent_link add-link #{buttonClasses}'>Test</a>\"\n  rowHtml += \"</td></tr>\"\n  rowHtml\n\nfilterMatch = (objString, filterString) ->\n  patt = new RegExp(filterString, \"gi\");\n  patt.test(objString)\n\n# This will add a qualifying study reagent into either new, old, or test.\ninsertReagentIntoForm = (section, reagentId, reagentName, reagentType) ->\n  # reagentType = \"Lot\" #if section == \"test\" then \"Specimen\" else \"Lot\"\n\n  # Copy template form and adjust as necessary\n  template = $(\"##{section}_qualifying_study_reagents .new-row:last\").clone()\n  template.find(\"input.reagent_id\").val(reagentId)\n  template.find(\"input.reagent_type\").val(reagentType)\n  template.find(\".reagent_name\").html(reagentName)\n  template.find('input.destroy_field').val(false)\n  index = $(\"##{section}_qualifying_study_reagents\").find(\"div.reagent-fields\").length\n  template.attr(\"id\", \"#{index}\")\n  template.adjust_rails_form_fields(index)\n  $(\"##{section}_qualifying_study_reagents\").append(template)\n  template.show()\n","$ ->\n  $('a.note-flag').on \"click\", (e) ->\n    e.preventDefault()\n    self = $(e.target)\n    parent = self.parent()\n    $.get self.attr(\"href\"), {}, ->\n      if(self.text() == \"Flag\")\n        parent.closest(\".note\").addClass(\"flagged\")\n        parent.prev().after(\"<img src='/images/flag.png' class='flag' />\")\n        self.text(\"Remove Flag\")\n      else\n        parent.closest(\".note\").removeClass(\"flagged\")\n        parent.prev().remove()\n        self.text(\"Flag\")\n\n  $('.tipsy').tipsy(html: true)\n","$(document).ready ->\n  class ReagentVolumes\n    constructor: ->\n      @reagents = $.parseJSON($('#reagent_volumes').val()) if $('#reagent_volumes').length > 0\n      @overOrderWarning = $('#over-aliquoted')\n    getAvailableQuantity = ->\n      parseInt($(\"#order_reagent_available_quantity\").text())\n    setAvailableQuantity = (availableQuantity) ->\n      $(\"#order_reagent_available_quantity\").text(availableQuantity)\n    setId = (id) ->\n      $(\"#reagent-volumes-id\").val(id)\n    updateQuantity: ->\n      id = $(\"#reagent_volume_id\").val()\n      setAvailableQuantity(@reagents[id])\n    updateId: ->\n      id = $(\"#reagent_volume_id\").val()\n      setId(id)\n    getRequestedQuantity = ->\n      parseInt($(\"#order_item_quantity\").val())\n    checkForOverOrder: =>\n      if getAvailableQuantity() < getRequestedQuantity()\n        @overOrderWarning.fadeIn()\n        return true\n      else\n        @overOrderWarning.fadeOut()\n        return false\n\n  reagent_volumes = new ReagentVolumes()\n\n\n  ## Event Handlers\n  $('#reagent_volume_id').on \"change\",  (e) ->\n    reagent_volumes.updateQuantity()\n    reagent_volumes.updateId()\n    reagent_volumes.checkForOverOrder()\n\n  $('#order_item_quantity').on \"keyup\",  (e) ->\n    reagent_volumes.checkForOverOrder()\n\n  $(\".order_reagents_form\").submit ->\n    not reagent_volumes.checkForOverOrder()\n","$ ->\n  window.PerformanceReport =\n    bindEvents: ->\n      @createExportToCsvLinks()\n      @createGoBackLinks()\n\n    createExportToCsvLinks: ->\n      for csvExportLink in $('.js-csv_export')\n        $csvExportLink = $(csvExportLink)\n        reportUrl      = $csvExportLink.attr('id')\n        reportType     = $csvExportLink.attr('href').split('/')\n        reportParams   = \"&report_type=#{reportType[0]}&criteria=#{reportType[1] || ''}\"\n        csvExportUrl   = window.location.href.replace((new RegExp(reportUrl)), \"#{reportUrl}.csv\") + reportParams\n        $csvExportLink.attr('href', csvExportUrl)\n\n    createGoBackLinks: ->\n      for goBackLink in $('.js-go_back')\n        $goBackLink = $(goBackLink)\n        goBackUrl = $goBackLink.attr('href') + window.location.search\n        $goBackLink.attr('href', goBackUrl)\n\n  window.PerformanceReport.bindEvents() if !!$('.js-csv_export, .js-go_back').length\n","$ ->\n  window.PerformanceReportForm =\n    programId: null\n    report_type: 'site_report'\n    kit_url: \"/performance_reports/kit_types\"\n    ep_url: \"/performance_reports/eps\"\n    performance_url: \"/performance_reports/criteria\"\n    site_url: \"/performance_reports/sites\"\n\n    bindEvents: ->\n      @disableSubmitButton()\n      @bindSelectProgram()\n      @bindSelectKit()\n      @bindSelectEps()\n      @bindSelectPerformance()\n      @bindSelectSites()\n      @bindSiteDetailSwitch()\n      @bindSubmitPerformanceReport()\n      @highlightFieldsOnSelect()\n      @disableFieldsWithDependencies()\n      @backfillFormFromUrlParameters('program_id')\n\n    disableSubmitButton: ->\n      $('.report_submit input[type=submit]').attr('disabled', 'disabled').addClass('disabled')\n\n    bindSelectProgram: ->\n      $(\"#performance_report_program_id\").select2(width: 'resolve')\n      $(\"#performance_report_program_id\").on 'change backfill', (event) =>\n        programId = $(event.currentTarget).val()\n        @setProgramId programId\n        @fetchKitOptions programId\n        @clearField($(\"#performance_report_ep_ids\"), 'ep_ids')\n        $('.report_submit input[type=submit]').removeAttr('disabled').removeClass('disabled')\n\n    bindSelectKit: ->\n      $kitTypeFields = $(\"#performance_report_kit_types\")\n      $kitTypeFields.select2(data: [], width: 'resolve', multiple: true)\n      $kitTypeFields.on 'change backfill', (event) =>\n        @clearField($(\"#performance_report_ep_ids\"), 'ep_ids')\n        @fetchEpOptions @programId, $(event.currentTarget).val().split(\",\")\n\n    bindSelectEps: ->\n      $epFields = $(\"#performance_report_ep_ids\")\n      $epFields.select2(data: [], width: 'resolve', multiple: true)\n      $epFields.on 'change backfill', (event) =>\n        @fetchPerformanceOptions @programId\n        @fetchSiteOptions $(event.currentTarget).val()\n        @backfillSwitchFromUrlParameters('show_site_details')\n\n    bindSelectPerformance: ->\n      $(\"#performance_report_criteria_names\").select2(data: [], width: 'resolve')\n\n    bindSelectSites: ->\n      $(\"#performance_report_site_ids\").select2(data: [], width: 'resolve', multiple: true)\n\n    bindSiteDetailSwitch: ->\n      $detailCheckbox = $('#performance_report_show_site_details')\n      $('.switch .yes').on 'click', (event) =>\n        @report_type = 'site_report'\n        $detailCheckbox.prop('checked', true)\n        $('.switch .no').removeClass('active')\n        $(event.currentTarget).addClass('active')\n        $(\"#performance_report_site_ids\").select2(\"enable\", true)\n        $(\"#performance_report_site_ids\").parents('dl').removeClass('js-disabled').addClass('active')\n      $('.switch .no').on 'click', (event) =>\n        @report_type = 'overall_report'\n        $('.switch .yes').removeClass('active')\n        $(event.currentTarget).addClass('active')\n        $detailCheckbox.prop('checked', false)\n        $(\"#performance_report_site_ids\").select2(\"enable\", false)\n        $(\"#performance_report_site_ids\").parents('dl').addClass('js-disabled')\n\n    bindSubmitPerformanceReport: ->\n      $('form[name=form-performance_report]').submit (e) => @updateFormAction($(e.currentTarget))\n\n    highlightFieldsOnSelect: ->\n      $('input[type=hidden], select').on 'select2-open', (event) ->\n        $('dl.report_field').removeClass('active')\n        $(event.currentTarget).parents('dl').addClass('active')\n      $('input[type=hidden], select').on 'select2-blur', (event) ->\n        $(event.currentTarget).parents('dl').removeClass('active')\n\n    disableFieldsWithDependencies: ->\n      # https://groups.google.com/forum/#!topic/select2/RjJcxghMXRM\n      # when they have .select2-hidden-accessible it means select2 is initialized\n      $(\"dl.js-disabled\").find('input').select2(\"enable\", false)\n\n    backfillFormFromUrlParameters: (paramName) ->\n      parameters = @urlParameters()\n      paramVal = parameters[\"performance_report[#{paramName}]\"]\n      if paramVal\n        if paramVal.indexOf(\"+\") != -1\n          paramVal = paramVal.replace(/\\+/g, ' ')\n        if paramName.indexOf(\"_ids\") != -1 || paramName.indexOf(\"criteria_names\") != -1 || paramName.indexOf(\"kit_types\") != -1\n          paramVal = paramVal.split(',')\n        $(\"#performance_report_#{paramName}\").select2('val', paramVal)\n        $(\"#performance_report_#{paramName}\").trigger('backfill')\n\n    backfillSwitchFromUrlParameters: (paramName) ->\n      parameters = @urlParameters()\n      paramVal = parameters[\"performance_report[#{paramName}]\"]\n      if paramVal\n        $(\"#site_details_switch a.yes\").addClass('active')\n        $(\"#site_details_switch a.no\").removeClass('active')\n        $(\"#performance_report_show_site_details\").prop('checked', true)\n      else\n        $(\"#site_details_switch a.yes\").removeClass('active')\n        $(\"#site_details_switch a.no\").addClass('active')\n        $(\"#performance_report_show_site_details\").prop('checked', false)\n\n    setProgramId: (id) ->\n      @programId = id\n\n    fetchKitOptions: (id) ->\n      $.getJSON \"#{@kit_url}?program_id=#{id}\", (kits) =>\n        display = \"block\"\n        if !kits.length\n          display = \"none\"\n          @fetchEpOptions(id)\n        $(\"#performance_report_kit_types\").parents('dl').css(display: display)\n        kits = ({id: kit, text: kit} for kit in kits)\n        $(\"#performance_report_kit_types\").select2\n          data: kits\n          width: 'resolve'\n          multiple: true\n        $(\"#performance_report_kit_types\").select2(\"enable\", true)\n        $('dl').removeClass('active')\n        $(\"#performance_report_kit_types\").parents('dl').removeClass('js-disabled').addClass('active')\n        $(\"#performance_report_ep_ids\").select2(\"enable\", false)\n        $(\"#performance_report_ep_ids\").parents('dl').addClass('js-disabled')\n        @backfillFormFromUrlParameters('kit_types')\n\n    epName: (name, kitType) ->\n      name = \"EP#{name} \"\n      kitType = kitType || \"\"\n\n      if kitType == \"EQAPOL\"\n        return name\n      else\n        return name + kitType\n\n    fetchEpOptions: (id, kitTypes=[]) ->\n      kitParams = @parameterizeKitTypes(kitTypes)\n      $.getJSON \"#{@ep_url}?program_id=#{id}#{kitParams}\", (eps) =>\n        eps = ({id: ep.id, text: @epName(ep.name, ep.kitType)} for ep in eps)\n        $(\"#performance_report_ep_ids\").select2\n          data: eps\n          width: 'resolve'\n          multiple: true\n        $(\"#performance_report_ep_ids\").select2(\"enable\", true)\n        $('dl').removeClass('active')\n        $(\"#performance_report_ep_ids\").parents('dl').removeClass('js-disabled').addClass('active')\n        $(\"#performance_report_criteria_names\").select2(\"enable\", false)\n        $(\"#performance_report_criteria_names\").parents('dl').addClass('js-disabled')\n        $(\"#performance_report_site_ids\").select2(\"enable\", false)\n        $(\"#performance_report_site_ids\").parents('dl').addClass('js-disabled')\n        @backfillFormFromUrlParameters('ep_ids')\n\n    parameterizeKitTypes: (kitTypes=[]) ->\n      params = ''\n      (params += \"&kit_types[]=#{kit}\" if kit.length) for kit in kitTypes\n      params\n\n    fetchPerformanceOptions: (id) ->\n      $.getJSON \"#{@performance_url}?program_id=#{id}\", (criteria) =>\n        allPerformanceCriteria = (criterion.name for criterion in criteria)\n        allPerformanceCriteria.push('Overall')\n        allPerformanceCriteria = allPerformanceCriteria.join()\n        criteria = ({id: criterion.name, text: \"#{criterion.name}\"} for criterion in criteria)\n        criteria.unshift({id: \"Overall\", text: \"Overall\"})\n        criteria.unshift({id: allPerformanceCriteria, text: \"All Performance Criteria\"})\n        $(\"#performance_report_criteria_names\").select2\n          data: criteria\n          width: 'resolve'\n        $(\"#performance_report_criteria_names\").select2(\"enable\", true)\n        $(\"#performance_report_criteria_names\").select2(\"val\", allPerformanceCriteria)\n        $('dl').removeClass('js-disabled').removeClass('active')\n        if $('.switch .no').hasClass(\"active\")\n          $(\"#performance_report_site_ids\").parents('dl').addClass('js-disabled')\n        $(\"#performance_report_criteria_names\").parents('dl').addClass('active')\n        @backfillFormFromUrlParameters('criteria_names')\n        @backfillFormFromUrlParameters('site_ids')\n\n    fetchSiteOptions: (ep_id) ->\n      $.getJSON \"#{@site_url}?ep_id=#{ep_id}\", (sites) =>\n        sites = ({id: site.id, text: \"#{site.site_number}\"} for site in sites)\n        $(\"#performance_report_site_ids\").select2\n          data: sites\n          width: 'resolve'\n          multiple: true\n        if $('.switch .yes').hasClass(\"active\")\n          $(\"#performance_report_site_ids\").select2(\"enable\", true)\n          @backfillFormFromUrlParameters('site_ids')\n\n    updateFormAction: ($form) ->\n      submitUrl = window.location.href.replace(/new/, \"#{@programId}/#{@report_type}\")\n      formParams = $form.serialize()\n      $form.attr('action', \"#{submitUrl}?#{formParams}\")\n\n    urlParameters: ->\n      search = location.search.substring(1)\n      return {} unless !!search.length\n      search = decodeURI(search).replace(/&/g, '\",\"').replace(/\\=/g,'\":\"')\n      return JSON.parse \"{\\\"#{search}\\\"}\", (key, value) ->\n        return value unless !!key.length\n        return decodeURIComponent(value)\n\n    clearField: ($field, backfill) ->\n      $field.select2(data: [], width: 'resolve', multiple: true)\n      $field.val('')\n      @backfillFormFromUrlParameters(backfill)\n\n  window.PerformanceReportForm.bindEvents() if $('.new_performance_report').length > 0\n","$ ->\n  window.PlateTools =\n    importWellResultsUrl: \"/plates_for_assay_wells/import_well_data\"\n    removePlateUrlPrefix: \"/plates_for_assays/\"\n    duplicatePlateUrlPattern: \"/plates_for_assays/plate_id/duplicate\"\n\n    initialize: () ->\n      @bindPlateToolsMenu()\n      @showPlate()\n\n    bindPlateToolsMenu: () ->\n      $('[data-form-for-assay]').on 'change', '[data-plate-tools-menu]', (event) =>\n        $plateToolsMenu = $(event.target)\n        $selectedAction = $plateToolsMenu.find('option:selected')\n\n        actionName = $selectedAction.data(\"plate-tools-action\")\n\n        $plateContainer = $plateToolsMenu.closest('[data-assay-plate-container]')\n        $plateContainer.find('[data-plate-results-file]').hide()\n        @clearPlateToolsMessage($plateContainer)\n\n        @disablePlateToolsMenu($plateToolsMenu)\n        @_handlePlateToolsAction(actionName, $plateContainer)\n        @_resetPlateToolsMenu($plateToolsMenu)\n\n    showPlate: () ->\n      if window.location.search.replace('?', '').split('=').indexOf('plates') > -1\n        $('#assay_tabs').tabs('select', 1)\n\n    # Helpers\n    _plateContainer: (subcontainer) ->\n      $(subcontainer).closest('[data-assay-plate-container]')\n\n    _handlePlateToolsAction: (actionName, plateContainer) ->\n      $plateContainer = $(plateContainer)\n      switch actionName\n        when \"import-results-file\" then @_handleImportResultsFile($plateContainer)\n        when \"remove-results\" then @_handleRemoveResults($plateContainer)\n        when \"remove-plate\" then @_handleRemovePlate($plateContainer)\n        when \"duplicate-plate\" then @_handlePlateDuplication($plateContainer)\n\n    enablePlateToolsMenu: (plateToolsMenu) ->\n      $(plateToolsMenu).prop('disabled', false)\n\n    enablePlateToolsMenuInContainer: (plateToolsMenuContainer) ->\n      $plateToolsMenu = $(plateToolsMenuContainer).find('[data-plate-tools-menu]')\n      @enablePlateToolsMenu($plateToolsMenu)\n\n    disablePlateToolsMenu: (plateToolsMenu) ->\n      $(plateToolsMenu).prop('disabled', true)\n\n    disablePlateToolsMenuInContainer: (plateToolsMenuContainer) ->\n      $plateToolsMenu = $(plateToolsMenuContainer).find('[data-plate-tools-menu]')\n      @disablePlateToolsMenu($plateToolsMenu)\n\n    _resetPlateToolsMenu: (plateToolsMenu) ->\n      $(plateToolsMenu).find('[data-plate-tools-label-option]').prop('selected', 'selected')\n\n    # Plate tools messages\n    clearPlateToolsMessage: (container) ->\n      @_setPlateToolsMessage(container, '')\n\n    _setPlateToolsMessage: (container, message) ->\n      @_plateToolsMessageContainer(container).html(message)\n\n    _setPlateResultsFileMessage: (container, message) ->\n      @_plateResultsFileContainer(container).html(message)\n\n    _plateToolsMessageContainer: (supercontainer) ->\n      $(supercontainer).find('[data-plate-tools-messages]')\n\n    _plateResultsFileContainer: (supercontainer) ->\n      $(supercontainer).find('[data-plate-results-file-message]')\n\n    setNewPlatePlateToolsDisabledMessage: (plateContainer) ->\n      @_setPlateToolsMessage(plateContainer, 'Plate tools is temporarily disabled while the plate is being created.')\n\n    _setRemovingPlateMessage: (plateContainer) ->\n      @_setPlateToolsMessage(plateContainer, 'Removing plate...')\n\n    _setSuccessfulImportResultsMessage: (plateContainer) ->\n      @_setPlateToolsMessage(plateContainer, 'Results have been successfully imported but will not be saved until the `Update` button is clicked.')\n\n    _setDuplicatingPlateMessage: (plateContainer) ->\n      @_setPlateToolsMessage(plateContainer, 'Duplicating plate...')\n\n    _setSuccessfulPlateDuplicationMessage: (plateContainer) ->\n      @_setPlateToolsMessage(plateContainer, 'Plate duplicated successfully.')\n\n    _setSuccessfulRemoveResultsMessage: (plateContainer) ->\n      @_setPlateToolsMessage(plateContainer, 'Results have been successfully removed but will not be saved until the `Update` button is clicked.')\n\n    # Duplicate plate\n    _handlePlateDuplication: (plateContainer) ->\n      if @_warnUnsavedWellChanges(plateContainer)\n        @_setDuplicatingPlateMessage(plateContainer)\n\n        $clonePlateContainer = PlateTools._duplicatePlateInUi(plateContainer)\n        $plate = $clonePlateContainer.find('.assay-plate-wells')\n\n        @disablePlateToolsMenuInContainer($clonePlateContainer)\n        PlateTools.setNewPlatePlateToolsDisabledMessage($clonePlateContainer)\n        Modals.showPlateInfoModal $plate, 'duplicate'\n        $('#plate-info-modal').data 'originalPlate', plateContainer\n      else\n        @enablePlateToolsMenuInContainer(plateContainer)\n\n    duplicatePlate: (e) ->\n      e.preventDefault()\n\n      $form = $(e.currentTarget).closest('.assay-plate-info-fields')\n      [lotNumber, uniqueId] = Assays.getPlateInfoFormData $form\n\n      $modal = $('#plate-info-modal')\n      $plate = $modal.data 'plate'\n      $plateContainer = $plate.closest('.assays-plate')\n      $originalPlate = $modal.data('originalPlate')\n\n      Modals.hidePlateInfoModal()\n      Assays.resetPlateInfoForm $form\n\n      duplicatePlateUrl = PlateTools._duplicatePlateUrlForPlate($originalPlate)\n      dataToSend =\n        lot_number: lotNumber\n        unique_id: uniqueId\n      $.ajax(\n        url: duplicatePlateUrl\n        type: \"POST\"\n        data: dataToSend\n        dataType: 'json'\n      ).done((data, textStatus, jqXHR) ->\n        if data.error_messages.length  > 0\n          $plateContainer.remove()\n          alert(\"Error: Unable to duplicate plate. #{data.error_messages}\")\n        else\n          Assays.setPlateInfo $plateContainer, lotNumber, uniqueId\n          PlateTools._updateDuplicatedFieldsWithDatabaseIds($plateContainer, data)\n          PlateTools._updateAssayInventoryItemsForWells(data)\n          PlateTools._updateNameAndIdAttributesForDuplicatedFields($plateContainer, data)\n\n          Assays.refreshWellContentDisplay($plateContainer)\n          Assays.resetPlateInfoForm $form\n          PlateTools._setSuccessfulPlateDuplicationMessage($plateContainer)\n          PlateTools.enablePlateToolsMenuInContainer($plateContainer)\n\n        $originalPlate = $('#plate-info-modal').data('originalPlate')\n        PlateTools.enablePlateToolsMenuInContainer($originalPlate)\n        PlateTools.clearPlateToolsMessage($originalPlate)\n      )\n\n    _warnUnsavedWellChanges: (plateContainer) ->\n      unsavedWellItems = $(plateContainer).find('[data-unsaved-well-inventory-item]')\n      if unsavedWellItems.size() > 0\n        confirm(\"This plate has unsaved changes (e.g. inventory items added to wells) that will not be duplicated. Are you sure you want to duplicate this plate?\")\n      else\n        true\n\n    _updateAssayInventoryItemsForWells: (data) ->\n      plateId = data.plate.id\n      for index, well of data.wells\n        wellId = well.id\n        wellContainer = $(\"[data-well-id=#{wellId}]\")\n        for index2, item of well.assay_inventory_items\n          itemId = item.id\n          name = item.name\n          keyFieldNameId = item.key_field_name_id\n          wellItemTemplate = \"<div class=\\\"assay-well-item\\\" data-id=\\\"#{itemId}\\\" data-keyfield=\\\"#{keyFieldNameId}\\\">\n            <input name=\\\"well_#{plateId}_#{wellId}_items[]\\\" value=\\\"#{itemId}\\\" type=\\\"hidden\\\" class=\\\"assay-well-inventory-item-field\\\"> #{name}\n            </div>\"\n          wellContainer.append $(wellItemTemplate)\n\n    _updateNameAndIdAttributesForDuplicatedFields: ($plateContainer, jsonData) ->\n      plateHtml = $plateContainer.html()\n      plate_id = jsonData.plate.id\n\n      lotNumber = $plateContainer.find('.assays-plate-lot-number-field').val()\n      uniqueId = $plateContainer.find('.assays-plate-unique-id-field').val()\n\n      plateHtml = plateHtml.replace(/assay_plates_for_assays_attributes_\\d+_/g, \"assay_plates_for_assays_attributes_#{plate_id}_\")\n      plateHtml = plateHtml.replace(/assay\\[plates_for_assays_attributes\\]\\[\\d+\\]/g, \"assay\\[plates_for_assays_attributes\\]\\[#{plate_id}\\]\")\n      $plateContainer.html(plateHtml)\n\n      $plateContainer.find('.assays-plate-lot-number-field').val lotNumber\n      $plateContainer.find('.assays-plate-unique-id-field').val uniqueId\n\n    _updateDuplicatedFieldsWithDatabaseIds: (plateContainer, jsonData) ->\n      @_updateDuplicatedFieldsWithPlateId(plateContainer, jsonData.plate)\n      @_updateDuplicatedFieldsWithWellIds(plateContainer, jsonData.wells)\n\n    _updateDuplicatedFieldsWithPlateId: ($plateContainer, jsonPlateData) ->\n      plateId = jsonPlateData.id\n      $plateContainer.data 'plate-id', plateId\n      $plateContainer.attr 'data-plate-id', plateId\n      $plateContainer.find('[data-plate]').attr('data-plate', plateId)\n      $plateContainer.find('[data-plate-id]').val(plateId)\n\n    _updateDuplicatedFieldsWithWellIds: ($plateContainer, jsonWellsData) ->\n      for index, well of jsonWellsData\n        $well = $plateContainer.find \"td[data-row='#{well.well_row}'][data-column='#{well.well_column}']\"\n        $well.data 'well-id', well.id\n        $well.attr 'data-well-id', well.id\n        $well.find(\"[data-well-id-field]\").val(well.id)\n\n    _duplicatePlateInUi: (plateContainer) ->\n      $originalPlateContainer = $(plateContainer)\n      clonePlateContainer = @_clonePlate($originalPlateContainer)\n      @_addNewPlateButton().before(clonePlateContainer)\n\n      clonePlateContainer\n\n    _clonePlate: (originalPlateContainer) ->\n      clonePlateContainer = $(originalPlateContainer).clone()\n      @_clearPlateFields(clonePlateContainer)\n      @_clearPlateWellFields(clonePlateContainer)\n      @_clearDisplayedWellResults(clonePlateContainer)\n      @_clearPlateResultsFileMessage(clonePlateContainer)\n      @_removeAssayInventoryItemFields(clonePlateContainer)\n\n      clonePlateContainer\n\n    _clearPlateFields: (plateContainer) ->\n      @_clearFieldsFor(plateContainer, '[data-plate-field=\"lot_number\"]')\n      @_clearFieldsFor(plateContainer, '[data-plate-field=\"unique_id\"]')\n\n    _clearPlateWellFields: (plateContainer) ->\n      @_clearResultsFields(plateContainer)\n      @_clearWellIdFields(plateContainer)\n\n    _clearResultsFields: (plateContainer) ->\n      @_clearFieldsFor(plateContainer, '[data-plate-well-field=\"spot_forming_cells\"]')\n\n    _clearWellIdFields: (plateContainer) ->\n      @_clearFieldsFor(plateContainer, '[data-well-id-field]')\n\n    _clearFieldsFor: (container, fieldSelector) ->\n      $fieldsToClear = $(container).find(fieldSelector)\n      $fieldsToClear.each (_index, field) ->\n        $(field).val(\"\")\n        $(field).attr(\"value\", \"\")\n\n    _clearDisplayedWellResults: (plateContainer) ->\n      $(plateContainer).find('.assay-well-result-display').html(\"Results:\")\n\n    _clearPlateResultsFileMessage: (plateContainer) ->\n      @_plateResultsFileContainer(plateContainer).html('')\n\n    _removeAssayInventoryItemFields: (plateContainer) ->\n      $(plateContainer).find('.assay-well-item').remove()\n\n    _addNewPlateButton: () ->\n      $('[data-add-new-plate-button]')\n\n    _duplicatePlateUrlForPlate: (plateContainer) ->\n      $plateContainer = $(plateContainer)\n      plateId = $plateContainer.find('[data-plate-id]').val()\n      @duplicatePlateUrlPattern.replace(/plate_id/, plateId)\n\n    # Remove plate\n    _handleRemovePlate: (plateContainer) ->\n      if confirm(\"Are you sure you want to remove this plate?\")\n        @_setRemovingPlateMessage(plateContainer)\n        removePlateUrl = @_removePlateUrlForPlate(plateContainer)\n        $.ajax(\n          url: removePlateUrl,\n          type: \"DELETE\"\n        ).done((data, textStatus, jqXHR) =>\n          $(plateContainer).closest('[data-assay-plate-container]').remove()\n        )\n      else\n        @enablePlateToolsMenuInContainer(plateContainer)\n\n    _removePlateUrlForPlate: (plateContainer) ->\n      $plateContainer = $(plateContainer)\n      plateId = $plateContainer.find('[data-plate-id]').val()\n      \"#{@removePlateUrlPrefix}#{plateId}\"\n\n    # Import results\n    _handleImportResultsFile: (plateContainer) ->\n      $fileField = $(plateContainer).find('[data-plate-results-file]')\n      $fileField.on 'change', (event) =>\n        @_setPlateToolsMessage(plateContainer, 'Importing results...')\n        $fileField.hide()\n        @_uploadSelectedImportResultsFile(plateContainer)\n      $fileField.show()\n      @enablePlateToolsMenuInContainer(plateContainer)\n\n    _uploadSelectedImportResultsFile: (plateContainer) ->\n      fileData = new FormData()\n      $fileField = $(plateContainer).find('[data-plate-results-file]')[0]\n      file = $fileField.files[0]\n\n      if file\n        @disablePlateToolsMenuInContainer(plateContainer)\n        @_setPlateResultsFileMessage(plateContainer, 'New file: ' + file.name)\n\n        fileData.append(\"plate_results\", file)\n        $.ajax(\n          url: \"#{@importWellResultsUrl}\",\n          type: 'POST',\n          data: fileData,\n          dataType: \"json\",\n          processData: false,\n          contentType: false\n        ).done((data, textStatus, jqXHR) =>\n          if data.data_import_successful\n            @_handleImportResultsJsonResponse(data, plateContainer)\n          else\n            @_setPlateToolsMessage(plateContainer, 'Error: Unable to import results. The file was unable to be opened as a .xls file.')\n          @enablePlateToolsMenuInContainer(plateContainer)\n        )\n\n    _handleImportResultsJsonResponse: (data, plateContainer) ->\n      @_updateSpotFormingCellFields(data, plateContainer)\n      @_setSuccessfulImportResultsMessage(plateContainer)\n\n    _updateSpotFormingCellFields: (data, plateContainer) ->\n      $plateContainer = $(plateContainer)\n      spot_forming_cells_data = JSON.parse(data.spot_forming_cells)\n      for row_number in [1..spot_forming_cells_data.length]\n        row = spot_forming_cells_data[row_number-1]\n        for column_number in [1..row.length]\n          $well = $plateContainer.find(\"[data-well][data-row='#{row_number}'][data-column='#{column_number}']\")\n          $spotFormingCellsField = $well.find(\"[data-spot-forming-cells-field]\")\n          $spotFormingCellsField.val(row[column_number-1])\n          $well.find(\".assay-well-result-display\").html \"Results: #{row[column_number-1]}\"\n\n    # Remove results\n    _handleRemoveResults: (plateContainer) ->\n      if @_noResultsToRemove(plateContainer)\n        alert(\"Results have not been imported for this plate yet. There are no results to remove.\")\n      else if confirm(\"Are you sure you want to remove the well results from this plate?\")\n        @_clearDisplayedWellResults(plateContainer)\n        @_clearResultsFields(plateContainer)\n        @_setSuccessfulRemoveResultsMessage(plateContainer)\n      @enablePlateToolsMenuInContainer(plateContainer)\n\n    _noResultsToRemove: (plateContainer) ->\n      $(plateContainer).find('[data-spot-forming-cells-field]').val().length == 0\n\n  window.PlateTools.initialize() if $(\"[data-assay-plates-list]\").size() > 0\n","$.add_polymorphic_event_type_trigger = () ->\n  $('#processing_event_detail_attributes_test_type.polymorphic').change ->\n    val = $(this).val()\n    if val != \"\"\n      if $('form#new_processing_event').length != 0\n        target = \"#{$('form#new_processing_event')[0].action}?test_type=#{val}\"\n      else\n        # TODO: This feels brittle.  It'd be nice to come up with a better way to do this.\n        $('form.edit_processing_event')[0].action.match(/(\\d{1,})$/)\n        processingEventId = RegExp.$1\n        frontUrl = $('form.edit_processing_event')[0].action.replace(/\\d{1,}$/, \"\")\n        target = \"#{frontUrl}?test_type=#{val}&event_id=#{processingEventId}\"\n        \n      $.get target, \"\", (data) ->\n        $(\"#results-formlet\").html(data)","jQuery.fn.toggleExpansionClass = (link) ->\n  el = $(this)\n  if el.hasClass(\"collapsed\")\n    el.removeClass(\"collapsed\")\n    link.text(\"Collapse Comments\")\n  else\n    el.addClass(\"collapsed\")\n    link.text(\"Show All Comments\")\n\n  link.text(link.text() + \"  (#{link.data('quantity')})\")\n\n$ ->\n  $(\".notes-expander\").on 'click', (event) ->\n    targetId = $(this).data(\"target\")\n    $(this).closest(\".notes-section\").find(\".notes\").toggleExpansionClass($(this))\n    event.preventDefault()\n\n  $(\".notes-adder\").on 'click', (event) ->\n    $(this).closest(\".notes-section\").find(\".new-note\").toggle()\n    event.preventDefault()\n\n  $('[data-multiplex-assay-type]').on 'change', (event) ->\n    value = $(this).val()\n    if value == 'Other'\n      $('[data-multiplex-assay-type-other] input').val('')\n      $('[data-multiplex-assay-type-other] input').removeAttr('disabled', '')\n      $('[data-multiplex-assay-type-other]').show()\n    else\n      $('[data-multiplex-assay-type-other] input').attr('disabled', 'disabled')\n      $('[data-multiplex-assay-type-other]').hide()\n\n  if $(\"#site-scores-graph\").length > 0\n    $siteGraph = $(\"#site-scores-graph\")\n    epName = $('.assay-number-header').data('epName')\n\n    setupGradingLevels = ->\n      gradingLevels = []\n      $.each $('[data-range-upper-bound]'), (i, level) ->\n        gradingLevels.push( $(level).data('rangeUpperBound') )\n      gradingLevels\n\n    window.gradingLevels = setupGradingLevels()\n\n    colorFor = (id, score) ->\n      averageColor =   '#000000'\n      poorColor =      '#FF0000'\n      fairColor =      '#FFA500'\n      goodColor =      '#009900'\n      excellentColor = '#00009C'\n\n      if /average/i.test(id)    then return averageColor\n      if /poor/i.test(id)       then return poorColor\n      if /fair/i.test(id)       then return fairColor\n      if /good/i.test(id)       then return goodColor\n      if /excellent/i.test(id)  then return excellentColor\n      unless score? then return null\n      # order matters\n      if score <= (window.gradingLevels[window.gradingLevels.length - 1] || 0) then return poorColor\n      if score <= (window.gradingLevels[2] || 0) then return fairColor\n      if score <= (window.gradingLevels[1] || 0) then return goodColor\n      if score <= (window.gradingLevels[0] || 0) then return excellentColor\n      return averageColor\n\n    chart = c3.generate\n      bindto: '#site-scores-graph'\n      transition:\n        duration: 0\n      size:\n        width: 500\n        height: 150\n      color:\n        pattern: ['#000000']\n      point:\n        r: 5 # radius of dots\n      legend:\n        show: false\n      axis:\n        y:\n          padding:\n            top: 14\n          tick:\n            values: [ 0, 25, 50, 75, 100 ]\n          max: 100\n          min: 0\n        x:\n          type: 'category'\n      grid:\n        x:\n          lines:\n            [\n              value: epName\n              position: 'start'\n            ]\n      tooltip:\n        grouped: false\n      data:\n        rows: []\n        empty:\n          label:\n            text: \"No data found\"\n        color: (color, d) ->\n          newColor = colorFor(d.id, d.value)\n          unless newColor? then return color\n          newColor\n        x: 'EP Name'\n\n    legendTextMap = {\n      'Average':    'EP Average',\n      'Excellent':  \"Excellent\",\n      'Good':       \"Good\",\n      'Fair':       \"Fair\",\n      'Poor':       \"Poor\",\n    }\n\n    legendItem = (backgroundColor, text) ->\n      \"\"\"\n      <span class=\"legend-palette\" style=\"background-color: #{backgroundColor}\"></span>\n      #{text}\n      \"\"\"\n\n    siteScoresUrl = $('#site-scores-graph').data('siteScoresUrl')\n    epAverageScoresUrl = $('#site-scores-graph').data('epAverageScoresUrl')\n\n    # Setup Legend\n    d3.select('#site-scores-graph')\n      .insert('div', '.chart')\n      .attr('class', 'legend')\n      .selectAll('span')\n      .data(Object.keys(legendTextMap))\n      .enter()\n      .append('span')\n      .html( (id) -> legendItem(colorFor(id), legendTextMap[id]) )\n\n    # Below should be deferred objects, but this is a simpler hack\n    $siteGraph.on 'chartLoaded', ->\n      if $(this).data('chartOneRendered') == true && $(this).data('chartTwoRendered') == true\n        # Can't figure out why c3 is giving the Averages a 0.5 opacity\n        # Override here\n        $('.c3-circle').css('opacity', 1)\n        # This is needed so wkhtmltoimage knows when it's done rendering\n        window.status = 'charts_loaded'\n\n    chart.load\n      type: 'spline'\n      url: siteScoresUrl\n      done: ->\n        $siteGraph.data('chartOneRendered', true)\n        $siteGraph.trigger('chartLoaded')\n\n    chart.load\n      type: 'scatter'\n      url: epAverageScoresUrl\n      done: ->\n        $siteGraph.data('chartTwoRendered', true)\n        $siteGraph.trigger('chartLoaded')\n","$ ->\n  toggleEolBackground = ->\n    $(\".eol-site-checkbox:checked\").each (i,e) ->\n      addEolSiteClass(e)\n\n  addEolSiteClass = (e) ->\n    $(e).closest('.site-enrollments').toggleClass('eol-site')\n\n  toggleEolBackground()\n\n  $(\".eol-site-checkbox\").click (e) ->\n    addEolSiteClass(e.target)\n\n  $('input[data-action=\"select-all-sites\"]').on 'click', (event) ->\n    selectAllCheckbox = $(event.target)\n    sitesForm = selectAllCheckbox.closest('form')\n    availableSiteCheckboxes = sitesForm.find('input[data-type=select-site-checkbox]:not(:disabled)')\n    if selectAllCheckbox.prop('checked') == true\n      availableSiteCheckboxes.prop('checked', true)\n    else\n      availableSiteCheckboxes.prop('checked', false)\n\n  # Store the initial value of the proficiency_test_status drop down on page load\n  dropdown = $(\"#proficiency_test_status\");\n  if dropdown.length > 0 then dropdown.data(\"previous_value\", dropdown.val())\n\n  $('#proficiency_test_status').on 'change', (event) ->\n    dropdown = $(event.target)\n    checkbox = $('#proficiency_test_send_email_notification')\n    previous_value = dropdown.data(\"previous_value\")\n    new_value = dropdown.val()\n    checkbox_exists = checkbox.length\n    dropdown.data(\"previous_value\", new_value) # Save this for next time\n    if checkbox_exists && previous_value == \"Upcoming\" && new_value == \"Active\"\n      checkbox.prop('checked', true);\n      alert(\"Because the status is changing to Active, an email notification will be sent to all participating sites when you save this Trial. If you do not wish to send the email at this time, please deselect the checkbox called 'Send Email Notification To Sites' before saving this record.\")\n","$ ->\n  $('.scrollable_area').on 'click', 'a.add-enrollment.add-link', (e) ->\n    e.preventDefault()\n    return unless confirm(\"Are you sure you want to add a new enrollment? This cannot be undone once you save.\")\n    self = $(e.target)\n    siteId = self.parent().first().attr(\"id\")\n    siteIdNumber = siteId.match(/site-(\\d+)/)[1]\n\n    template = $(\"##{siteId} div.enrollment:last\").clone()\n    template.find(\"input:text, input.enrollment-id\").val \"\"\n    template.find(\".sendout-status\").text '\\u00a0'\n    template.find(\"input.site-id\").val siteIdNumber\n    template.adjust_rails_form_fields($(\"div.enrollment\").length)\n    template.find(\".enrollment-number\").text($(\"##{siteId} div.enrollment\").length + 1)\n    template.find(\".new-enrollment\").prop(\"checked\", true)\n    $(\"##{siteId}\").append template\n\n    template.find(\".datepicker\").removeClass(\"hasDatepicker\")\n    template.find(\".datetimepicker\").removeClass(\"hasDatetimepicker\")\n    $.add_datepickers()\n","$ ->\n  window.QualifyingStudiesReport =\n\n    initialize: ->\n      @bindEvents()\n      @activateSelect2()\n\n    bindEvents: ->\n      @bindResetSearchFieldsButton()\n\n    bindResetSearchFieldsButton: ->\n      $(\"[data-reset-search-fields]\").on 'click', (event) ->\n        event.preventDefault()\n        $searchForm = $(event.target).closest('[data-search-form]')\n\n        $fields = $searchForm.find('[data-search-form-field]')\n        $fields.val(\"\")\n        $fields.attr(\"values\", \"\")\n\n        $select2Fields = $searchForm.find('[data-select2-selector]')\n        $select2Fields.select2('data', null)\n\n    activateSelect2: ->\n      $('[data-qualifying-studies-report]').find('[data-select2-selector]').select2(\n        width: 'resolve',\n        allowClear: true\n      )\n\n  window.QualifyingStudiesReport.initialize() if $('[data-qualifying-studies-report]').size() > 0\n","$.add_quantification_select_trigger = () ->\n  $('#program_inventory_item_quantification').change ->\n    val = $(this).val()\n    switch val\n      when 'Individual'\n        $('#quantity-field').hide()\n        $('#quantity-units-field').hide()\n      when 'Individual with quantity'\n        $('#quantity-field').show()\n        $('#quantity-units-field').show()\n        $('div#quantity-field label').text('Quantity')\n      when 'Bulk'\n        $('#quantity-field').show()\n        $('#quantity-units-field').show()\n        $('div#quantity-field label').text('\"Aliquotted\" Quantity')\n      ","$.display_register_fields = () ->\n  type = $(\".user-type-radio:checked\").val()\n  if(type is \"dhe\")\n    $(\"#dhe-id-field\").show()\n    $(\"#password-confirmation-field\").hide()\n  else\n    $(\"#dhe-id-field\").hide()\n    $(\"#password-confirmation-field\").show()\n\n$(\".user-type-radio\").on 'change', ->\n  $.display_register_fields()\n","$ ->\n  resourceTypeRadioButton = $('.resource-type-button')\n  urlInput = $('[data-resource-link]')\n  fileInput = $('[data-resource-document]')\n\n  resourceTypeRadioButton.click (e) ->\n    buttonValue = e.target.value\n    if (buttonValue == 'link')\n      urlInput.prop('disabled', false)\n      fileInput.prop('disabled', true)\n    else if (buttonValue == 'document')\n      urlInput.prop('disabled', true)\n      fileInput.prop('disabled', false)\n","$ ->\n  window.ScorecardCreateForm =\n    createEvents: ->\n      @displayPopulatedDescriptions()\n      @createDescriptionEvent()\n\n    createDescriptionEvent: ->\n      $('a.js-use-other-criteria').on 'click', (event) ->\n        event.preventDefault()\n        $eval_description_input = $(@).parents('fieldset.scorecard-target-record').find(\"input.js-point-description\")\n        if $eval_description_input.is(':hidden')\n          $eval_description_input.show()\n        else\n          $eval_description_input.hide().val('')\n\n    displayPopulatedDescriptions: ->\n      $('fieldset.scorecard-target-record input.js-point-description').each (i ,el) ->\n        $(el).show() if $(el).val()\n\n  window.ScorecardCreateForm.createEvents()\n","$ ->\n  window.ScorecardEditForm =\n    createEvents: ->\n      @createPublishEvent()\n      @createRecalculatePointsEvent()\n      @createNoDataEvent()\n\n    createPublishEvent: ->\n      $('#enter_ep_site_scores input#publish').click (e) ->\n        if ScorecardEditForm.validateSiteScores()\n          $('#published').val(true)\n        else\n          e.preventDefault()\n\n    createRecalculatePointsEvent: ->\n      $(\"#enter_ep_site_scores .target_evaluations\").on \"keyup\",  (e) =>\n        @recalculatePoints(e)\n\n    createNoDataEvent: ->\n      $('input[data-pte=no-data]:checked').each (i, e) =>\n        @toggleNoData(e)\n      $('input[data-pte=no-data]').click (e) =>\n        @toggleNoData(e.currentTarget)\n\n    # Calculates point value for each enrollment based on \"# Evals\" input.\n    recalculatePoints: (event) ->\n      evaluation_field = event.target\n      row = $(evaluation_field).closest(\"tr\")\n      maximumPoints = row.data(\"max-points\")\n      evaluations = row.data(\"max-evaluations\")\n      earnedEvaluations = parseInt($(evaluation_field).val())\n      if isNaN(earnedEvaluations)\n        $(evaluation_field).parent().next(\".target_score\").find('input').val(\"\")\n      else\n        score = ((earnedEvaluations / evaluations ) * maximumPoints).toFixed(2)\n        $(evaluation_field).parent().next(\".target_score\").find('input').val(score)\n\n    # Validates the ep site score form when submitted.  Adds validation errors for the following:\n    # * Inputs that are not numeric\n    # * Inputs less than 0\n    # * Inputs greater than max # of Evals for target.\n    #\n    validateSiteScores: ->\n      error_fields = []\n      $(\".target_evaluations:visible\").each () ->\n        maxEvaluations = parseInt($(@).closest(\"tr\").data(\"max-evaluations\"))\n        earnedEvaluations = parseInt($(@).val())\n        if isNaN(earnedEvaluations) || earnedEvaluations > maxEvaluations || earnedEvaluations < 0\n          error_fields.push($(@))\n          $(@).addClass(\"validation_error\")\n        else\n          $(@).removeClass(\"validation_error\")\n      if(error_fields.length == 0)\n        return true\n      else\n        alert(\"# Evals must be between 0 and the maximum # Evals for the target.\")\n        error_fields[0].focus()\n        return false\n\n    toggleNoData: (checkbox) ->\n      columnIndex     = (checkbox.offsetParent.cellIndex * 2)\n      $scorecardTable = $(checkbox).parents('table')\n\n      $numberOfEvals  = $($scorecardTable.find('tr').map (idx, elt) ->\n        $(elt).find('td')[columnIndex]).find('input')\n      $points         = $($scorecardTable.find('tr').map (idx, elt) ->\n        $(elt).find('td')[columnIndex + 1]).find('input')\n\n      $numberOfEvals.toggle()\n      $points.toggle()\n\n  window.ScorecardEditForm.createEvents()\n\n  # Sets the height for the scorecard results rows to match the height of the corresponding table key rows.\n  for row in $(\".scorecard_result_table tr\")\n    row = $(row)\n    if row.attr?(\"class\")\n      col = $(\"td.\" + row.attr(\"class\"))\n      colHeight = col.outerHeight(true)\n      row.css(height: colHeight)\n\n  # Prepares the top scrollbar for site scores table section.\n  $(\".scorecard-top-scroller div\").css(width: $(\".scorecard_result_table table\").outerWidth(true))\n  $(\".scorecard-top-scroller\").scroll ->\n    $(\".scorecard_result_table\").scrollLeft $(\".scorecard-top-scroller\").scrollLeft()\n  $(\".scorecard_result_table\").scroll ->\n    $(\".scorecard-top-scroller\").scrollLeft $(\".scorecard_result_table\").scrollLeft()\n\n  # Calculates the Point Value field when Maximum Points and Evaluations are filled in on the Edit Grading Criteria form.\n  $(\".edit_scorecard .maximum_points, .edit_scorecard .number_of_evaluations\").on \"keyup\", (e) ->\n    fieldset = $(this).closest(\"fieldset\")\n    maxPoints = parseFloat fieldset.find(\".maximum_points\").val()\n    numberOfEvaluations = parseFloat fieldset.find(\".number_of_evaluations\").val()\n    pointValue = fieldset.find(\".point-value\")\n    if maxPoints && numberOfEvaluations\n      pointValue.val((maxPoints / numberOfEvaluations).toFixed(3))\n    else\n      pointValue.val(\"\")\n\n  # Validates the grading criteria form when submitted.\n  # * Adds validation error when maximum point input total is not a number.\n  # * Adds validation error when maximum point input total is not between 0 and 100.\n  # * Adds validation warning when maximum point input total does not equal 100.\n  $(\".edit_scorecard\").submit ->\n    sum = 0\n    $(\".maximum_points:visible\").each () ->\n      sum += parseFloat($(this).val())\n    if isNaN(sum)\n      alert(\"Error: The grading criteria has an improper value for maximum points. The total points must be between 0 and 100.\")\n      return false\n    if sum < 0 || sum > 100\n      alert(\"Error: The grading criteria has a total of \" + sum + \" maximum points. The total points must be between 0 and 100.\")\n      return false\n    else if sum != 100\n      alert(\"Warning: The grading criteria has a total of \" + sum + \" maximum points. It should have exactly 100 points, and cannot have more than 100.0 points.\")\n      return true\n    else\n      return true\n\n\n  # Validates grading level form.  Ensure that lower bound values are between 0 and 100.\n  $(\".edit_grading_levels\").submit ->\n    error_fields = []\n    $(\".lower_bound:not([readonly])\").each () ->\n      this_value = parseFloat($(this).val())\n      if(this_value > 100) || (this_value <= 0)\n        error_fields.push($(this))\n        $(this).addClass(\"validation_error\")\n      else\n        $(this).removeClass(\"validation_error\")\n\n    if(error_fields.length == 0)\n      return true\n    else\n      alert(\"Some scores are outside of the allowed range. All scores must be between 1 and 100.\")\n      error_fields[0].focus()\n      return false\n\n  # Sets the upper bound value based on the lower bound value.\n  set_upper_bound = (field) ->\n    lower_bound_field = $(field)\n    previous_row = lower_bound_field.closest(\".fields\").prevAll(\".fields:visible\").first()\n    if previous_row\n      lower_bound = parseFloat(lower_bound_field.val())\n      previous_row.find(\".upper_bound\").val(lower_bound - 1)\n\n  # Sets the upper bound when a lower bound field is changed.\n  $(\".edit_grading_levels\").on \"change\", \".lower_bound\", (_event) ->\n    set_upper_bound($(this))\n\n  # Refreshes the upper bound values.\n  # * Calls set_upper_bound on each grading level.\n  # * Sets the last upper bound value to 100.\n  refresh_upper_bounds = ->\n    $(\".edit_grading_levels .lower_bound:visible\").each () ->\n      set_upper_bound($(this))\n    $(\"#user_grade_levels\").find(\".fields:visible\").last().find(\".upper_bound\").val(\"100\")\n\n  # Refresh the upper bound values if a grading level removed.\n  $(\".edit_grading_levels\").on('nested:fieldRemoved', (event) ->\n    setTimeout(refresh_upper_bounds, 200)\n  )\n\n  # Refresh the upper bound values on page load.\n  refresh_upper_bounds()\n","$ ->\n  # this ensures that buttons for pagination include all search params\n  $(\"[data-include='search-form-params'] > div > a\").each ->\n    $link = $(@)\n    form = $(\"[data-form='search-form']\").serialize()\n    $link.attr('href', $link.attr('href') + '&' + form)\n","jQuery.fn.sgaFormCreator = () ->\n  openSgaForm = (trigger) ->\n    sgaForm = $('#sga-form')\n    newSga = $(sgaForm.clone())\n    newSga.find('.form-template').val('')\n    i = $('#sga-list').children('div').length\n    newSga.adjust_rails_form_fields(i)\n    newSga.attr('id', \"sga-form-#{i}\")\n    newSga.find('.sga-gel-files').multipleFileUploader()\n    newSga.find('.sga-ab1-files').multipleFileUploader()\n\n    newSga.on 'click', '.save-sga-button', (e) ->\n      e.preventDefault()\n      saveSga(newSga, trigger)\n    newSga.on 'click', '.cancel-sga-button', (e) ->\n      e.preventDefault(newSga)\n      cancelSga(newSga, trigger)\n    sgaForm.before(newSga)\n    newSga.show()\n    trigger.hide()\n\n  saveSga = (newSga, trigger) ->\n    newSga.children('div').hide()\n    sgaRow = newSga.find('div.sga-row')\n    sgaRow.find('a').text(newSga.find('input.sga-name').val())\n    sgaRow.show()\n    trigger.show()\n\n  cancelSga = (newSga, trigger) ->\n    newSga.find('.form-template').val('template')\n    $(newSga).hide()\n    trigger.show()\n\n  this.each () ->\n    trigger = $(this)\n    trigger.click (eventHandler) ->\n      eventHandler.preventDefault()\n      openSgaForm($(eventHandler.target))\n","$(document).ready ->\n  window.tempGroupStates = JSON.parse($(\"[data_add_shipment_btn]\").attr('data_toggle_states')) if $(\"[data_add_shipment_btn]\").length > 0\n\n  $(\".add-all-to-shipment-cell input[type=checkbox]\").change ->\n    parent_id = $(this).closest(\"tr\").attr(\"id\")\n    $(\".#{parent_id} input\").not(\":disabled\").prop(\"checked\", this.checked)\n\n  $(\".really-add-all-to-shipment\").change ->\n    $(this).closest(\"table\").find(\"input\").not(\":disabled\").prop(\"checked\", this.checked)\n\n  # Store shipping issues value in data 'original' onload\n  $(\"[data_add_shipment_btn]\").click ->\n    desiredTemperature = $(this).siblings('[data_temperature_selection]').val()\n    return unless desiredTemperature\n    window.tempGroupStates[desiredTemperature] = !window.tempGroupStates[desiredTemperature]\n    $('.order-review-items tbody tr').each( ->\n      return unless $(this).find('[data-temperature]').text() == desiredTemperature\n      $checkboxes = $(this).find(\"input[type=checkbox]\").not(':disabled')\n      $checkboxes.prop(\"checked\", window.tempGroupStates[desiredTemperature])\n    )\n\n  # Store shipping issues value in data 'original' onload\n  $(\"#shipping_issues\").data \"original\", $(\"#shipping_issues\").val()\n  $(\"#any_shipping_issues\").change()\n\n  $(\"#any_shipping_issues\").on \"change\", (e) ->\n    e.preventDefault()\n\n    # If user selects that this Shipment has shipping issues, then load the shipping issues from data 'original'\n    if $(\"#any_shipping_issues\").val() is \"Yes\"\n      $(\"#shipping_issues\").val $(\"#shipping_issues\").data(\"original\")\n      $(\"#shipping_issues_container\").show()\n    else\n      # If user selects that this Shipment has no shipping issues, then store shipping issues in data 'original'\n      # and clear out the shipping issues field\n      $(\"#shipping_issues_container\").hide()\n      $(\"#shipping_issues\").data \"original\", $(\"#shipping_issues\").val()\n      $(\"#shipping_issues\").val \"\"\n","$ ->\n  # This is checking to see if 'IQA Linearity' is one of the programs\n  # associated with the site. If it is then related checkboxes are shown.\n  toggleLinearityPlatformPermissions = (selected_program_names) ->\n    if /IQA Linearity/.test(selected_program_names)\n      $(\"#linearity-platform-permissions\").show()\n    else\n      $(\"#linearity-platform-permissions\").hide()\n\n  selected_program_names = $('#site_program_ids :selected').text()\n  toggleLinearityPlatformPermissions(selected_program_names)\n  $('#site_program_ids').change ->\n    toggleLinearityPlatformPermissions($('#site_program_ids :selected').text())\n\n  if $('.site_form').length > 0\n    $('input[type=checkbox][data-expandable-checkbox]').change (event) ->\n      section_key = $(this).attr('data-expandable-checkbox')\n      $form = $(this).closest('.site_form')\n      $checkbox = $(this)\n      site_platform_list_element = $form.find('[data-expand-' + section_key + ']')\n      site_platform_list_element.slideToggle(300)\n      site_platform_checkboxes = $form.find('[data-checkbox-for-' + section_key + ']')\n      if $checkbox.prop('checked') == false\n        $('[data-sub-group-' + section_key + ']').hide()\n        site_platform_checkboxes.each (i, checkbox) ->\n          $(checkbox).prop('checked', false)\n\n    $(document).find('[data-expandable-checkbox]').each () ->\n      if $(this).prop('checked')\n        section_key = $(this).attr('data-expandable-checkbox')\n        section = $(document).find('[data-expand-' + section_key + ']')\n        section.show(0)\n","window.disable_test_form = (form) ->\n  form.removeClass('edit-view')\n  form.addClass('show-view')\n  form.find(':input').attr(\"disabled\", \"disabled\")\n\nwindow.enable_test_form = (form) ->\n  form.removeClass('show-view')\n  form.addClass('edit-view')\n  form.find(':input:not([data-endotoxin-result])').removeAttr(\"disabled\")\n\njQuery ->\n\n  do initializeFormAction = ->\n    current_tab = $.query.get(\"current_tab\")\n    $form = $('.back-to-donor-link').closest('form')\n    if current_tab != \"\" && $form.length != 0\n      action = $form.attr('action')\n      newActionQuery = $.query.load(action).set('current_tab', current_tab)\n      newAction = action.split(\"?\")[0] + newActionQuery\n      $form.attr('action', newAction)\n\n  $(\".test-modal-form\").dialog\n    autoOpen: false,\n    height: 575,\n    width: 1000,\n    modal: true,\n    buttons:\n      Save: ->\n        form = $(this).children(\"form\")\n        $(form).validate()\n        form.submit()\n        $(\".select-processing-event\").val(\"\").show()\n        $(\".processing-event-select-box\").val(\"\").hide()\n\n      Cancel: ->\n        $(this).dialog \"close\"\n        $(\".select-processing-event\").val(\"\").show()\n        $(\".processing-event-select-box\").val(\"\").hide()\n\n  $(\".select-processing-event\").change ->\n    $(\".processing-event-select-box\").hide()\n    test_type = $(this).val()\n    $(this).closest(\"[data-processing-event-entry]\").find(\".\" + test_type + \"-processing-event-select-box\").show()\n\n  $(\".processing-event-select-box\").change ->\n    $(\".test-modal-form\").dialog \"close\"\n    form = $(\"##{$(this).val()}-donor-specimen-form\")\n    form.dialog \"open\"\n    visit_id = $(this).closest(\".donor-subsection\").find(\"[name='visit_id']\").val()\n    visit_type = $(this).closest(\".donor-subsection\").find(\"[name='visit_type']\").val()\n    orders = $(this).closest(\".donor-subsection\").find(\"[name='visit_orders']\").val()\n    aliquots = $(this).closest(\".donor-subsection\").find(\"[name='visit_aliquots']\").val()\n    currentTab = $(\"div.tab:not(.ui-tabs-hide)\").attr(\"id\")\n    $(\"[name='processing_event[target_id]']\").val(visit_id)\n    $(\"[name='processing_event[target_type]']\").val(visit_type)\n    form.find(\"#current_tab\").val(currentTab)\n    $(\".order-aliquots-selector\").html(orders)\n    $(\".aliquot-select\").html(aliquots).trigger(\"chosen:updated\")\n    unless aliquots\n      $(\".orders_and_aliquots\").hide()\n\n  $(\"button.processing-event-button\").click (e) ->\n    $(\".test-modal-form\").dialog \"close\"\n    form = $(\"##{$(e.target).data('testType')}-donor-specimen-form\")\n    form.dialog \"open\"\n    characterization_test_section = $('[data-characterization-test-entry]').first()\n    visit_id = characterization_test_section.find(\"[name='visit_id']\").val()\n    visit_type = characterization_test_section.find(\"[name='visit_type']\").val()\n    orders = characterization_test_section.find(\"[name='visit_orders']\").val()\n    aliquots = characterization_test_section.find(\"[name='visit_aliquots']\").val()\n    currentTab = $(\"div.tab:not(.ui-tabs-hide)\").attr(\"id\")\n    $(\"[name='processing_event[target_id]']\").val(visit_id)\n    $(\"[name='processing_event[target_type]']\").val(visit_type)\n    form.find(\"#current_tab\").val(currentTab)\n    $(\".aliquot-select\").html(aliquots).trigger(\"liszt:updated\")\n    outsourced_present_checkbox = form.find('input.testing-outsourced-present').first()\n    set_testing_outsourced(outsourced_present_checkbox)\n    unless aliquots\n      $(\".orders_and_aliquots\").hide()\n\n  $(\"#processing_event_detail_attributes_clade_code\").cladeCodeObserver()\n\n  $(\".processing-event-select-box\").hide()\n  $(\".ui-dialog-titlebar-close\").hide()\n\n  $(\".order-aliquots-selector\").change ->\n    aliquots = $.parseJSON($(this).val())\n    chznAddAliquots(aliquots, this)\n\n  chznAddAliquots = (aliquots, order_select) ->\n    currentAliquots = $(\".aliquot-select\").val()\n    newAliquotList = $.merge(currentAliquots || [], aliquots || [])\n    $(order_select).closest(\".donor-test-form\").find(\".aliquot-select\").val(newAliquotList).trigger('chosen:updated')\n\n  $('.donor-test-form .edit-button').click (event) ->\n    enable_test_form($(this).closest('.donor-test-form'))\n    # There should be only 1 in this case since we're on the edit page, not in a modal\n    outsourced_present_checkbox = $('input.testing-outsourced-present').first()\n    set_testing_outsourced(outsourced_present_checkbox)\n    enableSelectedTestType()\n\n  $('.donor-test-form .cancel-button').click (event) ->\n    disable_test_form($(this).closest('.donor-test-form'))\n    # There should be only 1 in this case since we're on the edit page, not in a modal\n    outsourced_present_checkbox = $('input.testing-outsourced-present').first()\n    set_testing_outsourced(outsourced_present_checkbox)\n\n  set_testing_outsourced = (outsourced_present_checkbox) ->\n    checkbox = $(outsourced_present_checkbox)\n    testing_outsourced_input = $(checkbox).siblings('.testing-outsourced-input').first()\n    testing_outsourced = checkbox.prop('checked')\n\n    testing_outsourced_input.prop('disabled', !testing_outsourced)\n    testing_outsourced_input.val('') unless testing_outsourced\n\n  $('.testing-outsourced-present').click (e) ->\n    set_testing_outsourced(e.target)\n\n  $('.testing-outsourced-present').each (_, element) ->\n    set_testing_outsourced(element)\n\n  enableSelectedTestType = ->\n    for radioButton in $(\"[data-endotoxin-result-type]\")\n      $radioButton = $(radioButton)\n      buttonSelected = $radioButton.is(':checked')\n      $resultField = window.EndotoxinTestResults.testTypeResultFieldFor($radioButton)\n      $resultField.prop('disabled', !buttonSelected)","$ ->\n  $('a#add-genotype-result').on 'click', (evtHandler) ->\n    evtHandler.preventDefault()\n    $.addFormlet('genotype-result')\n\n  $.checkYearOfSampling = ->\n    if $(\"#specimen_unknown_year\").is(':checked')\n      $(\"#specimen_year\").val(\"\").attr(\"disabled\", true).addClass(\"disabled\")\n    else\n      $(\"#specimen_year\").attr(\"disabled\", false).removeClass(\"disabled\")\n\n  $(\"#specimen_unknown_year\").click ->\n    $.checkYearOfSampling()\n\n  $.checkYearOfSampling()\n\n  $('form#create_virus_culture').on 'submit', (evtHandler) ->\n    form = $(this)\n\n    if form.data('submit_button').value == \"Cancel\"\n      return true # Skip validation if the user is cancelling.\n\n    selected_feeder_cell_rows = form.find(\"#selected-feeders tr.specimen\")\n    if selected_feeder_cell_rows.size() == 0\n      alert(\"Please select at least one feeder cell pool.\")\n      evtHandler.preventDefault()\n      return false\n\n    return true\n\n  $('form#create_virus_culture input[type=submit]').on 'click', (evtHandler) ->\n    $('form#create_virus_culture').data('submit_button', evtHandler.target)\n\n  $.each $(\"input[name='processing_event[event_time]']\"), (i, input) ->\n    if $(input).parents('.test-modal-form').length > 0\n      input.value = ''\n    else\n      if input.value\n        date = new Date(input.value)\n        input.value = window.dateTimeFormatter.formatDate(\n          date,\n          window.dateTimeFormat\n        )\n\n  ### Specimen form Virus fields code ###\n  #\n  # This code is responsible for controlling the 3 Virus fields on\n  # the Specimen form. It does several things to change the dropdowns\n  # depending on the selections made by the user. When a virus type is\n  # selected, an API request fetches the labels for the child dropdowns\n  # (Group/Subtype or Subcategory 1/2), whether the VirusType selected\n  # has subtypes or not, and the options data for the group-level dropdown.\n  # The JS then changes the child dropdowns text and options or adds N/A text.\n  # Similarly, changing the group-level dropdown populates the options\n  # of the subtype-level dropdown if it is relevant.\n  virus_type_groups_url = '/api/virus_type_groups'\n  virus_subtypes_url = '/api/virus_subtypes'\n\n  virus_type_select = $('[data-specimen-virus-type-select]')\n  virus_type_group_select = $('[data-specimen-virus-type-group-select]')\n  virus_subtype_select = $('[data-specimen-virus-subtype-select]')\n\n  virus_type_group_label = $('[data-specimen-virus-type-group-label]')\n  virus_subtype_label = $('[data-specimen-virus-subtype-label]')\n\n  # remove all but first (blank) option\n  clear_select_options = (select_field) ->\n    select_field.find('option:gt(0)').remove()\n\n  append_option = (select_field, value, text) ->\n    select_field.append(\n      $('<option></option>').attr('value', value).text(text)\n    )\n\n  hide_select = (select_field) ->\n    select_field.hide()\n\n  show_select = (select_field) ->\n    select_field.show()\n\n  set_label_text = (label, text) ->\n    label.text(text)\n\n  adjust_not_applicable_text = (data, hide_subtypes = false) ->\n    if data['has_subtypes']\n      virus_subtype_select.parent().find('div.not-applicable-text').remove()\n      if hide_subtypes then hide_select(virus_subtype_select) else show_select(virus_subtype_select)\n    else if $('div.not-applicable-text').length == 0\n      virus_subtype_select.parent().append('<div class=\"not-applicable-text\">N/A</div>')\n      hide_select(virus_subtype_select)\n    delete data['has_subtypes']\n\n  change_group_select_options = (virus_type_id, selected_option = '') ->\n    request_url = virus_type_groups_url + \"?virus_type_id=#{virus_type_id}\"\n    show_select(virus_type_group_select)\n    clear_select_options(virus_type_group_select)\n    clear_select_options(virus_subtype_select)\n\n    if virus_type_id == ''\n      hide_select(virus_type_group_select)\n      return hide_select(virus_subtype_select)\n\n    $.getJSON request_url, (data) ->\n      return alert(data['error_message']) if data['status'] == 400\n\n      # Adjust the text, and hide the subtype select if it's relevant\n      # (doing this because it won't be populated until the group is selected)\n      adjust_not_applicable_text(data, true)\n\n      # Adjust the labels based on if the selected virus type\n      # has groups or subcategories\n      set_label_text(virus_type_group_label, data['group_label'])\n      delete data['group_label']\n      set_label_text(virus_subtype_label, data['subtype_label'])\n      delete data['subtype_label']\n\n      if $.type(data) == 'object'\n        $.each data, (name, id) ->\n          append_option(virus_type_group_select, id, name)\n        virus_type_group_select.val(selected_option)\n\n  change_subtype_select_options = (virus_type_group_id, selected_option = '') ->\n    request_url = virus_subtypes_url + \"?virus_type_group_id=#{virus_type_group_id}\"\n    clear_select_options(virus_subtype_select)\n\n    $.getJSON request_url, (data) ->\n      return alert(data['error_message']) if data['status'] == 400\n\n      adjust_not_applicable_text(data)\n\n      if $.type(data) == 'object'\n        $.each data, (name, id) ->\n          append_option(virus_subtype_select, id, name)\n        virus_subtype_select.val(selected_option)\n\n  ### Change handlers ###\n  virus_type_select.change (e) -> change_group_select_options(e.target.value)\n  virus_type_group_select.change (e) -> change_subtype_select_options(e.target.value)\n\n  ### On load ###\n  form_with_fields = $('[data-has-virus-type-fields]')\n  # Save loaded selections\n  selected_virus_type = virus_type_select.val()\n  selected_virus_type_group = virus_type_group_select.val()\n  selected_virus_subtype = virus_subtype_select.val()\n\n  # Run JS to set field state\n  if form_with_fields.length > 0\n    change_group_select_options(selected_virus_type, selected_virus_type_group)\n    change_subtype_select_options(selected_virus_type_group, selected_virus_subtype)\n\n  ### End Specimen form Virus fields code ###\n\n  $('input.new-virus-culture-document').change (e) ->\n    $(e.target).siblings('.destroy-virus-culture-document').first().val(0)\n\n  $('a.remove-virus-culture-document').click (e) ->\n    remove_field = $(e.target).parent()\n    file_field = remove_field.prevAll('input.new-virus-culture-document:first')\n    hidden_destroy_field = remove_field.prevAll('input.destroy-virus-culture-document:first')\n    persisted_doc_field = remove_field.prevAll('.virus-culture-persisted-document-field:first')\n    file_field.val(null)\n    file_field.show()\n    persisted_doc_field.hide()\n    remove_field.hide()\n    hidden_destroy_field.val(1)\n\n  # Enable form when edit is clicked\n  qa_form_inputs = [\n    '#specimen_coa_note',\n    '#lab_qa_status',\n    '#program_qa_status',\n    '#qa_form_submit',\n    '#preview_qa_form'\n  ]\n  edit_button_selector = '#edit_qa_form'\n  cancel_button_selector = '#cancel_qa_form_edit'\n  preview_button_selector = '#preview_qa_form'\n\n  enable_fields = (field_selectors) ->\n    field_selectors.forEach(enable_field)\n\n  enable_field = (selector) ->\n    element = $(selector)\n    element.prop('disabled', false)\n    element.removeClass('disabled')\n\n  disable_fields = (field_selectors) ->\n    field_selectors.forEach(disable_field)\n\n  disable_field = (selector) ->\n    element = $(selector)\n    element.prop('disabled', true)\n    element.addClass('disabled')\n\n  $(preview_button_selector).click (e) ->\n    e.target.form.setAttribute('target', '_blank')\n\n  $(edit_button_selector).click (e) ->\n    e.preventDefault()\n    inputs_to_enable = qa_form_inputs\n    inputs_to_enable.push(cancel_button_selector)\n    enable_fields(inputs_to_enable)\n    disable_field(edit_button_selector)\n\n  $(cancel_button_selector).click (e) ->\n    e.preventDefault()\n    inputs_to_disable = qa_form_inputs\n    inputs_to_disable.push(cancel_button_selector)\n    disable_fields(inputs_to_disable)\n    enable_field(edit_button_selector)\n\n  # Change QA section submit button text based on status inputs\n  qa_status_input_selectors = [\n    '#lab_qa_status',\n    '#program_qa_status'\n  ]\n\n  status_reducer = (accumulator, selector) ->\n    accumulator && $(selector).val() == 'Approved'\n\n  all_qa_approved = ->\n    qa_status_input_selectors.reduce(status_reducer, true)\n\n  update_button_text = ->\n    submit_button = $('#qa_form_submit')\n    submit_button_text = if all_qa_approved() then 'Sign & Submit' else 'Submit'\n    submit_button.prop('value', submit_button_text)\n\n  qa_status_input_selectors.forEach(\n    (selector) -> $(selector).change(update_button_text)\n  )\n  update_button_text()\n\n  no_signature_warning = (e) ->\n    e.target.form.removeAttribute('target')\n    return unless all_qa_approved()\n\n    signature_present_field = $('[data-user-signature-present]')\n    return if signature_present_field.val() == 'true'\n\n    confirm(\n      'You do not have a QA Signature file uploaded. If you would like to ' +\n        'upload one, you can do so on your user profile page. Would you like ' +\n        'to continue approval without a signature file?'\n    )\n\n  $('#qa_form_submit').click(no_signature_warning)","$ ->\n  window.Tabs =\n    initialize: ->\n      @initializeTabs()\n      @bindEvents()\n\n    initializeTabs: ->\n      $('[data-remote-tabs]').tabs\n        heightStyle: 'content'\n        beforeLoad: (event, ui) ->\n          ui.jqXHR.fail ->\n            ui.panel.html 'There was a problem loading this tab.'\n            return\n          return\n\n    bindEvents: ->\n      button = $(document).find('[data-managed-fields-action]').not('[data-managed-fields-action=\"delete\"],[data-managed-fields-action=\"enable\"]');\n\n      $(document).on \"click\", \"[data-managed-fields-action]:not([data-managed-fields-action='delete'],[data-managed-fields-action='enable'])\", (event) ->\n        $target = $(event.currentTarget);\n        eventType = $target.data('managed-fields-action');\n        endpoint = $target.data('action-url');\n\n        $.ajax(\n          method: 'GET'\n          url: endpoint\n          success: (response) ->\n            Tabs.showModal(response)\n        )\n\n      $(document).on \"click\", \"[data-show-removed]\", (event) ->\n        target = $(event.currentTarget)\n        tab = $('li[aria-selected=true]')\n        baseURL = tab.data('base-url')\n        index = tab.data('tab-index');\n        link = tab.find('a')[0]\n        if link.href.endsWith('show_all=true')\n          link.href = baseURL\n        else\n          link.href = baseURL + '?show_all=true'\n        $('[data-remote-tabs]').tabs( \"load\", index );\n        $('[data-remote-tabs]').tabs( \"refresh\" );\n\n    showModal: (response) ->\n      $modal = $('[data-managed-fields-modal]')\n      $modal.html(response)\n      modalTitle = $(response).data('modal-title')\n      $modal.dialog\n        title: modalTitle\n        height: 150\n        width: 400\n        resizable: false\n        closeText: ''\n        buttons:\n          Submit: ->\n            $.rails.fire(document.forms[0], 'submit')\n          Cancel: ->\n            $(this).dialog \"close\"\n\n  window.Tabs.initialize() if $(\"[data-remote-tabs]\").size() > 0\n","$ ->\n  # This code is responsible for populating the virus type options on the test\n  # characterizations page. The virus type options that are available depend on\n  # which combinations of specimen type and virus type have previously been\n  # configured, as well as what the saved virus type and specimen type of the\n  # current page are (for an edit page). The persisted options for an edit page\n  # should always be available to re-select. Otherwise, only unconfigured\n  # combinations will be available for selection.\n\n  virus_types_url = '/api/virus_types'\n\n  specimen_type_select = $('[data-specimen-type-select]')\n  virus_type_select = $('[data-virus-type-select]')\n\n  clear_select_options = (select_field) ->\n    # remove all but first (blank) option\n    select_field.find('option:gt(0)').remove()\n\n  append_option = (select_field, value, text) ->\n    select_field.append(\n      $('<option></option>').attr('value', value).text(text)\n    )\n\n  change_virus_type_select_options = (specimen_type, selected_option = '') ->\n    # The id from the URL `/test_characterizations/<id>/action`\n    virus_type_id = window.location.pathname.split('/')[2]\n    virus_type_id_param = if isNaN(virus_type_id) then '' else \"&virus_type_id=#{virus_type_id}\"\n    request_url = virus_types_url + \"?specimen_type=#{specimen_type}#{virus_type_id_param}\"\n    clear_select_options(virus_type_select)\n\n    $.getJSON request_url, (data) ->\n      return alert(data['error_message']) if data['status'] >= 400\n\n      if $.type(data) == 'object'\n        $.each data, (id, name) ->\n          append_option(virus_type_select, id, name)\n        virus_type_select.val(selected_option)\n\n  ### Change handler ###\n  specimen_type_select.change (e) -> change_virus_type_select_options(e.target.value)","jQuery ->\n  $filters = $(\"#test-result-filters\")\n  $filters.on \"click\", \"a#add-test-result-filter\", (e) ->\n    e.preventDefault()\n    $.addTestResultFilter()\n\n  $filters.on \"click\", \"a.remove-test-result-filter\", (e) ->\n    e.preventDefault()\n    $(this).closest(\".test-result-filter\").remove()\n\n  $filters.on \"change\", \".test-result-option\", (e) ->\n    $.testResultOptionToggle $(this)\n\n  $filters.on \"change\", \".test-result-comparator\", (e) ->\n    $.testResultComparatorToggle $(this)\n\n  $.addTestResultFilter = ->\n    this.addFormlet(\"test-result-filter\")\n    new_child = $filters.children('[data-test-filter]').last()\n    new_child.find(\"[data-remove-filter]\").show()\n    new_child.find(\"input[type=text]\").val(\"\")\n    new_child.find(\"select\").each (_index, select) ->\n      select = $(select)\n      select.val($(\"##{select.attr(\"id\")} option:first\"))\n    $.testResultOptionToggle new_child.find(\"select.test-result-option\")\n    $.testResultComparatorToggle new_child.find(\"select.test-result-comparator\")\n\n  $.testResultOptionToggle = (select) ->\n    select.siblings(\"[data-option-set]\").hide()\n    dataType = select.find(\":selected\").data(\"type\")\n    select.siblings(\".#{dataType}\").show() if dataType\n\n  $.testResultComparatorToggle = (select) ->\n    if select.val() == \"\"\n      select.siblings(\"span.range\").show()\n      select.siblings(\"span.result\").hide()\n    else\n      select.siblings(\"span.range\").hide()\n      select.siblings(\"span.result\").show()\n\n  # Initialize display of test result options on page load\n  $(\".test-result-option\").each (_i) ->\n    $.testResultOptionToggle $(this)\n  $(\".test-result-comparator\").each () ->\n    $.testResultComparatorToggle $(this)\n  $(\"[data-remove-filter]:first\").hide()\n","show_trial_group_dissociation_warning = (e) ->\n  confirm('Are you sure you want to remove this site from its group?')\n\n$ ->\n  $(\"input[name='trial_group[proficiency_test_enrollment_ids][]']\").click (e) ->\n    if !$(@).prop('checked') and $(@).data('alreadySelected') and !$(@).closest('tr').hasClass(\"readonly\")\n      show_trial_group_dissociation_warning()\n","jQuery.fn.multipleFileUploader = (opts = {}) ->\n  uploaderContainer = $(this)\n  uploaderContainer.fileUploaderAttributeName = opts['attributeName']\n  addUploader = (formletsContainer, countContainer, triggerContainer) ->\n    current_uploaders = formletsContainer.find('div.document-formlet')\n    newUploader = current_uploaders.last().clone()\n    newUploader.removeClass('hide')\n    attribute_name = uploaderContainer.fileUploaderAttributeName || triggerContainer.data('adjust-attribute')\n    countAttributeName = attribute_name || 'documents_attributes'\n    i = countContainer.find('div.document-formlet').length\n    countContainer.find('div.document-formlet').each (index, formlet) =>\n      theInput = $(formlet).find(\"input[type='file']\")\n      if theInput.length > 0\n        theId = theInput[0].id\n        match = theId.match(new RegExp(\"#{countAttributeName}_(\\\\d+)_\"))\n        if match?\n          thisI = (Number) match[1]\n          i = Math.max(i, thisI + 1)\n\n    newUploader.adjust_rails_form_fields(i, {attributeName: attribute_name, clear: 'file'})\n    newUploader.adjust_rails_form_fields(i, {attributeName: attribute_name, clear: 'title'})\n    triggerContainer.before(newUploader)\n\n  this.each () ->\n    countContainerParentSelector = $(this).data('count-container-parent-selector')\n    formletsContainer = $(this)\n    if countContainerParentSelector?\n      countContainer = $(this).parent(countContainerParentSelector)\n    else\n      countContainer = $(this)\n    trigger = formletsContainer.find('.add-file-field')\n    trigger.click (eventHandler) ->\n      eventHandler.preventDefault()\n      addUploader(formletsContainer, countContainer, $(eventHandler.target).parent('div'))\n","$ ->\n  if $('.user_form').length > 0\n    $('input[type=checkbox].assign-application-manager').change (event) ->\n      $form = $(this).closest('.user_form')\n      $app_manager_cb = $(this)\n      if $app_manager_cb.prop('checked') == false\n        app_program_manager_cbs = $form.find('[data_application_manager_programs]')\n        app_program_manager_cbs.each (i, el) ->\n          $(el).prop('checked', false)\n\n    $('input[type=checkbox].assign-biostatistician').change (event) ->\n      $form = $(this).closest('.user_form')\n      $app_manager_cb = $(this)\n      if $app_manager_cb.prop('checked') == false\n        app_program_manager_cbs = $form.find('[data_biostatistician_programs]')\n        app_program_manager_cbs.each (i, el) ->\n          $(el).prop('checked', false)\n\n    $('input[type=checkbox].assign-coa-management').change (event) ->\n      $form = $(this).closest('.user_form')\n      $app_manager_cb = $(this)\n      if $app_manager_cb.prop('checked') == false\n        app_program_manager_cbs = $form.find('[data_coa_management_programs]')\n        app_program_manager_cbs.each (i, el) ->\n          $(el).prop('checked', false)\n\n    $('input[type=checkbox].assign-qa-team-member').change (event) ->\n      $form = $(this).closest('.user_form')\n      $app_manager_cb = $(this)\n      if $app_manager_cb.prop('checked') == false\n        app_program_manager_cbs = $form.find('[data_qa_signature_field]')\n        app_program_manager_cbs.each (i, el) ->\n          $(el).prop('checked', false)\n\n    $('input[type=checkbox].assign-ep-reviewer').change (event) ->\n      $form = $(this).closest('.user_form')\n      $app_manager_cb = $(this)\n      if $app_manager_cb.prop('checked') == false\n        app_program_manager_cbs = $form.find('[data_ep_reviewer_programs]')\n        app_program_manager_cbs.each (i, el) ->\n          $(el).prop('checked', false)\n\n    $('input[type=checkbox].assign-program-manager').change (event) ->\n      $form = $(this).closest('.user_form')\n      $app_manager_cb = $(this)\n      if $app_manager_cb.prop('checked') == false\n        app_program_manager_cbs = $form.find('[data_program_manager_programs]')\n        app_program_manager_cbs.each (i, el) ->\n          $(el).prop('checked', false)\n\n    #  Toggles the program menu on user edit\n    $('.assign-qa-team-member').click ->\n      $('.assign-qa-signature').slideToggle(300)\n\n    # fires the click callback for the checkbox when the page loads\n    $('.assign-qa-team-member').each (i, elt) ->\n      $('.assign-qa-signature').show() if $(elt).prop('checked')\n\n    $('input.new-qa-signature-document').change (e) ->\n      $(e.target).siblings('.destroy-qa-signature-document').first().val(0)\n\n    $('a.remove-qa-signature-document').click (e) ->\n      remove_field = $(e.target).parent()\n      file_field = remove_field.prevAll('input.new-qa-signature-document:first')\n      hidden_destroy_field = remove_field.prevAll('input.destroy-qa-signature-document:first')\n      persisted_doc_field = remove_field.prevAll('.qa-signature-persisted-document-field:first')\n      file_field.val(null)\n      file_field.show()\n      persisted_doc_field.hide()\n      remove_field.hide()\n      hidden_destroy_field.val(1)","window.ValidationTools =\n  hasValue: (element) ->\n    $(element).prop('checked') || ($(element).val() && $(element).prop('type') != 'checkbox' && $(element).prop('type') != 'radio')\n","$.standard_float = {\n  format: 'float',\n  minimum: 0,\n  maximum: 99.9,\n  digits_after_decimal: 1,\n  allow_blank: true\n}\n\n$.extended_float = {\n  format: 'float',\n  minimum: 0,\n  maximum: 100.0,\n  digits_after_decimal: 2,\n  allow_blank: true\n}\n\n$.standard_integer = {\n  format: 'integer',\n  minimum: 0,\n  maximum: 9999,\n  allow_blank: true\n}\n\n$.medium_string = {\n  format: 'string',\n  max_length: 255,\n  allow_blank: true\n}\n\n$.bright = {\n  format: 'float',\n  minimum: 0,\n  maximum: 100.0,\n  digits_after_decimal: 1,\n  allow_blank: true\n}\n\n\n$.validations = $.validations || {}\n\n$.convert_number_to_float = (field, places) ->\n  value = field.val()\n\n  unless value is ''\n    do convert_comma = ->\n      value = value.replace(',', '.')\n\n    do add_missing_decimal = ->\n      regex = /\\./\n      value += '.' unless regex.test(value)\n\n    do add_zeros = ->\n      value_array = value.split('.')\n      decimals = value_array[1]\n      zeros_needed = places - decimals.length\n\n      if zeros_needed > 0\n        value += '0' for i in [1..zeros_needed]\n\n  field.val(value)\n\n$.validation_rules_for_field = (field) ->\n  result = []\n  classes = field.attr('class').split(/\\s+/)\n  if classes\n    for css_class in classes\n      if $.validations[css_class]\n        result.push($.validations[css_class])\n\n  return result\n\n$.before_validation = (field) ->\n  rules = $.validation_rules_for_field(field)\n  if (rules.length > 0) && (rules[0].format?) && (rules[0].format == 'float')\n    decimal_places = 1\n    if rules[0].digits_after_decimal?\n      decimal_places = rules[0].digits_after_decimal\n\n    $.convert_number_to_float(field, decimal_places)\n\n$.validate = (field) ->\n  valid = true\n  rules = $.validation_rules_for_field(field)\n\n  if rules.length > 0\n    result = $.validate_with_rules(field.val(), rules[0], field)\n    if result.valid\n      field.removeClass('invalid')\n      field.attr('original-title', \"\")\n      field.tipsy('hide')\n    else\n      field.addClass('invalid')\n      field.data('errors', result.errors)\n      field.attr('original-title', result.errors.join(\"<br>\"))\n      $.hide_iqa_validation_messages()\n      field.tipsy('show')\n      valid = false\n\n  return valid\n\n$.validate_with_rules = (value, rules, field) ->\n  result = {\n    valid: true,\n    errors: []\n  }\n\n  if rules.require_value_in_group_on_submit?\n    hasValue = _.any $(field).parent().children('input:visible'), (input) ->\n      ValidationTools.hasValue(input)\n    unless hasValue\n      result.valid = false\n      result.errors.push(\"Missing input\")\n\n  if(rules.allow_blank && value == \"\")\n    return result\n\n  if rules.format == 'integer'\n    r = /^\\d+$/gi\n    unless r.test(value) || (rules.allow_blank && value == \"\")\n      result.valid = false\n      result.errors.push(\"Only integers are allowed\")\n  if rules.format == 'float'\n    r = /^\\d+(\\.\\d+)?$/gi\n    unless r.test(value) || (rules.allow_blank && value == \"\")\n      result.valid = false\n      result.errors.push(\"Only floating point numbers are allowed\")\n  if rules.max_length?\n    v = String(value)\n    if v.length > rules.max_length\n      result.valid = false\n      result.errors.push(\"Only \" + rules.max_length + \" characters are allowed\")\n  if rules.minimum?\n    v = parseFloat(value)\n    unless v >= rules.minimum\n      result.valid = false\n      result.errors.push(\"Minimum value is \" + rules.minimum)\n  if rules.maximum?\n    v = parseFloat(value)\n    unless v <= rules.maximum\n      result.valid = false\n      result.errors.push(\"Maximum value is \" + rules.maximum)\n  if rules.digits_after_decimal?\n    r = new RegExp(\"^\\\\d+\\.\\\\d{\"+rules.digits_after_decimal+\"}$\", \"gi\")\n    unless r.test(value) || (rules.allow_blank && value == \"\")\n      result.valid = false\n      result.errors.push(rules.digits_after_decimal + \" decimal place(s) are required\")\n\n  return result\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n//       values that give correct `typeof` results).\n//       do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v;  g = n;  b = wh; break;\n\t\tcase 1: r = n;  g = v;  b = wh; break;\n\t\tcase 2: r = wh; g = v;  b = n; break;\n\t\tcase 3: r = wh; g = n;  b = v; break;\n\t\tcase 4: r = n;  g = wh; b = v; break;\n\t\tcase 5: r = v;  g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","!function() {\n  var d3 = {\n    version: \"3.5.17\"\n  };\n  var d3_arraySlice = [].slice, d3_array = function(list) {\n    return d3_arraySlice.call(list);\n  };\n  var d3_document = this.document;\n  function d3_documentElement(node) {\n    return node && (node.ownerDocument || node.document || node).documentElement;\n  }\n  function d3_window(node) {\n    return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView);\n  }\n  if (d3_document) {\n    try {\n      d3_array(d3_document.documentElement.childNodes)[0].nodeType;\n    } catch (e) {\n      d3_array = function(list) {\n        var i = list.length, array = new Array(i);\n        while (i--) array[i] = list[i];\n        return array;\n      };\n    }\n  }\n  if (!Date.now) Date.now = function() {\n    return +new Date();\n  };\n  if (d3_document) {\n    try {\n      d3_document.createElement(\"DIV\").style.setProperty(\"opacity\", 0, \"\");\n    } catch (error) {\n      var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;\n      d3_element_prototype.setAttribute = function(name, value) {\n        d3_element_setAttribute.call(this, name, value + \"\");\n      };\n      d3_element_prototype.setAttributeNS = function(space, local, value) {\n        d3_element_setAttributeNS.call(this, space, local, value + \"\");\n      };\n      d3_style_prototype.setProperty = function(name, value, priority) {\n        d3_style_setProperty.call(this, name, value + \"\", priority);\n      };\n    }\n  }\n  d3.ascending = d3_ascending;\n  function d3_ascending(a, b) {\n    return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n  }\n  d3.descending = function(a, b) {\n    return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n  };\n  d3.min = function(array, f) {\n    var i = -1, n = array.length, a, b;\n    if (arguments.length === 1) {\n      while (++i < n) if ((b = array[i]) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = array[i]) != null && a > b) a = b;\n    } else {\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;\n    }\n    return a;\n  };\n  d3.max = function(array, f) {\n    var i = -1, n = array.length, a, b;\n    if (arguments.length === 1) {\n      while (++i < n) if ((b = array[i]) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = array[i]) != null && b > a) a = b;\n    } else {\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n        a = b;\n        break;\n      }\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;\n    }\n    return a;\n  };\n  d3.extent = function(array, f) {\n    var i = -1, n = array.length, a, b, c;\n    if (arguments.length === 1) {\n      while (++i < n) if ((b = array[i]) != null && b >= b) {\n        a = c = b;\n        break;\n      }\n      while (++i < n) if ((b = array[i]) != null) {\n        if (a > b) a = b;\n        if (c < b) c = b;\n      }\n    } else {\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n        a = c = b;\n        break;\n      }\n      while (++i < n) if ((b = f.call(array, array[i], i)) != null) {\n        if (a > b) a = b;\n        if (c < b) c = b;\n      }\n    }\n    return [ a, c ];\n  };\n  function d3_number(x) {\n    return x === null ? NaN : +x;\n  }\n  function d3_numeric(x) {\n    return !isNaN(x);\n  }\n  d3.sum = function(array, f) {\n    var s = 0, n = array.length, a, i = -1;\n    if (arguments.length === 1) {\n      while (++i < n) if (d3_numeric(a = +array[i])) s += a;\n    } else {\n      while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a;\n    }\n    return s;\n  };\n  d3.mean = function(array, f) {\n    var s = 0, n = array.length, a, i = -1, j = n;\n    if (arguments.length === 1) {\n      while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;\n    } else {\n      while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;\n    }\n    if (j) return s / j;\n  };\n  d3.quantile = function(values, p) {\n    var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;\n    return e ? v + e * (values[h] - v) : v;\n  };\n  d3.median = function(array, f) {\n    var numbers = [], n = array.length, a, i = -1;\n    if (arguments.length === 1) {\n      while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a);\n    } else {\n      while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a);\n    }\n    if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5);\n  };\n  d3.variance = function(array, f) {\n    var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0;\n    if (arguments.length === 1) {\n      while (++i < n) {\n        if (d3_numeric(a = d3_number(array[i]))) {\n          d = a - m;\n          m += d / ++j;\n          s += d * (a - m);\n        }\n      }\n    } else {\n      while (++i < n) {\n        if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) {\n          d = a - m;\n          m += d / ++j;\n          s += d * (a - m);\n        }\n      }\n    }\n    if (j > 1) return s / (j - 1);\n  };\n  d3.deviation = function() {\n    var v = d3.variance.apply(this, arguments);\n    return v ? Math.sqrt(v) : v;\n  };\n  function d3_bisector(compare) {\n    return {\n      left: function(a, x, lo, hi) {\n        if (arguments.length < 3) lo = 0;\n        if (arguments.length < 4) hi = a.length;\n        while (lo < hi) {\n          var mid = lo + hi >>> 1;\n          if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid;\n        }\n        return lo;\n      },\n      right: function(a, x, lo, hi) {\n        if (arguments.length < 3) lo = 0;\n        if (arguments.length < 4) hi = a.length;\n        while (lo < hi) {\n          var mid = lo + hi >>> 1;\n          if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1;\n        }\n        return lo;\n      }\n    };\n  }\n  var d3_bisect = d3_bisector(d3_ascending);\n  d3.bisectLeft = d3_bisect.left;\n  d3.bisect = d3.bisectRight = d3_bisect.right;\n  d3.bisector = function(f) {\n    return d3_bisector(f.length === 1 ? function(d, x) {\n      return d3_ascending(f(d), x);\n    } : f);\n  };\n  d3.shuffle = function(array, i0, i1) {\n    if ((m = arguments.length) < 3) {\n      i1 = array.length;\n      if (m < 2) i0 = 0;\n    }\n    var m = i1 - i0, t, i;\n    while (m) {\n      i = Math.random() * m-- | 0;\n      t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t;\n    }\n    return array;\n  };\n  d3.permute = function(array, indexes) {\n    var i = indexes.length, permutes = new Array(i);\n    while (i--) permutes[i] = array[indexes[i]];\n    return permutes;\n  };\n  d3.pairs = function(array) {\n    var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n);\n    while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ];\n    return pairs;\n  };\n  d3.transpose = function(matrix) {\n    if (!(n = matrix.length)) return [];\n    for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) {\n      for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) {\n        row[j] = matrix[j][i];\n      }\n    }\n    return transpose;\n  };\n  function d3_transposeLength(d) {\n    return d.length;\n  }\n  d3.zip = function() {\n    return d3.transpose(arguments);\n  };\n  d3.keys = function(map) {\n    var keys = [];\n    for (var key in map) keys.push(key);\n    return keys;\n  };\n  d3.values = function(map) {\n    var values = [];\n    for (var key in map) values.push(map[key]);\n    return values;\n  };\n  d3.entries = function(map) {\n    var entries = [];\n    for (var key in map) entries.push({\n      key: key,\n      value: map[key]\n    });\n    return entries;\n  };\n  d3.merge = function(arrays) {\n    var n = arrays.length, m, i = -1, j = 0, merged, array;\n    while (++i < n) j += arrays[i].length;\n    merged = new Array(j);\n    while (--n >= 0) {\n      array = arrays[n];\n      m = array.length;\n      while (--m >= 0) {\n        merged[--j] = array[m];\n      }\n    }\n    return merged;\n  };\n  var abs = Math.abs;\n  d3.range = function(start, stop, step) {\n    if (arguments.length < 3) {\n      step = 1;\n      if (arguments.length < 2) {\n        stop = start;\n        start = 0;\n      }\n    }\n    if ((stop - start) / step === Infinity) throw new Error(\"infinite range\");\n    var range = [], k = d3_range_integerScale(abs(step)), i = -1, j;\n    start *= k, stop *= k, step *= k;\n    if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);\n    return range;\n  };\n  function d3_range_integerScale(x) {\n    var k = 1;\n    while (x * k % 1) k *= 10;\n    return k;\n  }\n  function d3_class(ctor, properties) {\n    for (var key in properties) {\n      Object.defineProperty(ctor.prototype, key, {\n        value: properties[key],\n        enumerable: false\n      });\n    }\n  }\n  d3.map = function(object, f) {\n    var map = new d3_Map();\n    if (object instanceof d3_Map) {\n      object.forEach(function(key, value) {\n        map.set(key, value);\n      });\n    } else if (Array.isArray(object)) {\n      var i = -1, n = object.length, o;\n      if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o);\n    } else {\n      for (var key in object) map.set(key, object[key]);\n    }\n    return map;\n  };\n  function d3_Map() {\n    this._ = Object.create(null);\n  }\n  var d3_map_proto = \"__proto__\", d3_map_zero = \"\\x00\";\n  d3_class(d3_Map, {\n    has: d3_map_has,\n    get: function(key) {\n      return this._[d3_map_escape(key)];\n    },\n    set: function(key, value) {\n      return this._[d3_map_escape(key)] = value;\n    },\n    remove: d3_map_remove,\n    keys: d3_map_keys,\n    values: function() {\n      var values = [];\n      for (var key in this._) values.push(this._[key]);\n      return values;\n    },\n    entries: function() {\n      var entries = [];\n      for (var key in this._) entries.push({\n        key: d3_map_unescape(key),\n        value: this._[key]\n      });\n      return entries;\n    },\n    size: d3_map_size,\n    empty: d3_map_empty,\n    forEach: function(f) {\n      for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]);\n    }\n  });\n  function d3_map_escape(key) {\n    return (key += \"\") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key;\n  }\n  function d3_map_unescape(key) {\n    return (key += \"\")[0] === d3_map_zero ? key.slice(1) : key;\n  }\n  function d3_map_has(key) {\n    return d3_map_escape(key) in this._;\n  }\n  function d3_map_remove(key) {\n    return (key = d3_map_escape(key)) in this._ && delete this._[key];\n  }\n  function d3_map_keys() {\n    var keys = [];\n    for (var key in this._) keys.push(d3_map_unescape(key));\n    return keys;\n  }\n  function d3_map_size() {\n    var size = 0;\n    for (var key in this._) ++size;\n    return size;\n  }\n  function d3_map_empty() {\n    for (var key in this._) return false;\n    return true;\n  }\n  d3.nest = function() {\n    var nest = {}, keys = [], sortKeys = [], sortValues, rollup;\n    function map(mapType, array, depth) {\n      if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;\n      var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;\n      while (++i < n) {\n        if (values = valuesByKey.get(keyValue = key(object = array[i]))) {\n          values.push(object);\n        } else {\n          valuesByKey.set(keyValue, [ object ]);\n        }\n      }\n      if (mapType) {\n        object = mapType();\n        setter = function(keyValue, values) {\n          object.set(keyValue, map(mapType, values, depth));\n        };\n      } else {\n        object = {};\n        setter = function(keyValue, values) {\n          object[keyValue] = map(mapType, values, depth);\n        };\n      }\n      valuesByKey.forEach(setter);\n      return object;\n    }\n    function entries(map, depth) {\n      if (depth >= keys.length) return map;\n      var array = [], sortKey = sortKeys[depth++];\n      map.forEach(function(key, keyMap) {\n        array.push({\n          key: key,\n          values: entries(keyMap, depth)\n        });\n      });\n      return sortKey ? array.sort(function(a, b) {\n        return sortKey(a.key, b.key);\n      }) : array;\n    }\n    nest.map = function(array, mapType) {\n      return map(mapType, array, 0);\n    };\n    nest.entries = function(array) {\n      return entries(map(d3.map, array, 0), 0);\n    };\n    nest.key = function(d) {\n      keys.push(d);\n      return nest;\n    };\n    nest.sortKeys = function(order) {\n      sortKeys[keys.length - 1] = order;\n      return nest;\n    };\n    nest.sortValues = function(order) {\n      sortValues = order;\n      return nest;\n    };\n    nest.rollup = function(f) {\n      rollup = f;\n      return nest;\n    };\n    return nest;\n  };\n  d3.set = function(array) {\n    var set = new d3_Set();\n    if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]);\n    return set;\n  };\n  function d3_Set() {\n    this._ = Object.create(null);\n  }\n  d3_class(d3_Set, {\n    has: d3_map_has,\n    add: function(key) {\n      this._[d3_map_escape(key += \"\")] = true;\n      return key;\n    },\n    remove: d3_map_remove,\n    values: d3_map_keys,\n    size: d3_map_size,\n    empty: d3_map_empty,\n    forEach: function(f) {\n      for (var key in this._) f.call(this, d3_map_unescape(key));\n    }\n  });\n  d3.behavior = {};\n  function d3_identity(d) {\n    return d;\n  }\n  d3.rebind = function(target, source) {\n    var i = 1, n = arguments.length, method;\n    while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);\n    return target;\n  };\n  function d3_rebind(target, source, method) {\n    return function() {\n      var value = method.apply(source, arguments);\n      return value === source ? target : value;\n    };\n  }\n  function d3_vendorSymbol(object, name) {\n    if (name in object) return name;\n    name = name.charAt(0).toUpperCase() + name.slice(1);\n    for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {\n      var prefixName = d3_vendorPrefixes[i] + name;\n      if (prefixName in object) return prefixName;\n    }\n  }\n  var d3_vendorPrefixes = [ \"webkit\", \"ms\", \"moz\", \"Moz\", \"o\", \"O\" ];\n  function d3_noop() {}\n  d3.dispatch = function() {\n    var dispatch = new d3_dispatch(), i = -1, n = arguments.length;\n    while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n    return dispatch;\n  };\n  function d3_dispatch() {}\n  d3_dispatch.prototype.on = function(type, listener) {\n    var i = type.indexOf(\".\"), name = \"\";\n    if (i >= 0) {\n      name = type.slice(i + 1);\n      type = type.slice(0, i);\n    }\n    if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);\n    if (arguments.length === 2) {\n      if (listener == null) for (type in this) {\n        if (this.hasOwnProperty(type)) this[type].on(name, null);\n      }\n      return this;\n    }\n  };\n  function d3_dispatch_event(dispatch) {\n    var listeners = [], listenerByName = new d3_Map();\n    function event() {\n      var z = listeners, i = -1, n = z.length, l;\n      while (++i < n) if (l = z[i].on) l.apply(this, arguments);\n      return dispatch;\n    }\n    event.on = function(name, listener) {\n      var l = listenerByName.get(name), i;\n      if (arguments.length < 2) return l && l.on;\n      if (l) {\n        l.on = null;\n        listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));\n        listenerByName.remove(name);\n      }\n      if (listener) listeners.push(listenerByName.set(name, {\n        on: listener\n      }));\n      return dispatch;\n    };\n    return event;\n  }\n  d3.event = null;\n  function d3_eventPreventDefault() {\n    d3.event.preventDefault();\n  }\n  function d3_eventSource() {\n    var e = d3.event, s;\n    while (s = e.sourceEvent) e = s;\n    return e;\n  }\n  function d3_eventDispatch(target) {\n    var dispatch = new d3_dispatch(), i = 0, n = arguments.length;\n    while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n    dispatch.of = function(thiz, argumentz) {\n      return function(e1) {\n        try {\n          var e0 = e1.sourceEvent = d3.event;\n          e1.target = target;\n          d3.event = e1;\n          dispatch[e1.type].apply(thiz, argumentz);\n        } finally {\n          d3.event = e0;\n        }\n      };\n    };\n    return dispatch;\n  }\n  d3.requote = function(s) {\n    return s.replace(d3_requote_re, \"\\\\$&\");\n  };\n  var d3_requote_re = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n  var d3_subclass = {}.__proto__ ? function(object, prototype) {\n    object.__proto__ = prototype;\n  } : function(object, prototype) {\n    for (var property in prototype) object[property] = prototype[property];\n  };\n  function d3_selection(groups) {\n    d3_subclass(groups, d3_selectionPrototype);\n    return groups;\n  }\n  var d3_select = function(s, n) {\n    return n.querySelector(s);\n  }, d3_selectAll = function(s, n) {\n    return n.querySelectorAll(s);\n  }, d3_selectMatches = function(n, s) {\n    var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, \"matchesSelector\")];\n    d3_selectMatches = function(n, s) {\n      return d3_selectMatcher.call(n, s);\n    };\n    return d3_selectMatches(n, s);\n  };\n  if (typeof Sizzle === \"function\") {\n    d3_select = function(s, n) {\n      return Sizzle(s, n)[0] || null;\n    };\n    d3_selectAll = Sizzle;\n    d3_selectMatches = Sizzle.matchesSelector;\n  }\n  d3.selection = function() {\n    return d3.select(d3_document.documentElement);\n  };\n  var d3_selectionPrototype = d3.selection.prototype = [];\n  d3_selectionPrototype.select = function(selector) {\n    var subgroups = [], subgroup, subnode, group, node;\n    selector = d3_selection_selector(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      subgroups.push(subgroup = []);\n      subgroup.parentNode = (group = this[j]).parentNode;\n      for (var i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          subgroup.push(subnode = selector.call(node, node.__data__, i, j));\n          if (subnode && \"__data__\" in node) subnode.__data__ = node.__data__;\n        } else {\n          subgroup.push(null);\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  function d3_selection_selector(selector) {\n    return typeof selector === \"function\" ? selector : function() {\n      return d3_select(selector, this);\n    };\n  }\n  d3_selectionPrototype.selectAll = function(selector) {\n    var subgroups = [], subgroup, node;\n    selector = d3_selection_selectorAll(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j)));\n          subgroup.parentNode = node;\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  function d3_selection_selectorAll(selector) {\n    return typeof selector === \"function\" ? selector : function() {\n      return d3_selectAll(selector, this);\n    };\n  }\n  var d3_nsXhtml = \"http://www.w3.org/1999/xhtml\";\n  var d3_nsPrefix = {\n    svg: \"http://www.w3.org/2000/svg\",\n    xhtml: d3_nsXhtml,\n    xlink: \"http://www.w3.org/1999/xlink\",\n    xml: \"http://www.w3.org/XML/1998/namespace\",\n    xmlns: \"http://www.w3.org/2000/xmlns/\"\n  };\n  d3.ns = {\n    prefix: d3_nsPrefix,\n    qualify: function(name) {\n      var i = name.indexOf(\":\"), prefix = name;\n      if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n      return d3_nsPrefix.hasOwnProperty(prefix) ? {\n        space: d3_nsPrefix[prefix],\n        local: name\n      } : name;\n    }\n  };\n  d3_selectionPrototype.attr = function(name, value) {\n    if (arguments.length < 2) {\n      if (typeof name === \"string\") {\n        var node = this.node();\n        name = d3.ns.qualify(name);\n        return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);\n      }\n      for (value in name) this.each(d3_selection_attr(value, name[value]));\n      return this;\n    }\n    return this.each(d3_selection_attr(name, value));\n  };\n  function d3_selection_attr(name, value) {\n    name = d3.ns.qualify(name);\n    function attrNull() {\n      this.removeAttribute(name);\n    }\n    function attrNullNS() {\n      this.removeAttributeNS(name.space, name.local);\n    }\n    function attrConstant() {\n      this.setAttribute(name, value);\n    }\n    function attrConstantNS() {\n      this.setAttributeNS(name.space, name.local, value);\n    }\n    function attrFunction() {\n      var x = value.apply(this, arguments);\n      if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);\n    }\n    function attrFunctionNS() {\n      var x = value.apply(this, arguments);\n      if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);\n    }\n    return value == null ? name.local ? attrNullNS : attrNull : typeof value === \"function\" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;\n  }\n  function d3_collapse(s) {\n    return s.trim().replace(/\\s+/g, \" \");\n  }\n  d3_selectionPrototype.classed = function(name, value) {\n    if (arguments.length < 2) {\n      if (typeof name === \"string\") {\n        var node = this.node(), n = (name = d3_selection_classes(name)).length, i = -1;\n        if (value = node.classList) {\n          while (++i < n) if (!value.contains(name[i])) return false;\n        } else {\n          value = node.getAttribute(\"class\");\n          while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;\n        }\n        return true;\n      }\n      for (value in name) this.each(d3_selection_classed(value, name[value]));\n      return this;\n    }\n    return this.each(d3_selection_classed(name, value));\n  };\n  function d3_selection_classedRe(name) {\n    return new RegExp(\"(?:^|\\\\s+)\" + d3.requote(name) + \"(?:\\\\s+|$)\", \"g\");\n  }\n  function d3_selection_classes(name) {\n    return (name + \"\").trim().split(/^|\\s+/);\n  }\n  function d3_selection_classed(name, value) {\n    name = d3_selection_classes(name).map(d3_selection_classedName);\n    var n = name.length;\n    function classedConstant() {\n      var i = -1;\n      while (++i < n) name[i](this, value);\n    }\n    function classedFunction() {\n      var i = -1, x = value.apply(this, arguments);\n      while (++i < n) name[i](this, x);\n    }\n    return typeof value === \"function\" ? classedFunction : classedConstant;\n  }\n  function d3_selection_classedName(name) {\n    var re = d3_selection_classedRe(name);\n    return function(node, value) {\n      if (c = node.classList) return value ? c.add(name) : c.remove(name);\n      var c = node.getAttribute(\"class\") || \"\";\n      if (value) {\n        re.lastIndex = 0;\n        if (!re.test(c)) node.setAttribute(\"class\", d3_collapse(c + \" \" + name));\n      } else {\n        node.setAttribute(\"class\", d3_collapse(c.replace(re, \" \")));\n      }\n    };\n  }\n  d3_selectionPrototype.style = function(name, value, priority) {\n    var n = arguments.length;\n    if (n < 3) {\n      if (typeof name !== \"string\") {\n        if (n < 2) value = \"\";\n        for (priority in name) this.each(d3_selection_style(priority, name[priority], value));\n        return this;\n      }\n      if (n < 2) {\n        var node = this.node();\n        return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);\n      }\n      priority = \"\";\n    }\n    return this.each(d3_selection_style(name, value, priority));\n  };\n  function d3_selection_style(name, value, priority) {\n    function styleNull() {\n      this.style.removeProperty(name);\n    }\n    function styleConstant() {\n      this.style.setProperty(name, value, priority);\n    }\n    function styleFunction() {\n      var x = value.apply(this, arguments);\n      if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);\n    }\n    return value == null ? styleNull : typeof value === \"function\" ? styleFunction : styleConstant;\n  }\n  d3_selectionPrototype.property = function(name, value) {\n    if (arguments.length < 2) {\n      if (typeof name === \"string\") return this.node()[name];\n      for (value in name) this.each(d3_selection_property(value, name[value]));\n      return this;\n    }\n    return this.each(d3_selection_property(name, value));\n  };\n  function d3_selection_property(name, value) {\n    function propertyNull() {\n      delete this[name];\n    }\n    function propertyConstant() {\n      this[name] = value;\n    }\n    function propertyFunction() {\n      var x = value.apply(this, arguments);\n      if (x == null) delete this[name]; else this[name] = x;\n    }\n    return value == null ? propertyNull : typeof value === \"function\" ? propertyFunction : propertyConstant;\n  }\n  d3_selectionPrototype.text = function(value) {\n    return arguments.length ? this.each(typeof value === \"function\" ? function() {\n      var v = value.apply(this, arguments);\n      this.textContent = v == null ? \"\" : v;\n    } : value == null ? function() {\n      this.textContent = \"\";\n    } : function() {\n      this.textContent = value;\n    }) : this.node().textContent;\n  };\n  d3_selectionPrototype.html = function(value) {\n    return arguments.length ? this.each(typeof value === \"function\" ? function() {\n      var v = value.apply(this, arguments);\n      this.innerHTML = v == null ? \"\" : v;\n    } : value == null ? function() {\n      this.innerHTML = \"\";\n    } : function() {\n      this.innerHTML = value;\n    }) : this.node().innerHTML;\n  };\n  d3_selectionPrototype.append = function(name) {\n    name = d3_selection_creator(name);\n    return this.select(function() {\n      return this.appendChild(name.apply(this, arguments));\n    });\n  };\n  function d3_selection_creator(name) {\n    function create() {\n      var document = this.ownerDocument, namespace = this.namespaceURI;\n      return namespace === d3_nsXhtml && document.documentElement.namespaceURI === d3_nsXhtml ? document.createElement(name) : document.createElementNS(namespace, name);\n    }\n    function createNS() {\n      return this.ownerDocument.createElementNS(name.space, name.local);\n    }\n    return typeof name === \"function\" ? name : (name = d3.ns.qualify(name)).local ? createNS : create;\n  }\n  d3_selectionPrototype.insert = function(name, before) {\n    name = d3_selection_creator(name);\n    before = d3_selection_selector(before);\n    return this.select(function() {\n      return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null);\n    });\n  };\n  d3_selectionPrototype.remove = function() {\n    return this.each(d3_selectionRemove);\n  };\n  function d3_selectionRemove() {\n    var parent = this.parentNode;\n    if (parent) parent.removeChild(this);\n  }\n  d3_selectionPrototype.data = function(value, key) {\n    var i = -1, n = this.length, group, node;\n    if (!arguments.length) {\n      value = new Array(n = (group = this[0]).length);\n      while (++i < n) {\n        if (node = group[i]) {\n          value[i] = node.__data__;\n        }\n      }\n      return value;\n    }\n    function bind(group, groupData) {\n      var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;\n      if (key) {\n        var nodeByKeyValue = new d3_Map(), keyValues = new Array(n), keyValue;\n        for (i = -1; ++i < n; ) {\n          if (node = group[i]) {\n            if (nodeByKeyValue.has(keyValue = key.call(node, node.__data__, i))) {\n              exitNodes[i] = node;\n            } else {\n              nodeByKeyValue.set(keyValue, node);\n            }\n            keyValues[i] = keyValue;\n          }\n        }\n        for (i = -1; ++i < m; ) {\n          if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) {\n            enterNodes[i] = d3_selection_dataNode(nodeData);\n          } else if (node !== true) {\n            updateNodes[i] = node;\n            node.__data__ = nodeData;\n          }\n          nodeByKeyValue.set(keyValue, true);\n        }\n        for (i = -1; ++i < n; ) {\n          if (i in keyValues && nodeByKeyValue.get(keyValues[i]) !== true) {\n            exitNodes[i] = group[i];\n          }\n        }\n      } else {\n        for (i = -1; ++i < n0; ) {\n          node = group[i];\n          nodeData = groupData[i];\n          if (node) {\n            node.__data__ = nodeData;\n            updateNodes[i] = node;\n          } else {\n            enterNodes[i] = d3_selection_dataNode(nodeData);\n          }\n        }\n        for (;i < m; ++i) {\n          enterNodes[i] = d3_selection_dataNode(groupData[i]);\n        }\n        for (;i < n; ++i) {\n          exitNodes[i] = group[i];\n        }\n      }\n      enterNodes.update = updateNodes;\n      enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;\n      enter.push(enterNodes);\n      update.push(updateNodes);\n      exit.push(exitNodes);\n    }\n    var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);\n    if (typeof value === \"function\") {\n      while (++i < n) {\n        bind(group = this[i], value.call(group, group.parentNode.__data__, i));\n      }\n    } else {\n      while (++i < n) {\n        bind(group = this[i], value);\n      }\n    }\n    update.enter = function() {\n      return enter;\n    };\n    update.exit = function() {\n      return exit;\n    };\n    return update;\n  };\n  function d3_selection_dataNode(data) {\n    return {\n      __data__: data\n    };\n  }\n  d3_selectionPrototype.datum = function(value) {\n    return arguments.length ? this.property(\"__data__\", value) : this.property(\"__data__\");\n  };\n  d3_selectionPrototype.filter = function(filter) {\n    var subgroups = [], subgroup, group, node;\n    if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n    for (var j = 0, m = this.length; j < m; j++) {\n      subgroups.push(subgroup = []);\n      subgroup.parentNode = (group = this[j]).parentNode;\n      for (var i = 0, n = group.length; i < n; i++) {\n        if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {\n          subgroup.push(node);\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  function d3_selection_filter(selector) {\n    return function() {\n      return d3_selectMatches(this, selector);\n    };\n  }\n  d3_selectionPrototype.order = function() {\n    for (var j = -1, m = this.length; ++j < m; ) {\n      for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {\n        if (node = group[i]) {\n          if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n          next = node;\n        }\n      }\n    }\n    return this;\n  };\n  d3_selectionPrototype.sort = function(comparator) {\n    comparator = d3_selection_sortComparator.apply(this, arguments);\n    for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);\n    return this.order();\n  };\n  function d3_selection_sortComparator(comparator) {\n    if (!arguments.length) comparator = d3_ascending;\n    return function(a, b) {\n      return a && b ? comparator(a.__data__, b.__data__) : !a - !b;\n    };\n  }\n  d3_selectionPrototype.each = function(callback) {\n    return d3_selection_each(this, function(node, i, j) {\n      callback.call(node, node.__data__, i, j);\n    });\n  };\n  function d3_selection_each(groups, callback) {\n    for (var j = 0, m = groups.length; j < m; j++) {\n      for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {\n        if (node = group[i]) callback(node, i, j);\n      }\n    }\n    return groups;\n  }\n  d3_selectionPrototype.call = function(callback) {\n    var args = d3_array(arguments);\n    callback.apply(args[0] = this, args);\n    return this;\n  };\n  d3_selectionPrototype.empty = function() {\n    return !this.node();\n  };\n  d3_selectionPrototype.node = function() {\n    for (var j = 0, m = this.length; j < m; j++) {\n      for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n        var node = group[i];\n        if (node) return node;\n      }\n    }\n    return null;\n  };\n  d3_selectionPrototype.size = function() {\n    var n = 0;\n    d3_selection_each(this, function() {\n      ++n;\n    });\n    return n;\n  };\n  function d3_selection_enter(selection) {\n    d3_subclass(selection, d3_selection_enterPrototype);\n    return selection;\n  }\n  var d3_selection_enterPrototype = [];\n  d3.selection.enter = d3_selection_enter;\n  d3.selection.enter.prototype = d3_selection_enterPrototype;\n  d3_selection_enterPrototype.append = d3_selectionPrototype.append;\n  d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;\n  d3_selection_enterPrototype.node = d3_selectionPrototype.node;\n  d3_selection_enterPrototype.call = d3_selectionPrototype.call;\n  d3_selection_enterPrototype.size = d3_selectionPrototype.size;\n  d3_selection_enterPrototype.select = function(selector) {\n    var subgroups = [], subgroup, subnode, upgroup, group, node;\n    for (var j = -1, m = this.length; ++j < m; ) {\n      upgroup = (group = this[j]).update;\n      subgroups.push(subgroup = []);\n      subgroup.parentNode = group.parentNode;\n      for (var i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j));\n          subnode.__data__ = node.__data__;\n        } else {\n          subgroup.push(null);\n        }\n      }\n    }\n    return d3_selection(subgroups);\n  };\n  d3_selection_enterPrototype.insert = function(name, before) {\n    if (arguments.length < 2) before = d3_selection_enterInsertBefore(this);\n    return d3_selectionPrototype.insert.call(this, name, before);\n  };\n  function d3_selection_enterInsertBefore(enter) {\n    var i0, j0;\n    return function(d, i, j) {\n      var group = enter[j].update, n = group.length, node;\n      if (j != j0) j0 = j, i0 = 0;\n      if (i >= i0) i0 = i + 1;\n      while (!(node = group[i0]) && ++i0 < n) ;\n      return node;\n    };\n  }\n  d3.select = function(node) {\n    var group;\n    if (typeof node === \"string\") {\n      group = [ d3_select(node, d3_document) ];\n      group.parentNode = d3_document.documentElement;\n    } else {\n      group = [ node ];\n      group.parentNode = d3_documentElement(node);\n    }\n    return d3_selection([ group ]);\n  };\n  d3.selectAll = function(nodes) {\n    var group;\n    if (typeof nodes === \"string\") {\n      group = d3_array(d3_selectAll(nodes, d3_document));\n      group.parentNode = d3_document.documentElement;\n    } else {\n      group = d3_array(nodes);\n      group.parentNode = null;\n    }\n    return d3_selection([ group ]);\n  };\n  d3_selectionPrototype.on = function(type, listener, capture) {\n    var n = arguments.length;\n    if (n < 3) {\n      if (typeof type !== \"string\") {\n        if (n < 2) listener = false;\n        for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));\n        return this;\n      }\n      if (n < 2) return (n = this.node()[\"__on\" + type]) && n._;\n      capture = false;\n    }\n    return this.each(d3_selection_on(type, listener, capture));\n  };\n  function d3_selection_on(type, listener, capture) {\n    var name = \"__on\" + type, i = type.indexOf(\".\"), wrap = d3_selection_onListener;\n    if (i > 0) type = type.slice(0, i);\n    var filter = d3_selection_onFilters.get(type);\n    if (filter) type = filter, wrap = d3_selection_onFilter;\n    function onRemove() {\n      var l = this[name];\n      if (l) {\n        this.removeEventListener(type, l, l.$);\n        delete this[name];\n      }\n    }\n    function onAdd() {\n      var l = wrap(listener, d3_array(arguments));\n      onRemove.call(this);\n      this.addEventListener(type, this[name] = l, l.$ = capture);\n      l._ = listener;\n    }\n    function removeAll() {\n      var re = new RegExp(\"^__on([^.]+)\" + d3.requote(type) + \"$\"), match;\n      for (var name in this) {\n        if (match = name.match(re)) {\n          var l = this[name];\n          this.removeEventListener(match[1], l, l.$);\n          delete this[name];\n        }\n      }\n    }\n    return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;\n  }\n  var d3_selection_onFilters = d3.map({\n    mouseenter: \"mouseover\",\n    mouseleave: \"mouseout\"\n  });\n  if (d3_document) {\n    d3_selection_onFilters.forEach(function(k) {\n      if (\"on\" + k in d3_document) d3_selection_onFilters.remove(k);\n    });\n  }\n  function d3_selection_onListener(listener, argumentz) {\n    return function(e) {\n      var o = d3.event;\n      d3.event = e;\n      argumentz[0] = this.__data__;\n      try {\n        listener.apply(this, argumentz);\n      } finally {\n        d3.event = o;\n      }\n    };\n  }\n  function d3_selection_onFilter(listener, argumentz) {\n    var l = d3_selection_onListener(listener, argumentz);\n    return function(e) {\n      var target = this, related = e.relatedTarget;\n      if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {\n        l.call(target, e);\n      }\n    };\n  }\n  var d3_event_dragSelect, d3_event_dragId = 0;\n  function d3_event_dragSuppress(node) {\n    var name = \".dragsuppress-\" + ++d3_event_dragId, click = \"click\" + name, w = d3.select(d3_window(node)).on(\"touchmove\" + name, d3_eventPreventDefault).on(\"dragstart\" + name, d3_eventPreventDefault).on(\"selectstart\" + name, d3_eventPreventDefault);\n    if (d3_event_dragSelect == null) {\n      d3_event_dragSelect = \"onselectstart\" in node ? false : d3_vendorSymbol(node.style, \"userSelect\");\n    }\n    if (d3_event_dragSelect) {\n      var style = d3_documentElement(node).style, select = style[d3_event_dragSelect];\n      style[d3_event_dragSelect] = \"none\";\n    }\n    return function(suppressClick) {\n      w.on(name, null);\n      if (d3_event_dragSelect) style[d3_event_dragSelect] = select;\n      if (suppressClick) {\n        var off = function() {\n          w.on(click, null);\n        };\n        w.on(click, function() {\n          d3_eventPreventDefault();\n          off();\n        }, true);\n        setTimeout(off, 0);\n      }\n    };\n  }\n  d3.mouse = function(container) {\n    return d3_mousePoint(container, d3_eventSource());\n  };\n  var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;\n  function d3_mousePoint(container, e) {\n    if (e.changedTouches) e = e.changedTouches[0];\n    var svg = container.ownerSVGElement || container;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      if (d3_mouse_bug44083 < 0) {\n        var window = d3_window(container);\n        if (window.scrollX || window.scrollY) {\n          svg = d3.select(\"body\").append(\"svg\").style({\n            position: \"absolute\",\n            top: 0,\n            left: 0,\n            margin: 0,\n            padding: 0,\n            border: \"none\"\n          }, \"important\");\n          var ctm = svg[0][0].getScreenCTM();\n          d3_mouse_bug44083 = !(ctm.f || ctm.e);\n          svg.remove();\n        }\n      }\n      if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX, \n      point.y = e.clientY;\n      point = point.matrixTransform(container.getScreenCTM().inverse());\n      return [ point.x, point.y ];\n    }\n    var rect = container.getBoundingClientRect();\n    return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];\n  }\n  d3.touch = function(container, touches, identifier) {\n    if (arguments.length < 3) identifier = touches, touches = d3_eventSource().changedTouches;\n    if (touches) for (var i = 0, n = touches.length, touch; i < n; ++i) {\n      if ((touch = touches[i]).identifier === identifier) {\n        return d3_mousePoint(container, touch);\n      }\n    }\n  };\n  d3.behavior.drag = function() {\n    var event = d3_eventDispatch(drag, \"drag\", \"dragstart\", \"dragend\"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, \"mousemove\", \"mouseup\"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, \"touchmove\", \"touchend\");\n    function drag() {\n      this.on(\"mousedown.drag\", mousedown).on(\"touchstart.drag\", touchstart);\n    }\n    function dragstart(id, position, subject, move, end) {\n      return function() {\n        var that = this, target = d3.event.target.correspondingElement || d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = \".drag\" + (dragId == null ? \"\" : \"-\" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId);\n        if (origin) {\n          dragOffset = origin.apply(that, arguments);\n          dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ];\n        } else {\n          dragOffset = [ 0, 0 ];\n        }\n        dispatch({\n          type: \"dragstart\"\n        });\n        function moved() {\n          var position1 = position(parent, dragId), dx, dy;\n          if (!position1) return;\n          dx = position1[0] - position0[0];\n          dy = position1[1] - position0[1];\n          dragged |= dx | dy;\n          position0 = position1;\n          dispatch({\n            type: \"drag\",\n            x: position1[0] + dragOffset[0],\n            y: position1[1] + dragOffset[1],\n            dx: dx,\n            dy: dy\n          });\n        }\n        function ended() {\n          if (!position(parent, dragId)) return;\n          dragSubject.on(move + dragName, null).on(end + dragName, null);\n          dragRestore(dragged);\n          dispatch({\n            type: \"dragend\"\n          });\n        }\n      };\n    }\n    drag.origin = function(x) {\n      if (!arguments.length) return origin;\n      origin = x;\n      return drag;\n    };\n    return d3.rebind(drag, event, \"on\");\n  };\n  function d3_behavior_dragTouchId() {\n    return d3.event.changedTouches[0].identifier;\n  }\n  d3.touches = function(container, touches) {\n    if (arguments.length < 2) touches = d3_eventSource().touches;\n    return touches ? d3_array(touches).map(function(touch) {\n      var point = d3_mousePoint(container, touch);\n      point.identifier = touch.identifier;\n      return point;\n    }) : [];\n  };\n  var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;\n  function d3_sgn(x) {\n    return x > 0 ? 1 : x < 0 ? -1 : 0;\n  }\n  function d3_cross2d(a, b, c) {\n    return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n  }\n  function d3_acos(x) {\n    return x > 1 ? 0 : x < -1 ? π : Math.acos(x);\n  }\n  function d3_asin(x) {\n    return x > 1 ? halfπ : x < -1 ? -halfπ : Math.asin(x);\n  }\n  function d3_sinh(x) {\n    return ((x = Math.exp(x)) - 1 / x) / 2;\n  }\n  function d3_cosh(x) {\n    return ((x = Math.exp(x)) + 1 / x) / 2;\n  }\n  function d3_tanh(x) {\n    return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n  }\n  function d3_haversin(x) {\n    return (x = Math.sin(x / 2)) * x;\n  }\n  var ρ = Math.SQRT2, ρ2 = 2, ρ4 = 4;\n  d3.interpolateZoom = function(p0, p1) {\n    var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;\n    if (d2 < ε2) {\n      S = Math.log(w1 / w0) / ρ;\n      i = function(t) {\n        return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(ρ * t * S) ];\n      };\n    } else {\n      var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + ρ4 * d2) / (2 * w0 * ρ2 * d1), b1 = (w1 * w1 - w0 * w0 - ρ4 * d2) / (2 * w1 * ρ2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n      S = (r1 - r0) / ρ;\n      i = function(t) {\n        var s = t * S, coshr0 = d3_cosh(r0), u = w0 / (ρ2 * d1) * (coshr0 * d3_tanh(ρ * s + r0) - d3_sinh(r0));\n        return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(ρ * s + r0) ];\n      };\n    }\n    i.duration = S * 1e3;\n    return i;\n  };\n  d3.behavior.zoom = function() {\n    var view = {\n      x: 0,\n      y: 0,\n      k: 1\n    }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = \"mousedown.zoom\", mousemove = \"mousemove.zoom\", mouseup = \"mouseup.zoom\", mousewheelTimer, touchstart = \"touchstart.zoom\", touchtime, event = d3_eventDispatch(zoom, \"zoomstart\", \"zoom\", \"zoomend\"), x0, x1, y0, y1;\n    if (!d3_behavior_zoomWheel) {\n      d3_behavior_zoomWheel = \"onwheel\" in d3_document ? (d3_behavior_zoomDelta = function() {\n        return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);\n      }, \"wheel\") : \"onmousewheel\" in d3_document ? (d3_behavior_zoomDelta = function() {\n        return d3.event.wheelDelta;\n      }, \"mousewheel\") : (d3_behavior_zoomDelta = function() {\n        return -d3.event.detail;\n      }, \"MozMousePixelScroll\");\n    }\n    function zoom(g) {\n      g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + \".zoom\", mousewheeled).on(\"dblclick.zoom\", dblclicked).on(touchstart, touchstarted);\n    }\n    zoom.event = function(g) {\n      g.each(function() {\n        var dispatch = event.of(this, arguments), view1 = view;\n        if (d3_transitionInheritId) {\n          d3.select(this).transition().each(\"start.zoom\", function() {\n            view = this.__chart__ || {\n              x: 0,\n              y: 0,\n              k: 1\n            };\n            zoomstarted(dispatch);\n          }).tween(\"zoom:zoom\", function() {\n            var dx = size[0], dy = size[1], cx = center0 ? center0[0] : dx / 2, cy = center0 ? center0[1] : dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]);\n            return function(t) {\n              var l = i(t), k = dx / l[2];\n              this.__chart__ = view = {\n                x: cx - l[0] * k,\n                y: cy - l[1] * k,\n                k: k\n              };\n              zoomed(dispatch);\n            };\n          }).each(\"interrupt.zoom\", function() {\n            zoomended(dispatch);\n          }).each(\"end.zoom\", function() {\n            zoomended(dispatch);\n          });\n        } else {\n          this.__chart__ = view;\n          zoomstarted(dispatch);\n          zoomed(dispatch);\n          zoomended(dispatch);\n        }\n      });\n    };\n    zoom.translate = function(_) {\n      if (!arguments.length) return [ view.x, view.y ];\n      view = {\n        x: +_[0],\n        y: +_[1],\n        k: view.k\n      };\n      rescale();\n      return zoom;\n    };\n    zoom.scale = function(_) {\n      if (!arguments.length) return view.k;\n      view = {\n        x: view.x,\n        y: view.y,\n        k: null\n      };\n      scaleTo(+_);\n      rescale();\n      return zoom;\n    };\n    zoom.scaleExtent = function(_) {\n      if (!arguments.length) return scaleExtent;\n      scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ];\n      return zoom;\n    };\n    zoom.center = function(_) {\n      if (!arguments.length) return center;\n      center = _ && [ +_[0], +_[1] ];\n      return zoom;\n    };\n    zoom.size = function(_) {\n      if (!arguments.length) return size;\n      size = _ && [ +_[0], +_[1] ];\n      return zoom;\n    };\n    zoom.duration = function(_) {\n      if (!arguments.length) return duration;\n      duration = +_;\n      return zoom;\n    };\n    zoom.x = function(z) {\n      if (!arguments.length) return x1;\n      x1 = z;\n      x0 = z.copy();\n      view = {\n        x: 0,\n        y: 0,\n        k: 1\n      };\n      return zoom;\n    };\n    zoom.y = function(z) {\n      if (!arguments.length) return y1;\n      y1 = z;\n      y0 = z.copy();\n      view = {\n        x: 0,\n        y: 0,\n        k: 1\n      };\n      return zoom;\n    };\n    function location(p) {\n      return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ];\n    }\n    function point(l) {\n      return [ l[0] * view.k + view.x, l[1] * view.k + view.y ];\n    }\n    function scaleTo(s) {\n      view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));\n    }\n    function translateTo(p, l) {\n      l = point(l);\n      view.x += p[0] - l[0];\n      view.y += p[1] - l[1];\n    }\n    function zoomTo(that, p, l, k) {\n      that.__chart__ = {\n        x: view.x,\n        y: view.y,\n        k: view.k\n      };\n      scaleTo(Math.pow(2, k));\n      translateTo(center0 = p, l);\n      that = d3.select(that);\n      if (duration > 0) that = that.transition().duration(duration);\n      that.call(zoom.event);\n    }\n    function rescale() {\n      if (x1) x1.domain(x0.range().map(function(x) {\n        return (x - view.x) / view.k;\n      }).map(x0.invert));\n      if (y1) y1.domain(y0.range().map(function(y) {\n        return (y - view.y) / view.k;\n      }).map(y0.invert));\n    }\n    function zoomstarted(dispatch) {\n      if (!zooming++) dispatch({\n        type: \"zoomstart\"\n      });\n    }\n    function zoomed(dispatch) {\n      rescale();\n      dispatch({\n        type: \"zoom\",\n        scale: view.k,\n        translate: [ view.x, view.y ]\n      });\n    }\n    function zoomended(dispatch) {\n      if (!--zooming) dispatch({\n        type: \"zoomend\"\n      }), center0 = null;\n    }\n    function mousedowned() {\n      var that = this, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);\n      d3_selection_interrupt.call(that);\n      zoomstarted(dispatch);\n      function moved() {\n        dragged = 1;\n        translateTo(d3.mouse(that), location0);\n        zoomed(dispatch);\n      }\n      function ended() {\n        subject.on(mousemove, null).on(mouseup, null);\n        dragRestore(dragged);\n        zoomended(dispatch);\n      }\n    }\n    function touchstarted() {\n      var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = \".zoom-\" + d3.event.changedTouches[0].identifier, touchmove = \"touchmove\" + zoomName, touchend = \"touchend\" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that);\n      started();\n      zoomstarted(dispatch);\n      subject.on(mousedown, null).on(touchstart, started);\n      function relocate() {\n        var touches = d3.touches(that);\n        scale0 = view.k;\n        touches.forEach(function(t) {\n          if (t.identifier in locations0) locations0[t.identifier] = location(t);\n        });\n        return touches;\n      }\n      function started() {\n        var target = d3.event.target;\n        d3.select(target).on(touchmove, moved).on(touchend, ended);\n        targets.push(target);\n        var changed = d3.event.changedTouches;\n        for (var i = 0, n = changed.length; i < n; ++i) {\n          locations0[changed[i].identifier] = null;\n        }\n        var touches = relocate(), now = Date.now();\n        if (touches.length === 1) {\n          if (now - touchtime < 500) {\n            var p = touches[0];\n            zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1);\n            d3_eventPreventDefault();\n          }\n          touchtime = now;\n        } else if (touches.length > 1) {\n          var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1];\n          distance0 = dx * dx + dy * dy;\n        }\n      }\n      function moved() {\n        var touches = d3.touches(that), p0, l0, p1, l1;\n        d3_selection_interrupt.call(that);\n        for (var i = 0, n = touches.length; i < n; ++i, l1 = null) {\n          p1 = touches[i];\n          if (l1 = locations0[p1.identifier]) {\n            if (l0) break;\n            p0 = p1, l0 = l1;\n          }\n        }\n        if (l1) {\n          var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0);\n          p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];\n          l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];\n          scaleTo(scale1 * scale0);\n        }\n        touchtime = null;\n        translateTo(p0, l0);\n        zoomed(dispatch);\n      }\n      function ended() {\n        if (d3.event.touches.length) {\n          var changed = d3.event.changedTouches;\n          for (var i = 0, n = changed.length; i < n; ++i) {\n            delete locations0[changed[i].identifier];\n          }\n          for (var identifier in locations0) {\n            return void relocate();\n          }\n        }\n        d3.selectAll(targets).on(zoomName, null);\n        subject.on(mousedown, mousedowned).on(touchstart, touchstarted);\n        dragRestore();\n        zoomended(dispatch);\n      }\n    }\n    function mousewheeled() {\n      var dispatch = event.of(this, arguments);\n      if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this), \n      translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch);\n      mousewheelTimer = setTimeout(function() {\n        mousewheelTimer = null;\n        zoomended(dispatch);\n      }, 50);\n      d3_eventPreventDefault();\n      scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);\n      translateTo(center0, translate0);\n      zoomed(dispatch);\n    }\n    function dblclicked() {\n      var p = d3.mouse(this), k = Math.log(view.k) / Math.LN2;\n      zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1);\n    }\n    return d3.rebind(zoom, event, \"on\");\n  };\n  var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel;\n  d3.color = d3_color;\n  function d3_color() {}\n  d3_color.prototype.toString = function() {\n    return this.rgb() + \"\";\n  };\n  d3.hsl = d3_hsl;\n  function d3_hsl(h, s, l) {\n    return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l) : arguments.length < 2 ? h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l) : d3_rgb_parse(\"\" + h, d3_rgb_hsl, d3_hsl) : new d3_hsl(h, s, l);\n  }\n  var d3_hslPrototype = d3_hsl.prototype = new d3_color();\n  d3_hslPrototype.brighter = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    return new d3_hsl(this.h, this.s, this.l / k);\n  };\n  d3_hslPrototype.darker = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    return new d3_hsl(this.h, this.s, k * this.l);\n  };\n  d3_hslPrototype.rgb = function() {\n    return d3_hsl_rgb(this.h, this.s, this.l);\n  };\n  function d3_hsl_rgb(h, s, l) {\n    var m1, m2;\n    h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h;\n    s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s;\n    l = l < 0 ? 0 : l > 1 ? 1 : l;\n    m2 = l <= .5 ? l * (1 + s) : l + s - l * s;\n    m1 = 2 * l - m2;\n    function v(h) {\n      if (h > 360) h -= 360; else if (h < 0) h += 360;\n      if (h < 60) return m1 + (m2 - m1) * h / 60;\n      if (h < 180) return m2;\n      if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;\n      return m1;\n    }\n    function vv(h) {\n      return Math.round(v(h) * 255);\n    }\n    return new d3_rgb(vv(h + 120), vv(h), vv(h - 120));\n  }\n  d3.hcl = d3_hcl;\n  function d3_hcl(h, c, l) {\n    return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l) : arguments.length < 2 ? h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l) : h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : new d3_hcl(h, c, l);\n  }\n  var d3_hclPrototype = d3_hcl.prototype = new d3_color();\n  d3_hclPrototype.brighter = function(k) {\n    return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));\n  };\n  d3_hclPrototype.darker = function(k) {\n    return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));\n  };\n  d3_hclPrototype.rgb = function() {\n    return d3_hcl_lab(this.h, this.c, this.l).rgb();\n  };\n  function d3_hcl_lab(h, c, l) {\n    if (isNaN(h)) h = 0;\n    if (isNaN(c)) c = 0;\n    return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);\n  }\n  d3.lab = d3_lab;\n  function d3_lab(l, a, b) {\n    return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b) : arguments.length < 2 ? l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b) : l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l) : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b) : new d3_lab(l, a, b);\n  }\n  var d3_lab_K = 18;\n  var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;\n  var d3_labPrototype = d3_lab.prototype = new d3_color();\n  d3_labPrototype.brighter = function(k) {\n    return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);\n  };\n  d3_labPrototype.darker = function(k) {\n    return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);\n  };\n  d3_labPrototype.rgb = function() {\n    return d3_lab_rgb(this.l, this.a, this.b);\n  };\n  function d3_lab_rgb(l, a, b) {\n    var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;\n    x = d3_lab_xyz(x) * d3_lab_X;\n    y = d3_lab_xyz(y) * d3_lab_Y;\n    z = d3_lab_xyz(z) * d3_lab_Z;\n    return new d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));\n  }\n  function d3_lab_hcl(l, a, b) {\n    return l > 0 ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : new d3_hcl(NaN, NaN, l);\n  }\n  function d3_lab_xyz(x) {\n    return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;\n  }\n  function d3_xyz_lab(x) {\n    return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;\n  }\n  function d3_xyz_rgb(r) {\n    return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));\n  }\n  d3.rgb = d3_rgb;\n  function d3_rgb(r, g, b) {\n    return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b) : arguments.length < 2 ? r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b) : d3_rgb_parse(\"\" + r, d3_rgb, d3_hsl_rgb) : new d3_rgb(r, g, b);\n  }\n  function d3_rgbNumber(value) {\n    return new d3_rgb(value >> 16, value >> 8 & 255, value & 255);\n  }\n  function d3_rgbString(value) {\n    return d3_rgbNumber(value) + \"\";\n  }\n  var d3_rgbPrototype = d3_rgb.prototype = new d3_color();\n  d3_rgbPrototype.brighter = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    var r = this.r, g = this.g, b = this.b, i = 30;\n    if (!r && !g && !b) return new d3_rgb(i, i, i);\n    if (r && r < i) r = i;\n    if (g && g < i) g = i;\n    if (b && b < i) b = i;\n    return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k));\n  };\n  d3_rgbPrototype.darker = function(k) {\n    k = Math.pow(.7, arguments.length ? k : 1);\n    return new d3_rgb(k * this.r, k * this.g, k * this.b);\n  };\n  d3_rgbPrototype.hsl = function() {\n    return d3_rgb_hsl(this.r, this.g, this.b);\n  };\n  d3_rgbPrototype.toString = function() {\n    return \"#\" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);\n  };\n  function d3_rgb_hex(v) {\n    return v < 16 ? \"0\" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);\n  }\n  function d3_rgb_parse(format, rgb, hsl) {\n    var r = 0, g = 0, b = 0, m1, m2, color;\n    m1 = /([a-z]+)\\((.*)\\)/.exec(format = format.toLowerCase());\n    if (m1) {\n      m2 = m1[2].split(\",\");\n      switch (m1[1]) {\n       case \"hsl\":\n        {\n          return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);\n        }\n\n       case \"rgb\":\n        {\n          return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));\n        }\n      }\n    }\n    if (color = d3_rgb_names.get(format)) {\n      return rgb(color.r, color.g, color.b);\n    }\n    if (format != null && format.charAt(0) === \"#\" && !isNaN(color = parseInt(format.slice(1), 16))) {\n      if (format.length === 4) {\n        r = (color & 3840) >> 4;\n        r = r >> 4 | r;\n        g = color & 240;\n        g = g >> 4 | g;\n        b = color & 15;\n        b = b << 4 | b;\n      } else if (format.length === 7) {\n        r = (color & 16711680) >> 16;\n        g = (color & 65280) >> 8;\n        b = color & 255;\n      }\n    }\n    return rgb(r, g, b);\n  }\n  function d3_rgb_hsl(r, g, b) {\n    var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;\n    if (d) {\n      s = l < .5 ? d / (max + min) : d / (2 - max - min);\n      if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;\n      h *= 60;\n    } else {\n      h = NaN;\n      s = l > 0 && l < 1 ? 0 : h;\n    }\n    return new d3_hsl(h, s, l);\n  }\n  function d3_rgb_lab(r, g, b) {\n    r = d3_rgb_xyz(r);\n    g = d3_rgb_xyz(g);\n    b = d3_rgb_xyz(b);\n    var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);\n    return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));\n  }\n  function d3_rgb_xyz(r) {\n    return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);\n  }\n  function d3_rgb_parseNumber(c) {\n    var f = parseFloat(c);\n    return c.charAt(c.length - 1) === \"%\" ? Math.round(f * 2.55) : f;\n  }\n  var d3_rgb_names = d3.map({\n    aliceblue: 15792383,\n    antiquewhite: 16444375,\n    aqua: 65535,\n    aquamarine: 8388564,\n    azure: 15794175,\n    beige: 16119260,\n    bisque: 16770244,\n    black: 0,\n    blanchedalmond: 16772045,\n    blue: 255,\n    blueviolet: 9055202,\n    brown: 10824234,\n    burlywood: 14596231,\n    cadetblue: 6266528,\n    chartreuse: 8388352,\n    chocolate: 13789470,\n    coral: 16744272,\n    cornflowerblue: 6591981,\n    cornsilk: 16775388,\n    crimson: 14423100,\n    cyan: 65535,\n    darkblue: 139,\n    darkcyan: 35723,\n    darkgoldenrod: 12092939,\n    darkgray: 11119017,\n    darkgreen: 25600,\n    darkgrey: 11119017,\n    darkkhaki: 12433259,\n    darkmagenta: 9109643,\n    darkolivegreen: 5597999,\n    darkorange: 16747520,\n    darkorchid: 10040012,\n    darkred: 9109504,\n    darksalmon: 15308410,\n    darkseagreen: 9419919,\n    darkslateblue: 4734347,\n    darkslategray: 3100495,\n    darkslategrey: 3100495,\n    darkturquoise: 52945,\n    darkviolet: 9699539,\n    deeppink: 16716947,\n    deepskyblue: 49151,\n    dimgray: 6908265,\n    dimgrey: 6908265,\n    dodgerblue: 2003199,\n    firebrick: 11674146,\n    floralwhite: 16775920,\n    forestgreen: 2263842,\n    fuchsia: 16711935,\n    gainsboro: 14474460,\n    ghostwhite: 16316671,\n    gold: 16766720,\n    goldenrod: 14329120,\n    gray: 8421504,\n    green: 32768,\n    greenyellow: 11403055,\n    grey: 8421504,\n    honeydew: 15794160,\n    hotpink: 16738740,\n    indianred: 13458524,\n    indigo: 4915330,\n    ivory: 16777200,\n    khaki: 15787660,\n    lavender: 15132410,\n    lavenderblush: 16773365,\n    lawngreen: 8190976,\n    lemonchiffon: 16775885,\n    lightblue: 11393254,\n    lightcoral: 15761536,\n    lightcyan: 14745599,\n    lightgoldenrodyellow: 16448210,\n    lightgray: 13882323,\n    lightgreen: 9498256,\n    lightgrey: 13882323,\n    lightpink: 16758465,\n    lightsalmon: 16752762,\n    lightseagreen: 2142890,\n    lightskyblue: 8900346,\n    lightslategray: 7833753,\n    lightslategrey: 7833753,\n    lightsteelblue: 11584734,\n    lightyellow: 16777184,\n    lime: 65280,\n    limegreen: 3329330,\n    linen: 16445670,\n    magenta: 16711935,\n    maroon: 8388608,\n    mediumaquamarine: 6737322,\n    mediumblue: 205,\n    mediumorchid: 12211667,\n    mediumpurple: 9662683,\n    mediumseagreen: 3978097,\n    mediumslateblue: 8087790,\n    mediumspringgreen: 64154,\n    mediumturquoise: 4772300,\n    mediumvioletred: 13047173,\n    midnightblue: 1644912,\n    mintcream: 16121850,\n    mistyrose: 16770273,\n    moccasin: 16770229,\n    navajowhite: 16768685,\n    navy: 128,\n    oldlace: 16643558,\n    olive: 8421376,\n    olivedrab: 7048739,\n    orange: 16753920,\n    orangered: 16729344,\n    orchid: 14315734,\n    palegoldenrod: 15657130,\n    palegreen: 10025880,\n    paleturquoise: 11529966,\n    palevioletred: 14381203,\n    papayawhip: 16773077,\n    peachpuff: 16767673,\n    peru: 13468991,\n    pink: 16761035,\n    plum: 14524637,\n    powderblue: 11591910,\n    purple: 8388736,\n    rebeccapurple: 6697881,\n    red: 16711680,\n    rosybrown: 12357519,\n    royalblue: 4286945,\n    saddlebrown: 9127187,\n    salmon: 16416882,\n    sandybrown: 16032864,\n    seagreen: 3050327,\n    seashell: 16774638,\n    sienna: 10506797,\n    silver: 12632256,\n    skyblue: 8900331,\n    slateblue: 6970061,\n    slategray: 7372944,\n    slategrey: 7372944,\n    snow: 16775930,\n    springgreen: 65407,\n    steelblue: 4620980,\n    tan: 13808780,\n    teal: 32896,\n    thistle: 14204888,\n    tomato: 16737095,\n    turquoise: 4251856,\n    violet: 15631086,\n    wheat: 16113331,\n    white: 16777215,\n    whitesmoke: 16119285,\n    yellow: 16776960,\n    yellowgreen: 10145074\n  });\n  d3_rgb_names.forEach(function(key, value) {\n    d3_rgb_names.set(key, d3_rgbNumber(value));\n  });\n  function d3_functor(v) {\n    return typeof v === \"function\" ? v : function() {\n      return v;\n    };\n  }\n  d3.functor = d3_functor;\n  d3.xhr = d3_xhrType(d3_identity);\n  function d3_xhrType(response) {\n    return function(url, mimeType, callback) {\n      if (arguments.length === 2 && typeof mimeType === \"function\") callback = mimeType, \n      mimeType = null;\n      return d3_xhr(url, mimeType, response, callback);\n    };\n  }\n  function d3_xhr(url, mimeType, response, callback) {\n    var xhr = {}, dispatch = d3.dispatch(\"beforesend\", \"progress\", \"load\", \"error\"), headers = {}, request = new XMLHttpRequest(), responseType = null;\n    if (this.XDomainRequest && !(\"withCredentials\" in request) && /^(http(s)?:)?\\/\\//.test(url)) request = new XDomainRequest();\n    \"onload\" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {\n      request.readyState > 3 && respond();\n    };\n    function respond() {\n      var status = request.status, result;\n      if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) {\n        try {\n          result = response.call(xhr, request);\n        } catch (e) {\n          dispatch.error.call(xhr, e);\n          return;\n        }\n        dispatch.load.call(xhr, result);\n      } else {\n        dispatch.error.call(xhr, request);\n      }\n    }\n    request.onprogress = function(event) {\n      var o = d3.event;\n      d3.event = event;\n      try {\n        dispatch.progress.call(xhr, request);\n      } finally {\n        d3.event = o;\n      }\n    };\n    xhr.header = function(name, value) {\n      name = (name + \"\").toLowerCase();\n      if (arguments.length < 2) return headers[name];\n      if (value == null) delete headers[name]; else headers[name] = value + \"\";\n      return xhr;\n    };\n    xhr.mimeType = function(value) {\n      if (!arguments.length) return mimeType;\n      mimeType = value == null ? null : value + \"\";\n      return xhr;\n    };\n    xhr.responseType = function(value) {\n      if (!arguments.length) return responseType;\n      responseType = value;\n      return xhr;\n    };\n    xhr.response = function(value) {\n      response = value;\n      return xhr;\n    };\n    [ \"get\", \"post\" ].forEach(function(method) {\n      xhr[method] = function() {\n        return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));\n      };\n    });\n    xhr.send = function(method, data, callback) {\n      if (arguments.length === 2 && typeof data === \"function\") callback = data, data = null;\n      request.open(method, url, true);\n      if (mimeType != null && !(\"accept\" in headers)) headers[\"accept\"] = mimeType + \",*/*\";\n      if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);\n      if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);\n      if (responseType != null) request.responseType = responseType;\n      if (callback != null) xhr.on(\"error\", callback).on(\"load\", function(request) {\n        callback(null, request);\n      });\n      dispatch.beforesend.call(xhr, request);\n      request.send(data == null ? null : data);\n      return xhr;\n    };\n    xhr.abort = function() {\n      request.abort();\n      return xhr;\n    };\n    d3.rebind(xhr, dispatch, \"on\");\n    return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));\n  }\n  function d3_xhr_fixCallback(callback) {\n    return callback.length === 1 ? function(error, request) {\n      callback(error == null ? request : null);\n    } : callback;\n  }\n  function d3_xhrHasResponse(request) {\n    var type = request.responseType;\n    return type && type !== \"text\" ? request.response : request.responseText;\n  }\n  d3.dsv = function(delimiter, mimeType) {\n    var reFormat = new RegExp('[\"' + delimiter + \"\\n]\"), delimiterCode = delimiter.charCodeAt(0);\n    function dsv(url, row, callback) {\n      if (arguments.length < 3) callback = row, row = null;\n      var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);\n      xhr.row = function(_) {\n        return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;\n      };\n      return xhr;\n    }\n    function response(request) {\n      return dsv.parse(request.responseText);\n    }\n    function typedResponse(f) {\n      return function(request) {\n        return dsv.parse(request.responseText, f);\n      };\n    }\n    dsv.parse = function(text, f) {\n      var o;\n      return dsv.parseRows(text, function(row, i) {\n        if (o) return o(row, i - 1);\n        var a = new Function(\"d\", \"return {\" + row.map(function(name, i) {\n          return JSON.stringify(name) + \": d[\" + i + \"]\";\n        }).join(\",\") + \"}\");\n        o = f ? function(row, i) {\n          return f(a(row), i);\n        } : a;\n      });\n    };\n    dsv.parseRows = function(text, f) {\n      var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;\n      function token() {\n        if (I >= N) return EOF;\n        if (eol) return eol = false, EOL;\n        var j = I;\n        if (text.charCodeAt(j) === 34) {\n          var i = j;\n          while (i++ < N) {\n            if (text.charCodeAt(i) === 34) {\n              if (text.charCodeAt(i + 1) !== 34) break;\n              ++i;\n            }\n          }\n          I = i + 2;\n          var c = text.charCodeAt(i + 1);\n          if (c === 13) {\n            eol = true;\n            if (text.charCodeAt(i + 2) === 10) ++I;\n          } else if (c === 10) {\n            eol = true;\n          }\n          return text.slice(j + 1, i).replace(/\"\"/g, '\"');\n        }\n        while (I < N) {\n          var c = text.charCodeAt(I++), k = 1;\n          if (c === 10) eol = true; else if (c === 13) {\n            eol = true;\n            if (text.charCodeAt(I) === 10) ++I, ++k;\n          } else if (c !== delimiterCode) continue;\n          return text.slice(j, I - k);\n        }\n        return text.slice(j);\n      }\n      while ((t = token()) !== EOF) {\n        var a = [];\n        while (t !== EOL && t !== EOF) {\n          a.push(t);\n          t = token();\n        }\n        if (f && (a = f(a, n++)) == null) continue;\n        rows.push(a);\n      }\n      return rows;\n    };\n    dsv.format = function(rows) {\n      if (Array.isArray(rows[0])) return dsv.formatRows(rows);\n      var fieldSet = new d3_Set(), fields = [];\n      rows.forEach(function(row) {\n        for (var field in row) {\n          if (!fieldSet.has(field)) {\n            fields.push(fieldSet.add(field));\n          }\n        }\n      });\n      return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {\n        return fields.map(function(field) {\n          return formatValue(row[field]);\n        }).join(delimiter);\n      })).join(\"\\n\");\n    };\n    dsv.formatRows = function(rows) {\n      return rows.map(formatRow).join(\"\\n\");\n    };\n    function formatRow(row) {\n      return row.map(formatValue).join(delimiter);\n    }\n    function formatValue(text) {\n      return reFormat.test(text) ? '\"' + text.replace(/\\\"/g, '\"\"') + '\"' : text;\n    }\n    return dsv;\n  };\n  d3.csv = d3.dsv(\",\", \"text/csv\");\n  d3.tsv = d3.dsv(\"\t\", \"text/tab-separated-values\");\n  var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_frame = this[d3_vendorSymbol(this, \"requestAnimationFrame\")] || function(callback) {\n    setTimeout(callback, 17);\n  };\n  d3.timer = function() {\n    d3_timer.apply(this, arguments);\n  };\n  function d3_timer(callback, delay, then) {\n    var n = arguments.length;\n    if (n < 2) delay = 0;\n    if (n < 3) then = Date.now();\n    var time = then + delay, timer = {\n      c: callback,\n      t: time,\n      n: null\n    };\n    if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer;\n    d3_timer_queueTail = timer;\n    if (!d3_timer_interval) {\n      d3_timer_timeout = clearTimeout(d3_timer_timeout);\n      d3_timer_interval = 1;\n      d3_timer_frame(d3_timer_step);\n    }\n    return timer;\n  }\n  function d3_timer_step() {\n    var now = d3_timer_mark(), delay = d3_timer_sweep() - now;\n    if (delay > 24) {\n      if (isFinite(delay)) {\n        clearTimeout(d3_timer_timeout);\n        d3_timer_timeout = setTimeout(d3_timer_step, delay);\n      }\n      d3_timer_interval = 0;\n    } else {\n      d3_timer_interval = 1;\n      d3_timer_frame(d3_timer_step);\n    }\n  }\n  d3.timer.flush = function() {\n    d3_timer_mark();\n    d3_timer_sweep();\n  };\n  function d3_timer_mark() {\n    var now = Date.now(), timer = d3_timer_queueHead;\n    while (timer) {\n      if (now >= timer.t && timer.c(now - timer.t)) timer.c = null;\n      timer = timer.n;\n    }\n    return now;\n  }\n  function d3_timer_sweep() {\n    var t0, t1 = d3_timer_queueHead, time = Infinity;\n    while (t1) {\n      if (t1.c) {\n        if (t1.t < time) time = t1.t;\n        t1 = (t0 = t1).n;\n      } else {\n        t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n;\n      }\n    }\n    d3_timer_queueTail = t0;\n    return time;\n  }\n  function d3_format_precision(x, p) {\n    return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);\n  }\n  d3.round = function(x, n) {\n    return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);\n  };\n  var d3_formatPrefixes = [ \"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\" ].map(d3_formatPrefix);\n  d3.formatPrefix = function(value, precision) {\n    var i = 0;\n    if (value = +value) {\n      if (value < 0) value *= -1;\n      if (precision) value = d3.round(value, d3_format_precision(value, precision));\n      i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);\n      i = Math.max(-24, Math.min(24, Math.floor((i - 1) / 3) * 3));\n    }\n    return d3_formatPrefixes[8 + i / 3];\n  };\n  function d3_formatPrefix(d, i) {\n    var k = Math.pow(10, abs(8 - i) * 3);\n    return {\n      scale: i > 8 ? function(d) {\n        return d / k;\n      } : function(d) {\n        return d * k;\n      },\n      symbol: d\n    };\n  }\n  function d3_locale_numberFormat(locale) {\n    var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping && locale_thousands ? function(value, width) {\n      var i = value.length, t = [], j = 0, g = locale_grouping[0], length = 0;\n      while (i > 0 && g > 0) {\n        if (length + g + 1 > width) g = Math.max(1, width - length);\n        t.push(value.substring(i -= g, i + g));\n        if ((length += g + 1) > width) break;\n        g = locale_grouping[j = (j + 1) % locale_grouping.length];\n      }\n      return t.reverse().join(locale_thousands);\n    } : d3_identity;\n    return function(specifier) {\n      var match = d3_format_re.exec(specifier), fill = match[1] || \" \", align = match[2] || \">\", sign = match[3] || \"-\", symbol = match[4] || \"\", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, prefix = \"\", suffix = \"\", integer = false, exponent = true;\n      if (precision) precision = +precision.substring(1);\n      if (zfill || fill === \"0\" && align === \"=\") {\n        zfill = fill = \"0\";\n        align = \"=\";\n      }\n      switch (type) {\n       case \"n\":\n        comma = true;\n        type = \"g\";\n        break;\n\n       case \"%\":\n        scale = 100;\n        suffix = \"%\";\n        type = \"f\";\n        break;\n\n       case \"p\":\n        scale = 100;\n        suffix = \"%\";\n        type = \"r\";\n        break;\n\n       case \"b\":\n       case \"o\":\n       case \"x\":\n       case \"X\":\n        if (symbol === \"#\") prefix = \"0\" + type.toLowerCase();\n\n       case \"c\":\n        exponent = false;\n\n       case \"d\":\n        integer = true;\n        precision = 0;\n        break;\n\n       case \"s\":\n        scale = -1;\n        type = \"r\";\n        break;\n      }\n      if (symbol === \"$\") prefix = locale_currency[0], suffix = locale_currency[1];\n      if (type == \"r\" && !precision) type = \"g\";\n      if (precision != null) {\n        if (type == \"g\") precision = Math.max(1, Math.min(21, precision)); else if (type == \"e\" || type == \"f\") precision = Math.max(0, Math.min(20, precision));\n      }\n      type = d3_format_types.get(type) || d3_format_typeDefault;\n      var zcomma = zfill && comma;\n      return function(value) {\n        var fullSuffix = suffix;\n        if (integer && value % 1) return \"\";\n        var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, \"-\") : sign === \"-\" ? \"\" : sign;\n        if (scale < 0) {\n          var unit = d3.formatPrefix(value, precision);\n          value = unit.scale(value);\n          fullSuffix = unit.symbol + suffix;\n        } else {\n          value *= scale;\n        }\n        value = type(value, precision);\n        var i = value.lastIndexOf(\".\"), before, after;\n        if (i < 0) {\n          var j = exponent ? value.lastIndexOf(\"e\") : -1;\n          if (j < 0) before = value, after = \"\"; else before = value.substring(0, j), after = value.substring(j);\n        } else {\n          before = value.substring(0, i);\n          after = locale_decimal + value.substring(i + 1);\n        }\n        if (!zfill && comma) before = formatGroup(before, Infinity);\n        var length = prefix.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : \"\";\n        if (zcomma) before = formatGroup(padding + before, padding.length ? width - after.length : Infinity);\n        negative += prefix;\n        value = before + after;\n        return (align === \"<\" ? negative + value + padding : align === \">\" ? padding + negative + value : align === \"^\" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + fullSuffix;\n      };\n    };\n  }\n  var d3_format_re = /(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i;\n  var d3_format_types = d3.map({\n    b: function(x) {\n      return x.toString(2);\n    },\n    c: function(x) {\n      return String.fromCharCode(x);\n    },\n    o: function(x) {\n      return x.toString(8);\n    },\n    x: function(x) {\n      return x.toString(16);\n    },\n    X: function(x) {\n      return x.toString(16).toUpperCase();\n    },\n    g: function(x, p) {\n      return x.toPrecision(p);\n    },\n    e: function(x, p) {\n      return x.toExponential(p);\n    },\n    f: function(x, p) {\n      return x.toFixed(p);\n    },\n    r: function(x, p) {\n      return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));\n    }\n  });\n  function d3_format_typeDefault(x) {\n    return x + \"\";\n  }\n  var d3_time = d3.time = {}, d3_date = Date;\n  function d3_date_utc() {\n    this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);\n  }\n  d3_date_utc.prototype = {\n    getDate: function() {\n      return this._.getUTCDate();\n    },\n    getDay: function() {\n      return this._.getUTCDay();\n    },\n    getFullYear: function() {\n      return this._.getUTCFullYear();\n    },\n    getHours: function() {\n      return this._.getUTCHours();\n    },\n    getMilliseconds: function() {\n      return this._.getUTCMilliseconds();\n    },\n    getMinutes: function() {\n      return this._.getUTCMinutes();\n    },\n    getMonth: function() {\n      return this._.getUTCMonth();\n    },\n    getSeconds: function() {\n      return this._.getUTCSeconds();\n    },\n    getTime: function() {\n      return this._.getTime();\n    },\n    getTimezoneOffset: function() {\n      return 0;\n    },\n    valueOf: function() {\n      return this._.valueOf();\n    },\n    setDate: function() {\n      d3_time_prototype.setUTCDate.apply(this._, arguments);\n    },\n    setDay: function() {\n      d3_time_prototype.setUTCDay.apply(this._, arguments);\n    },\n    setFullYear: function() {\n      d3_time_prototype.setUTCFullYear.apply(this._, arguments);\n    },\n    setHours: function() {\n      d3_time_prototype.setUTCHours.apply(this._, arguments);\n    },\n    setMilliseconds: function() {\n      d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);\n    },\n    setMinutes: function() {\n      d3_time_prototype.setUTCMinutes.apply(this._, arguments);\n    },\n    setMonth: function() {\n      d3_time_prototype.setUTCMonth.apply(this._, arguments);\n    },\n    setSeconds: function() {\n      d3_time_prototype.setUTCSeconds.apply(this._, arguments);\n    },\n    setTime: function() {\n      d3_time_prototype.setTime.apply(this._, arguments);\n    }\n  };\n  var d3_time_prototype = Date.prototype;\n  function d3_time_interval(local, step, number) {\n    function round(date) {\n      var d0 = local(date), d1 = offset(d0, 1);\n      return date - d0 < d1 - date ? d0 : d1;\n    }\n    function ceil(date) {\n      step(date = local(new d3_date(date - 1)), 1);\n      return date;\n    }\n    function offset(date, k) {\n      step(date = new d3_date(+date), k);\n      return date;\n    }\n    function range(t0, t1, dt) {\n      var time = ceil(t0), times = [];\n      if (dt > 1) {\n        while (time < t1) {\n          if (!(number(time) % dt)) times.push(new Date(+time));\n          step(time, 1);\n        }\n      } else {\n        while (time < t1) times.push(new Date(+time)), step(time, 1);\n      }\n      return times;\n    }\n    function range_utc(t0, t1, dt) {\n      try {\n        d3_date = d3_date_utc;\n        var utc = new d3_date_utc();\n        utc._ = t0;\n        return range(utc, t1, dt);\n      } finally {\n        d3_date = Date;\n      }\n    }\n    local.floor = local;\n    local.round = round;\n    local.ceil = ceil;\n    local.offset = offset;\n    local.range = range;\n    var utc = local.utc = d3_time_interval_utc(local);\n    utc.floor = utc;\n    utc.round = d3_time_interval_utc(round);\n    utc.ceil = d3_time_interval_utc(ceil);\n    utc.offset = d3_time_interval_utc(offset);\n    utc.range = range_utc;\n    return local;\n  }\n  function d3_time_interval_utc(method) {\n    return function(date, k) {\n      try {\n        d3_date = d3_date_utc;\n        var utc = new d3_date_utc();\n        utc._ = date;\n        return method(utc, k)._;\n      } finally {\n        d3_date = Date;\n      }\n    };\n  }\n  d3_time.year = d3_time_interval(function(date) {\n    date = d3_time.day(date);\n    date.setMonth(0, 1);\n    return date;\n  }, function(date, offset) {\n    date.setFullYear(date.getFullYear() + offset);\n  }, function(date) {\n    return date.getFullYear();\n  });\n  d3_time.years = d3_time.year.range;\n  d3_time.years.utc = d3_time.year.utc.range;\n  d3_time.day = d3_time_interval(function(date) {\n    var day = new d3_date(2e3, 0);\n    day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n    return day;\n  }, function(date, offset) {\n    date.setDate(date.getDate() + offset);\n  }, function(date) {\n    return date.getDate() - 1;\n  });\n  d3_time.days = d3_time.day.range;\n  d3_time.days.utc = d3_time.day.utc.range;\n  d3_time.dayOfYear = function(date) {\n    var year = d3_time.year(date);\n    return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);\n  };\n  [ \"sunday\", \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\" ].forEach(function(day, i) {\n    i = 7 - i;\n    var interval = d3_time[day] = d3_time_interval(function(date) {\n      (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);\n      return date;\n    }, function(date, offset) {\n      date.setDate(date.getDate() + Math.floor(offset) * 7);\n    }, function(date) {\n      var day = d3_time.year(date).getDay();\n      return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);\n    });\n    d3_time[day + \"s\"] = interval.range;\n    d3_time[day + \"s\"].utc = interval.utc.range;\n    d3_time[day + \"OfYear\"] = function(date) {\n      var day = d3_time.year(date).getDay();\n      return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7);\n    };\n  });\n  d3_time.week = d3_time.sunday;\n  d3_time.weeks = d3_time.sunday.range;\n  d3_time.weeks.utc = d3_time.sunday.utc.range;\n  d3_time.weekOfYear = d3_time.sundayOfYear;\n  function d3_locale_timeFormat(locale) {\n    var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;\n    function d3_time_format(template) {\n      var n = template.length;\n      function format(date) {\n        var string = [], i = -1, j = 0, c, p, f;\n        while (++i < n) {\n          if (template.charCodeAt(i) === 37) {\n            string.push(template.slice(j, i));\n            if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);\n            if (f = d3_time_formats[c]) c = f(date, p == null ? c === \"e\" ? \" \" : \"0\" : p);\n            string.push(c);\n            j = i + 1;\n          }\n        }\n        string.push(template.slice(j, i));\n        return string.join(\"\");\n      }\n      format.parse = function(string) {\n        var d = {\n          y: 1900,\n          m: 0,\n          d: 1,\n          H: 0,\n          M: 0,\n          S: 0,\n          L: 0,\n          Z: null\n        }, i = d3_time_parse(d, template, string, 0);\n        if (i != string.length) return null;\n        if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n        var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)();\n        if (\"j\" in d) date.setFullYear(d.y, 0, d.j); else if (\"W\" in d || \"U\" in d) {\n          if (!(\"w\" in d)) d.w = \"W\" in d ? 1 : 0;\n          date.setFullYear(d.y, 0, 1);\n          date.setFullYear(d.y, 0, \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7);\n        } else date.setFullYear(d.y, d.m, d.d);\n        date.setHours(d.H + (d.Z / 100 | 0), d.M + d.Z % 100, d.S, d.L);\n        return localZ ? date._ : date;\n      };\n      format.toString = function() {\n        return template;\n      };\n      return format;\n    }\n    function d3_time_parse(date, template, string, j) {\n      var c, p, t, i = 0, n = template.length, m = string.length;\n      while (i < n) {\n        if (j >= m) return -1;\n        c = template.charCodeAt(i++);\n        if (c === 37) {\n          t = template.charAt(i++);\n          p = d3_time_parsers[t in d3_time_formatPads ? template.charAt(i++) : t];\n          if (!p || (j = p(date, string, j)) < 0) return -1;\n        } else if (c != string.charCodeAt(j++)) {\n          return -1;\n        }\n      }\n      return j;\n    }\n    d3_time_format.utc = function(template) {\n      var local = d3_time_format(template);\n      function format(date) {\n        try {\n          d3_date = d3_date_utc;\n          var utc = new d3_date();\n          utc._ = date;\n          return local(utc);\n        } finally {\n          d3_date = Date;\n        }\n      }\n      format.parse = function(string) {\n        try {\n          d3_date = d3_date_utc;\n          var date = local.parse(string);\n          return date && date._;\n        } finally {\n          d3_date = Date;\n        }\n      };\n      format.toString = local.toString;\n      return format;\n    };\n    d3_time_format.multi = d3_time_format.utc.multi = d3_time_formatMulti;\n    var d3_time_periodLookup = d3.map(), d3_time_dayRe = d3_time_formatRe(locale_days), d3_time_dayLookup = d3_time_formatLookup(locale_days), d3_time_dayAbbrevRe = d3_time_formatRe(locale_shortDays), d3_time_dayAbbrevLookup = d3_time_formatLookup(locale_shortDays), d3_time_monthRe = d3_time_formatRe(locale_months), d3_time_monthLookup = d3_time_formatLookup(locale_months), d3_time_monthAbbrevRe = d3_time_formatRe(locale_shortMonths), d3_time_monthAbbrevLookup = d3_time_formatLookup(locale_shortMonths);\n    locale_periods.forEach(function(p, i) {\n      d3_time_periodLookup.set(p.toLowerCase(), i);\n    });\n    var d3_time_formats = {\n      a: function(d) {\n        return locale_shortDays[d.getDay()];\n      },\n      A: function(d) {\n        return locale_days[d.getDay()];\n      },\n      b: function(d) {\n        return locale_shortMonths[d.getMonth()];\n      },\n      B: function(d) {\n        return locale_months[d.getMonth()];\n      },\n      c: d3_time_format(locale_dateTime),\n      d: function(d, p) {\n        return d3_time_formatPad(d.getDate(), p, 2);\n      },\n      e: function(d, p) {\n        return d3_time_formatPad(d.getDate(), p, 2);\n      },\n      H: function(d, p) {\n        return d3_time_formatPad(d.getHours(), p, 2);\n      },\n      I: function(d, p) {\n        return d3_time_formatPad(d.getHours() % 12 || 12, p, 2);\n      },\n      j: function(d, p) {\n        return d3_time_formatPad(1 + d3_time.dayOfYear(d), p, 3);\n      },\n      L: function(d, p) {\n        return d3_time_formatPad(d.getMilliseconds(), p, 3);\n      },\n      m: function(d, p) {\n        return d3_time_formatPad(d.getMonth() + 1, p, 2);\n      },\n      M: function(d, p) {\n        return d3_time_formatPad(d.getMinutes(), p, 2);\n      },\n      p: function(d) {\n        return locale_periods[+(d.getHours() >= 12)];\n      },\n      S: function(d, p) {\n        return d3_time_formatPad(d.getSeconds(), p, 2);\n      },\n      U: function(d, p) {\n        return d3_time_formatPad(d3_time.sundayOfYear(d), p, 2);\n      },\n      w: function(d) {\n        return d.getDay();\n      },\n      W: function(d, p) {\n        return d3_time_formatPad(d3_time.mondayOfYear(d), p, 2);\n      },\n      x: d3_time_format(locale_date),\n      X: d3_time_format(locale_time),\n      y: function(d, p) {\n        return d3_time_formatPad(d.getFullYear() % 100, p, 2);\n      },\n      Y: function(d, p) {\n        return d3_time_formatPad(d.getFullYear() % 1e4, p, 4);\n      },\n      Z: d3_time_zone,\n      \"%\": function() {\n        return \"%\";\n      }\n    };\n    var d3_time_parsers = {\n      a: d3_time_parseWeekdayAbbrev,\n      A: d3_time_parseWeekday,\n      b: d3_time_parseMonthAbbrev,\n      B: d3_time_parseMonth,\n      c: d3_time_parseLocaleFull,\n      d: d3_time_parseDay,\n      e: d3_time_parseDay,\n      H: d3_time_parseHour24,\n      I: d3_time_parseHour24,\n      j: d3_time_parseDayOfYear,\n      L: d3_time_parseMilliseconds,\n      m: d3_time_parseMonthNumber,\n      M: d3_time_parseMinutes,\n      p: d3_time_parseAmPm,\n      S: d3_time_parseSeconds,\n      U: d3_time_parseWeekNumberSunday,\n      w: d3_time_parseWeekdayNumber,\n      W: d3_time_parseWeekNumberMonday,\n      x: d3_time_parseLocaleDate,\n      X: d3_time_parseLocaleTime,\n      y: d3_time_parseYear,\n      Y: d3_time_parseFullYear,\n      Z: d3_time_parseZone,\n      \"%\": d3_time_parseLiteralPercent\n    };\n    function d3_time_parseWeekdayAbbrev(date, string, i) {\n      d3_time_dayAbbrevRe.lastIndex = 0;\n      var n = d3_time_dayAbbrevRe.exec(string.slice(i));\n      return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseWeekday(date, string, i) {\n      d3_time_dayRe.lastIndex = 0;\n      var n = d3_time_dayRe.exec(string.slice(i));\n      return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseMonthAbbrev(date, string, i) {\n      d3_time_monthAbbrevRe.lastIndex = 0;\n      var n = d3_time_monthAbbrevRe.exec(string.slice(i));\n      return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseMonth(date, string, i) {\n      d3_time_monthRe.lastIndex = 0;\n      var n = d3_time_monthRe.exec(string.slice(i));\n      return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n    }\n    function d3_time_parseLocaleFull(date, string, i) {\n      return d3_time_parse(date, d3_time_formats.c.toString(), string, i);\n    }\n    function d3_time_parseLocaleDate(date, string, i) {\n      return d3_time_parse(date, d3_time_formats.x.toString(), string, i);\n    }\n    function d3_time_parseLocaleTime(date, string, i) {\n      return d3_time_parse(date, d3_time_formats.X.toString(), string, i);\n    }\n    function d3_time_parseAmPm(date, string, i) {\n      var n = d3_time_periodLookup.get(string.slice(i, i += 2).toLowerCase());\n      return n == null ? -1 : (date.p = n, i);\n    }\n    return d3_time_format;\n  }\n  var d3_time_formatPads = {\n    \"-\": \"\",\n    _: \" \",\n    \"0\": \"0\"\n  }, d3_time_numberRe = /^\\s*\\d+/, d3_time_percentRe = /^%/;\n  function d3_time_formatPad(value, fill, width) {\n    var sign = value < 0 ? \"-\" : \"\", string = (sign ? -value : value) + \"\", length = string.length;\n    return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n  }\n  function d3_time_formatRe(names) {\n    return new RegExp(\"^(?:\" + names.map(d3.requote).join(\"|\") + \")\", \"i\");\n  }\n  function d3_time_formatLookup(names) {\n    var map = new d3_Map(), i = -1, n = names.length;\n    while (++i < n) map.set(names[i].toLowerCase(), i);\n    return map;\n  }\n  function d3_time_parseWeekdayNumber(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 1));\n    return n ? (date.w = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseWeekNumberSunday(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i));\n    return n ? (date.U = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseWeekNumberMonday(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i));\n    return n ? (date.W = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseFullYear(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 4));\n    return n ? (date.y = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseYear(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1;\n  }\n  function d3_time_parseZone(date, string, i) {\n    return /^[+-]\\d{4}$/.test(string = string.slice(i, i + 5)) ? (date.Z = -string, \n    i + 5) : -1;\n  }\n  function d3_time_expandYear(d) {\n    return d + (d > 68 ? 1900 : 2e3);\n  }\n  function d3_time_parseMonthNumber(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.m = n[0] - 1, i + n[0].length) : -1;\n  }\n  function d3_time_parseDay(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.d = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseDayOfYear(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 3));\n    return n ? (date.j = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseHour24(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.H = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseMinutes(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.M = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseSeconds(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n    return n ? (date.S = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_parseMilliseconds(date, string, i) {\n    d3_time_numberRe.lastIndex = 0;\n    var n = d3_time_numberRe.exec(string.slice(i, i + 3));\n    return n ? (date.L = +n[0], i + n[0].length) : -1;\n  }\n  function d3_time_zone(d) {\n    var z = d.getTimezoneOffset(), zs = z > 0 ? \"-\" : \"+\", zh = abs(z) / 60 | 0, zm = abs(z) % 60;\n    return zs + d3_time_formatPad(zh, \"0\", 2) + d3_time_formatPad(zm, \"0\", 2);\n  }\n  function d3_time_parseLiteralPercent(date, string, i) {\n    d3_time_percentRe.lastIndex = 0;\n    var n = d3_time_percentRe.exec(string.slice(i, i + 1));\n    return n ? i + n[0].length : -1;\n  }\n  function d3_time_formatMulti(formats) {\n    var n = formats.length, i = -1;\n    while (++i < n) formats[i][0] = this(formats[i][0]);\n    return function(date) {\n      var i = 0, f = formats[i];\n      while (!f[1](date)) f = formats[++i];\n      return f[0](date);\n    };\n  }\n  d3.locale = function(locale) {\n    return {\n      numberFormat: d3_locale_numberFormat(locale),\n      timeFormat: d3_locale_timeFormat(locale)\n    };\n  };\n  var d3_locale_enUS = d3.locale({\n    decimal: \".\",\n    thousands: \",\",\n    grouping: [ 3 ],\n    currency: [ \"$\", \"\" ],\n    dateTime: \"%a %b %e %X %Y\",\n    date: \"%m/%d/%Y\",\n    time: \"%H:%M:%S\",\n    periods: [ \"AM\", \"PM\" ],\n    days: [ \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\" ],\n    shortDays: [ \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\" ],\n    months: [ \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ],\n    shortMonths: [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" ]\n  });\n  d3.format = d3_locale_enUS.numberFormat;\n  d3.geo = {};\n  function d3_adder() {}\n  d3_adder.prototype = {\n    s: 0,\n    t: 0,\n    add: function(y) {\n      d3_adderSum(y, this.t, d3_adderTemp);\n      d3_adderSum(d3_adderTemp.s, this.s, this);\n      if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t;\n    },\n    reset: function() {\n      this.s = this.t = 0;\n    },\n    valueOf: function() {\n      return this.s;\n    }\n  };\n  var d3_adderTemp = new d3_adder();\n  function d3_adderSum(a, b, o) {\n    var x = o.s = a + b, bv = x - a, av = x - bv;\n    o.t = a - av + (b - bv);\n  }\n  d3.geo.stream = function(object, listener) {\n    if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) {\n      d3_geo_streamObjectType[object.type](object, listener);\n    } else {\n      d3_geo_streamGeometry(object, listener);\n    }\n  };\n  function d3_geo_streamGeometry(geometry, listener) {\n    if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) {\n      d3_geo_streamGeometryType[geometry.type](geometry, listener);\n    }\n  }\n  var d3_geo_streamObjectType = {\n    Feature: function(feature, listener) {\n      d3_geo_streamGeometry(feature.geometry, listener);\n    },\n    FeatureCollection: function(object, listener) {\n      var features = object.features, i = -1, n = features.length;\n      while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener);\n    }\n  };\n  var d3_geo_streamGeometryType = {\n    Sphere: function(object, listener) {\n      listener.sphere();\n    },\n    Point: function(object, listener) {\n      object = object.coordinates;\n      listener.point(object[0], object[1], object[2]);\n    },\n    MultiPoint: function(object, listener) {\n      var coordinates = object.coordinates, i = -1, n = coordinates.length;\n      while (++i < n) object = coordinates[i], listener.point(object[0], object[1], object[2]);\n    },\n    LineString: function(object, listener) {\n      d3_geo_streamLine(object.coordinates, listener, 0);\n    },\n    MultiLineString: function(object, listener) {\n      var coordinates = object.coordinates, i = -1, n = coordinates.length;\n      while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0);\n    },\n    Polygon: function(object, listener) {\n      d3_geo_streamPolygon(object.coordinates, listener);\n    },\n    MultiPolygon: function(object, listener) {\n      var coordinates = object.coordinates, i = -1, n = coordinates.length;\n      while (++i < n) d3_geo_streamPolygon(coordinates[i], listener);\n    },\n    GeometryCollection: function(object, listener) {\n      var geometries = object.geometries, i = -1, n = geometries.length;\n      while (++i < n) d3_geo_streamGeometry(geometries[i], listener);\n    }\n  };\n  function d3_geo_streamLine(coordinates, listener, closed) {\n    var i = -1, n = coordinates.length - closed, coordinate;\n    listener.lineStart();\n    while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1], coordinate[2]);\n    listener.lineEnd();\n  }\n  function d3_geo_streamPolygon(coordinates, listener) {\n    var i = -1, n = coordinates.length;\n    listener.polygonStart();\n    while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1);\n    listener.polygonEnd();\n  }\n  d3.geo.area = function(object) {\n    d3_geo_areaSum = 0;\n    d3.geo.stream(object, d3_geo_area);\n    return d3_geo_areaSum;\n  };\n  var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder();\n  var d3_geo_area = {\n    sphere: function() {\n      d3_geo_areaSum += 4 * π;\n    },\n    point: d3_noop,\n    lineStart: d3_noop,\n    lineEnd: d3_noop,\n    polygonStart: function() {\n      d3_geo_areaRingSum.reset();\n      d3_geo_area.lineStart = d3_geo_areaRingStart;\n    },\n    polygonEnd: function() {\n      var area = 2 * d3_geo_areaRingSum;\n      d3_geo_areaSum += area < 0 ? 4 * π + area : area;\n      d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;\n    }\n  };\n  function d3_geo_areaRingStart() {\n    var λ00, φ00, λ0, cosφ0, sinφ0;\n    d3_geo_area.point = function(λ, φ) {\n      d3_geo_area.point = nextPoint;\n      λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), \n      sinφ0 = Math.sin(φ);\n    };\n    function nextPoint(λ, φ) {\n      λ *= d3_radians;\n      φ = φ * d3_radians / 2 + π / 4;\n      var dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(adλ), v = k * sdλ * Math.sin(adλ);\n      d3_geo_areaRingSum.add(Math.atan2(v, u));\n      λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;\n    }\n    d3_geo_area.lineEnd = function() {\n      nextPoint(λ00, φ00);\n    };\n  }\n  function d3_geo_cartesian(spherical) {\n    var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ);\n    return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ];\n  }\n  function d3_geo_cartesianDot(a, b) {\n    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n  }\n  function d3_geo_cartesianCross(a, b) {\n    return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ];\n  }\n  function d3_geo_cartesianAdd(a, b) {\n    a[0] += b[0];\n    a[1] += b[1];\n    a[2] += b[2];\n  }\n  function d3_geo_cartesianScale(vector, k) {\n    return [ vector[0] * k, vector[1] * k, vector[2] * k ];\n  }\n  function d3_geo_cartesianNormalize(d) {\n    var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n    d[0] /= l;\n    d[1] /= l;\n    d[2] /= l;\n  }\n  function d3_geo_spherical(cartesian) {\n    return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ];\n  }\n  function d3_geo_sphericalEqual(a, b) {\n    return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε;\n  }\n  d3.geo.bounds = function() {\n    var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;\n    var bound = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        bound.point = ringPoint;\n        bound.lineStart = ringStart;\n        bound.lineEnd = ringEnd;\n        dλSum = 0;\n        d3_geo_area.polygonStart();\n      },\n      polygonEnd: function() {\n        d3_geo_area.polygonEnd();\n        bound.point = point;\n        bound.lineStart = lineStart;\n        bound.lineEnd = lineEnd;\n        if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90;\n        range[0] = λ0, range[1] = λ1;\n      }\n    };\n    function point(λ, φ) {\n      ranges.push(range = [ λ0 = λ, λ1 = λ ]);\n      if (φ < φ0) φ0 = φ;\n      if (φ > φ1) φ1 = φ;\n    }\n    function linePoint(λ, φ) {\n      var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]);\n      if (p0) {\n        var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal);\n        d3_geo_cartesianNormalize(inflection);\n        inflection = d3_geo_spherical(inflection);\n        var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = abs(dλ) > 180;\n        if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) {\n          var φi = inflection[1] * d3_degrees;\n          if (φi > φ1) φ1 = φi;\n        } else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) {\n          var φi = -inflection[1] * d3_degrees;\n          if (φi < φ0) φ0 = φi;\n        } else {\n          if (φ < φ0) φ0 = φ;\n          if (φ > φ1) φ1 = φ;\n        }\n        if (antimeridian) {\n          if (λ < λ_) {\n            if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;\n          } else {\n            if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;\n          }\n        } else {\n          if (λ1 >= λ0) {\n            if (λ < λ0) λ0 = λ;\n            if (λ > λ1) λ1 = λ;\n          } else {\n            if (λ > λ_) {\n              if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;\n            } else {\n              if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;\n            }\n          }\n        }\n      } else {\n        point(λ, φ);\n      }\n      p0 = p, λ_ = λ;\n    }\n    function lineStart() {\n      bound.point = linePoint;\n    }\n    function lineEnd() {\n      range[0] = λ0, range[1] = λ1;\n      bound.point = point;\n      p0 = null;\n    }\n    function ringPoint(λ, φ) {\n      if (p0) {\n        var dλ = λ - λ_;\n        dλSum += abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ;\n      } else λ__ = λ, φ__ = φ;\n      d3_geo_area.point(λ, φ);\n      linePoint(λ, φ);\n    }\n    function ringStart() {\n      d3_geo_area.lineStart();\n    }\n    function ringEnd() {\n      ringPoint(λ__, φ__);\n      d3_geo_area.lineEnd();\n      if (abs(dλSum) > ε) λ0 = -(λ1 = 180);\n      range[0] = λ0, range[1] = λ1;\n      p0 = null;\n    }\n    function angle(λ0, λ1) {\n      return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1;\n    }\n    function compareRanges(a, b) {\n      return a[0] - b[0];\n    }\n    function withinRange(x, range) {\n      return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n    }\n    return function(feature) {\n      φ1 = λ1 = -(λ0 = φ0 = Infinity);\n      ranges = [];\n      d3.geo.stream(feature, bound);\n      var n = ranges.length;\n      if (n) {\n        ranges.sort(compareRanges);\n        for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) {\n          b = ranges[i];\n          if (withinRange(b[0], a) || withinRange(b[1], a)) {\n            if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n            if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n          } else {\n            merged.push(a = b);\n          }\n        }\n        var best = -Infinity, dλ;\n        for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) {\n          b = merged[i];\n          if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1];\n        }\n      }\n      ranges = range = null;\n      return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ];\n    };\n  }();\n  d3.geo.centroid = function(object) {\n    d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;\n    d3.geo.stream(object, d3_geo_centroid);\n    var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z;\n    if (m < ε2) {\n      x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1;\n      if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0;\n      m = x * x + y * y + z * z;\n      if (m < ε2) return [ NaN, NaN ];\n    }\n    return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ];\n  };\n  var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2;\n  var d3_geo_centroid = {\n    sphere: d3_noop,\n    point: d3_geo_centroidPoint,\n    lineStart: d3_geo_centroidLineStart,\n    lineEnd: d3_geo_centroidLineEnd,\n    polygonStart: function() {\n      d3_geo_centroid.lineStart = d3_geo_centroidRingStart;\n    },\n    polygonEnd: function() {\n      d3_geo_centroid.lineStart = d3_geo_centroidLineStart;\n    }\n  };\n  function d3_geo_centroidPoint(λ, φ) {\n    λ *= d3_radians;\n    var cosφ = Math.cos(φ *= d3_radians);\n    d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ));\n  }\n  function d3_geo_centroidPointXYZ(x, y, z) {\n    ++d3_geo_centroidW0;\n    d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0;\n    d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0;\n    d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0;\n  }\n  function d3_geo_centroidLineStart() {\n    var x0, y0, z0;\n    d3_geo_centroid.point = function(λ, φ) {\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians);\n      x0 = cosφ * Math.cos(λ);\n      y0 = cosφ * Math.sin(λ);\n      z0 = Math.sin(φ);\n      d3_geo_centroid.point = nextPoint;\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    };\n    function nextPoint(λ, φ) {\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n      d3_geo_centroidW1 += w;\n      d3_geo_centroidX1 += w * (x0 + (x0 = x));\n      d3_geo_centroidY1 += w * (y0 + (y0 = y));\n      d3_geo_centroidZ1 += w * (z0 + (z0 = z));\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    }\n  }\n  function d3_geo_centroidLineEnd() {\n    d3_geo_centroid.point = d3_geo_centroidPoint;\n  }\n  function d3_geo_centroidRingStart() {\n    var λ00, φ00, x0, y0, z0;\n    d3_geo_centroid.point = function(λ, φ) {\n      λ00 = λ, φ00 = φ;\n      d3_geo_centroid.point = nextPoint;\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians);\n      x0 = cosφ * Math.cos(λ);\n      y0 = cosφ * Math.sin(λ);\n      z0 = Math.sin(φ);\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    };\n    d3_geo_centroid.lineEnd = function() {\n      nextPoint(λ00, φ00);\n      d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd;\n      d3_geo_centroid.point = d3_geo_centroidPoint;\n    };\n    function nextPoint(λ, φ) {\n      λ *= d3_radians;\n      var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u);\n      d3_geo_centroidX2 += v * cx;\n      d3_geo_centroidY2 += v * cy;\n      d3_geo_centroidZ2 += v * cz;\n      d3_geo_centroidW1 += w;\n      d3_geo_centroidX1 += w * (x0 + (x0 = x));\n      d3_geo_centroidY1 += w * (y0 + (y0 = y));\n      d3_geo_centroidZ1 += w * (z0 + (z0 = z));\n      d3_geo_centroidPointXYZ(x0, y0, z0);\n    }\n  }\n  function d3_geo_compose(a, b) {\n    function compose(x, y) {\n      return x = a(x, y), b(x[0], x[1]);\n    }\n    if (a.invert && b.invert) compose.invert = function(x, y) {\n      return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n    };\n    return compose;\n  }\n  function d3_true() {\n    return true;\n  }\n  function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {\n    var subject = [], clip = [];\n    segments.forEach(function(segment) {\n      if ((n = segment.length - 1) <= 0) return;\n      var n, p0 = segment[0], p1 = segment[n];\n      if (d3_geo_sphericalEqual(p0, p1)) {\n        listener.lineStart();\n        for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);\n        listener.lineEnd();\n        return;\n      }\n      var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true), b = new d3_geo_clipPolygonIntersection(p0, null, a, false);\n      a.o = b;\n      subject.push(a);\n      clip.push(b);\n      a = new d3_geo_clipPolygonIntersection(p1, segment, null, false);\n      b = new d3_geo_clipPolygonIntersection(p1, null, a, true);\n      a.o = b;\n      subject.push(a);\n      clip.push(b);\n    });\n    clip.sort(compare);\n    d3_geo_clipPolygonLinkCircular(subject);\n    d3_geo_clipPolygonLinkCircular(clip);\n    if (!subject.length) return;\n    for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) {\n      clip[i].e = entry = !entry;\n    }\n    var start = subject[0], points, point;\n    while (1) {\n      var current = start, isSubject = true;\n      while (current.v) if ((current = current.n) === start) return;\n      points = current.z;\n      listener.lineStart();\n      do {\n        current.v = current.o.v = true;\n        if (current.e) {\n          if (isSubject) {\n            for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);\n          } else {\n            interpolate(current.x, current.n.x, 1, listener);\n          }\n          current = current.n;\n        } else {\n          if (isSubject) {\n            points = current.p.z;\n            for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);\n          } else {\n            interpolate(current.x, current.p.x, -1, listener);\n          }\n          current = current.p;\n        }\n        current = current.o;\n        points = current.z;\n        isSubject = !isSubject;\n      } while (!current.v);\n      listener.lineEnd();\n    }\n  }\n  function d3_geo_clipPolygonLinkCircular(array) {\n    if (!(n = array.length)) return;\n    var n, i = 0, a = array[0], b;\n    while (++i < n) {\n      a.n = b = array[i];\n      b.p = a;\n      a = b;\n    }\n    a.n = b = array[0];\n    b.p = a;\n  }\n  function d3_geo_clipPolygonIntersection(point, points, other, entry) {\n    this.x = point;\n    this.z = points;\n    this.o = other;\n    this.e = entry;\n    this.v = false;\n    this.n = this.p = null;\n  }\n  function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {\n    return function(rotate, listener) {\n      var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);\n      var clip = {\n        point: point,\n        lineStart: lineStart,\n        lineEnd: lineEnd,\n        polygonStart: function() {\n          clip.point = pointRing;\n          clip.lineStart = ringStart;\n          clip.lineEnd = ringEnd;\n          segments = [];\n          polygon = [];\n        },\n        polygonEnd: function() {\n          clip.point = point;\n          clip.lineStart = lineStart;\n          clip.lineEnd = lineEnd;\n          segments = d3.merge(segments);\n          var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon);\n          if (segments.length) {\n            if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n            d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener);\n          } else if (clipStartInside) {\n            if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n            listener.lineStart();\n            interpolate(null, null, 1, listener);\n            listener.lineEnd();\n          }\n          if (polygonStarted) listener.polygonEnd(), polygonStarted = false;\n          segments = polygon = null;\n        },\n        sphere: function() {\n          listener.polygonStart();\n          listener.lineStart();\n          interpolate(null, null, 1, listener);\n          listener.lineEnd();\n          listener.polygonEnd();\n        }\n      };\n      function point(λ, φ) {\n        var point = rotate(λ, φ);\n        if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ);\n      }\n      function pointLine(λ, φ) {\n        var point = rotate(λ, φ);\n        line.point(point[0], point[1]);\n      }\n      function lineStart() {\n        clip.point = pointLine;\n        line.lineStart();\n      }\n      function lineEnd() {\n        clip.point = point;\n        line.lineEnd();\n      }\n      var segments;\n      var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygonStarted = false, polygon, ring;\n      function pointRing(λ, φ) {\n        ring.push([ λ, φ ]);\n        var point = rotate(λ, φ);\n        ringListener.point(point[0], point[1]);\n      }\n      function ringStart() {\n        ringListener.lineStart();\n        ring = [];\n      }\n      function ringEnd() {\n        pointRing(ring[0][0], ring[0][1]);\n        ringListener.lineEnd();\n        var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length;\n        ring.pop();\n        polygon.push(ring);\n        ring = null;\n        if (!n) return;\n        if (clean & 1) {\n          segment = ringSegments[0];\n          var n = segment.length - 1, i = -1, point;\n          if (n > 0) {\n            if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n            listener.lineStart();\n            while (++i < n) listener.point((point = segment[i])[0], point[1]);\n            listener.lineEnd();\n          }\n          return;\n        }\n        if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n        segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));\n      }\n      return clip;\n    };\n  }\n  function d3_geo_clipSegmentLength1(segment) {\n    return segment.length > 1;\n  }\n  function d3_geo_clipBufferListener() {\n    var lines = [], line;\n    return {\n      lineStart: function() {\n        lines.push(line = []);\n      },\n      point: function(λ, φ) {\n        line.push([ λ, φ ]);\n      },\n      lineEnd: d3_noop,\n      buffer: function() {\n        var buffer = lines;\n        lines = [];\n        line = null;\n        return buffer;\n      },\n      rejoin: function() {\n        if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n      }\n    };\n  }\n  function d3_geo_clipSort(a, b) {\n    return ((a = a.x)[0] < 0 ? a[1] - halfπ - ε : halfπ - a[1]) - ((b = b.x)[0] < 0 ? b[1] - halfπ - ε : halfπ - b[1]);\n  }\n  var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, [ -π, -π / 2 ]);\n  function d3_geo_clipAntimeridianLine(listener) {\n    var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean;\n    return {\n      lineStart: function() {\n        listener.lineStart();\n        clean = 1;\n      },\n      point: function(λ1, φ1) {\n        var sλ1 = λ1 > 0 ? π : -π, dλ = abs(λ1 - λ0);\n        if (abs(dλ - π) < ε) {\n          listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? halfπ : -halfπ);\n          listener.point(sλ0, φ0);\n          listener.lineEnd();\n          listener.lineStart();\n          listener.point(sλ1, φ0);\n          listener.point(λ1, φ0);\n          clean = 0;\n        } else if (sλ0 !== sλ1 && dλ >= π) {\n          if (abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε;\n          if (abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε;\n          φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1);\n          listener.point(sλ0, φ0);\n          listener.lineEnd();\n          listener.lineStart();\n          listener.point(sλ1, φ0);\n          clean = 0;\n        }\n        listener.point(λ0 = λ1, φ0 = φ1);\n        sλ0 = sλ1;\n      },\n      lineEnd: function() {\n        listener.lineEnd();\n        λ0 = φ0 = NaN;\n      },\n      clean: function() {\n        return 2 - clean;\n      }\n    };\n  }\n  function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) {\n    var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1);\n    return abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2;\n  }\n  function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) {\n    var φ;\n    if (from == null) {\n      φ = direction * halfπ;\n      listener.point(-π, φ);\n      listener.point(0, φ);\n      listener.point(π, φ);\n      listener.point(π, 0);\n      listener.point(π, -φ);\n      listener.point(0, -φ);\n      listener.point(-π, -φ);\n      listener.point(-π, 0);\n      listener.point(-π, φ);\n    } else if (abs(from[0] - to[0]) > ε) {\n      var s = from[0] < to[0] ? π : -π;\n      φ = direction * s / 2;\n      listener.point(-s, φ);\n      listener.point(0, φ);\n      listener.point(s, φ);\n    } else {\n      listener.point(to[0], to[1]);\n    }\n  }\n  function d3_geo_pointInPolygon(point, polygon) {\n    var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0;\n    d3_geo_areaRingSum.reset();\n    for (var i = 0, n = polygon.length; i < n; ++i) {\n      var ring = polygon[i], m = ring.length;\n      if (!m) continue;\n      var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + π / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1;\n      while (true) {\n        if (j === m) j = 0;\n        point = ring[j];\n        var λ = point[0], φ = point[1] / 2 + π / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, antimeridian = adλ > π, k = sinφ0 * sinφ;\n        d3_geo_areaRingSum.add(Math.atan2(k * sdλ * Math.sin(adλ), cosφ0 * cosφ + k * Math.cos(adλ)));\n        polarAngle += antimeridian ? dλ + sdλ * τ : dλ;\n        if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) {\n          var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point));\n          d3_geo_cartesianNormalize(arc);\n          var intersection = d3_geo_cartesianCross(meridianNormal, arc);\n          d3_geo_cartesianNormalize(intersection);\n          var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]);\n          if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) {\n            winding += antimeridian ^ dλ >= 0 ? 1 : -1;\n          }\n        }\n        if (!j++) break;\n        λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point;\n      }\n    }\n    return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < -ε) ^ winding & 1;\n  }\n  function d3_geo_clipCircle(radius) {\n    var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);\n    return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);\n    function visible(λ, φ) {\n      return Math.cos(λ) * Math.cos(φ) > cr;\n    }\n    function clipLine(listener) {\n      var point0, c0, v0, v00, clean;\n      return {\n        lineStart: function() {\n          v00 = v0 = false;\n          clean = 1;\n        },\n        point: function(λ, φ) {\n          var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;\n          if (!point0 && (v00 = v0 = v)) listener.lineStart();\n          if (v !== v0) {\n            point2 = intersect(point0, point1);\n            if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) {\n              point1[0] += ε;\n              point1[1] += ε;\n              v = visible(point1[0], point1[1]);\n            }\n          }\n          if (v !== v0) {\n            clean = 0;\n            if (v) {\n              listener.lineStart();\n              point2 = intersect(point1, point0);\n              listener.point(point2[0], point2[1]);\n            } else {\n              point2 = intersect(point0, point1);\n              listener.point(point2[0], point2[1]);\n              listener.lineEnd();\n            }\n            point0 = point2;\n          } else if (notHemisphere && point0 && smallRadius ^ v) {\n            var t;\n            if (!(c & c0) && (t = intersect(point1, point0, true))) {\n              clean = 0;\n              if (smallRadius) {\n                listener.lineStart();\n                listener.point(t[0][0], t[0][1]);\n                listener.point(t[1][0], t[1][1]);\n                listener.lineEnd();\n              } else {\n                listener.point(t[1][0], t[1][1]);\n                listener.lineEnd();\n                listener.lineStart();\n                listener.point(t[0][0], t[0][1]);\n              }\n            }\n          }\n          if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) {\n            listener.point(point1[0], point1[1]);\n          }\n          point0 = point1, v0 = v, c0 = c;\n        },\n        lineEnd: function() {\n          if (v0) listener.lineEnd();\n          point0 = null;\n        },\n        clean: function() {\n          return clean | (v00 && v0) << 1;\n        }\n      };\n    }\n    function intersect(a, b, two) {\n      var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b);\n      var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2;\n      if (!determinant) return !two && a;\n      var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2);\n      d3_geo_cartesianAdd(A, B);\n      var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1);\n      if (t2 < 0) return;\n      var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu);\n      d3_geo_cartesianAdd(q, A);\n      q = d3_geo_spherical(q);\n      if (!two) return q;\n      var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z;\n      if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z;\n      var δλ = λ1 - λ0, polar = abs(δλ - π) < ε, meridian = polar || δλ < ε;\n      if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z;\n      if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > π ^ (λ0 <= q[0] && q[0] <= λ1)) {\n        var q1 = d3_geo_cartesianScale(u, (-w + t) / uu);\n        d3_geo_cartesianAdd(q1, A);\n        return [ q, d3_geo_spherical(q1) ];\n      }\n    }\n    function code(λ, φ) {\n      var r = smallRadius ? radius : π - radius, code = 0;\n      if (λ < -r) code |= 1; else if (λ > r) code |= 2;\n      if (φ < -r) code |= 4; else if (φ > r) code |= 8;\n      return code;\n    }\n  }\n  function d3_geom_clipLine(x0, y0, x1, y1) {\n    return function(line) {\n      var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r;\n      r = x0 - ax;\n      if (!dx && r > 0) return;\n      r /= dx;\n      if (dx < 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      } else if (dx > 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      }\n      r = x1 - ax;\n      if (!dx && r < 0) return;\n      r /= dx;\n      if (dx < 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      } else if (dx > 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      }\n      r = y0 - ay;\n      if (!dy && r > 0) return;\n      r /= dy;\n      if (dy < 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      } else if (dy > 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      }\n      r = y1 - ay;\n      if (!dy && r < 0) return;\n      r /= dy;\n      if (dy < 0) {\n        if (r > t1) return;\n        if (r > t0) t0 = r;\n      } else if (dy > 0) {\n        if (r < t0) return;\n        if (r < t1) t1 = r;\n      }\n      if (t0 > 0) line.a = {\n        x: ax + t0 * dx,\n        y: ay + t0 * dy\n      };\n      if (t1 < 1) line.b = {\n        x: ax + t1 * dx,\n        y: ay + t1 * dy\n      };\n      return line;\n    };\n  }\n  var d3_geo_clipExtentMAX = 1e9;\n  d3.geo.clipExtent = function() {\n    var x0, y0, x1, y1, stream, clip, clipExtent = {\n      stream: function(output) {\n        if (stream) stream.valid = false;\n        stream = clip(output);\n        stream.valid = true;\n        return stream;\n      },\n      extent: function(_) {\n        if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];\n        clip = d3_geo_clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]);\n        if (stream) stream.valid = false, stream = null;\n        return clipExtent;\n      }\n    };\n    return clipExtent.extent([ [ 0, 0 ], [ 960, 500 ] ]);\n  };\n  function d3_geo_clipExtent(x0, y0, x1, y1) {\n    return function(listener) {\n      var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring;\n      var clip = {\n        point: point,\n        lineStart: lineStart,\n        lineEnd: lineEnd,\n        polygonStart: function() {\n          listener = bufferListener;\n          segments = [];\n          polygon = [];\n          clean = true;\n        },\n        polygonEnd: function() {\n          listener = listener_;\n          segments = d3.merge(segments);\n          var clipStartInside = insidePolygon([ x0, y1 ]), inside = clean && clipStartInside, visible = segments.length;\n          if (inside || visible) {\n            listener.polygonStart();\n            if (inside) {\n              listener.lineStart();\n              interpolate(null, null, 1, listener);\n              listener.lineEnd();\n            }\n            if (visible) {\n              d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener);\n            }\n            listener.polygonEnd();\n          }\n          segments = polygon = ring = null;\n        }\n      };\n      function insidePolygon(p) {\n        var wn = 0, n = polygon.length, y = p[1];\n        for (var i = 0; i < n; ++i) {\n          for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) {\n            b = v[j];\n            if (a[1] <= y) {\n              if (b[1] > y && d3_cross2d(a, b, p) > 0) ++wn;\n            } else {\n              if (b[1] <= y && d3_cross2d(a, b, p) < 0) --wn;\n            }\n            a = b;\n          }\n        }\n        return wn !== 0;\n      }\n      function interpolate(from, to, direction, listener) {\n        var a = 0, a1 = 0;\n        if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) {\n          do {\n            listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n          } while ((a = (a + direction + 4) % 4) !== a1);\n        } else {\n          listener.point(to[0], to[1]);\n        }\n      }\n      function pointVisible(x, y) {\n        return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n      }\n      function point(x, y) {\n        if (pointVisible(x, y)) listener.point(x, y);\n      }\n      var x__, y__, v__, x_, y_, v_, first, clean;\n      function lineStart() {\n        clip.point = linePoint;\n        if (polygon) polygon.push(ring = []);\n        first = true;\n        v_ = false;\n        x_ = y_ = NaN;\n      }\n      function lineEnd() {\n        if (segments) {\n          linePoint(x__, y__);\n          if (v__ && v_) bufferListener.rejoin();\n          segments.push(bufferListener.buffer());\n        }\n        clip.point = point;\n        if (v_) listener.lineEnd();\n      }\n      function linePoint(x, y) {\n        x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x));\n        y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y));\n        var v = pointVisible(x, y);\n        if (polygon) ring.push([ x, y ]);\n        if (first) {\n          x__ = x, y__ = y, v__ = v;\n          first = false;\n          if (v) {\n            listener.lineStart();\n            listener.point(x, y);\n          }\n        } else {\n          if (v && v_) listener.point(x, y); else {\n            var l = {\n              a: {\n                x: x_,\n                y: y_\n              },\n              b: {\n                x: x,\n                y: y\n              }\n            };\n            if (clipLine(l)) {\n              if (!v_) {\n                listener.lineStart();\n                listener.point(l.a.x, l.a.y);\n              }\n              listener.point(l.b.x, l.b.y);\n              if (!v) listener.lineEnd();\n              clean = false;\n            } else if (v) {\n              listener.lineStart();\n              listener.point(x, y);\n              clean = false;\n            }\n          }\n        }\n        x_ = x, y_ = y, v_ = v;\n      }\n      return clip;\n    };\n    function corner(p, direction) {\n      return abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2;\n    }\n    function compare(a, b) {\n      return comparePoints(a.x, b.x);\n    }\n    function comparePoints(a, b) {\n      var ca = corner(a, 1), cb = corner(b, 1);\n      return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0];\n    }\n  }\n  function d3_geo_conic(projectAt) {\n    var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1);\n    p.parallels = function(_) {\n      if (!arguments.length) return [ φ0 / π * 180, φ1 / π * 180 ];\n      return m(φ0 = _[0] * π / 180, φ1 = _[1] * π / 180);\n    };\n    return p;\n  }\n  function d3_geo_conicEqualArea(φ0, φ1) {\n    var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), ρ0 = Math.sqrt(C) / n;\n    function forward(λ, φ) {\n      var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;\n      return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ];\n    }\n    forward.invert = function(x, y) {\n      var ρ0_y = ρ0 - y;\n      return [ Math.atan2(x, ρ0_y) / n, d3_asin((C - (x * x + ρ0_y * ρ0_y) * n * n) / (2 * n)) ];\n    };\n    return forward;\n  }\n  (d3.geo.conicEqualArea = function() {\n    return d3_geo_conic(d3_geo_conicEqualArea);\n  }).raw = d3_geo_conicEqualArea;\n  d3.geo.albers = function() {\n    return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070);\n  };\n  d3.geo.albersUsa = function() {\n    var lower48 = d3.geo.albers();\n    var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);\n    var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);\n    var point, pointStream = {\n      point: function(x, y) {\n        point = [ x, y ];\n      }\n    }, lower48Point, alaskaPoint, hawaiiPoint;\n    function albersUsa(coordinates) {\n      var x = coordinates[0], y = coordinates[1];\n      point = null;\n      (lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y);\n      return point;\n    }\n    albersUsa.invert = function(coordinates) {\n      var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k;\n      return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates);\n    };\n    albersUsa.stream = function(stream) {\n      var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream);\n      return {\n        point: function(x, y) {\n          lower48Stream.point(x, y);\n          alaskaStream.point(x, y);\n          hawaiiStream.point(x, y);\n        },\n        sphere: function() {\n          lower48Stream.sphere();\n          alaskaStream.sphere();\n          hawaiiStream.sphere();\n        },\n        lineStart: function() {\n          lower48Stream.lineStart();\n          alaskaStream.lineStart();\n          hawaiiStream.lineStart();\n        },\n        lineEnd: function() {\n          lower48Stream.lineEnd();\n          alaskaStream.lineEnd();\n          hawaiiStream.lineEnd();\n        },\n        polygonStart: function() {\n          lower48Stream.polygonStart();\n          alaskaStream.polygonStart();\n          hawaiiStream.polygonStart();\n        },\n        polygonEnd: function() {\n          lower48Stream.polygonEnd();\n          alaskaStream.polygonEnd();\n          hawaiiStream.polygonEnd();\n        }\n      };\n    };\n    albersUsa.precision = function(_) {\n      if (!arguments.length) return lower48.precision();\n      lower48.precision(_);\n      alaska.precision(_);\n      hawaii.precision(_);\n      return albersUsa;\n    };\n    albersUsa.scale = function(_) {\n      if (!arguments.length) return lower48.scale();\n      lower48.scale(_);\n      alaska.scale(_ * .35);\n      hawaii.scale(_);\n      return albersUsa.translate(lower48.translate());\n    };\n    albersUsa.translate = function(_) {\n      if (!arguments.length) return lower48.translate();\n      var k = lower48.scale(), x = +_[0], y = +_[1];\n      lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point;\n      alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;\n      hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;\n      return albersUsa;\n    };\n    return albersUsa.scale(1070);\n  };\n  var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = {\n    point: d3_noop,\n    lineStart: d3_noop,\n    lineEnd: d3_noop,\n    polygonStart: function() {\n      d3_geo_pathAreaPolygon = 0;\n      d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart;\n    },\n    polygonEnd: function() {\n      d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop;\n      d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2);\n    }\n  };\n  function d3_geo_pathAreaRingStart() {\n    var x00, y00, x0, y0;\n    d3_geo_pathArea.point = function(x, y) {\n      d3_geo_pathArea.point = nextPoint;\n      x00 = x0 = x, y00 = y0 = y;\n    };\n    function nextPoint(x, y) {\n      d3_geo_pathAreaPolygon += y0 * x - x0 * y;\n      x0 = x, y0 = y;\n    }\n    d3_geo_pathArea.lineEnd = function() {\n      nextPoint(x00, y00);\n    };\n  }\n  var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1;\n  var d3_geo_pathBounds = {\n    point: d3_geo_pathBoundsPoint,\n    lineStart: d3_noop,\n    lineEnd: d3_noop,\n    polygonStart: d3_noop,\n    polygonEnd: d3_noop\n  };\n  function d3_geo_pathBoundsPoint(x, y) {\n    if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x;\n    if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x;\n    if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y;\n    if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y;\n  }\n  function d3_geo_pathBuffer() {\n    var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];\n    var stream = {\n      point: point,\n      lineStart: function() {\n        stream.point = pointLineStart;\n      },\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        stream.lineEnd = lineEndPolygon;\n      },\n      polygonEnd: function() {\n        stream.lineEnd = lineEnd;\n        stream.point = point;\n      },\n      pointRadius: function(_) {\n        pointCircle = d3_geo_pathBufferCircle(_);\n        return stream;\n      },\n      result: function() {\n        if (buffer.length) {\n          var result = buffer.join(\"\");\n          buffer = [];\n          return result;\n        }\n      }\n    };\n    function point(x, y) {\n      buffer.push(\"M\", x, \",\", y, pointCircle);\n    }\n    function pointLineStart(x, y) {\n      buffer.push(\"M\", x, \",\", y);\n      stream.point = pointLine;\n    }\n    function pointLine(x, y) {\n      buffer.push(\"L\", x, \",\", y);\n    }\n    function lineEnd() {\n      stream.point = point;\n    }\n    function lineEndPolygon() {\n      buffer.push(\"Z\");\n    }\n    return stream;\n  }\n  function d3_geo_pathBufferCircle(radius) {\n    return \"m0,\" + radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius + \"z\";\n  }\n  var d3_geo_pathCentroid = {\n    point: d3_geo_pathCentroidPoint,\n    lineStart: d3_geo_pathCentroidLineStart,\n    lineEnd: d3_geo_pathCentroidLineEnd,\n    polygonStart: function() {\n      d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart;\n    },\n    polygonEnd: function() {\n      d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;\n      d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart;\n      d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd;\n    }\n  };\n  function d3_geo_pathCentroidPoint(x, y) {\n    d3_geo_centroidX0 += x;\n    d3_geo_centroidY0 += y;\n    ++d3_geo_centroidZ0;\n  }\n  function d3_geo_pathCentroidLineStart() {\n    var x0, y0;\n    d3_geo_pathCentroid.point = function(x, y) {\n      d3_geo_pathCentroid.point = nextPoint;\n      d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n    };\n    function nextPoint(x, y) {\n      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);\n      d3_geo_centroidX1 += z * (x0 + x) / 2;\n      d3_geo_centroidY1 += z * (y0 + y) / 2;\n      d3_geo_centroidZ1 += z;\n      d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n    }\n  }\n  function d3_geo_pathCentroidLineEnd() {\n    d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;\n  }\n  function d3_geo_pathCentroidRingStart() {\n    var x00, y00, x0, y0;\n    d3_geo_pathCentroid.point = function(x, y) {\n      d3_geo_pathCentroid.point = nextPoint;\n      d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y);\n    };\n    function nextPoint(x, y) {\n      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);\n      d3_geo_centroidX1 += z * (x0 + x) / 2;\n      d3_geo_centroidY1 += z * (y0 + y) / 2;\n      d3_geo_centroidZ1 += z;\n      z = y0 * x - x0 * y;\n      d3_geo_centroidX2 += z * (x0 + x);\n      d3_geo_centroidY2 += z * (y0 + y);\n      d3_geo_centroidZ2 += z * 3;\n      d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n    }\n    d3_geo_pathCentroid.lineEnd = function() {\n      nextPoint(x00, y00);\n    };\n  }\n  function d3_geo_pathContext(context) {\n    var pointRadius = 4.5;\n    var stream = {\n      point: point,\n      lineStart: function() {\n        stream.point = pointLineStart;\n      },\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        stream.lineEnd = lineEndPolygon;\n      },\n      polygonEnd: function() {\n        stream.lineEnd = lineEnd;\n        stream.point = point;\n      },\n      pointRadius: function(_) {\n        pointRadius = _;\n        return stream;\n      },\n      result: d3_noop\n    };\n    function point(x, y) {\n      context.moveTo(x + pointRadius, y);\n      context.arc(x, y, pointRadius, 0, τ);\n    }\n    function pointLineStart(x, y) {\n      context.moveTo(x, y);\n      stream.point = pointLine;\n    }\n    function pointLine(x, y) {\n      context.lineTo(x, y);\n    }\n    function lineEnd() {\n      stream.point = point;\n    }\n    function lineEndPolygon() {\n      context.closePath();\n    }\n    return stream;\n  }\n  function d3_geo_resample(project) {\n    var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;\n    function resample(stream) {\n      return (maxDepth ? resampleRecursive : resampleNone)(stream);\n    }\n    function resampleNone(stream) {\n      return d3_geo_transformPoint(stream, function(x, y) {\n        x = project(x, y);\n        stream.point(x[0], x[1]);\n      });\n    }\n    function resampleRecursive(stream) {\n      var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0;\n      var resample = {\n        point: point,\n        lineStart: lineStart,\n        lineEnd: lineEnd,\n        polygonStart: function() {\n          stream.polygonStart();\n          resample.lineStart = ringStart;\n        },\n        polygonEnd: function() {\n          stream.polygonEnd();\n          resample.lineStart = lineStart;\n        }\n      };\n      function point(x, y) {\n        x = project(x, y);\n        stream.point(x[0], x[1]);\n      }\n      function lineStart() {\n        x0 = NaN;\n        resample.point = linePoint;\n        stream.lineStart();\n      }\n      function linePoint(λ, φ) {\n        var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ);\n        resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n        stream.point(x0, y0);\n      }\n      function lineEnd() {\n        resample.point = point;\n        stream.lineEnd();\n      }\n      function ringStart() {\n        lineStart();\n        resample.point = ringPoint;\n        resample.lineEnd = ringEnd;\n      }\n      function ringPoint(λ, φ) {\n        linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n        resample.point = linePoint;\n      }\n      function ringEnd() {\n        resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream);\n        resample.lineEnd = lineEnd;\n        lineEnd();\n      }\n      return resample;\n    }\n    function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {\n      var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy;\n      if (d2 > 4 * δ2 && depth--) {\n        var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = abs(abs(c) - 1) < ε || abs(λ0 - λ1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2;\n        if (dz * dz / d2 > δ2 || abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) {\n          resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream);\n          stream.point(x2, y2);\n          resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream);\n        }\n      }\n    }\n    resample.precision = function(_) {\n      if (!arguments.length) return Math.sqrt(δ2);\n      maxDepth = (δ2 = _ * _) > 0 && 16;\n      return resample;\n    };\n    return resample;\n  }\n  d3.geo.path = function() {\n    var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream;\n    function path(object) {\n      if (object) {\n        if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n        if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream);\n        d3.geo.stream(object, cacheStream);\n      }\n      return contextStream.result();\n    }\n    path.area = function(object) {\n      d3_geo_pathAreaSum = 0;\n      d3.geo.stream(object, projectStream(d3_geo_pathArea));\n      return d3_geo_pathAreaSum;\n    };\n    path.centroid = function(object) {\n      d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;\n      d3.geo.stream(object, projectStream(d3_geo_pathCentroid));\n      return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ];\n    };\n    path.bounds = function(object) {\n      d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity);\n      d3.geo.stream(object, projectStream(d3_geo_pathBounds));\n      return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ];\n    };\n    path.projection = function(_) {\n      if (!arguments.length) return projection;\n      projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity;\n      return reset();\n    };\n    path.context = function(_) {\n      if (!arguments.length) return context;\n      contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_);\n      if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n      return reset();\n    };\n    path.pointRadius = function(_) {\n      if (!arguments.length) return pointRadius;\n      pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n      return path;\n    };\n    function reset() {\n      cacheStream = null;\n      return path;\n    }\n    return path.projection(d3.geo.albersUsa()).context(null);\n  };\n  function d3_geo_pathProjectStream(project) {\n    var resample = d3_geo_resample(function(x, y) {\n      return project([ x * d3_degrees, y * d3_degrees ]);\n    });\n    return function(stream) {\n      return d3_geo_projectionRadians(resample(stream));\n    };\n  }\n  d3.geo.transform = function(methods) {\n    return {\n      stream: function(stream) {\n        var transform = new d3_geo_transform(stream);\n        for (var k in methods) transform[k] = methods[k];\n        return transform;\n      }\n    };\n  };\n  function d3_geo_transform(stream) {\n    this.stream = stream;\n  }\n  d3_geo_transform.prototype = {\n    point: function(x, y) {\n      this.stream.point(x, y);\n    },\n    sphere: function() {\n      this.stream.sphere();\n    },\n    lineStart: function() {\n      this.stream.lineStart();\n    },\n    lineEnd: function() {\n      this.stream.lineEnd();\n    },\n    polygonStart: function() {\n      this.stream.polygonStart();\n    },\n    polygonEnd: function() {\n      this.stream.polygonEnd();\n    }\n  };\n  function d3_geo_transformPoint(stream, point) {\n    return {\n      point: point,\n      sphere: function() {\n        stream.sphere();\n      },\n      lineStart: function() {\n        stream.lineStart();\n      },\n      lineEnd: function() {\n        stream.lineEnd();\n      },\n      polygonStart: function() {\n        stream.polygonStart();\n      },\n      polygonEnd: function() {\n        stream.polygonEnd();\n      }\n    };\n  }\n  d3.geo.projection = d3_geo_projection;\n  d3.geo.projectionMutator = d3_geo_projectionMutator;\n  function d3_geo_projection(project) {\n    return d3_geo_projectionMutator(function() {\n      return project;\n    })();\n  }\n  function d3_geo_projectionMutator(projectAt) {\n    var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {\n      x = project(x, y);\n      return [ x[0] * k + δx, δy - x[1] * k ];\n    }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream;\n    function projection(point) {\n      point = projectRotate(point[0] * d3_radians, point[1] * d3_radians);\n      return [ point[0] * k + δx, δy - point[1] * k ];\n    }\n    function invert(point) {\n      point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k);\n      return point && [ point[0] * d3_degrees, point[1] * d3_degrees ];\n    }\n    projection.stream = function(output) {\n      if (stream) stream.valid = false;\n      stream = d3_geo_projectionRadians(preclip(rotate, projectResample(postclip(output))));\n      stream.valid = true;\n      return stream;\n    };\n    projection.clipAngle = function(_) {\n      if (!arguments.length) return clipAngle;\n      preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians);\n      return invalidate();\n    };\n    projection.clipExtent = function(_) {\n      if (!arguments.length) return clipExtent;\n      clipExtent = _;\n      postclip = _ ? d3_geo_clipExtent(_[0][0], _[0][1], _[1][0], _[1][1]) : d3_identity;\n      return invalidate();\n    };\n    projection.scale = function(_) {\n      if (!arguments.length) return k;\n      k = +_;\n      return reset();\n    };\n    projection.translate = function(_) {\n      if (!arguments.length) return [ x, y ];\n      x = +_[0];\n      y = +_[1];\n      return reset();\n    };\n    projection.center = function(_) {\n      if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ];\n      λ = _[0] % 360 * d3_radians;\n      φ = _[1] % 360 * d3_radians;\n      return reset();\n    };\n    projection.rotate = function(_) {\n      if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ];\n      δλ = _[0] % 360 * d3_radians;\n      δφ = _[1] % 360 * d3_radians;\n      δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0;\n      return reset();\n    };\n    d3.rebind(projection, projectResample, \"precision\");\n    function reset() {\n      projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project);\n      var center = project(λ, φ);\n      δx = x - center[0] * k;\n      δy = y + center[1] * k;\n      return invalidate();\n    }\n    function invalidate() {\n      if (stream) stream.valid = false, stream = null;\n      return projection;\n    }\n    return function() {\n      project = projectAt.apply(this, arguments);\n      projection.invert = project.invert && invert;\n      return reset();\n    };\n  }\n  function d3_geo_projectionRadians(stream) {\n    return d3_geo_transformPoint(stream, function(x, y) {\n      stream.point(x * d3_radians, y * d3_radians);\n    });\n  }\n  function d3_geo_equirectangular(λ, φ) {\n    return [ λ, φ ];\n  }\n  (d3.geo.equirectangular = function() {\n    return d3_geo_projection(d3_geo_equirectangular);\n  }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular;\n  d3.geo.rotation = function(rotate) {\n    rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0);\n    function forward(coordinates) {\n      coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);\n      return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;\n    }\n    forward.invert = function(coordinates) {\n      coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians);\n      return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;\n    };\n    return forward;\n  };\n  function d3_geo_identityRotation(λ, φ) {\n    return [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];\n  }\n  d3_geo_identityRotation.invert = d3_geo_equirectangular;\n  function d3_geo_rotation(δλ, δφ, δγ) {\n    return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_identityRotation;\n  }\n  function d3_geo_forwardRotationλ(δλ) {\n    return function(λ, φ) {\n      return λ += δλ, [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];\n    };\n  }\n  function d3_geo_rotationλ(δλ) {\n    var rotation = d3_geo_forwardRotationλ(δλ);\n    rotation.invert = d3_geo_forwardRotationλ(-δλ);\n    return rotation;\n  }\n  function d3_geo_rotationφγ(δφ, δγ) {\n    var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ);\n    function rotation(λ, φ) {\n      var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ;\n      return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ];\n    }\n    rotation.invert = function(λ, φ) {\n      var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ;\n      return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ];\n    };\n    return rotation;\n  }\n  d3.geo.circle = function() {\n    var origin = [ 0, 0 ], angle, precision = 6, interpolate;\n    function circle() {\n      var center = typeof origin === \"function\" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];\n      interpolate(null, null, 1, {\n        point: function(x, y) {\n          ring.push(x = rotate(x, y));\n          x[0] *= d3_degrees, x[1] *= d3_degrees;\n        }\n      });\n      return {\n        type: \"Polygon\",\n        coordinates: [ ring ]\n      };\n    }\n    circle.origin = function(x) {\n      if (!arguments.length) return origin;\n      origin = x;\n      return circle;\n    };\n    circle.angle = function(x) {\n      if (!arguments.length) return angle;\n      interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians);\n      return circle;\n    };\n    circle.precision = function(_) {\n      if (!arguments.length) return precision;\n      interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians);\n      return circle;\n    };\n    return circle.angle(90);\n  };\n  function d3_geo_circleInterpolate(radius, precision) {\n    var cr = Math.cos(radius), sr = Math.sin(radius);\n    return function(from, to, direction, listener) {\n      var step = direction * precision;\n      if (from != null) {\n        from = d3_geo_circleAngle(cr, from);\n        to = d3_geo_circleAngle(cr, to);\n        if (direction > 0 ? from < to : from > to) from += direction * τ;\n      } else {\n        from = radius + direction * τ;\n        to = radius - .5 * step;\n      }\n      for (var point, t = from; direction > 0 ? t > to : t < to; t -= step) {\n        listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]);\n      }\n    };\n  }\n  function d3_geo_circleAngle(cr, point) {\n    var a = d3_geo_cartesian(point);\n    a[0] -= cr;\n    d3_geo_cartesianNormalize(a);\n    var angle = d3_acos(-a[1]);\n    return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI);\n  }\n  d3.geo.distance = function(a, b) {\n    var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t;\n    return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ);\n  };\n  d3.geo.graticule = function() {\n    var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;\n    function graticule() {\n      return {\n        type: \"MultiLineString\",\n        coordinates: lines()\n      };\n    }\n    function lines() {\n      return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) {\n        return abs(x % DX) > ε;\n      }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) {\n        return abs(y % DY) > ε;\n      }).map(y));\n    }\n    graticule.lines = function() {\n      return lines().map(function(coordinates) {\n        return {\n          type: \"LineString\",\n          coordinates: coordinates\n        };\n      });\n    };\n    graticule.outline = function() {\n      return {\n        type: \"Polygon\",\n        coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ]\n      };\n    };\n    graticule.extent = function(_) {\n      if (!arguments.length) return graticule.minorExtent();\n      return graticule.majorExtent(_).minorExtent(_);\n    };\n    graticule.majorExtent = function(_) {\n      if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ];\n      X0 = +_[0][0], X1 = +_[1][0];\n      Y0 = +_[0][1], Y1 = +_[1][1];\n      if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n      if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n      return graticule.precision(precision);\n    };\n    graticule.minorExtent = function(_) {\n      if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];\n      x0 = +_[0][0], x1 = +_[1][0];\n      y0 = +_[0][1], y1 = +_[1][1];\n      if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n      if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n      return graticule.precision(precision);\n    };\n    graticule.step = function(_) {\n      if (!arguments.length) return graticule.minorStep();\n      return graticule.majorStep(_).minorStep(_);\n    };\n    graticule.majorStep = function(_) {\n      if (!arguments.length) return [ DX, DY ];\n      DX = +_[0], DY = +_[1];\n      return graticule;\n    };\n    graticule.minorStep = function(_) {\n      if (!arguments.length) return [ dx, dy ];\n      dx = +_[0], dy = +_[1];\n      return graticule;\n    };\n    graticule.precision = function(_) {\n      if (!arguments.length) return precision;\n      precision = +_;\n      x = d3_geo_graticuleX(y0, y1, 90);\n      y = d3_geo_graticuleY(x0, x1, precision);\n      X = d3_geo_graticuleX(Y0, Y1, 90);\n      Y = d3_geo_graticuleY(X0, X1, precision);\n      return graticule;\n    };\n    return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]);\n  };\n  function d3_geo_graticuleX(y0, y1, dy) {\n    var y = d3.range(y0, y1 - ε, dy).concat(y1);\n    return function(x) {\n      return y.map(function(y) {\n        return [ x, y ];\n      });\n    };\n  }\n  function d3_geo_graticuleY(x0, x1, dx) {\n    var x = d3.range(x0, x1 - ε, dx).concat(x1);\n    return function(y) {\n      return x.map(function(x) {\n        return [ x, y ];\n      });\n    };\n  }\n  function d3_source(d) {\n    return d.source;\n  }\n  function d3_target(d) {\n    return d.target;\n  }\n  d3.geo.greatArc = function() {\n    var source = d3_source, source_, target = d3_target, target_;\n    function greatArc() {\n      return {\n        type: \"LineString\",\n        coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ]\n      };\n    }\n    greatArc.distance = function() {\n      return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments));\n    };\n    greatArc.source = function(_) {\n      if (!arguments.length) return source;\n      source = _, source_ = typeof _ === \"function\" ? null : _;\n      return greatArc;\n    };\n    greatArc.target = function(_) {\n      if (!arguments.length) return target;\n      target = _, target_ = typeof _ === \"function\" ? null : _;\n      return greatArc;\n    };\n    greatArc.precision = function() {\n      return arguments.length ? greatArc : 0;\n    };\n    return greatArc;\n  };\n  d3.geo.interpolate = function(source, target) {\n    return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians);\n  };\n  function d3_geo_interpolate(x0, y0, x1, y1) {\n    var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d);\n    var interpolate = d ? function(t) {\n      var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;\n      return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ];\n    } : function() {\n      return [ x0 * d3_degrees, y0 * d3_degrees ];\n    };\n    interpolate.distance = d;\n    return interpolate;\n  }\n  d3.geo.length = function(object) {\n    d3_geo_lengthSum = 0;\n    d3.geo.stream(object, d3_geo_length);\n    return d3_geo_lengthSum;\n  };\n  var d3_geo_lengthSum;\n  var d3_geo_length = {\n    sphere: d3_noop,\n    point: d3_noop,\n    lineStart: d3_geo_lengthLineStart,\n    lineEnd: d3_noop,\n    polygonStart: d3_noop,\n    polygonEnd: d3_noop\n  };\n  function d3_geo_lengthLineStart() {\n    var λ0, sinφ0, cosφ0;\n    d3_geo_length.point = function(λ, φ) {\n      λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);\n      d3_geo_length.point = nextPoint;\n    };\n    d3_geo_length.lineEnd = function() {\n      d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;\n    };\n    function nextPoint(λ, φ) {\n      var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t);\n      d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);\n      λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;\n    }\n  }\n  function d3_geo_azimuthal(scale, angle) {\n    function azimuthal(λ, φ) {\n      var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ);\n      return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ];\n    }\n    azimuthal.invert = function(x, y) {\n      var ρ = Math.sqrt(x * x + y * y), c = angle(ρ), sinc = Math.sin(c), cosc = Math.cos(c);\n      return [ Math.atan2(x * sinc, ρ * cosc), Math.asin(ρ && y * sinc / ρ) ];\n    };\n    return azimuthal;\n  }\n  var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) {\n    return Math.sqrt(2 / (1 + cosλcosφ));\n  }, function(ρ) {\n    return 2 * Math.asin(ρ / 2);\n  });\n  (d3.geo.azimuthalEqualArea = function() {\n    return d3_geo_projection(d3_geo_azimuthalEqualArea);\n  }).raw = d3_geo_azimuthalEqualArea;\n  var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) {\n    var c = Math.acos(cosλcosφ);\n    return c && c / Math.sin(c);\n  }, d3_identity);\n  (d3.geo.azimuthalEquidistant = function() {\n    return d3_geo_projection(d3_geo_azimuthalEquidistant);\n  }).raw = d3_geo_azimuthalEquidistant;\n  function d3_geo_conicConformal(φ0, φ1) {\n    var cosφ0 = Math.cos(φ0), t = function(φ) {\n      return Math.tan(π / 4 + φ / 2);\n    }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n;\n    if (!n) return d3_geo_mercator;\n    function forward(λ, φ) {\n      if (F > 0) {\n        if (φ < -halfπ + ε) φ = -halfπ + ε;\n      } else {\n        if (φ > halfπ - ε) φ = halfπ - ε;\n      }\n      var ρ = F / Math.pow(t(φ), n);\n      return [ ρ * Math.sin(n * λ), F - ρ * Math.cos(n * λ) ];\n    }\n    forward.invert = function(x, y) {\n      var ρ0_y = F - y, ρ = d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y);\n      return [ Math.atan2(x, ρ0_y) / n, 2 * Math.atan(Math.pow(F / ρ, 1 / n)) - halfπ ];\n    };\n    return forward;\n  }\n  (d3.geo.conicConformal = function() {\n    return d3_geo_conic(d3_geo_conicConformal);\n  }).raw = d3_geo_conicConformal;\n  function d3_geo_conicEquidistant(φ0, φ1) {\n    var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0;\n    if (abs(n) < ε) return d3_geo_equirectangular;\n    function forward(λ, φ) {\n      var ρ = G - φ;\n      return [ ρ * Math.sin(n * λ), G - ρ * Math.cos(n * λ) ];\n    }\n    forward.invert = function(x, y) {\n      var ρ0_y = G - y;\n      return [ Math.atan2(x, ρ0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y) ];\n    };\n    return forward;\n  }\n  (d3.geo.conicEquidistant = function() {\n    return d3_geo_conic(d3_geo_conicEquidistant);\n  }).raw = d3_geo_conicEquidistant;\n  var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) {\n    return 1 / cosλcosφ;\n  }, Math.atan);\n  (d3.geo.gnomonic = function() {\n    return d3_geo_projection(d3_geo_gnomonic);\n  }).raw = d3_geo_gnomonic;\n  function d3_geo_mercator(λ, φ) {\n    return [ λ, Math.log(Math.tan(π / 4 + φ / 2)) ];\n  }\n  d3_geo_mercator.invert = function(x, y) {\n    return [ x, 2 * Math.atan(Math.exp(y)) - halfπ ];\n  };\n  function d3_geo_mercatorProjection(project) {\n    var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto;\n    m.scale = function() {\n      var v = scale.apply(m, arguments);\n      return v === m ? clipAuto ? m.clipExtent(null) : m : v;\n    };\n    m.translate = function() {\n      var v = translate.apply(m, arguments);\n      return v === m ? clipAuto ? m.clipExtent(null) : m : v;\n    };\n    m.clipExtent = function(_) {\n      var v = clipExtent.apply(m, arguments);\n      if (v === m) {\n        if (clipAuto = _ == null) {\n          var k = π * scale(), t = translate();\n          clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]);\n        }\n      } else if (clipAuto) {\n        v = null;\n      }\n      return v;\n    };\n    return m.clipExtent(null);\n  }\n  (d3.geo.mercator = function() {\n    return d3_geo_mercatorProjection(d3_geo_mercator);\n  }).raw = d3_geo_mercator;\n  var d3_geo_orthographic = d3_geo_azimuthal(function() {\n    return 1;\n  }, Math.asin);\n  (d3.geo.orthographic = function() {\n    return d3_geo_projection(d3_geo_orthographic);\n  }).raw = d3_geo_orthographic;\n  var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) {\n    return 1 / (1 + cosλcosφ);\n  }, function(ρ) {\n    return 2 * Math.atan(ρ);\n  });\n  (d3.geo.stereographic = function() {\n    return d3_geo_projection(d3_geo_stereographic);\n  }).raw = d3_geo_stereographic;\n  function d3_geo_transverseMercator(λ, φ) {\n    return [ Math.log(Math.tan(π / 4 + φ / 2)), -λ ];\n  }\n  d3_geo_transverseMercator.invert = function(x, y) {\n    return [ -y, 2 * Math.atan(Math.exp(x)) - halfπ ];\n  };\n  (d3.geo.transverseMercator = function() {\n    var projection = d3_geo_mercatorProjection(d3_geo_transverseMercator), center = projection.center, rotate = projection.rotate;\n    projection.center = function(_) {\n      return _ ? center([ -_[1], _[0] ]) : (_ = center(), [ _[1], -_[0] ]);\n    };\n    projection.rotate = function(_) {\n      return _ ? rotate([ _[0], _[1], _.length > 2 ? _[2] + 90 : 90 ]) : (_ = rotate(), \n      [ _[0], _[1], _[2] - 90 ]);\n    };\n    return rotate([ 0, 0, 90 ]);\n  }).raw = d3_geo_transverseMercator;\n  d3.geom = {};\n  function d3_geom_pointX(d) {\n    return d[0];\n  }\n  function d3_geom_pointY(d) {\n    return d[1];\n  }\n  d3.geom.hull = function(vertices) {\n    var x = d3_geom_pointX, y = d3_geom_pointY;\n    if (arguments.length) return hull(vertices);\n    function hull(data) {\n      if (data.length < 3) return [];\n      var fx = d3_functor(x), fy = d3_functor(y), i, n = data.length, points = [], flippedPoints = [];\n      for (i = 0; i < n; i++) {\n        points.push([ +fx.call(this, data[i], i), +fy.call(this, data[i], i), i ]);\n      }\n      points.sort(d3_geom_hullOrder);\n      for (i = 0; i < n; i++) flippedPoints.push([ points[i][0], -points[i][1] ]);\n      var upper = d3_geom_hullUpper(points), lower = d3_geom_hullUpper(flippedPoints);\n      var skipLeft = lower[0] === upper[0], skipRight = lower[lower.length - 1] === upper[upper.length - 1], polygon = [];\n      for (i = upper.length - 1; i >= 0; --i) polygon.push(data[points[upper[i]][2]]);\n      for (i = +skipLeft; i < lower.length - skipRight; ++i) polygon.push(data[points[lower[i]][2]]);\n      return polygon;\n    }\n    hull.x = function(_) {\n      return arguments.length ? (x = _, hull) : x;\n    };\n    hull.y = function(_) {\n      return arguments.length ? (y = _, hull) : y;\n    };\n    return hull;\n  };\n  function d3_geom_hullUpper(points) {\n    var n = points.length, hull = [ 0, 1 ], hs = 2;\n    for (var i = 2; i < n; i++) {\n      while (hs > 1 && d3_cross2d(points[hull[hs - 2]], points[hull[hs - 1]], points[i]) <= 0) --hs;\n      hull[hs++] = i;\n    }\n    return hull.slice(0, hs);\n  }\n  function d3_geom_hullOrder(a, b) {\n    return a[0] - b[0] || a[1] - b[1];\n  }\n  d3.geom.polygon = function(coordinates) {\n    d3_subclass(coordinates, d3_geom_polygonPrototype);\n    return coordinates;\n  };\n  var d3_geom_polygonPrototype = d3.geom.polygon.prototype = [];\n  d3_geom_polygonPrototype.area = function() {\n    var i = -1, n = this.length, a, b = this[n - 1], area = 0;\n    while (++i < n) {\n      a = b;\n      b = this[i];\n      area += a[1] * b[0] - a[0] * b[1];\n    }\n    return area * .5;\n  };\n  d3_geom_polygonPrototype.centroid = function(k) {\n    var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c;\n    if (!arguments.length) k = -1 / (6 * this.area());\n    while (++i < n) {\n      a = b;\n      b = this[i];\n      c = a[0] * b[1] - b[0] * a[1];\n      x += (a[0] + b[0]) * c;\n      y += (a[1] + b[1]) * c;\n    }\n    return [ x * k, y * k ];\n  };\n  d3_geom_polygonPrototype.clip = function(subject) {\n    var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d;\n    while (++i < n) {\n      input = subject.slice();\n      subject.length = 0;\n      b = this[i];\n      c = input[(m = input.length - closed) - 1];\n      j = -1;\n      while (++j < m) {\n        d = input[j];\n        if (d3_geom_polygonInside(d, a, b)) {\n          if (!d3_geom_polygonInside(c, a, b)) {\n            subject.push(d3_geom_polygonIntersect(c, d, a, b));\n          }\n          subject.push(d);\n        } else if (d3_geom_polygonInside(c, a, b)) {\n          subject.push(d3_geom_polygonIntersect(c, d, a, b));\n        }\n        c = d;\n      }\n      if (closed) subject.push(subject[0]);\n      a = b;\n    }\n    return subject;\n  };\n  function d3_geom_polygonInside(p, a, b) {\n    return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);\n  }\n  function d3_geom_polygonIntersect(c, d, a, b) {\n    var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);\n    return [ x1 + ua * x21, y1 + ua * y21 ];\n  }\n  function d3_geom_polygonClosed(coordinates) {\n    var a = coordinates[0], b = coordinates[coordinates.length - 1];\n    return !(a[0] - b[0] || a[1] - b[1]);\n  }\n  var d3_geom_voronoiEdges, d3_geom_voronoiCells, d3_geom_voronoiBeaches, d3_geom_voronoiBeachPool = [], d3_geom_voronoiFirstCircle, d3_geom_voronoiCircles, d3_geom_voronoiCirclePool = [];\n  function d3_geom_voronoiBeach() {\n    d3_geom_voronoiRedBlackNode(this);\n    this.edge = this.site = this.circle = null;\n  }\n  function d3_geom_voronoiCreateBeach(site) {\n    var beach = d3_geom_voronoiBeachPool.pop() || new d3_geom_voronoiBeach();\n    beach.site = site;\n    return beach;\n  }\n  function d3_geom_voronoiDetachBeach(beach) {\n    d3_geom_voronoiDetachCircle(beach);\n    d3_geom_voronoiBeaches.remove(beach);\n    d3_geom_voronoiBeachPool.push(beach);\n    d3_geom_voronoiRedBlackNode(beach);\n  }\n  function d3_geom_voronoiRemoveBeach(beach) {\n    var circle = beach.circle, x = circle.x, y = circle.cy, vertex = {\n      x: x,\n      y: y\n    }, previous = beach.P, next = beach.N, disappearing = [ beach ];\n    d3_geom_voronoiDetachBeach(beach);\n    var lArc = previous;\n    while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) {\n      previous = lArc.P;\n      disappearing.unshift(lArc);\n      d3_geom_voronoiDetachBeach(lArc);\n      lArc = previous;\n    }\n    disappearing.unshift(lArc);\n    d3_geom_voronoiDetachCircle(lArc);\n    var rArc = next;\n    while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) {\n      next = rArc.N;\n      disappearing.push(rArc);\n      d3_geom_voronoiDetachBeach(rArc);\n      rArc = next;\n    }\n    disappearing.push(rArc);\n    d3_geom_voronoiDetachCircle(rArc);\n    var nArcs = disappearing.length, iArc;\n    for (iArc = 1; iArc < nArcs; ++iArc) {\n      rArc = disappearing[iArc];\n      lArc = disappearing[iArc - 1];\n      d3_geom_voronoiSetEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);\n    }\n    lArc = disappearing[0];\n    rArc = disappearing[nArcs - 1];\n    rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, rArc.site, null, vertex);\n    d3_geom_voronoiAttachCircle(lArc);\n    d3_geom_voronoiAttachCircle(rArc);\n  }\n  function d3_geom_voronoiAddBeach(site) {\n    var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._;\n    while (node) {\n      dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x;\n      if (dxl > ε) node = node.L; else {\n        dxr = x - d3_geom_voronoiRightBreakPoint(node, directrix);\n        if (dxr > ε) {\n          if (!node.R) {\n            lArc = node;\n            break;\n          }\n          node = node.R;\n        } else {\n          if (dxl > -ε) {\n            lArc = node.P;\n            rArc = node;\n          } else if (dxr > -ε) {\n            lArc = node;\n            rArc = node.N;\n          } else {\n            lArc = rArc = node;\n          }\n          break;\n        }\n      }\n    }\n    var newArc = d3_geom_voronoiCreateBeach(site);\n    d3_geom_voronoiBeaches.insert(lArc, newArc);\n    if (!lArc && !rArc) return;\n    if (lArc === rArc) {\n      d3_geom_voronoiDetachCircle(lArc);\n      rArc = d3_geom_voronoiCreateBeach(lArc.site);\n      d3_geom_voronoiBeaches.insert(newArc, rArc);\n      newArc.edge = rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);\n      d3_geom_voronoiAttachCircle(lArc);\n      d3_geom_voronoiAttachCircle(rArc);\n      return;\n    }\n    if (!rArc) {\n      newArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);\n      return;\n    }\n    d3_geom_voronoiDetachCircle(lArc);\n    d3_geom_voronoiDetachCircle(rArc);\n    var lSite = lArc.site, ax = lSite.x, ay = lSite.y, bx = site.x - ax, by = site.y - ay, rSite = rArc.site, cx = rSite.x - ax, cy = rSite.y - ay, d = 2 * (bx * cy - by * cx), hb = bx * bx + by * by, hc = cx * cx + cy * cy, vertex = {\n      x: (cy * hb - by * hc) / d + ax,\n      y: (bx * hc - cx * hb) / d + ay\n    };\n    d3_geom_voronoiSetEdgeEnd(rArc.edge, lSite, rSite, vertex);\n    newArc.edge = d3_geom_voronoiCreateEdge(lSite, site, null, vertex);\n    rArc.edge = d3_geom_voronoiCreateEdge(site, rSite, null, vertex);\n    d3_geom_voronoiAttachCircle(lArc);\n    d3_geom_voronoiAttachCircle(rArc);\n  }\n  function d3_geom_voronoiLeftBreakPoint(arc, directrix) {\n    var site = arc.site, rfocx = site.x, rfocy = site.y, pby2 = rfocy - directrix;\n    if (!pby2) return rfocx;\n    var lArc = arc.P;\n    if (!lArc) return -Infinity;\n    site = lArc.site;\n    var lfocx = site.x, lfocy = site.y, plby2 = lfocy - directrix;\n    if (!plby2) return lfocx;\n    var hl = lfocx - rfocx, aby2 = 1 / pby2 - 1 / plby2, b = hl / plby2;\n    if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n    return (rfocx + lfocx) / 2;\n  }\n  function d3_geom_voronoiRightBreakPoint(arc, directrix) {\n    var rArc = arc.N;\n    if (rArc) return d3_geom_voronoiLeftBreakPoint(rArc, directrix);\n    var site = arc.site;\n    return site.y === directrix ? site.x : Infinity;\n  }\n  function d3_geom_voronoiCell(site) {\n    this.site = site;\n    this.edges = [];\n  }\n  d3_geom_voronoiCell.prototype.prepare = function() {\n    var halfEdges = this.edges, iHalfEdge = halfEdges.length, edge;\n    while (iHalfEdge--) {\n      edge = halfEdges[iHalfEdge].edge;\n      if (!edge.b || !edge.a) halfEdges.splice(iHalfEdge, 1);\n    }\n    halfEdges.sort(d3_geom_voronoiHalfEdgeOrder);\n    return halfEdges.length;\n  };\n  function d3_geom_voronoiCloseCells(extent) {\n    var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end;\n    while (iCell--) {\n      cell = cells[iCell];\n      if (!cell || !cell.prepare()) continue;\n      halfEdges = cell.edges;\n      nHalfEdges = halfEdges.length;\n      iHalfEdge = 0;\n      while (iHalfEdge < nHalfEdges) {\n        end = halfEdges[iHalfEdge].end(), x3 = end.x, y3 = end.y;\n        start = halfEdges[++iHalfEdge % nHalfEdges].start(), x2 = start.x, y2 = start.y;\n        if (abs(x3 - x2) > ε || abs(y3 - y2) > ε) {\n          halfEdges.splice(iHalfEdge, 0, new d3_geom_voronoiHalfEdge(d3_geom_voronoiCreateBorderEdge(cell.site, end, abs(x3 - x0) < ε && y1 - y3 > ε ? {\n            x: x0,\n            y: abs(x2 - x0) < ε ? y2 : y1\n          } : abs(y3 - y1) < ε && x1 - x3 > ε ? {\n            x: abs(y2 - y1) < ε ? x2 : x1,\n            y: y1\n          } : abs(x3 - x1) < ε && y3 - y0 > ε ? {\n            x: x1,\n            y: abs(x2 - x1) < ε ? y2 : y0\n          } : abs(y3 - y0) < ε && x3 - x0 > ε ? {\n            x: abs(y2 - y0) < ε ? x2 : x0,\n            y: y0\n          } : null), cell.site, null));\n          ++nHalfEdges;\n        }\n      }\n    }\n  }\n  function d3_geom_voronoiHalfEdgeOrder(a, b) {\n    return b.angle - a.angle;\n  }\n  function d3_geom_voronoiCircle() {\n    d3_geom_voronoiRedBlackNode(this);\n    this.x = this.y = this.arc = this.site = this.cy = null;\n  }\n  function d3_geom_voronoiAttachCircle(arc) {\n    var lArc = arc.P, rArc = arc.N;\n    if (!lArc || !rArc) return;\n    var lSite = lArc.site, cSite = arc.site, rSite = rArc.site;\n    if (lSite === rSite) return;\n    var bx = cSite.x, by = cSite.y, ax = lSite.x - bx, ay = lSite.y - by, cx = rSite.x - bx, cy = rSite.y - by;\n    var d = 2 * (ax * cy - ay * cx);\n    if (d >= -ε2) return;\n    var ha = ax * ax + ay * ay, hc = cx * cx + cy * cy, x = (cy * ha - ay * hc) / d, y = (ax * hc - cx * ha) / d, cy = y + by;\n    var circle = d3_geom_voronoiCirclePool.pop() || new d3_geom_voronoiCircle();\n    circle.arc = arc;\n    circle.site = cSite;\n    circle.x = x + bx;\n    circle.y = cy + Math.sqrt(x * x + y * y);\n    circle.cy = cy;\n    arc.circle = circle;\n    var before = null, node = d3_geom_voronoiCircles._;\n    while (node) {\n      if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) {\n        if (node.L) node = node.L; else {\n          before = node.P;\n          break;\n        }\n      } else {\n        if (node.R) node = node.R; else {\n          before = node;\n          break;\n        }\n      }\n    }\n    d3_geom_voronoiCircles.insert(before, circle);\n    if (!before) d3_geom_voronoiFirstCircle = circle;\n  }\n  function d3_geom_voronoiDetachCircle(arc) {\n    var circle = arc.circle;\n    if (circle) {\n      if (!circle.P) d3_geom_voronoiFirstCircle = circle.N;\n      d3_geom_voronoiCircles.remove(circle);\n      d3_geom_voronoiCirclePool.push(circle);\n      d3_geom_voronoiRedBlackNode(circle);\n      arc.circle = null;\n    }\n  }\n  function d3_geom_voronoiClipEdges(extent) {\n    var edges = d3_geom_voronoiEdges, clip = d3_geom_clipLine(extent[0][0], extent[0][1], extent[1][0], extent[1][1]), i = edges.length, e;\n    while (i--) {\n      e = edges[i];\n      if (!d3_geom_voronoiConnectEdge(e, extent) || !clip(e) || abs(e.a.x - e.b.x) < ε && abs(e.a.y - e.b.y) < ε) {\n        e.a = e.b = null;\n        edges.splice(i, 1);\n      }\n    }\n  }\n  function d3_geom_voronoiConnectEdge(edge, extent) {\n    var vb = edge.b;\n    if (vb) return true;\n    var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb;\n    if (ry === ly) {\n      if (fx < x0 || fx >= x1) return;\n      if (lx > rx) {\n        if (!va) va = {\n          x: fx,\n          y: y0\n        }; else if (va.y >= y1) return;\n        vb = {\n          x: fx,\n          y: y1\n        };\n      } else {\n        if (!va) va = {\n          x: fx,\n          y: y1\n        }; else if (va.y < y0) return;\n        vb = {\n          x: fx,\n          y: y0\n        };\n      }\n    } else {\n      fm = (lx - rx) / (ry - ly);\n      fb = fy - fm * fx;\n      if (fm < -1 || fm > 1) {\n        if (lx > rx) {\n          if (!va) va = {\n            x: (y0 - fb) / fm,\n            y: y0\n          }; else if (va.y >= y1) return;\n          vb = {\n            x: (y1 - fb) / fm,\n            y: y1\n          };\n        } else {\n          if (!va) va = {\n            x: (y1 - fb) / fm,\n            y: y1\n          }; else if (va.y < y0) return;\n          vb = {\n            x: (y0 - fb) / fm,\n            y: y0\n          };\n        }\n      } else {\n        if (ly < ry) {\n          if (!va) va = {\n            x: x0,\n            y: fm * x0 + fb\n          }; else if (va.x >= x1) return;\n          vb = {\n            x: x1,\n            y: fm * x1 + fb\n          };\n        } else {\n          if (!va) va = {\n            x: x1,\n            y: fm * x1 + fb\n          }; else if (va.x < x0) return;\n          vb = {\n            x: x0,\n            y: fm * x0 + fb\n          };\n        }\n      }\n    }\n    edge.a = va;\n    edge.b = vb;\n    return true;\n  }\n  function d3_geom_voronoiEdge(lSite, rSite) {\n    this.l = lSite;\n    this.r = rSite;\n    this.a = this.b = null;\n  }\n  function d3_geom_voronoiCreateEdge(lSite, rSite, va, vb) {\n    var edge = new d3_geom_voronoiEdge(lSite, rSite);\n    d3_geom_voronoiEdges.push(edge);\n    if (va) d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, va);\n    if (vb) d3_geom_voronoiSetEdgeEnd(edge, rSite, lSite, vb);\n    d3_geom_voronoiCells[lSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, lSite, rSite));\n    d3_geom_voronoiCells[rSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, rSite, lSite));\n    return edge;\n  }\n  function d3_geom_voronoiCreateBorderEdge(lSite, va, vb) {\n    var edge = new d3_geom_voronoiEdge(lSite, null);\n    edge.a = va;\n    edge.b = vb;\n    d3_geom_voronoiEdges.push(edge);\n    return edge;\n  }\n  function d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, vertex) {\n    if (!edge.a && !edge.b) {\n      edge.a = vertex;\n      edge.l = lSite;\n      edge.r = rSite;\n    } else if (edge.l === rSite) {\n      edge.b = vertex;\n    } else {\n      edge.a = vertex;\n    }\n  }\n  function d3_geom_voronoiHalfEdge(edge, lSite, rSite) {\n    var va = edge.a, vb = edge.b;\n    this.edge = edge;\n    this.site = lSite;\n    this.angle = rSite ? Math.atan2(rSite.y - lSite.y, rSite.x - lSite.x) : edge.l === lSite ? Math.atan2(vb.x - va.x, va.y - vb.y) : Math.atan2(va.x - vb.x, vb.y - va.y);\n  }\n  d3_geom_voronoiHalfEdge.prototype = {\n    start: function() {\n      return this.edge.l === this.site ? this.edge.a : this.edge.b;\n    },\n    end: function() {\n      return this.edge.l === this.site ? this.edge.b : this.edge.a;\n    }\n  };\n  function d3_geom_voronoiRedBlackTree() {\n    this._ = null;\n  }\n  function d3_geom_voronoiRedBlackNode(node) {\n    node.U = node.C = node.L = node.R = node.P = node.N = null;\n  }\n  d3_geom_voronoiRedBlackTree.prototype = {\n    insert: function(after, node) {\n      var parent, grandpa, uncle;\n      if (after) {\n        node.P = after;\n        node.N = after.N;\n        if (after.N) after.N.P = node;\n        after.N = node;\n        if (after.R) {\n          after = after.R;\n          while (after.L) after = after.L;\n          after.L = node;\n        } else {\n          after.R = node;\n        }\n        parent = after;\n      } else if (this._) {\n        after = d3_geom_voronoiRedBlackFirst(this._);\n        node.P = null;\n        node.N = after;\n        after.P = after.L = node;\n        parent = after;\n      } else {\n        node.P = node.N = null;\n        this._ = node;\n        parent = null;\n      }\n      node.L = node.R = null;\n      node.U = parent;\n      node.C = true;\n      after = node;\n      while (parent && parent.C) {\n        grandpa = parent.U;\n        if (parent === grandpa.L) {\n          uncle = grandpa.R;\n          if (uncle && uncle.C) {\n            parent.C = uncle.C = false;\n            grandpa.C = true;\n            after = grandpa;\n          } else {\n            if (after === parent.R) {\n              d3_geom_voronoiRedBlackRotateLeft(this, parent);\n              after = parent;\n              parent = after.U;\n            }\n            parent.C = false;\n            grandpa.C = true;\n            d3_geom_voronoiRedBlackRotateRight(this, grandpa);\n          }\n        } else {\n          uncle = grandpa.L;\n          if (uncle && uncle.C) {\n            parent.C = uncle.C = false;\n            grandpa.C = true;\n            after = grandpa;\n          } else {\n            if (after === parent.L) {\n              d3_geom_voronoiRedBlackRotateRight(this, parent);\n              after = parent;\n              parent = after.U;\n            }\n            parent.C = false;\n            grandpa.C = true;\n            d3_geom_voronoiRedBlackRotateLeft(this, grandpa);\n          }\n        }\n        parent = after.U;\n      }\n      this._.C = false;\n    },\n    remove: function(node) {\n      if (node.N) node.N.P = node.P;\n      if (node.P) node.P.N = node.N;\n      node.N = node.P = null;\n      var parent = node.U, sibling, left = node.L, right = node.R, next, red;\n      if (!left) next = right; else if (!right) next = left; else next = d3_geom_voronoiRedBlackFirst(right);\n      if (parent) {\n        if (parent.L === node) parent.L = next; else parent.R = next;\n      } else {\n        this._ = next;\n      }\n      if (left && right) {\n        red = next.C;\n        next.C = node.C;\n        next.L = left;\n        left.U = next;\n        if (next !== right) {\n          parent = next.U;\n          next.U = node.U;\n          node = next.R;\n          parent.L = node;\n          next.R = right;\n          right.U = next;\n        } else {\n          next.U = parent;\n          parent = next;\n          node = next.R;\n        }\n      } else {\n        red = node.C;\n        node = next;\n      }\n      if (node) node.U = parent;\n      if (red) return;\n      if (node && node.C) {\n        node.C = false;\n        return;\n      }\n      do {\n        if (node === this._) break;\n        if (node === parent.L) {\n          sibling = parent.R;\n          if (sibling.C) {\n            sibling.C = false;\n            parent.C = true;\n            d3_geom_voronoiRedBlackRotateLeft(this, parent);\n            sibling = parent.R;\n          }\n          if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n            if (!sibling.R || !sibling.R.C) {\n              sibling.L.C = false;\n              sibling.C = true;\n              d3_geom_voronoiRedBlackRotateRight(this, sibling);\n              sibling = parent.R;\n            }\n            sibling.C = parent.C;\n            parent.C = sibling.R.C = false;\n            d3_geom_voronoiRedBlackRotateLeft(this, parent);\n            node = this._;\n            break;\n          }\n        } else {\n          sibling = parent.L;\n          if (sibling.C) {\n            sibling.C = false;\n            parent.C = true;\n            d3_geom_voronoiRedBlackRotateRight(this, parent);\n            sibling = parent.L;\n          }\n          if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n            if (!sibling.L || !sibling.L.C) {\n              sibling.R.C = false;\n              sibling.C = true;\n              d3_geom_voronoiRedBlackRotateLeft(this, sibling);\n              sibling = parent.L;\n            }\n            sibling.C = parent.C;\n            parent.C = sibling.L.C = false;\n            d3_geom_voronoiRedBlackRotateRight(this, parent);\n            node = this._;\n            break;\n          }\n        }\n        sibling.C = true;\n        node = parent;\n        parent = parent.U;\n      } while (!node.C);\n      if (node) node.C = false;\n    }\n  };\n  function d3_geom_voronoiRedBlackRotateLeft(tree, node) {\n    var p = node, q = node.R, parent = p.U;\n    if (parent) {\n      if (parent.L === p) parent.L = q; else parent.R = q;\n    } else {\n      tree._ = q;\n    }\n    q.U = parent;\n    p.U = q;\n    p.R = q.L;\n    if (p.R) p.R.U = p;\n    q.L = p;\n  }\n  function d3_geom_voronoiRedBlackRotateRight(tree, node) {\n    var p = node, q = node.L, parent = p.U;\n    if (parent) {\n      if (parent.L === p) parent.L = q; else parent.R = q;\n    } else {\n      tree._ = q;\n    }\n    q.U = parent;\n    p.U = q;\n    p.L = q.R;\n    if (p.L) p.L.U = p;\n    q.R = p;\n  }\n  function d3_geom_voronoiRedBlackFirst(node) {\n    while (node.L) node = node.L;\n    return node;\n  }\n  function d3_geom_voronoi(sites, bbox) {\n    var site = sites.sort(d3_geom_voronoiVertexOrder).pop(), x0, y0, circle;\n    d3_geom_voronoiEdges = [];\n    d3_geom_voronoiCells = new Array(sites.length);\n    d3_geom_voronoiBeaches = new d3_geom_voronoiRedBlackTree();\n    d3_geom_voronoiCircles = new d3_geom_voronoiRedBlackTree();\n    while (true) {\n      circle = d3_geom_voronoiFirstCircle;\n      if (site && (!circle || site.y < circle.y || site.y === circle.y && site.x < circle.x)) {\n        if (site.x !== x0 || site.y !== y0) {\n          d3_geom_voronoiCells[site.i] = new d3_geom_voronoiCell(site);\n          d3_geom_voronoiAddBeach(site);\n          x0 = site.x, y0 = site.y;\n        }\n        site = sites.pop();\n      } else if (circle) {\n        d3_geom_voronoiRemoveBeach(circle.arc);\n      } else {\n        break;\n      }\n    }\n    if (bbox) d3_geom_voronoiClipEdges(bbox), d3_geom_voronoiCloseCells(bbox);\n    var diagram = {\n      cells: d3_geom_voronoiCells,\n      edges: d3_geom_voronoiEdges\n    };\n    d3_geom_voronoiBeaches = d3_geom_voronoiCircles = d3_geom_voronoiEdges = d3_geom_voronoiCells = null;\n    return diagram;\n  }\n  function d3_geom_voronoiVertexOrder(a, b) {\n    return b.y - a.y || b.x - a.x;\n  }\n  d3.geom.voronoi = function(points) {\n    var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent;\n    if (points) return voronoi(points);\n    function voronoi(data) {\n      var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1];\n      d3_geom_voronoi(sites(data), clipExtent).cells.forEach(function(cell, i) {\n        var edges = cell.edges, site = cell.site, polygon = polygons[i] = edges.length ? edges.map(function(e) {\n          var s = e.start();\n          return [ s.x, s.y ];\n        }) : site.x >= x0 && site.x <= x1 && site.y >= y0 && site.y <= y1 ? [ [ x0, y1 ], [ x1, y1 ], [ x1, y0 ], [ x0, y0 ] ] : [];\n        polygon.point = data[i];\n      });\n      return polygons;\n    }\n    function sites(data) {\n      return data.map(function(d, i) {\n        return {\n          x: Math.round(fx(d, i) / ε) * ε,\n          y: Math.round(fy(d, i) / ε) * ε,\n          i: i\n        };\n      });\n    }\n    voronoi.links = function(data) {\n      return d3_geom_voronoi(sites(data)).edges.filter(function(edge) {\n        return edge.l && edge.r;\n      }).map(function(edge) {\n        return {\n          source: data[edge.l.i],\n          target: data[edge.r.i]\n        };\n      });\n    };\n    voronoi.triangles = function(data) {\n      var triangles = [];\n      d3_geom_voronoi(sites(data)).cells.forEach(function(cell, i) {\n        var site = cell.site, edges = cell.edges.sort(d3_geom_voronoiHalfEdgeOrder), j = -1, m = edges.length, e0, s0, e1 = edges[m - 1].edge, s1 = e1.l === site ? e1.r : e1.l;\n        while (++j < m) {\n          e0 = e1;\n          s0 = s1;\n          e1 = edges[j].edge;\n          s1 = e1.l === site ? e1.r : e1.l;\n          if (i < s0.i && i < s1.i && d3_geom_voronoiTriangleArea(site, s0, s1) < 0) {\n            triangles.push([ data[i], data[s0.i], data[s1.i] ]);\n          }\n        }\n      });\n      return triangles;\n    };\n    voronoi.x = function(_) {\n      return arguments.length ? (fx = d3_functor(x = _), voronoi) : x;\n    };\n    voronoi.y = function(_) {\n      return arguments.length ? (fy = d3_functor(y = _), voronoi) : y;\n    };\n    voronoi.clipExtent = function(_) {\n      if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent;\n      clipExtent = _ == null ? d3_geom_voronoiClipExtent : _;\n      return voronoi;\n    };\n    voronoi.size = function(_) {\n      if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent && clipExtent[1];\n      return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]);\n    };\n    return voronoi;\n  };\n  var d3_geom_voronoiClipExtent = [ [ -1e6, -1e6 ], [ 1e6, 1e6 ] ];\n  function d3_geom_voronoiTriangleArea(a, b, c) {\n    return (a.x - c.x) * (b.y - a.y) - (a.x - b.x) * (c.y - a.y);\n  }\n  d3.geom.delaunay = function(vertices) {\n    return d3.geom.voronoi().triangles(vertices);\n  };\n  d3.geom.quadtree = function(points, x1, y1, x2, y2) {\n    var x = d3_geom_pointX, y = d3_geom_pointY, compat;\n    if (compat = arguments.length) {\n      x = d3_geom_quadtreeCompatX;\n      y = d3_geom_quadtreeCompatY;\n      if (compat === 3) {\n        y2 = y1;\n        x2 = x1;\n        y1 = x1 = 0;\n      }\n      return quadtree(points);\n    }\n    function quadtree(data) {\n      var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;\n      if (x1 != null) {\n        x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;\n      } else {\n        x2_ = y2_ = -(x1_ = y1_ = Infinity);\n        xs = [], ys = [];\n        n = data.length;\n        if (compat) for (i = 0; i < n; ++i) {\n          d = data[i];\n          if (d.x < x1_) x1_ = d.x;\n          if (d.y < y1_) y1_ = d.y;\n          if (d.x > x2_) x2_ = d.x;\n          if (d.y > y2_) y2_ = d.y;\n          xs.push(d.x);\n          ys.push(d.y);\n        } else for (i = 0; i < n; ++i) {\n          var x_ = +fx(d = data[i], i), y_ = +fy(d, i);\n          if (x_ < x1_) x1_ = x_;\n          if (y_ < y1_) y1_ = y_;\n          if (x_ > x2_) x2_ = x_;\n          if (y_ > y2_) y2_ = y_;\n          xs.push(x_);\n          ys.push(y_);\n        }\n      }\n      var dx = x2_ - x1_, dy = y2_ - y1_;\n      if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy;\n      function insert(n, d, x, y, x1, y1, x2, y2) {\n        if (isNaN(x) || isNaN(y)) return;\n        if (n.leaf) {\n          var nx = n.x, ny = n.y;\n          if (nx != null) {\n            if (abs(nx - x) + abs(ny - y) < .01) {\n              insertChild(n, d, x, y, x1, y1, x2, y2);\n            } else {\n              var nPoint = n.point;\n              n.x = n.y = n.point = null;\n              insertChild(n, nPoint, nx, ny, x1, y1, x2, y2);\n              insertChild(n, d, x, y, x1, y1, x2, y2);\n            }\n          } else {\n            n.x = x, n.y = y, n.point = d;\n          }\n        } else {\n          insertChild(n, d, x, y, x1, y1, x2, y2);\n        }\n      }\n      function insertChild(n, d, x, y, x1, y1, x2, y2) {\n        var xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym, i = below << 1 | right;\n        n.leaf = false;\n        n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());\n        if (right) x1 = xm; else x2 = xm;\n        if (below) y1 = ym; else y2 = ym;\n        insert(n, d, x, y, x1, y1, x2, y2);\n      }\n      var root = d3_geom_quadtreeNode();\n      root.add = function(d) {\n        insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_);\n      };\n      root.visit = function(f) {\n        d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_);\n      };\n      root.find = function(point) {\n        return d3_geom_quadtreeFind(root, point[0], point[1], x1_, y1_, x2_, y2_);\n      };\n      i = -1;\n      if (x1 == null) {\n        while (++i < n) {\n          insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_);\n        }\n        --i;\n      } else data.forEach(root.add);\n      xs = ys = data = d = null;\n      return root;\n    }\n    quadtree.x = function(_) {\n      return arguments.length ? (x = _, quadtree) : x;\n    };\n    quadtree.y = function(_) {\n      return arguments.length ? (y = _, quadtree) : y;\n    };\n    quadtree.extent = function(_) {\n      if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ];\n      if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], \n      y2 = +_[1][1];\n      return quadtree;\n    };\n    quadtree.size = function(_) {\n      if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ];\n      if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1];\n      return quadtree;\n    };\n    return quadtree;\n  };\n  function d3_geom_quadtreeCompatX(d) {\n    return d.x;\n  }\n  function d3_geom_quadtreeCompatY(d) {\n    return d.y;\n  }\n  function d3_geom_quadtreeNode() {\n    return {\n      leaf: true,\n      nodes: [],\n      point: null,\n      x: null,\n      y: null\n    };\n  }\n  function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {\n    if (!f(node, x1, y1, x2, y2)) {\n      var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;\n      if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);\n      if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);\n      if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);\n      if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);\n    }\n  }\n  function d3_geom_quadtreeFind(root, x, y, x0, y0, x3, y3) {\n    var minDistance2 = Infinity, closestPoint;\n    (function find(node, x1, y1, x2, y2) {\n      if (x1 > x3 || y1 > y3 || x2 < x0 || y2 < y0) return;\n      if (point = node.point) {\n        var point, dx = x - node.x, dy = y - node.y, distance2 = dx * dx + dy * dy;\n        if (distance2 < minDistance2) {\n          var distance = Math.sqrt(minDistance2 = distance2);\n          x0 = x - distance, y0 = y - distance;\n          x3 = x + distance, y3 = y + distance;\n          closestPoint = point;\n        }\n      }\n      var children = node.nodes, xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym;\n      for (var i = below << 1 | right, j = i + 4; i < j; ++i) {\n        if (node = children[i & 3]) switch (i & 3) {\n         case 0:\n          find(node, x1, y1, xm, ym);\n          break;\n\n         case 1:\n          find(node, xm, y1, x2, ym);\n          break;\n\n         case 2:\n          find(node, x1, ym, xm, y2);\n          break;\n\n         case 3:\n          find(node, xm, ym, x2, y2);\n          break;\n        }\n      }\n    })(root, x0, y0, x3, y3);\n    return closestPoint;\n  }\n  d3.interpolateRgb = d3_interpolateRgb;\n  function d3_interpolateRgb(a, b) {\n    a = d3.rgb(a);\n    b = d3.rgb(b);\n    var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;\n    return function(t) {\n      return \"#\" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));\n    };\n  }\n  d3.interpolateObject = d3_interpolateObject;\n  function d3_interpolateObject(a, b) {\n    var i = {}, c = {}, k;\n    for (k in a) {\n      if (k in b) {\n        i[k] = d3_interpolate(a[k], b[k]);\n      } else {\n        c[k] = a[k];\n      }\n    }\n    for (k in b) {\n      if (!(k in a)) {\n        c[k] = b[k];\n      }\n    }\n    return function(t) {\n      for (k in i) c[k] = i[k](t);\n      return c;\n    };\n  }\n  d3.interpolateNumber = d3_interpolateNumber;\n  function d3_interpolateNumber(a, b) {\n    a = +a, b = +b;\n    return function(t) {\n      return a * (1 - t) + b * t;\n    };\n  }\n  d3.interpolateString = d3_interpolateString;\n  function d3_interpolateString(a, b) {\n    var bi = d3_interpolate_numberA.lastIndex = d3_interpolate_numberB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];\n    a = a + \"\", b = b + \"\";\n    while ((am = d3_interpolate_numberA.exec(a)) && (bm = d3_interpolate_numberB.exec(b))) {\n      if ((bs = bm.index) > bi) {\n        bs = b.slice(bi, bs);\n        if (s[i]) s[i] += bs; else s[++i] = bs;\n      }\n      if ((am = am[0]) === (bm = bm[0])) {\n        if (s[i]) s[i] += bm; else s[++i] = bm;\n      } else {\n        s[++i] = null;\n        q.push({\n          i: i,\n          x: d3_interpolateNumber(am, bm)\n        });\n      }\n      bi = d3_interpolate_numberB.lastIndex;\n    }\n    if (bi < b.length) {\n      bs = b.slice(bi);\n      if (s[i]) s[i] += bs; else s[++i] = bs;\n    }\n    return s.length < 2 ? q[0] ? (b = q[0].x, function(t) {\n      return b(t) + \"\";\n    }) : function() {\n      return b;\n    } : (b = q.length, function(t) {\n      for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    });\n  }\n  var d3_interpolate_numberA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, d3_interpolate_numberB = new RegExp(d3_interpolate_numberA.source, \"g\");\n  d3.interpolate = d3_interpolate;\n  function d3_interpolate(a, b) {\n    var i = d3.interpolators.length, f;\n    while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;\n    return f;\n  }\n  d3.interpolators = [ function(a, b) {\n    var t = typeof b;\n    return (t === \"string\" ? d3_rgb_names.has(b.toLowerCase()) || /^(#|rgb\\(|hsl\\()/i.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_color ? d3_interpolateRgb : Array.isArray(b) ? d3_interpolateArray : t === \"object\" && isNaN(b) ? d3_interpolateObject : d3_interpolateNumber)(a, b);\n  } ];\n  d3.interpolateArray = d3_interpolateArray;\n  function d3_interpolateArray(a, b) {\n    var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;\n    for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i]));\n    for (;i < na; ++i) c[i] = a[i];\n    for (;i < nb; ++i) c[i] = b[i];\n    return function(t) {\n      for (i = 0; i < n0; ++i) c[i] = x[i](t);\n      return c;\n    };\n  }\n  var d3_ease_default = function() {\n    return d3_identity;\n  };\n  var d3_ease = d3.map({\n    linear: d3_ease_default,\n    poly: d3_ease_poly,\n    quad: function() {\n      return d3_ease_quad;\n    },\n    cubic: function() {\n      return d3_ease_cubic;\n    },\n    sin: function() {\n      return d3_ease_sin;\n    },\n    exp: function() {\n      return d3_ease_exp;\n    },\n    circle: function() {\n      return d3_ease_circle;\n    },\n    elastic: d3_ease_elastic,\n    back: d3_ease_back,\n    bounce: function() {\n      return d3_ease_bounce;\n    }\n  });\n  var d3_ease_mode = d3.map({\n    \"in\": d3_identity,\n    out: d3_ease_reverse,\n    \"in-out\": d3_ease_reflect,\n    \"out-in\": function(f) {\n      return d3_ease_reflect(d3_ease_reverse(f));\n    }\n  });\n  d3.ease = function(name) {\n    var i = name.indexOf(\"-\"), t = i >= 0 ? name.slice(0, i) : name, m = i >= 0 ? name.slice(i + 1) : \"in\";\n    t = d3_ease.get(t) || d3_ease_default;\n    m = d3_ease_mode.get(m) || d3_identity;\n    return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1))));\n  };\n  function d3_ease_clamp(f) {\n    return function(t) {\n      return t <= 0 ? 0 : t >= 1 ? 1 : f(t);\n    };\n  }\n  function d3_ease_reverse(f) {\n    return function(t) {\n      return 1 - f(1 - t);\n    };\n  }\n  function d3_ease_reflect(f) {\n    return function(t) {\n      return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));\n    };\n  }\n  function d3_ease_quad(t) {\n    return t * t;\n  }\n  function d3_ease_cubic(t) {\n    return t * t * t;\n  }\n  function d3_ease_cubicInOut(t) {\n    if (t <= 0) return 0;\n    if (t >= 1) return 1;\n    var t2 = t * t, t3 = t2 * t;\n    return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);\n  }\n  function d3_ease_poly(e) {\n    return function(t) {\n      return Math.pow(t, e);\n    };\n  }\n  function d3_ease_sin(t) {\n    return 1 - Math.cos(t * halfπ);\n  }\n  function d3_ease_exp(t) {\n    return Math.pow(2, 10 * (t - 1));\n  }\n  function d3_ease_circle(t) {\n    return 1 - Math.sqrt(1 - t * t);\n  }\n  function d3_ease_elastic(a, p) {\n    var s;\n    if (arguments.length < 2) p = .45;\n    if (arguments.length) s = p / τ * Math.asin(1 / a); else a = 1, s = p / 4;\n    return function(t) {\n      return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * τ / p);\n    };\n  }\n  function d3_ease_back(s) {\n    if (!s) s = 1.70158;\n    return function(t) {\n      return t * t * ((s + 1) * t - s);\n    };\n  }\n  function d3_ease_bounce(t) {\n    return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;\n  }\n  d3.interpolateHcl = d3_interpolateHcl;\n  function d3_interpolateHcl(a, b) {\n    a = d3.hcl(a);\n    b = d3.hcl(b);\n    var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;\n    if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac;\n    if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;\n    return function(t) {\n      return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + \"\";\n    };\n  }\n  d3.interpolateHsl = d3_interpolateHsl;\n  function d3_interpolateHsl(a, b) {\n    a = d3.hsl(a);\n    b = d3.hsl(b);\n    var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al;\n    if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as;\n    if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;\n    return function(t) {\n      return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + \"\";\n    };\n  }\n  d3.interpolateLab = d3_interpolateLab;\n  function d3_interpolateLab(a, b) {\n    a = d3.lab(a);\n    b = d3.lab(b);\n    var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;\n    return function(t) {\n      return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + \"\";\n    };\n  }\n  d3.interpolateRound = d3_interpolateRound;\n  function d3_interpolateRound(a, b) {\n    b -= a;\n    return function(t) {\n      return Math.round(a + b * t);\n    };\n  }\n  d3.transform = function(string) {\n    var g = d3_document.createElementNS(d3.ns.prefix.svg, \"g\");\n    return (d3.transform = function(string) {\n      if (string != null) {\n        g.setAttribute(\"transform\", string);\n        var t = g.transform.baseVal.consolidate();\n      }\n      return new d3_transform(t ? t.matrix : d3_transformIdentity);\n    })(string);\n  };\n  function d3_transform(m) {\n    var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;\n    if (r0[0] * r1[1] < r1[0] * r0[1]) {\n      r0[0] *= -1;\n      r0[1] *= -1;\n      kx *= -1;\n      kz *= -1;\n    }\n    this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees;\n    this.translate = [ m.e, m.f ];\n    this.scale = [ kx, ky ];\n    this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0;\n  }\n  d3_transform.prototype.toString = function() {\n    return \"translate(\" + this.translate + \")rotate(\" + this.rotate + \")skewX(\" + this.skew + \")scale(\" + this.scale + \")\";\n  };\n  function d3_transformDot(a, b) {\n    return a[0] * b[0] + a[1] * b[1];\n  }\n  function d3_transformNormalize(a) {\n    var k = Math.sqrt(d3_transformDot(a, a));\n    if (k) {\n      a[0] /= k;\n      a[1] /= k;\n    }\n    return k;\n  }\n  function d3_transformCombine(a, b, k) {\n    a[0] += k * b[0];\n    a[1] += k * b[1];\n    return a;\n  }\n  var d3_transformIdentity = {\n    a: 1,\n    b: 0,\n    c: 0,\n    d: 1,\n    e: 0,\n    f: 0\n  };\n  d3.interpolateTransform = d3_interpolateTransform;\n  function d3_interpolateTransformPop(s) {\n    return s.length ? s.pop() + \",\" : \"\";\n  }\n  function d3_interpolateTranslate(ta, tb, s, q) {\n    if (ta[0] !== tb[0] || ta[1] !== tb[1]) {\n      var i = s.push(\"translate(\", null, \",\", null, \")\");\n      q.push({\n        i: i - 4,\n        x: d3_interpolateNumber(ta[0], tb[0])\n      }, {\n        i: i - 2,\n        x: d3_interpolateNumber(ta[1], tb[1])\n      });\n    } else if (tb[0] || tb[1]) {\n      s.push(\"translate(\" + tb + \")\");\n    }\n  }\n  function d3_interpolateRotate(ra, rb, s, q) {\n    if (ra !== rb) {\n      if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;\n      q.push({\n        i: s.push(d3_interpolateTransformPop(s) + \"rotate(\", null, \")\") - 2,\n        x: d3_interpolateNumber(ra, rb)\n      });\n    } else if (rb) {\n      s.push(d3_interpolateTransformPop(s) + \"rotate(\" + rb + \")\");\n    }\n  }\n  function d3_interpolateSkew(wa, wb, s, q) {\n    if (wa !== wb) {\n      q.push({\n        i: s.push(d3_interpolateTransformPop(s) + \"skewX(\", null, \")\") - 2,\n        x: d3_interpolateNumber(wa, wb)\n      });\n    } else if (wb) {\n      s.push(d3_interpolateTransformPop(s) + \"skewX(\" + wb + \")\");\n    }\n  }\n  function d3_interpolateScale(ka, kb, s, q) {\n    if (ka[0] !== kb[0] || ka[1] !== kb[1]) {\n      var i = s.push(d3_interpolateTransformPop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({\n        i: i - 4,\n        x: d3_interpolateNumber(ka[0], kb[0])\n      }, {\n        i: i - 2,\n        x: d3_interpolateNumber(ka[1], kb[1])\n      });\n    } else if (kb[0] !== 1 || kb[1] !== 1) {\n      s.push(d3_interpolateTransformPop(s) + \"scale(\" + kb + \")\");\n    }\n  }\n  function d3_interpolateTransform(a, b) {\n    var s = [], q = [];\n    a = d3.transform(a), b = d3.transform(b);\n    d3_interpolateTranslate(a.translate, b.translate, s, q);\n    d3_interpolateRotate(a.rotate, b.rotate, s, q);\n    d3_interpolateSkew(a.skew, b.skew, s, q);\n    d3_interpolateScale(a.scale, b.scale, s, q);\n    a = b = null;\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  }\n  function d3_uninterpolateNumber(a, b) {\n    b = (b -= a = +a) || 1 / b;\n    return function(x) {\n      return (x - a) / b;\n    };\n  }\n  function d3_uninterpolateClamp(a, b) {\n    b = (b -= a = +a) || 1 / b;\n    return function(x) {\n      return Math.max(0, Math.min(1, (x - a) / b));\n    };\n  }\n  d3.layout = {};\n  d3.layout.bundle = function() {\n    return function(links) {\n      var paths = [], i = -1, n = links.length;\n      while (++i < n) paths.push(d3_layout_bundlePath(links[i]));\n      return paths;\n    };\n  };\n  function d3_layout_bundlePath(link) {\n    var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];\n    while (start !== lca) {\n      start = start.parent;\n      points.push(start);\n    }\n    var k = points.length;\n    while (end !== lca) {\n      points.splice(k, 0, end);\n      end = end.parent;\n    }\n    return points;\n  }\n  function d3_layout_bundleAncestors(node) {\n    var ancestors = [], parent = node.parent;\n    while (parent != null) {\n      ancestors.push(node);\n      node = parent;\n      parent = parent.parent;\n    }\n    ancestors.push(node);\n    return ancestors;\n  }\n  function d3_layout_bundleLeastCommonAncestor(a, b) {\n    if (a === b) return a;\n    var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;\n    while (aNode === bNode) {\n      sharedNode = aNode;\n      aNode = aNodes.pop();\n      bNode = bNodes.pop();\n    }\n    return sharedNode;\n  }\n  d3.layout.chord = function() {\n    var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;\n    function relayout() {\n      var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;\n      chords = [];\n      groups = [];\n      k = 0, i = -1;\n      while (++i < n) {\n        x = 0, j = -1;\n        while (++j < n) {\n          x += matrix[i][j];\n        }\n        groupSums.push(x);\n        subgroupIndex.push(d3.range(n));\n        k += x;\n      }\n      if (sortGroups) {\n        groupIndex.sort(function(a, b) {\n          return sortGroups(groupSums[a], groupSums[b]);\n        });\n      }\n      if (sortSubgroups) {\n        subgroupIndex.forEach(function(d, i) {\n          d.sort(function(a, b) {\n            return sortSubgroups(matrix[i][a], matrix[i][b]);\n          });\n        });\n      }\n      k = (τ - padding * n) / k;\n      x = 0, i = -1;\n      while (++i < n) {\n        x0 = x, j = -1;\n        while (++j < n) {\n          var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;\n          subgroups[di + \"-\" + dj] = {\n            index: di,\n            subindex: dj,\n            startAngle: a0,\n            endAngle: a1,\n            value: v\n          };\n        }\n        groups[di] = {\n          index: di,\n          startAngle: x0,\n          endAngle: x,\n          value: groupSums[di]\n        };\n        x += padding;\n      }\n      i = -1;\n      while (++i < n) {\n        j = i - 1;\n        while (++j < n) {\n          var source = subgroups[i + \"-\" + j], target = subgroups[j + \"-\" + i];\n          if (source.value || target.value) {\n            chords.push(source.value < target.value ? {\n              source: target,\n              target: source\n            } : {\n              source: source,\n              target: target\n            });\n          }\n        }\n      }\n      if (sortChords) resort();\n    }\n    function resort() {\n      chords.sort(function(a, b) {\n        return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);\n      });\n    }\n    chord.matrix = function(x) {\n      if (!arguments.length) return matrix;\n      n = (matrix = x) && matrix.length;\n      chords = groups = null;\n      return chord;\n    };\n    chord.padding = function(x) {\n      if (!arguments.length) return padding;\n      padding = x;\n      chords = groups = null;\n      return chord;\n    };\n    chord.sortGroups = function(x) {\n      if (!arguments.length) return sortGroups;\n      sortGroups = x;\n      chords = groups = null;\n      return chord;\n    };\n    chord.sortSubgroups = function(x) {\n      if (!arguments.length) return sortSubgroups;\n      sortSubgroups = x;\n      chords = null;\n      return chord;\n    };\n    chord.sortChords = function(x) {\n      if (!arguments.length) return sortChords;\n      sortChords = x;\n      if (chords) resort();\n      return chord;\n    };\n    chord.chords = function() {\n      if (!chords) relayout();\n      return chords;\n    };\n    chord.groups = function() {\n      if (!groups) relayout();\n      return groups;\n    };\n    return chord;\n  };\n  d3.layout.force = function() {\n    var force = {}, event = d3.dispatch(\"start\", \"tick\", \"end\"), timer, size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;\n    function repulse(node) {\n      return function(quad, x1, _, x2) {\n        if (quad.point !== node) {\n          var dx = quad.cx - node.x, dy = quad.cy - node.y, dw = x2 - x1, dn = dx * dx + dy * dy;\n          if (dw * dw / theta2 < dn) {\n            if (dn < chargeDistance2) {\n              var k = quad.charge / dn;\n              node.px -= dx * k;\n              node.py -= dy * k;\n            }\n            return true;\n          }\n          if (quad.point && dn && dn < chargeDistance2) {\n            var k = quad.pointCharge / dn;\n            node.px -= dx * k;\n            node.py -= dy * k;\n          }\n        }\n        return !quad.charge;\n      };\n    }\n    force.tick = function() {\n      if ((alpha *= .99) < .005) {\n        timer = null;\n        event.end({\n          type: \"end\",\n          alpha: alpha = 0\n        });\n        return true;\n      }\n      var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;\n      for (i = 0; i < m; ++i) {\n        o = links[i];\n        s = o.source;\n        t = o.target;\n        x = t.x - s.x;\n        y = t.y - s.y;\n        if (l = x * x + y * y) {\n          l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;\n          x *= l;\n          y *= l;\n          t.x -= x * (k = s.weight + t.weight ? s.weight / (s.weight + t.weight) : .5);\n          t.y -= y * k;\n          s.x += x * (k = 1 - k);\n          s.y += y * k;\n        }\n      }\n      if (k = alpha * gravity) {\n        x = size[0] / 2;\n        y = size[1] / 2;\n        i = -1;\n        if (k) while (++i < n) {\n          o = nodes[i];\n          o.x += (x - o.x) * k;\n          o.y += (y - o.y) * k;\n        }\n      }\n      if (charge) {\n        d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);\n        i = -1;\n        while (++i < n) {\n          if (!(o = nodes[i]).fixed) {\n            q.visit(repulse(o));\n          }\n        }\n      }\n      i = -1;\n      while (++i < n) {\n        o = nodes[i];\n        if (o.fixed) {\n          o.x = o.px;\n          o.y = o.py;\n        } else {\n          o.x -= (o.px - (o.px = o.x)) * friction;\n          o.y -= (o.py - (o.py = o.y)) * friction;\n        }\n      }\n      event.tick({\n        type: \"tick\",\n        alpha: alpha\n      });\n    };\n    force.nodes = function(x) {\n      if (!arguments.length) return nodes;\n      nodes = x;\n      return force;\n    };\n    force.links = function(x) {\n      if (!arguments.length) return links;\n      links = x;\n      return force;\n    };\n    force.size = function(x) {\n      if (!arguments.length) return size;\n      size = x;\n      return force;\n    };\n    force.linkDistance = function(x) {\n      if (!arguments.length) return linkDistance;\n      linkDistance = typeof x === \"function\" ? x : +x;\n      return force;\n    };\n    force.distance = force.linkDistance;\n    force.linkStrength = function(x) {\n      if (!arguments.length) return linkStrength;\n      linkStrength = typeof x === \"function\" ? x : +x;\n      return force;\n    };\n    force.friction = function(x) {\n      if (!arguments.length) return friction;\n      friction = +x;\n      return force;\n    };\n    force.charge = function(x) {\n      if (!arguments.length) return charge;\n      charge = typeof x === \"function\" ? x : +x;\n      return force;\n    };\n    force.chargeDistance = function(x) {\n      if (!arguments.length) return Math.sqrt(chargeDistance2);\n      chargeDistance2 = x * x;\n      return force;\n    };\n    force.gravity = function(x) {\n      if (!arguments.length) return gravity;\n      gravity = +x;\n      return force;\n    };\n    force.theta = function(x) {\n      if (!arguments.length) return Math.sqrt(theta2);\n      theta2 = x * x;\n      return force;\n    };\n    force.alpha = function(x) {\n      if (!arguments.length) return alpha;\n      x = +x;\n      if (alpha) {\n        if (x > 0) {\n          alpha = x;\n        } else {\n          timer.c = null, timer.t = NaN, timer = null;\n          event.end({\n            type: \"end\",\n            alpha: alpha = 0\n          });\n        }\n      } else if (x > 0) {\n        event.start({\n          type: \"start\",\n          alpha: alpha = x\n        });\n        timer = d3_timer(force.tick);\n      }\n      return force;\n    };\n    force.start = function() {\n      var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;\n      for (i = 0; i < n; ++i) {\n        (o = nodes[i]).index = i;\n        o.weight = 0;\n      }\n      for (i = 0; i < m; ++i) {\n        o = links[i];\n        if (typeof o.source == \"number\") o.source = nodes[o.source];\n        if (typeof o.target == \"number\") o.target = nodes[o.target];\n        ++o.source.weight;\n        ++o.target.weight;\n      }\n      for (i = 0; i < n; ++i) {\n        o = nodes[i];\n        if (isNaN(o.x)) o.x = position(\"x\", w);\n        if (isNaN(o.y)) o.y = position(\"y\", h);\n        if (isNaN(o.px)) o.px = o.x;\n        if (isNaN(o.py)) o.py = o.y;\n      }\n      distances = [];\n      if (typeof linkDistance === \"function\") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance;\n      strengths = [];\n      if (typeof linkStrength === \"function\") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength;\n      charges = [];\n      if (typeof charge === \"function\") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;\n      function position(dimension, size) {\n        if (!neighbors) {\n          neighbors = new Array(n);\n          for (j = 0; j < n; ++j) {\n            neighbors[j] = [];\n          }\n          for (j = 0; j < m; ++j) {\n            var o = links[j];\n            neighbors[o.source.index].push(o.target);\n            neighbors[o.target.index].push(o.source);\n          }\n        }\n        var candidates = neighbors[i], j = -1, l = candidates.length, x;\n        while (++j < l) if (!isNaN(x = candidates[j][dimension])) return x;\n        return Math.random() * size;\n      }\n      return force.resume();\n    };\n    force.resume = function() {\n      return force.alpha(.1);\n    };\n    force.stop = function() {\n      return force.alpha(0);\n    };\n    force.drag = function() {\n      if (!drag) drag = d3.behavior.drag().origin(d3_identity).on(\"dragstart.force\", d3_layout_forceDragstart).on(\"drag.force\", dragmove).on(\"dragend.force\", d3_layout_forceDragend);\n      if (!arguments.length) return drag;\n      this.on(\"mouseover.force\", d3_layout_forceMouseover).on(\"mouseout.force\", d3_layout_forceMouseout).call(drag);\n    };\n    function dragmove(d) {\n      d.px = d3.event.x, d.py = d3.event.y;\n      force.resume();\n    }\n    return d3.rebind(force, event, \"on\");\n  };\n  function d3_layout_forceDragstart(d) {\n    d.fixed |= 2;\n  }\n  function d3_layout_forceDragend(d) {\n    d.fixed &= ~6;\n  }\n  function d3_layout_forceMouseover(d) {\n    d.fixed |= 4;\n    d.px = d.x, d.py = d.y;\n  }\n  function d3_layout_forceMouseout(d) {\n    d.fixed &= ~4;\n  }\n  function d3_layout_forceAccumulate(quad, alpha, charges) {\n    var cx = 0, cy = 0;\n    quad.charge = 0;\n    if (!quad.leaf) {\n      var nodes = quad.nodes, n = nodes.length, i = -1, c;\n      while (++i < n) {\n        c = nodes[i];\n        if (c == null) continue;\n        d3_layout_forceAccumulate(c, alpha, charges);\n        quad.charge += c.charge;\n        cx += c.charge * c.cx;\n        cy += c.charge * c.cy;\n      }\n    }\n    if (quad.point) {\n      if (!quad.leaf) {\n        quad.point.x += Math.random() - .5;\n        quad.point.y += Math.random() - .5;\n      }\n      var k = alpha * charges[quad.point.index];\n      quad.charge += quad.pointCharge = k;\n      cx += k * quad.point.x;\n      cy += k * quad.point.y;\n    }\n    quad.cx = cx / quad.charge;\n    quad.cy = cy / quad.charge;\n  }\n  var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1, d3_layout_forceChargeDistance2 = Infinity;\n  d3.layout.hierarchy = function() {\n    var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;\n    function hierarchy(root) {\n      var stack = [ root ], nodes = [], node;\n      root.depth = 0;\n      while ((node = stack.pop()) != null) {\n        nodes.push(node);\n        if ((childs = children.call(hierarchy, node, node.depth)) && (n = childs.length)) {\n          var n, childs, child;\n          while (--n >= 0) {\n            stack.push(child = childs[n]);\n            child.parent = node;\n            child.depth = node.depth + 1;\n          }\n          if (value) node.value = 0;\n          node.children = childs;\n        } else {\n          if (value) node.value = +value.call(hierarchy, node, node.depth) || 0;\n          delete node.children;\n        }\n      }\n      d3_layout_hierarchyVisitAfter(root, function(node) {\n        var childs, parent;\n        if (sort && (childs = node.children)) childs.sort(sort);\n        if (value && (parent = node.parent)) parent.value += node.value;\n      });\n      return nodes;\n    }\n    hierarchy.sort = function(x) {\n      if (!arguments.length) return sort;\n      sort = x;\n      return hierarchy;\n    };\n    hierarchy.children = function(x) {\n      if (!arguments.length) return children;\n      children = x;\n      return hierarchy;\n    };\n    hierarchy.value = function(x) {\n      if (!arguments.length) return value;\n      value = x;\n      return hierarchy;\n    };\n    hierarchy.revalue = function(root) {\n      if (value) {\n        d3_layout_hierarchyVisitBefore(root, function(node) {\n          if (node.children) node.value = 0;\n        });\n        d3_layout_hierarchyVisitAfter(root, function(node) {\n          var parent;\n          if (!node.children) node.value = +value.call(hierarchy, node, node.depth) || 0;\n          if (parent = node.parent) parent.value += node.value;\n        });\n      }\n      return root;\n    };\n    return hierarchy;\n  };\n  function d3_layout_hierarchyRebind(object, hierarchy) {\n    d3.rebind(object, hierarchy, \"sort\", \"children\", \"value\");\n    object.nodes = object;\n    object.links = d3_layout_hierarchyLinks;\n    return object;\n  }\n  function d3_layout_hierarchyVisitBefore(node, callback) {\n    var nodes = [ node ];\n    while ((node = nodes.pop()) != null) {\n      callback(node);\n      if ((children = node.children) && (n = children.length)) {\n        var n, children;\n        while (--n >= 0) nodes.push(children[n]);\n      }\n    }\n  }\n  function d3_layout_hierarchyVisitAfter(node, callback) {\n    var nodes = [ node ], nodes2 = [];\n    while ((node = nodes.pop()) != null) {\n      nodes2.push(node);\n      if ((children = node.children) && (n = children.length)) {\n        var i = -1, n, children;\n        while (++i < n) nodes.push(children[i]);\n      }\n    }\n    while ((node = nodes2.pop()) != null) {\n      callback(node);\n    }\n  }\n  function d3_layout_hierarchyChildren(d) {\n    return d.children;\n  }\n  function d3_layout_hierarchyValue(d) {\n    return d.value;\n  }\n  function d3_layout_hierarchySort(a, b) {\n    return b.value - a.value;\n  }\n  function d3_layout_hierarchyLinks(nodes) {\n    return d3.merge(nodes.map(function(parent) {\n      return (parent.children || []).map(function(child) {\n        return {\n          source: parent,\n          target: child\n        };\n      });\n    }));\n  }\n  d3.layout.partition = function() {\n    var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];\n    function position(node, x, dx, dy) {\n      var children = node.children;\n      node.x = x;\n      node.y = node.depth * dy;\n      node.dx = dx;\n      node.dy = dy;\n      if (children && (n = children.length)) {\n        var i = -1, n, c, d;\n        dx = node.value ? dx / node.value : 0;\n        while (++i < n) {\n          position(c = children[i], x, d = c.value * dx, dy);\n          x += d;\n        }\n      }\n    }\n    function depth(node) {\n      var children = node.children, d = 0;\n      if (children && (n = children.length)) {\n        var i = -1, n;\n        while (++i < n) d = Math.max(d, depth(children[i]));\n      }\n      return 1 + d;\n    }\n    function partition(d, i) {\n      var nodes = hierarchy.call(this, d, i);\n      position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));\n      return nodes;\n    }\n    partition.size = function(x) {\n      if (!arguments.length) return size;\n      size = x;\n      return partition;\n    };\n    return d3_layout_hierarchyRebind(partition, hierarchy);\n  };\n  d3.layout.pie = function() {\n    var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = τ, padAngle = 0;\n    function pie(data) {\n      var n = data.length, values = data.map(function(d, i) {\n        return +value.call(pie, d, i);\n      }), a = +(typeof startAngle === \"function\" ? startAngle.apply(this, arguments) : startAngle), da = (typeof endAngle === \"function\" ? endAngle.apply(this, arguments) : endAngle) - a, p = Math.min(Math.abs(da) / n, +(typeof padAngle === \"function\" ? padAngle.apply(this, arguments) : padAngle)), pa = p * (da < 0 ? -1 : 1), sum = d3.sum(values), k = sum ? (da - n * pa) / sum : 0, index = d3.range(n), arcs = [], v;\n      if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {\n        return values[j] - values[i];\n      } : function(i, j) {\n        return sort(data[i], data[j]);\n      });\n      index.forEach(function(i) {\n        arcs[i] = {\n          data: data[i],\n          value: v = values[i],\n          startAngle: a,\n          endAngle: a += v * k + pa,\n          padAngle: p\n        };\n      });\n      return arcs;\n    }\n    pie.value = function(_) {\n      if (!arguments.length) return value;\n      value = _;\n      return pie;\n    };\n    pie.sort = function(_) {\n      if (!arguments.length) return sort;\n      sort = _;\n      return pie;\n    };\n    pie.startAngle = function(_) {\n      if (!arguments.length) return startAngle;\n      startAngle = _;\n      return pie;\n    };\n    pie.endAngle = function(_) {\n      if (!arguments.length) return endAngle;\n      endAngle = _;\n      return pie;\n    };\n    pie.padAngle = function(_) {\n      if (!arguments.length) return padAngle;\n      padAngle = _;\n      return pie;\n    };\n    return pie;\n  };\n  var d3_layout_pieSortByValue = {};\n  d3.layout.stack = function() {\n    var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;\n    function stack(data, index) {\n      if (!(n = data.length)) return data;\n      var series = data.map(function(d, i) {\n        return values.call(stack, d, i);\n      });\n      var points = series.map(function(d) {\n        return d.map(function(v, i) {\n          return [ x.call(stack, v, i), y.call(stack, v, i) ];\n        });\n      });\n      var orders = order.call(stack, points, index);\n      series = d3.permute(series, orders);\n      points = d3.permute(points, orders);\n      var offsets = offset.call(stack, points, index);\n      var m = series[0].length, n, i, j, o;\n      for (j = 0; j < m; ++j) {\n        out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);\n        for (i = 1; i < n; ++i) {\n          out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);\n        }\n      }\n      return data;\n    }\n    stack.values = function(x) {\n      if (!arguments.length) return values;\n      values = x;\n      return stack;\n    };\n    stack.order = function(x) {\n      if (!arguments.length) return order;\n      order = typeof x === \"function\" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;\n      return stack;\n    };\n    stack.offset = function(x) {\n      if (!arguments.length) return offset;\n      offset = typeof x === \"function\" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;\n      return stack;\n    };\n    stack.x = function(z) {\n      if (!arguments.length) return x;\n      x = z;\n      return stack;\n    };\n    stack.y = function(z) {\n      if (!arguments.length) return y;\n      y = z;\n      return stack;\n    };\n    stack.out = function(z) {\n      if (!arguments.length) return out;\n      out = z;\n      return stack;\n    };\n    return stack;\n  };\n  function d3_layout_stackX(d) {\n    return d.x;\n  }\n  function d3_layout_stackY(d) {\n    return d.y;\n  }\n  function d3_layout_stackOut(d, y0, y) {\n    d.y0 = y0;\n    d.y = y;\n  }\n  var d3_layout_stackOrders = d3.map({\n    \"inside-out\": function(data) {\n      var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {\n        return max[a] - max[b];\n      }), top = 0, bottom = 0, tops = [], bottoms = [];\n      for (i = 0; i < n; ++i) {\n        j = index[i];\n        if (top < bottom) {\n          top += sums[j];\n          tops.push(j);\n        } else {\n          bottom += sums[j];\n          bottoms.push(j);\n        }\n      }\n      return bottoms.reverse().concat(tops);\n    },\n    reverse: function(data) {\n      return d3.range(data.length).reverse();\n    },\n    \"default\": d3_layout_stackOrderDefault\n  });\n  var d3_layout_stackOffsets = d3.map({\n    silhouette: function(data) {\n      var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];\n      for (j = 0; j < m; ++j) {\n        for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n        if (o > max) max = o;\n        sums.push(o);\n      }\n      for (j = 0; j < m; ++j) {\n        y0[j] = (max - sums[j]) / 2;\n      }\n      return y0;\n    },\n    wiggle: function(data) {\n      var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];\n      y0[0] = o = o0 = 0;\n      for (j = 1; j < m; ++j) {\n        for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];\n        for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {\n          for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {\n            s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;\n          }\n          s2 += s3 * data[i][j][1];\n        }\n        y0[j] = o -= s1 ? s2 / s1 * dx : 0;\n        if (o < o0) o0 = o;\n      }\n      for (j = 0; j < m; ++j) y0[j] -= o0;\n      return y0;\n    },\n    expand: function(data) {\n      var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];\n      for (j = 0; j < m; ++j) {\n        for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n        if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;\n      }\n      for (j = 0; j < m; ++j) y0[j] = 0;\n      return y0;\n    },\n    zero: d3_layout_stackOffsetZero\n  });\n  function d3_layout_stackOrderDefault(data) {\n    return d3.range(data.length);\n  }\n  function d3_layout_stackOffsetZero(data) {\n    var j = -1, m = data[0].length, y0 = [];\n    while (++j < m) y0[j] = 0;\n    return y0;\n  }\n  function d3_layout_stackMaxIndex(array) {\n    var i = 1, j = 0, v = array[0][1], k, n = array.length;\n    for (;i < n; ++i) {\n      if ((k = array[i][1]) > v) {\n        j = i;\n        v = k;\n      }\n    }\n    return j;\n  }\n  function d3_layout_stackReduceSum(d) {\n    return d.reduce(d3_layout_stackSum, 0);\n  }\n  function d3_layout_stackSum(p, d) {\n    return p + d[1];\n  }\n  d3.layout.histogram = function() {\n    var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;\n    function histogram(data, i) {\n      var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;\n      while (++i < m) {\n        bin = bins[i] = [];\n        bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);\n        bin.y = 0;\n      }\n      if (m > 0) {\n        i = -1;\n        while (++i < n) {\n          x = values[i];\n          if (x >= range[0] && x <= range[1]) {\n            bin = bins[d3.bisect(thresholds, x, 1, m) - 1];\n            bin.y += k;\n            bin.push(data[i]);\n          }\n        }\n      }\n      return bins;\n    }\n    histogram.value = function(x) {\n      if (!arguments.length) return valuer;\n      valuer = x;\n      return histogram;\n    };\n    histogram.range = function(x) {\n      if (!arguments.length) return ranger;\n      ranger = d3_functor(x);\n      return histogram;\n    };\n    histogram.bins = function(x) {\n      if (!arguments.length) return binner;\n      binner = typeof x === \"number\" ? function(range) {\n        return d3_layout_histogramBinFixed(range, x);\n      } : d3_functor(x);\n      return histogram;\n    };\n    histogram.frequency = function(x) {\n      if (!arguments.length) return frequency;\n      frequency = !!x;\n      return histogram;\n    };\n    return histogram;\n  };\n  function d3_layout_histogramBinSturges(range, values) {\n    return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));\n  }\n  function d3_layout_histogramBinFixed(range, n) {\n    var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];\n    while (++x <= n) f[x] = m * x + b;\n    return f;\n  }\n  function d3_layout_histogramRange(values) {\n    return [ d3.min(values), d3.max(values) ];\n  }\n  d3.layout.pack = function() {\n    var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;\n    function pack(d, i) {\n      var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === \"function\" ? radius : function() {\n        return radius;\n      };\n      root.x = root.y = 0;\n      d3_layout_hierarchyVisitAfter(root, function(d) {\n        d.r = +r(d.value);\n      });\n      d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);\n      if (padding) {\n        var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2;\n        d3_layout_hierarchyVisitAfter(root, function(d) {\n          d.r += dr;\n        });\n        d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);\n        d3_layout_hierarchyVisitAfter(root, function(d) {\n          d.r -= dr;\n        });\n      }\n      d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h));\n      return nodes;\n    }\n    pack.size = function(_) {\n      if (!arguments.length) return size;\n      size = _;\n      return pack;\n    };\n    pack.radius = function(_) {\n      if (!arguments.length) return radius;\n      radius = _ == null || typeof _ === \"function\" ? _ : +_;\n      return pack;\n    };\n    pack.padding = function(_) {\n      if (!arguments.length) return padding;\n      padding = +_;\n      return pack;\n    };\n    return d3_layout_hierarchyRebind(pack, hierarchy);\n  };\n  function d3_layout_packSort(a, b) {\n    return a.value - b.value;\n  }\n  function d3_layout_packInsert(a, b) {\n    var c = a._pack_next;\n    a._pack_next = b;\n    b._pack_prev = a;\n    b._pack_next = c;\n    c._pack_prev = b;\n  }\n  function d3_layout_packSplice(a, b) {\n    a._pack_next = b;\n    b._pack_prev = a;\n  }\n  function d3_layout_packIntersects(a, b) {\n    var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;\n    return .999 * dr * dr > dx * dx + dy * dy;\n  }\n  function d3_layout_packSiblings(node) {\n    if (!(nodes = node.children) || !(n = nodes.length)) return;\n    var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;\n    function bound(node) {\n      xMin = Math.min(node.x - node.r, xMin);\n      xMax = Math.max(node.x + node.r, xMax);\n      yMin = Math.min(node.y - node.r, yMin);\n      yMax = Math.max(node.y + node.r, yMax);\n    }\n    nodes.forEach(d3_layout_packLink);\n    a = nodes[0];\n    a.x = -a.r;\n    a.y = 0;\n    bound(a);\n    if (n > 1) {\n      b = nodes[1];\n      b.x = b.r;\n      b.y = 0;\n      bound(b);\n      if (n > 2) {\n        c = nodes[2];\n        d3_layout_packPlace(a, b, c);\n        bound(c);\n        d3_layout_packInsert(a, c);\n        a._pack_prev = c;\n        d3_layout_packInsert(c, b);\n        b = a._pack_next;\n        for (i = 3; i < n; i++) {\n          d3_layout_packPlace(a, b, c = nodes[i]);\n          var isect = 0, s1 = 1, s2 = 1;\n          for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {\n            if (d3_layout_packIntersects(j, c)) {\n              isect = 1;\n              break;\n            }\n          }\n          if (isect == 1) {\n            for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {\n              if (d3_layout_packIntersects(k, c)) {\n                break;\n              }\n            }\n          }\n          if (isect) {\n            if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);\n            i--;\n          } else {\n            d3_layout_packInsert(a, c);\n            b = c;\n            bound(c);\n          }\n        }\n      }\n    }\n    var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;\n    for (i = 0; i < n; i++) {\n      c = nodes[i];\n      c.x -= cx;\n      c.y -= cy;\n      cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));\n    }\n    node.r = cr;\n    nodes.forEach(d3_layout_packUnlink);\n  }\n  function d3_layout_packLink(node) {\n    node._pack_next = node._pack_prev = node;\n  }\n  function d3_layout_packUnlink(node) {\n    delete node._pack_next;\n    delete node._pack_prev;\n  }\n  function d3_layout_packTransform(node, x, y, k) {\n    var children = node.children;\n    node.x = x += k * node.x;\n    node.y = y += k * node.y;\n    node.r *= k;\n    if (children) {\n      var i = -1, n = children.length;\n      while (++i < n) d3_layout_packTransform(children[i], x, y, k);\n    }\n  }\n  function d3_layout_packPlace(a, b, c) {\n    var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;\n    if (db && (dx || dy)) {\n      var da = b.r + c.r, dc = dx * dx + dy * dy;\n      da *= da;\n      db *= db;\n      var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);\n      c.x = a.x + x * dx + y * dy;\n      c.y = a.y + x * dy - y * dx;\n    } else {\n      c.x = a.x + db;\n      c.y = a.y;\n    }\n  }\n  d3.layout.tree = function() {\n    var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null;\n    function tree(d, i) {\n      var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0);\n      d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z;\n      d3_layout_hierarchyVisitBefore(root1, secondWalk);\n      if (nodeSize) d3_layout_hierarchyVisitBefore(root0, sizeNode); else {\n        var left = root0, right = root0, bottom = root0;\n        d3_layout_hierarchyVisitBefore(root0, function(node) {\n          if (node.x < left.x) left = node;\n          if (node.x > right.x) right = node;\n          if (node.depth > bottom.depth) bottom = node;\n        });\n        var tx = separation(left, right) / 2 - left.x, kx = size[0] / (right.x + separation(right, left) / 2 + tx), ky = size[1] / (bottom.depth || 1);\n        d3_layout_hierarchyVisitBefore(root0, function(node) {\n          node.x = (node.x + tx) * kx;\n          node.y = node.depth * ky;\n        });\n      }\n      return nodes;\n    }\n    function wrapTree(root0) {\n      var root1 = {\n        A: null,\n        children: [ root0 ]\n      }, queue = [ root1 ], node1;\n      while ((node1 = queue.pop()) != null) {\n        for (var children = node1.children, child, i = 0, n = children.length; i < n; ++i) {\n          queue.push((children[i] = child = {\n            _: children[i],\n            parent: node1,\n            children: (child = children[i].children) && child.slice() || [],\n            A: null,\n            a: null,\n            z: 0,\n            m: 0,\n            c: 0,\n            s: 0,\n            t: null,\n            i: i\n          }).a = child);\n        }\n      }\n      return root1.children[0];\n    }\n    function firstWalk(v) {\n      var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null;\n      if (children.length) {\n        d3_layout_treeShift(v);\n        var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n        if (w) {\n          v.z = w.z + separation(v._, w._);\n          v.m = v.z - midpoint;\n        } else {\n          v.z = midpoint;\n        }\n      } else if (w) {\n        v.z = w.z + separation(v._, w._);\n      }\n      v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n    }\n    function secondWalk(v) {\n      v._.x = v.z + v.parent.m;\n      v.m += v.parent.m;\n    }\n    function apportion(v, w, ancestor) {\n      if (w) {\n        var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;\n        while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {\n          vom = d3_layout_treeLeft(vom);\n          vop = d3_layout_treeRight(vop);\n          vop.a = v;\n          shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n          if (shift > 0) {\n            d3_layout_treeMove(d3_layout_treeAncestor(vim, v, ancestor), v, shift);\n            sip += shift;\n            sop += shift;\n          }\n          sim += vim.m;\n          sip += vip.m;\n          som += vom.m;\n          sop += vop.m;\n        }\n        if (vim && !d3_layout_treeRight(vop)) {\n          vop.t = vim;\n          vop.m += sim - sop;\n        }\n        if (vip && !d3_layout_treeLeft(vom)) {\n          vom.t = vip;\n          vom.m += sip - som;\n          ancestor = v;\n        }\n      }\n      return ancestor;\n    }\n    function sizeNode(node) {\n      node.x *= size[0];\n      node.y = node.depth * size[1];\n    }\n    tree.separation = function(x) {\n      if (!arguments.length) return separation;\n      separation = x;\n      return tree;\n    };\n    tree.size = function(x) {\n      if (!arguments.length) return nodeSize ? null : size;\n      nodeSize = (size = x) == null ? sizeNode : null;\n      return tree;\n    };\n    tree.nodeSize = function(x) {\n      if (!arguments.length) return nodeSize ? size : null;\n      nodeSize = (size = x) == null ? null : sizeNode;\n      return tree;\n    };\n    return d3_layout_hierarchyRebind(tree, hierarchy);\n  };\n  function d3_layout_treeSeparation(a, b) {\n    return a.parent == b.parent ? 1 : 2;\n  }\n  function d3_layout_treeLeft(v) {\n    var children = v.children;\n    return children.length ? children[0] : v.t;\n  }\n  function d3_layout_treeRight(v) {\n    var children = v.children, n;\n    return (n = children.length) ? children[n - 1] : v.t;\n  }\n  function d3_layout_treeMove(wm, wp, shift) {\n    var change = shift / (wp.i - wm.i);\n    wp.c -= change;\n    wp.s += shift;\n    wm.c += change;\n    wp.z += shift;\n    wp.m += shift;\n  }\n  function d3_layout_treeShift(v) {\n    var shift = 0, change = 0, children = v.children, i = children.length, w;\n    while (--i >= 0) {\n      w = children[i];\n      w.z += shift;\n      w.m += shift;\n      shift += w.s + (change += w.c);\n    }\n  }\n  function d3_layout_treeAncestor(vim, v, ancestor) {\n    return vim.a.parent === v.parent ? vim.a : ancestor;\n  }\n  d3.layout.cluster = function() {\n    var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;\n    function cluster(d, i) {\n      var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0;\n      d3_layout_hierarchyVisitAfter(root, function(node) {\n        var children = node.children;\n        if (children && children.length) {\n          node.x = d3_layout_clusterX(children);\n          node.y = d3_layout_clusterY(children);\n        } else {\n          node.x = previousNode ? x += separation(node, previousNode) : 0;\n          node.y = 0;\n          previousNode = node;\n        }\n      });\n      var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;\n      d3_layout_hierarchyVisitAfter(root, nodeSize ? function(node) {\n        node.x = (node.x - root.x) * size[0];\n        node.y = (root.y - node.y) * size[1];\n      } : function(node) {\n        node.x = (node.x - x0) / (x1 - x0) * size[0];\n        node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];\n      });\n      return nodes;\n    }\n    cluster.separation = function(x) {\n      if (!arguments.length) return separation;\n      separation = x;\n      return cluster;\n    };\n    cluster.size = function(x) {\n      if (!arguments.length) return nodeSize ? null : size;\n      nodeSize = (size = x) == null;\n      return cluster;\n    };\n    cluster.nodeSize = function(x) {\n      if (!arguments.length) return nodeSize ? size : null;\n      nodeSize = (size = x) != null;\n      return cluster;\n    };\n    return d3_layout_hierarchyRebind(cluster, hierarchy);\n  };\n  function d3_layout_clusterY(children) {\n    return 1 + d3.max(children, function(child) {\n      return child.y;\n    });\n  }\n  function d3_layout_clusterX(children) {\n    return children.reduce(function(x, child) {\n      return x + child.x;\n    }, 0) / children.length;\n  }\n  function d3_layout_clusterLeft(node) {\n    var children = node.children;\n    return children && children.length ? d3_layout_clusterLeft(children[0]) : node;\n  }\n  function d3_layout_clusterRight(node) {\n    var children = node.children, n;\n    return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;\n  }\n  d3.layout.treemap = function() {\n    var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = \"squarify\", ratio = .5 * (1 + Math.sqrt(5));\n    function scale(children, k) {\n      var i = -1, n = children.length, child, area;\n      while (++i < n) {\n        area = (child = children[i]).value * (k < 0 ? 0 : k);\n        child.area = isNaN(area) || area <= 0 ? 0 : area;\n      }\n    }\n    function squarify(node) {\n      var children = node.children;\n      if (children && children.length) {\n        var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === \"slice\" ? rect.dx : mode === \"dice\" ? rect.dy : mode === \"slice-dice\" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n;\n        scale(remaining, rect.dx * rect.dy / node.value);\n        row.area = 0;\n        while ((n = remaining.length) > 0) {\n          row.push(child = remaining[n - 1]);\n          row.area += child.area;\n          if (mode !== \"squarify\" || (score = worst(row, u)) <= best) {\n            remaining.pop();\n            best = score;\n          } else {\n            row.area -= row.pop().area;\n            position(row, u, rect, false);\n            u = Math.min(rect.dx, rect.dy);\n            row.length = row.area = 0;\n            best = Infinity;\n          }\n        }\n        if (row.length) {\n          position(row, u, rect, true);\n          row.length = row.area = 0;\n        }\n        children.forEach(squarify);\n      }\n    }\n    function stickify(node) {\n      var children = node.children;\n      if (children && children.length) {\n        var rect = pad(node), remaining = children.slice(), child, row = [];\n        scale(remaining, rect.dx * rect.dy / node.value);\n        row.area = 0;\n        while (child = remaining.pop()) {\n          row.push(child);\n          row.area += child.area;\n          if (child.z != null) {\n            position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);\n            row.length = row.area = 0;\n          }\n        }\n        children.forEach(stickify);\n      }\n    }\n    function worst(row, u) {\n      var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;\n      while (++i < n) {\n        if (!(r = row[i].area)) continue;\n        if (r < rmin) rmin = r;\n        if (r > rmax) rmax = r;\n      }\n      s *= s;\n      u *= u;\n      return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;\n    }\n    function position(row, u, rect, flush) {\n      var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;\n      if (u == rect.dx) {\n        if (flush || v > rect.dy) v = rect.dy;\n        while (++i < n) {\n          o = row[i];\n          o.x = x;\n          o.y = y;\n          o.dy = v;\n          x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);\n        }\n        o.z = true;\n        o.dx += rect.x + rect.dx - x;\n        rect.y += v;\n        rect.dy -= v;\n      } else {\n        if (flush || v > rect.dx) v = rect.dx;\n        while (++i < n) {\n          o = row[i];\n          o.x = x;\n          o.y = y;\n          o.dx = v;\n          y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);\n        }\n        o.z = false;\n        o.dy += rect.y + rect.dy - y;\n        rect.x += v;\n        rect.dx -= v;\n      }\n    }\n    function treemap(d) {\n      var nodes = stickies || hierarchy(d), root = nodes[0];\n      root.x = root.y = 0;\n      if (root.value) root.dx = size[0], root.dy = size[1]; else root.dx = root.dy = 0;\n      if (stickies) hierarchy.revalue(root);\n      scale([ root ], root.dx * root.dy / root.value);\n      (stickies ? stickify : squarify)(root);\n      if (sticky) stickies = nodes;\n      return nodes;\n    }\n    treemap.size = function(x) {\n      if (!arguments.length) return size;\n      size = x;\n      return treemap;\n    };\n    treemap.padding = function(x) {\n      if (!arguments.length) return padding;\n      function padFunction(node) {\n        var p = x.call(treemap, node, node.depth);\n        return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === \"number\" ? [ p, p, p, p ] : p);\n      }\n      function padConstant(node) {\n        return d3_layout_treemapPad(node, x);\n      }\n      var type;\n      pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === \"function\" ? padFunction : type === \"number\" ? (x = [ x, x, x, x ], \n      padConstant) : padConstant;\n      return treemap;\n    };\n    treemap.round = function(x) {\n      if (!arguments.length) return round != Number;\n      round = x ? Math.round : Number;\n      return treemap;\n    };\n    treemap.sticky = function(x) {\n      if (!arguments.length) return sticky;\n      sticky = x;\n      stickies = null;\n      return treemap;\n    };\n    treemap.ratio = function(x) {\n      if (!arguments.length) return ratio;\n      ratio = x;\n      return treemap;\n    };\n    treemap.mode = function(x) {\n      if (!arguments.length) return mode;\n      mode = x + \"\";\n      return treemap;\n    };\n    return d3_layout_hierarchyRebind(treemap, hierarchy);\n  };\n  function d3_layout_treemapPadNull(node) {\n    return {\n      x: node.x,\n      y: node.y,\n      dx: node.dx,\n      dy: node.dy\n    };\n  }\n  function d3_layout_treemapPad(node, padding) {\n    var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];\n    if (dx < 0) {\n      x += dx / 2;\n      dx = 0;\n    }\n    if (dy < 0) {\n      y += dy / 2;\n      dy = 0;\n    }\n    return {\n      x: x,\n      y: y,\n      dx: dx,\n      dy: dy\n    };\n  }\n  d3.random = {\n    normal: function(µ, σ) {\n      var n = arguments.length;\n      if (n < 2) σ = 1;\n      if (n < 1) µ = 0;\n      return function() {\n        var x, y, r;\n        do {\n          x = Math.random() * 2 - 1;\n          y = Math.random() * 2 - 1;\n          r = x * x + y * y;\n        } while (!r || r > 1);\n        return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);\n      };\n    },\n    logNormal: function() {\n      var random = d3.random.normal.apply(d3, arguments);\n      return function() {\n        return Math.exp(random());\n      };\n    },\n    bates: function(m) {\n      var random = d3.random.irwinHall(m);\n      return function() {\n        return random() / m;\n      };\n    },\n    irwinHall: function(m) {\n      return function() {\n        for (var s = 0, j = 0; j < m; j++) s += Math.random();\n        return s;\n      };\n    }\n  };\n  d3.scale = {};\n  function d3_scaleExtent(domain) {\n    var start = domain[0], stop = domain[domain.length - 1];\n    return start < stop ? [ start, stop ] : [ stop, start ];\n  }\n  function d3_scaleRange(scale) {\n    return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());\n  }\n  function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {\n    var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);\n    return function(x) {\n      return i(u(x));\n    };\n  }\n  function d3_scale_nice(domain, nice) {\n    var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;\n    if (x1 < x0) {\n      dx = i0, i0 = i1, i1 = dx;\n      dx = x0, x0 = x1, x1 = dx;\n    }\n    domain[i0] = nice.floor(x0);\n    domain[i1] = nice.ceil(x1);\n    return domain;\n  }\n  function d3_scale_niceStep(step) {\n    return step ? {\n      floor: function(x) {\n        return Math.floor(x / step) * step;\n      },\n      ceil: function(x) {\n        return Math.ceil(x / step) * step;\n      }\n    } : d3_scale_niceIdentity;\n  }\n  var d3_scale_niceIdentity = {\n    floor: d3_identity,\n    ceil: d3_identity\n  };\n  function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {\n    var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;\n    if (domain[k] < domain[0]) {\n      domain = domain.slice().reverse();\n      range = range.slice().reverse();\n    }\n    while (++j <= k) {\n      u.push(uninterpolate(domain[j - 1], domain[j]));\n      i.push(interpolate(range[j - 1], range[j]));\n    }\n    return function(x) {\n      var j = d3.bisect(domain, x, 1, k) - 1;\n      return i[j](u[j](x));\n    };\n  }\n  d3.scale.linear = function() {\n    return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false);\n  };\n  function d3_scale_linear(domain, range, interpolate, clamp) {\n    var output, input;\n    function rescale() {\n      var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;\n      output = linear(domain, range, uninterpolate, interpolate);\n      input = linear(range, domain, uninterpolate, d3_interpolate);\n      return scale;\n    }\n    function scale(x) {\n      return output(x);\n    }\n    scale.invert = function(y) {\n      return input(y);\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      domain = x.map(Number);\n      return rescale();\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      return rescale();\n    };\n    scale.rangeRound = function(x) {\n      return scale.range(x).interpolate(d3_interpolateRound);\n    };\n    scale.clamp = function(x) {\n      if (!arguments.length) return clamp;\n      clamp = x;\n      return rescale();\n    };\n    scale.interpolate = function(x) {\n      if (!arguments.length) return interpolate;\n      interpolate = x;\n      return rescale();\n    };\n    scale.ticks = function(m) {\n      return d3_scale_linearTicks(domain, m);\n    };\n    scale.tickFormat = function(m, format) {\n      return d3_scale_linearTickFormat(domain, m, format);\n    };\n    scale.nice = function(m) {\n      d3_scale_linearNice(domain, m);\n      return rescale();\n    };\n    scale.copy = function() {\n      return d3_scale_linear(domain, range, interpolate, clamp);\n    };\n    return rescale();\n  }\n  function d3_scale_linearRebind(scale, linear) {\n    return d3.rebind(scale, linear, \"range\", \"rangeRound\", \"interpolate\", \"clamp\");\n  }\n  function d3_scale_linearNice(domain, m) {\n    d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));\n    d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));\n    return domain;\n  }\n  function d3_scale_linearTickRange(domain, m) {\n    if (m == null) m = 10;\n    var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;\n    if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;\n    extent[0] = Math.ceil(extent[0] / step) * step;\n    extent[1] = Math.floor(extent[1] / step) * step + step * .5;\n    extent[2] = step;\n    return extent;\n  }\n  function d3_scale_linearTicks(domain, m) {\n    return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));\n  }\n  function d3_scale_linearTickFormat(domain, m, format) {\n    var range = d3_scale_linearTickRange(domain, m);\n    if (format) {\n      var match = d3_format_re.exec(format);\n      match.shift();\n      if (match[8] === \"s\") {\n        var prefix = d3.formatPrefix(Math.max(abs(range[0]), abs(range[1])));\n        if (!match[7]) match[7] = \".\" + d3_scale_linearPrecision(prefix.scale(range[2]));\n        match[8] = \"f\";\n        format = d3.format(match.join(\"\"));\n        return function(d) {\n          return format(prefix.scale(d)) + prefix.symbol;\n        };\n      }\n      if (!match[7]) match[7] = \".\" + d3_scale_linearFormatPrecision(match[8], range);\n      format = match.join(\"\");\n    } else {\n      format = \",.\" + d3_scale_linearPrecision(range[2]) + \"f\";\n    }\n    return d3.format(format);\n  }\n  var d3_scale_linearFormatSignificant = {\n    s: 1,\n    g: 1,\n    p: 1,\n    r: 1,\n    e: 1\n  };\n  function d3_scale_linearPrecision(value) {\n    return -Math.floor(Math.log(value) / Math.LN10 + .01);\n  }\n  function d3_scale_linearFormatPrecision(type, range) {\n    var p = d3_scale_linearPrecision(range[2]);\n    return type in d3_scale_linearFormatSignificant ? Math.abs(p - d3_scale_linearPrecision(Math.max(abs(range[0]), abs(range[1])))) + +(type !== \"e\") : p - (type === \"%\") * 2;\n  }\n  d3.scale.log = function() {\n    return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]);\n  };\n  function d3_scale_log(linear, base, positive, domain) {\n    function log(x) {\n      return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base);\n    }\n    function pow(x) {\n      return positive ? Math.pow(base, x) : -Math.pow(base, -x);\n    }\n    function scale(x) {\n      return linear(log(x));\n    }\n    scale.invert = function(x) {\n      return pow(linear.invert(x));\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      positive = x[0] >= 0;\n      linear.domain((domain = x.map(Number)).map(log));\n      return scale;\n    };\n    scale.base = function(_) {\n      if (!arguments.length) return base;\n      base = +_;\n      linear.domain(domain.map(log));\n      return scale;\n    };\n    scale.nice = function() {\n      var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative);\n      linear.domain(niced);\n      domain = niced.map(pow);\n      return scale;\n    };\n    scale.ticks = function() {\n      var extent = d3_scaleExtent(domain), ticks = [], u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base;\n      if (isFinite(j - i)) {\n        if (positive) {\n          for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k);\n          ticks.push(pow(i));\n        } else {\n          ticks.push(pow(i));\n          for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k);\n        }\n        for (i = 0; ticks[i] < u; i++) {}\n        for (j = ticks.length; ticks[j - 1] > v; j--) {}\n        ticks = ticks.slice(i, j);\n      }\n      return ticks;\n    };\n    scale.tickFormat = function(n, format) {\n      if (!arguments.length) return d3_scale_logFormat;\n      if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== \"function\") format = d3.format(format);\n      var k = Math.max(1, base * n / scale.ticks().length);\n      return function(d) {\n        var i = d / pow(Math.round(log(d)));\n        if (i * base < base - .5) i *= base;\n        return i <= k ? format(d) : \"\";\n      };\n    };\n    scale.copy = function() {\n      return d3_scale_log(linear.copy(), base, positive, domain);\n    };\n    return d3_scale_linearRebind(scale, linear);\n  }\n  var d3_scale_logFormat = d3.format(\".0e\"), d3_scale_logNiceNegative = {\n    floor: function(x) {\n      return -Math.ceil(-x);\n    },\n    ceil: function(x) {\n      return -Math.floor(-x);\n    }\n  };\n  d3.scale.pow = function() {\n    return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]);\n  };\n  function d3_scale_pow(linear, exponent, domain) {\n    var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);\n    function scale(x) {\n      return linear(powp(x));\n    }\n    scale.invert = function(x) {\n      return powb(linear.invert(x));\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      linear.domain((domain = x.map(Number)).map(powp));\n      return scale;\n    };\n    scale.ticks = function(m) {\n      return d3_scale_linearTicks(domain, m);\n    };\n    scale.tickFormat = function(m, format) {\n      return d3_scale_linearTickFormat(domain, m, format);\n    };\n    scale.nice = function(m) {\n      return scale.domain(d3_scale_linearNice(domain, m));\n    };\n    scale.exponent = function(x) {\n      if (!arguments.length) return exponent;\n      powp = d3_scale_powPow(exponent = x);\n      powb = d3_scale_powPow(1 / exponent);\n      linear.domain(domain.map(powp));\n      return scale;\n    };\n    scale.copy = function() {\n      return d3_scale_pow(linear.copy(), exponent, domain);\n    };\n    return d3_scale_linearRebind(scale, linear);\n  }\n  function d3_scale_powPow(e) {\n    return function(x) {\n      return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);\n    };\n  }\n  d3.scale.sqrt = function() {\n    return d3.scale.pow().exponent(.5);\n  };\n  d3.scale.ordinal = function() {\n    return d3_scale_ordinal([], {\n      t: \"range\",\n      a: [ [] ]\n    });\n  };\n  function d3_scale_ordinal(domain, ranger) {\n    var index, range, rangeBand;\n    function scale(x) {\n      return range[((index.get(x) || (ranger.t === \"range\" ? index.set(x, domain.push(x)) : NaN)) - 1) % range.length];\n    }\n    function steps(start, step) {\n      return d3.range(domain.length).map(function(i) {\n        return start + step * i;\n      });\n    }\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      domain = [];\n      index = new d3_Map();\n      var i = -1, n = x.length, xi;\n      while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));\n      return scale[ranger.t].apply(scale, ranger.a);\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      rangeBand = 0;\n      ranger = {\n        t: \"range\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangePoints = function(x, padding) {\n      if (arguments.length < 2) padding = 0;\n      var start = x[0], stop = x[1], step = domain.length < 2 ? (start = (start + stop) / 2, \n      0) : (stop - start) / (domain.length - 1 + padding);\n      range = steps(start + step * padding / 2, step);\n      rangeBand = 0;\n      ranger = {\n        t: \"rangePoints\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeRoundPoints = function(x, padding) {\n      if (arguments.length < 2) padding = 0;\n      var start = x[0], stop = x[1], step = domain.length < 2 ? (start = stop = Math.round((start + stop) / 2), \n      0) : (stop - start) / (domain.length - 1 + padding) | 0;\n      range = steps(start + Math.round(step * padding / 2 + (stop - start - (domain.length - 1 + padding) * step) / 2), step);\n      rangeBand = 0;\n      ranger = {\n        t: \"rangeRoundPoints\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeBands = function(x, padding, outerPadding) {\n      if (arguments.length < 2) padding = 0;\n      if (arguments.length < 3) outerPadding = padding;\n      var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);\n      range = steps(start + step * outerPadding, step);\n      if (reverse) range.reverse();\n      rangeBand = step * (1 - padding);\n      ranger = {\n        t: \"rangeBands\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeRoundBands = function(x, padding, outerPadding) {\n      if (arguments.length < 2) padding = 0;\n      if (arguments.length < 3) outerPadding = padding;\n      var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding));\n      range = steps(start + Math.round((stop - start - (domain.length - padding) * step) / 2), step);\n      if (reverse) range.reverse();\n      rangeBand = Math.round(step * (1 - padding));\n      ranger = {\n        t: \"rangeRoundBands\",\n        a: arguments\n      };\n      return scale;\n    };\n    scale.rangeBand = function() {\n      return rangeBand;\n    };\n    scale.rangeExtent = function() {\n      return d3_scaleExtent(ranger.a[0]);\n    };\n    scale.copy = function() {\n      return d3_scale_ordinal(domain, ranger);\n    };\n    return scale.domain(domain);\n  }\n  d3.scale.category10 = function() {\n    return d3.scale.ordinal().range(d3_category10);\n  };\n  d3.scale.category20 = function() {\n    return d3.scale.ordinal().range(d3_category20);\n  };\n  d3.scale.category20b = function() {\n    return d3.scale.ordinal().range(d3_category20b);\n  };\n  d3.scale.category20c = function() {\n    return d3.scale.ordinal().range(d3_category20c);\n  };\n  var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString);\n  var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString);\n  var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString);\n  var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString);\n  d3.scale.quantile = function() {\n    return d3_scale_quantile([], []);\n  };\n  function d3_scale_quantile(domain, range) {\n    var thresholds;\n    function rescale() {\n      var k = 0, q = range.length;\n      thresholds = [];\n      while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);\n      return scale;\n    }\n    function scale(x) {\n      if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)];\n    }\n    scale.domain = function(x) {\n      if (!arguments.length) return domain;\n      domain = x.map(d3_number).filter(d3_numeric).sort(d3_ascending);\n      return rescale();\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      return rescale();\n    };\n    scale.quantiles = function() {\n      return thresholds;\n    };\n    scale.invertExtent = function(y) {\n      y = range.indexOf(y);\n      return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ];\n    };\n    scale.copy = function() {\n      return d3_scale_quantile(domain, range);\n    };\n    return rescale();\n  }\n  d3.scale.quantize = function() {\n    return d3_scale_quantize(0, 1, [ 0, 1 ]);\n  };\n  function d3_scale_quantize(x0, x1, range) {\n    var kx, i;\n    function scale(x) {\n      return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];\n    }\n    function rescale() {\n      kx = range.length / (x1 - x0);\n      i = range.length - 1;\n      return scale;\n    }\n    scale.domain = function(x) {\n      if (!arguments.length) return [ x0, x1 ];\n      x0 = +x[0];\n      x1 = +x[x.length - 1];\n      return rescale();\n    };\n    scale.range = function(x) {\n      if (!arguments.length) return range;\n      range = x;\n      return rescale();\n    };\n    scale.invertExtent = function(y) {\n      y = range.indexOf(y);\n      y = y < 0 ? NaN : y / kx + x0;\n      return [ y, y + 1 / kx ];\n    };\n    scale.copy = function() {\n      return d3_scale_quantize(x0, x1, range);\n    };\n    return rescale();\n  }\n  d3.scale.threshold = function() {\n    return d3_scale_threshold([ .5 ], [ 0, 1 ]);\n  };\n  function d3_scale_threshold(domain, range) {\n    function scale(x) {\n      if (x <= x) return range[d3.bisect(domain, x)];\n    }\n    scale.domain = function(_) {\n      if (!arguments.length) return domain;\n      domain = _;\n      return scale;\n    };\n    scale.range = function(_) {\n      if (!arguments.length) return range;\n      range = _;\n      return scale;\n    };\n    scale.invertExtent = function(y) {\n      y = range.indexOf(y);\n      return [ domain[y - 1], domain[y] ];\n    };\n    scale.copy = function() {\n      return d3_scale_threshold(domain, range);\n    };\n    return scale;\n  }\n  d3.scale.identity = function() {\n    return d3_scale_identity([ 0, 1 ]);\n  };\n  function d3_scale_identity(domain) {\n    function identity(x) {\n      return +x;\n    }\n    identity.invert = identity;\n    identity.domain = identity.range = function(x) {\n      if (!arguments.length) return domain;\n      domain = x.map(identity);\n      return identity;\n    };\n    identity.ticks = function(m) {\n      return d3_scale_linearTicks(domain, m);\n    };\n    identity.tickFormat = function(m, format) {\n      return d3_scale_linearTickFormat(domain, m, format);\n    };\n    identity.copy = function() {\n      return d3_scale_identity(domain);\n    };\n    return identity;\n  }\n  d3.svg = {};\n  function d3_zero() {\n    return 0;\n  }\n  d3.svg.arc = function() {\n    var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, cornerRadius = d3_zero, padRadius = d3_svg_arcAuto, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle, padAngle = d3_svg_arcPadAngle;\n    function arc() {\n      var r0 = Math.max(0, +innerRadius.apply(this, arguments)), r1 = Math.max(0, +outerRadius.apply(this, arguments)), a0 = startAngle.apply(this, arguments) - halfπ, a1 = endAngle.apply(this, arguments) - halfπ, da = Math.abs(a1 - a0), cw = a0 > a1 ? 0 : 1;\n      if (r1 < r0) rc = r1, r1 = r0, r0 = rc;\n      if (da >= τε) return circleSegment(r1, cw) + (r0 ? circleSegment(r0, 1 - cw) : \"\") + \"Z\";\n      var rc, cr, rp, ap, p0 = 0, p1 = 0, x0, y0, x1, y1, x2, y2, x3, y3, path = [];\n      if (ap = (+padAngle.apply(this, arguments) || 0) / 2) {\n        rp = padRadius === d3_svg_arcAuto ? Math.sqrt(r0 * r0 + r1 * r1) : +padRadius.apply(this, arguments);\n        if (!cw) p1 *= -1;\n        if (r1) p1 = d3_asin(rp / r1 * Math.sin(ap));\n        if (r0) p0 = d3_asin(rp / r0 * Math.sin(ap));\n      }\n      if (r1) {\n        x0 = r1 * Math.cos(a0 + p1);\n        y0 = r1 * Math.sin(a0 + p1);\n        x1 = r1 * Math.cos(a1 - p1);\n        y1 = r1 * Math.sin(a1 - p1);\n        var l1 = Math.abs(a1 - a0 - 2 * p1) <= π ? 0 : 1;\n        if (p1 && d3_svg_arcSweep(x0, y0, x1, y1) === cw ^ l1) {\n          var h1 = (a0 + a1) / 2;\n          x0 = r1 * Math.cos(h1);\n          y0 = r1 * Math.sin(h1);\n          x1 = y1 = null;\n        }\n      } else {\n        x0 = y0 = 0;\n      }\n      if (r0) {\n        x2 = r0 * Math.cos(a1 - p0);\n        y2 = r0 * Math.sin(a1 - p0);\n        x3 = r0 * Math.cos(a0 + p0);\n        y3 = r0 * Math.sin(a0 + p0);\n        var l0 = Math.abs(a0 - a1 + 2 * p0) <= π ? 0 : 1;\n        if (p0 && d3_svg_arcSweep(x2, y2, x3, y3) === 1 - cw ^ l0) {\n          var h0 = (a0 + a1) / 2;\n          x2 = r0 * Math.cos(h0);\n          y2 = r0 * Math.sin(h0);\n          x3 = y3 = null;\n        }\n      } else {\n        x2 = y2 = 0;\n      }\n      if (da > ε && (rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments))) > .001) {\n        cr = r0 < r1 ^ cw ? 0 : 1;\n        var rc1 = rc, rc0 = rc;\n        if (da < π) {\n          var oc = x3 == null ? [ x2, y2 ] : x1 == null ? [ x0, y0 ] : d3_geom_polygonIntersect([ x0, y0 ], [ x3, y3 ], [ x1, y1 ], [ x2, y2 ]), ax = x0 - oc[0], ay = y0 - oc[1], bx = x1 - oc[0], by = y1 - oc[1], kc = 1 / Math.sin(Math.acos((ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))) / 2), lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n          rc0 = Math.min(rc, (r0 - lc) / (kc - 1));\n          rc1 = Math.min(rc, (r1 - lc) / (kc + 1));\n        }\n        if (x1 != null) {\n          var t30 = d3_svg_arcCornerTangents(x3 == null ? [ x2, y2 ] : [ x3, y3 ], [ x0, y0 ], r1, rc1, cw), t12 = d3_svg_arcCornerTangents([ x1, y1 ], [ x2, y2 ], r1, rc1, cw);\n          if (rc === rc1) {\n            path.push(\"M\", t30[0], \"A\", rc1, \",\", rc1, \" 0 0,\", cr, \" \", t30[1], \"A\", r1, \",\", r1, \" 0 \", 1 - cw ^ d3_svg_arcSweep(t30[1][0], t30[1][1], t12[1][0], t12[1][1]), \",\", cw, \" \", t12[1], \"A\", rc1, \",\", rc1, \" 0 0,\", cr, \" \", t12[0]);\n          } else {\n            path.push(\"M\", t30[0], \"A\", rc1, \",\", rc1, \" 0 1,\", cr, \" \", t12[0]);\n          }\n        } else {\n          path.push(\"M\", x0, \",\", y0);\n        }\n        if (x3 != null) {\n          var t03 = d3_svg_arcCornerTangents([ x0, y0 ], [ x3, y3 ], r0, -rc0, cw), t21 = d3_svg_arcCornerTangents([ x2, y2 ], x1 == null ? [ x0, y0 ] : [ x1, y1 ], r0, -rc0, cw);\n          if (rc === rc0) {\n            path.push(\"L\", t21[0], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t21[1], \"A\", r0, \",\", r0, \" 0 \", cw ^ d3_svg_arcSweep(t21[1][0], t21[1][1], t03[1][0], t03[1][1]), \",\", 1 - cw, \" \", t03[1], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t03[0]);\n          } else {\n            path.push(\"L\", t21[0], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t03[0]);\n          }\n        } else {\n          path.push(\"L\", x2, \",\", y2);\n        }\n      } else {\n        path.push(\"M\", x0, \",\", y0);\n        if (x1 != null) path.push(\"A\", r1, \",\", r1, \" 0 \", l1, \",\", cw, \" \", x1, \",\", y1);\n        path.push(\"L\", x2, \",\", y2);\n        if (x3 != null) path.push(\"A\", r0, \",\", r0, \" 0 \", l0, \",\", 1 - cw, \" \", x3, \",\", y3);\n      }\n      path.push(\"Z\");\n      return path.join(\"\");\n    }\n    function circleSegment(r1, cw) {\n      return \"M0,\" + r1 + \"A\" + r1 + \",\" + r1 + \" 0 1,\" + cw + \" 0,\" + -r1 + \"A\" + r1 + \",\" + r1 + \" 0 1,\" + cw + \" 0,\" + r1;\n    }\n    arc.innerRadius = function(v) {\n      if (!arguments.length) return innerRadius;\n      innerRadius = d3_functor(v);\n      return arc;\n    };\n    arc.outerRadius = function(v) {\n      if (!arguments.length) return outerRadius;\n      outerRadius = d3_functor(v);\n      return arc;\n    };\n    arc.cornerRadius = function(v) {\n      if (!arguments.length) return cornerRadius;\n      cornerRadius = d3_functor(v);\n      return arc;\n    };\n    arc.padRadius = function(v) {\n      if (!arguments.length) return padRadius;\n      padRadius = v == d3_svg_arcAuto ? d3_svg_arcAuto : d3_functor(v);\n      return arc;\n    };\n    arc.startAngle = function(v) {\n      if (!arguments.length) return startAngle;\n      startAngle = d3_functor(v);\n      return arc;\n    };\n    arc.endAngle = function(v) {\n      if (!arguments.length) return endAngle;\n      endAngle = d3_functor(v);\n      return arc;\n    };\n    arc.padAngle = function(v) {\n      if (!arguments.length) return padAngle;\n      padAngle = d3_functor(v);\n      return arc;\n    };\n    arc.centroid = function() {\n      var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - halfπ;\n      return [ Math.cos(a) * r, Math.sin(a) * r ];\n    };\n    return arc;\n  };\n  var d3_svg_arcAuto = \"auto\";\n  function d3_svg_arcInnerRadius(d) {\n    return d.innerRadius;\n  }\n  function d3_svg_arcOuterRadius(d) {\n    return d.outerRadius;\n  }\n  function d3_svg_arcStartAngle(d) {\n    return d.startAngle;\n  }\n  function d3_svg_arcEndAngle(d) {\n    return d.endAngle;\n  }\n  function d3_svg_arcPadAngle(d) {\n    return d && d.padAngle;\n  }\n  function d3_svg_arcSweep(x0, y0, x1, y1) {\n    return (x0 - x1) * y0 - (y0 - y1) * x0 > 0 ? 0 : 1;\n  }\n  function d3_svg_arcCornerTangents(p0, p1, r1, rc, cw) {\n    var x01 = p0[0] - p1[0], y01 = p0[1] - p1[1], lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x1 = p0[0] + ox, y1 = p0[1] + oy, x2 = p1[0] + ox, y2 = p1[1] + oy, x3 = (x1 + x2) / 2, y3 = (y1 + y2) / 2, dx = x2 - x1, dy = y2 - y1, d2 = dx * dx + dy * dy, r = r1 - rc, D = x1 * y2 - x2 * y1, d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x3, dy0 = cy0 - y3, dx1 = cx1 - x3, dy1 = cy1 - y3;\n    if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n    return [ [ cx0 - ox, cy0 - oy ], [ cx0 * r1 / r, cy0 * r1 / r ] ];\n  }\n  function d3_svg_line(projection) {\n    var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;\n    function line(data) {\n      var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);\n      function segment() {\n        segments.push(\"M\", interpolate(projection(points), tension));\n      }\n      while (++i < n) {\n        if (defined.call(this, d = data[i], i)) {\n          points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);\n        } else if (points.length) {\n          segment();\n          points = [];\n        }\n      }\n      if (points.length) segment();\n      return segments.length ? segments.join(\"\") : null;\n    }\n    line.x = function(_) {\n      if (!arguments.length) return x;\n      x = _;\n      return line;\n    };\n    line.y = function(_) {\n      if (!arguments.length) return y;\n      y = _;\n      return line;\n    };\n    line.defined = function(_) {\n      if (!arguments.length) return defined;\n      defined = _;\n      return line;\n    };\n    line.interpolate = function(_) {\n      if (!arguments.length) return interpolateKey;\n      if (typeof _ === \"function\") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;\n      return line;\n    };\n    line.tension = function(_) {\n      if (!arguments.length) return tension;\n      tension = _;\n      return line;\n    };\n    return line;\n  }\n  d3.svg.line = function() {\n    return d3_svg_line(d3_identity);\n  };\n  var d3_svg_lineInterpolators = d3.map({\n    linear: d3_svg_lineLinear,\n    \"linear-closed\": d3_svg_lineLinearClosed,\n    step: d3_svg_lineStep,\n    \"step-before\": d3_svg_lineStepBefore,\n    \"step-after\": d3_svg_lineStepAfter,\n    basis: d3_svg_lineBasis,\n    \"basis-open\": d3_svg_lineBasisOpen,\n    \"basis-closed\": d3_svg_lineBasisClosed,\n    bundle: d3_svg_lineBundle,\n    cardinal: d3_svg_lineCardinal,\n    \"cardinal-open\": d3_svg_lineCardinalOpen,\n    \"cardinal-closed\": d3_svg_lineCardinalClosed,\n    monotone: d3_svg_lineMonotone\n  });\n  d3_svg_lineInterpolators.forEach(function(key, value) {\n    value.key = key;\n    value.closed = /-closed$/.test(key);\n  });\n  function d3_svg_lineLinear(points) {\n    return points.length > 1 ? points.join(\"L\") : points + \"Z\";\n  }\n  function d3_svg_lineLinearClosed(points) {\n    return points.join(\"L\") + \"Z\";\n  }\n  function d3_svg_lineStep(points) {\n    var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n    while (++i < n) path.push(\"H\", (p[0] + (p = points[i])[0]) / 2, \"V\", p[1]);\n    if (n > 1) path.push(\"H\", p[0]);\n    return path.join(\"\");\n  }\n  function d3_svg_lineStepBefore(points) {\n    var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n    while (++i < n) path.push(\"V\", (p = points[i])[1], \"H\", p[0]);\n    return path.join(\"\");\n  }\n  function d3_svg_lineStepAfter(points) {\n    var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n    while (++i < n) path.push(\"H\", (p = points[i])[0], \"V\", p[1]);\n    return path.join(\"\");\n  }\n  function d3_svg_lineCardinalOpen(points, tension) {\n    return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, -1), d3_svg_lineCardinalTangents(points, tension));\n  }\n  function d3_svg_lineCardinalClosed(points, tension) {\n    return points.length < 3 ? d3_svg_lineLinearClosed(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), \n    points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));\n  }\n  function d3_svg_lineCardinal(points, tension) {\n    return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));\n  }\n  function d3_svg_lineHermite(points, tangents) {\n    if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {\n      return d3_svg_lineLinear(points);\n    }\n    var quad = points.length != tangents.length, path = \"\", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;\n    if (quad) {\n      path += \"Q\" + (p[0] - t0[0] * 2 / 3) + \",\" + (p[1] - t0[1] * 2 / 3) + \",\" + p[0] + \",\" + p[1];\n      p0 = points[1];\n      pi = 2;\n    }\n    if (tangents.length > 1) {\n      t = tangents[1];\n      p = points[pi];\n      pi++;\n      path += \"C\" + (p0[0] + t0[0]) + \",\" + (p0[1] + t0[1]) + \",\" + (p[0] - t[0]) + \",\" + (p[1] - t[1]) + \",\" + p[0] + \",\" + p[1];\n      for (var i = 2; i < tangents.length; i++, pi++) {\n        p = points[pi];\n        t = tangents[i];\n        path += \"S\" + (p[0] - t[0]) + \",\" + (p[1] - t[1]) + \",\" + p[0] + \",\" + p[1];\n      }\n    }\n    if (quad) {\n      var lp = points[pi];\n      path += \"Q\" + (p[0] + t[0] * 2 / 3) + \",\" + (p[1] + t[1] * 2 / 3) + \",\" + lp[0] + \",\" + lp[1];\n    }\n    return path;\n  }\n  function d3_svg_lineCardinalTangents(points, tension) {\n    var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;\n    while (++i < n) {\n      p0 = p1;\n      p1 = p2;\n      p2 = points[i];\n      tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);\n    }\n    return tangents;\n  }\n  function d3_svg_lineBasis(points) {\n    if (points.length < 3) return d3_svg_lineLinear(points);\n    var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, \",\", y0, \"L\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];\n    points.push(points[n - 1]);\n    while (++i <= n) {\n      pi = points[i];\n      px.shift();\n      px.push(pi[0]);\n      py.shift();\n      py.push(pi[1]);\n      d3_svg_lineBasisBezier(path, px, py);\n    }\n    points.pop();\n    path.push(\"L\", pi);\n    return path.join(\"\");\n  }\n  function d3_svg_lineBasisOpen(points) {\n    if (points.length < 4) return d3_svg_lineLinear(points);\n    var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];\n    while (++i < 3) {\n      pi = points[i];\n      px.push(pi[0]);\n      py.push(pi[1]);\n    }\n    path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + \",\" + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));\n    --i;\n    while (++i < n) {\n      pi = points[i];\n      px.shift();\n      px.push(pi[0]);\n      py.shift();\n      py.push(pi[1]);\n      d3_svg_lineBasisBezier(path, px, py);\n    }\n    return path.join(\"\");\n  }\n  function d3_svg_lineBasisClosed(points) {\n    var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];\n    while (++i < 4) {\n      pi = points[i % n];\n      px.push(pi[0]);\n      py.push(pi[1]);\n    }\n    path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];\n    --i;\n    while (++i < m) {\n      pi = points[i % n];\n      px.shift();\n      px.push(pi[0]);\n      py.shift();\n      py.push(pi[1]);\n      d3_svg_lineBasisBezier(path, px, py);\n    }\n    return path.join(\"\");\n  }\n  function d3_svg_lineBundle(points, tension) {\n    var n = points.length - 1;\n    if (n) {\n      var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;\n      while (++i <= n) {\n        p = points[i];\n        t = i / n;\n        p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);\n        p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);\n      }\n    }\n    return d3_svg_lineBasis(points);\n  }\n  function d3_svg_lineDot4(a, b) {\n    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n  }\n  var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];\n  function d3_svg_lineBasisBezier(path, x, y) {\n    path.push(\"C\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));\n  }\n  function d3_svg_lineSlope(p0, p1) {\n    return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n  }\n  function d3_svg_lineFiniteDifferences(points) {\n    var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);\n    while (++i < j) {\n      m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;\n    }\n    m[i] = d;\n    return m;\n  }\n  function d3_svg_lineMonotoneTangents(points) {\n    var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;\n    while (++i < j) {\n      d = d3_svg_lineSlope(points[i], points[i + 1]);\n      if (abs(d) < ε) {\n        m[i] = m[i + 1] = 0;\n      } else {\n        a = m[i] / d;\n        b = m[i + 1] / d;\n        s = a * a + b * b;\n        if (s > 9) {\n          s = d * 3 / Math.sqrt(s);\n          m[i] = s * a;\n          m[i + 1] = s * b;\n        }\n      }\n    }\n    i = -1;\n    while (++i <= j) {\n      s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));\n      tangents.push([ s || 0, m[i] * s || 0 ]);\n    }\n    return tangents;\n  }\n  function d3_svg_lineMonotone(points) {\n    return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));\n  }\n  d3.svg.line.radial = function() {\n    var line = d3_svg_line(d3_svg_lineRadial);\n    line.radius = line.x, delete line.x;\n    line.angle = line.y, delete line.y;\n    return line;\n  };\n  function d3_svg_lineRadial(points) {\n    var point, i = -1, n = points.length, r, a;\n    while (++i < n) {\n      point = points[i];\n      r = point[0];\n      a = point[1] - halfπ;\n      point[0] = r * Math.cos(a);\n      point[1] = r * Math.sin(a);\n    }\n    return points;\n  }\n  function d3_svg_area(projection) {\n    var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = \"L\", tension = .7;\n    function area(data) {\n      var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {\n        return x;\n      } : d3_functor(x1), fy1 = y0 === y1 ? function() {\n        return y;\n      } : d3_functor(y1), x, y;\n      function segment() {\n        segments.push(\"M\", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), \"Z\");\n      }\n      while (++i < n) {\n        if (defined.call(this, d = data[i], i)) {\n          points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);\n          points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);\n        } else if (points0.length) {\n          segment();\n          points0 = [];\n          points1 = [];\n        }\n      }\n      if (points0.length) segment();\n      return segments.length ? segments.join(\"\") : null;\n    }\n    area.x = function(_) {\n      if (!arguments.length) return x1;\n      x0 = x1 = _;\n      return area;\n    };\n    area.x0 = function(_) {\n      if (!arguments.length) return x0;\n      x0 = _;\n      return area;\n    };\n    area.x1 = function(_) {\n      if (!arguments.length) return x1;\n      x1 = _;\n      return area;\n    };\n    area.y = function(_) {\n      if (!arguments.length) return y1;\n      y0 = y1 = _;\n      return area;\n    };\n    area.y0 = function(_) {\n      if (!arguments.length) return y0;\n      y0 = _;\n      return area;\n    };\n    area.y1 = function(_) {\n      if (!arguments.length) return y1;\n      y1 = _;\n      return area;\n    };\n    area.defined = function(_) {\n      if (!arguments.length) return defined;\n      defined = _;\n      return area;\n    };\n    area.interpolate = function(_) {\n      if (!arguments.length) return interpolateKey;\n      if (typeof _ === \"function\") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;\n      interpolateReverse = interpolate.reverse || interpolate;\n      L = interpolate.closed ? \"M\" : \"L\";\n      return area;\n    };\n    area.tension = function(_) {\n      if (!arguments.length) return tension;\n      tension = _;\n      return area;\n    };\n    return area;\n  }\n  d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;\n  d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;\n  d3.svg.area = function() {\n    return d3_svg_area(d3_identity);\n  };\n  d3.svg.area.radial = function() {\n    var area = d3_svg_area(d3_svg_lineRadial);\n    area.radius = area.x, delete area.x;\n    area.innerRadius = area.x0, delete area.x0;\n    area.outerRadius = area.x1, delete area.x1;\n    area.angle = area.y, delete area.y;\n    area.startAngle = area.y0, delete area.y0;\n    area.endAngle = area.y1, delete area.y1;\n    return area;\n  };\n  d3.svg.chord = function() {\n    var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;\n    function chord(d, i) {\n      var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);\n      return \"M\" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + \"Z\";\n    }\n    function subgroup(self, f, d, i) {\n      var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) - halfπ, a1 = endAngle.call(self, subgroup, i) - halfπ;\n      return {\n        r: r,\n        a0: a0,\n        a1: a1,\n        p0: [ r * Math.cos(a0), r * Math.sin(a0) ],\n        p1: [ r * Math.cos(a1), r * Math.sin(a1) ]\n      };\n    }\n    function equals(a, b) {\n      return a.a0 == b.a0 && a.a1 == b.a1;\n    }\n    function arc(r, p, a) {\n      return \"A\" + r + \",\" + r + \" 0 \" + +(a > π) + \",1 \" + p;\n    }\n    function curve(r0, p0, r1, p1) {\n      return \"Q 0,0 \" + p1;\n    }\n    chord.radius = function(v) {\n      if (!arguments.length) return radius;\n      radius = d3_functor(v);\n      return chord;\n    };\n    chord.source = function(v) {\n      if (!arguments.length) return source;\n      source = d3_functor(v);\n      return chord;\n    };\n    chord.target = function(v) {\n      if (!arguments.length) return target;\n      target = d3_functor(v);\n      return chord;\n    };\n    chord.startAngle = function(v) {\n      if (!arguments.length) return startAngle;\n      startAngle = d3_functor(v);\n      return chord;\n    };\n    chord.endAngle = function(v) {\n      if (!arguments.length) return endAngle;\n      endAngle = d3_functor(v);\n      return chord;\n    };\n    return chord;\n  };\n  function d3_svg_chordRadius(d) {\n    return d.radius;\n  }\n  d3.svg.diagonal = function() {\n    var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;\n    function diagonal(d, i) {\n      var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {\n        x: p0.x,\n        y: m\n      }, {\n        x: p3.x,\n        y: m\n      }, p3 ];\n      p = p.map(projection);\n      return \"M\" + p[0] + \"C\" + p[1] + \" \" + p[2] + \" \" + p[3];\n    }\n    diagonal.source = function(x) {\n      if (!arguments.length) return source;\n      source = d3_functor(x);\n      return diagonal;\n    };\n    diagonal.target = function(x) {\n      if (!arguments.length) return target;\n      target = d3_functor(x);\n      return diagonal;\n    };\n    diagonal.projection = function(x) {\n      if (!arguments.length) return projection;\n      projection = x;\n      return diagonal;\n    };\n    return diagonal;\n  };\n  function d3_svg_diagonalProjection(d) {\n    return [ d.x, d.y ];\n  }\n  d3.svg.diagonal.radial = function() {\n    var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;\n    diagonal.projection = function(x) {\n      return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;\n    };\n    return diagonal;\n  };\n  function d3_svg_diagonalRadialProjection(projection) {\n    return function() {\n      var d = projection.apply(this, arguments), r = d[0], a = d[1] - halfπ;\n      return [ r * Math.cos(a), r * Math.sin(a) ];\n    };\n  }\n  d3.svg.symbol = function() {\n    var type = d3_svg_symbolType, size = d3_svg_symbolSize;\n    function symbol(d, i) {\n      return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));\n    }\n    symbol.type = function(x) {\n      if (!arguments.length) return type;\n      type = d3_functor(x);\n      return symbol;\n    };\n    symbol.size = function(x) {\n      if (!arguments.length) return size;\n      size = d3_functor(x);\n      return symbol;\n    };\n    return symbol;\n  };\n  function d3_svg_symbolSize() {\n    return 64;\n  }\n  function d3_svg_symbolType() {\n    return \"circle\";\n  }\n  function d3_svg_symbolCircle(size) {\n    var r = Math.sqrt(size / π);\n    return \"M0,\" + r + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + -r + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + r + \"Z\";\n  }\n  var d3_svg_symbols = d3.map({\n    circle: d3_svg_symbolCircle,\n    cross: function(size) {\n      var r = Math.sqrt(size / 5) / 2;\n      return \"M\" + -3 * r + \",\" + -r + \"H\" + -r + \"V\" + -3 * r + \"H\" + r + \"V\" + -r + \"H\" + 3 * r + \"V\" + r + \"H\" + r + \"V\" + 3 * r + \"H\" + -r + \"V\" + r + \"H\" + -3 * r + \"Z\";\n    },\n    diamond: function(size) {\n      var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;\n      return \"M0,\" + -ry + \"L\" + rx + \",0\" + \" 0,\" + ry + \" \" + -rx + \",0\" + \"Z\";\n    },\n    square: function(size) {\n      var r = Math.sqrt(size) / 2;\n      return \"M\" + -r + \",\" + -r + \"L\" + r + \",\" + -r + \" \" + r + \",\" + r + \" \" + -r + \",\" + r + \"Z\";\n    },\n    \"triangle-down\": function(size) {\n      var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;\n      return \"M0,\" + ry + \"L\" + rx + \",\" + -ry + \" \" + -rx + \",\" + -ry + \"Z\";\n    },\n    \"triangle-up\": function(size) {\n      var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;\n      return \"M0,\" + -ry + \"L\" + rx + \",\" + ry + \" \" + -rx + \",\" + ry + \"Z\";\n    }\n  });\n  d3.svg.symbolTypes = d3_svg_symbols.keys();\n  var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians);\n  d3_selectionPrototype.transition = function(name) {\n    var id = d3_transitionInheritId || ++d3_transitionId, ns = d3_transitionNamespace(name), subgroups = [], subgroup, node, transition = d3_transitionInherit || {\n      time: Date.now(),\n      ease: d3_ease_cubicInOut,\n      delay: 0,\n      duration: 250\n    };\n    for (var j = -1, m = this.length; ++j < m; ) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) d3_transitionNode(node, i, ns, id, transition);\n        subgroup.push(node);\n      }\n    }\n    return d3_transition(subgroups, ns, id);\n  };\n  d3_selectionPrototype.interrupt = function(name) {\n    return this.each(name == null ? d3_selection_interrupt : d3_selection_interruptNS(d3_transitionNamespace(name)));\n  };\n  var d3_selection_interrupt = d3_selection_interruptNS(d3_transitionNamespace());\n  function d3_selection_interruptNS(ns) {\n    return function() {\n      var lock, activeId, active;\n      if ((lock = this[ns]) && (active = lock[activeId = lock.active])) {\n        active.timer.c = null;\n        active.timer.t = NaN;\n        if (--lock.count) delete lock[activeId]; else delete this[ns];\n        lock.active += .5;\n        active.event && active.event.interrupt.call(this, this.__data__, active.index);\n      }\n    };\n  }\n  function d3_transition(groups, ns, id) {\n    d3_subclass(groups, d3_transitionPrototype);\n    groups.namespace = ns;\n    groups.id = id;\n    return groups;\n  }\n  var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit;\n  d3_transitionPrototype.call = d3_selectionPrototype.call;\n  d3_transitionPrototype.empty = d3_selectionPrototype.empty;\n  d3_transitionPrototype.node = d3_selectionPrototype.node;\n  d3_transitionPrototype.size = d3_selectionPrototype.size;\n  d3.transition = function(selection, name) {\n    return selection && selection.transition ? d3_transitionInheritId ? selection.transition(name) : selection : d3.selection().transition(selection);\n  };\n  d3.transition.prototype = d3_transitionPrototype;\n  d3_transitionPrototype.select = function(selector) {\n    var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnode, node;\n    selector = d3_selection_selector(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) {\n          if (\"__data__\" in node) subnode.__data__ = node.__data__;\n          d3_transitionNode(subnode, i, ns, id, node[ns][id]);\n          subgroup.push(subnode);\n        } else {\n          subgroup.push(null);\n        }\n      }\n    }\n    return d3_transition(subgroups, ns, id);\n  };\n  d3_transitionPrototype.selectAll = function(selector) {\n    var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnodes, node, subnode, transition;\n    selector = d3_selection_selectorAll(selector);\n    for (var j = -1, m = this.length; ++j < m; ) {\n      for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n        if (node = group[i]) {\n          transition = node[ns][id];\n          subnodes = selector.call(node, node.__data__, i, j);\n          subgroups.push(subgroup = []);\n          for (var k = -1, o = subnodes.length; ++k < o; ) {\n            if (subnode = subnodes[k]) d3_transitionNode(subnode, k, ns, id, transition);\n            subgroup.push(subnode);\n          }\n        }\n      }\n    }\n    return d3_transition(subgroups, ns, id);\n  };\n  d3_transitionPrototype.filter = function(filter) {\n    var subgroups = [], subgroup, group, node;\n    if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n    for (var j = 0, m = this.length; j < m; j++) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n        if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {\n          subgroup.push(node);\n        }\n      }\n    }\n    return d3_transition(subgroups, this.namespace, this.id);\n  };\n  d3_transitionPrototype.tween = function(name, tween) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 2) return this.node()[ns][id].tween.get(name);\n    return d3_selection_each(this, tween == null ? function(node) {\n      node[ns][id].tween.remove(name);\n    } : function(node) {\n      node[ns][id].tween.set(name, tween);\n    });\n  };\n  function d3_transition_tween(groups, name, value, tween) {\n    var id = groups.id, ns = groups.namespace;\n    return d3_selection_each(groups, typeof value === \"function\" ? function(node, i, j) {\n      node[ns][id].tween.set(name, tween(value.call(node, node.__data__, i, j)));\n    } : (value = tween(value), function(node) {\n      node[ns][id].tween.set(name, value);\n    }));\n  }\n  d3_transitionPrototype.attr = function(nameNS, value) {\n    if (arguments.length < 2) {\n      for (value in nameNS) this.attr(value, nameNS[value]);\n      return this;\n    }\n    var interpolate = nameNS == \"transform\" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS);\n    function attrNull() {\n      this.removeAttribute(name);\n    }\n    function attrNullNS() {\n      this.removeAttributeNS(name.space, name.local);\n    }\n    function attrTween(b) {\n      return b == null ? attrNull : (b += \"\", function() {\n        var a = this.getAttribute(name), i;\n        return a !== b && (i = interpolate(a, b), function(t) {\n          this.setAttribute(name, i(t));\n        });\n      });\n    }\n    function attrTweenNS(b) {\n      return b == null ? attrNullNS : (b += \"\", function() {\n        var a = this.getAttributeNS(name.space, name.local), i;\n        return a !== b && (i = interpolate(a, b), function(t) {\n          this.setAttributeNS(name.space, name.local, i(t));\n        });\n      });\n    }\n    return d3_transition_tween(this, \"attr.\" + nameNS, value, name.local ? attrTweenNS : attrTween);\n  };\n  d3_transitionPrototype.attrTween = function(nameNS, tween) {\n    var name = d3.ns.qualify(nameNS);\n    function attrTween(d, i) {\n      var f = tween.call(this, d, i, this.getAttribute(name));\n      return f && function(t) {\n        this.setAttribute(name, f(t));\n      };\n    }\n    function attrTweenNS(d, i) {\n      var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));\n      return f && function(t) {\n        this.setAttributeNS(name.space, name.local, f(t));\n      };\n    }\n    return this.tween(\"attr.\" + nameNS, name.local ? attrTweenNS : attrTween);\n  };\n  d3_transitionPrototype.style = function(name, value, priority) {\n    var n = arguments.length;\n    if (n < 3) {\n      if (typeof name !== \"string\") {\n        if (n < 2) value = \"\";\n        for (priority in name) this.style(priority, name[priority], value);\n        return this;\n      }\n      priority = \"\";\n    }\n    function styleNull() {\n      this.style.removeProperty(name);\n    }\n    function styleString(b) {\n      return b == null ? styleNull : (b += \"\", function() {\n        var a = d3_window(this).getComputedStyle(this, null).getPropertyValue(name), i;\n        return a !== b && (i = d3_interpolate(a, b), function(t) {\n          this.style.setProperty(name, i(t), priority);\n        });\n      });\n    }\n    return d3_transition_tween(this, \"style.\" + name, value, styleString);\n  };\n  d3_transitionPrototype.styleTween = function(name, tween, priority) {\n    if (arguments.length < 3) priority = \"\";\n    function styleTween(d, i) {\n      var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name));\n      return f && function(t) {\n        this.style.setProperty(name, f(t), priority);\n      };\n    }\n    return this.tween(\"style.\" + name, styleTween);\n  };\n  d3_transitionPrototype.text = function(value) {\n    return d3_transition_tween(this, \"text\", value, d3_transition_text);\n  };\n  function d3_transition_text(b) {\n    if (b == null) b = \"\";\n    return function() {\n      this.textContent = b;\n    };\n  }\n  d3_transitionPrototype.remove = function() {\n    var ns = this.namespace;\n    return this.each(\"end.transition\", function() {\n      var p;\n      if (this[ns].count < 2 && (p = this.parentNode)) p.removeChild(this);\n    });\n  };\n  d3_transitionPrototype.ease = function(value) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 1) return this.node()[ns][id].ease;\n    if (typeof value !== \"function\") value = d3.ease.apply(d3, arguments);\n    return d3_selection_each(this, function(node) {\n      node[ns][id].ease = value;\n    });\n  };\n  d3_transitionPrototype.delay = function(value) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 1) return this.node()[ns][id].delay;\n    return d3_selection_each(this, typeof value === \"function\" ? function(node, i, j) {\n      node[ns][id].delay = +value.call(node, node.__data__, i, j);\n    } : (value = +value, function(node) {\n      node[ns][id].delay = value;\n    }));\n  };\n  d3_transitionPrototype.duration = function(value) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 1) return this.node()[ns][id].duration;\n    return d3_selection_each(this, typeof value === \"function\" ? function(node, i, j) {\n      node[ns][id].duration = Math.max(1, value.call(node, node.__data__, i, j));\n    } : (value = Math.max(1, value), function(node) {\n      node[ns][id].duration = value;\n    }));\n  };\n  d3_transitionPrototype.each = function(type, listener) {\n    var id = this.id, ns = this.namespace;\n    if (arguments.length < 2) {\n      var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId;\n      try {\n        d3_transitionInheritId = id;\n        d3_selection_each(this, function(node, i, j) {\n          d3_transitionInherit = node[ns][id];\n          type.call(node, node.__data__, i, j);\n        });\n      } finally {\n        d3_transitionInherit = inherit;\n        d3_transitionInheritId = inheritId;\n      }\n    } else {\n      d3_selection_each(this, function(node) {\n        var transition = node[ns][id];\n        (transition.event || (transition.event = d3.dispatch(\"start\", \"end\", \"interrupt\"))).on(type, listener);\n      });\n    }\n    return this;\n  };\n  d3_transitionPrototype.transition = function() {\n    var id0 = this.id, id1 = ++d3_transitionId, ns = this.namespace, subgroups = [], subgroup, group, node, transition;\n    for (var j = 0, m = this.length; j < m; j++) {\n      subgroups.push(subgroup = []);\n      for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n        if (node = group[i]) {\n          transition = node[ns][id0];\n          d3_transitionNode(node, i, ns, id1, {\n            time: transition.time,\n            ease: transition.ease,\n            delay: transition.delay + transition.duration,\n            duration: transition.duration\n          });\n        }\n        subgroup.push(node);\n      }\n    }\n    return d3_transition(subgroups, ns, id1);\n  };\n  function d3_transitionNamespace(name) {\n    return name == null ? \"__transition__\" : \"__transition_\" + name + \"__\";\n  }\n  function d3_transitionNode(node, i, ns, id, inherit) {\n    var lock = node[ns] || (node[ns] = {\n      active: 0,\n      count: 0\n    }), transition = lock[id], time, timer, duration, ease, tweens;\n    function schedule(elapsed) {\n      var delay = transition.delay;\n      timer.t = delay + time;\n      if (delay <= elapsed) return start(elapsed - delay);\n      timer.c = start;\n    }\n    function start(elapsed) {\n      var activeId = lock.active, active = lock[activeId];\n      if (active) {\n        active.timer.c = null;\n        active.timer.t = NaN;\n        --lock.count;\n        delete lock[activeId];\n        active.event && active.event.interrupt.call(node, node.__data__, active.index);\n      }\n      for (var cancelId in lock) {\n        if (+cancelId < id) {\n          var cancel = lock[cancelId];\n          cancel.timer.c = null;\n          cancel.timer.t = NaN;\n          --lock.count;\n          delete lock[cancelId];\n        }\n      }\n      timer.c = tick;\n      d3_timer(function() {\n        if (timer.c && tick(elapsed || 1)) {\n          timer.c = null;\n          timer.t = NaN;\n        }\n        return 1;\n      }, 0, time);\n      lock.active = id;\n      transition.event && transition.event.start.call(node, node.__data__, i);\n      tweens = [];\n      transition.tween.forEach(function(key, value) {\n        if (value = value.call(node, node.__data__, i)) {\n          tweens.push(value);\n        }\n      });\n      ease = transition.ease;\n      duration = transition.duration;\n    }\n    function tick(elapsed) {\n      var t = elapsed / duration, e = ease(t), n = tweens.length;\n      while (n > 0) {\n        tweens[--n].call(node, e);\n      }\n      if (t >= 1) {\n        transition.event && transition.event.end.call(node, node.__data__, i);\n        if (--lock.count) delete lock[id]; else delete node[ns];\n        return 1;\n      }\n    }\n    if (!transition) {\n      time = inherit.time;\n      timer = d3_timer(schedule, 0, time);\n      transition = lock[id] = {\n        tween: new d3_Map(),\n        time: time,\n        timer: timer,\n        delay: inherit.delay,\n        duration: inherit.duration,\n        ease: inherit.ease,\n        index: i\n      };\n      inherit = null;\n      ++lock.count;\n    }\n  }\n  d3.svg.axis = function() {\n    var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;\n    function axis(g) {\n      g.each(function() {\n        var g = d3.select(this);\n        var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy();\n        var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(\".tick\").data(ticks, scale1), tickEnter = tick.enter().insert(\"g\", \".domain\").attr(\"class\", \"tick\").style(\"opacity\", ε), tickExit = d3.transition(tick.exit()).style(\"opacity\", ε).remove(), tickUpdate = d3.transition(tick.order()).style(\"opacity\", 1), tickSpacing = Math.max(innerTickSize, 0) + tickPadding, tickTransform;\n        var range = d3_scaleRange(scale1), path = g.selectAll(\".domain\").data([ 0 ]), pathUpdate = (path.enter().append(\"path\").attr(\"class\", \"domain\"), \n        d3.transition(path));\n        tickEnter.append(\"line\");\n        tickEnter.append(\"text\");\n        var lineEnter = tickEnter.select(\"line\"), lineUpdate = tickUpdate.select(\"line\"), text = tick.select(\"text\").text(tickFormat), textEnter = tickEnter.select(\"text\"), textUpdate = tickUpdate.select(\"text\"), sign = orient === \"top\" || orient === \"left\" ? -1 : 1, x1, x2, y1, y2;\n        if (orient === \"bottom\" || orient === \"top\") {\n          tickTransform = d3_svg_axisX, x1 = \"x\", y1 = \"y\", x2 = \"x2\", y2 = \"y2\";\n          text.attr(\"dy\", sign < 0 ? \"0em\" : \".71em\").style(\"text-anchor\", \"middle\");\n          pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + sign * outerTickSize + \"V0H\" + range[1] + \"V\" + sign * outerTickSize);\n        } else {\n          tickTransform = d3_svg_axisY, x1 = \"y\", y1 = \"x\", x2 = \"y2\", y2 = \"x2\";\n          text.attr(\"dy\", \".32em\").style(\"text-anchor\", sign < 0 ? \"end\" : \"start\");\n          pathUpdate.attr(\"d\", \"M\" + sign * outerTickSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + sign * outerTickSize);\n        }\n        lineEnter.attr(y2, sign * innerTickSize);\n        textEnter.attr(y1, sign * tickSpacing);\n        lineUpdate.attr(x2, 0).attr(y2, sign * innerTickSize);\n        textUpdate.attr(x1, 0).attr(y1, sign * tickSpacing);\n        if (scale1.rangeBand) {\n          var x = scale1, dx = x.rangeBand() / 2;\n          scale0 = scale1 = function(d) {\n            return x(d) + dx;\n          };\n        } else if (scale0.rangeBand) {\n          scale0 = scale1;\n        } else {\n          tickExit.call(tickTransform, scale1, scale0);\n        }\n        tickEnter.call(tickTransform, scale0, scale1);\n        tickUpdate.call(tickTransform, scale1, scale1);\n      });\n    }\n    axis.scale = function(x) {\n      if (!arguments.length) return scale;\n      scale = x;\n      return axis;\n    };\n    axis.orient = function(x) {\n      if (!arguments.length) return orient;\n      orient = x in d3_svg_axisOrients ? x + \"\" : d3_svg_axisDefaultOrient;\n      return axis;\n    };\n    axis.ticks = function() {\n      if (!arguments.length) return tickArguments_;\n      tickArguments_ = d3_array(arguments);\n      return axis;\n    };\n    axis.tickValues = function(x) {\n      if (!arguments.length) return tickValues;\n      tickValues = x;\n      return axis;\n    };\n    axis.tickFormat = function(x) {\n      if (!arguments.length) return tickFormat_;\n      tickFormat_ = x;\n      return axis;\n    };\n    axis.tickSize = function(x) {\n      var n = arguments.length;\n      if (!n) return innerTickSize;\n      innerTickSize = +x;\n      outerTickSize = +arguments[n - 1];\n      return axis;\n    };\n    axis.innerTickSize = function(x) {\n      if (!arguments.length) return innerTickSize;\n      innerTickSize = +x;\n      return axis;\n    };\n    axis.outerTickSize = function(x) {\n      if (!arguments.length) return outerTickSize;\n      outerTickSize = +x;\n      return axis;\n    };\n    axis.tickPadding = function(x) {\n      if (!arguments.length) return tickPadding;\n      tickPadding = +x;\n      return axis;\n    };\n    axis.tickSubdivide = function() {\n      return arguments.length && axis;\n    };\n    return axis;\n  };\n  var d3_svg_axisDefaultOrient = \"bottom\", d3_svg_axisOrients = {\n    top: 1,\n    right: 1,\n    bottom: 1,\n    left: 1\n  };\n  function d3_svg_axisX(selection, x0, x1) {\n    selection.attr(\"transform\", function(d) {\n      var v0 = x0(d);\n      return \"translate(\" + (isFinite(v0) ? v0 : x1(d)) + \",0)\";\n    });\n  }\n  function d3_svg_axisY(selection, y0, y1) {\n    selection.attr(\"transform\", function(d) {\n      var v0 = y0(d);\n      return \"translate(0,\" + (isFinite(v0) ? v0 : y1(d)) + \")\";\n    });\n  }\n  d3.svg.brush = function() {\n    var event = d3_eventDispatch(brush, \"brushstart\", \"brush\", \"brushend\"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0];\n    function brush(g) {\n      g.each(function() {\n        var g = d3.select(this).style(\"pointer-events\", \"all\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\").on(\"mousedown.brush\", brushstart).on(\"touchstart.brush\", brushstart);\n        var background = g.selectAll(\".background\").data([ 0 ]);\n        background.enter().append(\"rect\").attr(\"class\", \"background\").style(\"visibility\", \"hidden\").style(\"cursor\", \"crosshair\");\n        g.selectAll(\".extent\").data([ 0 ]).enter().append(\"rect\").attr(\"class\", \"extent\").style(\"cursor\", \"move\");\n        var resize = g.selectAll(\".resize\").data(resizes, d3_identity);\n        resize.exit().remove();\n        resize.enter().append(\"g\").attr(\"class\", function(d) {\n          return \"resize \" + d;\n        }).style(\"cursor\", function(d) {\n          return d3_svg_brushCursor[d];\n        }).append(\"rect\").attr(\"x\", function(d) {\n          return /[ew]$/.test(d) ? -3 : null;\n        }).attr(\"y\", function(d) {\n          return /^[ns]/.test(d) ? -3 : null;\n        }).attr(\"width\", 6).attr(\"height\", 6).style(\"visibility\", \"hidden\");\n        resize.style(\"display\", brush.empty() ? \"none\" : null);\n        var gUpdate = d3.transition(g), backgroundUpdate = d3.transition(background), range;\n        if (x) {\n          range = d3_scaleRange(x);\n          backgroundUpdate.attr(\"x\", range[0]).attr(\"width\", range[1] - range[0]);\n          redrawX(gUpdate);\n        }\n        if (y) {\n          range = d3_scaleRange(y);\n          backgroundUpdate.attr(\"y\", range[0]).attr(\"height\", range[1] - range[0]);\n          redrawY(gUpdate);\n        }\n        redraw(gUpdate);\n      });\n    }\n    brush.event = function(g) {\n      g.each(function() {\n        var event_ = event.of(this, arguments), extent1 = {\n          x: xExtent,\n          y: yExtent,\n          i: xExtentDomain,\n          j: yExtentDomain\n        }, extent0 = this.__chart__ || extent1;\n        this.__chart__ = extent1;\n        if (d3_transitionInheritId) {\n          d3.select(this).transition().each(\"start.brush\", function() {\n            xExtentDomain = extent0.i;\n            yExtentDomain = extent0.j;\n            xExtent = extent0.x;\n            yExtent = extent0.y;\n            event_({\n              type: \"brushstart\"\n            });\n          }).tween(\"brush:brush\", function() {\n            var xi = d3_interpolateArray(xExtent, extent1.x), yi = d3_interpolateArray(yExtent, extent1.y);\n            xExtentDomain = yExtentDomain = null;\n            return function(t) {\n              xExtent = extent1.x = xi(t);\n              yExtent = extent1.y = yi(t);\n              event_({\n                type: \"brush\",\n                mode: \"resize\"\n              });\n            };\n          }).each(\"end.brush\", function() {\n            xExtentDomain = extent1.i;\n            yExtentDomain = extent1.j;\n            event_({\n              type: \"brush\",\n              mode: \"resize\"\n            });\n            event_({\n              type: \"brushend\"\n            });\n          });\n        } else {\n          event_({\n            type: \"brushstart\"\n          });\n          event_({\n            type: \"brush\",\n            mode: \"resize\"\n          });\n          event_({\n            type: \"brushend\"\n          });\n        }\n      });\n    };\n    function redraw(g) {\n      g.selectAll(\".resize\").attr(\"transform\", function(d) {\n        return \"translate(\" + xExtent[+/e$/.test(d)] + \",\" + yExtent[+/^s/.test(d)] + \")\";\n      });\n    }\n    function redrawX(g) {\n      g.select(\".extent\").attr(\"x\", xExtent[0]);\n      g.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\", xExtent[1] - xExtent[0]);\n    }\n    function redrawY(g) {\n      g.select(\".extent\").attr(\"y\", yExtent[0]);\n      g.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\", yExtent[1] - yExtent[0]);\n    }\n    function brushstart() {\n      var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed(\"extent\"), dragRestore = d3_event_dragSuppress(target), center, origin = d3.mouse(target), offset;\n      var w = d3.select(d3_window(target)).on(\"keydown.brush\", keydown).on(\"keyup.brush\", keyup);\n      if (d3.event.changedTouches) {\n        w.on(\"touchmove.brush\", brushmove).on(\"touchend.brush\", brushend);\n      } else {\n        w.on(\"mousemove.brush\", brushmove).on(\"mouseup.brush\", brushend);\n      }\n      g.interrupt().selectAll(\"*\").interrupt();\n      if (dragging) {\n        origin[0] = xExtent[0] - origin[0];\n        origin[1] = yExtent[0] - origin[1];\n      } else if (resizing) {\n        var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);\n        offset = [ xExtent[1 - ex] - origin[0], yExtent[1 - ey] - origin[1] ];\n        origin[0] = xExtent[ex];\n        origin[1] = yExtent[ey];\n      } else if (d3.event.altKey) center = origin.slice();\n      g.style(\"pointer-events\", \"none\").selectAll(\".resize\").style(\"display\", null);\n      d3.select(\"body\").style(\"cursor\", eventTarget.style(\"cursor\"));\n      event_({\n        type: \"brushstart\"\n      });\n      brushmove();\n      function keydown() {\n        if (d3.event.keyCode == 32) {\n          if (!dragging) {\n            center = null;\n            origin[0] -= xExtent[1];\n            origin[1] -= yExtent[1];\n            dragging = 2;\n          }\n          d3_eventPreventDefault();\n        }\n      }\n      function keyup() {\n        if (d3.event.keyCode == 32 && dragging == 2) {\n          origin[0] += xExtent[1];\n          origin[1] += yExtent[1];\n          dragging = 0;\n          d3_eventPreventDefault();\n        }\n      }\n      function brushmove() {\n        var point = d3.mouse(target), moved = false;\n        if (offset) {\n          point[0] += offset[0];\n          point[1] += offset[1];\n        }\n        if (!dragging) {\n          if (d3.event.altKey) {\n            if (!center) center = [ (xExtent[0] + xExtent[1]) / 2, (yExtent[0] + yExtent[1]) / 2 ];\n            origin[0] = xExtent[+(point[0] < center[0])];\n            origin[1] = yExtent[+(point[1] < center[1])];\n          } else center = null;\n        }\n        if (resizingX && move1(point, x, 0)) {\n          redrawX(g);\n          moved = true;\n        }\n        if (resizingY && move1(point, y, 1)) {\n          redrawY(g);\n          moved = true;\n        }\n        if (moved) {\n          redraw(g);\n          event_({\n            type: \"brush\",\n            mode: dragging ? \"move\" : \"resize\"\n          });\n        }\n      }\n      function move1(point, scale, i) {\n        var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], extent = i ? yExtent : xExtent, size = extent[1] - extent[0], min, max;\n        if (dragging) {\n          r0 -= position;\n          r1 -= size + position;\n        }\n        min = (i ? yClamp : xClamp) ? Math.max(r0, Math.min(r1, point[i])) : point[i];\n        if (dragging) {\n          max = (min += position) + size;\n        } else {\n          if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));\n          if (position < min) {\n            max = min;\n            min = position;\n          } else {\n            max = position;\n          }\n        }\n        if (extent[0] != min || extent[1] != max) {\n          if (i) yExtentDomain = null; else xExtentDomain = null;\n          extent[0] = min;\n          extent[1] = max;\n          return true;\n        }\n      }\n      function brushend() {\n        brushmove();\n        g.style(\"pointer-events\", \"all\").selectAll(\".resize\").style(\"display\", brush.empty() ? \"none\" : null);\n        d3.select(\"body\").style(\"cursor\", null);\n        w.on(\"mousemove.brush\", null).on(\"mouseup.brush\", null).on(\"touchmove.brush\", null).on(\"touchend.brush\", null).on(\"keydown.brush\", null).on(\"keyup.brush\", null);\n        dragRestore();\n        event_({\n          type: \"brushend\"\n        });\n      }\n    }\n    brush.x = function(z) {\n      if (!arguments.length) return x;\n      x = z;\n      resizes = d3_svg_brushResizes[!x << 1 | !y];\n      return brush;\n    };\n    brush.y = function(z) {\n      if (!arguments.length) return y;\n      y = z;\n      resizes = d3_svg_brushResizes[!x << 1 | !y];\n      return brush;\n    };\n    brush.clamp = function(z) {\n      if (!arguments.length) return x && y ? [ xClamp, yClamp ] : x ? xClamp : y ? yClamp : null;\n      if (x && y) xClamp = !!z[0], yClamp = !!z[1]; else if (x) xClamp = !!z; else if (y) yClamp = !!z;\n      return brush;\n    };\n    brush.extent = function(z) {\n      var x0, x1, y0, y1, t;\n      if (!arguments.length) {\n        if (x) {\n          if (xExtentDomain) {\n            x0 = xExtentDomain[0], x1 = xExtentDomain[1];\n          } else {\n            x0 = xExtent[0], x1 = xExtent[1];\n            if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);\n            if (x1 < x0) t = x0, x0 = x1, x1 = t;\n          }\n        }\n        if (y) {\n          if (yExtentDomain) {\n            y0 = yExtentDomain[0], y1 = yExtentDomain[1];\n          } else {\n            y0 = yExtent[0], y1 = yExtent[1];\n            if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);\n            if (y1 < y0) t = y0, y0 = y1, y1 = t;\n          }\n        }\n        return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];\n      }\n      if (x) {\n        x0 = z[0], x1 = z[1];\n        if (y) x0 = x0[0], x1 = x1[0];\n        xExtentDomain = [ x0, x1 ];\n        if (x.invert) x0 = x(x0), x1 = x(x1);\n        if (x1 < x0) t = x0, x0 = x1, x1 = t;\n        if (x0 != xExtent[0] || x1 != xExtent[1]) xExtent = [ x0, x1 ];\n      }\n      if (y) {\n        y0 = z[0], y1 = z[1];\n        if (x) y0 = y0[1], y1 = y1[1];\n        yExtentDomain = [ y0, y1 ];\n        if (y.invert) y0 = y(y0), y1 = y(y1);\n        if (y1 < y0) t = y0, y0 = y1, y1 = t;\n        if (y0 != yExtent[0] || y1 != yExtent[1]) yExtent = [ y0, y1 ];\n      }\n      return brush;\n    };\n    brush.clear = function() {\n      if (!brush.empty()) {\n        xExtent = [ 0, 0 ], yExtent = [ 0, 0 ];\n        xExtentDomain = yExtentDomain = null;\n      }\n      return brush;\n    };\n    brush.empty = function() {\n      return !!x && xExtent[0] == xExtent[1] || !!y && yExtent[0] == yExtent[1];\n    };\n    return d3.rebind(brush, event, \"on\");\n  };\n  var d3_svg_brushCursor = {\n    n: \"ns-resize\",\n    e: \"ew-resize\",\n    s: \"ns-resize\",\n    w: \"ew-resize\",\n    nw: \"nwse-resize\",\n    ne: \"nesw-resize\",\n    se: \"nwse-resize\",\n    sw: \"nesw-resize\"\n  };\n  var d3_svg_brushResizes = [ [ \"n\", \"e\", \"s\", \"w\", \"nw\", \"ne\", \"se\", \"sw\" ], [ \"e\", \"w\" ], [ \"n\", \"s\" ], [] ];\n  var d3_time_format = d3_time.format = d3_locale_enUS.timeFormat;\n  var d3_time_formatUtc = d3_time_format.utc;\n  var d3_time_formatIso = d3_time_formatUtc(\"%Y-%m-%dT%H:%M:%S.%LZ\");\n  d3_time_format.iso = Date.prototype.toISOString && +new Date(\"2000-01-01T00:00:00.000Z\") ? d3_time_formatIsoNative : d3_time_formatIso;\n  function d3_time_formatIsoNative(date) {\n    return date.toISOString();\n  }\n  d3_time_formatIsoNative.parse = function(string) {\n    var date = new Date(string);\n    return isNaN(date) ? null : date;\n  };\n  d3_time_formatIsoNative.toString = d3_time_formatIso.toString;\n  d3_time.second = d3_time_interval(function(date) {\n    return new d3_date(Math.floor(date / 1e3) * 1e3);\n  }, function(date, offset) {\n    date.setTime(date.getTime() + Math.floor(offset) * 1e3);\n  }, function(date) {\n    return date.getSeconds();\n  });\n  d3_time.seconds = d3_time.second.range;\n  d3_time.seconds.utc = d3_time.second.utc.range;\n  d3_time.minute = d3_time_interval(function(date) {\n    return new d3_date(Math.floor(date / 6e4) * 6e4);\n  }, function(date, offset) {\n    date.setTime(date.getTime() + Math.floor(offset) * 6e4);\n  }, function(date) {\n    return date.getMinutes();\n  });\n  d3_time.minutes = d3_time.minute.range;\n  d3_time.minutes.utc = d3_time.minute.utc.range;\n  d3_time.hour = d3_time_interval(function(date) {\n    var timezone = date.getTimezoneOffset() / 60;\n    return new d3_date((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);\n  }, function(date, offset) {\n    date.setTime(date.getTime() + Math.floor(offset) * 36e5);\n  }, function(date) {\n    return date.getHours();\n  });\n  d3_time.hours = d3_time.hour.range;\n  d3_time.hours.utc = d3_time.hour.utc.range;\n  d3_time.month = d3_time_interval(function(date) {\n    date = d3_time.day(date);\n    date.setDate(1);\n    return date;\n  }, function(date, offset) {\n    date.setMonth(date.getMonth() + offset);\n  }, function(date) {\n    return date.getMonth();\n  });\n  d3_time.months = d3_time.month.range;\n  d3_time.months.utc = d3_time.month.utc.range;\n  function d3_time_scale(linear, methods, format) {\n    function scale(x) {\n      return linear(x);\n    }\n    scale.invert = function(x) {\n      return d3_time_scaleDate(linear.invert(x));\n    };\n    scale.domain = function(x) {\n      if (!arguments.length) return linear.domain().map(d3_time_scaleDate);\n      linear.domain(x);\n      return scale;\n    };\n    function tickMethod(extent, count) {\n      var span = extent[1] - extent[0], target = span / count, i = d3.bisect(d3_time_scaleSteps, target);\n      return i == d3_time_scaleSteps.length ? [ methods.year, d3_scale_linearTickRange(extent.map(function(d) {\n        return d / 31536e6;\n      }), count)[2] ] : !i ? [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ] : methods[target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target ? i - 1 : i];\n    }\n    scale.nice = function(interval, skip) {\n      var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === \"number\" && tickMethod(extent, interval);\n      if (method) interval = method[0], skip = method[1];\n      function skipped(date) {\n        return !isNaN(date) && !interval.range(date, d3_time_scaleDate(+date + 1), skip).length;\n      }\n      return scale.domain(d3_scale_nice(domain, skip > 1 ? {\n        floor: function(date) {\n          while (skipped(date = interval.floor(date))) date = d3_time_scaleDate(date - 1);\n          return date;\n        },\n        ceil: function(date) {\n          while (skipped(date = interval.ceil(date))) date = d3_time_scaleDate(+date + 1);\n          return date;\n        }\n      } : interval));\n    };\n    scale.ticks = function(interval, skip) {\n      var extent = d3_scaleExtent(scale.domain()), method = interval == null ? tickMethod(extent, 10) : typeof interval === \"number\" ? tickMethod(extent, interval) : !interval.range && [ {\n        range: interval\n      }, skip ];\n      if (method) interval = method[0], skip = method[1];\n      return interval.range(extent[0], d3_time_scaleDate(+extent[1] + 1), skip < 1 ? 1 : skip);\n    };\n    scale.tickFormat = function() {\n      return format;\n    };\n    scale.copy = function() {\n      return d3_time_scale(linear.copy(), methods, format);\n    };\n    return d3_scale_linearRebind(scale, linear);\n  }\n  function d3_time_scaleDate(t) {\n    return new Date(t);\n  }\n  var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];\n  var d3_time_scaleLocalMethods = [ [ d3_time.second, 1 ], [ d3_time.second, 5 ], [ d3_time.second, 15 ], [ d3_time.second, 30 ], [ d3_time.minute, 1 ], [ d3_time.minute, 5 ], [ d3_time.minute, 15 ], [ d3_time.minute, 30 ], [ d3_time.hour, 1 ], [ d3_time.hour, 3 ], [ d3_time.hour, 6 ], [ d3_time.hour, 12 ], [ d3_time.day, 1 ], [ d3_time.day, 2 ], [ d3_time.week, 1 ], [ d3_time.month, 1 ], [ d3_time.month, 3 ], [ d3_time.year, 1 ] ];\n  var d3_time_scaleLocalFormat = d3_time_format.multi([ [ \".%L\", function(d) {\n    return d.getMilliseconds();\n  } ], [ \":%S\", function(d) {\n    return d.getSeconds();\n  } ], [ \"%I:%M\", function(d) {\n    return d.getMinutes();\n  } ], [ \"%I %p\", function(d) {\n    return d.getHours();\n  } ], [ \"%a %d\", function(d) {\n    return d.getDay() && d.getDate() != 1;\n  } ], [ \"%b %d\", function(d) {\n    return d.getDate() != 1;\n  } ], [ \"%B\", function(d) {\n    return d.getMonth();\n  } ], [ \"%Y\", d3_true ] ]);\n  var d3_time_scaleMilliseconds = {\n    range: function(start, stop, step) {\n      return d3.range(Math.ceil(start / step) * step, +stop, step).map(d3_time_scaleDate);\n    },\n    floor: d3_identity,\n    ceil: d3_identity\n  };\n  d3_time_scaleLocalMethods.year = d3_time.year;\n  d3_time.scale = function() {\n    return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);\n  };\n  var d3_time_scaleUtcMethods = d3_time_scaleLocalMethods.map(function(m) {\n    return [ m[0].utc, m[1] ];\n  });\n  var d3_time_scaleUtcFormat = d3_time_formatUtc.multi([ [ \".%L\", function(d) {\n    return d.getUTCMilliseconds();\n  } ], [ \":%S\", function(d) {\n    return d.getUTCSeconds();\n  } ], [ \"%I:%M\", function(d) {\n    return d.getUTCMinutes();\n  } ], [ \"%I %p\", function(d) {\n    return d.getUTCHours();\n  } ], [ \"%a %d\", function(d) {\n    return d.getUTCDay() && d.getUTCDate() != 1;\n  } ], [ \"%b %d\", function(d) {\n    return d.getUTCDate() != 1;\n  } ], [ \"%B\", function(d) {\n    return d.getUTCMonth();\n  } ], [ \"%Y\", d3_true ] ]);\n  d3_time_scaleUtcMethods.year = d3_time.year.utc;\n  d3_time.scale.utc = function() {\n    return d3_time_scale(d3.scale.linear(), d3_time_scaleUtcMethods, d3_time_scaleUtcFormat);\n  };\n  d3.text = d3_xhrType(function(request) {\n    return request.responseText;\n  });\n  d3.json = function(url, callback) {\n    return d3_xhr(url, \"application/json\", d3_json, callback);\n  };\n  function d3_json(request) {\n    return JSON.parse(request.responseText);\n  }\n  d3.html = function(url, callback) {\n    return d3_xhr(url, \"text/html\", d3_html, callback);\n  };\n  function d3_html(request) {\n    var range = d3_document.createRange();\n    range.selectNode(d3_document.body);\n    return range.createContextualFragment(request.responseText);\n  }\n  d3.xml = d3_xhrType(function(request) {\n    return request.responseXML;\n  });\n  if (typeof define === \"function\" && define.amd) this.d3 = d3, define(d3); else if (typeof module === \"object\" && module.exports) module.exports = d3; else this.d3 = d3;\n}();","var DateFormatter;!function(){\"use strict\";var D,s,r,a,n;D=function(e,t){return\"string\"==typeof e&&\"string\"==typeof t&&e.toLowerCase()===t.toLowerCase()},s=function(e,t,a){var n=a||\"0\",r=e.toString();return r.length<t?s(n+r,t):r},r=function(e){var t,a;for(e=e||{},t=1;t<arguments.length;t++)if(a=arguments[t])for(var n in a)a.hasOwnProperty(n)&&(\"object\"==typeof a[n]?r(e[n],a[n]):e[n]=a[n]);return e},a=function(e,t){for(var a=0;a<t.length;a++)if(t[a].toLowerCase()===e.toLowerCase())return a;return-1},n={dateSettings:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],daysShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthsShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],meridiem:[\"AM\",\"PM\"],ordinal:function(e){var t=e%10,a={1:\"st\",2:\"nd\",3:\"rd\"};return 1!==Math.floor(e%100/10)&&a[t]?a[t]:\"th\"}},separators:/[ \\-+\\/\\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\\d{4})?)\\b/g,tzClip:/[^-+\\dA-Z]/g},(DateFormatter=function(e){var t=this,a=r(n,e);t.dateSettings=a.dateSettings,t.separators=a.separators,t.validParts=a.validParts,t.intParts=a.intParts,t.tzParts=a.tzParts,t.tzClip=a.tzClip}).prototype={constructor:DateFormatter,getMonth:function(e){var t;return 0===(t=a(e,this.dateSettings.monthsShort)+1)&&(t=a(e,this.dateSettings.months)+1),t},parseDate:function(e,t){var a,n,r,o,i,s,d,u,l,f,c=this,m=!1,h=!1,g=c.dateSettings,p={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!e)return null;if(e instanceof Date)return e;if(\"U\"===t)return(r=parseInt(e))?new Date(1e3*r):e;switch(typeof e){case\"number\":return new Date(e);case\"string\":break;default:return null}if(!(a=t.match(c.validParts))||0===a.length)throw new Error(\"Invalid date format definition.\");for(n=e.replace(c.separators,\"\\0\").split(\"\\0\"),r=0;r<n.length;r++)switch(o=n[r],i=parseInt(o),a[r]){case\"y\":case\"Y\":if(!i)return null;l=o.length,p.year=2===l?parseInt((i<70?\"20\":\"19\")+o):i,m=!0;break;case\"m\":case\"n\":case\"M\":case\"F\":if(isNaN(i)){if(!(0<(s=c.getMonth(o))))return null;p.month=s}else{if(!(1<=i&&i<=12))return null;p.month=i}m=!0;break;case\"d\":case\"j\":if(!(1<=i&&i<=31))return null;p.day=i,m=!0;break;case\"g\":case\"h\":if(f=n[d=-1<a.indexOf(\"a\")?a.indexOf(\"a\"):-1<a.indexOf(\"A\")?a.indexOf(\"A\"):-1],-1<d)u=D(f,g.meridiem[0])?0:D(f,g.meridiem[1])?12:-1,1<=i&&i<=12&&-1<u?p.hour=i+u-1:0<=i&&i<=23&&(p.hour=i);else{if(!(0<=i&&i<=23))return null;p.hour=i}h=!0;break;case\"G\":case\"H\":if(!(0<=i&&i<=23))return null;p.hour=i,h=!0;break;case\"i\":if(!(0<=i&&i<=59))return null;p.min=i,h=!0;break;case\"s\":if(!(0<=i&&i<=59))return null;p.sec=i,h=!0}if(!0===m&&p.year&&p.month&&p.day)p.date=new Date(p.year,p.month-1,p.day,p.hour,p.min,p.sec,0);else{if(!0!==h)return null;p.date=new Date(0,0,0,p.hour,p.min,p.sec,0)}return p.date},guessDate:function(e,t){if(\"string\"!=typeof e)return e;var a,n,r,o,i,s,d=e.replace(this.separators,\"\\0\").split(\"\\0\"),u=t.match(this.validParts),l=new Date,f=0;if(!/^[djmn]/g.test(u[0]))return e;for(r=0;r<d.length;r++){if(f=2,i=d[r],s=parseInt(i.substr(0,2)),isNaN(s))return null;switch(r){case 0:\"m\"===u[0]||\"n\"===u[0]?l.setMonth(s-1):l.setDate(s);break;case 1:\"m\"===u[0]||\"n\"===u[0]?l.setDate(s):l.setMonth(s-1);break;case 2:if(n=l.getFullYear(),f=(a=i.length)<4?a:4,!(n=parseInt(a<4?n.toString().substr(0,4-a)+i:i.substr(0,4))))return null;l.setFullYear(n);break;case 3:l.setHours(s);break;case 4:l.setMinutes(s);break;case 5:l.setSeconds(s)}0<(o=i.substr(f)).length&&d.splice(r+1,0,o)}return l},parseFormat:function(e,n){var a,t=this,r=t.dateSettings,o=/\\\\?(.?)/gi,i=function(e,t){return a[e]?a[e]():t};return a={d:function(){return s(a.j(),2)},D:function(){return r.daysShort[a.w()]},j:function(){return n.getDate()},l:function(){return r.days[a.w()]},N:function(){return a.w()||7},w:function(){return n.getDay()},z:function(){var e=new Date(a.Y(),a.n()-1,a.j()),t=new Date(a.Y(),0,1);return Math.round((e-t)/864e5)},W:function(){var e=new Date(a.Y(),a.n()-1,a.j()-a.N()+3),t=new Date(e.getFullYear(),0,4);return s(1+Math.round((e-t)/864e5/7),2)},F:function(){return r.months[n.getMonth()]},m:function(){return s(a.n(),2)},M:function(){return r.monthsShort[n.getMonth()]},n:function(){return n.getMonth()+1},t:function(){return new Date(a.Y(),a.n(),0).getDate()},L:function(){var e=a.Y();return e%4==0&&e%100!=0||e%400==0?1:0},o:function(){var e=a.n(),t=a.W();return a.Y()+(12===e&&t<9?1:1===e&&9<t?-1:0)},Y:function(){return n.getFullYear()},y:function(){return a.Y().toString().slice(-2)},a:function(){return a.A().toLowerCase()},A:function(){var e=a.G()<12?0:1;return r.meridiem[e]},B:function(){var e=3600*n.getUTCHours(),t=60*n.getUTCMinutes(),a=n.getUTCSeconds();return s(Math.floor((e+t+a+3600)/86.4)%1e3,3)},g:function(){return a.G()%12||12},G:function(){return n.getHours()},h:function(){return s(a.g(),2)},H:function(){return s(a.G(),2)},i:function(){return s(n.getMinutes(),2)},s:function(){return s(n.getSeconds(),2)},u:function(){return s(1e3*n.getMilliseconds(),6)},e:function(){return/\\((.*)\\)/.exec(String(n))[1]||\"Coordinated Universal Time\"},I:function(){return new Date(a.Y(),0)-Date.UTC(a.Y(),0)!=new Date(a.Y(),6)-Date.UTC(a.Y(),6)?1:0},O:function(){var e=n.getTimezoneOffset(),t=Math.abs(e);return(0<e?\"-\":\"+\")+s(100*Math.floor(t/60)+t%60,4)},P:function(){var e=a.O();return e.substr(0,3)+\":\"+e.substr(3,2)},T:function(){return(String(n).match(t.tzParts)||[\"\"]).pop().replace(t.tzClip,\"\")||\"UTC\"},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return\"Y-m-d\\\\TH:i:sP\".replace(o,i)},r:function(){return\"D, d M Y H:i:s O\".replace(o,i)},U:function(){return n.getTime()/1e3||0}},i(e,e)},formatDate:function(e,t){var a,n,r,o,i,s=\"\";if(\"string\"==typeof e&&!(e=this.parseDate(e,t)))return null;if(e instanceof Date){for(r=t.length,a=0;a<r;a++)\"S\"!==(i=t.charAt(a))&&\"\\\\\"!==i&&(0<a&&\"\\\\\"===t.charAt(a-1)?s+=i:(o=this.parseFormat(i,e),a!==r-1&&this.intParts.test(i)&&\"S\"===t.charAt(a+1)&&(n=parseInt(o)||0,o+=this.dateSettings.ordinal(n)),s+=o));return s}return\"\"}}}();var datetimepickerFactory=function(L){\"use strict\";var s={i18n:{ar:{months:[\"كانون الثاني\",\"شباط\",\"آذار\",\"نيسان\",\"مايو\",\"حزيران\",\"تموز\",\"آب\",\"أيلول\",\"تشرين الأول\",\"تشرين الثاني\",\"كانون الأول\"],dayOfWeekShort:[\"ن\",\"ث\",\"ع\",\"خ\",\"ج\",\"س\",\"ح\"],dayOfWeek:[\"الأحد\",\"الاثنين\",\"الثلاثاء\",\"الأربعاء\",\"الخميس\",\"الجمعة\",\"السبت\",\"الأحد\"]},ro:{months:[\"Ianuarie\",\"Februarie\",\"Martie\",\"Aprilie\",\"Mai\",\"Iunie\",\"Iulie\",\"August\",\"Septembrie\",\"Octombrie\",\"Noiembrie\",\"Decembrie\"],dayOfWeekShort:[\"Du\",\"Lu\",\"Ma\",\"Mi\",\"Jo\",\"Vi\",\"Sâ\"],dayOfWeek:[\"Duminică\",\"Luni\",\"Marţi\",\"Miercuri\",\"Joi\",\"Vineri\",\"Sâmbătă\"]},id:{months:[\"Januari\",\"Februari\",\"Maret\",\"April\",\"Mei\",\"Juni\",\"Juli\",\"Agustus\",\"September\",\"Oktober\",\"November\",\"Desember\"],dayOfWeekShort:[\"Min\",\"Sen\",\"Sel\",\"Rab\",\"Kam\",\"Jum\",\"Sab\"],dayOfWeek:[\"Minggu\",\"Senin\",\"Selasa\",\"Rabu\",\"Kamis\",\"Jumat\",\"Sabtu\"]},is:{months:[\"Janúar\",\"Febrúar\",\"Mars\",\"Apríl\",\"Maí\",\"Júní\",\"Júlí\",\"Ágúst\",\"September\",\"Október\",\"Nóvember\",\"Desember\"],dayOfWeekShort:[\"Sun\",\"Mán\",\"Þrið\",\"Mið\",\"Fim\",\"Fös\",\"Lau\"],dayOfWeek:[\"Sunnudagur\",\"Mánudagur\",\"Þriðjudagur\",\"Miðvikudagur\",\"Fimmtudagur\",\"Föstudagur\",\"Laugardagur\"]},bg:{months:[\"Януари\",\"Февруари\",\"Март\",\"Април\",\"Май\",\"Юни\",\"Юли\",\"Август\",\"Септември\",\"Октомври\",\"Ноември\",\"Декември\"],dayOfWeekShort:[\"Нд\",\"Пн\",\"Вт\",\"Ср\",\"Чт\",\"Пт\",\"Сб\"],dayOfWeek:[\"Неделя\",\"Понеделник\",\"Вторник\",\"Сряда\",\"Четвъртък\",\"Петък\",\"Събота\"]},fa:{months:[\"فروردین\",\"اردیبهشت\",\"خرداد\",\"تیر\",\"مرداد\",\"شهریور\",\"مهر\",\"آبان\",\"آذر\",\"دی\",\"بهمن\",\"اسفند\"],dayOfWeekShort:[\"یکشنبه\",\"دوشنبه\",\"سه شنبه\",\"چهارشنبه\",\"پنجشنبه\",\"جمعه\",\"شنبه\"],dayOfWeek:[\"یک‌شنبه\",\"دوشنبه\",\"سه‌شنبه\",\"چهارشنبه\",\"پنج‌شنبه\",\"جمعه\",\"شنبه\",\"یک‌شنبه\"]},ru:{months:[\"Январь\",\"Февраль\",\"Март\",\"Апрель\",\"Май\",\"Июнь\",\"Июль\",\"Август\",\"Сентябрь\",\"Октябрь\",\"Ноябрь\",\"Декабрь\"],dayOfWeekShort:[\"Вс\",\"Пн\",\"Вт\",\"Ср\",\"Чт\",\"Пт\",\"Сб\"],dayOfWeek:[\"Воскресенье\",\"Понедельник\",\"Вторник\",\"Среда\",\"Четверг\",\"Пятница\",\"Суббота\"]},uk:{months:[\"Січень\",\"Лютий\",\"Березень\",\"Квітень\",\"Травень\",\"Червень\",\"Липень\",\"Серпень\",\"Вересень\",\"Жовтень\",\"Листопад\",\"Грудень\"],dayOfWeekShort:[\"Ндл\",\"Пнд\",\"Втр\",\"Срд\",\"Чтв\",\"Птн\",\"Сбт\"],dayOfWeek:[\"Неділя\",\"Понеділок\",\"Вівторок\",\"Середа\",\"Четвер\",\"П'ятниця\",\"Субота\"]},en:{months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],dayOfWeekShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayOfWeek:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},el:{months:[\"Ιανουάριος\",\"Φεβρουάριος\",\"Μάρτιος\",\"Απρίλιος\",\"Μάιος\",\"Ιούνιος\",\"Ιούλιος\",\"Αύγουστος\",\"Σεπτέμβριος\",\"Οκτώβριος\",\"Νοέμβριος\",\"Δεκέμβριος\"],dayOfWeekShort:[\"Κυρ\",\"Δευ\",\"Τρι\",\"Τετ\",\"Πεμ\",\"Παρ\",\"Σαβ\"],dayOfWeek:[\"Κυριακή\",\"Δευτέρα\",\"Τρίτη\",\"Τετάρτη\",\"Πέμπτη\",\"Παρασκευή\",\"Σάββατο\"]},de:{months:[\"Januar\",\"Februar\",\"März\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\"],dayOfWeekShort:[\"So\",\"Mo\",\"Di\",\"Mi\",\"Do\",\"Fr\",\"Sa\"],dayOfWeek:[\"Sonntag\",\"Montag\",\"Dienstag\",\"Mittwoch\",\"Donnerstag\",\"Freitag\",\"Samstag\"]},nl:{months:[\"januari\",\"februari\",\"maart\",\"april\",\"mei\",\"juni\",\"juli\",\"augustus\",\"september\",\"oktober\",\"november\",\"december\"],dayOfWeekShort:[\"zo\",\"ma\",\"di\",\"wo\",\"do\",\"vr\",\"za\"],dayOfWeek:[\"zondag\",\"maandag\",\"dinsdag\",\"woensdag\",\"donderdag\",\"vrijdag\",\"zaterdag\"]},tr:{months:[\"Ocak\",\"Şubat\",\"Mart\",\"Nisan\",\"Mayıs\",\"Haziran\",\"Temmuz\",\"Ağustos\",\"Eylül\",\"Ekim\",\"Kasım\",\"Aralık\"],dayOfWeekShort:[\"Paz\",\"Pts\",\"Sal\",\"Çar\",\"Per\",\"Cum\",\"Cts\"],dayOfWeek:[\"Pazar\",\"Pazartesi\",\"Salı\",\"Çarşamba\",\"Perşembe\",\"Cuma\",\"Cumartesi\"]},fr:{months:[\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\"],dayOfWeekShort:[\"Dim\",\"Lun\",\"Mar\",\"Mer\",\"Jeu\",\"Ven\",\"Sam\"],dayOfWeek:[\"dimanche\",\"lundi\",\"mardi\",\"mercredi\",\"jeudi\",\"vendredi\",\"samedi\"]},es:{months:[\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\"],dayOfWeekShort:[\"Dom\",\"Lun\",\"Mar\",\"Mié\",\"Jue\",\"Vie\",\"Sáb\"],dayOfWeek:[\"Domingo\",\"Lunes\",\"Martes\",\"Miércoles\",\"Jueves\",\"Viernes\",\"Sábado\"]},th:{months:[\"มกราคม\",\"กุมภาพันธ์\",\"มีนาคม\",\"เมษายน\",\"พฤษภาคม\",\"มิถุนายน\",\"กรกฎาคม\",\"สิงหาคม\",\"กันยายน\",\"ตุลาคม\",\"พฤศจิกายน\",\"ธันวาคม\"],dayOfWeekShort:[\"อา.\",\"จ.\",\"อ.\",\"พ.\",\"พฤ.\",\"ศ.\",\"ส.\"],dayOfWeek:[\"อาทิตย์\",\"จันทร์\",\"อังคาร\",\"พุธ\",\"พฤหัส\",\"ศุกร์\",\"เสาร์\",\"อาทิตย์\"]},pl:{months:[\"styczeń\",\"luty\",\"marzec\",\"kwiecień\",\"maj\",\"czerwiec\",\"lipiec\",\"sierpień\",\"wrzesień\",\"październik\",\"listopad\",\"grudzień\"],dayOfWeekShort:[\"nd\",\"pn\",\"wt\",\"śr\",\"cz\",\"pt\",\"sb\"],dayOfWeek:[\"niedziela\",\"poniedziałek\",\"wtorek\",\"środa\",\"czwartek\",\"piątek\",\"sobota\"]},pt:{months:[\"Janeiro\",\"Fevereiro\",\"Março\",\"Abril\",\"Maio\",\"Junho\",\"Julho\",\"Agosto\",\"Setembro\",\"Outubro\",\"Novembro\",\"Dezembro\"],dayOfWeekShort:[\"Dom\",\"Seg\",\"Ter\",\"Qua\",\"Qui\",\"Sex\",\"Sab\"],dayOfWeek:[\"Domingo\",\"Segunda\",\"Terça\",\"Quarta\",\"Quinta\",\"Sexta\",\"Sábado\"]},ch:{months:[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"],dayOfWeekShort:[\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"]},se:{months:[\"Januari\",\"Februari\",\"Mars\",\"April\",\"Maj\",\"Juni\",\"Juli\",\"Augusti\",\"September\",\"Oktober\",\"November\",\"December\"],dayOfWeekShort:[\"Sön\",\"Mån\",\"Tis\",\"Ons\",\"Tor\",\"Fre\",\"Lör\"]},km:{months:[\"មករា​\",\"កុម្ភៈ\",\"មិនា​\",\"មេសា​\",\"ឧសភា​\",\"មិថុនា​\",\"កក្កដា​\",\"សីហា​\",\"កញ្ញា​\",\"តុលា​\",\"វិច្ឆិកា\",\"ធ្នូ​\"],dayOfWeekShort:[\"អាទិ​\",\"ច័ន្ទ​\",\"អង្គារ​\",\"ពុធ​\",\"ព្រហ​​\",\"សុក្រ​\",\"សៅរ៍\"],dayOfWeek:[\"អាទិត្យ​\",\"ច័ន្ទ​\",\"អង្គារ​\",\"ពុធ​\",\"ព្រហស្បតិ៍​\",\"សុក្រ​\",\"សៅរ៍\"]},kr:{months:[\"1월\",\"2월\",\"3월\",\"4월\",\"5월\",\"6월\",\"7월\",\"8월\",\"9월\",\"10월\",\"11월\",\"12월\"],dayOfWeekShort:[\"일\",\"월\",\"화\",\"수\",\"목\",\"금\",\"토\"],dayOfWeek:[\"일요일\",\"월요일\",\"화요일\",\"수요일\",\"목요일\",\"금요일\",\"토요일\"]},it:{months:[\"Gennaio\",\"Febbraio\",\"Marzo\",\"Aprile\",\"Maggio\",\"Giugno\",\"Luglio\",\"Agosto\",\"Settembre\",\"Ottobre\",\"Novembre\",\"Dicembre\"],dayOfWeekShort:[\"Dom\",\"Lun\",\"Mar\",\"Mer\",\"Gio\",\"Ven\",\"Sab\"],dayOfWeek:[\"Domenica\",\"Lunedì\",\"Martedì\",\"Mercoledì\",\"Giovedì\",\"Venerdì\",\"Sabato\"]},da:{months:[\"Januar\",\"Februar\",\"Marts\",\"April\",\"Maj\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"December\"],dayOfWeekShort:[\"Søn\",\"Man\",\"Tir\",\"Ons\",\"Tor\",\"Fre\",\"Lør\"],dayOfWeek:[\"søndag\",\"mandag\",\"tirsdag\",\"onsdag\",\"torsdag\",\"fredag\",\"lørdag\"]},no:{months:[\"Januar\",\"Februar\",\"Mars\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Desember\"],dayOfWeekShort:[\"Søn\",\"Man\",\"Tir\",\"Ons\",\"Tor\",\"Fre\",\"Lør\"],dayOfWeek:[\"Søndag\",\"Mandag\",\"Tirsdag\",\"Onsdag\",\"Torsdag\",\"Fredag\",\"Lørdag\"]},ja:{months:[\"1月\",\"2月\",\"3月\",\"4月\",\"5月\",\"6月\",\"7月\",\"8月\",\"9月\",\"10月\",\"11月\",\"12月\"],dayOfWeekShort:[\"日\",\"月\",\"火\",\"水\",\"木\",\"金\",\"土\"],dayOfWeek:[\"日曜\",\"月曜\",\"火曜\",\"水曜\",\"木曜\",\"金曜\",\"土曜\"]},vi:{months:[\"Tháng 1\",\"Tháng 2\",\"Tháng 3\",\"Tháng 4\",\"Tháng 5\",\"Tháng 6\",\"Tháng 7\",\"Tháng 8\",\"Tháng 9\",\"Tháng 10\",\"Tháng 11\",\"Tháng 12\"],dayOfWeekShort:[\"CN\",\"T2\",\"T3\",\"T4\",\"T5\",\"T6\",\"T7\"],dayOfWeek:[\"Chủ nhật\",\"Thứ hai\",\"Thứ ba\",\"Thứ tư\",\"Thứ năm\",\"Thứ sáu\",\"Thứ bảy\"]},sl:{months:[\"Januar\",\"Februar\",\"Marec\",\"April\",\"Maj\",\"Junij\",\"Julij\",\"Avgust\",\"September\",\"Oktober\",\"November\",\"December\"],dayOfWeekShort:[\"Ned\",\"Pon\",\"Tor\",\"Sre\",\"Čet\",\"Pet\",\"Sob\"],dayOfWeek:[\"Nedelja\",\"Ponedeljek\",\"Torek\",\"Sreda\",\"Četrtek\",\"Petek\",\"Sobota\"]},cs:{months:[\"Leden\",\"Únor\",\"Březen\",\"Duben\",\"Květen\",\"Červen\",\"Červenec\",\"Srpen\",\"Září\",\"Říjen\",\"Listopad\",\"Prosinec\"],dayOfWeekShort:[\"Ne\",\"Po\",\"Út\",\"St\",\"Čt\",\"Pá\",\"So\"]},hu:{months:[\"Január\",\"Február\",\"Március\",\"Április\",\"Május\",\"Június\",\"Július\",\"Augusztus\",\"Szeptember\",\"Október\",\"November\",\"December\"],dayOfWeekShort:[\"Va\",\"Hé\",\"Ke\",\"Sze\",\"Cs\",\"Pé\",\"Szo\"],dayOfWeek:[\"vasárnap\",\"hétfő\",\"kedd\",\"szerda\",\"csütörtök\",\"péntek\",\"szombat\"]},az:{months:[\"Yanvar\",\"Fevral\",\"Mart\",\"Aprel\",\"May\",\"Iyun\",\"Iyul\",\"Avqust\",\"Sentyabr\",\"Oktyabr\",\"Noyabr\",\"Dekabr\"],dayOfWeekShort:[\"B\",\"Be\",\"Ça\",\"Ç\",\"Ca\",\"C\",\"Ş\"],dayOfWeek:[\"Bazar\",\"Bazar ertəsi\",\"Çərşənbə axşamı\",\"Çərşənbə\",\"Cümə axşamı\",\"Cümə\",\"Şənbə\"]},bs:{months:[\"Januar\",\"Februar\",\"Mart\",\"April\",\"Maj\",\"Jun\",\"Jul\",\"Avgust\",\"Septembar\",\"Oktobar\",\"Novembar\",\"Decembar\"],dayOfWeekShort:[\"Ned\",\"Pon\",\"Uto\",\"Sri\",\"Čet\",\"Pet\",\"Sub\"],dayOfWeek:[\"Nedjelja\",\"Ponedjeljak\",\"Utorak\",\"Srijeda\",\"Četvrtak\",\"Petak\",\"Subota\"]},ca:{months:[\"Gener\",\"Febrer\",\"Març\",\"Abril\",\"Maig\",\"Juny\",\"Juliol\",\"Agost\",\"Setembre\",\"Octubre\",\"Novembre\",\"Desembre\"],dayOfWeekShort:[\"Dg\",\"Dl\",\"Dt\",\"Dc\",\"Dj\",\"Dv\",\"Ds\"],dayOfWeek:[\"Diumenge\",\"Dilluns\",\"Dimarts\",\"Dimecres\",\"Dijous\",\"Divendres\",\"Dissabte\"]},\"en-GB\":{months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],dayOfWeekShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayOfWeek:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},et:{months:[\"Jaanuar\",\"Veebruar\",\"Märts\",\"Aprill\",\"Mai\",\"Juuni\",\"Juuli\",\"August\",\"September\",\"Oktoober\",\"November\",\"Detsember\"],dayOfWeekShort:[\"P\",\"E\",\"T\",\"K\",\"N\",\"R\",\"L\"],dayOfWeek:[\"Pühapäev\",\"Esmaspäev\",\"Teisipäev\",\"Kolmapäev\",\"Neljapäev\",\"Reede\",\"Laupäev\"]},eu:{months:[\"Urtarrila\",\"Otsaila\",\"Martxoa\",\"Apirila\",\"Maiatza\",\"Ekaina\",\"Uztaila\",\"Abuztua\",\"Iraila\",\"Urria\",\"Azaroa\",\"Abendua\"],dayOfWeekShort:[\"Ig.\",\"Al.\",\"Ar.\",\"Az.\",\"Og.\",\"Or.\",\"La.\"],dayOfWeek:[\"Igandea\",\"Astelehena\",\"Asteartea\",\"Asteazkena\",\"Osteguna\",\"Ostirala\",\"Larunbata\"]},fi:{months:[\"Tammikuu\",\"Helmikuu\",\"Maaliskuu\",\"Huhtikuu\",\"Toukokuu\",\"Kesäkuu\",\"Heinäkuu\",\"Elokuu\",\"Syyskuu\",\"Lokakuu\",\"Marraskuu\",\"Joulukuu\"],dayOfWeekShort:[\"Su\",\"Ma\",\"Ti\",\"Ke\",\"To\",\"Pe\",\"La\"],dayOfWeek:[\"sunnuntai\",\"maanantai\",\"tiistai\",\"keskiviikko\",\"torstai\",\"perjantai\",\"lauantai\"]},gl:{months:[\"Xan\",\"Feb\",\"Maz\",\"Abr\",\"Mai\",\"Xun\",\"Xul\",\"Ago\",\"Set\",\"Out\",\"Nov\",\"Dec\"],dayOfWeekShort:[\"Dom\",\"Lun\",\"Mar\",\"Mer\",\"Xov\",\"Ven\",\"Sab\"],dayOfWeek:[\"Domingo\",\"Luns\",\"Martes\",\"Mércores\",\"Xoves\",\"Venres\",\"Sábado\"]},hr:{months:[\"Siječanj\",\"Veljača\",\"Ožujak\",\"Travanj\",\"Svibanj\",\"Lipanj\",\"Srpanj\",\"Kolovoz\",\"Rujan\",\"Listopad\",\"Studeni\",\"Prosinac\"],dayOfWeekShort:[\"Ned\",\"Pon\",\"Uto\",\"Sri\",\"Čet\",\"Pet\",\"Sub\"],dayOfWeek:[\"Nedjelja\",\"Ponedjeljak\",\"Utorak\",\"Srijeda\",\"Četvrtak\",\"Petak\",\"Subota\"]},ko:{months:[\"1월\",\"2월\",\"3월\",\"4월\",\"5월\",\"6월\",\"7월\",\"8월\",\"9월\",\"10월\",\"11월\",\"12월\"],dayOfWeekShort:[\"일\",\"월\",\"화\",\"수\",\"목\",\"금\",\"토\"],dayOfWeek:[\"일요일\",\"월요일\",\"화요일\",\"수요일\",\"목요일\",\"금요일\",\"토요일\"]},lt:{months:[\"Sausio\",\"Vasario\",\"Kovo\",\"Balandžio\",\"Gegužės\",\"Birželio\",\"Liepos\",\"Rugpjūčio\",\"Rugsėjo\",\"Spalio\",\"Lapkričio\",\"Gruodžio\"],dayOfWeekShort:[\"Sek\",\"Pir\",\"Ant\",\"Tre\",\"Ket\",\"Pen\",\"Šeš\"],dayOfWeek:[\"Sekmadienis\",\"Pirmadienis\",\"Antradienis\",\"Trečiadienis\",\"Ketvirtadienis\",\"Penktadienis\",\"Šeštadienis\"]},lv:{months:[\"Janvāris\",\"Februāris\",\"Marts\",\"Aprīlis \",\"Maijs\",\"Jūnijs\",\"Jūlijs\",\"Augusts\",\"Septembris\",\"Oktobris\",\"Novembris\",\"Decembris\"],dayOfWeekShort:[\"Sv\",\"Pr\",\"Ot\",\"Tr\",\"Ct\",\"Pk\",\"St\"],dayOfWeek:[\"Svētdiena\",\"Pirmdiena\",\"Otrdiena\",\"Trešdiena\",\"Ceturtdiena\",\"Piektdiena\",\"Sestdiena\"]},mk:{months:[\"јануари\",\"февруари\",\"март\",\"април\",\"мај\",\"јуни\",\"јули\",\"август\",\"септември\",\"октомври\",\"ноември\",\"декември\"],dayOfWeekShort:[\"нед\",\"пон\",\"вто\",\"сре\",\"чет\",\"пет\",\"саб\"],dayOfWeek:[\"Недела\",\"Понеделник\",\"Вторник\",\"Среда\",\"Четврток\",\"Петок\",\"Сабота\"]},mn:{months:[\"1-р сар\",\"2-р сар\",\"3-р сар\",\"4-р сар\",\"5-р сар\",\"6-р сар\",\"7-р сар\",\"8-р сар\",\"9-р сар\",\"10-р сар\",\"11-р сар\",\"12-р сар\"],dayOfWeekShort:[\"Дав\",\"Мяг\",\"Лха\",\"Пүр\",\"Бсн\",\"Бям\",\"Ням\"],dayOfWeek:[\"Даваа\",\"Мягмар\",\"Лхагва\",\"Пүрэв\",\"Баасан\",\"Бямба\",\"Ням\"]},\"pt-BR\":{months:[\"Janeiro\",\"Fevereiro\",\"Março\",\"Abril\",\"Maio\",\"Junho\",\"Julho\",\"Agosto\",\"Setembro\",\"Outubro\",\"Novembro\",\"Dezembro\"],dayOfWeekShort:[\"Dom\",\"Seg\",\"Ter\",\"Qua\",\"Qui\",\"Sex\",\"Sáb\"],dayOfWeek:[\"Domingo\",\"Segunda\",\"Terça\",\"Quarta\",\"Quinta\",\"Sexta\",\"Sábado\"]},sk:{months:[\"Január\",\"Február\",\"Marec\",\"Apríl\",\"Máj\",\"Jún\",\"Júl\",\"August\",\"September\",\"Október\",\"November\",\"December\"],dayOfWeekShort:[\"Ne\",\"Po\",\"Ut\",\"St\",\"Št\",\"Pi\",\"So\"],dayOfWeek:[\"Nedeľa\",\"Pondelok\",\"Utorok\",\"Streda\",\"Štvrtok\",\"Piatok\",\"Sobota\"]},sq:{months:[\"Janar\",\"Shkurt\",\"Mars\",\"Prill\",\"Maj\",\"Qershor\",\"Korrik\",\"Gusht\",\"Shtator\",\"Tetor\",\"Nëntor\",\"Dhjetor\"],dayOfWeekShort:[\"Die\",\"Hën\",\"Mar\",\"Mër\",\"Enj\",\"Pre\",\"Shtu\"],dayOfWeek:[\"E Diel\",\"E Hënë\",\"E Martē\",\"E Mërkurë\",\"E Enjte\",\"E Premte\",\"E Shtunë\"]},\"sr-YU\":{months:[\"Januar\",\"Februar\",\"Mart\",\"April\",\"Maj\",\"Jun\",\"Jul\",\"Avgust\",\"Septembar\",\"Oktobar\",\"Novembar\",\"Decembar\"],dayOfWeekShort:[\"Ned\",\"Pon\",\"Uto\",\"Sre\",\"čet\",\"Pet\",\"Sub\"],dayOfWeek:[\"Nedelja\",\"Ponedeljak\",\"Utorak\",\"Sreda\",\"Četvrtak\",\"Petak\",\"Subota\"]},sr:{months:[\"јануар\",\"фебруар\",\"март\",\"април\",\"мај\",\"јун\",\"јул\",\"август\",\"септембар\",\"октобар\",\"новембар\",\"децембар\"],dayOfWeekShort:[\"нед\",\"пон\",\"уто\",\"сре\",\"чет\",\"пет\",\"суб\"],dayOfWeek:[\"Недеља\",\"Понедељак\",\"Уторак\",\"Среда\",\"Четвртак\",\"Петак\",\"Субота\"]},sv:{months:[\"Januari\",\"Februari\",\"Mars\",\"April\",\"Maj\",\"Juni\",\"Juli\",\"Augusti\",\"September\",\"Oktober\",\"November\",\"December\"],dayOfWeekShort:[\"Sön\",\"Mån\",\"Tis\",\"Ons\",\"Tor\",\"Fre\",\"Lör\"],dayOfWeek:[\"Söndag\",\"Måndag\",\"Tisdag\",\"Onsdag\",\"Torsdag\",\"Fredag\",\"Lördag\"]},\"zh-TW\":{months:[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"],dayOfWeekShort:[\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"],dayOfWeek:[\"星期日\",\"星期一\",\"星期二\",\"星期三\",\"星期四\",\"星期五\",\"星期六\"]},zh:{months:[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"],dayOfWeekShort:[\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"],dayOfWeek:[\"星期日\",\"星期一\",\"星期二\",\"星期三\",\"星期四\",\"星期五\",\"星期六\"]},ug:{months:[\"1-ئاي\",\"2-ئاي\",\"3-ئاي\",\"4-ئاي\",\"5-ئاي\",\"6-ئاي\",\"7-ئاي\",\"8-ئاي\",\"9-ئاي\",\"10-ئاي\",\"11-ئاي\",\"12-ئاي\"],dayOfWeek:[\"يەكشەنبە\",\"دۈشەنبە\",\"سەيشەنبە\",\"چارشەنبە\",\"پەيشەنبە\",\"جۈمە\",\"شەنبە\"]},he:{months:[\"ינואר\",\"פברואר\",\"מרץ\",\"אפריל\",\"מאי\",\"יוני\",\"יולי\",\"אוגוסט\",\"ספטמבר\",\"אוקטובר\",\"נובמבר\",\"דצמבר\"],dayOfWeekShort:[\"א'\",\"ב'\",\"ג'\",\"ד'\",\"ה'\",\"ו'\",\"שבת\"],dayOfWeek:[\"ראשון\",\"שני\",\"שלישי\",\"רביעי\",\"חמישי\",\"שישי\",\"שבת\",\"ראשון\"]},hy:{months:[\"Հունվար\",\"Փետրվար\",\"Մարտ\",\"Ապրիլ\",\"Մայիս\",\"Հունիս\",\"Հուլիս\",\"Օգոստոս\",\"Սեպտեմբեր\",\"Հոկտեմբեր\",\"Նոյեմբեր\",\"Դեկտեմբեր\"],dayOfWeekShort:[\"Կի\",\"Երկ\",\"Երք\",\"Չոր\",\"Հնգ\",\"Ուրբ\",\"Շբթ\"],dayOfWeek:[\"Կիրակի\",\"Երկուշաբթի\",\"Երեքշաբթի\",\"Չորեքշաբթի\",\"Հինգշաբթի\",\"Ուրբաթ\",\"Շաբաթ\"]},kg:{months:[\"Үчтүн айы\",\"Бирдин айы\",\"Жалган Куран\",\"Чын Куран\",\"Бугу\",\"Кулжа\",\"Теке\",\"Баш Оона\",\"Аяк Оона\",\"Тогуздун айы\",\"Жетинин айы\",\"Бештин айы\"],dayOfWeekShort:[\"Жек\",\"Дүй\",\"Шей\",\"Шар\",\"Бей\",\"Жум\",\"Ише\"],dayOfWeek:[\"Жекшемб\",\"Дүйшөмб\",\"Шейшемб\",\"Шаршемб\",\"Бейшемби\",\"Жума\",\"Ишенб\"]},rm:{months:[\"Schaner\",\"Favrer\",\"Mars\",\"Avrigl\",\"Matg\",\"Zercladur\",\"Fanadur\",\"Avust\",\"Settember\",\"October\",\"November\",\"December\"],dayOfWeekShort:[\"Du\",\"Gli\",\"Ma\",\"Me\",\"Gie\",\"Ve\",\"So\"],dayOfWeek:[\"Dumengia\",\"Glindesdi\",\"Mardi\",\"Mesemna\",\"Gievgia\",\"Venderdi\",\"Sonda\"]},ka:{months:[\"იანვარი\",\"თებერვალი\",\"მარტი\",\"აპრილი\",\"მაისი\",\"ივნისი\",\"ივლისი\",\"აგვისტო\",\"სექტემბერი\",\"ოქტომბერი\",\"ნოემბერი\",\"დეკემბერი\"],dayOfWeekShort:[\"კვ\",\"ორშ\",\"სამშ\",\"ოთხ\",\"ხუთ\",\"პარ\",\"შაბ\"],dayOfWeek:[\"კვირა\",\"ორშაბათი\",\"სამშაბათი\",\"ოთხშაბათი\",\"ხუთშაბათი\",\"პარასკევი\",\"შაბათი\"]}},ownerDocument:document,contentWindow:window,value:\"\",rtl:!1,format:\"Y/m/d H:i\",formatTime:\"H:i\",formatDate:\"Y/m/d\",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,openOnFocus:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,minDateTime:!1,maxDateTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:\"\",touchMovedThreshold:5,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:\"xdsoft_next\",prev:\"xdsoft_prev\",dayOfWeekStart:0,parentID:\"body\",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:\"\",id:\"\",fixed:!1,roundTime:\"round\",className:\"\",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1,insideParent:!1},E=null,n=null,R=\"en\",a={meridiem:[\"AM\",\"PM\"]},r=function(){var e=s.i18n[R],t={days:e.dayOfWeek,daysShort:e.dayOfWeekShort,months:e.months,monthsShort:L.map(e.months,function(e){return e.substring(0,3)})};\"function\"==typeof DateFormatter&&(E=n=new DateFormatter({dateSettings:L.extend({},a,t)}))},o={moment:{default_options:{format:\"YYYY/MM/DD HH:mm\",formatDate:\"YYYY/MM/DD\",formatTime:\"HH:mm\"},formatter:{parseDate:function(e,t){if(i(t))return n.parseDate(e,t);var a=moment(e,t);return!!a.isValid()&&a.toDate()},formatDate:function(e,t){return i(t)?n.formatDate(e,t):moment(e).format(t)},formatMask:function(e){return e.replace(/Y{4}/g,\"9999\").replace(/Y{2}/g,\"99\").replace(/M{2}/g,\"19\").replace(/D{2}/g,\"39\").replace(/H{2}/g,\"29\").replace(/m{2}/g,\"59\").replace(/s{2}/g,\"59\")}}}};L.datetimepicker={setLocale:function(e){var t=s.i18n[e]?e:\"en\";R!==t&&(R=t,r())},setDateFormatter:function(e){if(\"string\"==typeof e&&o.hasOwnProperty(e)){var t=o[e];L.extend(s,t.default_options),E=t.formatter}else E=e}};var t={RFC_2822:\"D, d M Y H:i:s O\",ATOM:\"Y-m-dTH:i:sP\",ISO_8601:\"Y-m-dTH:i:sO\",RFC_822:\"D, d M y H:i:s O\",RFC_850:\"l, d-M-y H:i:s T\",RFC_1036:\"D, d M y H:i:s O\",RFC_1123:\"D, d M Y H:i:s O\",RSS:\"D, d M Y H:i:s O\",W3C:\"Y-m-dTH:i:sP\"},i=function(e){return-1!==Object.values(t).indexOf(e)};function m(e,t,a){this.date=e,this.desc=t,this.style=a}L.extend(L.datetimepicker,t),r(),window.getComputedStyle||(window.getComputedStyle=function(a){return this.el=a,this.getPropertyValue=function(e){var t=/(-([a-z]))/g;return\"float\"===e&&(e=\"styleFloat\"),t.test(e)&&(e=e.replace(t,function(e,t,a){return a.toUpperCase()})),a.currentStyle[e]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var a,n;for(a=t||0,n=this.length;a<n;a+=1)if(this[a]===e)return a;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},L.fn.xdsoftScroller=function(p,D){return this.each(function(){var o,i,s,d,u,l=L(this),a=function(e){var t,a={x:0,y:0};return\"touchstart\"===e.type||\"touchmove\"===e.type||\"touchend\"===e.type||\"touchcancel\"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a.x=t.clientX,a.y=t.clientY):\"mousedown\"!==e.type&&\"mouseup\"!==e.type&&\"mousemove\"!==e.type&&\"mouseover\"!==e.type&&\"mouseout\"!==e.type&&\"mouseenter\"!==e.type&&\"mouseleave\"!==e.type||(a.x=e.clientX,a.y=e.clientY),a},f=100,n=!1,r=0,c=0,m=0,t=!1,h=0,g=function(){};\"hide\"!==D?(L(this).hasClass(\"xdsoft_scroller_box\")||(o=l.children().eq(0),i=l[0].clientHeight,s=o[0].offsetHeight,d=L('<div class=\"xdsoft_scrollbar\"></div>'),u=L('<div class=\"xdsoft_scroller\"></div>'),d.append(u),l.addClass(\"xdsoft_scroller_box\").append(d),g=function(e){var t=a(e).y-r+h;t<0&&(t=0),t+u[0].offsetHeight>m&&(t=m-u[0].offsetHeight),l.trigger(\"scroll_element.xdsoft_scroller\",[f?t/f:0])},u.on(\"touchstart.xdsoft_scroller mousedown.xdsoft_scroller\",function(e){i||l.trigger(\"resize_scroll.xdsoft_scroller\",[D]),r=a(e).y,h=parseInt(u.css(\"margin-top\"),10),m=d[0].offsetHeight,\"mousedown\"===e.type||\"touchstart\"===e.type?(p.ownerDocument&&L(p.ownerDocument.body).addClass(\"xdsoft_noselect\"),L([p.ownerDocument.body,p.contentWindow]).on(\"touchend mouseup.xdsoft_scroller\",function e(){L([p.ownerDocument.body,p.contentWindow]).off(\"touchend mouseup.xdsoft_scroller\",e).off(\"mousemove.xdsoft_scroller\",g).removeClass(\"xdsoft_noselect\")}),L(p.ownerDocument.body).on(\"mousemove.xdsoft_scroller\",g)):(t=!0,e.stopPropagation(),e.preventDefault())}).on(\"touchmove\",function(e){t&&(e.preventDefault(),g(e))}).on(\"touchend touchcancel\",function(){t=!1,h=0}),l.on(\"scroll_element.xdsoft_scroller\",function(e,t){i||l.trigger(\"resize_scroll.xdsoft_scroller\",[t,!0]),t=1<t?1:t<0||isNaN(t)?0:t,u.css(\"margin-top\",f*t),setTimeout(function(){o.css(\"marginTop\",-parseInt((o[0].offsetHeight-i)*t,10))},10)}).on(\"resize_scroll.xdsoft_scroller\",function(e,t,a){var n,r;i=l[0].clientHeight,s=o[0].offsetHeight,r=(n=i/s)*d[0].offsetHeight,1<n?u.hide():(u.show(),u.css(\"height\",parseInt(10<r?r:10,10)),f=d[0].offsetHeight-u[0].offsetHeight,!0!==a&&l.trigger(\"scroll_element.xdsoft_scroller\",[t||Math.abs(parseInt(o.css(\"marginTop\"),10))/(s-i)]))}),l.on(\"mousewheel\",function(e){var t=Math.abs(parseInt(o.css(\"marginTop\"),10));return(t-=20*e.deltaY)<0&&(t=0),l.trigger(\"scroll_element.xdsoft_scroller\",[t/(s-i)]),e.stopPropagation(),!1}),l.on(\"touchstart\",function(e){n=a(e),c=Math.abs(parseInt(o.css(\"marginTop\"),10))}),l.on(\"touchmove\",function(e){if(n){e.preventDefault();var t=a(e);l.trigger(\"scroll_element.xdsoft_scroller\",[(c-(t.y-n.y))/(s-i)])}}),l.on(\"touchend touchcancel\",function(){n=!1,c=0})),l.trigger(\"resize_scroll.xdsoft_scroller\",[D])):l.find(\".xdsoft_scrollbar\").hide()})},L.fn.datetimepicker=function(H,a){var n,r,o=this,p=17,D=13,y=27,v=37,b=38,k=39,x=40,T=9,S=116,M=65,w=67,j=86,J=90,z=89,I=!1,N=L.isPlainObject(H)||!H?L.extend(!0,{},s,H):L.extend(!0,{},s),i=0;return n=function(O){var t,n,a,r,W,h,_=L('<div class=\"xdsoft_datetimepicker xdsoft_noselect\"></div>'),e=L('<div class=\"xdsoft_copyright\"><a target=\"_blank\" href=\"http://xdsoft.net/jqplugins/datetimepicker/\">xdsoft.net</a></div>'),g=L('<div class=\"xdsoft_datepicker active\"></div>'),F=L('<div class=\"xdsoft_monthpicker\"><button type=\"button\" class=\"xdsoft_prev\"></button><button type=\"button\" class=\"xdsoft_today_button\"></button><div class=\"xdsoft_label xdsoft_month\"><span></span><i></i></div><div class=\"xdsoft_label xdsoft_year\"><span></span><i></i></div><button type=\"button\" class=\"xdsoft_next\"></button></div>'),C=L('<div class=\"xdsoft_calendar\"></div>'),o=L('<div class=\"xdsoft_timepicker active\"><button type=\"button\" class=\"xdsoft_prev\"></button><div class=\"xdsoft_time_box\"></div><button type=\"button\" class=\"xdsoft_next\"></button></div>'),u=o.find(\".xdsoft_time_box\").eq(0),P=L('<div class=\"xdsoft_time_variant\"></div>'),i=L('<button type=\"button\" class=\"xdsoft_save_selected blue-gradient-button\">Save Selected</button>'),Y=L('<div class=\"xdsoft_select xdsoft_monthselect\"><div></div></div>'),A=L('<div class=\"xdsoft_select xdsoft_yearselect\"><div></div></div>'),s=!1,d=0;N.id&&_.attr(\"id\",N.id),N.style&&_.attr(\"style\",N.style),N.weeks&&_.addClass(\"xdsoft_showweeks\"),N.rtl&&_.addClass(\"xdsoft_rtl\"),_.addClass(\"xdsoft_\"+N.theme),_.addClass(N.className),F.find(\".xdsoft_month span\").after(Y),F.find(\".xdsoft_year span\").after(A),F.find(\".xdsoft_month,.xdsoft_year\").on(\"touchstart mousedown.xdsoft\",function(e){var t,a,n=L(this).find(\".xdsoft_select\").eq(0),r=0,o=0,i=n.is(\":visible\");for(F.find(\".xdsoft_select\").hide(),W.currentTime&&(r=W.currentTime[L(this).hasClass(\"xdsoft_month\")?\"getMonth\":\"getFullYear\"]()),n[i?\"hide\":\"show\"](),t=n.find(\"div.xdsoft_option\"),a=0;a<t.length&&t.eq(a).data(\"value\")!==r;a+=1)o+=t[0].offsetHeight;return n.xdsoftScroller(N,o/(n.children()[0].offsetHeight-n[0].clientHeight)),e.stopPropagation(),!1});var l=function(e){var t=e.originalEvent,a=t.touches?t.touches[0]:t;this.touchStartPosition=this.touchStartPosition||a;var n=Math.abs(this.touchStartPosition.clientX-a.clientX),r=Math.abs(this.touchStartPosition.clientY-a.clientY);Math.sqrt(n*n+r*r)>N.touchMovedThreshold&&(this.touchMoved=!0)};function f(){var e,t=!1;return N.startDate?t=W.strToDate(N.startDate):(t=N.value||(O&&O.val&&O.val()?O.val():\"\"))?(t=W.strToDateTime(t),N.yearOffset&&(t=new Date(t.getFullYear()-N.yearOffset,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))):N.defaultDate&&(t=W.strToDateTime(N.defaultDate),N.defaultTime&&(e=W.strtotime(N.defaultTime),t.setHours(e.getHours()),t.setMinutes(e.getMinutes()))),t&&W.isValidDate(t)?_.data(\"changed\",!0):t=\"\",t||0}function c(m){var h=function(e,t){var a=e.replace(/([\\[\\]\\/\\{\\}\\(\\)\\-\\.\\+]{1})/g,\"\\\\$1\").replace(/_/g,\"{digit+}\").replace(/([0-9]{1})/g,\"{digit$1}\").replace(/\\{digit([0-9]{1})\\}/g,\"[0-$1_]{1}\").replace(/\\{digit[\\+]\\}/g,\"[0-9_]{1}\");return new RegExp(a).test(t)},g=function(e,t){if(!(e=\"string\"==typeof e||e instanceof String?m.ownerDocument.getElementById(e):e))return!1;if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd(\"character\",t),a.moveStart(\"character\",t),a.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)};m.mask&&O.off(\"keydown.xdsoft\"),!0===m.mask&&(E.formatMask?m.mask=E.formatMask(m.format):m.mask=m.format.replace(/Y/g,\"9999\").replace(/F/g,\"9999\").replace(/m/g,\"19\").replace(/d/g,\"39\").replace(/H/g,\"29\").replace(/i/g,\"59\").replace(/s/g,\"59\")),\"string\"===L.type(m.mask)&&(h(m.mask,O.val())||(O.val(m.mask.replace(/[0-9]/g,\"_\")),g(O[0],0)),O.on(\"paste.xdsoft\",function(e){var t=(e.clipboardData||e.originalEvent.clipboardData||window.clipboardData).getData(\"text\"),a=this.value,n=this.selectionStart;return a=a.substr(0,n)+t+a.substr(n+t.length),n+=t.length,h(m.mask,a)?(this.value=a,g(this,n)):\"\"===L.trim(a)?this.value=m.mask.replace(/[0-9]/g,\"_\"):O.trigger(\"error_input.xdsoft\"),e.preventDefault(),!1}),O.on(\"keydown.xdsoft\",function(e){var t,a=this.value,n=e.which,r=this.selectionStart,o=this.selectionEnd,i=r!==o;if(48<=n&&n<=57||96<=n&&n<=105||8===n||46===n){for(t=8===n||46===n?\"_\":String.fromCharCode(96<=n&&n<=105?n-48:n),8===n&&r&&!i&&(r-=1);;){var s=m.mask.substr(r,1),d=r<m.mask.length,u=0<r;if(!(/[^0-9_]/.test(s)&&d&&u))break;r+=8!==n||i?1:-1}if(e.metaKey&&(i=!(r=0)),i){var l=o-r,f=m.mask.replace(/[0-9]/g,\"_\"),c=f.substr(r,l).substr(1);a=a.substr(0,r)+(t+c)+a.substr(r+l)}else{a=a.substr(0,r)+t+a.substr(r+1)}if(\"\"===L.trim(a))a=f;else if(r===m.mask.length)return e.preventDefault(),!1;for(r+=8===n?0:1;/[^0-9_]/.test(m.mask.substr(r,1))&&r<m.mask.length&&0<r;)r+=8===n?0:1;h(m.mask,a)?(this.value=a,g(this,r)):\"\"===L.trim(a)?this.value=m.mask.replace(/[0-9]/g,\"_\"):O.trigger(\"error_input.xdsoft\")}else if(-1!==[M,w,j,J,z].indexOf(n)&&I||-1!==[y,b,x,v,k,S,p,T,D].indexOf(n))return!0;return e.preventDefault(),!1}))}F.find(\".xdsoft_select\").xdsoftScroller(N).on(\"touchstart mousedown.xdsoft\",function(e){var t=e.originalEvent;this.touchMoved=!1,this.touchStartPosition=t.touches?t.touches[0]:t,e.stopPropagation(),e.preventDefault()}).on(\"touchmove\",\".xdsoft_option\",l).on(\"touchend mousedown.xdsoft\",\".xdsoft_option\",function(){if(!this.touchMoved){void 0!==W.currentTime&&null!==W.currentTime||(W.currentTime=W.now());var e=W.currentTime.getFullYear();W&&W.currentTime&&W.currentTime[L(this).parent().parent().hasClass(\"xdsoft_monthselect\")?\"setMonth\":\"setFullYear\"](L(this).data(\"value\")),L(this).parent().parent().hide(),_.trigger(\"xchange.xdsoft\"),N.onChangeMonth&&L.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(_,W.currentTime,_.data(\"input\")),e!==W.currentTime.getFullYear()&&L.isFunction(N.onChangeYear)&&N.onChangeYear.call(_,W.currentTime,_.data(\"input\"))}}),_.getValue=function(){return W.getCurrentTime()},_.setOptions=function(e){var l={};N=L.extend(!0,{},N,e),e.allowTimes&&L.isArray(e.allowTimes)&&e.allowTimes.length&&(N.allowTimes=L.extend(!0,[],e.allowTimes)),e.weekends&&L.isArray(e.weekends)&&e.weekends.length&&(N.weekends=L.extend(!0,[],e.weekends)),e.allowDates&&L.isArray(e.allowDates)&&e.allowDates.length&&(N.allowDates=L.extend(!0,[],e.allowDates)),e.allowDateRe&&\"[object String]\"===Object.prototype.toString.call(e.allowDateRe)&&(N.allowDateRe=new RegExp(e.allowDateRe)),e.highlightedDates&&L.isArray(e.highlightedDates)&&e.highlightedDates.length&&(L.each(e.highlightedDates,function(e,t){var a,n=L.map(t.split(\",\"),L.trim),r=new m(E.parseDate(n[0],N.formatDate),n[1],n[2]),o=E.formatDate(r.date,N.formatDate);void 0!==l[o]?(a=l[o].desc)&&a.length&&r.desc&&r.desc.length&&(l[o].desc=a+\"\\n\"+r.desc):l[o]=r}),N.highlightedDates=L.extend(!0,[],l)),e.highlightedPeriods&&L.isArray(e.highlightedPeriods)&&e.highlightedPeriods.length&&(l=L.extend(!0,[],N.highlightedDates),L.each(e.highlightedPeriods,function(e,t){var a,n,r,o,i,s,d;if(L.isArray(t))a=t[0],n=t[1],r=t[2],d=t[3];else{var u=L.map(t.split(\",\"),L.trim);a=E.parseDate(u[0],N.formatDate),n=E.parseDate(u[1],N.formatDate),r=u[2],d=u[3]}for(;a<=n;)o=new m(a,r,d),i=E.formatDate(a,N.formatDate),a.setDate(a.getDate()+1),void 0!==l[i]?(s=l[i].desc)&&s.length&&o.desc&&o.desc.length&&(l[i].desc=s+\"\\n\"+o.desc):l[i]=o}),N.highlightedDates=L.extend(!0,[],l)),e.disabledDates&&L.isArray(e.disabledDates)&&e.disabledDates.length&&(N.disabledDates=L.extend(!0,[],e.disabledDates)),e.disabledWeekDays&&L.isArray(e.disabledWeekDays)&&e.disabledWeekDays.length&&(N.disabledWeekDays=L.extend(!0,[],e.disabledWeekDays)),!N.open&&!N.opened||N.inline||O.trigger(\"open.xdsoft\"),N.inline&&(s=!0,_.addClass(\"xdsoft_inline\"),O.after(_).hide()),N.inverseButton&&(N.next=\"xdsoft_prev\",N.prev=\"xdsoft_next\"),N.datepicker?g.addClass(\"active\"):g.removeClass(\"active\"),N.timepicker?o.addClass(\"active\"):o.removeClass(\"active\"),N.value&&(W.setCurrentTime(N.value),O&&O.val&&O.val(W.str)),isNaN(N.dayOfWeekStart)?N.dayOfWeekStart=0:N.dayOfWeekStart=parseInt(N.dayOfWeekStart,10)%7,N.timepickerScrollbar||u.xdsoftScroller(N,\"hide\"),N.minDate&&/^[\\+\\-](.*)$/.test(N.minDate)&&(N.minDate=E.formatDate(W.strToDateTime(N.minDate),N.formatDate)),N.maxDate&&/^[\\+\\-](.*)$/.test(N.maxDate)&&(N.maxDate=E.formatDate(W.strToDateTime(N.maxDate),N.formatDate)),N.minDateTime&&/^\\+(.*)$/.test(N.minDateTime)&&(N.minDateTime=W.strToDateTime(N.minDateTime).dateFormat(N.formatDate)),N.maxDateTime&&/^\\+(.*)$/.test(N.maxDateTime)&&(N.maxDateTime=W.strToDateTime(N.maxDateTime).dateFormat(N.formatDate)),i.toggle(N.showApplyButton),F.find(\".xdsoft_today_button\").css(\"visibility\",N.todayButton?\"visible\":\"hidden\"),F.find(\".\"+N.prev).css(\"visibility\",N.prevButton?\"visible\":\"hidden\"),F.find(\".\"+N.next).css(\"visibility\",N.nextButton?\"visible\":\"hidden\"),c(N),N.validateOnBlur&&O.off(\"blur.xdsoft\").on(\"blur.xdsoft\",function(){if(N.allowBlank&&(!L.trim(L(this).val()).length||\"string\"==typeof N.mask&&L.trim(L(this).val())===N.mask.replace(/[0-9]/g,\"_\")))L(this).val(null),_.data(\"xdsoft_datetime\").empty();else{var e=E.parseDate(L(this).val(),N.format);if(e)L(this).val(E.formatDate(e,N.format));else{var t=+[L(this).val()[0],L(this).val()[1]].join(\"\"),a=+[L(this).val()[2],L(this).val()[3]].join(\"\");!N.datepicker&&N.timepicker&&0<=t&&t<24&&0<=a&&a<60?L(this).val([t,a].map(function(e){return 9<e?e:\"0\"+e}).join(\":\")):L(this).val(E.formatDate(W.now(),N.format))}_.data(\"xdsoft_datetime\").setCurrentTime(L(this).val())}_.trigger(\"changedatetime.xdsoft\"),_.trigger(\"close.xdsoft\")}),N.dayOfWeekStartPrev=0===N.dayOfWeekStart?6:N.dayOfWeekStart-1,_.trigger(\"xchange.xdsoft\").trigger(\"afterOpen.xdsoft\")},_.data(\"options\",N).on(\"touchstart mousedown.xdsoft\",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),Y.hide(),!1}),u.append(P),u.xdsoftScroller(N),_.on(\"afterOpen.xdsoft\",function(){u.xdsoftScroller(N)}),_.append(g).append(o),!0!==N.withoutCopyright&&_.append(e),g.append(F).append(C).append(i),N.insideParent?L(O).parent().append(_):L(N.parentID).append(_),W=new function(){var r=this;r.now=function(e){var t,a,n=new Date;return!e&&N.defaultDate&&(t=r.strToDateTime(N.defaultDate),n.setFullYear(t.getFullYear()),n.setMonth(t.getMonth()),n.setDate(t.getDate())),n.setFullYear(n.getFullYear()),!e&&N.defaultTime&&(a=r.strtotime(N.defaultTime),n.setHours(a.getHours()),n.setMinutes(a.getMinutes()),n.setSeconds(a.getSeconds()),n.setMilliseconds(a.getMilliseconds())),n},r.isValidDate=function(e){return\"[object Date]\"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},r.setCurrentTime=function(e,t){\"string\"==typeof e?r.currentTime=r.strToDateTime(e):r.isValidDate(e)?r.currentTime=e:e||t||!N.allowBlank||N.inline?r.currentTime=r.now():r.currentTime=null,_.trigger(\"xchange.xdsoft\")},r.empty=function(){r.currentTime=null},r.getCurrentTime=function(){return r.currentTime},r.nextMonth=function(){void 0!==r.currentTime&&null!==r.currentTime||(r.currentTime=r.now());var e,t=r.currentTime.getMonth()+1;return 12===t&&(r.currentTime.setFullYear(r.currentTime.getFullYear()+1),t=0),e=r.currentTime.getFullYear(),r.currentTime.setDate(Math.min(new Date(r.currentTime.getFullYear(),t+1,0).getDate(),r.currentTime.getDate())),r.currentTime.setMonth(t),N.onChangeMonth&&L.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(_,W.currentTime,_.data(\"input\")),e!==r.currentTime.getFullYear()&&L.isFunction(N.onChangeYear)&&N.onChangeYear.call(_,W.currentTime,_.data(\"input\")),_.trigger(\"xchange.xdsoft\"),t},r.prevMonth=function(){void 0!==r.currentTime&&null!==r.currentTime||(r.currentTime=r.now());var e=r.currentTime.getMonth()-1;return-1===e&&(r.currentTime.setFullYear(r.currentTime.getFullYear()-1),e=11),r.currentTime.setDate(Math.min(new Date(r.currentTime.getFullYear(),e+1,0).getDate(),r.currentTime.getDate())),r.currentTime.setMonth(e),N.onChangeMonth&&L.isFunction(N.onChangeMonth)&&N.onChangeMonth.call(_,W.currentTime,_.data(\"input\")),_.trigger(\"xchange.xdsoft\"),e},r.getWeekOfYear=function(e){if(N.onGetWeekOfYear&&L.isFunction(N.onGetWeekOfYear)){var t=N.onGetWeekOfYear.call(_,e);if(void 0!==t)return t}var a=new Date(e.getFullYear(),0,1);return 4!==a.getDay()&&a.setMonth(0,1+(4-a.getDay()+7)%7),Math.ceil(((e-a)/864e5+a.getDay()+1)/7)},r.strToDateTime=function(e){var t,a,n=[];return e&&e instanceof Date&&r.isValidDate(e)?e:((n=/^([+-]{1})(.*)$/.exec(e))&&(n[2]=E.parseDate(n[2],N.formatDate)),a=n&&n[2]?(t=n[2].getTime()-6e4*n[2].getTimezoneOffset(),new Date(r.now(!0).getTime()+parseInt(n[1]+\"1\",10)*t)):e?E.parseDate(e,N.format):r.now(),r.isValidDate(a)||(a=r.now()),a)},r.strToDate=function(e){if(e&&e instanceof Date&&r.isValidDate(e))return e;var t=e?E.parseDate(e,N.formatDate):r.now(!0);return r.isValidDate(t)||(t=r.now(!0)),t},r.strtotime=function(e){if(e&&e instanceof Date&&r.isValidDate(e))return e;var t=e?E.parseDate(e,N.formatTime):r.now(!0);return r.isValidDate(t)||(t=r.now(!0)),t},r.str=function(){var e=N.format;return N.yearOffset&&(e=(e=e.replace(\"Y\",r.currentTime.getFullYear()+N.yearOffset)).replace(\"y\",String(r.currentTime.getFullYear()+N.yearOffset).substring(2,4))),E.formatDate(r.currentTime,e)},r.currentTime=this.now()},i.on(\"touchend click\",function(e){e.preventDefault(),_.data(\"changed\",!0),W.setCurrentTime(f()),O.val(W.str()),_.trigger(\"close.xdsoft\")}),F.find(\".xdsoft_today_button\").on(\"touchend mousedown.xdsoft\",function(){_.data(\"changed\",!0),W.setCurrentTime(0,!0),_.trigger(\"afterOpen.xdsoft\")}).on(\"dblclick.xdsoft\",function(){var e,t,a=W.getCurrentTime();a=new Date(a.getFullYear(),a.getMonth(),a.getDate()),e=W.strToDate(N.minDate),a<(e=new Date(e.getFullYear(),e.getMonth(),e.getDate()))||(t=W.strToDate(N.maxDate),(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()))<a||(O.val(W.str()),O.trigger(\"change\"),_.trigger(\"close.xdsoft\")))}),F.find(\".xdsoft_prev,.xdsoft_next\").on(\"touchend mousedown.xdsoft\",function(){var a=L(this),n=0,r=!1;!function e(t){a.hasClass(N.next)?W.nextMonth():a.hasClass(N.prev)&&W.prevMonth(),N.monthChangeSpinner&&(r||(n=setTimeout(e,t||100)))}(500),L([N.ownerDocument.body,N.contentWindow]).on(\"touchend mouseup.xdsoft\",function e(){clearTimeout(n),r=!0,L([N.ownerDocument.body,N.contentWindow]).off(\"touchend mouseup.xdsoft\",e)})}),o.find(\".xdsoft_prev,.xdsoft_next\").on(\"touchend mousedown.xdsoft\",function(){var o=L(this),i=0,s=!1,d=110;!function e(t){var a=u[0].clientHeight,n=P[0].offsetHeight,r=Math.abs(parseInt(P.css(\"marginTop\"),10));o.hasClass(N.next)&&n-a-N.timeHeightInTimePicker>=r?P.css(\"marginTop\",\"-\"+(r+N.timeHeightInTimePicker)+\"px\"):o.hasClass(N.prev)&&0<=r-N.timeHeightInTimePicker&&P.css(\"marginTop\",\"-\"+(r-N.timeHeightInTimePicker)+\"px\"),u.trigger(\"scroll_element.xdsoft_scroller\",[Math.abs(parseInt(P[0].style.marginTop,10)/(n-a))]),d=10<d?10:d-10,s||(i=setTimeout(e,t||d))}(500),L([N.ownerDocument.body,N.contentWindow]).on(\"touchend mouseup.xdsoft\",function e(){clearTimeout(i),s=!0,L([N.ownerDocument.body,N.contentWindow]).off(\"touchend mouseup.xdsoft\",e)})}),t=0,_.on(\"xchange.xdsoft\",function(e){clearTimeout(t),t=setTimeout(function(){void 0!==W.currentTime&&null!==W.currentTime||(W.currentTime=W.now());for(var e,t,a,n,r,o,i,s,d,u,l=\"\",f=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),c=0,m=W.now(),h=!1,g=!1,p=!1,D=!1,y=[],v=!0,b=\"\";f.getDay()!==N.dayOfWeekStart;)f.setDate(f.getDate()-1);for(l+=\"<table><thead><tr>\",N.weeks&&(l+=\"<th></th>\"),e=0;e<7;e+=1)l+=\"<th>\"+N.i18n[R].dayOfWeekShort[(e+N.dayOfWeekStart)%7]+\"</th>\";for(l+=\"</tr></thead>\",l+=\"<tbody>\",!1!==N.maxDate&&(h=W.strToDate(N.maxDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate(),23,59,59,999)),!1!==N.minDate&&(g=W.strToDate(N.minDate),g=new Date(g.getFullYear(),g.getMonth(),g.getDate())),!1!==N.minDateTime&&(p=W.strToDate(N.minDateTime),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds())),!1!==N.maxDateTime&&(D=W.strToDate(N.maxDateTime),D=new Date(D.getFullYear(),D.getMonth(),D.getDate(),D.getHours(),D.getMinutes(),D.getSeconds())),!1!==D&&(u=31*(12*D.getFullYear()+D.getMonth())+D.getDate());c<W.currentTime.countDaysInMonth()||f.getDay()!==N.dayOfWeekStart||W.currentTime.getMonth()===f.getMonth();){y=[],c+=1,a=f.getDay(),n=f.getDate(),r=f.getFullYear(),M=f.getMonth(),o=W.getWeekOfYear(f),d=\"\",y.push(\"xdsoft_date\"),i=N.beforeShowDay&&L.isFunction(N.beforeShowDay.call)?N.beforeShowDay.call(_,f):null,N.allowDateRe&&\"[object RegExp]\"===Object.prototype.toString.call(N.allowDateRe)&&(N.allowDateRe.test(E.formatDate(f,N.formatDate))||y.push(\"xdsoft_disabled\")),N.allowDates&&0<N.allowDates.length&&-1===N.allowDates.indexOf(E.formatDate(f,N.formatDate))&&y.push(\"xdsoft_disabled\");var k=31*(12*f.getFullYear()+f.getMonth())+f.getDate();(!1!==h&&h<f||!1!==p&&f<p||!1!==g&&f<g||!1!==D&&u<k||i&&!1===i[0])&&y.push(\"xdsoft_disabled\"),-1!==N.disabledDates.indexOf(E.formatDate(f,N.formatDate))&&y.push(\"xdsoft_disabled\"),-1!==N.disabledWeekDays.indexOf(a)&&y.push(\"xdsoft_disabled\"),O.is(\"[disabled]\")&&y.push(\"xdsoft_disabled\"),i&&\"\"!==i[1]&&y.push(i[1]),W.currentTime.getMonth()!==M&&y.push(\"xdsoft_other_month\"),(N.defaultSelect||_.data(\"changed\"))&&E.formatDate(W.currentTime,N.formatDate)===E.formatDate(f,N.formatDate)&&y.push(\"xdsoft_current\"),E.formatDate(m,N.formatDate)===E.formatDate(f,N.formatDate)&&y.push(\"xdsoft_today\"),0!==f.getDay()&&6!==f.getDay()&&-1===N.weekends.indexOf(E.formatDate(f,N.formatDate))||y.push(\"xdsoft_weekend\"),void 0!==N.highlightedDates[E.formatDate(f,N.formatDate)]&&(t=N.highlightedDates[E.formatDate(f,N.formatDate)],y.push(void 0===t.style?\"xdsoft_highlighted_default\":t.style),d=void 0===t.desc?\"\":t.desc),N.beforeShowDay&&L.isFunction(N.beforeShowDay)&&y.push(N.beforeShowDay(f)),v&&(l+=\"<tr>\",v=!1,N.weeks&&(l+=\"<th>\"+o+\"</th>\")),l+='<td data-date=\"'+n+'\" data-month=\"'+M+'\" data-year=\"'+r+'\" class=\"xdsoft_date xdsoft_day_of_week'+f.getDay()+\" \"+y.join(\" \")+'\" title=\"'+d+'\"><div>'+n+\"</div></td>\",f.getDay()===N.dayOfWeekStartPrev&&(l+=\"</tr>\",v=!0),f.setDate(n+1)}l+=\"</tbody></table>\",C.html(l),F.find(\".xdsoft_label span\").eq(0).text(N.i18n[R].months[W.currentTime.getMonth()]),F.find(\".xdsoft_label span\").eq(1).text(W.currentTime.getFullYear()+N.yearOffset),M=b=\"\";var x=0;if(!1!==N.minTime){var T=W.strtotime(N.minTime);x=60*T.getHours()+T.getMinutes()}var S=1440;if(!1!==N.maxTime){T=W.strtotime(N.maxTime);S=60*T.getHours()+T.getMinutes()}if(!1!==N.minDateTime){T=W.strToDateTime(N.minDateTime);if(E.formatDate(W.currentTime,N.formatDate)===E.formatDate(T,N.formatDate)){var M=60*T.getHours()+T.getMinutes();x<M&&(x=M)}}if(!1!==N.maxDateTime){T=W.strToDateTime(N.maxDateTime);if(E.formatDate(W.currentTime,N.formatDate)===E.formatDate(T,N.formatDate))(M=60*T.getHours()+T.getMinutes())<S&&(S=M)}if(s=function(e,t){var a,n=W.now(),r=N.allowTimes&&L.isArray(N.allowTimes)&&N.allowTimes.length;n.setHours(e),e=parseInt(n.getHours(),10),n.setMinutes(t),t=parseInt(n.getMinutes(),10),y=[];var o=60*e+t;(O.is(\"[disabled]\")||S<=o||o<x)&&y.push(\"xdsoft_disabled\"),(a=new Date(W.currentTime)).setHours(parseInt(W.currentTime.getHours(),10)),r||a.setMinutes(Math[N.roundTime](W.currentTime.getMinutes()/N.step)*N.step),(N.initTime||N.defaultSelect||_.data(\"changed\"))&&a.getHours()===parseInt(e,10)&&(!r&&59<N.step||a.getMinutes()===parseInt(t,10))&&(N.defaultSelect||_.data(\"changed\")?y.push(\"xdsoft_current\"):N.initTime&&y.push(\"xdsoft_init_time\")),parseInt(m.getHours(),10)===parseInt(e,10)&&parseInt(m.getMinutes(),10)===parseInt(t,10)&&y.push(\"xdsoft_today\"),b+='<div class=\"xdsoft_time '+y.join(\" \")+'\" data-hour=\"'+e+'\" data-minute=\"'+t+'\">'+E.formatDate(n,N.formatTime)+\"</div>\"},N.allowTimes&&L.isArray(N.allowTimes)&&N.allowTimes.length)for(c=0;c<N.allowTimes.length;c+=1)s(W.strtotime(N.allowTimes[c]).getHours(),M=W.strtotime(N.allowTimes[c]).getMinutes());else for(e=c=0;c<(N.hours12?12:24);c+=1)for(e=0;e<60;e+=N.step){var w=60*c+e;w<x||(S<=w||s((c<10?\"0\":\"\")+c,M=(e<10?\"0\":\"\")+e))}for(P.html(b),H=\"\",c=parseInt(N.yearStart,10);c<=parseInt(N.yearEnd,10);c+=1)H+='<div class=\"xdsoft_option '+(W.currentTime.getFullYear()===c?\"xdsoft_current\":\"\")+'\" data-value=\"'+c+'\">'+(c+N.yearOffset)+\"</div>\";for(A.children().eq(0).html(H),c=parseInt(N.monthStart,10),H=\"\";c<=parseInt(N.monthEnd,10);c+=1)H+='<div class=\"xdsoft_option '+(W.currentTime.getMonth()===c?\"xdsoft_current\":\"\")+'\" data-value=\"'+c+'\">'+N.i18n[R].months[c]+\"</div>\";Y.children().eq(0).html(H),L(_).trigger(\"generate.xdsoft\")},10),e.stopPropagation()}).on(\"afterOpen.xdsoft\",function(){var e,t,a,n;N.timepicker&&(P.find(\".xdsoft_current\").length?e=\".xdsoft_current\":P.find(\".xdsoft_init_time\").length&&(e=\".xdsoft_init_time\"),e?(t=u[0].clientHeight,(a=P[0].offsetHeight)-t<(n=P.find(e).index()*N.timeHeightInTimePicker+1)&&(n=a-t),u.trigger(\"scroll_element.xdsoft_scroller\",[parseInt(n,10)/(a-t)])):u.trigger(\"scroll_element.xdsoft_scroller\",[0]))}),n=0,C.on(\"touchend click.xdsoft\",\"td\",function(e){e.stopPropagation(),n+=1;var t=L(this),a=W.currentTime;if(null==a&&(W.currentTime=W.now(),a=W.currentTime),t.hasClass(\"xdsoft_disabled\"))return!1;a.setDate(1),a.setFullYear(t.data(\"year\")),a.setMonth(t.data(\"month\")),a.setDate(t.data(\"date\")),_.trigger(\"select.xdsoft\",[a]),O.val(W.str()),N.onSelectDate&&L.isFunction(N.onSelectDate)&&N.onSelectDate.call(_,W.currentTime,_.data(\"input\"),e),_.data(\"changed\",!0),_.trigger(\"xchange.xdsoft\"),_.trigger(\"changedatetime.xdsoft\"),(1<n||!0===N.closeOnDateSelect||!1===N.closeOnDateSelect&&!N.timepicker)&&!N.inline&&_.trigger(\"close.xdsoft\"),setTimeout(function(){n=0},200)}),P.on(\"touchstart\",\"div\",function(e){this.touchMoved=!1}).on(\"touchmove\",\"div\",l).on(\"touchend click.xdsoft\",\"div\",function(e){if(!this.touchMoved){e.stopPropagation();var t=L(this),a=W.currentTime;if(null==a&&(W.currentTime=W.now(),a=W.currentTime),t.hasClass(\"xdsoft_disabled\"))return!1;a.setHours(t.data(\"hour\")),a.setMinutes(t.data(\"minute\")),_.trigger(\"select.xdsoft\",[a]),_.data(\"input\").val(W.str()),N.onSelectTime&&L.isFunction(N.onSelectTime)&&N.onSelectTime.call(_,W.currentTime,_.data(\"input\"),e),_.data(\"changed\",!0),_.trigger(\"xchange.xdsoft\"),_.trigger(\"changedatetime.xdsoft\"),!0!==N.inline&&!0===N.closeOnTimeSelect&&_.trigger(\"close.xdsoft\")}}),g.on(\"mousewheel.xdsoft\",function(e){return!N.scrollMonth||(e.deltaY<0?W.nextMonth():W.prevMonth(),!1)}),O.on(\"mousewheel.xdsoft\",function(e){return!N.scrollInput||(!N.datepicker&&N.timepicker?(0<=(a=P.find(\".xdsoft_current\").length?P.find(\".xdsoft_current\").eq(0).index():0)+e.deltaY&&a+e.deltaY<P.children().length&&(a+=e.deltaY),P.children().eq(a).length&&P.children().eq(a).trigger(\"mousedown\"),!1):N.datepicker&&!N.timepicker?(g.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),O.val&&O.val(W.str()),_.trigger(\"changedatetime.xdsoft\"),!1):void 0)}),_.on(\"changedatetime.xdsoft\",function(e){if(N.onChangeDateTime&&L.isFunction(N.onChangeDateTime)){var t=_.data(\"input\");N.onChangeDateTime.call(_,W.currentTime,t,e),delete N.value,t.trigger(\"change\")}}).on(\"generate.xdsoft\",function(){N.onGenerate&&L.isFunction(N.onGenerate)&&N.onGenerate.call(_,W.currentTime,_.data(\"input\")),s&&(_.trigger(\"afterOpen.xdsoft\"),s=!1)}).on(\"click.xdsoft\",function(e){e.stopPropagation()}),a=0,h=function(e,t){do{if(!(e=e.parentNode)||!1===t(e))break}while(\"HTML\"!==e.nodeName)},r=function(){var e,t,a,n,r,o,i,s,d,u,l,f,c;if(e=(s=_.data(\"input\")).offset(),t=s[0],u=\"top\",a=e.top+t.offsetHeight-1,n=e.left,r=\"absolute\",d=L(N.contentWindow).width(),f=L(N.contentWindow).height(),c=L(N.contentWindow).scrollTop(),N.ownerDocument.documentElement.clientWidth-e.left<g.parent().outerWidth(!0)){var m=g.parent().outerWidth(!0)-t.offsetWidth;n-=m}\"rtl\"===s.parent().css(\"direction\")&&(n-=_.outerWidth()-s.outerWidth()),N.fixed?(a-=c,n-=L(N.contentWindow).scrollLeft(),r=\"fixed\"):(i=!1,h(t,function(e){return null!==e&&(\"fixed\"===N.contentWindow.getComputedStyle(e).getPropertyValue(\"position\")?!(i=!0):void 0)}),i&&!N.insideParent?(r=\"fixed\",a+_.outerHeight()>f+c?(u=\"bottom\",a=f+c-e.top):a-=c):a+_[0].offsetHeight>f+c&&(a=e.top-_[0].offsetHeight+1),a<0&&(a=0),n+t.offsetWidth>d&&(n=d-t.offsetWidth)),o=_[0],h(o,function(e){if(\"relative\"===N.contentWindow.getComputedStyle(e).getPropertyValue(\"position\")&&d>=e.offsetWidth)return n-=(d-e.offsetWidth)/2,!1}),l={position:r,left:N.insideParent?t.offsetLeft:n,top:\"\",bottom:\"\"},N.insideParent?l[u]=t.offsetTop+t.offsetHeight:l[u]=a,_.css(l)},_.on(\"open.xdsoft\",function(e){var t=!0;N.onShow&&L.isFunction(N.onShow)&&(t=N.onShow.call(_,W.currentTime,_.data(\"input\"),e)),!1!==t&&(_.show(),r(),L(N.contentWindow).off(\"resize.xdsoft\",r).on(\"resize.xdsoft\",r),N.closeOnWithoutClick&&L([N.ownerDocument.body,N.contentWindow]).on(\"touchstart mousedown.xdsoft\",function e(){_.trigger(\"close.xdsoft\"),L([N.ownerDocument.body,N.contentWindow]).off(\"touchstart mousedown.xdsoft\",e)}))}).on(\"close.xdsoft\",function(e){var t=!0;F.find(\".xdsoft_month,.xdsoft_year\").find(\".xdsoft_select\").hide(),N.onClose&&L.isFunction(N.onClose)&&(t=N.onClose.call(_,W.currentTime,_.data(\"input\"),e)),!1===t||N.opened||N.inline||_.hide(),e.stopPropagation()}).on(\"toggle.xdsoft\",function(){_.is(\":visible\")?_.trigger(\"close.xdsoft\"):_.trigger(\"open.xdsoft\")}).data(\"input\",O),d=0,_.data(\"xdsoft_datetime\",W),_.setOptions(N),W.setCurrentTime(f()),O.data(\"xdsoft_datetimepicker\",_).on(\"open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart\",function(){O.is(\":disabled\")||O.data(\"xdsoft_datetimepicker\").is(\":visible\")&&N.closeOnInputClick||N.openOnFocus&&(clearTimeout(d),d=setTimeout(function(){O.is(\":disabled\")||(s=!0,W.setCurrentTime(f(),!0),N.mask&&c(N),_.trigger(\"open.xdsoft\"))},100))}).on(\"keydown.xdsoft\",function(e){var t,a=e.which;return-1!==[D].indexOf(a)&&N.enterLikeTab?(t=L(\"input:visible,textarea:visible,button:visible,a:visible\"),_.trigger(\"close.xdsoft\"),t.eq(t.index(this)+1).focus(),!1):-1!==[T].indexOf(a)?(_.trigger(\"close.xdsoft\"),!0):void 0}).on(\"blur.xdsoft\",function(){_.trigger(\"close.xdsoft\")})},r=function(e){var t=e.data(\"xdsoft_datetimepicker\");t&&(t.data(\"xdsoft_datetime\",null),t.remove(),e.data(\"xdsoft_datetimepicker\",null).off(\".xdsoft\"),L(N.contentWindow).off(\"resize.xdsoft\"),L([N.contentWindow,N.ownerDocument.body]).off(\"mousedown.xdsoft touchstart\"),e.unmousewheel&&e.unmousewheel())},L(N.ownerDocument).off(\"keydown.xdsoftctrl keyup.xdsoftctrl\").off(\"keydown.xdsoftcmd keyup.xdsoftcmd\").on(\"keydown.xdsoftctrl\",function(e){e.keyCode===p&&(I=!0)}).on(\"keyup.xdsoftctrl\",function(e){e.keyCode===p&&(I=!1)}).on(\"keydown.xdsoftcmd\",function(e){91===e.keyCode&&!0}).on(\"keyup.xdsoftcmd\",function(e){91===e.keyCode&&!1}),this.each(function(){var t,e=L(this).data(\"xdsoft_datetimepicker\");if(e){if(\"string\"===L.type(H))switch(H){case\"show\":L(this).select().focus(),e.trigger(\"open.xdsoft\");break;case\"hide\":e.trigger(\"close.xdsoft\");break;case\"toggle\":e.trigger(\"toggle.xdsoft\");break;case\"destroy\":r(L(this));break;case\"reset\":this.value=this.defaultValue,this.value&&e.data(\"xdsoft_datetime\").isValidDate(E.parseDate(this.value,N.format))||e.data(\"changed\",!1),e.data(\"xdsoft_datetime\").setCurrentTime(this.value);break;case\"validate\":e.data(\"input\").trigger(\"blur.xdsoft\");break;default:e[H]&&L.isFunction(e[H])&&(o=e[H](a))}else e.setOptions(H);return 0}\"string\"!==L.type(H)&&(!N.lazyInit||N.open||N.inline?n(L(this)):(t=L(this)).on(\"open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart\",function e(){t.is(\":disabled\")||t.data(\"xdsoft_datetimepicker\")||(clearTimeout(i),i=setTimeout(function(){t.data(\"xdsoft_datetimepicker\")||n(t),t.off(\"open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart\",e).trigger(\"open.xdsoft\")},100))}))}),o},L.fn.datetimepicker.defaults=s};!function(e){\"function\"==typeof define&&define.amd?define([\"jquery\",\"jquery-mousewheel\"],e):\"object\"==typeof exports?module.exports=e(require(\"jquery\")):e(jQuery)}(datetimepickerFactory),function(e){\"function\"==typeof define&&define.amd?define([\"jquery\"],e):\"object\"==typeof exports?module.exports=e:e(jQuery)}(function(c){var m,h,e=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],t=\"onwheel\"in document||9<=document.documentMode?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"],g=Array.prototype.slice;if(c.event.fixHooks)for(var a=e.length;a;)c.event.fixHooks[e[--a]]=c.event.mouseHooks;var p=c.event.special.mousewheel={version:\"3.1.12\",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],n,!1);else this.onmousewheel=n;c.data(this,\"mousewheel-line-height\",p.getLineHeight(this)),c.data(this,\"mousewheel-page-height\",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],n,!1);else this.onmousewheel=null;c.removeData(this,\"mousewheel-line-height\"),c.removeData(this,\"mousewheel-page-height\")},getLineHeight:function(e){var t=c(e),a=t[\"offsetParent\"in c.fn?\"offsetParent\":\"parent\"]();return a.length||(a=c(\"body\")),parseInt(a.css(\"fontSize\"),10)||parseInt(t.css(\"fontSize\"),10)||16},getPageHeight:function(e){return c(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function n(e){var t,a=e||window.event,n=g.call(arguments,1),r=0,o=0,i=0,s=0,d=0;if((e=c.event.fix(a)).type=\"mousewheel\",\"detail\"in a&&(i=-1*a.detail),\"wheelDelta\"in a&&(i=a.wheelDelta),\"wheelDeltaY\"in a&&(i=a.wheelDeltaY),\"wheelDeltaX\"in a&&(o=-1*a.wheelDeltaX),\"axis\"in a&&a.axis===a.HORIZONTAL_AXIS&&(o=-1*i,i=0),r=0===i?o:i,\"deltaY\"in a&&(r=i=-1*a.deltaY),\"deltaX\"in a&&(o=a.deltaX,0===i&&(r=-1*o)),0!==i||0!==o){if(1===a.deltaMode){var u=c.data(this,\"mousewheel-line-height\");r*=u,i*=u,o*=u}else if(2===a.deltaMode){var l=c.data(this,\"mousewheel-page-height\");r*=l,i*=l,o*=l}if(t=Math.max(Math.abs(i),Math.abs(o)),(!h||t<h)&&y(a,h=t)&&(h/=40),y(a,t)&&(r/=40,o/=40,i/=40),r=Math[1<=r?\"floor\":\"ceil\"](r/h),o=Math[1<=o?\"floor\":\"ceil\"](o/h),i=Math[1<=i?\"floor\":\"ceil\"](i/h),p.settings.normalizeOffset&&this.getBoundingClientRect){var f=this.getBoundingClientRect();s=e.clientX-f.left,d=e.clientY-f.top}return e.deltaX=o,e.deltaY=i,e.deltaFactor=h,e.offsetX=s,e.offsetY=d,e.deltaMode=0,n.unshift(e,r,o,i),m&&clearTimeout(m),m=setTimeout(D,200),(c.event.dispatch||c.event.handle).apply(this,n)}}function D(){h=null}function y(e,t){return p.settings.adjustOldDeltas&&\"mousewheel\"===e.type&&t%120==0}c.fn.extend({mousewheel:function(e){return e?this.bind(\"mousewheel\",e):this.trigger(\"mousewheel\")},unmousewheel:function(e){return this.unbind(\"mousewheel\",e)}})});","/*!\n * jQuery Mousewheel 3.1.13\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n */\n\n(function (factory) {\n    if ( typeof define === 'function' && define.amd ) {\n        // AMD. Register as an anonymous module.\n        define(['jquery'], factory);\n    } else if (typeof exports === 'object') {\n        // Node/CommonJS style for Browserify\n        module.exports = factory;\n    } else {\n        // Browser globals\n        factory(jQuery);\n    }\n}(function ($) {\n\n    var toFix  = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],\n        toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?\n                    ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],\n        slice  = Array.prototype.slice,\n        nullLowestDeltaTimeout, lowestDelta;\n\n    if ( $.event.fixHooks ) {\n        for ( var i = toFix.length; i; ) {\n            $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;\n        }\n    }\n\n    var special = $.event.special.mousewheel = {\n        version: '3.1.12',\n\n        setup: function() {\n            if ( this.addEventListener ) {\n                for ( var i = toBind.length; i; ) {\n                    this.addEventListener( toBind[--i], handler, false );\n                }\n            } else {\n                this.onmousewheel = handler;\n            }\n            // Store the line height and page height for this particular element\n            $.data(this, 'mousewheel-line-height', special.getLineHeight(this));\n            $.data(this, 'mousewheel-page-height', special.getPageHeight(this));\n        },\n\n        teardown: function() {\n            if ( this.removeEventListener ) {\n                for ( var i = toBind.length; i; ) {\n                    this.removeEventListener( toBind[--i], handler, false );\n                }\n            } else {\n                this.onmousewheel = null;\n            }\n            // Clean up the data we added to the element\n            $.removeData(this, 'mousewheel-line-height');\n            $.removeData(this, 'mousewheel-page-height');\n        },\n\n        getLineHeight: function(elem) {\n            var $elem = $(elem),\n                $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();\n            if (!$parent.length) {\n                $parent = $('body');\n            }\n            return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;\n        },\n\n        getPageHeight: function(elem) {\n            return $(elem).height();\n        },\n\n        settings: {\n            adjustOldDeltas: true, // see shouldAdjustOldDeltas() below\n            normalizeOffset: true  // calls getBoundingClientRect for each event\n        }\n    };\n\n    $.fn.extend({\n        mousewheel: function(fn) {\n            return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');\n        },\n\n        unmousewheel: function(fn) {\n            return this.unbind('mousewheel', fn);\n        }\n    });\n\n\n    function handler(event) {\n        var orgEvent   = event || window.event,\n            args       = slice.call(arguments, 1),\n            delta      = 0,\n            deltaX     = 0,\n            deltaY     = 0,\n            absDelta   = 0,\n            offsetX    = 0,\n            offsetY    = 0;\n        event = $.event.fix(orgEvent);\n        event.type = 'mousewheel';\n\n        // Old school scrollwheel delta\n        if ( 'detail'      in orgEvent ) { deltaY = orgEvent.detail * -1;      }\n        if ( 'wheelDelta'  in orgEvent ) { deltaY = orgEvent.wheelDelta;       }\n        if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY;      }\n        if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }\n\n        // Firefox < 17 horizontal scrolling related to DOMMouseScroll event\n        if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\n            deltaX = deltaY * -1;\n            deltaY = 0;\n        }\n\n        // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy\n        delta = deltaY === 0 ? deltaX : deltaY;\n\n        // New school wheel delta (wheel event)\n        if ( 'deltaY' in orgEvent ) {\n            deltaY = orgEvent.deltaY * -1;\n            delta  = deltaY;\n        }\n        if ( 'deltaX' in orgEvent ) {\n            deltaX = orgEvent.deltaX;\n            if ( deltaY === 0 ) { delta  = deltaX * -1; }\n        }\n\n        // No change actually happened, no reason to go any further\n        if ( deltaY === 0 && deltaX === 0 ) { return; }\n\n        // Need to convert lines and pages to pixels if we aren't already in pixels\n        // There are three delta modes:\n        //   * deltaMode 0 is by pixels, nothing to do\n        //   * deltaMode 1 is by lines\n        //   * deltaMode 2 is by pages\n        if ( orgEvent.deltaMode === 1 ) {\n            var lineHeight = $.data(this, 'mousewheel-line-height');\n            delta  *= lineHeight;\n            deltaY *= lineHeight;\n            deltaX *= lineHeight;\n        } else if ( orgEvent.deltaMode === 2 ) {\n            var pageHeight = $.data(this, 'mousewheel-page-height');\n            delta  *= pageHeight;\n            deltaY *= pageHeight;\n            deltaX *= pageHeight;\n        }\n\n        // Store lowest absolute delta to normalize the delta values\n        absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );\n\n        if ( !lowestDelta || absDelta < lowestDelta ) {\n            lowestDelta = absDelta;\n\n            // Adjust older deltas if necessary\n            if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\n                lowestDelta /= 40;\n            }\n        }\n\n        // Adjust older deltas if necessary\n        if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\n            // Divide all the things by 40!\n            delta  /= 40;\n            deltaX /= 40;\n            deltaY /= 40;\n        }\n\n        // Get a whole, normalized value for the deltas\n        delta  = Math[ delta  >= 1 ? 'floor' : 'ceil' ](delta  / lowestDelta);\n        deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);\n        deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);\n\n        // Normalise offsetX and offsetY properties\n        if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {\n            var boundingRect = this.getBoundingClientRect();\n            offsetX = event.clientX - boundingRect.left;\n            offsetY = event.clientY - boundingRect.top;\n        }\n\n        // Add information to the event object\n        event.deltaX = deltaX;\n        event.deltaY = deltaY;\n        event.deltaFactor = lowestDelta;\n        event.offsetX = offsetX;\n        event.offsetY = offsetY;\n        // Go ahead and set deltaMode to 0 since we converted to pixels\n        // Although this is a little odd since we overwrite the deltaX/Y\n        // properties with normalized deltas.\n        event.deltaMode = 0;\n\n        // Add event and delta to the front of the arguments\n        args.unshift(event, delta, deltaX, deltaY);\n\n        // Clearout lowestDelta after sometime to better\n        // handle multiple device types that give different\n        // a different lowestDelta\n        // Ex: trackpad = 3 and mouse wheel = 120\n        if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }\n        nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);\n\n        return ($.event.dispatch || $.event.handle).apply(this, args);\n    }\n\n    function nullLowestDelta() {\n        lowestDelta = null;\n    }\n\n    function shouldAdjustOldDeltas(orgEvent, absDelta) {\n        // If this is an older event and the delta is divisable by 120,\n        // then we are assuming that the browser is treating this as an\n        // older mouse wheel event and that we should divide the deltas\n        // by 40 to try and get a more usable deltaFactor.\n        // Side note, this actually impacts the reported scroll distance\n        // in older browsers and can cause scrolling to be slower than native.\n        // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.\n        return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;\n    }\n\n}));\n","﻿/**\n * jQuery.query - Query String Modification and Creation for jQuery\n * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)\n * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).\n * Date: 2009/8/13\n *\n * @author Blair Mitchelmore\n * @version 2.2.3\n *\n **/\nnew function(settings) { \n  // Various Settings\n  var $separator = settings.separator || '&';\n  var $spaces = settings.spaces === false ? false : true;\n  var $suffix = settings.suffix === false ? '' : '[]';\n  var $prefix = settings.prefix === false ? false : true;\n  var $hash = $prefix ? settings.hash === true ? \"#\" : \"?\" : \"\";\n  var $numbers = settings.numbers === false ? false : true;\n\n  jQuery.query = new function() {\n    var is = function(o, t) {\n      return o != undefined && o !== null && (!!t ? o.constructor == t : true);\n    };\n    var parse = function(path) {\n      var m, rx = /\\[([^[]*)\\]/g, match = /^([^[]+)(\\[.*\\])?$/.exec(path), base = match[1], tokens = [];\n      while (m = rx.exec(match[2])) tokens.push(m[1]);\n      return [base, tokens];\n    };\n    var set = function(target, tokens, value) {\n      var o, token = tokens.shift();\n      if (typeof target != 'object') target = null;\n      if (token === \"\") {\n        if (!target) target = [];\n        if (is(target, Array)) {\n          target.push(tokens.length == 0 ? value : set(null, tokens.slice(0), value));\n        } else if (is(target, Object)) {\n          var i = 0;\n          while (target[i++] != null);\n          target[--i] = tokens.length == 0 ? value : set(target[i], tokens.slice(0), value);\n        } else {\n          target = [];\n          target.push(tokens.length == 0 ? value : set(null, tokens.slice(0), value));\n        }\n      } else if (token && token.match(/^\\s*[0-9]+\\s*$/)) {\n        var index = parseInt(token, 10);\n        if (!target) target = [];\n        target[index] = tokens.length == 0 ? value : set(target[index], tokens.slice(0), value);\n      } else if (token) {\n        var index = token.replace(/^\\s*|\\s*$/g, \"\");\n        if (!target) target = {};\n        if (is(target, Array)) {\n          var temp = {};\n          for (var i = 0; i < target.length; ++i) {\n            temp[i] = target[i];\n          }\n          target = temp;\n        }\n        target[index] = tokens.length == 0 ? value : set(target[index], tokens.slice(0), value);\n      } else {\n        return value;\n      }\n      return target;\n    };\n    \n    var queryObject = function(a) {\n      var self = this;\n      self.keys = {};\n      \n      if (a.queryObject) {\n        jQuery.each(a.get(), function(key, val) {\n          self.SET(key, val);\n        });\n      } else {\n        self.parseNew.apply(self, arguments);\n      }\n      return self;\n    };\n    \n    queryObject.prototype = {\n      queryObject: true,\n      parseNew: function(){\n        var self = this;\n        self.keys = {};\n        jQuery.each(arguments, function() {\n          var q = \"\" + this;\n          q = q.replace(/^[?#]/,''); // remove any leading ? || #\n          q = q.replace(/[;&]$/,''); // remove any trailing & || ;\n          if ($spaces) q = q.replace(/[+]/g,' '); // replace +'s with spaces\n          \n          jQuery.each(q.split(/[&;]/), function(){\n            var key = decodeURIComponent(this.split('=')[0] || \"\");\n            var val = decodeURIComponent(this.split('=')[1] || \"\");\n            \n            if (!key) return;\n            \n            if ($numbers) {\n              if (/^[+-]?[0-9]+\\.[0-9]*$/.test(val)) // simple float regex\n                val = parseFloat(val);\n              else if (/^[+-]?[1-9][0-9]*$/.test(val)) // simple int regex\n                val = parseInt(val, 10);\n            }\n            \n            val = (!val && val !== 0) ? true : val;\n            \n            self.SET(key, val);\n          });\n        });\n        return self;\n      },\n      has: function(key, type) {\n        var value = this.get(key);\n        return is(value, type);\n      },\n      GET: function(key) {\n        if (!is(key)) return this.keys;\n        var parsed = parse(key), base = parsed[0], tokens = parsed[1];\n        var target = this.keys[base];\n        while (target != null && tokens.length != 0) {\n          target = target[tokens.shift()];\n        }\n        return typeof target == 'number' ? target : target || \"\";\n      },\n      get: function(key) {\n        var target = this.GET(key);\n        if (is(target, Object))\n          return jQuery.extend(true, {}, target);\n        else if (is(target, Array))\n          return target.slice(0);\n        return target;\n      },\n      SET: function(key, val) {\n        var value = !is(val) ? null : val;\n        var parsed = parse(key), base = parsed[0], tokens = parsed[1];\n        var target = this.keys[base];\n        this.keys[base] = set(target, tokens.slice(0), value);\n        return this;\n      },\n      set: function(key, val) {\n        return this.copy().SET(key, val);\n      },\n      REMOVE: function(key, val) {\n        if (val) {\n          var target = this.GET(key);\n          if (is(target, Array)) {\n            for (tval in target) {\n                target[tval] = target[tval].toString();\n            }\n            var index = $.inArray(val, target);\n            if (index >= 0) {\n              key = target.splice(index, 1);\n              key = key[index];\n            } else {\n              return;\n            }\n          } else if (val != target) {\n              return;\n          }\n        }\n        return this.SET(key, null).COMPACT();\n      },\n      remove: function(key, val) {\n        return this.copy().REMOVE(key, val);\n      },\n      EMPTY: function() {\n        var self = this;\n        jQuery.each(self.keys, function(key, value) {\n          delete self.keys[key];\n        });\n        return self;\n      },\n      load: function(url) {\n        var hash = url.replace(/^.*?[#](.+?)(?:\\?.+)?$/, \"$1\");\n        var search = url.replace(/^.*?[?](.+?)(?:#.+)?$/, \"$1\");\n        return new queryObject(url.length == search.length ? '' : search, url.length == hash.length ? '' : hash);\n      },\n      empty: function() {\n        return this.copy().EMPTY();\n      },\n      copy: function() {\n        return new queryObject(this);\n      },\n      COMPACT: function() {\n        function build(orig) {\n          var obj = typeof orig == \"object\" ? is(orig, Array) ? [] : {} : orig;\n          if (typeof orig == 'object') {\n            function add(o, key, value) {\n              if (is(o, Array))\n                o.push(value);\n              else\n                o[key] = value;\n            }\n            jQuery.each(orig, function(key, value) {\n              if (!is(value)) return true;\n              add(obj, key, build(value));\n            });\n          }\n          return obj;\n        }\n        this.keys = build(this.keys);\n        return this;\n      },\n      compact: function() {\n        return this.copy().COMPACT();\n      },\n      toString: function() {\n        var i = 0, queryString = [], chunks = [], self = this;\n        var encode = function(str) {\n          str = str + \"\";\n          str = encodeURIComponent(str);\n          if ($spaces) str = str.replace(/%20/g, \"+\");\n          return str;\n        };\n        var addFields = function(arr, key, value) {\n          if (!is(value) || value === false) return;\n          var o = [encode(key)];\n          if (value !== true) {\n            o.push(\"=\");\n            o.push(encode(value));\n          }\n          arr.push(o.join(\"\"));\n        };\n        var build = function(obj, base) {\n          var newKey = function(key) {\n            return !base || base == \"\" ? [key].join(\"\") : [base, \"[\", key, \"]\"].join(\"\");\n          };\n          jQuery.each(obj, function(key, value) {\n            if (typeof value == 'object') \n              build(value, newKey(key));\n            else\n              addFields(chunks, newKey(key), value);\n          });\n        };\n        \n        build(this.keys);\n        \n        if (chunks.length > 0) queryString.push($hash);\n        queryString.push(chunks.join($separator));\n        \n        return queryString.join(\"\");\n      }\n    };\n    \n    return new queryObject(location.search, location.hash);\n  };\n}(jQuery.query || {}); // Pass in jQuery.query as settings object\n","/* Tooltipster v3.3.0 */;(function(e,t,n){function s(t,n){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=e(t);this.$elProxy;this.elProxyPosition;this.enabled=true;this.options=e.extend({},i,n);this.mouseIsOverProxy=false;this.namespace=\"tooltipster-\"+Math.round(Math.random()*1e5);this.Status=\"hidden\";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(\".\",\"\");this.options.theme=this.options.theme.replace(\".\",\"\");this._init()}function o(t,n){var r=true;e.each(t,function(e,i){if(typeof n[e]===\"undefined\"||t[e]!==n[e]){r=false;return false}});return r}function f(){return!a&&u}function l(){var e=n.body||n.documentElement,t=e.style,r=\"transition\";if(typeof t[r]==\"string\"){return true}v=[\"Moz\",\"Webkit\",\"Khtml\",\"O\",\"ms\"],r=r.charAt(0).toUpperCase()+r.substr(1);for(var i=0;i<v.length;i++){if(typeof t[v[i]+r]==\"string\"){return true}}return false}var r=\"tooltipster\",i={animation:\"fade\",arrow:true,arrowColor:\"\",autoClose:true,content:null,contentAsHTML:false,contentCloning:true,debug:true,delay:200,minWidth:0,maxWidth:null,functionInit:function(e,t){},functionBefore:function(e,t){t()},functionReady:function(e,t){},functionAfter:function(e){},hideOnClick:false,icon:\"(?)\",iconCloning:true,iconDesktop:false,iconTouch:false,iconTheme:\"tooltipster-icon\",interactive:false,interactiveTolerance:350,multiple:false,offsetX:0,offsetY:0,onlyOne:false,position:\"top\",positionTracker:false,positionTrackerCallback:function(e){if(this.option(\"trigger\")==\"hover\"&&this.option(\"autoClose\")){this.hide()}},restoration:\"current\",speed:350,timer:0,theme:\"tooltipster-default\",touchDevices:true,trigger:\"hover\",updateAnimation:true};s.prototype={_init:function(){var t=this;if(n.querySelector){var r=null;if(t.$el.data(\"tooltipster-initialTitle\")===undefined){r=t.$el.attr(\"title\");if(r===undefined)r=null;t.$el.data(\"tooltipster-initialTitle\",r)}if(t.options.content!==null){t._content_set(t.options.content)}else{t._content_set(r)}var i=t.options.functionInit.call(t.$el,t.$el,t.Content);if(typeof i!==\"undefined\")t._content_set(i);t.$el.removeAttr(\"title\").addClass(\"tooltipstered\");if(!u&&t.options.iconDesktop||u&&t.options.iconTouch){if(typeof t.options.icon===\"string\"){t.$elProxy=e('<span class=\"'+t.options.iconTheme+'\"></span>');t.$elProxy.text(t.options.icon)}else{if(t.options.iconCloning)t.$elProxy=t.options.icon.clone(true);else t.$elProxy=t.options.icon}t.$elProxy.insertAfter(t.$el)}else{t.$elProxy=t.$el}if(t.options.trigger==\"hover\"){t.$elProxy.on(\"mouseenter.\"+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=true;t._show()}}).on(\"mouseleave.\"+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=false}});if(u&&t.options.touchDevices){t.$elProxy.on(\"touchstart.\"+t.namespace,function(){t._showNow()})}}else if(t.options.trigger==\"click\"){t.$elProxy.on(\"click.\"+t.namespace,function(){if(!f()||t.options.touchDevices){t._show()}})}}},_show:function(){var e=this;if(e.Status!=\"shown\"&&e.Status!=\"appearing\"){if(e.options.delay){e.timerShow=setTimeout(function(){if(e.options.trigger==\"click\"||e.options.trigger==\"hover\"&&e.mouseIsOverProxy){e._showNow()}},e.options.delay)}else e._showNow()}},_showNow:function(n){var r=this;r.options.functionBefore.call(r.$el,r.$el,function(){if(r.enabled&&r.Content!==null){if(n)r.callbacks.show.push(n);r.callbacks.hide=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;if(r.options.onlyOne){e(\".tooltipstered\").not(r.$el).each(function(t,n){var r=e(n),i=r.data(\"tooltipster-ns\");e.each(i,function(e,t){var n=r.data(t),i=n.status(),s=n.option(\"autoClose\");if(i!==\"hidden\"&&i!==\"disappearing\"&&s){n.hide()}})})}var i=function(){r.Status=\"shown\";e.each(r.callbacks.show,function(e,t){t.call(r.$el)});r.callbacks.show=[]};if(r.Status!==\"hidden\"){var s=0;if(r.Status===\"disappearing\"){r.Status=\"appearing\";if(l()){r.$tooltip.clearQueue().removeClass(\"tooltipster-dying\").addClass(\"tooltipster-\"+r.options.animation+\"-show\");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.stop().fadeIn(i)}}else if(r.Status===\"shown\"){i()}}else{r.Status=\"appearing\";var s=r.options.speed;r.bodyOverflowX=e(\"body\").css(\"overflow-x\");e(\"body\").css(\"overflow-x\",\"hidden\");var o=\"tooltipster-\"+r.options.animation,a=\"-webkit-transition-duration: \"+r.options.speed+\"ms; -webkit-animation-duration: \"+r.options.speed+\"ms; -moz-transition-duration: \"+r.options.speed+\"ms; -moz-animation-duration: \"+r.options.speed+\"ms; -o-transition-duration: \"+r.options.speed+\"ms; -o-animation-duration: \"+r.options.speed+\"ms; -ms-transition-duration: \"+r.options.speed+\"ms; -ms-animation-duration: \"+r.options.speed+\"ms; transition-duration: \"+r.options.speed+\"ms; animation-duration: \"+r.options.speed+\"ms;\",f=r.options.minWidth?\"min-width:\"+Math.round(r.options.minWidth)+\"px;\":\"\",c=r.options.maxWidth?\"max-width:\"+Math.round(r.options.maxWidth)+\"px;\":\"\",h=r.options.interactive?\"pointer-events: auto;\":\"\";r.$tooltip=e('<div class=\"tooltipster-base '+r.options.theme+'\" style=\"'+f+\" \"+c+\" \"+h+\" \"+a+'\"><div class=\"tooltipster-content\"></div></div>');if(l())r.$tooltip.addClass(o);r._content_insert();r.$tooltip.appendTo(\"body\");r.reposition();r.options.functionReady.call(r.$el,r.$el,r.$tooltip);if(l()){r.$tooltip.addClass(o+\"-show\");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.css(\"display\",\"none\").fadeIn(r.options.speed,i)}r._interval_set();e(t).on(\"scroll.\"+r.namespace+\" resize.\"+r.namespace,function(){r.reposition()});if(r.options.autoClose){e(\"body\").off(\".\"+r.namespace);if(r.options.trigger==\"hover\"){if(u){setTimeout(function(){e(\"body\").on(\"touchstart.\"+r.namespace,function(){r.hide()})},0)}if(r.options.interactive){if(u){r.$tooltip.on(\"touchstart.\"+r.namespace,function(e){e.stopPropagation()})}var p=null;r.$elProxy.add(r.$tooltip).on(\"mouseleave.\"+r.namespace+\"-autoClose\",function(){clearTimeout(p);p=setTimeout(function(){r.hide()},r.options.interactiveTolerance)}).on(\"mouseenter.\"+r.namespace+\"-autoClose\",function(){clearTimeout(p)})}else{r.$elProxy.on(\"mouseleave.\"+r.namespace+\"-autoClose\",function(){r.hide()})}if(r.options.hideOnClick){r.$elProxy.on(\"click.\"+r.namespace+\"-autoClose\",function(){r.hide()})}}else if(r.options.trigger==\"click\"){setTimeout(function(){e(\"body\").on(\"click.\"+r.namespace+\" touchstart.\"+r.namespace,function(){r.hide()})},0);if(r.options.interactive){r.$tooltip.on(\"click.\"+r.namespace+\" touchstart.\"+r.namespace,function(e){e.stopPropagation()})}}}}if(r.options.timer>0){r.timerHide=setTimeout(function(){r.timerHide=null;r.hide()},r.options.timer+s)}}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(e(\"body\").find(t.$el).length===0||e(\"body\").find(t.$elProxy).length===0||t.Status==\"hidden\"||e(\"body\").find(t.$tooltip).length===0){if(t.Status==\"shown\"||t.Status==\"appearing\")t.hide();t._interval_cancel()}else{if(t.options.positionTracker){var n=t._repositionInfo(t.$elProxy),r=false;if(o(n.dimension,t.elProxyPosition.dimension)){if(t.$elProxy.css(\"position\")===\"fixed\"){if(o(n.position,t.elProxyPosition.position))r=true}else{if(o(n.offset,t.elProxyPosition.offset))r=true}}if(!r){t.reposition();t.options.positionTrackerCallback.call(t,t.$el)}}}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(e){if(typeof e===\"object\"&&e!==null&&this.options.contentCloning){e=e.clone(true)}this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(\".tooltipster-content\");if(typeof e.Content===\"string\"&&!e.options.contentAsHTML){t.text(e.Content)}else{t.empty().append(e.Content)}},_update:function(e){var t=this;t._content_set(e);if(t.Content!==null){if(t.Status!==\"hidden\"){t._content_insert();t.reposition();if(t.options.updateAnimation){if(l()){t.$tooltip.css({width:\"\",\"-webkit-transition\":\"all \"+t.options.speed+\"ms, width 0ms, height 0ms, left 0ms, top 0ms\",\"-moz-transition\":\"all \"+t.options.speed+\"ms, width 0ms, height 0ms, left 0ms, top 0ms\",\"-o-transition\":\"all \"+t.options.speed+\"ms, width 0ms, height 0ms, left 0ms, top 0ms\",\"-ms-transition\":\"all \"+t.options.speed+\"ms, width 0ms, height 0ms, left 0ms, top 0ms\",transition:\"all \"+t.options.speed+\"ms, width 0ms, height 0ms, left 0ms, top 0ms\"}).addClass(\"tooltipster-content-changing\");setTimeout(function(){if(t.Status!=\"hidden\"){t.$tooltip.removeClass(\"tooltipster-content-changing\");setTimeout(function(){if(t.Status!==\"hidden\"){t.$tooltip.css({\"-webkit-transition\":t.options.speed+\"ms\",\"-moz-transition\":t.options.speed+\"ms\",\"-o-transition\":t.options.speed+\"ms\",\"-ms-transition\":t.options.speed+\"ms\",transition:t.options.speed+\"ms\"})}},t.options.speed)}},t.options.speed)}else{t.$tooltip.fadeTo(t.options.speed,.5,function(){if(t.Status!=\"hidden\"){t.$tooltip.fadeTo(t.options.speed,1)}})}}}}else{t.hide()}},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(false),width:e.outerWidth(false)},offset:e.offset(),position:{left:parseInt(e.css(\"left\")),top:parseInt(e.css(\"top\"))}}},hide:function(n){var r=this;if(n)r.callbacks.hide.push(n);r.callbacks.show=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;var i=function(){e.each(r.callbacks.hide,function(e,t){t.call(r.$el)});r.callbacks.hide=[]};if(r.Status==\"shown\"||r.Status==\"appearing\"){r.Status=\"disappearing\";var s=function(){r.Status=\"hidden\";if(typeof r.Content==\"object\"&&r.Content!==null){r.Content.detach()}r.$tooltip.remove();r.$tooltip=null;e(t).off(\".\"+r.namespace);e(\"body\").off(\".\"+r.namespace).css(\"overflow-x\",r.bodyOverflowX);e(\"body\").off(\".\"+r.namespace);r.$elProxy.off(\".\"+r.namespace+\"-autoClose\");r.options.functionAfter.call(r.$el,r.$el);i()};if(l()){r.$tooltip.clearQueue().removeClass(\"tooltipster-\"+r.options.animation+\"-show\").addClass(\"tooltipster-dying\");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(s)}else{r.$tooltip.stop().fadeOut(r.options.speed,s)}}else if(r.Status==\"hidden\"){i()}return r},show:function(e){this._showNow(e);return this},update:function(e){return this.content(e)},content:function(e){if(typeof e===\"undefined\"){return this.Content}else{this._update(e);return this}},reposition:function(){var n=this;if(e(\"body\").find(n.$tooltip).length!==0){n.$tooltip.css(\"width\",\"\");n.elProxyPosition=n._repositionInfo(n.$elProxy);var r=null,i=e(t).width(),s=n.elProxyPosition,o=n.$tooltip.outerWidth(false),u=n.$tooltip.innerWidth()+1,a=n.$tooltip.outerHeight(false);if(n.$elProxy.is(\"area\")){var f=n.$elProxy.attr(\"shape\"),l=n.$elProxy.parent().attr(\"name\"),c=e('img[usemap=\"#'+l+'\"]'),h=c.offset().left,p=c.offset().top,d=n.$elProxy.attr(\"coords\")!==undefined?n.$elProxy.attr(\"coords\").split(\",\"):undefined;if(f==\"circle\"){var v=parseInt(d[0]),m=parseInt(d[1]),g=parseInt(d[2]);s.dimension.height=g*2;s.dimension.width=g*2;s.offset.top=p+m-g;s.offset.left=h+v-g}else if(f==\"rect\"){var v=parseInt(d[0]),m=parseInt(d[1]),y=parseInt(d[2]),b=parseInt(d[3]);s.dimension.height=b-m;s.dimension.width=y-v;s.offset.top=p+m;s.offset.left=h+v}else if(f==\"poly\"){var w=[],E=[],S=0,x=0,T=0,N=0,C=\"even\";for(var k=0;k<d.length;k++){var L=parseInt(d[k]);if(C==\"even\"){if(L>T){T=L;if(k===0){S=T}}if(L<S){S=L}C=\"odd\"}else{if(L>N){N=L;if(k==1){x=N}}if(L<x){x=L}C=\"even\"}}s.dimension.height=N-x;s.dimension.width=T-S;s.offset.top=p+x;s.offset.left=h+S}else{s.dimension.height=c.outerHeight(false);s.dimension.width=c.outerWidth(false);s.offset.top=p;s.offset.left=h}}var A=0,O=0,M=0,_=parseInt(n.options.offsetY),D=parseInt(n.options.offsetX),P=n.options.position;function H(){var n=e(t).scrollLeft();if(A-n<0){r=A-n;A=n}if(A+o-n>i){r=A-(i+n-o);A=i+n-o}}function B(n,r){if(s.offset.top-e(t).scrollTop()-a-_-12<0&&r.indexOf(\"top\")>-1){P=n}if(s.offset.top+s.dimension.height+a+12+_>e(t).scrollTop()+e(t).height()&&r.indexOf(\"bottom\")>-1){P=n;M=s.offset.top-a-_-12}}if(P==\"top\"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left+D-j/2;M=s.offset.top-a-_-12;H();B(\"bottom\",\"top\")}if(P==\"top-left\"){A=s.offset.left+D;M=s.offset.top-a-_-12;H();B(\"bottom-left\",\"top-left\")}if(P==\"top-right\"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top-a-_-12;H();B(\"bottom-right\",\"top-right\")}if(P==\"bottom\"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left-j/2+D;M=s.offset.top+s.dimension.height+_+12;H();B(\"top\",\"bottom\")}if(P==\"bottom-left\"){A=s.offset.left+D;M=s.offset.top+s.dimension.height+_+12;H();B(\"top-left\",\"bottom-left\")}if(P==\"bottom-right\"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top+s.dimension.height+_+12;H();B(\"top-right\",\"bottom-right\")}if(P==\"left\"){A=s.offset.left-D-o-12;O=s.offset.left+D+s.dimension.width+12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A<0&&O+o>i){var I=parseFloat(n.$tooltip.css(\"border-width\"))*2,q=o+A-I;n.$tooltip.css(\"width\",q+\"px\");a=n.$tooltip.outerHeight(false);A=s.offset.left-D-q-12-I;F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A<0){A=s.offset.left+D+s.dimension.width+12;r=\"left\"}}if(P==\"right\"){A=s.offset.left+D+s.dimension.width+12;O=s.offset.left-D-o-12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A+o>i&&O<0){var I=parseFloat(n.$tooltip.css(\"border-width\"))*2,q=i-A-I;n.$tooltip.css(\"width\",q+\"px\");a=n.$tooltip.outerHeight(false);F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A+o>i){A=s.offset.left-D-o-12;r=\"right\"}}if(n.options.arrow){var R=\"tooltipster-arrow-\"+P;if(n.options.arrowColor.length<1){var U=n.$tooltip.css(\"background-color\")}else{var U=n.options.arrowColor}if(!r){r=\"\"}else if(r==\"left\"){R=\"tooltipster-arrow-right\";r=\"\"}else if(r==\"right\"){R=\"tooltipster-arrow-left\";r=\"\"}else{r=\"left:\"+Math.round(r)+\"px;\"}if(P==\"top\"||P==\"top-left\"||P==\"top-right\"){var z=parseFloat(n.$tooltip.css(\"border-bottom-width\")),W=n.$tooltip.css(\"border-bottom-color\")}else if(P==\"bottom\"||P==\"bottom-left\"||P==\"bottom-right\"){var z=parseFloat(n.$tooltip.css(\"border-top-width\")),W=n.$tooltip.css(\"border-top-color\")}else if(P==\"left\"){var z=parseFloat(n.$tooltip.css(\"border-right-width\")),W=n.$tooltip.css(\"border-right-color\")}else if(P==\"right\"){var z=parseFloat(n.$tooltip.css(\"border-left-width\")),W=n.$tooltip.css(\"border-left-color\")}else{var z=parseFloat(n.$tooltip.css(\"border-bottom-width\")),W=n.$tooltip.css(\"border-bottom-color\")}if(z>1){z++}var X=\"\";if(z!==0){var V=\"\",J=\"border-color: \"+W+\";\";if(R.indexOf(\"bottom\")!==-1){V=\"margin-top: -\"+Math.round(z)+\"px;\"}else if(R.indexOf(\"top\")!==-1){V=\"margin-bottom: -\"+Math.round(z)+\"px;\"}else if(R.indexOf(\"left\")!==-1){V=\"margin-right: -\"+Math.round(z)+\"px;\"}else if(R.indexOf(\"right\")!==-1){V=\"margin-left: -\"+Math.round(z)+\"px;\"}X='<span class=\"tooltipster-arrow-border\" style=\"'+V+\" \"+J+';\"></span>'}n.$tooltip.find(\".tooltipster-arrow\").remove();var K='<div class=\"'+R+' tooltipster-arrow\" style=\"'+r+'\">'+X+'<span style=\"border-color:'+U+';\"></span></div>';n.$tooltip.append(K)}n.$tooltip.css({top:Math.round(M)+\"px\",left:Math.round(A)+\"px\"})}return n},enable:function(){this.enabled=true;return this},disable:function(){this.hide();this.enabled=false;return this},destroy:function(){var t=this;t.hide();if(t.$el[0]!==t.$elProxy[0]){t.$elProxy.remove()}t.$el.removeData(t.namespace).off(\".\"+t.namespace);var n=t.$el.data(\"tooltipster-ns\");if(n.length===1){var r=null;if(t.options.restoration===\"previous\"){r=t.$el.data(\"tooltipster-initialTitle\")}else if(t.options.restoration===\"current\"){r=typeof t.Content===\"string\"?t.Content:e(\"<div></div>\").append(t.Content).html()}if(r){t.$el.attr(\"title\",r)}t.$el.removeClass(\"tooltipstered\").removeData(\"tooltipster-ns\").removeData(\"tooltipster-initialTitle\")}else{n=e.grep(n,function(e,n){return e!==t.namespace});t.$el.data(\"tooltipster-ns\",n)}return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(e,t){if(typeof t==\"undefined\")return this.options[e];else{this.options[e]=t;return this}},status:function(){return this.Status}};e.fn[r]=function(){var t=arguments;if(this.length===0){if(typeof t[0]===\"string\"){var n=true;switch(t[0]){case\"setDefaults\":e.extend(i,t[1]);break;default:n=false;break}if(n)return true;else return this}else{return this}}else{if(typeof t[0]===\"string\"){var r=\"#*$~&\";this.each(function(){var n=e(this).data(\"tooltipster-ns\"),i=n?e(this).data(n[0]):null;if(i){if(typeof i[t[0]]===\"function\"){var s=i[t[0]](t[1],t[2])}else{throw new Error('Unknown method .tooltipster(\"'+t[0]+'\")')}if(s!==i){r=s;return false}}else{throw new Error(\"You called Tooltipster's \\\"\"+t[0]+'\" method on an uninitialized element')}});return r!==\"#*$~&\"?r:this}else{var o=[],u=t[0]&&typeof t[0].multiple!==\"undefined\",a=u&&t[0].multiple||!u&&i.multiple,f=t[0]&&typeof t[0].debug!==\"undefined\",l=f&&t[0].debug||!f&&i.debug;this.each(function(){var n=false,r=e(this).data(\"tooltipster-ns\"),i=null;if(!r){n=true}else if(a){n=true}else if(l){console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the \"multiple\" option to attach more tooltips.')}if(n){i=new s(this,t[0]);if(!r)r=[];r.push(i.namespace);e(this).data(\"tooltipster-ns\",r);e(this).data(i.namespace,i)}o.push(i)});if(a)return o;else return this}}};var u=!!(\"ontouchstart\"in t);var a=false;e(\"body\").one(\"mousemove\",function(){a=true})})(jQuery,window,document);","/*!\n * jQuery UI :data 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :data Selector\n//>>group: Core\n//>>description: Selects elements which have data stored under the specified key.\n//>>docs: http://api.jqueryui.com/data-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.extend( $.expr.pseudos, {\n\tdata: $.expr.createPseudo ?\n\t\t$.expr.createPseudo( function( dataName ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t};\n\t\t} ) :\n\n\t\t// Support: jQuery <1.8\n\t\tfunction( elem, i, match ) {\n\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t}\n} );\n} );\n","/*!\n * jQuery UI Disable Selection 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: disableSelection\n//>>group: Core\n//>>description: Disable selection of text content within the set of matched elements.\n//>>docs: http://api.jqueryui.com/disableSelection/\n\n// This file is deprecated\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.extend( {\n\tdisableSelection: ( function() {\n\t\tvar eventType = \"onselectstart\" in document.createElement( \"div\" ) ?\n\t\t\t\"selectstart\" :\n\t\t\t\"mousedown\";\n\n\t\treturn function() {\n\t\t\treturn this.on( eventType + \".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tenableSelection: function() {\n\t\treturn this.off( \".ui-disableSelection\" );\n\t}\n} );\n\n} );\n","/*!\n * jQuery UI Focusable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :focusable Selector\n//>>group: Core\n//>>description: Selects elements which can be focused.\n//>>docs: http://api.jqueryui.com/focusable-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// Selectors\n$.ui.focusable = function( element, hasTabindex ) {\n\tvar map, mapName, img, focusableIfVisible, fieldset,\n\t\tnodeName = element.nodeName.toLowerCase();\n\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap='#\" + mapName + \"']\" );\n\t\treturn img.length > 0 && img.is( \":visible\" );\n\t}\n\n\tif ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {\n\t\tfocusableIfVisible = !element.disabled;\n\n\t\tif ( focusableIfVisible ) {\n\n\t\t\t// Form controls within a disabled fieldset are disabled.\n\t\t\t// However, controls within the fieldset's legend do not get disabled.\n\t\t\t// Since controls generally aren't placed inside legends, we skip\n\t\t\t// this portion of the check.\n\t\t\tfieldset = $( element ).closest( \"fieldset\" )[ 0 ];\n\t\t\tif ( fieldset ) {\n\t\t\t\tfocusableIfVisible = !fieldset.disabled;\n\t\t\t}\n\t\t}\n\t} else if ( \"a\" === nodeName ) {\n\t\tfocusableIfVisible = element.href || hasTabindex;\n\t} else {\n\t\tfocusableIfVisible = hasTabindex;\n\t}\n\n\treturn focusableIfVisible && $( element ).is( \":visible\" ) && visible( $( element ) );\n};\n\n// Support: IE 8 only\n// IE 8 doesn't resolve inherit to visible/hidden for computed values\nfunction visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility === \"visible\";\n}\n\n$.extend( $.expr.pseudos, {\n\tfocusable: function( element ) {\n\t\treturn $.ui.focusable( element, $.attr( element, \"tabindex\" ) != null );\n\t}\n} );\n\nreturn $.ui.focusable;\n\n} );\n","/*!\n * jQuery UI Form Reset Mixin 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Form Reset Mixin\n//>>group: Core\n//>>description: Refresh input widgets when their form is reset\n//>>docs: http://api.jqueryui.com/form-reset-mixin/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./form\",\n\t\t\t\"./version\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.formResetMixin = {\n\t_formResetHandler: function() {\n\t\tvar form = $( this );\n\n\t\t// Wait for the form reset to actually happen before refreshing\n\t\tsetTimeout( function() {\n\t\t\tvar instances = form.data( \"ui-form-reset-instances\" );\n\t\t\t$.each( instances, function() {\n\t\t\t\tthis.refresh();\n\t\t\t} );\n\t\t} );\n\t},\n\n\t_bindFormResetHandler: function() {\n\t\tthis.form = this.element._form();\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" ) || [];\n\t\tif ( !instances.length ) {\n\n\t\t\t// We don't use _on() here because we use a single event handler per form\n\t\t\tthis.form.on( \"reset.ui-form-reset\", this._formResetHandler );\n\t\t}\n\t\tinstances.push( this );\n\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t},\n\n\t_unbindFormResetHandler: function() {\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" );\n\t\tinstances.splice( $.inArray( this, instances ), 1 );\n\t\tif ( instances.length ) {\n\t\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t\t} else {\n\t\t\tthis.form\n\t\t\t\t.removeData( \"ui-form-reset-instances\" )\n\t\t\t\t.off( \"reset.ui-form-reset\" );\n\t\t}\n\t}\n};\n\n} );\n","( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// Support: IE8 Only\n// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop\n// with a string, so we need to find the proper form.\nreturn $.fn._form = function() {\n\treturn typeof this[ 0 ].form === \"string\" ? this.closest( \"form\" ) : $( this[ 0 ].form );\n};\n\n} );\n","( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// This file is deprecated\nreturn $.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n} );\n","/*!\n * jQuery UI Keycode 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Keycode\n//>>group: Core\n//>>description: Provide keycodes as keynames\n//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.keyCode = {\n\tBACKSPACE: 8,\n\tCOMMA: 188,\n\tDELETE: 46,\n\tDOWN: 40,\n\tEND: 35,\n\tENTER: 13,\n\tESCAPE: 27,\n\tHOME: 36,\n\tLEFT: 37,\n\tPAGE_DOWN: 34,\n\tPAGE_UP: 33,\n\tPERIOD: 190,\n\tRIGHT: 39,\n\tSPACE: 32,\n\tTAB: 9,\n\tUP: 38\n};\n\n} );\n","/*!\n * jQuery UI Labels 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: labels\n//>>group: Core\n//>>description: Find all the labels associated with a given input\n//>>docs: http://api.jqueryui.com/labels/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.labels = function() {\n\tvar ancestor, selector, id, labels, ancestors;\n\n\tif ( !this.length ) {\n\t\treturn this.pushStack( [] );\n\t}\n\n\t// Check control.labels first\n\tif ( this[ 0 ].labels && this[ 0 ].labels.length ) {\n\t\treturn this.pushStack( this[ 0 ].labels );\n\t}\n\n\t// Support: IE <= 11, FF <= 37, Android <= 2.3 only\n\t// Above browsers do not support control.labels. Everything below is to support them\n\t// as well as document fragments. control.labels does not work on document fragments\n\tlabels = this.eq( 0 ).parents( \"label\" );\n\n\t// Look for the label based on the id\n\tid = this.attr( \"id\" );\n\tif ( id ) {\n\n\t\t// We don't search against the document in case the element\n\t\t// is disconnected from the DOM\n\t\tancestor = this.eq( 0 ).parents().last();\n\n\t\t// Get a full set of top level ancestors\n\t\tancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );\n\n\t\t// Create a selector for the label based on the id\n\t\tselector = \"label[for='\" + $.escapeSelector( id ) + \"']\";\n\n\t\tlabels = labels.add( ancestors.find( selector ).addBack( selector ) );\n\n\t}\n\n\t// Return whatever we have found for labels\n\treturn this.pushStack( labels );\n};\n\n} );\n","( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n// $.ui.plugin is deprecated. Use $.widget() extensions instead.\nreturn $.ui.plugin = {\n\tadd: function( module, option, set ) {\n\t\tvar i,\n\t\t\tproto = $.ui[ module ].prototype;\n\t\tfor ( i in set ) {\n\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t}\n\t},\n\tcall: function( instance, name, args, allowDisconnected ) {\n\t\tvar i,\n\t\t\tset = instance.plugins[ name ];\n\n\t\tif ( !set ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||\n\t\t\t\tinstance.element[ 0 ].parentNode.nodeType === 11 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t}\n\t\t}\n\t}\n};\n\n} );\n","/*!\n * jQuery UI Position 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/position/\n */\n\n//>>label: Position\n//>>group: Core\n//>>description: Positions elements relative to other elements.\n//>>docs: http://api.jqueryui.com/position/\n//>>demos: http://jqueryui.com/position/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n( function() {\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction isWindow( obj ) {\n\treturn obj != null && obj === obj.window;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[ 0 ];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div style=\" +\n\t\t\t\t\"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>\" +\n\t\t\t\t\"<div style='height:300px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[ 0 ];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[ 0 ].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn ( cachedScrollbarWidth = w1 - w2 );\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[ 0 ].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[ 0 ].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisElemWindow = isWindow( withinElement[ 0 ] ),\n\t\t\tisDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,\n\t\t\thasOffset = !isElemWindow && !isDocument;\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isElemWindow,\n\t\t\tisDocument: isDocument,\n\t\t\toffset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: withinElement.outerWidth(),\n\t\t\theight: withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// Make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\n\t\t// Make sure string options are treated as CSS selectors\n\t\ttarget = typeof options.of === \"string\" ?\n\t\t\t$( document ).find( options.of ) :\n\t\t\t$( options.of ),\n\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[ 0 ].preventDefault ) {\n\n\t\t// Force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\n\t// Clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// Force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1 ) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// Calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// Reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t} );\n\n\t// Normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each( function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) +\n\t\t\t\tscrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) +\n\t\t\t\tscrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem: elem\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tif ( options.using ) {\n\n\t\t\t// Adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t} );\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// Element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\n\t\t\t\t// Element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\n\t\t\t\t// Element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\n\t\t\t\t// Element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\n\t\t\t// Too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// Element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\n\t\t\t\t// Element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\n\t\t\t\t// Element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\n\t\t\t\t// Element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\n\t\t\t// Too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -\n\t\t\t\t\touterWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +\n\t\t\t\t\tatOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -\n\t\t\t\t\touterHeight - withinOffset;\n\t\t\t\tif ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +\n\t\t\t\t\toffset - offsetTop;\n\t\t\t\tif ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n} )();\n\nreturn $.ui.position;\n\n} );\n","( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.safeActiveElement = function( document ) {\n\tvar activeElement;\n\n\t// Support: IE 9 only\n\t// IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n\ttry {\n\t\tactiveElement = document.activeElement;\n\t} catch ( error ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE may return null instead of an element\n\t// Interestingly, this only seems to occur when NOT in an iframe\n\tif ( !activeElement ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 11 only\n\t// IE11 returns a seemingly empty object in some cases when accessing\n\t// document.activeElement from an <iframe>\n\tif ( !activeElement.nodeName ) {\n\t\tactiveElement = document.body;\n\t}\n\n\treturn activeElement;\n};\n\n} );\n","( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.ui.safeBlur = function( element ) {\n\n\t// Support: IE9 - 10 only\n\t// If the <body> is blurred, IE will switch windows, see #9420\n\tif ( element && element.nodeName.toLowerCase() !== \"body\" ) {\n\t\t$( element ).trigger( \"blur\" );\n\t}\n};\n\n} );\n","/*!\n * jQuery UI Scroll Parent 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: scrollParent\n//>>group: Core\n//>>description: Get the closest ancestor element that is scrollable.\n//>>docs: http://api.jqueryui.com/scrollParent/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.scrollParent = function( includeHidden ) {\n\tvar position = this.css( \"position\" ),\n\t\texcludeStaticParent = position === \"absolute\",\n\t\toverflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n\t\tscrollParent = this.parents().filter( function() {\n\t\t\tvar parent = $( this );\n\t\t\tif ( excludeStaticParent && parent.css( \"position\" ) === \"static\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn overflowRegex.test( parent.css( \"overflow\" ) + parent.css( \"overflow-y\" ) +\n\t\t\t\tparent.css( \"overflow-x\" ) );\n\t\t} ).eq( 0 );\n\n\treturn position === \"fixed\" || !scrollParent.length ?\n\t\t$( this[ 0 ].ownerDocument || document ) :\n\t\tscrollParent;\n};\n\n} );\n","/*!\n * jQuery UI Tabbable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :tabbable Selector\n//>>group: Core\n//>>description: Selects elements which can be tabbed to.\n//>>docs: http://api.jqueryui.com/tabbable-selector/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\", \"./focusable\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.extend( $.expr.pseudos, {\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\thasTabindex = tabIndex != null;\n\t\treturn ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );\n\t}\n} );\n\n} );\n","/*!\n * jQuery UI Unique ID 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: uniqueId\n//>>group: Core\n//>>description: Functions to generate and remove uniqueId's\n//>>docs: http://api.jqueryui.com/uniqueId/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.fn.extend( {\n\tuniqueId: ( function() {\n\t\tvar uuid = 0;\n\n\t\treturn function() {\n\t\t\treturn this.each( function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + ( ++uuid );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tremoveUniqueId: function() {\n\t\treturn this.each( function() {\n\t\t\tif ( /^ui-id-\\d+$/.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n} );\n","( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.ui = $.ui || {};\n\nreturn $.ui.version = \"1.13.2\";\n\n} );\n","/*!\n * jQuery UI Widget 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Widget\n//>>group: Core\n//>>description: Provides a factory for creating stateful widgets with a common API.\n//>>docs: http://api.jqueryui.com/jQuery.widget/\n//>>demos: http://jqueryui.com/widget/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nvar widgetUuid = 0;\nvar widgetHasOwnProperty = Array.prototype.hasOwnProperty;\nvar widgetSlice = Array.prototype.slice;\n\n$.cleanData = ( function( orig ) {\n\treturn function( elems ) {\n\t\tvar events, elem, i;\n\t\tfor ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {\n\n\t\t\t// Only trigger remove when necessary to save time\n\t\t\tevents = $._data( elem, \"events\" );\n\t\t\tif ( events && events.remove ) {\n\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t}\n\t\t}\n\t\torig( elems );\n\t};\n} )( $.cleanData );\n\n$.widget = function( name, base, prototype ) {\n\tvar existingConstructor, constructor, basePrototype;\n\n\t// ProxiedPrototype allows the provided prototype to remain unmodified\n\t// so that it can be used as a mixin for multiple widgets (#8876)\n\tvar proxiedPrototype = {};\n\n\tvar namespace = name.split( \".\" )[ 0 ];\n\tname = name.split( \".\" )[ 1 ];\n\tvar fullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\tif ( Array.isArray( prototype ) ) {\n\t\tprototype = $.extend.apply( null, [ {} ].concat( prototype ) );\n\t}\n\n\t// Create selector for plugin\n\t$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\n\t\t// Allow instantiation without \"new\" keyword\n\t\tif ( !this || !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// Allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\n\t// Extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\n\t\t// Copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\n\t\t// Track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t} );\n\n\tbasePrototype = new base();\n\n\t// We need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( typeof value !== \"function\" ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = ( function() {\n\t\t\tfunction _super() {\n\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t}\n\n\t\t\tfunction _superApply( args ) {\n\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t}\n\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super;\n\t\t\t\tvar __superApply = this._superApply;\n\t\t\t\tvar returnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t} )();\n\t} );\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t} );\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// Redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor,\n\t\t\t\tchild._proto );\n\t\t} );\n\n\t\t// Remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n\n\treturn constructor;\n};\n\n$.widget.extend = function( target ) {\n\tvar input = widgetSlice.call( arguments, 1 );\n\tvar inputIndex = 0;\n\tvar inputLength = input.length;\n\tvar key;\n\tvar value;\n\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {\n\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\";\n\t\tvar args = widgetSlice.call( arguments, 1 );\n\t\tvar returnValue = this;\n\n\t\tif ( isMethodCall ) {\n\n\t\t\t// If this is an empty collection, we need to have the instance method\n\t\t\t// return undefined instead of the jQuery instance\n\t\t\tif ( !this.length && options === \"instance\" ) {\n\t\t\t\treturnValue = undefined;\n\t\t\t} else {\n\t\t\t\tthis.each( function() {\n\t\t\t\t\tvar methodValue;\n\t\t\t\t\tvar instance = $.data( this, fullName );\n\n\t\t\t\t\tif ( options === \"instance\" ) {\n\t\t\t\t\t\treturnValue = instance;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\treturn $.error( \"cannot call methods on \" + name +\n\t\t\t\t\t\t\t\" prior to initialization; \" +\n\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof instance[ options ] !== \"function\" ||\n\t\t\t\t\t\toptions.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name +\n\t\t\t\t\t\t\t\" widget instance\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\n\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Allow multiple hashes to be passed on init\n\t\t\tif ( args.length ) {\n\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\n\t\t\t}\n\n\t\t\tthis.each( function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} );\n\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\n\toptions: {\n\t\tclasses: {},\n\t\tdisabled: false,\n\n\t\t// Callbacks\n\t\tcreate: null\n\t},\n\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = widgetUuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\t\tthis.classesElementLookup = {};\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\tthis.document = $( element.style ?\n\n\t\t\t\t// Element within the document\n\t\t\t\telement.ownerDocument :\n\n\t\t\t\t// Element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );\n\t\t}\n\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis._create();\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._setOptionDisabled( this.options.disabled );\n\t\t}\n\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\n\t_getCreateOptions: function() {\n\t\treturn {};\n\t},\n\n\t_getCreateEventData: $.noop,\n\n\t_create: $.noop,\n\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tvar that = this;\n\n\t\tthis._destroy();\n\t\t$.each( this.classesElementLookup, function( key, value ) {\n\t\t\tthat._removeClass( value, key );\n\t\t} );\n\n\t\t// We can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeData( this.widgetFullName );\n\t\tthis.widget()\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" );\n\n\t\t// Clean up events and states\n\t\tthis.bindings.off( this.eventNamespace );\n\t},\n\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key;\n\t\tvar parts;\n\t\tvar curOption;\n\t\tvar i;\n\n\t\tif ( arguments.length === 0 ) {\n\n\t\t\t// Don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\n\t\t\t// Handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"classes\" ) {\n\t\t\tthis._setOptionClasses( value );\n\t\t}\n\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._setOptionDisabled( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOptionClasses: function( value ) {\n\t\tvar classKey, elements, currentElements;\n\n\t\tfor ( classKey in value ) {\n\t\t\tcurrentElements = this.classesElementLookup[ classKey ];\n\t\t\tif ( value[ classKey ] === this.options.classes[ classKey ] ||\n\t\t\t\t\t!currentElements ||\n\t\t\t\t\t!currentElements.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We are doing this to create a new jQuery object because the _removeClass() call\n\t\t\t// on the next line is going to destroy the reference to the current elements being\n\t\t\t// tracked. We need to save a copy of this collection so that we can add the new classes\n\t\t\t// below.\n\t\t\telements = $( currentElements.get() );\n\t\t\tthis._removeClass( currentElements, classKey );\n\n\t\t\t// We don't use _addClass() here, because that uses this.options.classes\n\t\t\t// for generating the string of classes. We want to use the value passed in from\n\t\t\t// _setOption(), this is the new value of the classes option which was passed to\n\t\t\t// _setOption(). We pass this value directly to _classes().\n\t\t\telements.addClass( this._classes( {\n\t\t\t\telement: elements,\n\t\t\t\tkeys: classKey,\n\t\t\t\tclasses: value,\n\t\t\t\tadd: true\n\t\t\t} ) );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null, !!value );\n\n\t\t// If the widget is becoming disabled, then nothing is interactive\n\t\tif ( value ) {\n\t\t\tthis._removeClass( this.hoverable, null, \"ui-state-hover\" );\n\t\t\tthis._removeClass( this.focusable, null, \"ui-state-focus\" );\n\t\t}\n\t},\n\n\tenable: function() {\n\t\treturn this._setOptions( { disabled: false } );\n\t},\n\n\tdisable: function() {\n\t\treturn this._setOptions( { disabled: true } );\n\t},\n\n\t_classes: function( options ) {\n\t\tvar full = [];\n\t\tvar that = this;\n\n\t\toptions = $.extend( {\n\t\t\telement: this.element,\n\t\t\tclasses: this.options.classes || {}\n\t\t}, options );\n\n\t\tfunction bindRemoveEvent() {\n\t\t\tvar nodesToBind = [];\n\n\t\t\toptions.element.each( function( _, element ) {\n\t\t\t\tvar isTracked = $.map( that.classesElementLookup, function( elements ) {\n\t\t\t\t\treturn elements;\n\t\t\t\t} )\n\t\t\t\t\t.some( function( elements ) {\n\t\t\t\t\t\treturn elements.is( element );\n\t\t\t\t\t} );\n\n\t\t\t\tif ( !isTracked ) {\n\t\t\t\t\tnodesToBind.push( element );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tthat._on( $( nodesToBind ), {\n\t\t\t\tremove: \"_untrackClassesElement\"\n\t\t\t} );\n\t\t}\n\n\t\tfunction processClassString( classes, checkOption ) {\n\t\t\tvar current, i;\n\t\t\tfor ( i = 0; i < classes.length; i++ ) {\n\t\t\t\tcurrent = that.classesElementLookup[ classes[ i ] ] || $();\n\t\t\t\tif ( options.add ) {\n\t\t\t\t\tbindRemoveEvent();\n\t\t\t\t\tcurrent = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );\n\t\t\t\t} else {\n\t\t\t\t\tcurrent = $( current.not( options.element ).get() );\n\t\t\t\t}\n\t\t\t\tthat.classesElementLookup[ classes[ i ] ] = current;\n\t\t\t\tfull.push( classes[ i ] );\n\t\t\t\tif ( checkOption && options.classes[ classes[ i ] ] ) {\n\t\t\t\t\tfull.push( options.classes[ classes[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( options.keys ) {\n\t\t\tprocessClassString( options.keys.match( /\\S+/g ) || [], true );\n\t\t}\n\t\tif ( options.extra ) {\n\t\t\tprocessClassString( options.extra.match( /\\S+/g ) || [] );\n\t\t}\n\n\t\treturn full.join( \" \" );\n\t},\n\n\t_untrackClassesElement: function( event ) {\n\t\tvar that = this;\n\t\t$.each( that.classesElementLookup, function( key, value ) {\n\t\t\tif ( $.inArray( event.target, value ) !== -1 ) {\n\t\t\t\tthat.classesElementLookup[ key ] = $( value.not( event.target ).get() );\n\t\t\t}\n\t\t} );\n\n\t\tthis._off( $( event.target ) );\n\t},\n\n\t_removeClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, false );\n\t},\n\n\t_addClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, true );\n\t},\n\n\t_toggleClass: function( element, keys, extra, add ) {\n\t\tadd = ( typeof add === \"boolean\" ) ? add : extra;\n\t\tvar shift = ( typeof element === \"string\" || element === null ),\n\t\t\toptions = {\n\t\t\t\textra: shift ? keys : extra,\n\t\t\t\tkeys: shift ? element : keys,\n\t\t\t\telement: shift ? this.element : element,\n\t\t\t\tadd: add\n\t\t\t};\n\t\toptions.element.toggleClass( this._classes( options ), add );\n\t\treturn this;\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement;\n\t\tvar instance = this;\n\n\t\t// No suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// No element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\n\t\t\t\t// Allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// Copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^([\\w:-]*)\\s*(.*)$/ );\n\t\t\tvar eventName = match[ 1 ] + instance.eventNamespace;\n\t\t\tvar selector = match[ 2 ];\n\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.on( eventName, selector, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.on( eventName, handlerProxy );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = ( eventName || \"\" ).split( \" \" ).join( this.eventNamespace + \" \" ) +\n\t\t\tthis.eventNamespace;\n\t\telement.off( eventName );\n\n\t\t// Clear the stack to avoid memory leaks (#10056)\n\t\tthis.bindings = $( this.bindings.not( element ).get() );\n\t\tthis.focusable = $( this.focusable.not( element ).get() );\n\t\tthis.hoverable = $( this.hoverable.not( element ).get() );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig;\n\t\tvar callback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\n\t\t// The original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// Copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( typeof callback === \"function\" &&\n\t\t\tcallback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\n\t\tvar hasOptions;\n\t\tvar effectName = !options ?\n\t\t\tmethod :\n\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\tdefaultEffect :\n\t\t\t\toptions.effect || defaultEffect;\n\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t} else if ( options === true ) {\n\t\t\toptions = {};\n\t\t}\n\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue( function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t} );\n\t\t}\n\t};\n} );\n\nreturn $.widget;\n\n} );\n","/*!\n * jQuery UI Autocomplete 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Autocomplete\n//>>group: Widgets\n//>>description: Lists suggested words as the user is typing.\n//>>docs: http://api.jqueryui.com/autocomplete/\n//>>demos: http://jqueryui.com/autocomplete/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/autocomplete.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./menu\",\n\t\t\t\"../keycode\",\n\t\t\t\"../position\",\n\t\t\t\"../safe-active-element\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.autocomplete\", {\n\tversion: \"1.13.2\",\n\tdefaultElement: \"<input>\",\n\toptions: {\n\t\tappendTo: null,\n\t\tautoFocus: false,\n\t\tdelay: 300,\n\t\tminLength: 1,\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"none\"\n\t\t},\n\t\tsource: null,\n\n\t\t// Callbacks\n\t\tchange: null,\n\t\tclose: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresponse: null,\n\t\tsearch: null,\n\t\tselect: null\n\t},\n\n\trequestIndex: 0,\n\tpending: 0,\n\tliveRegionTimer: null,\n\n\t_create: function() {\n\n\t\t// Some browsers only repeat keydown events, not keypress events,\n\t\t// so we use the suppressKeyPress flag to determine if we've already\n\t\t// handled the keydown event. #7269\n\t\t// Unfortunately the code for & in keypress is the same as the up arrow,\n\t\t// so we use the suppressKeyPressRepeat flag to avoid handling keypress\n\t\t// events when we know the keydown event was used to modify the\n\t\t// search term. #7799\n\t\tvar suppressKeyPress, suppressKeyPressRepeat, suppressInput,\n\t\t\tnodeName = this.element[ 0 ].nodeName.toLowerCase(),\n\t\t\tisTextarea = nodeName === \"textarea\",\n\t\t\tisInput = nodeName === \"input\";\n\n\t\t// Textareas are always multi-line\n\t\t// Inputs are always single-line, even if inside a contentEditable element\n\t\t// IE also treats inputs as contentEditable\n\t\t// All other element types are determined by whether or not they're contentEditable\n\t\tthis.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );\n\n\t\tthis.valueMethod = this.element[ isTextarea || isInput ? \"val\" : \"text\" ];\n\t\tthis.isNewMenu = true;\n\n\t\tthis._addClass( \"ui-autocomplete-input\" );\n\t\tthis.element.attr( \"autocomplete\", \"off\" );\n\n\t\tthis._on( this.element, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.element.prop( \"readOnly\" ) ) {\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tsuppressInput = true;\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsuppressKeyPress = false;\n\t\t\t\tsuppressInput = false;\n\t\t\t\tsuppressKeyPressRepeat = false;\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ENTER:\n\n\t\t\t\t\t// when menu is open and has focus\n\t\t\t\t\tif ( this.menu.active ) {\n\n\t\t\t\t\t\t// #6055 - Opera still allows the keypress to occur\n\t\t\t\t\t\t// which causes forms to submit\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.TAB:\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ESCAPE:\n\t\t\t\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tif ( !this.isMultiLine ) {\n\t\t\t\t\t\t\tthis._value( this.term );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.close( event );\n\n\t\t\t\t\t\t// Different browsers have different default behavior for escape\n\t\t\t\t\t\t// Single press can mean undo or clear\n\t\t\t\t\t\t// Double press in IE means clear the whole form\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\n\t\t\t\t\t// search timeout should be triggered before the input value is changed\n\t\t\t\t\tthis._searchTimeout( event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tkeypress: function( event ) {\n\t\t\t\tif ( suppressKeyPress ) {\n\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( suppressKeyPressRepeat ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Replicate some key handlers to allow them to repeat in Firefox and Opera\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tinput: function( event ) {\n\t\t\t\tif ( suppressInput ) {\n\t\t\t\t\tsuppressInput = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._searchTimeout( event );\n\t\t\t},\n\t\t\tfocus: function() {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.previous = this._value();\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tclearTimeout( this.searching );\n\t\t\t\tthis.close( event );\n\t\t\t\tthis._change( event );\n\t\t\t}\n\t\t} );\n\n\t\tthis._initSource();\n\t\tthis.menu = $( \"<ul>\" )\n\t\t\t.appendTo( this._appendTo() )\n\t\t\t.menu( {\n\n\t\t\t\t// disable ARIA support, the live region takes care of that\n\t\t\t\trole: null\n\t\t\t} )\n\t\t\t.hide()\n\n\t\t\t// Support: IE 11 only, Edge <= 14\n\t\t\t// For other browsers, we preventDefault() on the mousedown event\n\t\t\t// to keep the dropdown from taking focus from the input. This doesn't\n\t\t\t// work for IE/Edge, causing problems with selection and scrolling (#9638)\n\t\t\t// Happily, IE and Edge support an \"unselectable\" attribute that\n\t\t\t// prevents an element from receiving focus, exactly what we want here.\n\t\t\t.attr( {\n\t\t\t\t\"unselectable\": \"on\"\n\t\t\t} )\n\t\t\t.menu( \"instance\" );\n\n\t\tthis._addClass( this.menu.element, \"ui-autocomplete\", \"ui-front\" );\n\t\tthis._on( this.menu.element, {\n\t\t\tmousedown: function( event ) {\n\n\t\t\t\t// Prevent moving focus out of the text field\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\tmenufocus: function( event, ui ) {\n\t\t\t\tvar label, item;\n\n\t\t\t\t// support: Firefox\n\t\t\t\t// Prevent accidental activation of menu items in Firefox (#7024 #9118)\n\t\t\t\tif ( this.isNewMenu ) {\n\t\t\t\t\tthis.isNewMenu = false;\n\t\t\t\t\tif ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis.menu.blur();\n\n\t\t\t\t\t\tthis.document.one( \"mousemove\", function() {\n\t\t\t\t\t\t\t$( event.target ).trigger( event.originalEvent );\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\titem = ui.item.data( \"ui-autocomplete-item\" );\n\t\t\t\tif ( false !== this._trigger( \"focus\", event, { item: item } ) ) {\n\n\t\t\t\t\t// use value to match what will end up in the input, if it was a key event\n\t\t\t\t\tif ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis._value( item.value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Announce the value in the liveRegion\n\t\t\t\tlabel = ui.item.attr( \"aria-label\" ) || item.value;\n\t\t\t\tif ( label && String.prototype.trim.call( label ).length ) {\n\t\t\t\t\tclearTimeout( this.liveRegionTimer );\n\t\t\t\t\tthis.liveRegionTimer = this._delay( function() {\n\t\t\t\t\t\tthis.liveRegion.html( $( \"<div>\" ).text( label ) );\n\t\t\t\t\t}, 100 );\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenuselect: function( event, ui ) {\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" ),\n\t\t\t\t\tprevious = this.previous;\n\n\t\t\t\t// Only trigger when focus was lost (click on menu)\n\t\t\t\tif ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {\n\t\t\t\t\tthis.element.trigger( \"focus\" );\n\t\t\t\t\tthis.previous = previous;\n\n\t\t\t\t\t// #6109 - IE triggers two focus events and the second\n\t\t\t\t\t// is asynchronous, so we need to reset the previous\n\t\t\t\t\t// term synchronously and asynchronously :-(\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\tthis.selectedItem = item;\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( false !== this._trigger( \"select\", event, { item: item } ) ) {\n\t\t\t\t\tthis._value( item.value );\n\t\t\t\t}\n\n\t\t\t\t// reset the term after the select event\n\t\t\t\t// this allows custom select handling to work properly\n\t\t\t\tthis.term = this._value();\n\n\t\t\t\tthis.close( event );\n\t\t\t\tthis.selectedItem = item;\n\t\t\t}\n\t\t} );\n\n\t\tthis.liveRegion = $( \"<div>\", {\n\t\t\trole: \"status\",\n\t\t\t\"aria-live\": \"assertive\",\n\t\t\t\"aria-relevant\": \"additions\"\n\t\t} )\n\t\t\t.appendTo( this.document[ 0 ].body );\n\n\t\tthis._addClass( this.liveRegion, null, \"ui-helper-hidden-accessible\" );\n\n\t\t// Turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_destroy: function() {\n\t\tclearTimeout( this.searching );\n\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\tthis.menu.element.remove();\n\t\tthis.liveRegion.remove();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"source\" ) {\n\t\t\tthis._initSource();\n\t\t}\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menu.element.appendTo( this._appendTo() );\n\t\t}\n\t\tif ( key === \"disabled\" && value && this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\t},\n\n\t_isEventTargetInWidget: function( event ) {\n\t\tvar menuElement = this.menu.element[ 0 ];\n\n\t\treturn event.target === this.element[ 0 ] ||\n\t\t\tevent.target === menuElement ||\n\t\t\t$.contains( menuElement, event.target );\n\t},\n\n\t_closeOnClickOutside: function( event ) {\n\t\tif ( !this._isEventTargetInWidget( event ) ) {\n\t\t\tthis.close();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\n\t\tif ( element ) {\n\t\t\telement = element.jquery || element.nodeType ?\n\t\t\t\t$( element ) :\n\t\t\t\tthis.document.find( element ).eq( 0 );\n\t\t}\n\n\t\tif ( !element || !element[ 0 ] ) {\n\t\t\telement = this.element.closest( \".ui-front, dialog\" );\n\t\t}\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[ 0 ].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_initSource: function() {\n\t\tvar array, url,\n\t\t\tthat = this;\n\t\tif ( Array.isArray( this.options.source ) ) {\n\t\t\tarray = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tresponse( $.ui.autocomplete.filter( array, request.term ) );\n\t\t\t};\n\t\t} else if ( typeof this.options.source === \"string\" ) {\n\t\t\turl = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tif ( that.xhr ) {\n\t\t\t\t\tthat.xhr.abort();\n\t\t\t\t}\n\t\t\t\tthat.xhr = $.ajax( {\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: request,\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t\tresponse( data );\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\tresponse( [] );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t};\n\t\t} else {\n\t\t\tthis.source = this.options.source;\n\t\t}\n\t},\n\n\t_searchTimeout: function( event ) {\n\t\tclearTimeout( this.searching );\n\t\tthis.searching = this._delay( function() {\n\n\t\t\t// Search if the value has changed, or if the user retypes the same value (see #7434)\n\t\t\tvar equalValues = this.term === this._value(),\n\t\t\t\tmenuVisible = this.menu.element.is( \":visible\" ),\n\t\t\t\tmodifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n\n\t\t\tif ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.search( null, event );\n\t\t\t}\n\t\t}, this.options.delay );\n\t},\n\n\tsearch: function( value, event ) {\n\t\tvalue = value != null ? value : this._value();\n\n\t\t// Always save the actual value, not the one passed as an argument\n\t\tthis.term = this._value();\n\n\t\tif ( value.length < this.options.minLength ) {\n\t\t\treturn this.close( event );\n\t\t}\n\n\t\tif ( this._trigger( \"search\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._search( value );\n\t},\n\n\t_search: function( value ) {\n\t\tthis.pending++;\n\t\tthis._addClass( \"ui-autocomplete-loading\" );\n\t\tthis.cancelSearch = false;\n\n\t\tthis.source( { term: value }, this._response() );\n\t},\n\n\t_response: function() {\n\t\tvar index = ++this.requestIndex;\n\n\t\treturn function( content ) {\n\t\t\tif ( index === this.requestIndex ) {\n\t\t\t\tthis.__response( content );\n\t\t\t}\n\n\t\t\tthis.pending--;\n\t\t\tif ( !this.pending ) {\n\t\t\t\tthis._removeClass( \"ui-autocomplete-loading\" );\n\t\t\t}\n\t\t}.bind( this );\n\t},\n\n\t__response: function( content ) {\n\t\tif ( content ) {\n\t\t\tcontent = this._normalize( content );\n\t\t}\n\t\tthis._trigger( \"response\", null, { content: content } );\n\t\tif ( !this.options.disabled && content && content.length && !this.cancelSearch ) {\n\t\t\tthis._suggest( content );\n\t\t\tthis._trigger( \"open\" );\n\t\t} else {\n\n\t\t\t// use ._close() instead of .close() so we don't cancel future searches\n\t\t\tthis._close();\n\t\t}\n\t},\n\n\tclose: function( event ) {\n\t\tthis.cancelSearch = true;\n\t\tthis._close( event );\n\t},\n\n\t_close: function( event ) {\n\n\t\t// Remove the handler that closes the menu on outside clicks\n\t\tthis._off( this.document, \"mousedown\" );\n\n\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.menu.element.hide();\n\t\t\tthis.menu.blur();\n\t\t\tthis.isNewMenu = true;\n\t\t\tthis._trigger( \"close\", event );\n\t\t}\n\t},\n\n\t_change: function( event ) {\n\t\tif ( this.previous !== this._value() ) {\n\t\t\tthis._trigger( \"change\", event, { item: this.selectedItem } );\n\t\t}\n\t},\n\n\t_normalize: function( items ) {\n\n\t\t// assume all items have the right format when the first item is complete\n\t\tif ( items.length && items[ 0 ].label && items[ 0 ].value ) {\n\t\t\treturn items;\n\t\t}\n\t\treturn $.map( items, function( item ) {\n\t\t\tif ( typeof item === \"string\" ) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: item,\n\t\t\t\t\tvalue: item\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn $.extend( {}, item, {\n\t\t\t\tlabel: item.label || item.value,\n\t\t\t\tvalue: item.value || item.label\n\t\t\t} );\n\t\t} );\n\t},\n\n\t_suggest: function( items ) {\n\t\tvar ul = this.menu.element.empty();\n\t\tthis._renderMenu( ul, items );\n\t\tthis.isNewMenu = true;\n\t\tthis.menu.refresh();\n\n\t\t// Size and position menu\n\t\tul.show();\n\t\tthis._resizeMenu();\n\t\tul.position( $.extend( {\n\t\t\tof: this.element\n\t\t}, this.options.position ) );\n\n\t\tif ( this.options.autoFocus ) {\n\t\t\tthis.menu.next();\n\t\t}\n\n\t\t// Listen for interactions outside of the widget (#6642)\n\t\tthis._on( this.document, {\n\t\t\tmousedown: \"_closeOnClickOutside\"\n\t\t} );\n\t},\n\n\t_resizeMenu: function() {\n\t\tvar ul = this.menu.element;\n\t\tul.outerWidth( Math.max(\n\n\t\t\t// Firefox wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping (#7513)\n\t\t\tul.width( \"\" ).outerWidth() + 1,\n\t\t\tthis.element.outerWidth()\n\t\t) );\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar that = this;\n\t\t$.each( items, function( index, item ) {\n\t\t\tthat._renderItemData( ul, item );\n\t\t} );\n\t},\n\n\t_renderItemData: function( ul, item ) {\n\t\treturn this._renderItem( ul, item ).data( \"ui-autocomplete-item\", item );\n\t},\n\n\t_renderItem: function( ul, item ) {\n\t\treturn $( \"<li>\" )\n\t\t\t.append( $( \"<div>\" ).text( item.label ) )\n\t\t\t.appendTo( ul );\n\t},\n\n\t_move: function( direction, event ) {\n\t\tif ( !this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.search( null, event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.menu.isFirstItem() && /^previous/.test( direction ) ||\n\t\t\t\tthis.menu.isLastItem() && /^next/.test( direction ) ) {\n\n\t\t\tif ( !this.isMultiLine ) {\n\t\t\t\tthis._value( this.term );\n\t\t\t}\n\n\t\t\tthis.menu.blur();\n\t\t\treturn;\n\t\t}\n\t\tthis.menu[ direction ]( event );\n\t},\n\n\twidget: function() {\n\t\treturn this.menu.element;\n\t},\n\n\t_value: function() {\n\t\treturn this.valueMethod.apply( this.element, arguments );\n\t},\n\n\t_keyEvent: function( keyEvent, event ) {\n\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis._move( keyEvent, event );\n\n\t\t\t// Prevents moving cursor to beginning/end of the text field in some browsers\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t// Support: Chrome <=50\n\t// We should be able to just use this.element.prop( \"isContentEditable\" )\n\t// but hidden elements always report false in Chrome.\n\t// https://code.google.com/p/chromium/issues/detail?id=313082\n\t_isContentEditable: function( element ) {\n\t\tif ( !element.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar editable = element.prop( \"contentEditable\" );\n\n\t\tif ( editable === \"inherit\" ) {\n\t\t\treturn this._isContentEditable( element.parent() );\n\t\t}\n\n\t\treturn editable === \"true\";\n\t}\n} );\n\n$.extend( $.ui.autocomplete, {\n\tescapeRegex: function( value ) {\n\t\treturn value.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" );\n\t},\n\tfilter: function( array, term ) {\n\t\tvar matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), \"i\" );\n\t\treturn $.grep( array, function( value ) {\n\t\t\treturn matcher.test( value.label || value.value || value );\n\t\t} );\n\t}\n} );\n\n// Live region extension, adding a `messages` option\n// NOTE: This is an experimental API. We are still investigating\n// a full solution for string manipulation and internationalization.\n$.widget( \"ui.autocomplete\", $.ui.autocomplete, {\n\toptions: {\n\t\tmessages: {\n\t\t\tnoResults: \"No search results.\",\n\t\t\tresults: function( amount ) {\n\t\t\t\treturn amount + ( amount > 1 ? \" results are\" : \" result is\" ) +\n\t\t\t\t\t\" available, use up and down arrow keys to navigate.\";\n\t\t\t}\n\t\t}\n\t},\n\n\t__response: function( content ) {\n\t\tvar message;\n\t\tthis._superApply( arguments );\n\t\tif ( this.options.disabled || this.cancelSearch ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( content && content.length ) {\n\t\t\tmessage = this.options.messages.results( content.length );\n\t\t} else {\n\t\t\tmessage = this.options.messages.noResults;\n\t\t}\n\t\tclearTimeout( this.liveRegionTimer );\n\t\tthis.liveRegionTimer = this._delay( function() {\n\t\t\tthis.liveRegion.html( $( \"<div>\" ).text( message ) );\n\t\t}, 100 );\n\t}\n} );\n\nreturn $.ui.autocomplete;\n\n} );\n","/*!\n * jQuery UI Button 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Button\n//>>group: Widgets\n//>>description: Enhances a form with themeable buttons.\n//>>docs: http://api.jqueryui.com/button/\n//>>demos: http://jqueryui.com/button/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/button.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\n\t\t\t// These are only for backcompat\n\t\t\t// TODO: Remove after 1.12\n\t\t\t\"./controlgroup\",\n\t\t\t\"./checkboxradio\",\n\n\t\t\t\"../keycode\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.button\", {\n\tversion: \"1.13.2\",\n\tdefaultElement: \"<button>\",\n\toptions: {\n\t\tclasses: {\n\t\t\t\"ui-button\": \"ui-corner-all\"\n\t\t},\n\t\tdisabled: null,\n\t\ticon: null,\n\t\ticonPosition: \"beginning\",\n\t\tlabel: null,\n\t\tshowLabel: true\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar disabled,\n\n\t\t\t// This is to support cases like in jQuery Mobile where the base widget does have\n\t\t\t// an implementation of _getCreateOptions\n\t\t\toptions = this._super() || {};\n\n\t\tthis.isInput = this.element.is( \"input\" );\n\n\t\tdisabled = this.element[ 0 ].disabled;\n\t\tif ( disabled != null ) {\n\t\t\toptions.disabled = disabled;\n\t\t}\n\n\t\tthis.originalLabel = this.isInput ? this.element.val() : this.element.html();\n\t\tif ( this.originalLabel ) {\n\t\t\toptions.label = this.originalLabel;\n\t\t}\n\n\t\treturn options;\n\t},\n\n\t_create: function() {\n\t\tif ( !this.option.showLabel & !this.options.icon ) {\n\t\t\tthis.options.showLabel = true;\n\t\t}\n\n\t\t// We have to check the option again here even though we did in _getCreateOptions,\n\t\t// because null may have been passed on init which would override what was set in\n\t\t// _getCreateOptions\n\t\tif ( this.options.disabled == null ) {\n\t\t\tthis.options.disabled = this.element[ 0 ].disabled || false;\n\t\t}\n\n\t\tthis.hasTitle = !!this.element.attr( \"title\" );\n\n\t\t// Check to see if the label needs to be set or if its already correct\n\t\tif ( this.options.label && this.options.label !== this.originalLabel ) {\n\t\t\tif ( this.isInput ) {\n\t\t\t\tthis.element.val( this.options.label );\n\t\t\t} else {\n\t\t\t\tthis.element.html( this.options.label );\n\t\t\t}\n\t\t}\n\t\tthis._addClass( \"ui-button\", \"ui-widget\" );\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\t\tthis._enhance();\n\n\t\tif ( this.element.is( \"a\" ) ) {\n\t\t\tthis._on( {\n\t\t\t\t\"keyup\": function( event ) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: PhantomJS <= 1.9, IE 8 Only\n\t\t\t\t\t\t// If a native click is available use it so we actually cause navigation\n\t\t\t\t\t\t// otherwise just trigger a click event\n\t\t\t\t\t\tif ( this.element[ 0 ].click ) {\n\t\t\t\t\t\t\tthis.element[ 0 ].click();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.element.trigger( \"click\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t},\n\n\t_enhance: function() {\n\t\tif ( !this.element.is( \"button\" ) ) {\n\t\t\tthis.element.attr( \"role\", \"button\" );\n\t\t}\n\n\t\tif ( this.options.icon ) {\n\t\t\tthis._updateIcon( \"icon\", this.options.icon );\n\t\t\tthis._updateTooltip();\n\t\t}\n\t},\n\n\t_updateTooltip: function() {\n\t\tthis.title = this.element.attr( \"title\" );\n\n\t\tif ( !this.options.showLabel && !this.title ) {\n\t\t\tthis.element.attr( \"title\", this.options.label );\n\t\t}\n\t},\n\n\t_updateIcon: function( option, value ) {\n\t\tvar icon = option !== \"iconPosition\",\n\t\t\tposition = icon ? this.options.iconPosition : value,\n\t\t\tdisplayBlock = position === \"top\" || position === \"bottom\";\n\n\t\t// Create icon\n\t\tif ( !this.icon ) {\n\t\t\tthis.icon = $( \"<span>\" );\n\n\t\t\tthis._addClass( this.icon, \"ui-button-icon\", \"ui-icon\" );\n\n\t\t\tif ( !this.options.showLabel ) {\n\t\t\t\tthis._addClass( \"ui-button-icon-only\" );\n\t\t\t}\n\t\t} else if ( icon ) {\n\n\t\t\t// If we are updating the icon remove the old icon class\n\t\t\tthis._removeClass( this.icon, null, this.options.icon );\n\t\t}\n\n\t\t// If we are updating the icon add the new icon class\n\t\tif ( icon ) {\n\t\t\tthis._addClass( this.icon, null, value );\n\t\t}\n\n\t\tthis._attachIcon( position );\n\n\t\t// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove\n\t\t// the iconSpace if there is one.\n\t\tif ( displayBlock ) {\n\t\t\tthis._addClass( this.icon, null, \"ui-widget-icon-block\" );\n\t\t\tif ( this.iconSpace ) {\n\t\t\t\tthis.iconSpace.remove();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Position is beginning or end so remove the ui-widget-icon-block class and add the\n\t\t\t// space if it does not exist\n\t\t\tif ( !this.iconSpace ) {\n\t\t\t\tthis.iconSpace = $( \"<span> </span>\" );\n\t\t\t\tthis._addClass( this.iconSpace, \"ui-button-icon-space\" );\n\t\t\t}\n\t\t\tthis._removeClass( this.icon, null, \"ui-wiget-icon-block\" );\n\t\t\tthis._attachIconSpace( position );\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeAttr( \"role\" );\n\n\t\tif ( this.icon ) {\n\t\t\tthis.icon.remove();\n\t\t}\n\t\tif ( this.iconSpace ) {\n\t\t\tthis.iconSpace.remove();\n\t\t}\n\t\tif ( !this.hasTitle ) {\n\t\t\tthis.element.removeAttr( \"title\" );\n\t\t}\n\t},\n\n\t_attachIconSpace: function( iconPosition ) {\n\t\tthis.icon[ /^(?:end|bottom)/.test( iconPosition ) ? \"before\" : \"after\" ]( this.iconSpace );\n\t},\n\n\t_attachIcon: function( iconPosition ) {\n\t\tthis.element[ /^(?:end|bottom)/.test( iconPosition ) ? \"append\" : \"prepend\" ]( this.icon );\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar newShowLabel = options.showLabel === undefined ?\n\t\t\t\tthis.options.showLabel :\n\t\t\t\toptions.showLabel,\n\t\t\tnewIcon = options.icon === undefined ? this.options.icon : options.icon;\n\n\t\tif ( !newShowLabel && !newIcon ) {\n\t\t\toptions.showLabel = true;\n\t\t}\n\t\tthis._super( options );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icon\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis._updateIcon( key, value );\n\t\t\t} else if ( this.icon ) {\n\t\t\t\tthis.icon.remove();\n\t\t\t\tif ( this.iconSpace ) {\n\t\t\t\t\tthis.iconSpace.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"iconPosition\" ) {\n\t\t\tthis._updateIcon( key, value );\n\t\t}\n\n\t\t// Make sure we can't end up with a button that has neither text nor icon\n\t\tif ( key === \"showLabel\" ) {\n\t\t\t\tthis._toggleClass( \"ui-button-icon-only\", null, !value );\n\t\t\t\tthis._updateTooltip();\n\t\t}\n\n\t\tif ( key === \"label\" ) {\n\t\t\tif ( this.isInput ) {\n\t\t\t\tthis.element.val( value );\n\t\t\t} else {\n\n\t\t\t\t// If there is an icon, append it, else nothing then append the value\n\t\t\t\t// this avoids removal of the icon when setting label text\n\t\t\t\tthis.element.html( value );\n\t\t\t\tif ( this.icon ) {\n\t\t\t\t\tthis._attachIcon( this.options.iconPosition );\n\t\t\t\t\tthis._attachIconSpace( this.options.iconPosition );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._toggleClass( null, \"ui-state-disabled\", value );\n\t\t\tthis.element[ 0 ].disabled = value;\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.trigger( \"blur\" );\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\n\t\t// Make sure to only check disabled if its an element that supports this otherwise\n\t\t// check for the disabled class to determine state\n\t\tvar isDisabled = this.element.is( \"input, button\" ) ?\n\t\t\tthis.element[ 0 ].disabled : this.element.hasClass( \"ui-button-disabled\" );\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOptions( { disabled: isDisabled } );\n\t\t}\n\n\t\tthis._updateTooltip();\n\t}\n} );\n\n// DEPRECATED\nif ( $.uiBackCompat !== false ) {\n\n\t// Text and Icons options\n\t$.widget( \"ui.button\", $.ui.button, {\n\t\toptions: {\n\t\t\ttext: true,\n\t\t\ticons: {\n\t\t\t\tprimary: null,\n\t\t\t\tsecondary: null\n\t\t\t}\n\t\t},\n\n\t\t_create: function() {\n\t\t\tif ( this.options.showLabel && !this.options.text ) {\n\t\t\t\tthis.options.showLabel = this.options.text;\n\t\t\t}\n\t\t\tif ( !this.options.showLabel && this.options.text ) {\n\t\t\t\tthis.options.text = this.options.showLabel;\n\t\t\t}\n\t\t\tif ( !this.options.icon && ( this.options.icons.primary ||\n\t\t\t\t\tthis.options.icons.secondary ) ) {\n\t\t\t\tif ( this.options.icons.primary ) {\n\t\t\t\t\tthis.options.icon = this.options.icons.primary;\n\t\t\t\t} else {\n\t\t\t\t\tthis.options.icon = this.options.icons.secondary;\n\t\t\t\t\tthis.options.iconPosition = \"end\";\n\t\t\t\t}\n\t\t\t} else if ( this.options.icon ) {\n\t\t\t\tthis.options.icons.primary = this.options.icon;\n\t\t\t}\n\t\t\tthis._super();\n\t\t},\n\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"text\" ) {\n\t\t\t\tthis._super( \"showLabel\", value );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( key === \"showLabel\" ) {\n\t\t\t\tthis.options.text = value;\n\t\t\t}\n\t\t\tif ( key === \"icon\" ) {\n\t\t\t\tthis.options.icons.primary = value;\n\t\t\t}\n\t\t\tif ( key === \"icons\" ) {\n\t\t\t\tif ( value.primary ) {\n\t\t\t\t\tthis._super( \"icon\", value.primary );\n\t\t\t\t\tthis._super( \"iconPosition\", \"beginning\" );\n\t\t\t\t} else if ( value.secondary ) {\n\t\t\t\t\tthis._super( \"icon\", value.secondary );\n\t\t\t\t\tthis._super( \"iconPosition\", \"end\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._superApply( arguments );\n\t\t}\n\t} );\n\n\t$.fn.button = ( function( orig ) {\n\t\treturn function( options ) {\n\t\t\tvar isMethodCall = typeof options === \"string\";\n\t\t\tvar args = Array.prototype.slice.call( arguments, 1 );\n\t\t\tvar returnValue = this;\n\n\t\t\tif ( isMethodCall ) {\n\n\t\t\t\t// If this is an empty collection, we need to have the instance method\n\t\t\t\t// return undefined instead of the jQuery instance\n\t\t\t\tif ( !this.length && options === \"instance\" ) {\n\t\t\t\t\treturnValue = undefined;\n\t\t\t\t} else {\n\t\t\t\t\tthis.each( function() {\n\t\t\t\t\t\tvar methodValue;\n\t\t\t\t\t\tvar type = $( this ).attr( \"type\" );\n\t\t\t\t\t\tvar name = type !== \"checkbox\" && type !== \"radio\" ?\n\t\t\t\t\t\t\t\"button\" :\n\t\t\t\t\t\t\t\"checkboxradio\";\n\t\t\t\t\t\tvar instance = $.data( this, \"ui-\" + name );\n\n\t\t\t\t\t\tif ( options === \"instance\" ) {\n\t\t\t\t\t\t\treturnValue = instance;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\t\treturn $.error( \"cannot call methods on button\" +\n\t\t\t\t\t\t\t\t\" prior to initialization; \" +\n\t\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( typeof instance[ options ] !== \"function\" ||\n\t\t\t\t\t\t\toptions.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for button\" +\n\t\t\t\t\t\t\t\t\" widget instance\" );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\n\t\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Allow multiple hashes to be passed on init\n\t\t\t\tif ( args.length ) {\n\t\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\n\t\t\t\t}\n\n\t\t\t\tthis.each( function() {\n\t\t\t\t\tvar type = $( this ).attr( \"type\" );\n\t\t\t\t\tvar name = type !== \"checkbox\" && type !== \"radio\" ? \"button\" : \"checkboxradio\";\n\t\t\t\t\tvar instance = $.data( this, \"ui-\" + name );\n\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstance.option( options || {} );\n\t\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( name === \"button\" ) {\n\t\t\t\t\t\t\torig.call( $( this ), options );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$( this ).checkboxradio( $.extend( { icon: false }, options ) );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn returnValue;\n\t\t};\n\t} )( $.fn.button );\n\n\t$.fn.buttonset = function() {\n\t\tif ( !$.ui.controlgroup ) {\n\t\t\t$.error( \"Controlgroup widget missing\" );\n\t\t}\n\t\tif ( arguments[ 0 ] === \"option\" && arguments[ 1 ] === \"items\" && arguments[ 2 ] ) {\n\t\t\treturn this.controlgroup.apply( this,\n\t\t\t\t[ arguments[ 0 ], \"items.button\", arguments[ 2 ] ] );\n\t\t}\n\t\tif ( arguments[ 0 ] === \"option\" && arguments[ 1 ] === \"items\" ) {\n\t\t\treturn this.controlgroup.apply( this, [ arguments[ 0 ], \"items.button\" ] );\n\t\t}\n\t\tif ( typeof arguments[ 0 ] === \"object\" && arguments[ 0 ].items ) {\n\t\t\targuments[ 0 ].items = {\n\t\t\t\tbutton: arguments[ 0 ].items\n\t\t\t};\n\t\t}\n\t\treturn this.controlgroup.apply( this, arguments );\n\t};\n}\n\nreturn $.ui.button;\n\n} );\n","/*!\n * jQuery UI Checkboxradio 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Checkboxradio\n//>>group: Widgets\n//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.\n//>>docs: http://api.jqueryui.com/checkboxradio/\n//>>demos: http://jqueryui.com/checkboxradio/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/button.css\n//>>css.structure: ../../themes/base/checkboxradio.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../form-reset-mixin\",\n\t\t\t\"../labels\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.checkboxradio\", [ $.ui.formResetMixin, {\n\tversion: \"1.13.2\",\n\toptions: {\n\t\tdisabled: null,\n\t\tlabel: null,\n\t\ticon: true,\n\t\tclasses: {\n\t\t\t\"ui-checkboxradio-label\": \"ui-corner-all\",\n\t\t\t\"ui-checkboxradio-icon\": \"ui-corner-all\"\n\t\t}\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar disabled, labels, labelContents;\n\t\tvar options = this._super() || {};\n\n\t\t// We read the type here, because it makes more sense to throw a element type error first,\n\t\t// rather then the error for lack of a label. Often if its the wrong type, it\n\t\t// won't have a label (e.g. calling on a div, btn, etc)\n\t\tthis._readType();\n\n\t\tlabels = this.element.labels();\n\n\t\t// If there are multiple labels, use the last one\n\t\tthis.label = $( labels[ labels.length - 1 ] );\n\t\tif ( !this.label.length ) {\n\t\t\t$.error( \"No label found for checkboxradio widget\" );\n\t\t}\n\n\t\tthis.originalLabel = \"\";\n\n\t\t// We need to get the label text but this may also need to make sure it does not contain the\n\t\t// input itself.\n\t\t// The label contents could be text, html, or a mix. We wrap all elements\n\t\t// and read the wrapper's `innerHTML` to get a string representation of\n\t\t// the label, without the input as part of it.\n\t\tlabelContents = this.label.contents().not( this.element[ 0 ] );\n\n\t\tif ( labelContents.length ) {\n\t\t\tthis.originalLabel += labelContents\n\t\t\t\t.clone()\n\t\t\t\t.wrapAll( \"<div></div>\" )\n\t\t\t\t.parent()\n\t\t\t\t.html();\n\t\t}\n\n\t\t// Set the label option if we found label text\n\t\tif ( this.originalLabel ) {\n\t\t\toptions.label = this.originalLabel;\n\t\t}\n\n\t\tdisabled = this.element[ 0 ].disabled;\n\t\tif ( disabled != null ) {\n\t\t\toptions.disabled = disabled;\n\t\t}\n\t\treturn options;\n\t},\n\n\t_create: function() {\n\t\tvar checked = this.element[ 0 ].checked;\n\n\t\tthis._bindFormResetHandler();\n\n\t\tif ( this.options.disabled == null ) {\n\t\t\tthis.options.disabled = this.element[ 0 ].disabled;\n\t\t}\n\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\t\tthis._addClass( \"ui-checkboxradio\", \"ui-helper-hidden-accessible\" );\n\t\tthis._addClass( this.label, \"ui-checkboxradio-label\", \"ui-button ui-widget\" );\n\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tthis._addClass( this.label, \"ui-checkboxradio-radio-label\" );\n\t\t}\n\n\t\tif ( this.options.label && this.options.label !== this.originalLabel ) {\n\t\t\tthis._updateLabel();\n\t\t} else if ( this.originalLabel ) {\n\t\t\tthis.options.label = this.originalLabel;\n\t\t}\n\n\t\tthis._enhance();\n\n\t\tif ( checked ) {\n\t\t\tthis._addClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\" );\n\t\t}\n\n\t\tthis._on( {\n\t\t\tchange: \"_toggleClasses\",\n\t\t\tfocus: function() {\n\t\t\t\tthis._addClass( this.label, null, \"ui-state-focus ui-visual-focus\" );\n\t\t\t},\n\t\t\tblur: function() {\n\t\t\t\tthis._removeClass( this.label, null, \"ui-state-focus ui-visual-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_readType: function() {\n\t\tvar nodeName = this.element[ 0 ].nodeName.toLowerCase();\n\t\tthis.type = this.element[ 0 ].type;\n\t\tif ( nodeName !== \"input\" || !/radio|checkbox/.test( this.type ) ) {\n\t\t\t$.error( \"Can't create checkboxradio on element.nodeName=\" + nodeName +\n\t\t\t\t\" and element.type=\" + this.type );\n\t\t}\n\t},\n\n\t// Support jQuery Mobile enhanced option\n\t_enhance: function() {\n\t\tthis._updateIcon( this.element[ 0 ].checked );\n\t},\n\n\twidget: function() {\n\t\treturn this.label;\n\t},\n\n\t_getRadioGroup: function() {\n\t\tvar group;\n\t\tvar name = this.element[ 0 ].name;\n\t\tvar nameSelector = \"input[name='\" + $.escapeSelector( name ) + \"']\";\n\n\t\tif ( !name ) {\n\t\t\treturn $( [] );\n\t\t}\n\n\t\tif ( this.form.length ) {\n\t\t\tgroup = $( this.form[ 0 ].elements ).filter( nameSelector );\n\t\t} else {\n\n\t\t\t// Not inside a form, check all inputs that also are not inside a form\n\t\t\tgroup = $( nameSelector ).filter( function() {\n\t\t\t\treturn $( this )._form().length === 0;\n\t\t\t} );\n\t\t}\n\n\t\treturn group.not( this.element );\n\t},\n\n\t_toggleClasses: function() {\n\t\tvar checked = this.element[ 0 ].checked;\n\t\tthis._toggleClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\", checked );\n\n\t\tif ( this.options.icon && this.type === \"checkbox\" ) {\n\t\t\tthis._toggleClass( this.icon, null, \"ui-icon-check ui-state-checked\", checked )\n\t\t\t\t._toggleClass( this.icon, null, \"ui-icon-blank\", !checked );\n\t\t}\n\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tthis._getRadioGroup()\n\t\t\t\t.each( function() {\n\t\t\t\t\tvar instance = $( this ).checkboxradio( \"instance\" );\n\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstance._removeClass( instance.label,\n\t\t\t\t\t\t\t\"ui-checkboxradio-checked\", \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tthis._unbindFormResetHandler();\n\n\t\tif ( this.icon ) {\n\t\t\tthis.icon.remove();\n\t\t\tthis.iconSpace.remove();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\n\t\t// We don't allow the value to be set to nothing\n\t\tif ( key === \"label\" && !value ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._toggleClass( this.label, null, \"ui-state-disabled\", value );\n\t\t\tthis.element[ 0 ].disabled = value;\n\n\t\t\t// Don't refresh when setting disabled\n\t\t\treturn;\n\t\t}\n\t\tthis.refresh();\n\t},\n\n\t_updateIcon: function( checked ) {\n\t\tvar toAdd = \"ui-icon ui-icon-background \";\n\n\t\tif ( this.options.icon ) {\n\t\t\tif ( !this.icon ) {\n\t\t\t\tthis.icon = $( \"<span>\" );\n\t\t\t\tthis.iconSpace = $( \"<span> </span>\" );\n\t\t\t\tthis._addClass( this.iconSpace, \"ui-checkboxradio-icon-space\" );\n\t\t\t}\n\n\t\t\tif ( this.type === \"checkbox\" ) {\n\t\t\t\ttoAdd += checked ? \"ui-icon-check ui-state-checked\" : \"ui-icon-blank\";\n\t\t\t\tthis._removeClass( this.icon, null, checked ? \"ui-icon-blank\" : \"ui-icon-check\" );\n\t\t\t} else {\n\t\t\t\ttoAdd += \"ui-icon-blank\";\n\t\t\t}\n\t\t\tthis._addClass( this.icon, \"ui-checkboxradio-icon\", toAdd );\n\t\t\tif ( !checked ) {\n\t\t\t\tthis._removeClass( this.icon, null, \"ui-icon-check ui-state-checked\" );\n\t\t\t}\n\t\t\tthis.icon.prependTo( this.label ).after( this.iconSpace );\n\t\t} else if ( this.icon !== undefined ) {\n\t\t\tthis.icon.remove();\n\t\t\tthis.iconSpace.remove();\n\t\t\tdelete this.icon;\n\t\t}\n\t},\n\n\t_updateLabel: function() {\n\n\t\t// Remove the contents of the label ( minus the icon, icon space, and input )\n\t\tvar contents = this.label.contents().not( this.element[ 0 ] );\n\t\tif ( this.icon ) {\n\t\t\tcontents = contents.not( this.icon[ 0 ] );\n\t\t}\n\t\tif ( this.iconSpace ) {\n\t\t\tcontents = contents.not( this.iconSpace[ 0 ] );\n\t\t}\n\t\tcontents.remove();\n\n\t\tthis.label.append( this.options.label );\n\t},\n\n\trefresh: function() {\n\t\tvar checked = this.element[ 0 ].checked,\n\t\t\tisDisabled = this.element[ 0 ].disabled;\n\n\t\tthis._updateIcon( checked );\n\t\tthis._toggleClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\", checked );\n\t\tif ( this.options.label !== null ) {\n\t\t\tthis._updateLabel();\n\t\t}\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOptions( { \"disabled\": isDisabled } );\n\t\t}\n\t}\n\n} ] );\n\nreturn $.ui.checkboxradio;\n\n} );\n","/*!\n * jQuery UI Controlgroup 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Controlgroup\n//>>group: Widgets\n//>>description: Visually groups form control widgets\n//>>docs: http://api.jqueryui.com/controlgroup/\n//>>demos: http://jqueryui.com/controlgroup/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/controlgroup.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nvar controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;\n\nreturn $.widget( \"ui.controlgroup\", {\n\tversion: \"1.13.2\",\n\tdefaultElement: \"<div>\",\n\toptions: {\n\t\tdirection: \"horizontal\",\n\t\tdisabled: null,\n\t\tonlyVisible: true,\n\t\titems: {\n\t\t\t\"button\": \"input[type=button], input[type=submit], input[type=reset], button, a\",\n\t\t\t\"controlgroupLabel\": \".ui-controlgroup-label\",\n\t\t\t\"checkboxradio\": \"input[type='checkbox'], input[type='radio']\",\n\t\t\t\"selectmenu\": \"select\",\n\t\t\t\"spinner\": \".ui-spinner-input\"\n\t\t}\n\t},\n\n\t_create: function() {\n\t\tthis._enhance();\n\t},\n\n\t// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation\n\t_enhance: function() {\n\t\tthis.element.attr( \"role\", \"toolbar\" );\n\t\tthis.refresh();\n\t},\n\n\t_destroy: function() {\n\t\tthis._callChildMethod( \"destroy\" );\n\t\tthis.childWidgets.removeData( \"ui-controlgroup-data\" );\n\t\tthis.element.removeAttr( \"role\" );\n\t\tif ( this.options.items.controlgroupLabel ) {\n\t\t\tthis.element\n\t\t\t\t.find( this.options.items.controlgroupLabel )\n\t\t\t\t.find( \".ui-controlgroup-label-contents\" )\n\t\t\t\t.contents().unwrap();\n\t\t}\n\t},\n\n\t_initWidgets: function() {\n\t\tvar that = this,\n\t\t\tchildWidgets = [];\n\n\t\t// First we iterate over each of the items options\n\t\t$.each( this.options.items, function( widget, selector ) {\n\t\t\tvar labels;\n\t\t\tvar options = {};\n\n\t\t\t// Make sure the widget has a selector set\n\t\t\tif ( !selector ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( widget === \"controlgroupLabel\" ) {\n\t\t\t\tlabels = that.element.find( selector );\n\t\t\t\tlabels.each( function() {\n\t\t\t\t\tvar element = $( this );\n\n\t\t\t\t\tif ( element.children( \".ui-controlgroup-label-contents\" ).length ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telement.contents()\n\t\t\t\t\t\t.wrapAll( \"<span class='ui-controlgroup-label-contents'></span>\" );\n\t\t\t\t} );\n\t\t\t\tthat._addClass( labels, null, \"ui-widget ui-widget-content ui-state-default\" );\n\t\t\t\tchildWidgets = childWidgets.concat( labels.get() );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure the widget actually exists\n\t\t\tif ( !$.fn[ widget ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We assume everything is in the middle to start because we can't determine\n\t\t\t// first / last elements until all enhancments are done.\n\t\t\tif ( that[ \"_\" + widget + \"Options\" ] ) {\n\t\t\t\toptions = that[ \"_\" + widget + \"Options\" ]( \"middle\" );\n\t\t\t} else {\n\t\t\t\toptions = { classes: {} };\n\t\t\t}\n\n\t\t\t// Find instances of this widget inside controlgroup and init them\n\t\t\tthat.element\n\t\t\t\t.find( selector )\n\t\t\t\t.each( function() {\n\t\t\t\t\tvar element = $( this );\n\t\t\t\t\tvar instance = element[ widget ]( \"instance\" );\n\n\t\t\t\t\t// We need to clone the default options for this type of widget to avoid\n\t\t\t\t\t// polluting the variable options which has a wider scope than a single widget.\n\t\t\t\t\tvar instanceOptions = $.widget.extend( {}, options );\n\n\t\t\t\t\t// If the button is the child of a spinner ignore it\n\t\t\t\t\t// TODO: Find a more generic solution\n\t\t\t\t\tif ( widget === \"button\" && element.parent( \".ui-spinner\" ).length ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create the widget if it doesn't exist\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\tinstance = element[ widget ]()[ widget ]( \"instance\" );\n\t\t\t\t\t}\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstanceOptions.classes =\n\t\t\t\t\t\t\tthat._resolveClassesValues( instanceOptions.classes, instance );\n\t\t\t\t\t}\n\t\t\t\t\telement[ widget ]( instanceOptions );\n\n\t\t\t\t\t// Store an instance of the controlgroup to be able to reference\n\t\t\t\t\t// from the outermost element for changing options and refresh\n\t\t\t\t\tvar widgetElement = element[ widget ]( \"widget\" );\n\t\t\t\t\t$.data( widgetElement[ 0 ], \"ui-controlgroup-data\",\n\t\t\t\t\t\tinstance ? instance : element[ widget ]( \"instance\" ) );\n\n\t\t\t\t\tchildWidgets.push( widgetElement[ 0 ] );\n\t\t\t\t} );\n\t\t} );\n\n\t\tthis.childWidgets = $( $.uniqueSort( childWidgets ) );\n\t\tthis._addClass( this.childWidgets, \"ui-controlgroup-item\" );\n\t},\n\n\t_callChildMethod: function( method ) {\n\t\tthis.childWidgets.each( function() {\n\t\t\tvar element = $( this ),\n\t\t\t\tdata = element.data( \"ui-controlgroup-data\" );\n\t\t\tif ( data && data[ method ] ) {\n\t\t\t\tdata[ method ]();\n\t\t\t}\n\t\t} );\n\t},\n\n\t_updateCornerClass: function( element, position ) {\n\t\tvar remove = \"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all\";\n\t\tvar add = this._buildSimpleOptions( position, \"label\" ).classes.label;\n\n\t\tthis._removeClass( element, null, remove );\n\t\tthis._addClass( element, null, add );\n\t},\n\n\t_buildSimpleOptions: function( position, key ) {\n\t\tvar direction = this.options.direction === \"vertical\";\n\t\tvar result = {\n\t\t\tclasses: {}\n\t\t};\n\t\tresult.classes[ key ] = {\n\t\t\t\"middle\": \"\",\n\t\t\t\"first\": \"ui-corner-\" + ( direction ? \"top\" : \"left\" ),\n\t\t\t\"last\": \"ui-corner-\" + ( direction ? \"bottom\" : \"right\" ),\n\t\t\t\"only\": \"ui-corner-all\"\n\t\t}[ position ];\n\n\t\treturn result;\n\t},\n\n\t_spinnerOptions: function( position ) {\n\t\tvar options = this._buildSimpleOptions( position, \"ui-spinner\" );\n\n\t\toptions.classes[ \"ui-spinner-up\" ] = \"\";\n\t\toptions.classes[ \"ui-spinner-down\" ] = \"\";\n\n\t\treturn options;\n\t},\n\n\t_buttonOptions: function( position ) {\n\t\treturn this._buildSimpleOptions( position, \"ui-button\" );\n\t},\n\n\t_checkboxradioOptions: function( position ) {\n\t\treturn this._buildSimpleOptions( position, \"ui-checkboxradio-label\" );\n\t},\n\n\t_selectmenuOptions: function( position ) {\n\t\tvar direction = this.options.direction === \"vertical\";\n\t\treturn {\n\t\t\twidth: direction ? \"auto\" : false,\n\t\t\tclasses: {\n\t\t\t\tmiddle: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"\"\n\t\t\t\t},\n\t\t\t\tfirst: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"ui-corner-\" + ( direction ? \"top\" : \"tl\" ),\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-\" + ( direction ? \"top\" : \"left\" )\n\t\t\t\t},\n\t\t\t\tlast: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": direction ? \"\" : \"ui-corner-tr\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-\" + ( direction ? \"bottom\" : \"right\" )\n\t\t\t\t},\n\t\t\t\tonly: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"ui-corner-top\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-all\"\n\t\t\t\t}\n\n\t\t\t}[ position ]\n\t\t};\n\t},\n\n\t_resolveClassesValues: function( classes, instance ) {\n\t\tvar result = {};\n\t\t$.each( classes, function( key ) {\n\t\t\tvar current = instance.options.classes[ key ] || \"\";\n\t\t\tcurrent = String.prototype.trim.call( current.replace( controlgroupCornerRegex, \"\" ) );\n\t\t\tresult[ key ] = ( current + \" \" + classes[ key ] ).replace( /\\s+/g, \" \" );\n\t\t} );\n\t\treturn result;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"direction\" ) {\n\t\t\tthis._removeClass( \"ui-controlgroup-\" + this.options.direction );\n\t\t}\n\n\t\tthis._super( key, value );\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._callChildMethod( value ? \"disable\" : \"enable\" );\n\t\t\treturn;\n\t\t}\n\n\t\tthis.refresh();\n\t},\n\n\trefresh: function() {\n\t\tvar children,\n\t\t\tthat = this;\n\n\t\tthis._addClass( \"ui-controlgroup ui-controlgroup-\" + this.options.direction );\n\n\t\tif ( this.options.direction === \"horizontal\" ) {\n\t\t\tthis._addClass( null, \"ui-helper-clearfix\" );\n\t\t}\n\t\tthis._initWidgets();\n\n\t\tchildren = this.childWidgets;\n\n\t\t// We filter here because we need to track all childWidgets not just the visible ones\n\t\tif ( this.options.onlyVisible ) {\n\t\t\tchildren = children.filter( \":visible\" );\n\t\t}\n\n\t\tif ( children.length ) {\n\n\t\t\t// We do this last because we need to make sure all enhancment is done\n\t\t\t// before determining first and last\n\t\t\t$.each( [ \"first\", \"last\" ], function( index, value ) {\n\t\t\t\tvar instance = children[ value ]().data( \"ui-controlgroup-data\" );\n\n\t\t\t\tif ( instance && that[ \"_\" + instance.widgetName + \"Options\" ] ) {\n\t\t\t\t\tvar options = that[ \"_\" + instance.widgetName + \"Options\" ](\n\t\t\t\t\t\tchildren.length === 1 ? \"only\" : value\n\t\t\t\t\t);\n\t\t\t\t\toptions.classes = that._resolveClassesValues( options.classes, instance );\n\t\t\t\t\tinstance.element[ instance.widgetName ]( options );\n\t\t\t\t} else {\n\t\t\t\t\tthat._updateCornerClass( children[ value ](), value );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Finally call the refresh method on each of the child widgets.\n\t\t\tthis._callChildMethod( \"refresh\" );\n\t\t}\n\t}\n} );\n} );\n","/*!\n * jQuery UI Dialog 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Dialog\n//>>group: Widgets\n//>>description: Displays customizable dialog windows.\n//>>docs: http://api.jqueryui.com/dialog/\n//>>demos: http://jqueryui.com/dialog/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/dialog.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./button\",\n\t\t\t\"./draggable\",\n\t\t\t\"./mouse\",\n\t\t\t\"./resizable\",\n\t\t\t\"../focusable\",\n\t\t\t\"../keycode\",\n\t\t\t\"../position\",\n\t\t\t\"../safe-active-element\",\n\t\t\t\"../safe-blur\",\n\t\t\t\"../tabbable\",\n\t\t\t\"../unique-id\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.dialog\", {\n\tversion: \"1.13.2\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoOpen: true,\n\t\tbuttons: [],\n\t\tclasses: {\n\t\t\t\"ui-dialog\": \"ui-corner-all\",\n\t\t\t\"ui-dialog-titlebar\": \"ui-corner-all\"\n\t\t},\n\t\tcloseOnEscape: true,\n\t\tcloseText: \"Close\",\n\t\tdraggable: true,\n\t\thide: null,\n\t\theight: \"auto\",\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 150,\n\t\tminWidth: 150,\n\t\tmodal: false,\n\t\tposition: {\n\t\t\tmy: \"center\",\n\t\t\tat: \"center\",\n\t\t\tof: window,\n\t\t\tcollision: \"fit\",\n\n\t\t\t// Ensure the titlebar is always visible\n\t\t\tusing: function( pos ) {\n\t\t\t\tvar topOffset = $( this ).css( pos ).offset().top;\n\t\t\t\tif ( topOffset < 0 ) {\n\t\t\t\t\t$( this ).css( \"top\", pos.top - topOffset );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresizable: true,\n\t\tshow: null,\n\t\ttitle: null,\n\t\twidth: 300,\n\n\t\t// Callbacks\n\t\tbeforeClose: null,\n\t\tclose: null,\n\t\tdrag: null,\n\t\tdragStart: null,\n\t\tdragStop: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresize: null,\n\t\tresizeStart: null,\n\t\tresizeStop: null\n\t},\n\n\tsizeRelatedOptions: {\n\t\tbuttons: true,\n\t\theight: true,\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true,\n\t\twidth: true\n\t},\n\n\tresizableRelatedOptions: {\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true\n\t},\n\n\t_create: function() {\n\t\tthis.originalCss = {\n\t\t\tdisplay: this.element[ 0 ].style.display,\n\t\t\twidth: this.element[ 0 ].style.width,\n\t\t\tminHeight: this.element[ 0 ].style.minHeight,\n\t\t\tmaxHeight: this.element[ 0 ].style.maxHeight,\n\t\t\theight: this.element[ 0 ].style.height\n\t\t};\n\t\tthis.originalPosition = {\n\t\t\tparent: this.element.parent(),\n\t\t\tindex: this.element.parent().children().index( this.element )\n\t\t};\n\t\tthis.originalTitle = this.element.attr( \"title\" );\n\t\tif ( this.options.title == null && this.originalTitle != null ) {\n\t\t\tthis.options.title = this.originalTitle;\n\t\t}\n\n\t\t// Dialogs can't be disabled\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.options.disabled = false;\n\t\t}\n\n\t\tthis._createWrapper();\n\n\t\tthis.element\n\t\t\t.show()\n\t\t\t.removeAttr( \"title\" )\n\t\t\t.appendTo( this.uiDialog );\n\n\t\tthis._addClass( \"ui-dialog-content\", \"ui-widget-content\" );\n\n\t\tthis._createTitlebar();\n\t\tthis._createButtonPane();\n\n\t\tif ( this.options.draggable && $.fn.draggable ) {\n\t\t\tthis._makeDraggable();\n\t\t}\n\t\tif ( this.options.resizable && $.fn.resizable ) {\n\t\t\tthis._makeResizable();\n\t\t}\n\n\t\tthis._isOpen = false;\n\n\t\tthis._trackFocus();\n\t},\n\n\t_init: function() {\n\t\tif ( this.options.autoOpen ) {\n\t\t\tthis.open();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\t\tif ( element && ( element.jquery || element.nodeType ) ) {\n\t\t\treturn $( element );\n\t\t}\n\t\treturn this.document.find( element || \"body\" ).eq( 0 );\n\t},\n\n\t_destroy: function() {\n\t\tvar next,\n\t\t\toriginalPosition = this.originalPosition;\n\n\t\tthis._untrackInstance();\n\t\tthis._destroyOverlay();\n\n\t\tthis.element\n\t\t\t.removeUniqueId()\n\t\t\t.css( this.originalCss )\n\n\t\t\t// Without detaching first, the following becomes really slow\n\t\t\t.detach();\n\n\t\tthis.uiDialog.remove();\n\n\t\tif ( this.originalTitle ) {\n\t\t\tthis.element.attr( \"title\", this.originalTitle );\n\t\t}\n\n\t\tnext = originalPosition.parent.children().eq( originalPosition.index );\n\n\t\t// Don't try to place the dialog next to itself (#8613)\n\t\tif ( next.length && next[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tnext.before( this.element );\n\t\t} else {\n\t\t\toriginalPosition.parent.append( this.element );\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.uiDialog;\n\t},\n\n\tdisable: $.noop,\n\tenable: $.noop,\n\n\tclose: function( event ) {\n\t\tvar that = this;\n\n\t\tif ( !this._isOpen || this._trigger( \"beforeClose\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = false;\n\t\tthis._focusedElement = null;\n\t\tthis._destroyOverlay();\n\t\tthis._untrackInstance();\n\n\t\tif ( !this.opener.filter( \":focusable\" ).trigger( \"focus\" ).length ) {\n\n\t\t\t// Hiding a focused element doesn't trigger blur in WebKit\n\t\t\t// so in case we have nothing to focus on, explicitly blur the active element\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=47182\n\t\t\t$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\t\t}\n\n\t\tthis._hide( this.uiDialog, this.options.hide, function() {\n\t\t\tthat._trigger( \"close\", event );\n\t\t} );\n\t},\n\n\tisOpen: function() {\n\t\treturn this._isOpen;\n\t},\n\n\tmoveToTop: function() {\n\t\tthis._moveToTop();\n\t},\n\n\t_moveToTop: function( event, silent ) {\n\t\tvar moved = false,\n\t\t\tzIndices = this.uiDialog.siblings( \".ui-front:visible\" ).map( function() {\n\t\t\t\treturn +$( this ).css( \"z-index\" );\n\t\t\t} ).get(),\n\t\t\tzIndexMax = Math.max.apply( null, zIndices );\n\n\t\tif ( zIndexMax >= +this.uiDialog.css( \"z-index\" ) ) {\n\t\t\tthis.uiDialog.css( \"z-index\", zIndexMax + 1 );\n\t\t\tmoved = true;\n\t\t}\n\n\t\tif ( moved && !silent ) {\n\t\t\tthis._trigger( \"focus\", event );\n\t\t}\n\t\treturn moved;\n\t},\n\n\topen: function() {\n\t\tvar that = this;\n\t\tif ( this._isOpen ) {\n\t\t\tif ( this._moveToTop() ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = true;\n\t\tthis.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\n\t\tthis._size();\n\t\tthis._position();\n\t\tthis._createOverlay();\n\t\tthis._moveToTop( null, true );\n\n\t\t// Ensure the overlay is moved to the top with the dialog, but only when\n\t\t// opening. The overlay shouldn't move after the dialog is open so that\n\t\t// modeless dialogs opened after the modal dialog stack properly.\n\t\tif ( this.overlay ) {\n\t\t\tthis.overlay.css( \"z-index\", this.uiDialog.css( \"z-index\" ) - 1 );\n\t\t}\n\n\t\tthis._show( this.uiDialog, this.options.show, function() {\n\t\t\tthat._focusTabbable();\n\t\t\tthat._trigger( \"focus\" );\n\t\t} );\n\n\t\t// Track the dialog immediately upon opening in case a focus event\n\t\t// somehow occurs outside of the dialog before an element inside the\n\t\t// dialog is focused (#10152)\n\t\tthis._makeFocusTarget();\n\n\t\tthis._trigger( \"open\" );\n\t},\n\n\t_focusTabbable: function() {\n\n\t\t// Set focus to the first match:\n\t\t// 1. An element that was focused previously\n\t\t// 2. First element inside the dialog matching [autofocus]\n\t\t// 3. Tabbable element inside the content element\n\t\t// 4. Tabbable element inside the buttonpane\n\t\t// 5. The close button\n\t\t// 6. The dialog itself\n\t\tvar hasFocus = this._focusedElement;\n\t\tif ( !hasFocus ) {\n\t\t\thasFocus = this.element.find( \"[autofocus]\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.element.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogButtonPane.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogTitlebarClose.filter( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialog;\n\t\t}\n\t\thasFocus.eq( 0 ).trigger( \"focus\" );\n\t},\n\n\t_restoreTabbableFocus: function() {\n\t\tvar activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),\n\t\t\tisActive = this.uiDialog[ 0 ] === activeElement ||\n\t\t\t\t$.contains( this.uiDialog[ 0 ], activeElement );\n\t\tif ( !isActive ) {\n\t\t\tthis._focusTabbable();\n\t\t}\n\t},\n\n\t_keepFocus: function( event ) {\n\t\tevent.preventDefault();\n\t\tthis._restoreTabbableFocus();\n\n\t\t// support: IE\n\t\t// IE <= 8 doesn't prevent moving focus even with event.preventDefault()\n\t\t// so we check again later\n\t\tthis._delay( this._restoreTabbableFocus );\n\t},\n\n\t_createWrapper: function() {\n\t\tthis.uiDialog = $( \"<div>\" )\n\t\t\t.hide()\n\t\t\t.attr( {\n\n\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: \"dialog\"\n\t\t\t} )\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._addClass( this.uiDialog, \"ui-dialog\", \"ui-widget ui-widget-content ui-front\" );\n\t\tthis._on( this.uiDialog, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent tabbing out of dialogs\n\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar tabbables = this.uiDialog.find( \":tabbable\" ),\n\t\t\t\t\tfirst = tabbables.first(),\n\t\t\t\t\tlast = tabbables.last();\n\n\t\t\t\tif ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&\n\t\t\t\t\t\t!event.shiftKey ) {\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tfirst.trigger( \"focus\" );\n\t\t\t\t\t} );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( ( event.target === first[ 0 ] ||\n\t\t\t\t\t\tevent.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tlast.trigger( \"focus\" );\n\t\t\t\t\t} );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\tmousedown: function( event ) {\n\t\t\t\tif ( this._moveToTop( event ) ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// We assume that any existing aria-describedby attribute means\n\t\t// that the dialog content is marked up properly\n\t\t// otherwise we brute force the content as the description\n\t\tif ( !this.element.find( \"[aria-describedby]\" ).length ) {\n\t\t\tthis.uiDialog.attr( {\n\t\t\t\t\"aria-describedby\": this.element.uniqueId().attr( \"id\" )\n\t\t\t} );\n\t\t}\n\t},\n\n\t_createTitlebar: function() {\n\t\tvar uiDialogTitle;\n\n\t\tthis.uiDialogTitlebar = $( \"<div>\" );\n\t\tthis._addClass( this.uiDialogTitlebar,\n\t\t\t\"ui-dialog-titlebar\", \"ui-widget-header ui-helper-clearfix\" );\n\t\tthis._on( this.uiDialogTitlebar, {\n\t\t\tmousedown: function( event ) {\n\n\t\t\t\t// Don't prevent click on close button (#8838)\n\t\t\t\t// Focusing a dialog that is partially scrolled out of view\n\t\t\t\t// causes the browser to scroll it into view, preventing the click event\n\t\t\t\tif ( !$( event.target ).closest( \".ui-dialog-titlebar-close\" ) ) {\n\n\t\t\t\t\t// Dialog isn't getting focus when dragging (#8063)\n\t\t\t\t\tthis.uiDialog.trigger( \"focus\" );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Support: IE\n\t\t// Use type=\"button\" to prevent enter keypresses in textboxes from closing the\n\t\t// dialog in IE (#9312)\n\t\tthis.uiDialogTitlebarClose = $( \"<button type='button'></button>\" )\n\t\t\t.button( {\n\t\t\t\tlabel: $( \"<a>\" ).text( this.options.closeText ).html(),\n\t\t\t\ticon: \"ui-icon-closethick\",\n\t\t\t\tshowLabel: false\n\t\t\t} )\n\t\t\t.appendTo( this.uiDialogTitlebar );\n\n\t\tthis._addClass( this.uiDialogTitlebarClose, \"ui-dialog-titlebar-close\" );\n\t\tthis._on( this.uiDialogTitlebarClose, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t} );\n\n\t\tuiDialogTitle = $( \"<span>\" ).uniqueId().prependTo( this.uiDialogTitlebar );\n\t\tthis._addClass( uiDialogTitle, \"ui-dialog-title\" );\n\t\tthis._title( uiDialogTitle );\n\n\t\tthis.uiDialogTitlebar.prependTo( this.uiDialog );\n\n\t\tthis.uiDialog.attr( {\n\t\t\t\"aria-labelledby\": uiDialogTitle.attr( \"id\" )\n\t\t} );\n\t},\n\n\t_title: function( title ) {\n\t\tif ( this.options.title ) {\n\t\t\ttitle.text( this.options.title );\n\t\t} else {\n\t\t\ttitle.html( \"&#160;\" );\n\t\t}\n\t},\n\n\t_createButtonPane: function() {\n\t\tthis.uiDialogButtonPane = $( \"<div>\" );\n\t\tthis._addClass( this.uiDialogButtonPane, \"ui-dialog-buttonpane\",\n\t\t\t\"ui-widget-content ui-helper-clearfix\" );\n\n\t\tthis.uiButtonSet = $( \"<div>\" )\n\t\t\t.appendTo( this.uiDialogButtonPane );\n\t\tthis._addClass( this.uiButtonSet, \"ui-dialog-buttonset\" );\n\n\t\tthis._createButtons();\n\t},\n\n\t_createButtons: function() {\n\t\tvar that = this,\n\t\t\tbuttons = this.options.buttons;\n\n\t\t// If we already have a button pane, remove it\n\t\tthis.uiDialogButtonPane.remove();\n\t\tthis.uiButtonSet.empty();\n\n\t\tif ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {\n\t\t\tthis._removeClass( this.uiDialog, \"ui-dialog-buttons\" );\n\t\t\treturn;\n\t\t}\n\n\t\t$.each( buttons, function( name, props ) {\n\t\t\tvar click, buttonOptions;\n\t\t\tprops = typeof props === \"function\" ?\n\t\t\t\t{ click: props, text: name } :\n\t\t\t\tprops;\n\n\t\t\t// Default to a non-submitting button\n\t\t\tprops = $.extend( { type: \"button\" }, props );\n\n\t\t\t// Change the context for the click callback to be the main element\n\t\t\tclick = props.click;\n\t\t\tbuttonOptions = {\n\t\t\t\ticon: props.icon,\n\t\t\t\ticonPosition: props.iconPosition,\n\t\t\t\tshowLabel: props.showLabel,\n\n\t\t\t\t// Deprecated options\n\t\t\t\ticons: props.icons,\n\t\t\t\ttext: props.text\n\t\t\t};\n\n\t\t\tdelete props.click;\n\t\t\tdelete props.icon;\n\t\t\tdelete props.iconPosition;\n\t\t\tdelete props.showLabel;\n\n\t\t\t// Deprecated options\n\t\t\tdelete props.icons;\n\t\t\tif ( typeof props.text === \"boolean\" ) {\n\t\t\t\tdelete props.text;\n\t\t\t}\n\n\t\t\t$( \"<button></button>\", props )\n\t\t\t\t.button( buttonOptions )\n\t\t\t\t.appendTo( that.uiButtonSet )\n\t\t\t\t.on( \"click\", function() {\n\t\t\t\t\tclick.apply( that.element[ 0 ], arguments );\n\t\t\t\t} );\n\t\t} );\n\t\tthis._addClass( this.uiDialog, \"ui-dialog-buttons\" );\n\t\tthis.uiDialogButtonPane.appendTo( this.uiDialog );\n\t},\n\n\t_makeDraggable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\tposition: ui.position,\n\t\t\t\toffset: ui.offset\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.draggable( {\n\t\t\tcancel: \".ui-dialog-content, .ui-dialog-titlebar-close\",\n\t\t\thandle: \".ui-dialog-titlebar\",\n\t\t\tcontainment: \"document\",\n\t\t\tstart: function( event, ui ) {\n\t\t\t\tthat._addClass( $( this ), \"ui-dialog-dragging\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"dragStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tdrag: function( event, ui ) {\n\t\t\t\tthat._trigger( \"drag\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar left = ui.offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = ui.offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + ( left >= 0 ? \"+\" : \"\" ) + left + \" \" +\n\t\t\t\t\t\t\"top\" + ( top >= 0 ? \"+\" : \"\" ) + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\tthat._removeClass( $( this ), \"ui-dialog-dragging\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"dragStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_makeResizable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\thandles = options.resizable,\n\n\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\tposition = this.uiDialog.css( \"position\" ),\n\t\t\tresizeHandles = typeof handles === \"string\" ?\n\t\t\t\thandles :\n\t\t\t\t\"n,e,s,w,se,sw,ne,nw\";\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\tposition: ui.position,\n\t\t\t\tsize: ui.size\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.resizable( {\n\t\t\tcancel: \".ui-dialog-content\",\n\t\t\tcontainment: \"document\",\n\t\t\talsoResize: this.element,\n\t\t\tmaxWidth: options.maxWidth,\n\t\t\tmaxHeight: options.maxHeight,\n\t\t\tminWidth: options.minWidth,\n\t\t\tminHeight: this._minHeight(),\n\t\t\thandles: resizeHandles,\n\t\t\tstart: function( event, ui ) {\n\t\t\t\tthat._addClass( $( this ), \"ui-dialog-resizing\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"resizeStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tresize: function( event, ui ) {\n\t\t\t\tthat._trigger( \"resize\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar offset = that.uiDialog.offset(),\n\t\t\t\t\tleft = offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.height = that.uiDialog.height();\n\t\t\t\toptions.width = that.uiDialog.width();\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + ( left >= 0 ? \"+\" : \"\" ) + left + \" \" +\n\t\t\t\t\t\t\"top\" + ( top >= 0 ? \"+\" : \"\" ) + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\tthat._removeClass( $( this ), \"ui-dialog-resizing\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"resizeStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t} )\n\t\t\t.css( \"position\", position );\n\t},\n\n\t_trackFocus: function() {\n\t\tthis._on( this.widget(), {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._makeFocusTarget();\n\t\t\t\tthis._focusedElement = $( event.target );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_makeFocusTarget: function() {\n\t\tthis._untrackInstance();\n\t\tthis._trackingInstances().unshift( this );\n\t},\n\n\t_untrackInstance: function() {\n\t\tvar instances = this._trackingInstances(),\n\t\t\texists = $.inArray( this, instances );\n\t\tif ( exists !== -1 ) {\n\t\t\tinstances.splice( exists, 1 );\n\t\t}\n\t},\n\n\t_trackingInstances: function() {\n\t\tvar instances = this.document.data( \"ui-dialog-instances\" );\n\t\tif ( !instances ) {\n\t\t\tinstances = [];\n\t\t\tthis.document.data( \"ui-dialog-instances\", instances );\n\t\t}\n\t\treturn instances;\n\t},\n\n\t_minHeight: function() {\n\t\tvar options = this.options;\n\n\t\treturn options.height === \"auto\" ?\n\t\t\toptions.minHeight :\n\t\t\tMath.min( options.minHeight, options.height );\n\t},\n\n\t_position: function() {\n\n\t\t// Need to show the dialog to get the actual offset in the position plugin\n\t\tvar isVisible = this.uiDialog.is( \":visible\" );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.show();\n\t\t}\n\t\tthis.uiDialog.position( this.options.position );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.hide();\n\t\t}\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar that = this,\n\t\t\tresize = false,\n\t\t\tresizableOptions = {};\n\n\t\t$.each( options, function( key, value ) {\n\t\t\tthat._setOption( key, value );\n\n\t\t\tif ( key in that.sizeRelatedOptions ) {\n\t\t\t\tresize = true;\n\t\t\t}\n\t\t\tif ( key in that.resizableRelatedOptions ) {\n\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t}\n\t\t} );\n\n\t\tif ( resize ) {\n\t\t\tthis._size();\n\t\t\tthis._position();\n\t\t}\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar isDraggable, isResizable,\n\t\t\tuiDialog = this.uiDialog;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.uiDialog.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"buttons\" ) {\n\t\t\tthis._createButtons();\n\t\t}\n\n\t\tif ( key === \"closeText\" ) {\n\t\t\tthis.uiDialogTitlebarClose.button( {\n\n\t\t\t\t// Ensure that we always pass a string\n\t\t\t\tlabel: $( \"<a>\" ).text( \"\" + this.options.closeText ).html()\n\t\t\t} );\n\t\t}\n\n\t\tif ( key === \"draggable\" ) {\n\t\t\tisDraggable = uiDialog.is( \":data(ui-draggable)\" );\n\t\t\tif ( isDraggable && !value ) {\n\t\t\t\tuiDialog.draggable( \"destroy\" );\n\t\t\t}\n\n\t\t\tif ( !isDraggable && value ) {\n\t\t\t\tthis._makeDraggable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"position\" ) {\n\t\t\tthis._position();\n\t\t}\n\n\t\tif ( key === \"resizable\" ) {\n\n\t\t\t// currently resizable, becoming non-resizable\n\t\t\tisResizable = uiDialog.is( \":data(ui-resizable)\" );\n\t\t\tif ( isResizable && !value ) {\n\t\t\t\tuiDialog.resizable( \"destroy\" );\n\t\t\t}\n\n\t\t\t// Currently resizable, changing handles\n\t\t\tif ( isResizable && typeof value === \"string\" ) {\n\t\t\t\tuiDialog.resizable( \"option\", \"handles\", value );\n\t\t\t}\n\n\t\t\t// Currently non-resizable, becoming resizable\n\t\t\tif ( !isResizable && value !== false ) {\n\t\t\t\tthis._makeResizable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"title\" ) {\n\t\t\tthis._title( this.uiDialogTitlebar.find( \".ui-dialog-title\" ) );\n\t\t}\n\t},\n\n\t_size: function() {\n\n\t\t// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t// divs will both have width and height set, so we need to reset them\n\t\tvar nonContentHeight, minContentHeight, maxContentHeight,\n\t\t\toptions = this.options;\n\n\t\t// Reset content sizing\n\t\tthis.element.show().css( {\n\t\t\twidth: \"auto\",\n\t\t\tminHeight: 0,\n\t\t\tmaxHeight: \"none\",\n\t\t\theight: 0\n\t\t} );\n\n\t\tif ( options.minWidth > options.width ) {\n\t\t\toptions.width = options.minWidth;\n\t\t}\n\n\t\t// Reset wrapper sizing\n\t\t// determine the height of all the non-content elements\n\t\tnonContentHeight = this.uiDialog.css( {\n\t\t\theight: \"auto\",\n\t\t\twidth: options.width\n\t\t} )\n\t\t\t.outerHeight();\n\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\tmaxContentHeight = typeof options.maxHeight === \"number\" ?\n\t\t\tMath.max( 0, options.maxHeight - nonContentHeight ) :\n\t\t\t\"none\";\n\n\t\tif ( options.height === \"auto\" ) {\n\t\t\tthis.element.css( {\n\t\t\t\tminHeight: minContentHeight,\n\t\t\t\tmaxHeight: maxContentHeight,\n\t\t\t\theight: \"auto\"\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.element.height( Math.max( 0, options.height - nonContentHeight ) );\n\t\t}\n\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", \"minHeight\", this._minHeight() );\n\t\t}\n\t},\n\n\t_blockFrames: function() {\n\t\tthis.iframeBlocks = this.document.find( \"iframe\" ).map( function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( {\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\twidth: iframe.outerWidth(),\n\t\t\t\t\theight: iframe.outerHeight()\n\t\t\t\t} )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t} );\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_allowInteraction: function( event ) {\n\t\tif ( $( event.target ).closest( \".ui-dialog\" ).length ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Remove hack when datepicker implements\n\t\t// the .ui-front logic (#8989)\n\t\treturn !!$( event.target ).closest( \".ui-datepicker\" ).length;\n\t},\n\n\t_createOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar jqMinor = $.fn.jquery.substring( 0, 4 );\n\n\t\t// We use a delay in case the overlay is created from an\n\t\t// event that we're going to be cancelling (#2804)\n\t\tvar isOpening = true;\n\t\tthis._delay( function() {\n\t\t\tisOpening = false;\n\t\t} );\n\n\t\tif ( !this.document.data( \"ui-dialog-overlays\" ) ) {\n\n\t\t\t// Prevent use of anchors and inputs\n\t\t\t// This doesn't use `_on()` because it is a shared event handler\n\t\t\t// across all open modal dialogs.\n\t\t\tthis.document.on( \"focusin.ui-dialog\", function( event ) {\n\t\t\t\tif ( isOpening ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar instance = this._trackingInstances()[ 0 ];\n\t\t\t\tif ( !instance._allowInteraction( event ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tinstance._focusTabbable();\n\n\t\t\t\t\t// Support: jQuery >=3.4 <3.6 only\n\t\t\t\t\t// Focus re-triggering in jQuery 3.4/3.5 makes the original element\n\t\t\t\t\t// have its focus event propagated last, breaking the re-targeting.\n\t\t\t\t\t// Trigger focus in a delay in addition if needed to avoid the issue\n\t\t\t\t\t// See https://github.com/jquery/jquery/issues/4382\n\t\t\t\t\tif ( jqMinor === \"3.4.\" || jqMinor === \"3.5.\" ) {\n\t\t\t\t\t\tinstance._delay( instance._restoreTabbableFocus );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.bind( this ) );\n\t\t}\n\n\t\tthis.overlay = $( \"<div>\" )\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._addClass( this.overlay, null, \"ui-widget-overlay ui-front\" );\n\t\tthis._on( this.overlay, {\n\t\t\tmousedown: \"_keepFocus\"\n\t\t} );\n\t\tthis.document.data( \"ui-dialog-overlays\",\n\t\t\t( this.document.data( \"ui-dialog-overlays\" ) || 0 ) + 1 );\n\t},\n\n\t_destroyOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.overlay ) {\n\t\t\tvar overlays = this.document.data( \"ui-dialog-overlays\" ) - 1;\n\n\t\t\tif ( !overlays ) {\n\t\t\t\tthis.document.off( \"focusin.ui-dialog\" );\n\t\t\t\tthis.document.removeData( \"ui-dialog-overlays\" );\n\t\t\t} else {\n\t\t\t\tthis.document.data( \"ui-dialog-overlays\", overlays );\n\t\t\t}\n\n\t\t\tthis.overlay.remove();\n\t\t\tthis.overlay = null;\n\t\t}\n\t}\n} );\n\n// DEPRECATED\n// TODO: switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for dialogClass option\n\t$.widget( \"ui.dialog\", $.ui.dialog, {\n\t\toptions: {\n\t\t\tdialogClass: \"\"\n\t\t},\n\t\t_createWrapper: function() {\n\t\t\tthis._super();\n\t\t\tthis.uiDialog.addClass( this.options.dialogClass );\n\t\t},\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"dialogClass\" ) {\n\t\t\t\tthis.uiDialog\n\t\t\t\t\t.removeClass( this.options.dialogClass )\n\t\t\t\t\t.addClass( value );\n\t\t\t}\n\t\t\tthis._superApply( arguments );\n\t\t}\n\t} );\n}\n\nreturn $.ui.dialog;\n\n} );\n","/*!\n * jQuery UI Draggable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Draggable\n//>>group: Interactions\n//>>description: Enables dragging functionality for any element.\n//>>docs: http://api.jqueryui.com/draggable/\n//>>demos: http://jqueryui.com/draggable/\n//>>css.structure: ../../themes/base/draggable.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./mouse\",\n\t\t\t\"../data\",\n\t\t\t\"../plugin\",\n\t\t\t\"../safe-active-element\",\n\t\t\t\"../safe-blur\",\n\t\t\t\"../scroll-parent\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.draggable\", $.ui.mouse, {\n\tversion: \"1.13.2\",\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false,\n\n\t\t// Callbacks\n\t\tdrag: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tif ( this.options.helper === \"original\" ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\t\tif ( this.options.addClasses ) {\n\t\t\tthis._addClass( \"ui-draggable\" );\n\t\t}\n\t\tthis._setHandleClassName();\n\n\t\tthis._mouseInit();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._removeHandleClassName();\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tif ( ( this.helper || this.element ).is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis.destroyOnClear = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._removeHandleClassName();\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar o = this.options;\n\n\t\t// Among others, prevent a drag on a resizable-handle\n\t\tif ( this.helper || o.disabled ||\n\t\t\t\t$( event.target ).closest( \".ui-resizable-handle\" ).length > 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle( event );\n\t\tif ( !this.handle ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._blurActiveElement( event );\n\n\t\tthis._blockFrames( o.iframeFix === true ? \"iframe\" : o.iframeFix );\n\n\t\treturn true;\n\n\t},\n\n\t_blockFrames: function( selector ) {\n\t\tthis.iframeBlocks = this.document.find( selector ).map( function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( \"position\", \"absolute\" )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.outerWidth( iframe.outerWidth() )\n\t\t\t\t.outerHeight( iframe.outerHeight() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t} );\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_blurActiveElement: function( event ) {\n\t\tvar activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),\n\t\t\ttarget = $( event.target );\n\n\t\t// Don't blur if the event occurred on an element that is within\n\t\t// the currently focused element\n\t\t// See #10527, #12472\n\t\tif ( target.closest( activeElement ).length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Blur any element that currently has focus, see #4261\n\t\t$.ui.safeBlur( activeElement );\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper( event );\n\n\t\tthis._addClass( this.helper, \"ui-draggable-dragging\" );\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\tthis.scrollParent = this.helper.scrollParent( true );\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tthis.hasFixedAncestor = this.helper.parents().filter( function() {\n\t\t\t\treturn $( this ).css( \"position\" ) === \"fixed\";\n\t\t\t} ).length > 0;\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.positionAbs = this.element.offset();\n\t\tthis._refreshOffsets( event );\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition( event, false );\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\tif ( o.cursorAt ) {\n\t\t\tthis._adjustOffsetFromHelper( o.cursorAt );\n\t\t}\n\n\t\t//Set a containment if given in the options\n\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif ( this._trigger( \"start\", event ) === false ) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t}\n\n\t\t// Execute the drag once - this causes the helper not to be visible before getting its\n\t\t// correct position\n\t\tthis._mouseDrag( event, true );\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has started\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStart( this, event );\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t_refreshOffsets: function( event ) {\n\t\tthis.offset = {\n\t\t\ttop: this.positionAbs.top - this.margins.top,\n\t\t\tleft: this.positionAbs.left - this.margins.left,\n\t\t\tscroll: false,\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset()\n\t\t};\n\n\t\tthis.offset.click = {\n\t\t\tleft: event.pageX - this.offset.left,\n\t\t\ttop: event.pageY - this.offset.top\n\t\t};\n\t},\n\n\t_mouseDrag: function( event, noPropagation ) {\n\n\t\t// reset any necessary cached properties (see #5009)\n\t\tif ( this.hasFixedAncestor ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event, true );\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif ( !noPropagation ) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif ( this._trigger( \"drag\", event, ui ) === false ) {\n\t\t\t\tthis._mouseUp( new $.Event( \"mouseup\", event ) );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.drag( this, event );\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar that = this,\n\t\t\tdropped = false;\n\t\tif ( $.ui.ddmanager && !this.options.dropBehaviour ) {\n\t\t\tdropped = $.ui.ddmanager.drop( this, event );\n\t\t}\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif ( this.dropped ) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\n\t\tif ( ( this.options.revert === \"invalid\" && !dropped ) ||\n\t\t\t\t( this.options.revert === \"valid\" && dropped ) ||\n\t\t\t\tthis.options.revert === true || ( typeof this.options.revert === \"function\" &&\n\t\t\t\tthis.options.revert.call( this.element, dropped ) )\n\t\t) {\n\t\t\t$( this.helper ).animate(\n\t\t\t\tthis.originalPosition,\n\t\t\t\tparseInt( this.options.revertDuration, 10 ),\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( that._trigger( \"stop\", event ) !== false ) {\n\t\t\t\t\t\tthat._clear();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tif ( this._trigger( \"stop\", event ) !== false ) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis._unblockFrames();\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has stopped\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStop( this, event );\n\t\t}\n\n\t\t// Only need to focus if the event occurred on the draggable itself, see #10527\n\t\tif ( this.handleElement.is( event.target ) ) {\n\n\t\t\t// The interaction is over; whether or not the click resulted in a drag,\n\t\t\t// focus the element\n\t\t\tthis.element.trigger( \"focus\" );\n\t\t}\n\n\t\treturn $.ui.mouse.prototype._mouseUp.call( this, event );\n\t},\n\n\tcancel: function() {\n\n\t\tif ( this.helper.is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis._mouseUp( new $.Event( \"mouseup\", { target: this.element[ 0 ] } ) );\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\t_getHandle: function( event ) {\n\t\treturn this.options.handle ?\n\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\ttrue;\n\t},\n\n\t_setHandleClassName: function() {\n\t\tthis.handleElement = this.options.handle ?\n\t\t\tthis.element.find( this.options.handle ) : this.element;\n\t\tthis._addClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_removeHandleClassName: function() {\n\t\tthis._removeClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_createHelper: function( event ) {\n\n\t\tvar o = this.options,\n\t\t\thelperIsFunction = typeof o.helper === \"function\",\n\t\t\thelper = helperIsFunction ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ?\n\t\t\t\t\tthis.element.clone().removeAttr( \"id\" ) :\n\t\t\t\t\tthis.element );\n\n\t\tif ( !helper.parents( \"body\" ).length ) {\n\t\t\thelper.appendTo( ( o.appendTo === \"parent\" ?\n\t\t\t\tthis.element[ 0 ].parentNode :\n\t\t\t\to.appendTo ) );\n\t\t}\n\n\t\t// Http://bugs.jqueryui.com/ticket/9446\n\t\t// a helper function can return the original element\n\t\t// which wouldn't have been set to relative in _create\n\t\tif ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\n\t\tif ( helper[ 0 ] !== this.element[ 0 ] &&\n\t\t\t\t!( /(fixed|absolute)/ ).test( helper.css( \"position\" ) ) ) {\n\t\t\thelper.css( \"position\", \"absolute\" );\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_setPositionRelative: function() {\n\t\tif ( !( /^(?:r|a|f)/ ).test( this.element.css( \"position\" ) ) ) {\n\t\t\tthis.element[ 0 ].style.position = \"relative\";\n\t\t}\n\t},\n\n\t_adjustOffsetFromHelper: function( obj ) {\n\t\tif ( typeof obj === \"string\" ) {\n\t\t\tobj = obj.split( \" \" );\n\t\t}\n\t\tif ( Array.isArray( obj ) ) {\n\t\t\tobj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };\n\t\t}\n\t\tif ( \"left\" in obj ) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ( \"right\" in obj ) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ( \"top\" in obj ) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ( \"bottom\" in obj ) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_isRootNode: function( element ) {\n\t\treturn ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tvar po = this.offsetParent.offset(),\n\t\t\tdocument = this.document[ 0 ];\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the\n\t\t// following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the\n\t\t// next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n\t\t// the document, which means that the scroll is included in the initial calculation of the\n\t\t// offset of the parent, and never recalculated upon drag\n\t\tif ( this.cssPosition === \"absolute\" && this.scrollParent[ 0 ] !== document &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\tif ( this._isRootNode( this.offsetParent[ 0 ] ) ) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + ( parseInt( this.offsetParent.css( \"borderTopWidth\" ), 10 ) || 0 ),\n\t\t\tleft: po.left + ( parseInt( this.offsetParent.css( \"borderLeftWidth\" ), 10 ) || 0 )\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\t\tif ( this.cssPosition !== \"relative\" ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\tvar p = this.element.position(),\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: p.top - ( parseInt( this.helper.css( \"top\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),\n\t\t\tleft: p.left - ( parseInt( this.helper.css( \"left\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )\n\t\t};\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: ( parseInt( this.element.css( \"marginLeft\" ), 10 ) || 0 ),\n\t\t\ttop: ( parseInt( this.element.css( \"marginTop\" ), 10 ) || 0 ),\n\t\t\tright: ( parseInt( this.element.css( \"marginRight\" ), 10 ) || 0 ),\n\t\t\tbottom: ( parseInt( this.element.css( \"marginBottom\" ), 10 ) || 0 )\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar isUserScrollable, c, ce,\n\t\t\to = this.options,\n\t\t\tdocument = this.document[ 0 ];\n\n\t\tthis.relativeContainer = null;\n\n\t\tif ( !o.containment ) {\n\t\t\tthis.containment = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$( window ).scrollLeft() + $( window ).width() -\n\t\t\t\t\tthis.helperProportions.width - this.margins.left,\n\t\t\t\t$( window ).scrollTop() +\n\t\t\t\t\t( $( window ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"document\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment.constructor === Array ) {\n\t\t\tthis.containment = o.containment;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\n\t\tc = $( o.containment );\n\t\tce = c[ 0 ];\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tisUserScrollable = /(scroll|auto)/.test( c.css( \"overflow\" ) );\n\n\t\tthis.containment = [\n\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ),\n\t\t\t( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.width -\n\t\t\t\tthis.margins.left -\n\t\t\t\tthis.margins.right,\n\t\t\t( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.height -\n\t\t\t\tthis.margins.top -\n\t\t\t\tthis.margins.bottom\n\t\t];\n\t\tthis.relativeContainer = c;\n\t},\n\n\t_convertPositionTo: function( d, pos ) {\n\n\t\tif ( !pos ) {\n\t\t\tpos = this.position;\n\t\t}\n\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.top\t+\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top * mod -\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.left +\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left * mod\t-\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event, constrainPosition ) {\n\n\t\tvar containment, co, top, left,\n\t\t\to = this.options,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY;\n\n\t\t// Cache the scroll\n\t\tif ( !scrollIsRootNode || !this.offset.scroll ) {\n\t\t\tthis.offset.scroll = {\n\t\t\t\ttop: this.scrollParent.scrollTop(),\n\t\t\t\tleft: this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\t// If we are not dragging yet, we won't check for options\n\t\tif ( constrainPosition ) {\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( this.relativeContainer ) {\n\t\t\t\t\tco = this.relativeContainer.offset();\n\t\t\t\t\tcontainment = [\n\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t}\n\n\t\t\t\tif ( event.pageX - this.offset.click.left < containment[ 0 ] ) {\n\t\t\t\t\tpageX = containment[ 0 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top < containment[ 1 ] ) {\n\t\t\t\t\tpageY = containment[ 1 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif ( event.pageX - this.offset.click.left > containment[ 2 ] ) {\n\t\t\t\t\tpageX = containment[ 2 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top > containment[ 3 ] ) {\n\t\t\t\t\tpageY = containment[ 3 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.grid ) {\n\n\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid\n\t\t\t\t// argument errors in IE (see ticket #6950)\n\t\t\t\ttop = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -\n\t\t\t\t\tthis.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;\n\t\t\t\tpageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||\n\t\t\t\t\ttop - this.offset.click.top > containment[ 3 ] ) ?\n\t\t\t\t\t\ttop :\n\t\t\t\t\t\t( ( top - this.offset.click.top >= containment[ 1 ] ) ?\n\t\t\t\t\t\t\ttop - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;\n\n\t\t\t\tleft = o.grid[ 0 ] ? this.originalPageX +\n\t\t\t\t\tMath.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :\n\t\t\t\t\tthis.originalPageX;\n\t\t\t\tpageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||\n\t\t\t\t\tleft - this.offset.click.left > containment[ 2 ] ) ?\n\t\t\t\t\t\tleft :\n\t\t\t\t\t\t( ( left - this.offset.click.left >= containment[ 0 ] ) ?\n\t\t\t\t\t\t\tleft - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"y\" ) {\n\t\t\t\tpageX = this.originalPageX;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"x\" ) {\n\t\t\t\tpageY = this.originalPageY;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageY -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.top -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageX -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.left -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis._removeClass( this.helper, \"ui-draggable-dragging\" );\n\t\tif ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t\tif ( this.destroyOnClear ) {\n\t\t\tthis.destroy();\n\t\t}\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function( type, event, ui ) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call( this, type, [ event, ui, this ], true );\n\n\t\t// Absolute position and offset (see #6884 ) have to be recalculated after plugins\n\t\tif ( /^(drag|start|stop)/.test( type ) ) {\n\t\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\t\t\tui.offset = this.positionAbs;\n\t\t}\n\t\treturn $.Widget.prototype._trigger.call( this, type, event, ui );\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function() {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n} );\n\n$.ui.plugin.add( \"draggable\", \"connectToSortable\", {\n\tstart: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.sortables = [];\n\t\t$( draggable.options.connectToSortable ).each( function() {\n\t\t\tvar sortable = $( this ).sortable( \"instance\" );\n\n\t\t\tif ( sortable && !sortable.options.disabled ) {\n\t\t\t\tdraggable.sortables.push( sortable );\n\n\t\t\t\t// RefreshPositions is called at drag start to refresh the containerCache\n\t\t\t\t// which is used in drag. This ensures it's initialized and synchronized\n\t\t\t\t// with any changes that might have happened on the page since initialization.\n\t\t\t\tsortable.refreshPositions();\n\t\t\t\tsortable._trigger( \"activate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tstop: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.cancelHelperRemoval = false;\n\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar sortable = this;\n\n\t\t\tif ( sortable.isOver ) {\n\t\t\t\tsortable.isOver = 0;\n\n\t\t\t\t// Allow this sortable to handle removing the helper\n\t\t\t\tdraggable.cancelHelperRemoval = true;\n\t\t\t\tsortable.cancelHelperRemoval = false;\n\n\t\t\t\t// Use _storedCSS To restore properties in the sortable,\n\t\t\t\t// as this also handles revert (#9675) since the draggable\n\t\t\t\t// may have modified them in unexpected ways (#8809)\n\t\t\t\tsortable._storedCSS = {\n\t\t\t\t\tposition: sortable.placeholder.css( \"position\" ),\n\t\t\t\t\ttop: sortable.placeholder.css( \"top\" ),\n\t\t\t\t\tleft: sortable.placeholder.css( \"left\" )\n\t\t\t\t};\n\n\t\t\t\tsortable._mouseStop( event );\n\n\t\t\t\t// Once drag has ended, the sortable should return to using\n\t\t\t\t// its original helper, not the shared helper from draggable\n\t\t\t\tsortable.options.helper = sortable.options._helper;\n\t\t\t} else {\n\n\t\t\t\t// Prevent this Sortable from removing the helper.\n\t\t\t\t// However, don't set the draggable to remove the helper\n\t\t\t\t// either as another connected Sortable may yet handle the removal.\n\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\tsortable._trigger( \"deactivate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tdrag: function( event, ui, draggable ) {\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar innermostIntersecting = false,\n\t\t\t\tsortable = this;\n\n\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\tsortable.positionAbs = draggable.positionAbs;\n\t\t\tsortable.helperProportions = draggable.helperProportions;\n\t\t\tsortable.offset.click = draggable.offset.click;\n\n\t\t\tif ( sortable._intersectsWith( sortable.containerCache ) ) {\n\t\t\t\tinnermostIntersecting = true;\n\n\t\t\t\t$.each( draggable.sortables, function() {\n\n\t\t\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\t\t\tthis.positionAbs = draggable.positionAbs;\n\t\t\t\t\tthis.helperProportions = draggable.helperProportions;\n\t\t\t\t\tthis.offset.click = draggable.offset.click;\n\n\t\t\t\t\tif ( this !== sortable &&\n\t\t\t\t\t\t\tthis._intersectsWith( this.containerCache ) &&\n\t\t\t\t\t\t\t$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {\n\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( innermostIntersecting ) {\n\n\t\t\t\t// If it intersects, we use a little isOver variable and set it once,\n\t\t\t\t// so that the move-in stuff gets fired only once.\n\t\t\t\tif ( !sortable.isOver ) {\n\t\t\t\t\tsortable.isOver = 1;\n\n\t\t\t\t\t// Store draggable's parent in case we need to reappend to it later.\n\t\t\t\t\tdraggable._parent = ui.helper.parent();\n\n\t\t\t\t\tsortable.currentItem = ui.helper\n\t\t\t\t\t\t.appendTo( sortable.element )\n\t\t\t\t\t\t.data( \"ui-sortable-item\", true );\n\n\t\t\t\t\t// Store helper option to later restore it\n\t\t\t\t\tsortable.options._helper = sortable.options.helper;\n\n\t\t\t\t\tsortable.options.helper = function() {\n\t\t\t\t\t\treturn ui.helper[ 0 ];\n\t\t\t\t\t};\n\n\t\t\t\t\t// Fire the start events of the sortable with our passed browser event,\n\t\t\t\t\t// and our own helper (so it doesn't create a new one)\n\t\t\t\t\tevent.target = sortable.currentItem[ 0 ];\n\t\t\t\t\tsortable._mouseCapture( event, true );\n\t\t\t\t\tsortable._mouseStart( event, true, true );\n\n\t\t\t\t\t// Because the browser event is way off the new appended portlet,\n\t\t\t\t\t// modify necessary variables to reflect the changes\n\t\t\t\t\tsortable.offset.click.top = draggable.offset.click.top;\n\t\t\t\t\tsortable.offset.click.left = draggable.offset.click.left;\n\t\t\t\t\tsortable.offset.parent.left -= draggable.offset.parent.left -\n\t\t\t\t\t\tsortable.offset.parent.left;\n\t\t\t\t\tsortable.offset.parent.top -= draggable.offset.parent.top -\n\t\t\t\t\t\tsortable.offset.parent.top;\n\n\t\t\t\t\tdraggable._trigger( \"toSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is in a valid drop zone,\n\t\t\t\t\t// used solely in the revert option to handle \"valid/invalid\".\n\t\t\t\t\tdraggable.dropped = sortable.element;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables in the case that\n\t\t\t\t\t// adding to one sortable changes the location of the other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Hack so receive/update callbacks work (mostly)\n\t\t\t\t\tdraggable.currentItem = draggable.element;\n\t\t\t\t\tsortable.fromOutside = draggable;\n\t\t\t\t}\n\n\t\t\t\tif ( sortable.currentItem ) {\n\t\t\t\t\tsortable._mouseDrag( event );\n\n\t\t\t\t\t// Copy the sortable's position because the draggable's can potentially reflect\n\t\t\t\t\t// a relative position, while sortable is always absolute, which the dragged\n\t\t\t\t\t// element has now become. (#8809)\n\t\t\t\t\tui.position = sortable.position;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t// we fake the drag stop of the sortable, but make sure it doesn't remove\n\t\t\t\t// the helper by using cancelHelperRemoval.\n\t\t\t\tif ( sortable.isOver ) {\n\n\t\t\t\t\tsortable.isOver = 0;\n\t\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\t\t// Calling sortable's mouseStop would trigger a revert,\n\t\t\t\t\t// so revert must be temporarily false until after mouseStop is called.\n\t\t\t\t\tsortable.options._revert = sortable.options.revert;\n\t\t\t\t\tsortable.options.revert = false;\n\n\t\t\t\t\tsortable._trigger( \"out\", event, sortable._uiHash( sortable ) );\n\t\t\t\t\tsortable._mouseStop( event, true );\n\n\t\t\t\t\t// Restore sortable behaviors that were modfied\n\t\t\t\t\t// when the draggable entered the sortable area (#9481)\n\t\t\t\t\tsortable.options.revert = sortable.options._revert;\n\t\t\t\t\tsortable.options.helper = sortable.options._helper;\n\n\t\t\t\t\tif ( sortable.placeholder ) {\n\t\t\t\t\t\tsortable.placeholder.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restore and recalculate the draggable's offset considering the sortable\n\t\t\t\t\t// may have modified them in unexpected ways. (#8809, #10669)\n\t\t\t\t\tui.helper.appendTo( draggable._parent );\n\t\t\t\t\tdraggable._refreshOffsets( event );\n\t\t\t\t\tui.position = draggable._generatePosition( event, true );\n\n\t\t\t\t\tdraggable._trigger( \"fromSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is no longer in a valid drop zone\n\t\t\t\t\tdraggable.dropped = false;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables just in case removing\n\t\t\t\t\t// from one sortable changes the location of other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"cursor\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( \"body\" ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"cursor\" ) ) {\n\t\t\to._cursor = t.css( \"cursor\" );\n\t\t}\n\t\tt.css( \"cursor\", o.cursor );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._cursor ) {\n\t\t\t$( \"body\" ).css( \"cursor\", o._cursor );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"opacity\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\t\tif ( t.css( \"opacity\" ) ) {\n\t\t\to._opacity = t.css( \"opacity\" );\n\t\t}\n\t\tt.css( \"opacity\", o.opacity );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._opacity ) {\n\t\t\t$( ui.helper ).css( \"opacity\", o._opacity );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"scroll\", {\n\tstart: function( event, ui, i ) {\n\t\tif ( !i.scrollParentNotHidden ) {\n\t\t\ti.scrollParentNotHidden = i.helper.scrollParent( false );\n\t\t}\n\n\t\tif ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&\n\t\t\t\ti.scrollParentNotHidden[ 0 ].tagName !== \"HTML\" ) {\n\t\t\ti.overflowOffset = i.scrollParentNotHidden.offset();\n\t\t}\n\t},\n\tdrag: function( event, ui, i  ) {\n\n\t\tvar o = i.options,\n\t\t\tscrolled = false,\n\t\t\tscrollParent = i.scrollParentNotHidden[ 0 ],\n\t\t\tdocument = i.document[ 0 ];\n\n\t\tif ( scrollParent !== document && scrollParent.tagName !== \"HTML\" ) {\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );\n\t\t\t\t} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() - o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() + o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( i, event );\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"snap\", {\n\tstart: function( event, ui, i ) {\n\n\t\tvar o = i.options;\n\n\t\ti.snapElements = [];\n\n\t\t$( o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap )\n\t\t\t.each( function() {\n\t\t\t\tvar $t = $( this ),\n\t\t\t\t\t$o = $t.offset();\n\t\t\t\tif ( this !== i.element[ 0 ] ) {\n\t\t\t\t\ti.snapElements.push( {\n\t\t\t\t\t\titem: this,\n\t\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t},\n\tdrag: function( event, ui, inst ) {\n\n\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\to = inst.options,\n\t\t\td = o.snapTolerance,\n\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor ( i = inst.snapElements.length - 1; i >= 0; i-- ) {\n\n\t\t\tl = inst.snapElements[ i ].left - inst.margins.left;\n\t\t\tr = l + inst.snapElements[ i ].width;\n\t\t\tt = inst.snapElements[ i ].top - inst.margins.top;\n\t\t\tb = t + inst.snapElements[ i ].height;\n\n\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||\n\t\t\t\t\t!$.contains( inst.snapElements[ i ].item.ownerDocument,\n\t\t\t\t\tinst.snapElements[ i ].item ) ) {\n\t\t\t\tif ( inst.snapElements[ i ].snapping ) {\n\t\t\t\t\tif ( inst.options.snap.release ) {\n\t\t\t\t\t\tinst.options.snap.release.call(\n\t\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinst.snapElements[ i ].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( o.snapMode !== \"inner\" ) {\n\t\t\t\tts = Math.abs( t - y2 ) <= d;\n\t\t\t\tbs = Math.abs( b - y1 ) <= d;\n\t\t\t\tls = Math.abs( l - x2 ) <= d;\n\t\t\t\trs = Math.abs( r - x1 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfirst = ( ts || bs || ls || rs );\n\n\t\t\tif ( o.snapMode !== \"outer\" ) {\n\t\t\t\tts = Math.abs( t - y1 ) <= d;\n\t\t\t\tbs = Math.abs( b - y2 ) <= d;\n\t\t\t\tls = Math.abs( l - x1 ) <= d;\n\t\t\t\trs = Math.abs( r - x2 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {\n\t\t\t\tif ( inst.options.snap.snap ) {\n\t\t\t\t\tinst.options.snap.snap.call(\n\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\t$.extend( inst._uiHash(), {\n\t\t\t\t\t\t\tsnapItem: inst.snapElements[ i ].item\n\t\t\t\t\t\t} ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tinst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );\n\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"stack\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar min,\n\t\t\to = instance.options,\n\t\t\tgroup = $.makeArray( $( o.stack ) ).sort( function( a, b ) {\n\t\t\t\treturn ( parseInt( $( a ).css( \"zIndex\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( b ).css( \"zIndex\" ), 10 ) || 0 );\n\t\t\t} );\n\n\t\tif ( !group.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmin = parseInt( $( group[ 0 ] ).css( \"zIndex\" ), 10 ) || 0;\n\t\t$( group ).each( function( i ) {\n\t\t\t$( this ).css( \"zIndex\", min + i );\n\t\t} );\n\t\tthis.css( \"zIndex\", ( min + group.length ) );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"zIndex\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"zIndex\" ) ) {\n\t\t\to._zIndex = t.css( \"zIndex\" );\n\t\t}\n\t\tt.css( \"zIndex\", o.zIndex );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\n\t\tif ( o._zIndex ) {\n\t\t\t$( ui.helper ).css( \"zIndex\", o._zIndex );\n\t\t}\n\t}\n} );\n\nreturn $.ui.draggable;\n\n} );\n","/*!\n * jQuery UI Menu 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Menu\n//>>group: Widgets\n//>>description: Creates nestable menus.\n//>>docs: http://api.jqueryui.com/menu/\n//>>demos: http://jqueryui.com/menu/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/menu.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../keycode\",\n\t\t\t\"../position\",\n\t\t\t\"../safe-active-element\",\n\t\t\t\"../unique-id\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.widget( \"ui.menu\", {\n\tversion: \"1.13.2\",\n\tdefaultElement: \"<ul>\",\n\tdelay: 300,\n\toptions: {\n\t\ticons: {\n\t\t\tsubmenu: \"ui-icon-caret-1-e\"\n\t\t},\n\t\titems: \"> *\",\n\t\tmenus: \"ul\",\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"right top\"\n\t\t},\n\t\trole: \"menu\",\n\n\t\t// Callbacks\n\t\tblur: null,\n\t\tfocus: null,\n\t\tselect: null\n\t},\n\n\t_create: function() {\n\t\tthis.activeMenu = this.element;\n\n\t\t// Flag used to prevent firing of the click handler\n\t\t// as the event bubbles up through nested menus\n\t\tthis.mouseHandled = false;\n\t\tthis.lastMousePosition = { x: null, y: null };\n\t\tthis.element\n\t\t\t.uniqueId()\n\t\t\t.attr( {\n\t\t\t\trole: this.options.role,\n\t\t\t\ttabIndex: 0\n\t\t\t} );\n\n\t\tthis._addClass( \"ui-menu\", \"ui-widget ui-widget-content\" );\n\t\tthis._on( {\n\n\t\t\t// Prevent focus from sticking to links inside menu after clicking\n\t\t\t// them (focus should always stay on UL during navigation).\n\t\t\t\"mousedown .ui-menu-item\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tthis._activateItem( event );\n\t\t\t},\n\t\t\t\"click .ui-menu-item\": function( event ) {\n\t\t\t\tvar target = $( event.target );\n\t\t\t\tvar active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\t\t\t\tif ( !this.mouseHandled && target.not( \".ui-state-disabled\" ).length ) {\n\t\t\t\t\tthis.select( event );\n\n\t\t\t\t\t// Only set the mouseHandled flag if the event will bubble, see #9469.\n\t\t\t\t\tif ( !event.isPropagationStopped() ) {\n\t\t\t\t\t\tthis.mouseHandled = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Open submenu on click\n\t\t\t\t\tif ( target.has( \".ui-menu\" ).length ) {\n\t\t\t\t\t\tthis.expand( event );\n\t\t\t\t\t} else if ( !this.element.is( \":focus\" ) &&\n\t\t\t\t\t\t\tactive.closest( \".ui-menu\" ).length ) {\n\n\t\t\t\t\t\t// Redirect focus to the menu\n\t\t\t\t\t\tthis.element.trigger( \"focus\", [ true ] );\n\n\t\t\t\t\t\t// If the active item is on the top level, let it stay active.\n\t\t\t\t\t\t// Otherwise, blur the active item since it is no longer visible.\n\t\t\t\t\t\tif ( this.active && this.active.parents( \".ui-menu\" ).length === 1 ) {\n\t\t\t\t\t\t\tclearTimeout( this.timer );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"mouseenter .ui-menu-item\": \"_activateItem\",\n\t\t\t\"mousemove .ui-menu-item\": \"_activateItem\",\n\t\t\tmouseleave: \"collapseAll\",\n\t\t\t\"mouseleave .ui-menu\": \"collapseAll\",\n\t\t\tfocus: function( event, keepActiveItem ) {\n\n\t\t\t\t// If there's already an active item, keep it active\n\t\t\t\t// If not, activate the first item\n\t\t\t\tvar item = this.active || this._menuItems().first();\n\n\t\t\t\tif ( !keepActiveItem ) {\n\t\t\t\t\tthis.focus( event, item );\n\t\t\t\t}\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tthis._delay( function() {\n\t\t\t\t\tvar notContained = !$.contains(\n\t\t\t\t\t\tthis.element[ 0 ],\n\t\t\t\t\t\t$.ui.safeActiveElement( this.document[ 0 ] )\n\t\t\t\t\t);\n\t\t\t\t\tif ( notContained ) {\n\t\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\tkeydown: \"_keydown\"\n\t\t} );\n\n\t\tthis.refresh();\n\n\t\t// Clicks outside of a menu collapse any open menus\n\t\tthis._on( this.document, {\n\t\t\tclick: function( event ) {\n\t\t\t\tif ( this._closeOnDocumentClick( event ) ) {\n\t\t\t\t\tthis.collapseAll( event, true );\n\t\t\t\t}\n\n\t\t\t\t// Reset the mouseHandled flag\n\t\t\t\tthis.mouseHandled = false;\n\t\t\t}\n\t\t} );\n\t},\n\n\t_activateItem: function( event ) {\n\n\t\t// Ignore mouse events while typeahead is active, see #10458.\n\t\t// Prevents focusing the wrong item when typeahead causes a scroll while the mouse\n\t\t// is over an item in the menu\n\t\tif ( this.previousFilter ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)\n\t\tif ( event.clientX === this.lastMousePosition.x &&\n\t\t\t\tevent.clientY === this.lastMousePosition.y ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.lastMousePosition = {\n\t\t\tx: event.clientX,\n\t\t\ty: event.clientY\n\t\t};\n\n\t\tvar actualTarget = $( event.target ).closest( \".ui-menu-item\" ),\n\t\t\ttarget = $( event.currentTarget );\n\n\t\t// Ignore bubbled events on parent items, see #11641\n\t\tif ( actualTarget[ 0 ] !== target[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the item is already active, there's nothing to do\n\t\tif ( target.is( \".ui-state-active\" ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove ui-state-active class from siblings of the newly focused menu item\n\t\t// to avoid a jump caused by adjacent elements both having a class with a border\n\t\tthis._removeClass( target.siblings().children( \".ui-state-active\" ),\n\t\t\tnull, \"ui-state-active\" );\n\t\tthis.focus( event, target );\n\t},\n\n\t_destroy: function() {\n\t\tvar items = this.element.find( \".ui-menu-item\" )\n\t\t\t\t.removeAttr( \"role aria-disabled\" ),\n\t\t\tsubmenus = items.children( \".ui-menu-item-wrapper\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.removeAttr( \"tabIndex role aria-haspopup\" );\n\n\t\t// Destroy (sub)menus\n\t\tthis.element\n\t\t\t.removeAttr( \"aria-activedescendant\" )\n\t\t\t.find( \".ui-menu\" ).addBack()\n\t\t\t\t.removeAttr( \"role aria-labelledby aria-expanded aria-hidden aria-disabled \" +\n\t\t\t\t\t\"tabIndex\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.show();\n\n\t\tsubmenus.children().each( function() {\n\t\t\tvar elem = $( this );\n\t\t\tif ( elem.data( \"ui-menu-submenu-caret\" ) ) {\n\t\t\t\telem.remove();\n\t\t\t}\n\t\t} );\n\t},\n\n\t_keydown: function( event ) {\n\t\tvar match, prev, character, skip,\n\t\t\tpreventDefault = true;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\tthis.previousPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\tthis.nextPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tthis._move( \"first\", \"first\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tthis._move( \"last\", \"last\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\t\tthis.previous( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tthis.next( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\t\tthis.expand( event );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ENTER:\n\t\tcase $.ui.keyCode.SPACE:\n\t\t\tthis._activate( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpreventDefault = false;\n\t\t\tprev = this.previousFilter || \"\";\n\t\t\tskip = false;\n\n\t\t\t// Support number pad values\n\t\t\tcharacter = event.keyCode >= 96 && event.keyCode <= 105 ?\n\t\t\t\t( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );\n\n\t\t\tclearTimeout( this.filterTimer );\n\n\t\t\tif ( character === prev ) {\n\t\t\t\tskip = true;\n\t\t\t} else {\n\t\t\t\tcharacter = prev + character;\n\t\t\t}\n\n\t\t\tmatch = this._filterMenuItems( character );\n\t\t\tmatch = skip && match.index( this.active.next() ) !== -1 ?\n\t\t\t\tthis.active.nextAll( \".ui-menu-item\" ) :\n\t\t\t\tmatch;\n\n\t\t\t// If no matches on the current filter, reset to the last character pressed\n\t\t\t// to move down the menu to the first item that starts with that character\n\t\t\tif ( !match.length ) {\n\t\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\t\tmatch = this._filterMenuItems( character );\n\t\t\t}\n\n\t\t\tif ( match.length ) {\n\t\t\t\tthis.focus( event, match );\n\t\t\t\tthis.previousFilter = character;\n\t\t\t\tthis.filterTimer = this._delay( function() {\n\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t}, 1000 );\n\t\t\t} else {\n\t\t\t\tdelete this.previousFilter;\n\t\t\t}\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_activate: function( event ) {\n\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\tif ( this.active.children( \"[aria-haspopup='true']\" ).length ) {\n\t\t\t\tthis.expand( event );\n\t\t\t} else {\n\t\t\t\tthis.select( event );\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar menus, items, newSubmenus, newItems, newWrappers,\n\t\t\tthat = this,\n\t\t\ticon = this.options.icons.submenu,\n\t\t\tsubmenus = this.element.find( this.options.menus );\n\n\t\tthis._toggleClass( \"ui-menu-icons\", null, !!this.element.find( \".ui-icon\" ).length );\n\n\t\t// Initialize nested menus\n\t\tnewSubmenus = submenus.filter( \":not(.ui-menu)\" )\n\t\t\t.hide()\n\t\t\t.attr( {\n\t\t\t\trole: this.options.role,\n\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t} )\n\t\t\t.each( function() {\n\t\t\t\tvar menu = $( this ),\n\t\t\t\t\titem = menu.prev(),\n\t\t\t\t\tsubmenuCaret = $( \"<span>\" ).data( \"ui-menu-submenu-caret\", true );\n\n\t\t\t\tthat._addClass( submenuCaret, \"ui-menu-icon\", \"ui-icon \" + icon );\n\t\t\t\titem\n\t\t\t\t\t.attr( \"aria-haspopup\", \"true\" )\n\t\t\t\t\t.prepend( submenuCaret );\n\t\t\t\tmenu.attr( \"aria-labelledby\", item.attr( \"id\" ) );\n\t\t\t} );\n\n\t\tthis._addClass( newSubmenus, \"ui-menu\", \"ui-widget ui-widget-content ui-front\" );\n\n\t\tmenus = submenus.add( this.element );\n\t\titems = menus.find( this.options.items );\n\n\t\t// Initialize menu-items containing spaces and/or dashes only as dividers\n\t\titems.not( \".ui-menu-item\" ).each( function() {\n\t\t\tvar item = $( this );\n\t\t\tif ( that._isDivider( item ) ) {\n\t\t\t\tthat._addClass( item, \"ui-menu-divider\", \"ui-widget-content\" );\n\t\t\t}\n\t\t} );\n\n\t\t// Don't refresh list items that are already adapted\n\t\tnewItems = items.not( \".ui-menu-item, .ui-menu-divider\" );\n\t\tnewWrappers = newItems.children()\n\t\t\t.not( \".ui-menu\" )\n\t\t\t\t.uniqueId()\n\t\t\t\t.attr( {\n\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\trole: this._itemRole()\n\t\t\t\t} );\n\t\tthis._addClass( newItems, \"ui-menu-item\" )\n\t\t\t._addClass( newWrappers, \"ui-menu-item-wrapper\" );\n\n\t\t// Add aria-disabled attribute to any disabled menu item\n\t\titems.filter( \".ui-state-disabled\" ).attr( \"aria-disabled\", \"true\" );\n\n\t\t// If the active item has been removed, blur the menu\n\t\tif ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\tthis.blur();\n\t\t}\n\t},\n\n\t_itemRole: function() {\n\t\treturn {\n\t\t\tmenu: \"menuitem\",\n\t\t\tlistbox: \"option\"\n\t\t}[ this.options.role ];\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icons\" ) {\n\t\t\tvar icons = this.element.find( \".ui-menu-icon\" );\n\t\t\tthis._removeClass( icons, null, this.options.icons.submenu )\n\t\t\t\t._addClass( icons, null, value.submenu );\n\t\t}\n\t\tthis._super( key, value );\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis.element.attr( \"aria-disabled\", String( value ) );\n\t\tthis._toggleClass( null, \"ui-state-disabled\", !!value );\n\t},\n\n\tfocus: function( event, item ) {\n\t\tvar nested, focused, activeParent;\n\t\tthis.blur( event, event && event.type === \"focus\" );\n\n\t\tthis._scrollIntoView( item );\n\n\t\tthis.active = item.first();\n\n\t\tfocused = this.active.children( \".ui-menu-item-wrapper\" );\n\t\tthis._addClass( focused, null, \"ui-state-active\" );\n\n\t\t// Only update aria-activedescendant if there's a role\n\t\t// otherwise we assume focus is managed elsewhere\n\t\tif ( this.options.role ) {\n\t\t\tthis.element.attr( \"aria-activedescendant\", focused.attr( \"id\" ) );\n\t\t}\n\n\t\t// Highlight active parent menu item, if any\n\t\tactiveParent = this.active\n\t\t\t.parent()\n\t\t\t\t.closest( \".ui-menu-item\" )\n\t\t\t\t\t.children( \".ui-menu-item-wrapper\" );\n\t\tthis._addClass( activeParent, null, \"ui-state-active\" );\n\n\t\tif ( event && event.type === \"keydown\" ) {\n\t\t\tthis._close();\n\t\t} else {\n\t\t\tthis.timer = this._delay( function() {\n\t\t\t\tthis._close();\n\t\t\t}, this.delay );\n\t\t}\n\n\t\tnested = item.children( \".ui-menu\" );\n\t\tif ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {\n\t\t\tthis._startOpening( nested );\n\t\t}\n\t\tthis.activeMenu = item.parent();\n\n\t\tthis._trigger( \"focus\", event, { item: item } );\n\t},\n\n\t_scrollIntoView: function( item ) {\n\t\tvar borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;\n\t\tif ( this._hasScroll() ) {\n\t\t\tborderTop = parseFloat( $.css( this.activeMenu[ 0 ], \"borderTopWidth\" ) ) || 0;\n\t\t\tpaddingTop = parseFloat( $.css( this.activeMenu[ 0 ], \"paddingTop\" ) ) || 0;\n\t\t\toffset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;\n\t\t\tscroll = this.activeMenu.scrollTop();\n\t\t\telementHeight = this.activeMenu.height();\n\t\t\titemHeight = item.outerHeight();\n\n\t\t\tif ( offset < 0 ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset );\n\t\t\t} else if ( offset + itemHeight > elementHeight ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );\n\t\t\t}\n\t\t}\n\t},\n\n\tblur: function( event, fromFocus ) {\n\t\tif ( !fromFocus ) {\n\t\t\tclearTimeout( this.timer );\n\t\t}\n\n\t\tif ( !this.active ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._removeClass( this.active.children( \".ui-menu-item-wrapper\" ),\n\t\t\tnull, \"ui-state-active\" );\n\n\t\tthis._trigger( \"blur\", event, { item: this.active } );\n\t\tthis.active = null;\n\t},\n\n\t_startOpening: function( submenu ) {\n\t\tclearTimeout( this.timer );\n\n\t\t// Don't open if already open fixes a Firefox bug that caused a .5 pixel\n\t\t// shift in the submenu position when mousing over the caret icon\n\t\tif ( submenu.attr( \"aria-hidden\" ) !== \"true\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.timer = this._delay( function() {\n\t\t\tthis._close();\n\t\t\tthis._open( submenu );\n\t\t}, this.delay );\n\t},\n\n\t_open: function( submenu ) {\n\t\tvar position = $.extend( {\n\t\t\tof: this.active\n\t\t}, this.options.position );\n\n\t\tclearTimeout( this.timer );\n\t\tthis.element.find( \".ui-menu\" ).not( submenu.parents( \".ui-menu\" ) )\n\t\t\t.hide()\n\t\t\t.attr( \"aria-hidden\", \"true\" );\n\n\t\tsubmenu\n\t\t\t.show()\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.attr( \"aria-expanded\", \"true\" )\n\t\t\t.position( position );\n\t},\n\n\tcollapseAll: function( event, all ) {\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay( function() {\n\n\t\t\t// If we were passed an event, look for the submenu that contains the event\n\t\t\tvar currentMenu = all ? this.element :\n\t\t\t\t$( event && event.target ).closest( this.element.find( \".ui-menu\" ) );\n\n\t\t\t// If we found no valid submenu ancestor, use the main menu to close all\n\t\t\t// sub menus anyway\n\t\t\tif ( !currentMenu.length ) {\n\t\t\t\tcurrentMenu = this.element;\n\t\t\t}\n\n\t\t\tthis._close( currentMenu );\n\n\t\t\tthis.blur( event );\n\n\t\t\t// Work around active item staying active after menu is blurred\n\t\t\tthis._removeClass( currentMenu.find( \".ui-state-active\" ), null, \"ui-state-active\" );\n\n\t\t\tthis.activeMenu = currentMenu;\n\t\t}, all ? 0 : this.delay );\n\t},\n\n\t// With no arguments, closes the currently active menu - if nothing is active\n\t// it closes all menus.  If passed an argument, it will search for menus BELOW\n\t_close: function( startMenu ) {\n\t\tif ( !startMenu ) {\n\t\t\tstartMenu = this.active ? this.active.parent() : this.element;\n\t\t}\n\n\t\tstartMenu.find( \".ui-menu\" )\n\t\t\t.hide()\n\t\t\t.attr( \"aria-hidden\", \"true\" )\n\t\t\t.attr( \"aria-expanded\", \"false\" );\n\t},\n\n\t_closeOnDocumentClick: function( event ) {\n\t\treturn !$( event.target ).closest( \".ui-menu\" ).length;\n\t},\n\n\t_isDivider: function( item ) {\n\n\t\t// Match hyphen, em dash, en dash\n\t\treturn !/[^\\-\\u2014\\u2013\\s]/.test( item.text() );\n\t},\n\n\tcollapse: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active.parent().closest( \".ui-menu-item\", this.element );\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._close();\n\t\t\tthis.focus( event, newItem );\n\t\t}\n\t},\n\n\texpand: function( event ) {\n\t\tvar newItem = this.active && this._menuItems( this.active.children( \".ui-menu\" ) ).first();\n\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._open( newItem.parent() );\n\n\t\t\t// Delay so Firefox will not hide activedescendant change in expanding submenu from AT\n\t\t\tthis._delay( function() {\n\t\t\t\tthis.focus( event, newItem );\n\t\t\t} );\n\t\t}\n\t},\n\n\tnext: function( event ) {\n\t\tthis._move( \"next\", \"first\", event );\n\t},\n\n\tprevious: function( event ) {\n\t\tthis._move( \"prev\", \"last\", event );\n\t},\n\n\tisFirstItem: function() {\n\t\treturn this.active && !this.active.prevAll( \".ui-menu-item\" ).length;\n\t},\n\n\tisLastItem: function() {\n\t\treturn this.active && !this.active.nextAll( \".ui-menu-item\" ).length;\n\t},\n\n\t_menuItems: function( menu ) {\n\t\treturn ( menu || this.element )\n\t\t\t.find( this.options.items )\n\t\t\t.filter( \".ui-menu-item\" );\n\t},\n\n\t_move: function( direction, filter, event ) {\n\t\tvar next;\n\t\tif ( this.active ) {\n\t\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.last();\n\t\t\t} else {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction + \"All\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.first();\n\t\t\t}\n\t\t}\n\t\tif ( !next || !next.length || !this.active ) {\n\t\t\tnext = this._menuItems( this.activeMenu )[ filter ]();\n\t\t}\n\n\t\tthis.focus( event, next );\n\t},\n\n\tnextPage: function( event ) {\n\t\tvar item, base, height;\n\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isLastItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.innerHeight();\n\n\t\t\t// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.\n\t\t\tif ( $.fn.jquery.indexOf( \"3.2.\" ) === 0 ) {\n\t\t\t\theight += this.element[ 0 ].offsetHeight - this.element.outerHeight();\n\t\t\t}\n\n\t\t\tthis.active.nextAll( \".ui-menu-item\" ).each( function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base - height < 0;\n\t\t\t} );\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this._menuItems( this.activeMenu )\n\t\t\t\t[ !this.active ? \"first\" : \"last\" ]() );\n\t\t}\n\t},\n\n\tpreviousPage: function( event ) {\n\t\tvar item, base, height;\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isFirstItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.innerHeight();\n\n\t\t\t// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.\n\t\t\tif ( $.fn.jquery.indexOf( \"3.2.\" ) === 0 ) {\n\t\t\t\theight += this.element[ 0 ].offsetHeight - this.element.outerHeight();\n\t\t\t}\n\n\t\t\tthis.active.prevAll( \".ui-menu-item\" ).each( function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base + height > 0;\n\t\t\t} );\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this._menuItems( this.activeMenu ).first() );\n\t\t}\n\t},\n\n\t_hasScroll: function() {\n\t\treturn this.element.outerHeight() < this.element.prop( \"scrollHeight\" );\n\t},\n\n\tselect: function( event ) {\n\n\t\t// TODO: It should never be possible to not have an active item at this\n\t\t// point, but the tests don't trigger mouseenter before click.\n\t\tthis.active = this.active || $( event.target ).closest( \".ui-menu-item\" );\n\t\tvar ui = { item: this.active };\n\t\tif ( !this.active.has( \".ui-menu\" ).length ) {\n\t\t\tthis.collapseAll( event, true );\n\t\t}\n\t\tthis._trigger( \"select\", event, ui );\n\t},\n\n\t_filterMenuItems: function( character ) {\n\t\tvar escapedCharacter = character.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" ),\n\t\t\tregex = new RegExp( \"^\" + escapedCharacter, \"i\" );\n\n\t\treturn this.activeMenu\n\t\t\t.find( this.options.items )\n\n\t\t\t\t// Only match on items, not dividers or other content (#10571)\n\t\t\t\t.filter( \".ui-menu-item\" )\n\t\t\t\t\t.filter( function() {\n\t\t\t\t\t\treturn regex.test(\n\t\t\t\t\t\t\tString.prototype.trim.call(\n\t\t\t\t\t\t\t\t$( this ).children( \".ui-menu-item-wrapper\" ).text() ) );\n\t\t\t\t\t} );\n\t}\n} );\n\n} );\n","/*!\n * jQuery UI Mouse 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Mouse\n//>>group: Widgets\n//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.\n//>>docs: http://api.jqueryui.com/mouse/\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../ie\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nvar mouseHandled = false;\n$( document ).on( \"mouseup\", function() {\n\tmouseHandled = false;\n} );\n\nreturn $.widget( \"ui.mouse\", {\n\tversion: \"1.13.2\",\n\toptions: {\n\t\tcancel: \"input, textarea, button, select, option\",\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar that = this;\n\n\t\tthis.element\n\t\t\t.on( \"mousedown.\" + this.widgetName, function( event ) {\n\t\t\t\treturn that._mouseDown( event );\n\t\t\t} )\n\t\t\t.on( \"click.\" + this.widgetName, function( event ) {\n\t\t\t\tif ( true === $.data( event.target, that.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t\t\t$.removeData( event.target, that.widgetName + \".preventClickEvent\" );\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.off( \".\" + this.widgetName );\n\t\tif ( this._mouseMoveDelegate ) {\n\t\t\tthis.document\n\t\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\t\t}\n\t},\n\n\t_mouseDown: function( event ) {\n\n\t\t// don't let more than one widget handle mouseStart\n\t\tif ( mouseHandled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoved = false;\n\n\t\t// We may have missed mouseup (out of window)\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseUp( event );\n\t\t}\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar that = this,\n\t\t\tbtnIsLeft = ( event.which === 1 ),\n\n\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t// disabled inputs (#7620)\n\t\t\telIsCancel = ( typeof this.options.cancel === \"string\" && event.target.nodeName ?\n\t\t\t\t$( event.target ).closest( this.options.cancel ).length : false );\n\t\tif ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif ( !this.mouseDelayMet ) {\n\t\t\tthis._mouseDelayTimer = setTimeout( function() {\n\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t}, this.options.delay );\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted = ( this._mouseStart( event ) !== false );\n\t\t\tif ( !this._mouseStarted ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif ( true === $.data( event.target, this.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t$.removeData( event.target, this.widgetName + \".preventClickEvent\" );\n\t\t}\n\n\t\t// These delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function( event ) {\n\t\t\treturn that._mouseMove( event );\n\t\t};\n\t\tthis._mouseUpDelegate = function( event ) {\n\t\t\treturn that._mouseUp( event );\n\t\t};\n\n\t\tthis.document\n\t\t\t.on( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.on( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tevent.preventDefault();\n\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function( event ) {\n\n\t\t// Only check for mouseups outside the document if you've moved inside the document\n\t\t// at least once. This prevents the firing of mouseup in the case of IE<9, which will\n\t\t// fire a mousemove event if content is placed under the cursor. See #7778\n\t\t// Support: IE <9\n\t\tif ( this._mouseMoved ) {\n\n\t\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\t\tif ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&\n\t\t\t\t\t!event.button ) {\n\t\t\t\treturn this._mouseUp( event );\n\n\t\t\t// Iframe mouseup check - mouseup occurred in another document\n\t\t\t} else if ( !event.which ) {\n\n\t\t\t\t// Support: Safari <=8 - 9\n\t\t\t\t// Safari sets which to 0 if you press any of the following keys\n\t\t\t\t// during a drag (#14461)\n\t\t\t\tif ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||\n\t\t\t\t\t\tevent.originalEvent.metaKey || event.originalEvent.shiftKey ) {\n\t\t\t\t\tthis.ignoreMissingWhich = true;\n\t\t\t\t} else if ( !this.ignoreMissingWhich ) {\n\t\t\t\t\treturn this._mouseUp( event );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( event.which || event.button ) {\n\t\t\tthis._mouseMoved = true;\n\t\t}\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseDrag( event );\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t( this._mouseStart( this._mouseDownEvent, event ) !== false );\n\t\t\tif ( this._mouseStarted ) {\n\t\t\t\tthis._mouseDrag( event );\n\t\t\t} else {\n\t\t\t\tthis._mouseUp( event );\n\t\t\t}\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis.document\n\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif ( event.target === this._mouseDownEvent.target ) {\n\t\t\t\t$.data( event.target, this.widgetName + \".preventClickEvent\", true );\n\t\t\t}\n\n\t\t\tthis._mouseStop( event );\n\t\t}\n\n\t\tif ( this._mouseDelayTimer ) {\n\t\t\tclearTimeout( this._mouseDelayTimer );\n\t\t\tdelete this._mouseDelayTimer;\n\t\t}\n\n\t\tthis.ignoreMissingWhich = false;\n\t\tmouseHandled = false;\n\t\tevent.preventDefault();\n\t},\n\n\t_mouseDistanceMet: function( event ) {\n\t\treturn ( Math.max(\n\t\t\t\tMath.abs( this._mouseDownEvent.pageX - event.pageX ),\n\t\t\t\tMath.abs( this._mouseDownEvent.pageY - event.pageY )\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function( /* event */ ) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function( /* event */ ) {},\n\t_mouseDrag: function( /* event */ ) {},\n\t_mouseStop: function( /* event */ ) {},\n\t_mouseCapture: function( /* event */ ) {\n\t\treturn true;\n\t}\n} );\n\n} );\n","/*!\n * jQuery UI Resizable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Resizable\n//>>group: Interactions\n//>>description: Enables resize functionality for any element.\n//>>docs: http://api.jqueryui.com/resizable/\n//>>demos: http://jqueryui.com/resizable/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/resizable.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./mouse\",\n\t\t\t\"../disable-selection\",\n\t\t\t\"../plugin\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.resizable\", $.ui.mouse, {\n\tversion: \"1.13.2\",\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tclasses: {\n\t\t\t\"ui-resizable-se\": \"ui-icon ui-icon-gripsmall-diagonal-se\"\n\t\t},\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\n\t\t// See #7960\n\t\tzIndex: 90,\n\n\t\t// Callbacks\n\t\tresize: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_num: function( value ) {\n\t\treturn parseFloat( value ) || 0;\n\t},\n\n\t_isNumber: function( value ) {\n\t\treturn !isNaN( parseFloat( value ) );\n\t},\n\n\t_hasScroll: function( el, a ) {\n\n\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\thas = false;\n\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\ttry {\n\t\t\tel[ scroll ] = 1;\n\t\t\thas = ( el[ scroll ] > 0 );\n\t\t\tel[ scroll ] = 0;\n\t\t} catch ( e ) {\n\n\t\t\t// `el` might be a string, then setting `scroll` will throw\n\t\t\t// an error in strict mode; ignore it.\n\t\t}\n\t\treturn has;\n\t},\n\n\t_create: function() {\n\n\t\tvar margins,\n\t\t\to = this.options,\n\t\t\tthat = this;\n\t\tthis._addClass( \"ui-resizable\" );\n\n\t\t$.extend( this, {\n\t\t\t_aspectRatio: !!( o.aspectRatio ),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t} );\n\n\t\t// Wrap the element if it cannot hold child nodes\n\t\tif ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {\n\n\t\t\tthis.element.wrap(\n\t\t\t\t$( \"<div class='ui-wrapper'></div>\" ).css( {\n\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\tposition: this.element.css( \"position\" ),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css( \"top\" ),\n\t\t\t\t\tleft: this.element.css( \"left\" )\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"ui-resizable\", this.element.resizable( \"instance\" )\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\tmargins = {\n\t\t\t\tmarginTop: this.originalElement.css( \"marginTop\" ),\n\t\t\t\tmarginRight: this.originalElement.css( \"marginRight\" ),\n\t\t\t\tmarginBottom: this.originalElement.css( \"marginBottom\" ),\n\t\t\t\tmarginLeft: this.originalElement.css( \"marginLeft\" )\n\t\t\t};\n\n\t\t\tthis.element.css( margins );\n\t\t\tthis.originalElement.css( \"margin\", 0 );\n\n\t\t\t// support: Safari\n\t\t\t// Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css( \"resize\" );\n\t\t\tthis.originalElement.css( \"resize\", \"none\" );\n\n\t\t\tthis._proportionallyResizeElements.push( this.originalElement.css( {\n\t\t\t\tposition: \"static\",\n\t\t\t\tzoom: 1,\n\t\t\t\tdisplay: \"block\"\n\t\t\t} ) );\n\n\t\t\t// Support: IE9\n\t\t\t// avoid IE jump (hard set the margin)\n\t\t\tthis.originalElement.css( margins );\n\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tthis._setupHandles();\n\n\t\tif ( o.autoHide ) {\n\t\t\t$( this.element )\n\t\t\t\t.on( \"mouseenter\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthat._removeClass( \"ui-resizable-autohide\" );\n\t\t\t\t\tthat._handles.show();\n\t\t\t\t} )\n\t\t\t\t.on( \"mouseleave\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( !that.resizing ) {\n\t\t\t\t\t\tthat._addClass( \"ui-resizable-autohide\" );\n\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\n\t\tthis._mouseInit();\n\t},\n\n\t_destroy: function() {\n\n\t\tthis._mouseDestroy();\n\t\tthis._addedHandles.remove();\n\n\t\tvar wrapper,\n\t\t\t_destroy = function( exp ) {\n\t\t\t\t$( exp )\n\t\t\t\t\t.removeData( \"resizable\" )\n\t\t\t\t\t.removeData( \"ui-resizable\" )\n\t\t\t\t\t.off( \".resizable\" );\n\t\t\t};\n\n\t\t// TODO: Unwrap at same DOM position\n\t\tif ( this.elementIsWrapper ) {\n\t\t\t_destroy( this.element );\n\t\t\twrapper = this.element;\n\t\t\tthis.originalElement.css( {\n\t\t\t\tposition: wrapper.css( \"position\" ),\n\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\ttop: wrapper.css( \"top\" ),\n\t\t\t\tleft: wrapper.css( \"left\" )\n\t\t\t} ).insertAfter( wrapper );\n\t\t\twrapper.remove();\n\t\t}\n\n\t\tthis.originalElement.css( \"resize\", this.originalResizeStyle );\n\t\t_destroy( this.originalElement );\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tswitch ( key ) {\n\t\tcase \"handles\":\n\t\t\tthis._removeHandles();\n\t\t\tthis._setupHandles();\n\t\t\tbreak;\n\t\tcase \"aspectRatio\":\n\t\t\tthis._aspectRatio = !!value;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t},\n\n\t_setupHandles: function() {\n\t\tvar o = this.options, handle, i, n, hname, axis, that = this;\n\t\tthis.handles = o.handles ||\n\t\t\t( !$( \".ui-resizable-handle\", this.element ).length ?\n\t\t\t\t\"e,s,se\" : {\n\t\t\t\t\tn: \".ui-resizable-n\",\n\t\t\t\t\te: \".ui-resizable-e\",\n\t\t\t\t\ts: \".ui-resizable-s\",\n\t\t\t\t\tw: \".ui-resizable-w\",\n\t\t\t\t\tse: \".ui-resizable-se\",\n\t\t\t\t\tsw: \".ui-resizable-sw\",\n\t\t\t\t\tne: \".ui-resizable-ne\",\n\t\t\t\t\tnw: \".ui-resizable-nw\"\n\t\t\t\t} );\n\n\t\tthis._handles = $();\n\t\tthis._addedHandles = $();\n\t\tif ( this.handles.constructor === String ) {\n\n\t\t\tif ( this.handles === \"all\" ) {\n\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t}\n\n\t\t\tn = this.handles.split( \",\" );\n\t\t\tthis.handles = {};\n\n\t\t\tfor ( i = 0; i < n.length; i++ ) {\n\n\t\t\t\thandle = String.prototype.trim.call( n[ i ] );\n\t\t\t\thname = \"ui-resizable-\" + handle;\n\t\t\t\taxis = $( \"<div>\" );\n\t\t\t\tthis._addClass( axis, \"ui-resizable-handle \" + hname );\n\n\t\t\t\taxis.css( { zIndex: o.zIndex } );\n\n\t\t\t\tthis.handles[ handle ] = \".ui-resizable-\" + handle;\n\t\t\t\tif ( !this.element.children( this.handles[ handle ] ).length ) {\n\t\t\t\t\tthis.element.append( axis );\n\t\t\t\t\tthis._addedHandles = this._addedHandles.add( axis );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function( target ) {\n\n\t\t\tvar i, axis, padPos, padWrapper;\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor ( i in this.handles ) {\n\n\t\t\t\tif ( this.handles[ i ].constructor === String ) {\n\t\t\t\t\tthis.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();\n\t\t\t\t} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {\n\t\t\t\t\tthis.handles[ i ] = $( this.handles[ i ] );\n\t\t\t\t\tthis._on( this.handles[ i ], { \"mousedown\": that._mouseDown } );\n\t\t\t\t}\n\n\t\t\t\tif ( this.elementIsWrapper &&\n\t\t\t\t\t\tthis.originalElement[ 0 ]\n\t\t\t\t\t\t\t.nodeName\n\t\t\t\t\t\t\t.match( /^(textarea|input|select|button)$/i ) ) {\n\t\t\t\t\taxis = $( this.handles[ i ], this.element );\n\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test( i ) ?\n\t\t\t\t\t\taxis.outerHeight() :\n\t\t\t\t\t\taxis.outerWidth();\n\n\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t/ne|nw|n/.test( i ) ? \"Top\" :\n\t\t\t\t\t\t/se|sw|s/.test( i ) ? \"Bottom\" :\n\t\t\t\t\t\t/^e$/.test( i ) ? \"Right\" : \"Left\" ].join( \"\" );\n\n\t\t\t\t\ttarget.css( padPos, padWrapper );\n\n\t\t\t\t\tthis._proportionallyResize();\n\t\t\t\t}\n\n\t\t\t\tthis._handles = this._handles.add( this.handles[ i ] );\n\t\t\t}\n\t\t};\n\n\t\t// TODO: make renderAxis a prototype function\n\t\tthis._renderAxis( this.element );\n\n\t\tthis._handles = this._handles.add( this.element.find( \".ui-resizable-handle\" ) );\n\t\tthis._handles.disableSelection();\n\n\t\tthis._handles.on( \"mouseover\", function() {\n\t\t\tif ( !that.resizing ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\taxis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );\n\t\t\t\t}\n\t\t\t\tthat.axis = axis && axis[ 1 ] ? axis[ 1 ] : \"se\";\n\t\t\t}\n\t\t} );\n\n\t\tif ( o.autoHide ) {\n\t\t\tthis._handles.hide();\n\t\t\tthis._addClass( \"ui-resizable-autohide\" );\n\t\t}\n\t},\n\n\t_removeHandles: function() {\n\t\tthis._addedHandles.remove();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar i, handle,\n\t\t\tcapture = false;\n\n\t\tfor ( i in this.handles ) {\n\t\t\thandle = $( this.handles[ i ] )[ 0 ];\n\t\t\tif ( handle === event.target || $.contains( handle, event.target ) ) {\n\t\t\t\tcapture = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && capture;\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar curleft, curtop, cursor,\n\t\t\to = this.options,\n\t\t\tel = this.element;\n\n\t\tthis.resizing = true;\n\n\t\tthis._renderProxy();\n\n\t\tcurleft = this._num( this.helper.css( \"left\" ) );\n\t\tcurtop = this._num( this.helper.css( \"top\" ) );\n\n\t\tif ( o.containment ) {\n\t\t\tcurleft += $( o.containment ).scrollLeft() || 0;\n\t\t\tcurtop += $( o.containment ).scrollTop() || 0;\n\t\t}\n\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\n\t\tthis.size = this._helper ? {\n\t\t\t\twidth: this.helper.width(),\n\t\t\t\theight: this.helper.height()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.originalSize = this._helper ? {\n\t\t\t\twidth: el.outerWidth(),\n\t\t\t\theight: el.outerHeight()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.sizeDiff = {\n\t\t\twidth: el.outerWidth() - el.width(),\n\t\t\theight: el.outerHeight() - el.height()\n\t\t};\n\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\tthis.aspectRatio = ( typeof o.aspectRatio === \"number\" ) ?\n\t\t\to.aspectRatio :\n\t\t\t( ( this.originalSize.width / this.originalSize.height ) || 1 );\n\n\t\tcursor = $( \".ui-resizable-\" + this.axis ).css( \"cursor\" );\n\t\t$( \"body\" ).css( \"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor );\n\n\t\tthis._addClass( \"ui-resizable-resizing\" );\n\t\tthis._propagate( \"start\", event );\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\n\t\tvar data, props,\n\t\t\tsmp = this.originalMousePosition,\n\t\t\ta = this.axis,\n\t\t\tdx = ( event.pageX - smp.left ) || 0,\n\t\t\tdy = ( event.pageY - smp.top ) || 0,\n\t\t\ttrigger = this._change[ a ];\n\n\t\tthis._updatePrevProperties();\n\n\t\tif ( !trigger ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdata = trigger.apply( this, [ event, dx, dy ] );\n\n\t\tthis._updateVirtualBoundaries( event.shiftKey );\n\t\tif ( this._aspectRatio || event.shiftKey ) {\n\t\t\tdata = this._updateRatio( data, event );\n\t\t}\n\n\t\tdata = this._respectSize( data, event );\n\n\t\tthis._updateCache( data );\n\n\t\tthis._propagate( \"resize\", event );\n\n\t\tprops = this._applyChanges();\n\n\t\tif ( !this._helper && this._proportionallyResizeElements.length ) {\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tif ( !$.isEmptyObject( props ) ) {\n\t\t\tthis._updatePrevProperties();\n\t\t\tthis._trigger( \"resize\", event, this.ui() );\n\t\t\tthis._applyChanges();\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\tthis.resizing = false;\n\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\to = this.options, that = this;\n\n\t\tif ( this._helper ) {\n\n\t\t\tpr = this._proportionallyResizeElements;\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );\n\t\t\tsoffseth = ista && this._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height;\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\n\t\t\ts = {\n\t\t\t\twidth: ( that.helper.width()  - soffsetw ),\n\t\t\t\theight: ( that.helper.height() - soffseth )\n\t\t\t};\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null;\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\t\tif ( !o.animate ) {\n\t\t\t\tthis.element.css( $.extend( s, { top: top, left: left } ) );\n\t\t\t}\n\n\t\t\tthat.helper.height( that.size.height );\n\t\t\tthat.helper.width( that.size.width );\n\n\t\t\tif ( this._helper && !o.animate ) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\t}\n\n\t\t$( \"body\" ).css( \"cursor\", \"auto\" );\n\n\t\tthis._removeClass( \"ui-resizable-resizing\" );\n\n\t\tthis._propagate( \"stop\", event );\n\n\t\tif ( this._helper ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\t_updatePrevProperties: function() {\n\t\tthis.prevPosition = {\n\t\t\ttop: this.position.top,\n\t\t\tleft: this.position.left\n\t\t};\n\t\tthis.prevSize = {\n\t\t\twidth: this.size.width,\n\t\t\theight: this.size.height\n\t\t};\n\t},\n\n\t_applyChanges: function() {\n\t\tvar props = {};\n\n\t\tif ( this.position.top !== this.prevPosition.top ) {\n\t\t\tprops.top = this.position.top + \"px\";\n\t\t}\n\t\tif ( this.position.left !== this.prevPosition.left ) {\n\t\t\tprops.left = this.position.left + \"px\";\n\t\t}\n\t\tif ( this.size.width !== this.prevSize.width ) {\n\t\t\tprops.width = this.size.width + \"px\";\n\t\t}\n\t\tif ( this.size.height !== this.prevSize.height ) {\n\t\t\tprops.height = this.size.height + \"px\";\n\t\t}\n\n\t\tthis.helper.css( props );\n\n\t\treturn props;\n\t},\n\n\t_updateVirtualBoundaries: function( forceAspectRatio ) {\n\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\to = this.options;\n\n\t\tb = {\n\t\t\tminWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,\n\t\t\tmaxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,\n\t\t\tminHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,\n\t\t\tmaxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity\n\t\t};\n\n\t\tif ( this._aspectRatio || forceAspectRatio ) {\n\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\n\t\t\tif ( pMinWidth > b.minWidth ) {\n\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t}\n\t\t\tif ( pMinHeight > b.minHeight ) {\n\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t}\n\t\t\tif ( pMaxWidth < b.maxWidth ) {\n\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t}\n\t\t\tif ( pMaxHeight < b.maxHeight ) {\n\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t}\n\t\t}\n\t\tthis._vBoundaries = b;\n\t},\n\n\t_updateCache: function( data ) {\n\t\tthis.offset = this.helper.offset();\n\t\tif ( this._isNumber( data.left ) ) {\n\t\t\tthis.position.left = data.left;\n\t\t}\n\t\tif ( this._isNumber( data.top ) ) {\n\t\t\tthis.position.top = data.top;\n\t\t}\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tthis.size.height = data.height;\n\t\t}\n\t\tif ( this._isNumber( data.width ) ) {\n\t\t\tthis.size.width = data.width;\n\t\t}\n\t},\n\n\t_updateRatio: function( data ) {\n\n\t\tvar cpos = this.position,\n\t\t\tcsize = this.size,\n\t\t\ta = this.axis;\n\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tdata.width = ( data.height * this.aspectRatio );\n\t\t} else if ( this._isNumber( data.width ) ) {\n\t\t\tdata.height = ( data.width / this.aspectRatio );\n\t\t}\n\n\t\tif ( a === \"sw\" ) {\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t\tdata.top = null;\n\t\t}\n\t\tif ( a === \"nw\" ) {\n\t\t\tdata.top = cpos.top + ( csize.height - data.height );\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function( data ) {\n\n\t\tvar o = this._vBoundaries,\n\t\t\ta = this.axis,\n\t\t\tismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),\n\t\t\tismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),\n\t\t\tisminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),\n\t\t\tisminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),\n\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\tdh = this.originalPosition.top + this.originalSize.height,\n\t\t\tcw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );\n\t\tif ( isminw ) {\n\t\t\tdata.width = o.minWidth;\n\t\t}\n\t\tif ( isminh ) {\n\t\t\tdata.height = o.minHeight;\n\t\t}\n\t\tif ( ismaxw ) {\n\t\t\tdata.width = o.maxWidth;\n\t\t}\n\t\tif ( ismaxh ) {\n\t\t\tdata.height = o.maxHeight;\n\t\t}\n\n\t\tif ( isminw && cw ) {\n\t\t\tdata.left = dw - o.minWidth;\n\t\t}\n\t\tif ( ismaxw && cw ) {\n\t\t\tdata.left = dw - o.maxWidth;\n\t\t}\n\t\tif ( isminh && ch ) {\n\t\t\tdata.top = dh - o.minHeight;\n\t\t}\n\t\tif ( ismaxh && ch ) {\n\t\t\tdata.top = dh - o.maxHeight;\n\t\t}\n\n\t\t// Fixing jump error on top/left - bug #2330\n\t\tif ( !data.width && !data.height && !data.left && data.top ) {\n\t\t\tdata.top = null;\n\t\t} else if ( !data.width && !data.height && !data.top && data.left ) {\n\t\t\tdata.left = null;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_getPaddingPlusBorderDimensions: function( element ) {\n\t\tvar i = 0,\n\t\t\twidths = [],\n\t\t\tborders = [\n\t\t\t\telement.css( \"borderTopWidth\" ),\n\t\t\t\telement.css( \"borderRightWidth\" ),\n\t\t\t\telement.css( \"borderBottomWidth\" ),\n\t\t\t\telement.css( \"borderLeftWidth\" )\n\t\t\t],\n\t\t\tpaddings = [\n\t\t\t\telement.css( \"paddingTop\" ),\n\t\t\t\telement.css( \"paddingRight\" ),\n\t\t\t\telement.css( \"paddingBottom\" ),\n\t\t\t\telement.css( \"paddingLeft\" )\n\t\t\t];\n\n\t\tfor ( ; i < 4; i++ ) {\n\t\t\twidths[ i ] = ( parseFloat( borders[ i ] ) || 0 );\n\t\t\twidths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );\n\t\t}\n\n\t\treturn {\n\t\t\theight: widths[ 0 ] + widths[ 2 ],\n\t\t\twidth: widths[ 1 ] + widths[ 3 ]\n\t\t};\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tif ( !this._proportionallyResizeElements.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar prel,\n\t\t\ti = 0,\n\t\t\telement = this.helper || this.element;\n\n\t\tfor ( ; i < this._proportionallyResizeElements.length; i++ ) {\n\n\t\t\tprel = this._proportionallyResizeElements[ i ];\n\n\t\t\t// TODO: Seems like a bug to cache this.outerDimensions\n\t\t\t// considering that we are in a loop.\n\t\t\tif ( !this.outerDimensions ) {\n\t\t\t\tthis.outerDimensions = this._getPaddingPlusBorderDimensions( prel );\n\t\t\t}\n\n\t\t\tprel.css( {\n\t\t\t\theight: ( element.height() - this.outerDimensions.height ) || 0,\n\t\t\t\twidth: ( element.width() - this.outerDimensions.width ) || 0\n\t\t\t} );\n\n\t\t}\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif ( this._helper ) {\n\n\t\t\tthis.helper = this.helper || $( \"<div></div>\" ).css( { overflow: \"hidden\" } );\n\n\t\t\tthis._addClass( this.helper, this._helper );\n\t\t\tthis.helper.css( {\n\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: this.elementOffset.left + \"px\",\n\t\t\t\ttop: this.elementOffset.top + \"px\",\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t} );\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function( event, dx ) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function( event, dx ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function( event, dx, dy ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function( event, dx, dy ) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tsw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tne: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tnw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t}\n\t},\n\n\t_propagate: function( n, event ) {\n\t\t$.ui.plugin.call( this, n, [ event, this.ui() ] );\n\t\tif ( n !== \"resize\" ) {\n\t\t\tthis._trigger( n, event, this.ui() );\n\t\t}\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n} );\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add( \"resizable\", \"animate\", {\n\n\tstop: function( event ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tpr = that._proportionallyResizeElements,\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),\n\t\t\tsoffseth = ista && that._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height,\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\tstyle = {\n\t\t\t\twidth: ( that.size.width - soffsetw ),\n\t\t\t\theight: ( that.size.height - soffseth )\n\t\t\t},\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null,\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\tthat.element.animate(\n\t\t\t$.extend( style, top && left ? { top: top, left: left } : {} ), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseFloat( that.element.css( \"width\" ) ),\n\t\t\t\t\t\theight: parseFloat( that.element.css( \"height\" ) ),\n\t\t\t\t\t\ttop: parseFloat( that.element.css( \"top\" ) ),\n\t\t\t\t\t\tleft: parseFloat( that.element.css( \"left\" ) )\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( pr && pr.length ) {\n\t\t\t\t\t\t$( pr[ 0 ] ).css( { width: data.width, height: data.height } );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Propagating resize, and updating values for each animation step\n\t\t\t\t\tthat._updateCache( data );\n\t\t\t\t\tthat._propagate( \"resize\", event );\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"containment\", {\n\n\tstart: function() {\n\t\tvar element, p, co, ch, cw, width, height,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tel = that.element,\n\t\t\toc = o.containment,\n\t\t\tce = ( oc instanceof $ ) ?\n\t\t\t\toc.get( 0 ) :\n\t\t\t\t( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthat.containerElement = $( ce );\n\n\t\tif ( /document/.test( oc ) || oc === document ) {\n\t\t\tthat.containerOffset = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\t\t\tthat.containerPosition = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: $( document ),\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\twidth: $( document ).width(),\n\t\t\t\theight: $( document ).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t} else {\n\t\t\telement = $( ce );\n\t\t\tp = [];\n\t\t\t$( [ \"Top\", \"Right\", \"Left\", \"Bottom\" ] ).each( function( i, name ) {\n\t\t\t\tp[ i ] = that._num( element.css( \"padding\" + name ) );\n\t\t\t} );\n\n\t\t\tthat.containerOffset = element.offset();\n\t\t\tthat.containerPosition = element.position();\n\t\t\tthat.containerSize = {\n\t\t\t\theight: ( element.innerHeight() - p[ 3 ] ),\n\t\t\t\twidth: ( element.innerWidth() - p[ 1 ] )\n\t\t\t};\n\n\t\t\tco = that.containerOffset;\n\t\t\tch = that.containerSize.height;\n\t\t\tcw = that.containerSize.width;\n\t\t\twidth = ( that._hasScroll( ce, \"left\" ) ? ce.scrollWidth : cw );\n\t\t\theight = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: ce,\n\t\t\t\tleft: co.left,\n\t\t\t\ttop: co.top,\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function( event ) {\n\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcp = that.position,\n\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\tcop = {\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0\n\t\t\t},\n\t\t\tce = that.containerElement,\n\t\t\tcontinueResize = true;\n\n\t\tif ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\tcop = co;\n\t\t}\n\n\t\tif ( cp.left < ( that._helper ? co.left : 0 ) ) {\n\t\t\tthat.size.width = that.size.width +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.left - co.left ) :\n\t\t\t\t\t( that.position.left - cop.left ) );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif ( cp.top < ( that._helper ? co.top : 0 ) ) {\n\t\t\tthat.size.height = that.size.height +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.top - co.top ) :\n\t\t\t\t\tthat.position.top );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t}\n\n\t\tisParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );\n\t\tisOffsetRelative = /relative|absolute/.test( that.containerElement.css( \"position\" ) );\n\n\t\tif ( isParent && isOffsetRelative ) {\n\t\t\tthat.offset.left = that.parentData.left + that.position.left;\n\t\t\tthat.offset.top = that.parentData.top + that.position.top;\n\t\t} else {\n\t\t\tthat.offset.left = that.element.offset().left;\n\t\t\tthat.offset.top = that.element.offset().top;\n\t\t}\n\n\t\twoset = Math.abs( that.sizeDiff.width +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.left - cop.left :\n\t\t\t\t( that.offset.left - co.left ) ) );\n\n\t\thoset = Math.abs( that.sizeDiff.height +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.top - cop.top :\n\t\t\t\t( that.offset.top - co.top ) ) );\n\n\t\tif ( woset + that.size.width >= that.parentData.width ) {\n\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( hoset + that.size.height >= that.parentData.height ) {\n\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( !continueResize ) {\n\t\t\tthat.position.left = that.prevPosition.left;\n\t\t\tthat.position.top = that.prevPosition.top;\n\t\t\tthat.size.width = that.prevSize.width;\n\t\t\tthat.size.height = that.prevSize.height;\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcop = that.containerPosition,\n\t\t\tce = that.containerElement,\n\t\t\thelper = $( that.helper ),\n\t\t\tho = helper.offset(),\n\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\n\t\tif ( that._helper && !o.animate && ( /relative/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\n\t\tif ( that._helper && !o.animate && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"alsoResize\", {\n\n\tstart: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options;\n\n\t\t$( o.alsoResize ).each( function() {\n\t\t\tvar el = $( this );\n\t\t\tel.data( \"ui-resizable-alsoresize\", {\n\t\t\t\twidth: parseFloat( el.width() ), height: parseFloat( el.height() ),\n\t\t\t\tleft: parseFloat( el.css( \"left\" ) ), top: parseFloat( el.css( \"top\" ) )\n\t\t\t} );\n\t\t} );\n\t},\n\n\tresize: function( event, ui ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\tdelta = {\n\t\t\t\theight: ( that.size.height - os.height ) || 0,\n\t\t\t\twidth: ( that.size.width - os.width ) || 0,\n\t\t\t\ttop: ( that.position.top - op.top ) || 0,\n\t\t\t\tleft: ( that.position.left - op.left ) || 0\n\t\t\t};\n\n\t\t\t$( o.alsoResize ).each( function() {\n\t\t\t\tvar el = $( this ), start = $( this ).data( \"ui-resizable-alsoresize\" ), style = {},\n\t\t\t\t\tcss = el.parents( ui.originalElement[ 0 ] ).length ?\n\t\t\t\t\t\t\t[ \"width\", \"height\" ] :\n\t\t\t\t\t\t\t[ \"width\", \"height\", \"top\", \"left\" ];\n\n\t\t\t\t$.each( css, function( i, prop ) {\n\t\t\t\t\tvar sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );\n\t\t\t\t\tif ( sum && sum >= 0 ) {\n\t\t\t\t\t\tstyle[ prop ] = sum || null;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tel.css( style );\n\t\t\t} );\n\t},\n\n\tstop: function() {\n\t\t$( this ).removeData( \"ui-resizable-alsoresize\" );\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"ghost\", {\n\n\tstart: function() {\n\n\t\tvar that = $( this ).resizable( \"instance\" ), cs = that.size;\n\n\t\tthat.ghost = that.originalElement.clone();\n\t\tthat.ghost.css( {\n\t\t\topacity: 0.25,\n\t\t\tdisplay: \"block\",\n\t\t\tposition: \"relative\",\n\t\t\theight: cs.height,\n\t\t\twidth: cs.width,\n\t\t\tmargin: 0,\n\t\t\tleft: 0,\n\t\t\ttop: 0\n\t\t} );\n\n\t\tthat._addClass( that.ghost, \"ui-resizable-ghost\" );\n\n\t\t// DEPRECATED\n\t\t// TODO: remove after 1.12\n\t\tif ( $.uiBackCompat !== false && typeof that.options.ghost === \"string\" ) {\n\n\t\t\t// Ghost option\n\t\t\tthat.ghost.addClass( this.options.ghost );\n\t\t}\n\n\t\tthat.ghost.appendTo( that.helper );\n\n\t},\n\n\tresize: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost ) {\n\t\t\tthat.ghost.css( {\n\t\t\t\tposition: \"relative\",\n\t\t\t\theight: that.size.height,\n\t\t\t\twidth: that.size.width\n\t\t\t} );\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost && that.helper ) {\n\t\t\tthat.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );\n\t\t}\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"grid\", {\n\n\tresize: function() {\n\t\tvar outerDimensions,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tcs = that.size,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\ta = that.axis,\n\t\t\tgrid = typeof o.grid === \"number\" ? [ o.grid, o.grid ] : o.grid,\n\t\t\tgridX = ( grid[ 0 ] || 1 ),\n\t\t\tgridY = ( grid[ 1 ] || 1 ),\n\t\t\tox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,\n\t\t\toy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,\n\t\t\tnewWidth = os.width + ox,\n\t\t\tnewHeight = os.height + oy,\n\t\t\tisMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),\n\t\t\tisMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),\n\t\t\tisMinWidth = o.minWidth && ( o.minWidth > newWidth ),\n\t\t\tisMinHeight = o.minHeight && ( o.minHeight > newHeight );\n\n\t\to.grid = grid;\n\n\t\tif ( isMinWidth ) {\n\t\t\tnewWidth += gridX;\n\t\t}\n\t\tif ( isMinHeight ) {\n\t\t\tnewHeight += gridY;\n\t\t}\n\t\tif ( isMaxWidth ) {\n\t\t\tnewWidth -= gridX;\n\t\t}\n\t\tif ( isMaxHeight ) {\n\t\t\tnewHeight -= gridY;\n\t\t}\n\n\t\tif ( /^(se|s|e)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t} else if ( /^(ne)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t} else if ( /^(sw)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.left = op.left - ox;\n\t\t} else {\n\t\t\tif ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {\n\t\t\t\touterDimensions = that._getPaddingPlusBorderDimensions( this );\n\t\t\t}\n\n\t\t\tif ( newHeight - gridY > 0 ) {\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top - oy;\n\t\t\t} else {\n\t\t\t\tnewHeight = gridY - outerDimensions.height;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top + os.height - newHeight;\n\t\t\t}\n\t\t\tif ( newWidth - gridX > 0 ) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left - ox;\n\t\t\t} else {\n\t\t\t\tnewWidth = gridX - outerDimensions.width;\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left + os.width - newWidth;\n\t\t\t}\n\t\t}\n\t}\n\n} );\n\nreturn $.ui.resizable;\n\n} );\n","/*!\n * jQuery UI Sortable 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Sortable\n//>>group: Interactions\n//>>description: Enables items in a list to be sorted using the mouse.\n//>>docs: http://api.jqueryui.com/sortable/\n//>>demos: http://jqueryui.com/sortable/\n//>>css.structure: ../../themes/base/sortable.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"./mouse\",\n\t\t\t\"../data\",\n\t\t\t\"../ie\",\n\t\t\t\"../scroll-parent\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\nreturn $.widget( \"ui.sortable\", $.ui.mouse, {\n\tversion: \"1.13.2\",\n\twidgetEventPrefix: \"sort\",\n\tready: false,\n\toptions: {\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectWith: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tdropOnEmpty: true,\n\t\tforcePlaceholderSize: false,\n\t\tforceHelperSize: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\titems: \"> *\",\n\t\topacity: false,\n\t\tplaceholder: false,\n\t\trevert: false,\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\t\tzIndex: 1000,\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tbeforeStop: null,\n\t\tchange: null,\n\t\tdeactivate: null,\n\t\tout: null,\n\t\tover: null,\n\t\treceive: null,\n\t\tremove: null,\n\t\tsort: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tupdate: null\n\t},\n\n\t_isOverAxis: function( x, reference, size ) {\n\t\treturn ( x >= reference ) && ( x < ( reference + size ) );\n\t},\n\n\t_isFloating: function( item ) {\n\t\treturn ( /left|right/ ).test( item.css( \"float\" ) ) ||\n\t\t\t( /inline|table-cell/ ).test( item.css( \"display\" ) );\n\t},\n\n\t_create: function() {\n\t\tthis.containerCache = {};\n\t\tthis._addClass( \"ui-sortable\" );\n\n\t\t//Get the items\n\t\tthis.refresh();\n\n\t\t//Let's determine the parent's offset\n\t\tthis.offset = this.element.offset();\n\n\t\t//Initialize mouse events for interaction\n\t\tthis._mouseInit();\n\n\t\tthis._setHandleClassName();\n\n\t\t//We're ready to go\n\t\tthis.ready = true;\n\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_setHandleClassName: function() {\n\t\tvar that = this;\n\t\tthis._removeClass( this.element.find( \".ui-sortable-handle\" ), \"ui-sortable-handle\" );\n\t\t$.each( this.items, function() {\n\t\t\tthat._addClass(\n\t\t\t\tthis.instance.options.handle ?\n\t\t\t\t\tthis.item.find( this.instance.options.handle ) :\n\t\t\t\t\tthis.item,\n\t\t\t\t\"ui-sortable-handle\"\n\t\t\t);\n\t\t} );\n\t},\n\n\t_destroy: function() {\n\t\tthis._mouseDestroy();\n\n\t\tfor ( var i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\tthis.items[ i ].item.removeData( this.widgetName + \"-item\" );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function( event, overrideHandle ) {\n\t\tvar currentItem = null,\n\t\t\tvalidHandle = false,\n\t\t\tthat = this;\n\n\t\tif ( this.reverting ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.options.disabled || this.options.type === \"static\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//We have to refresh the items data once first\n\t\tthis._refreshItems( event );\n\n\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\t$( event.target ).parents().each( function() {\n\t\t\tif ( $.data( this, that.widgetName + \"-item\" ) === that ) {\n\t\t\t\tcurrentItem = $( this );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t\tif ( $.data( event.target, that.widgetName + \"-item\" ) === that ) {\n\t\t\tcurrentItem = $( event.target );\n\t\t}\n\n\t\tif ( !currentItem ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( this.options.handle && !overrideHandle ) {\n\t\t\t$( this.options.handle, currentItem ).find( \"*\" ).addBack().each( function() {\n\t\t\t\tif ( this === event.target ) {\n\t\t\t\t\tvalidHandle = true;\n\t\t\t\t}\n\t\t\t} );\n\t\t\tif ( !validHandle ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tthis.currentItem = currentItem;\n\t\tthis._removeCurrentsFromItems();\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function( event, overrideHandle, noActivation ) {\n\n\t\tvar i, body,\n\t\t\to = this.options;\n\n\t\tthis.currentContainer = this;\n\n\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to\n\t\t// mouseCapture\n\t\tthis.refreshPositions();\n\n\t\t//Prepare the dragged items parent\n\t\tthis.appendTo = $( o.appendTo !== \"parent\" ?\n\t\t\t\to.appendTo :\n\t\t\t\tthis.currentItem.parent() );\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper( event );\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.currentItem.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t$.extend( this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\n\t\t\t// This is a relative to absolute position minus the actual position calculation -\n\t\t\t// only used for relative positioned helper\n\t\t\trelative: this._getRelativeOffset()\n\t\t} );\n\n\t\t// After we get the helper offset, but before we get the parent offset we can\n\t\t// change the helper's position to absolute\n\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\tthis.helper.css( \"position\", \"absolute\" );\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\tif ( o.cursorAt ) {\n\t\t\tthis._adjustOffsetFromHelper( o.cursorAt );\n\t\t}\n\n\t\t//Cache the former DOM position\n\t\tthis.domPosition = {\n\t\t\tprev: this.currentItem.prev()[ 0 ],\n\t\t\tparent: this.currentItem.parent()[ 0 ]\n\t\t};\n\n\t\t// If the helper is not the original, hide the original so it's not playing any role during\n\t\t// the drag, won't cause anything bad this way\n\t\tif ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\tthis.currentItem.hide();\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthis._createPlaceholder();\n\n\t\t//Get the next scrolling parent\n\t\tthis.scrollParent = this.placeholder.scrollParent();\n\n\t\t$.extend( this.offset, {\n\t\t\tparent: this._getParentOffset()\n\t\t} );\n\n\t\t//Set a containment if given in the options\n\t\tif ( o.containment ) {\n\t\t\tthis._setContainment();\n\t\t}\n\n\t\tif ( o.cursor && o.cursor !== \"auto\" ) { // cursor option\n\t\t\tbody = this.document.find( \"body\" );\n\n\t\t\t// Support: IE\n\t\t\tthis.storedCursor = body.css( \"cursor\" );\n\t\t\tbody.css( \"cursor\", o.cursor );\n\n\t\t\tthis.storedStylesheet =\n\t\t\t\t$( \"<style>*{ cursor: \" + o.cursor + \" !important; }</style>\" ).appendTo( body );\n\t\t}\n\n\t\t// We need to make sure to grab the zIndex before setting the\n\t\t// opacity, because setting the opacity to anything lower than 1\n\t\t// causes the zIndex to change from \"auto\" to 0.\n\t\tif ( o.zIndex ) { // zIndex option\n\t\t\tif ( this.helper.css( \"zIndex\" ) ) {\n\t\t\t\tthis._storedZIndex = this.helper.css( \"zIndex\" );\n\t\t\t}\n\t\t\tthis.helper.css( \"zIndex\", o.zIndex );\n\t\t}\n\n\t\tif ( o.opacity ) { // opacity option\n\t\t\tif ( this.helper.css( \"opacity\" ) ) {\n\t\t\t\tthis._storedOpacity = this.helper.css( \"opacity\" );\n\t\t\t}\n\t\t\tthis.helper.css( \"opacity\", o.opacity );\n\t\t}\n\n\t\t//Prepare scrolling\n\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger( \"start\", event, this._uiHash() );\n\n\t\t//Recache the helper size\n\t\tif ( !this._preserveHelperProportions ) {\n\t\t\tthis._cacheHelperProportions();\n\t\t}\n\n\t\t//Post \"activate\" events to possible containers\n\t\tif ( !noActivation ) {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"activate\", event, this._uiHash( this ) );\n\t\t\t}\n\t\t}\n\n\t\t//Prepare possible droppables\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t}\n\n\t\tthis.dragging = true;\n\n\t\tthis._addClass( this.helper, \"ui-sortable-helper\" );\n\n\t\t//Move the helper, if needed\n\t\tif ( !this.helper.parent().is( this.appendTo ) ) {\n\t\t\tthis.helper.detach().appendTo( this.appendTo );\n\n\t\t\t//Update position\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Generate the original position\n\t\tthis.position = this.originalPosition = this._generatePosition( event );\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\t\tthis.lastPositionAbs = this.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\tthis._mouseDrag( event );\n\n\t\treturn true;\n\n\t},\n\n\t_scroll: function( event ) {\n\t\tvar o = this.options,\n\t\t\tscrolled = false;\n\n\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\n\t\t\tif ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -\n\t\t\t\t\tevent.pageY < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollTop =\n\t\t\t\t\tscrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;\n\t\t\t} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollTop =\n\t\t\t\t\tscrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;\n\t\t\t}\n\n\t\t\tif ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -\n\t\t\t\t\tevent.pageX < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollLeft = scrolled =\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;\n\t\t\t} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\tthis.scrollParent[ 0 ].scrollLeft = scrolled =\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );\n\t\t\t} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <\n\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );\n\t\t\t}\n\n\t\t\tif ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollLeft(\n\t\t\t\t\tthis.document.scrollLeft() - o.scrollSpeed\n\t\t\t\t);\n\t\t\t} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <\n\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\tscrolled = this.document.scrollLeft(\n\t\t\t\t\tthis.document.scrollLeft() + o.scrollSpeed\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\n\t\treturn scrolled;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar i, item, itemElement, intersection,\n\t\t\to = this.options;\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event );\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\t//Set the helper position\n\t\tif ( !this.options.axis || this.options.axis !== \"y\" ) {\n\t\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\t}\n\t\tif ( !this.options.axis || this.options.axis !== \"x\" ) {\n\t\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\t\t}\n\n\t\t//Do scrolling\n\t\tif ( o.scroll ) {\n\t\t\tif ( this._scroll( event ) !== false ) {\n\n\t\t\t\t//Update item positions used in position checks\n\t\t\t\tthis._refreshItemPositions( true );\n\n\t\t\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.dragDirection = {\n\t\t\tvertical: this._getDragVerticalDirection(),\n\t\t\thorizontal: this._getDragHorizontalDirection()\n\t\t};\n\n\t\t//Rearrange\n\t\tfor ( i = this.items.length - 1; i >= 0; i-- ) {\n\n\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\titem = this.items[ i ];\n\t\t\titemElement = item.item[ 0 ];\n\t\t\tintersection = this._intersectsWithPointer( item );\n\t\t\tif ( !intersection ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Only put the placeholder inside the current Container, skip all\n\t\t\t// items from other containers. This works because when moving\n\t\t\t// an item from one container to another the\n\t\t\t// currentContainer is switched before the placeholder is moved.\n\t\t\t//\n\t\t\t// Without this, moving items in \"sub-sortables\" can cause\n\t\t\t// the placeholder to jitter between the outer and inner container.\n\t\t\tif ( item.instance !== this.currentContainer ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Cannot intersect with itself\n\t\t\t// no useless actions that have been done before\n\t\t\t// no action if the item moved is the parent of the item checked\n\t\t\tif ( itemElement !== this.currentItem[ 0 ] &&\n\t\t\t\tthis.placeholder[ intersection === 1 ?\n\t\t\t\t\"next\" : \"prev\" ]()[ 0 ] !== itemElement &&\n\t\t\t\t!$.contains( this.placeholder[ 0 ], itemElement ) &&\n\t\t\t\t( this.options.type === \"semi-dynamic\" ?\n\t\t\t\t\t!$.contains( this.element[ 0 ], itemElement ) :\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t) {\n\n\t\t\t\tthis.direction = intersection === 1 ? \"down\" : \"up\";\n\n\t\t\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\t\t\t\tthis._intersectsWithSides( item ) ) {\n\t\t\t\t\tthis._rearrange( event, item );\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis._trigger( \"change\", event, this._uiHash() );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tthis._contactContainers( event );\n\n\t\t//Interconnect with droppables\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.drag( this, event );\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger( \"sort\", event, this._uiHash() );\n\n\t\tthis.lastPositionAbs = this.positionAbs;\n\t\treturn false;\n\n\t},\n\n\t_mouseStop: function( event, noPropagation ) {\n\n\t\tif ( !event ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tif ( $.ui.ddmanager && !this.options.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.drop( this, event );\n\t\t}\n\n\t\tif ( this.options.revert ) {\n\t\t\tvar that = this,\n\t\t\t\tcur = this.placeholder.offset(),\n\t\t\t\taxis = this.options.axis,\n\t\t\t\tanimation = {};\n\n\t\t\tif ( !axis || axis === \"x\" ) {\n\t\t\t\tanimation.left = cur.left - this.offset.parent.left - this.margins.left +\n\t\t\t\t\t( this.offsetParent[ 0 ] === this.document[ 0 ].body ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\tthis.offsetParent[ 0 ].scrollLeft\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tif ( !axis || axis === \"y\" ) {\n\t\t\t\tanimation.top = cur.top - this.offset.parent.top - this.margins.top +\n\t\t\t\t\t( this.offsetParent[ 0 ] === this.document[ 0 ].body ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\tthis.offsetParent[ 0 ].scrollTop\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tthis.reverting = true;\n\t\t\t$( this.helper ).animate(\n\t\t\t\tanimation,\n\t\t\t\tparseInt( this.options.revert, 10 ) || 500,\n\t\t\t\tfunction() {\n\t\t\t\t\tthat._clear( event );\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis._clear( event, noPropagation );\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tcancel: function() {\n\n\t\tif ( this.dragging ) {\n\n\t\t\tthis._mouseUp( new $.Event( \"mouseup\", { target: null } ) );\n\n\t\t\tif ( this.options.helper === \"original\" ) {\n\t\t\t\tthis.currentItem.css( this._storedCSS );\n\t\t\t\tthis._removeClass( this.currentItem, \"ui-sortable-helper\" );\n\t\t\t} else {\n\t\t\t\tthis.currentItem.show();\n\t\t\t}\n\n\t\t\t//Post deactivating events to containers\n\t\t\tfor ( var i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"deactivate\", null, this._uiHash( this ) );\n\t\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\t\tthis.containers[ i ]._trigger( \"out\", null, this._uiHash( this ) );\n\t\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.placeholder ) {\n\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n\t\t\t// it unbinds ALL events from the original node!\n\t\t\tif ( this.placeholder[ 0 ].parentNode ) {\n\t\t\t\tthis.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );\n\t\t\t}\n\t\t\tif ( this.options.helper !== \"original\" && this.helper &&\n\t\t\t\t\tthis.helper[ 0 ].parentNode ) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\n\t\t\t$.extend( this, {\n\t\t\t\thelper: null,\n\t\t\t\tdragging: false,\n\t\t\t\treverting: false,\n\t\t\t\t_noFinalSort: null\n\t\t\t} );\n\n\t\t\tif ( this.domPosition.prev ) {\n\t\t\t\t$( this.domPosition.prev ).after( this.currentItem );\n\t\t\t} else {\n\t\t\t\t$( this.domPosition.parent ).prepend( this.currentItem );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tserialize: function( o ) {\n\n\t\tvar items = this._getItemsAsjQuery( o && o.connected ),\n\t\t\tstr = [];\n\t\to = o || {};\n\n\t\t$( items ).each( function() {\n\t\t\tvar res = ( $( o.item || this ).attr( o.attribute || \"id\" ) || \"\" )\n\t\t\t\t.match( o.expression || ( /(.+)[\\-=_](.+)/ ) );\n\t\t\tif ( res ) {\n\t\t\t\tstr.push(\n\t\t\t\t\t( o.key || res[ 1 ] + \"[]\" ) +\n\t\t\t\t\t\"=\" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );\n\t\t\t}\n\t\t} );\n\n\t\tif ( !str.length && o.key ) {\n\t\t\tstr.push( o.key + \"=\" );\n\t\t}\n\n\t\treturn str.join( \"&\" );\n\n\t},\n\n\ttoArray: function( o ) {\n\n\t\tvar items = this._getItemsAsjQuery( o && o.connected ),\n\t\t\tret = [];\n\n\t\to = o || {};\n\n\t\titems.each( function() {\n\t\t\tret.push( $( o.item || this ).attr( o.attribute || \"id\" ) || \"\" );\n\t\t} );\n\t\treturn ret;\n\n\t},\n\n\t/* Be careful with the following core functions */\n\t_intersectsWith: function( item ) {\n\n\t\tvar x1 = this.positionAbs.left,\n\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\ty1 = this.positionAbs.top,\n\t\t\ty2 = y1 + this.helperProportions.height,\n\t\t\tl = item.left,\n\t\t\tr = l + item.width,\n\t\t\tt = item.top,\n\t\t\tb = t + item.height,\n\t\t\tdyClick = this.offset.click.top,\n\t\t\tdxClick = this.offset.click.left,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) || ( ( y1 + dyClick ) > t &&\n\t\t\t\t( y1 + dyClick ) < b ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) || ( ( x1 + dxClick ) > l &&\n\t\t\t\t( x1 + dxClick ) < r ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\tthis.options.forcePointerForContainers ||\n\t\t\t( this.options.tolerance !== \"pointer\" &&\n\t\t\t\tthis.helperProportions[ this.floating ? \"width\" : \"height\" ] >\n\t\t\t\titem[ this.floating ? \"width\" : \"height\" ] )\n\t\t) {\n\t\t\treturn isOverElement;\n\t\t} else {\n\n\t\t\treturn ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half\n\t\t\t\tx2 - ( this.helperProportions.width / 2 ) < r && // Left Half\n\t\t\t\tt < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half\n\t\t\t\ty2 - ( this.helperProportions.height / 2 ) < b ); // Top Half\n\n\t\t}\n\t},\n\n\t_intersectsWithPointer: function( item ) {\n\t\tvar verticalDirection, horizontalDirection,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) ||\n\t\t\t\tthis._isOverAxis(\n\t\t\t\t\tthis.positionAbs.top + this.offset.click.top, item.top, item.height ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) ||\n\t\t\t\tthis._isOverAxis(\n\t\t\t\t\tthis.positionAbs.left + this.offset.click.left, item.left, item.width ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( !isOverElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tverticalDirection = this.dragDirection.vertical;\n\t\thorizontalDirection = this.dragDirection.horizontal;\n\n\t\treturn this.floating ?\n\t\t\t( ( horizontalDirection === \"right\" || verticalDirection === \"down\" ) ? 2 : 1 ) :\n\t\t\t( verticalDirection && ( verticalDirection === \"down\" ? 2 : 1 ) );\n\n\t},\n\n\t_intersectsWithSides: function( item ) {\n\n\t\tvar isOverBottomHalf = this._isOverAxis( this.positionAbs.top +\n\t\t\t\tthis.offset.click.top, item.top + ( item.height / 2 ), item.height ),\n\t\t\tisOverRightHalf = this._isOverAxis( this.positionAbs.left +\n\t\t\t\tthis.offset.click.left, item.left + ( item.width / 2 ), item.width ),\n\t\t\tverticalDirection = this.dragDirection.vertical,\n\t\t\thorizontalDirection = this.dragDirection.horizontal;\n\n\t\tif ( this.floating && horizontalDirection ) {\n\t\t\treturn ( ( horizontalDirection === \"right\" && isOverRightHalf ) ||\n\t\t\t\t( horizontalDirection === \"left\" && !isOverRightHalf ) );\n\t\t} else {\n\t\t\treturn verticalDirection && ( ( verticalDirection === \"down\" && isOverBottomHalf ) ||\n\t\t\t\t( verticalDirection === \"up\" && !isOverBottomHalf ) );\n\t\t}\n\n\t},\n\n\t_getDragVerticalDirection: function() {\n\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\treturn delta !== 0 && ( delta > 0 ? \"down\" : \"up\" );\n\t},\n\n\t_getDragHorizontalDirection: function() {\n\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\treturn delta !== 0 && ( delta > 0 ? \"right\" : \"left\" );\n\t},\n\n\trefresh: function( event ) {\n\t\tthis._refreshItems( event );\n\t\tthis._setHandleClassName();\n\t\tthis.refreshPositions();\n\t\treturn this;\n\t},\n\n\t_connectWith: function() {\n\t\tvar options = this.options;\n\t\treturn options.connectWith.constructor === String ?\n\t\t\t[ options.connectWith ] :\n\t\t\toptions.connectWith;\n\t},\n\n\t_getItemsAsjQuery: function( connected ) {\n\n\t\tvar i, j, cur, inst,\n\t\t\titems = [],\n\t\t\tqueries = [],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif ( connectWith && connected ) {\n\t\t\tfor ( i = connectWith.length - 1; i >= 0; i-- ) {\n\t\t\t\tcur = $( connectWith[ i ], this.document[ 0 ] );\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j-- ) {\n\t\t\t\t\tinst = $.data( cur[ j ], this.widgetFullName );\n\t\t\t\t\tif ( inst && inst !== this && !inst.options.disabled ) {\n\t\t\t\t\t\tqueries.push( [ typeof inst.options.items === \"function\" ?\n\t\t\t\t\t\t\tinst.options.items.call( inst.element ) :\n\t\t\t\t\t\t\t$( inst.options.items, inst.element )\n\t\t\t\t\t\t\t\t.not( \".ui-sortable-helper\" )\n\t\t\t\t\t\t\t\t.not( \".ui-sortable-placeholder\" ), inst ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tqueries.push( [ typeof this.options.items === \"function\" ?\n\t\t\tthis.options.items\n\t\t\t\t.call( this.element, null, { options: this.options, item: this.currentItem } ) :\n\t\t\t$( this.options.items, this.element )\n\t\t\t\t.not( \".ui-sortable-helper\" )\n\t\t\t\t.not( \".ui-sortable-placeholder\" ), this ] );\n\n\t\tfunction addItems() {\n\t\t\titems.push( this );\n\t\t}\n\t\tfor ( i = queries.length - 1; i >= 0; i-- ) {\n\t\t\tqueries[ i ][ 0 ].each( addItems );\n\t\t}\n\n\t\treturn $( items );\n\n\t},\n\n\t_removeCurrentsFromItems: function() {\n\n\t\tvar list = this.currentItem.find( \":data(\" + this.widgetName + \"-item)\" );\n\n\t\tthis.items = $.grep( this.items, function( item ) {\n\t\t\tfor ( var j = 0; j < list.length; j++ ) {\n\t\t\t\tif ( list[ j ] === item.item[ 0 ] ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} );\n\n\t},\n\n\t_refreshItems: function( event ) {\n\n\t\tthis.items = [];\n\t\tthis.containers = [ this ];\n\n\t\tvar i, j, cur, inst, targetData, _queries, item, queriesLength,\n\t\t\titems = this.items,\n\t\t\tqueries = [ [ typeof this.options.items === \"function\" ?\n\t\t\t\tthis.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :\n\t\t\t\t$( this.options.items, this.element ), this ] ],\n\t\t\tconnectWith = this._connectWith();\n\n\t\t//Shouldn't be run the first time through due to massive slow-down\n\t\tif ( connectWith && this.ready ) {\n\t\t\tfor ( i = connectWith.length - 1; i >= 0; i-- ) {\n\t\t\t\tcur = $( connectWith[ i ], this.document[ 0 ] );\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j-- ) {\n\t\t\t\t\tinst = $.data( cur[ j ], this.widgetFullName );\n\t\t\t\t\tif ( inst && inst !== this && !inst.options.disabled ) {\n\t\t\t\t\t\tqueries.push( [ typeof inst.options.items === \"function\" ?\n\t\t\t\t\t\t\tinst.options.items\n\t\t\t\t\t\t\t\t.call( inst.element[ 0 ], event, { item: this.currentItem } ) :\n\t\t\t\t\t\t\t$( inst.options.items, inst.element ), inst ] );\n\t\t\t\t\t\tthis.containers.push( inst );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( i = queries.length - 1; i >= 0; i-- ) {\n\t\t\ttargetData = queries[ i ][ 1 ];\n\t\t\t_queries = queries[ i ][ 0 ];\n\n\t\t\tfor ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {\n\t\t\t\titem = $( _queries[ j ] );\n\n\t\t\t\t// Data for target checking (mouse manager)\n\t\t\t\titem.data( this.widgetName + \"-item\", targetData );\n\n\t\t\t\titems.push( {\n\t\t\t\t\titem: item,\n\t\t\t\t\tinstance: targetData,\n\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t},\n\n\t_refreshItemPositions: function( fast ) {\n\t\tvar i, item, t, p;\n\n\t\tfor ( i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\titem = this.items[ i ];\n\n\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\tif ( this.currentContainer && item.instance !== this.currentContainer &&\n\t\t\t\t\titem.item[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tt = this.options.toleranceElement ?\n\t\t\t\t$( this.options.toleranceElement, item.item ) :\n\t\t\t\titem.item;\n\n\t\t\tif ( !fast ) {\n\t\t\t\titem.width = t.outerWidth();\n\t\t\t\titem.height = t.outerHeight();\n\t\t\t}\n\n\t\t\tp = t.offset();\n\t\t\titem.left = p.left;\n\t\t\titem.top = p.top;\n\t\t}\n\t},\n\n\trefreshPositions: function( fast ) {\n\n\t\t// Determine whether items are being displayed horizontally\n\t\tthis.floating = this.items.length ?\n\t\t\tthis.options.axis === \"x\" || this._isFloating( this.items[ 0 ].item ) :\n\t\t\tfalse;\n\n\t\t// This has to be redone because due to the item being moved out/into the offsetParent,\n\t\t// the offsetParent's position will change\n\t\tif ( this.offsetParent && this.helper ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\tthis._refreshItemPositions( fast );\n\n\t\tvar i, p;\n\n\t\tif ( this.options.custom && this.options.custom.refreshContainers ) {\n\t\t\tthis.options.custom.refreshContainers.call( this );\n\t\t} else {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tp = this.containers[ i ].element.offset();\n\t\t\t\tthis.containers[ i ].containerCache.left = p.left;\n\t\t\t\tthis.containers[ i ].containerCache.top = p.top;\n\t\t\t\tthis.containers[ i ].containerCache.width =\n\t\t\t\t\tthis.containers[ i ].element.outerWidth();\n\t\t\t\tthis.containers[ i ].containerCache.height =\n\t\t\t\t\tthis.containers[ i ].element.outerHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_createPlaceholder: function( that ) {\n\t\tthat = that || this;\n\t\tvar className, nodeName,\n\t\t\to = that.options;\n\n\t\tif ( !o.placeholder || o.placeholder.constructor === String ) {\n\t\t\tclassName = o.placeholder;\n\t\t\tnodeName = that.currentItem[ 0 ].nodeName.toLowerCase();\n\t\t\to.placeholder = {\n\t\t\t\telement: function() {\n\n\t\t\t\t\tvar element = $( \"<\" + nodeName + \">\", that.document[ 0 ] );\n\n\t\t\t\t\tthat._addClass( element, \"ui-sortable-placeholder\",\n\t\t\t\t\t\t\tclassName || that.currentItem[ 0 ].className )\n\t\t\t\t\t\t._removeClass( element, \"ui-sortable-helper\" );\n\n\t\t\t\t\tif ( nodeName === \"tbody\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder(\n\t\t\t\t\t\t\tthat.currentItem.find( \"tr\" ).eq( 0 ),\n\t\t\t\t\t\t\t$( \"<tr>\", that.document[ 0 ] ).appendTo( element )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( nodeName === \"tr\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder( that.currentItem, element );\n\t\t\t\t\t} else if ( nodeName === \"img\" ) {\n\t\t\t\t\t\telement.attr( \"src\", that.currentItem.attr( \"src\" ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !className ) {\n\t\t\t\t\t\telement.css( \"visibility\", \"hidden\" );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element;\n\t\t\t\t},\n\t\t\t\tupdate: function( container, p ) {\n\n\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes -\n\t\t\t\t\t// the class is responsible for that\n\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a\n\t\t\t\t\t// class name is specified\n\t\t\t\t\tif ( className && !o.forcePlaceholderSize ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the element doesn't have a actual height or width by itself (without\n\t\t\t\t\t// styles coming from a stylesheet), it receives the inline height and width\n\t\t\t\t\t// from the dragged item. Or, if it's a tbody or tr, it's going to have a height\n\t\t\t\t\t// anyway since we're populating them with <td>s above, but they're unlikely to\n\t\t\t\t\t// be the correct height on their own if the row heights are dynamic, so we'll\n\t\t\t\t\t// always assign the height of the dragged item given forcePlaceholderSize\n\t\t\t\t\t// is true.\n\t\t\t\t\tif ( !p.height() || ( o.forcePlaceholderSize &&\n\t\t\t\t\t\t\t( nodeName === \"tbody\" || nodeName === \"tr\" ) ) ) {\n\t\t\t\t\t\tp.height(\n\t\t\t\t\t\t\tthat.currentItem.innerHeight() -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingTop\" ) || 0, 10 ) -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingBottom\" ) || 0, 10 ) );\n\t\t\t\t\t}\n\t\t\t\t\tif ( !p.width() ) {\n\t\t\t\t\t\tp.width(\n\t\t\t\t\t\t\tthat.currentItem.innerWidth() -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingLeft\" ) || 0, 10 ) -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingRight\" ) || 0, 10 ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthat.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );\n\n\t\t//Append it after the actual current item\n\t\tthat.currentItem.after( that.placeholder );\n\n\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\to.placeholder.update( that, that.placeholder );\n\n\t},\n\n\t_createTrPlaceholder: function( sourceTr, targetTr ) {\n\t\tvar that = this;\n\n\t\tsourceTr.children().each( function() {\n\t\t\t$( \"<td>&#160;</td>\", that.document[ 0 ] )\n\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t.appendTo( targetTr );\n\t\t} );\n\t},\n\n\t_contactContainers: function( event ) {\n\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,\n\t\t\tfloating, axis,\n\t\t\tinnermostContainer = null,\n\t\t\tinnermostIndex = null;\n\n\t\t// Get innermost container that intersects with item\n\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\n\t\t\t// Never consider a container that's located within the item itself\n\t\t\tif ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( this._intersectsWith( this.containers[ i ].containerCache ) ) {\n\n\t\t\t\t// If we've already found a container and it's more \"inner\" than this, then continue\n\t\t\t\tif ( innermostContainer &&\n\t\t\t\t\t\t$.contains(\n\t\t\t\t\t\t\tthis.containers[ i ].element[ 0 ],\n\t\t\t\t\t\t\tinnermostContainer.element[ 0 ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tinnermostContainer = this.containers[ i ];\n\t\t\t\tinnermostIndex = i;\n\n\t\t\t} else {\n\n\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary\n\t\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\t\tthis.containers[ i ]._trigger( \"out\", event, this._uiHash( this ) );\n\t\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// If no intersecting containers found, return\n\t\tif ( !innermostContainer ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Move the item into the container if it's not there already\n\t\tif ( this.containers.length === 1 ) {\n\t\t\tif ( !this.containers[ innermostIndex ].containerCache.over ) {\n\t\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash( this ) );\n\t\t\t\tthis.containers[ innermostIndex ].containerCache.over = 1;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// When entering a new container, we will find the item with the least distance and\n\t\t\t// append our item near it\n\t\t\tdist = 10000;\n\t\t\titemWithLeastDistance = null;\n\t\t\tfloating = innermostContainer.floating || this._isFloating( this.currentItem );\n\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\taxis = floating ? \"pageX\" : \"pageY\";\n\n\t\t\tfor ( j = this.items.length - 1; j >= 0; j-- ) {\n\t\t\t\tif ( !$.contains(\n\t\t\t\t\t\tthis.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tcur = this.items[ j ].item.offset()[ posProperty ];\n\t\t\t\tnearBottom = false;\n\t\t\t\tif ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {\n\t\t\t\t\tnearBottom = true;\n\t\t\t\t}\n\n\t\t\t\tif ( Math.abs( event[ axis ] - cur ) < dist ) {\n\t\t\t\t\tdist = Math.abs( event[ axis ] - cur );\n\t\t\t\t\titemWithLeastDistance = this.items[ j ];\n\t\t\t\t\tthis.direction = nearBottom ? \"up\" : \"down\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if dropOnEmpty is enabled\n\t\t\tif ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.currentContainer === this.containers[ innermostIndex ] ) {\n\t\t\t\tif ( !this.currentContainer.containerCache.over ) {\n\t\t\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash() );\n\t\t\t\t\tthis.currentContainer.containerCache.over = 1;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( itemWithLeastDistance ) {\n\t\t\t\tthis._rearrange( event, itemWithLeastDistance, null, true );\n\t\t\t} else {\n\t\t\t\tthis._rearrange( event, null, this.containers[ innermostIndex ].element, true );\n\t\t\t}\n\t\t\tthis._trigger( \"change\", event, this._uiHash() );\n\t\t\tthis.containers[ innermostIndex ]._trigger( \"change\", event, this._uiHash( this ) );\n\t\t\tthis.currentContainer = this.containers[ innermostIndex ];\n\n\t\t\t//Update the placeholder\n\t\t\tthis.options.placeholder.update( this.currentContainer, this.placeholder );\n\n\t\t\t//Update scrollParent\n\t\t\tthis.scrollParent = this.placeholder.scrollParent();\n\n\t\t\t//Update overflowOffset\n\t\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\t\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t\t}\n\n\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash( this ) );\n\t\t\tthis.containers[ innermostIndex ].containerCache.over = 1;\n\t\t}\n\n\t},\n\n\t_createHelper: function( event ) {\n\n\t\tvar o = this.options,\n\t\t\thelper = typeof o.helper === \"function\" ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem );\n\n\t\t//Add the helper to the DOM if that didn't happen already\n\t\tif ( !helper.parents( \"body\" ).length ) {\n\t\t\tthis.appendTo[ 0 ].appendChild( helper[ 0 ] );\n\t\t}\n\n\t\tif ( helper[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\tthis._storedCSS = {\n\t\t\t\twidth: this.currentItem[ 0 ].style.width,\n\t\t\t\theight: this.currentItem[ 0 ].style.height,\n\t\t\t\tposition: this.currentItem.css( \"position\" ),\n\t\t\t\ttop: this.currentItem.css( \"top\" ),\n\t\t\t\tleft: this.currentItem.css( \"left\" )\n\t\t\t};\n\t\t}\n\n\t\tif ( !helper[ 0 ].style.width || o.forceHelperSize ) {\n\t\t\thelper.width( this.currentItem.width() );\n\t\t}\n\t\tif ( !helper[ 0 ].style.height || o.forceHelperSize ) {\n\t\t\thelper.height( this.currentItem.height() );\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function( obj ) {\n\t\tif ( typeof obj === \"string\" ) {\n\t\t\tobj = obj.split( \" \" );\n\t\t}\n\t\tif ( Array.isArray( obj ) ) {\n\t\t\tobj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };\n\t\t}\n\t\tif ( \"left\" in obj ) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ( \"right\" in obj ) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ( \"top\" in obj ) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ( \"bottom\" in obj ) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the\n\t\t// following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the\n\t\t// next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n\t\t// the document, which means that the scroll is included in the initial calculation of the\n\t\t// offset of the parent, and never recalculated upon drag\n\t\tif ( this.cssPosition === \"absolute\" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t// This needs to be actually done for all browsers, since pageX/pageY includes this\n\t\t// information with an ugly IE fix\n\t\tif ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||\n\t\t\t\t( this.offsetParent[ 0 ].tagName &&\n\t\t\t\tthis.offsetParent[ 0 ].tagName.toLowerCase() === \"html\" && $.ui.ie ) ) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + ( parseInt( this.offsetParent.css( \"borderTopWidth\" ), 10 ) || 0 ),\n\t\t\tleft: po.left + ( parseInt( this.offsetParent.css( \"borderLeftWidth\" ), 10 ) || 0 )\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif ( this.cssPosition === \"relative\" ) {\n\t\t\tvar p = this.currentItem.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - ( parseInt( this.helper.css( \"top\" ), 10 ) || 0 ) +\n\t\t\t\t\tthis.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - ( parseInt( this.helper.css( \"left\" ), 10 ) || 0 ) +\n\t\t\t\t\tthis.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: ( parseInt( this.currentItem.css( \"marginLeft\" ), 10 ) || 0 ),\n\t\t\ttop: ( parseInt( this.currentItem.css( \"marginTop\" ), 10 ) || 0 )\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar ce, co, over,\n\t\t\to = this.options;\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\t\tif ( o.containment === \"document\" || o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\to.containment === \"document\" ?\n\t\t\t\t\tthis.document.width() :\n\t\t\t\t\tthis.window.width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( o.containment === \"document\" ?\n\t\t\t\t\t( this.document.height() || document.body.parentNode.scrollHeight ) :\n\t\t\t\t\tthis.window.height() || this.document[ 0 ].body.parentNode.scrollHeight\n\t\t\t\t) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t\tif ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {\n\t\t\tce = $( o.containment )[ 0 ];\n\t\t\tco = $( o.containment ).offset();\n\t\t\tover = ( $( ce ).css( \"overflow\" ) !== \"hidden\" );\n\n\t\t\tthis.containment = [\n\t\t\t\tco.left + ( parseInt( $( ce ).css( \"borderLeftWidth\" ), 10 ) || 0 ) +\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingLeft\" ), 10 ) || 0 ) - this.margins.left,\n\t\t\t\tco.top + ( parseInt( $( ce ).css( \"borderTopWidth\" ), 10 ) || 0 ) +\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingTop\" ), 10 ) || 0 ) - this.margins.top,\n\t\t\t\tco.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"borderLeftWidth\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\t\tthis.helperProportions.width - this.margins.left,\n\t\t\t\tco.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"borderTopWidth\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function( d, pos ) {\n\n\t\tif ( !pos ) {\n\t\t\tpos = this.position;\n\t\t}\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" &&\n\t\t\t\t!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?\n\t\t\t\t\tthis.offsetParent :\n\t\t\t\t\tthis.scrollParent,\n\t\t\tscrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.top\t+\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top * mod -\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollTop() :\n\t\t\t\t\t( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.left +\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left * mod\t-\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :\n\t\t\t\t\tscroll.scrollLeft() ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event ) {\n\n\t\tvar top, left,\n\t\t\to = this.options,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY,\n\t\t\tscroll = this.cssPosition === \"absolute\" &&\n\t\t\t\t!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?\n\t\t\t\t\tthis.offsetParent :\n\t\t\t\t\tthis.scrollParent,\n\t\t\t\tscrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );\n\n\t\t// This is another very weird special case that only happens for relative elements:\n\t\t// 1. If the css position is relative\n\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\tif ( this.cssPosition === \"relative\" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {\n\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif ( this.originalPosition ) { //If we are not dragging yet, we won't check for options\n\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {\n\t\t\t\t\tpageX = this.containment[ 0 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {\n\t\t\t\t\tpageY = this.containment[ 1 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {\n\t\t\t\t\tpageX = this.containment[ 2 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {\n\t\t\t\t\tpageY = this.containment[ 3 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.grid ) {\n\t\t\t\ttop = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /\n\t\t\t\t\to.grid[ 1 ] ) * o.grid[ 1 ];\n\t\t\t\tpageY = this.containment ?\n\t\t\t\t\t( ( top - this.offset.click.top >= this.containment[ 1 ] &&\n\t\t\t\t\t\ttop - this.offset.click.top <= this.containment[ 3 ] ) ?\n\t\t\t\t\t\t\ttop :\n\t\t\t\t\t\t\t( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?\n\t\t\t\t\t\t\t\ttop - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :\n\t\t\t\t\t\t\t\ttop;\n\n\t\t\t\tleft = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /\n\t\t\t\t\to.grid[ 0 ] ) * o.grid[ 0 ];\n\t\t\t\tpageX = this.containment ?\n\t\t\t\t\t( ( left - this.offset.click.left >= this.containment[ 0 ] &&\n\t\t\t\t\t\tleft - this.offset.click.left <= this.containment[ 2 ] ) ?\n\t\t\t\t\t\t\tleft :\n\t\t\t\t\t\t\t( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?\n\t\t\t\t\t\t\t\tleft - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :\n\t\t\t\t\t\t\t\tleft;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageY -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.top -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top +\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollTop() :\n\t\t\t\t\t( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageX -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.left -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left +\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollLeft() :\n\t\t\t\t\tscrollIsRootNode ? 0 : scroll.scrollLeft() ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_rearrange: function( event, i, a, hardRefresh ) {\n\n\t\tif ( a ) {\n\t\t\ta[ 0 ].appendChild( this.placeholder[ 0 ] );\n\t\t} else {\n\t\t\ti.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],\n\t\t\t\t( this.direction === \"down\" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );\n\t\t}\n\n\t\t//Various things done here to improve the performance:\n\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout,\n\t\t// if it's still the same\n\t\t// 4. this lets only the last addition to the timeout stack through\n\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\tvar counter = this.counter;\n\n\t\tthis._delay( function() {\n\t\t\tif ( counter === this.counter ) {\n\n\t\t\t\t//Precompute after each DOM insertion, NOT on mousemove\n\t\t\t\tthis.refreshPositions( !hardRefresh );\n\t\t\t}\n\t\t} );\n\n\t},\n\n\t_clear: function( event, noPropagation ) {\n\n\t\tthis.reverting = false;\n\n\t\t// We delay all events that have to be triggered to after the point where the placeholder\n\t\t// has been removed and everything else normalized again\n\t\tvar i,\n\t\t\tdelayedTriggers = [];\n\n\t\t// We first have to update the dom position of the actual currentItem\n\t\t// Note: don't do it if the current item is already removed (by a user), or it gets\n\t\t// reappended (see #4088)\n\t\tif ( !this._noFinalSort && this.currentItem.parent().length ) {\n\t\t\tthis.placeholder.before( this.currentItem );\n\t\t}\n\t\tthis._noFinalSort = null;\n\n\t\tif ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\tfor ( i in this._storedCSS ) {\n\t\t\t\tif ( this._storedCSS[ i ] === \"auto\" || this._storedCSS[ i ] === \"static\" ) {\n\t\t\t\t\tthis._storedCSS[ i ] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.currentItem.css( this._storedCSS );\n\t\t\tthis._removeClass( this.currentItem, \"ui-sortable-helper\" );\n\t\t} else {\n\t\t\tthis.currentItem.show();\n\t\t}\n\n\t\tif ( this.fromOutside && !noPropagation ) {\n\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\tthis._trigger( \"receive\", event, this._uiHash( this.fromOutside ) );\n\t\t\t} );\n\t\t}\n\t\tif ( ( this.fromOutside ||\n\t\t\t\tthis.domPosition.prev !==\n\t\t\t\tthis.currentItem.prev().not( \".ui-sortable-helper\" )[ 0 ] ||\n\t\t\t\tthis.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {\n\n\t\t\t// Trigger update callback if the DOM position has changed\n\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\tthis._trigger( \"update\", event, this._uiHash() );\n\t\t\t} );\n\t\t}\n\n\t\t// Check if the items Container has Changed and trigger appropriate\n\t\t// events.\n\t\tif ( this !== this.currentContainer ) {\n\t\t\tif ( !noPropagation ) {\n\t\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\t\tthis._trigger( \"remove\", event, this._uiHash() );\n\t\t\t\t} );\n\t\t\t\tdelayedTriggers.push( ( function( c ) {\n\t\t\t\t\treturn function( event ) {\n\t\t\t\t\t\tc._trigger( \"receive\", event, this._uiHash( this ) );\n\t\t\t\t\t};\n\t\t\t\t} ).call( this, this.currentContainer ) );\n\t\t\t\tdelayedTriggers.push( ( function( c ) {\n\t\t\t\t\treturn function( event ) {\n\t\t\t\t\t\tc._trigger( \"update\", event, this._uiHash( this ) );\n\t\t\t\t\t};\n\t\t\t\t} ).call( this, this.currentContainer ) );\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tfunction delayEvent( type, instance, container ) {\n\t\t\treturn function( event ) {\n\t\t\t\tcontainer._trigger( type, event, instance._uiHash( instance ) );\n\t\t\t};\n\t\t}\n\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\tif ( !noPropagation ) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"deactivate\", this, this.containers[ i ] ) );\n\t\t\t}\n\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"out\", this, this.containers[ i ] ) );\n\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t}\n\t\t}\n\n\t\t//Do what was originally in plugins\n\t\tif ( this.storedCursor ) {\n\t\t\tthis.document.find( \"body\" ).css( \"cursor\", this.storedCursor );\n\t\t\tthis.storedStylesheet.remove();\n\t\t}\n\t\tif ( this._storedOpacity ) {\n\t\t\tthis.helper.css( \"opacity\", this._storedOpacity );\n\t\t}\n\t\tif ( this._storedZIndex ) {\n\t\t\tthis.helper.css( \"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex );\n\t\t}\n\n\t\tthis.dragging = false;\n\n\t\tif ( !noPropagation ) {\n\t\t\tthis._trigger( \"beforeStop\", event, this._uiHash() );\n\t\t}\n\n\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n\t\t// it unbinds ALL events from the original node!\n\t\tthis.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );\n\n\t\tif ( !this.cancelHelperRemoval ) {\n\t\t\tif ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\t\t\tthis.helper = null;\n\t\t}\n\n\t\tif ( !noPropagation ) {\n\t\t\tfor ( i = 0; i < delayedTriggers.length; i++ ) {\n\n\t\t\t\t// Trigger all delayed events\n\t\t\t\tdelayedTriggers[ i ].call( this, event );\n\t\t\t}\n\t\t\tthis._trigger( \"stop\", event, this._uiHash() );\n\t\t}\n\n\t\tthis.fromOutside = false;\n\t\treturn !this.cancelHelperRemoval;\n\n\t},\n\n\t_trigger: function() {\n\t\tif ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {\n\t\t\tthis.cancel();\n\t\t}\n\t},\n\n\t_uiHash: function( _inst ) {\n\t\tvar inst = _inst || this;\n\t\treturn {\n\t\t\thelper: inst.helper,\n\t\t\tplaceholder: inst.placeholder || $( [] ),\n\t\t\tposition: inst.position,\n\t\t\toriginalPosition: inst.originalPosition,\n\t\t\toffset: inst.positionAbs,\n\t\t\titem: inst.currentItem,\n\t\t\tsender: _inst ? _inst.element : null\n\t\t};\n\t}\n\n} );\n\n} );\n","/*!\n * jQuery UI Tabs 1.13.2\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Tabs\n//>>group: Widgets\n//>>description: Transforms a set of container elements into a tab structure.\n//>>docs: http://api.jqueryui.com/tabs/\n//>>demos: http://jqueryui.com/tabs/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/tabs.css\n//>>css.theme: ../../themes/base/theme.css\n\n( function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [\n\t\t\t\"jquery\",\n\t\t\t\"../keycode\",\n\t\t\t\"../safe-active-element\",\n\t\t\t\"../unique-id\",\n\t\t\t\"../version\",\n\t\t\t\"../widget\"\n\t\t], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n} )( function( $ ) {\n\"use strict\";\n\n$.widget( \"ui.tabs\", {\n\tversion: \"1.13.2\",\n\tdelay: 300,\n\toptions: {\n\t\tactive: null,\n\t\tclasses: {\n\t\t\t\"ui-tabs\": \"ui-corner-all\",\n\t\t\t\"ui-tabs-nav\": \"ui-corner-all\",\n\t\t\t\"ui-tabs-panel\": \"ui-corner-bottom\",\n\t\t\t\"ui-tabs-tab\": \"ui-corner-top\"\n\t\t},\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theightStyle: \"content\",\n\t\thide: null,\n\t\tshow: null,\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null,\n\t\tbeforeLoad: null,\n\t\tload: null\n\t},\n\n\t_isLocal: ( function() {\n\t\tvar rhash = /#.*$/;\n\n\t\treturn function( anchor ) {\n\t\t\tvar anchorUrl, locationUrl;\n\n\t\t\tanchorUrl = anchor.href.replace( rhash, \"\" );\n\t\t\tlocationUrl = location.href.replace( rhash, \"\" );\n\n\t\t\t// Decoding may throw an error if the URL isn't UTF-8 (#9518)\n\t\t\ttry {\n\t\t\t\tanchorUrl = decodeURIComponent( anchorUrl );\n\t\t\t} catch ( error ) {}\n\t\t\ttry {\n\t\t\t\tlocationUrl = decodeURIComponent( locationUrl );\n\t\t\t} catch ( error ) {}\n\n\t\t\treturn anchor.hash.length > 1 && anchorUrl === locationUrl;\n\t\t};\n\t} )(),\n\n\t_create: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.running = false;\n\n\t\tthis._addClass( \"ui-tabs\", \"ui-widget ui-widget-content\" );\n\t\tthis._toggleClass( \"ui-tabs-collapsible\", null, options.collapsible );\n\n\t\tthis._processTabs();\n\t\toptions.active = this._initialActive();\n\n\t\t// Take disabling tabs via class attribute from HTML\n\t\t// into account and update option properly.\n\t\tif ( Array.isArray( options.disabled ) ) {\n\t\t\toptions.disabled = $.uniqueSort( options.disabled.concat(\n\t\t\t\t$.map( this.tabs.filter( \".ui-state-disabled\" ), function( li ) {\n\t\t\t\t\treturn that.tabs.index( li );\n\t\t\t\t} )\n\t\t\t) ).sort();\n\t\t}\n\n\t\t// Check for length avoids error when initializing empty list\n\t\tif ( this.options.active !== false && this.anchors.length ) {\n\t\t\tthis.active = this._findActive( options.active );\n\t\t} else {\n\t\t\tthis.active = $();\n\t\t}\n\n\t\tthis._refresh();\n\n\t\tif ( this.active.length ) {\n\t\t\tthis.load( options.active );\n\t\t}\n\t},\n\n\t_initialActive: function() {\n\t\tvar active = this.options.active,\n\t\t\tcollapsible = this.options.collapsible,\n\t\t\tlocationHash = location.hash.substring( 1 );\n\n\t\tif ( active === null ) {\n\n\t\t\t// check the fragment identifier in the URL\n\t\t\tif ( locationHash ) {\n\t\t\t\tthis.tabs.each( function( i, tab ) {\n\t\t\t\t\tif ( $( tab ).attr( \"aria-controls\" ) === locationHash ) {\n\t\t\t\t\t\tactive = i;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Check for a tab marked active via a class\n\t\t\tif ( active === null ) {\n\t\t\t\tactive = this.tabs.index( this.tabs.filter( \".ui-tabs-active\" ) );\n\t\t\t}\n\n\t\t\t// No active tab, set to false\n\t\t\tif ( active === null || active === -1 ) {\n\t\t\t\tactive = this.tabs.length ? 0 : false;\n\t\t\t}\n\t\t}\n\n\t\t// Handle numbers: negative, out of range\n\t\tif ( active !== false ) {\n\t\t\tactive = this.tabs.index( this.tabs.eq( active ) );\n\t\t\tif ( active === -1 ) {\n\t\t\t\tactive = collapsible ? false : 0;\n\t\t\t}\n\t\t}\n\n\t\t// Don't allow collapsible: false and active: false\n\t\tif ( !collapsible && active === false && this.anchors.length ) {\n\t\t\tactive = 0;\n\t\t}\n\n\t\treturn active;\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\ttab: this.active,\n\t\t\tpanel: !this.active.length ? $() : this._getPanelForTab( this.active )\n\t\t};\n\t},\n\n\t_tabKeydown: function( event ) {\n\t\tvar focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( \"li\" ),\n\t\t\tselectedIndex = this.tabs.index( focusedTab ),\n\t\t\tgoingForward = true;\n\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.RIGHT:\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tselectedIndex++;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tgoingForward = false;\n\t\t\tselectedIndex--;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tselectedIndex = this.anchors.length - 1;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tselectedIndex = 0;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.SPACE:\n\n\t\t\t// Activate only, no collapsing\n\t\t\tevent.preventDefault();\n\t\t\tclearTimeout( this.activating );\n\t\t\tthis._activate( selectedIndex );\n\t\t\treturn;\n\t\tcase $.ui.keyCode.ENTER:\n\n\t\t\t// Toggle (cancel delayed activation, allow collapsing)\n\t\t\tevent.preventDefault();\n\t\t\tclearTimeout( this.activating );\n\n\t\t\t// Determine if we should collapse or activate\n\t\t\tthis._activate( selectedIndex === this.options.active ? false : selectedIndex );\n\t\t\treturn;\n\t\tdefault:\n\t\t\treturn;\n\t\t}\n\n\t\t// Focus the appropriate tab, based on which key was pressed\n\t\tevent.preventDefault();\n\t\tclearTimeout( this.activating );\n\t\tselectedIndex = this._focusNextTab( selectedIndex, goingForward );\n\n\t\t// Navigating with control/command key will prevent automatic activation\n\t\tif ( !event.ctrlKey && !event.metaKey ) {\n\n\t\t\t// Update aria-selected immediately so that AT think the tab is already selected.\n\t\t\t// Otherwise AT may confuse the user by stating that they need to activate the tab,\n\t\t\t// but the tab will already be activated by the time the announcement finishes.\n\t\t\tfocusedTab.attr( \"aria-selected\", \"false\" );\n\t\t\tthis.tabs.eq( selectedIndex ).attr( \"aria-selected\", \"true\" );\n\n\t\t\tthis.activating = this._delay( function() {\n\t\t\t\tthis.option( \"active\", selectedIndex );\n\t\t\t}, this.delay );\n\t\t}\n\t},\n\n\t_panelKeydown: function( event ) {\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ctrl+up moves focus to the current tab\n\t\tif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.active.trigger( \"focus\" );\n\t\t}\n\t},\n\n\t// Alt+page up/down moves focus to the previous/next tab (and activates)\n\t_handlePageNav: function( event ) {\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active - 1, false ) );\n\t\t\treturn true;\n\t\t}\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active + 1, true ) );\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t_findNextTab: function( index, goingForward ) {\n\t\tvar lastTabIndex = this.tabs.length - 1;\n\n\t\tfunction constrain() {\n\t\t\tif ( index > lastTabIndex ) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tif ( index < 0 ) {\n\t\t\t\tindex = lastTabIndex;\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\n\t\twhile ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {\n\t\t\tindex = goingForward ? index + 1 : index - 1;\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_focusNextTab: function( index, goingForward ) {\n\t\tindex = this._findNextTab( index, goingForward );\n\t\tthis.tabs.eq( index ).trigger( \"focus\" );\n\t\treturn index;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"collapsible\" ) {\n\t\t\tthis._toggleClass( \"ui-tabs-collapsible\", null, value );\n\n\t\t\t// Setting collapsible: false while collapsed; open first panel\n\t\t\tif ( !value && this.options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tif ( key === \"heightStyle\" ) {\n\t\t\tthis._setupHeightStyle( value );\n\t\t}\n\t},\n\n\t_sanitizeSelector: function( hash ) {\n\t\treturn hash ? hash.replace( /[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\" ) : \"\";\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options,\n\t\t\tlis = this.tablist.children( \":has(a[href])\" );\n\n\t\t// Get disabled tabs from class attribute from HTML\n\t\t// this will get converted to a boolean if needed in _refresh()\n\t\toptions.disabled = $.map( lis.filter( \".ui-state-disabled\" ), function( tab ) {\n\t\t\treturn lis.index( tab );\n\t\t} );\n\n\t\tthis._processTabs();\n\n\t\t// Was collapsed or no tabs\n\t\tif ( options.active === false || !this.anchors.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\n\t\t// was active, but active tab is gone\n\t\t} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {\n\n\t\t\t// all remaining tabs are disabled\n\t\t\tif ( this.tabs.length === options.disabled.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\n\t\t\t// activate previous tab\n\t\t\t} else {\n\t\t\t\tthis._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );\n\t\t\t}\n\n\t\t// was active, active tab still exists\n\t\t} else {\n\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.tabs.index( this.active );\n\t\t}\n\n\t\tthis._refresh();\n\t},\n\n\t_refresh: function() {\n\t\tthis._setOptionDisabled( this.options.disabled );\n\t\tthis._setupEvents( this.options.event );\n\t\tthis._setupHeightStyle( this.options.heightStyle );\n\n\t\tthis.tabs.not( this.active ).attr( {\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\ttabIndex: -1\n\t\t} );\n\t\tthis.panels.not( this._getPanelForTab( this.active ) )\n\t\t\t.hide()\n\t\t\t.attr( {\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t} );\n\n\t\t// Make sure one tab is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.tabs.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t} );\n\t\t\tthis._addClass( this.active, \"ui-tabs-active\", \"ui-state-active\" );\n\t\t\tthis._getPanelForTab( this.active )\n\t\t\t\t.show()\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_processTabs: function() {\n\t\tvar that = this,\n\t\t\tprevTabs = this.tabs,\n\t\t\tprevAnchors = this.anchors,\n\t\t\tprevPanels = this.panels;\n\n\t\tthis.tablist = this._getList().attr( \"role\", \"tablist\" );\n\t\tthis._addClass( this.tablist, \"ui-tabs-nav\",\n\t\t\t\"ui-helper-reset ui-helper-clearfix ui-widget-header\" );\n\n\t\t// Prevent users from focusing disabled tabs via click\n\t\tthis.tablist\n\t\t\t.on( \"mousedown\" + this.eventNamespace, \"> li\", function( event ) {\n\t\t\t\tif ( $( this ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} )\n\n\t\t\t// Support: IE <9\n\t\t\t// Preventing the default action in mousedown doesn't prevent IE\n\t\t\t// from focusing the element, so if the anchor gets focused, blur.\n\t\t\t// We don't have to worry about focusing the previously focused\n\t\t\t// element since clicking on a non-focusable element should focus\n\t\t\t// the body anyway.\n\t\t\t.on( \"focus\" + this.eventNamespace, \".ui-tabs-anchor\", function() {\n\t\t\t\tif ( $( this ).closest( \"li\" ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.tabs = this.tablist.find( \"> li:has(a[href])\" )\n\t\t\t.attr( {\n\t\t\t\trole: \"tab\",\n\t\t\t\ttabIndex: -1\n\t\t\t} );\n\t\tthis._addClass( this.tabs, \"ui-tabs-tab\", \"ui-state-default\" );\n\n\t\tthis.anchors = this.tabs.map( function() {\n\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t} )\n\t\t\t.attr( {\n\t\t\t\ttabIndex: -1\n\t\t\t} );\n\t\tthis._addClass( this.anchors, \"ui-tabs-anchor\" );\n\n\t\tthis.panels = $();\n\n\t\tthis.anchors.each( function( i, anchor ) {\n\t\t\tvar selector, panel, panelId,\n\t\t\t\tanchorId = $( anchor ).uniqueId().attr( \"id\" ),\n\t\t\t\ttab = $( anchor ).closest( \"li\" ),\n\t\t\t\toriginalAriaControls = tab.attr( \"aria-controls\" );\n\n\t\t\t// Inline tab\n\t\t\tif ( that._isLocal( anchor ) ) {\n\t\t\t\tselector = anchor.hash;\n\t\t\t\tpanelId = selector.substring( 1 );\n\t\t\t\tpanel = that.element.find( that._sanitizeSelector( selector ) );\n\n\t\t\t// remote tab\n\t\t\t} else {\n\n\t\t\t\t// If the tab doesn't already have aria-controls,\n\t\t\t\t// generate an id by using a throw-away element\n\t\t\t\tpanelId = tab.attr( \"aria-controls\" ) || $( {} ).uniqueId()[ 0 ].id;\n\t\t\t\tselector = \"#\" + panelId;\n\t\t\t\tpanel = that.element.find( selector );\n\t\t\t\tif ( !panel.length ) {\n\t\t\t\t\tpanel = that._createPanel( panelId );\n\t\t\t\t\tpanel.insertAfter( that.panels[ i - 1 ] || that.tablist );\n\t\t\t\t}\n\t\t\t\tpanel.attr( \"aria-live\", \"polite\" );\n\t\t\t}\n\n\t\t\tif ( panel.length ) {\n\t\t\t\tthat.panels = that.panels.add( panel );\n\t\t\t}\n\t\t\tif ( originalAriaControls ) {\n\t\t\t\ttab.data( \"ui-tabs-aria-controls\", originalAriaControls );\n\t\t\t}\n\t\t\ttab.attr( {\n\t\t\t\t\"aria-controls\": panelId,\n\t\t\t\t\"aria-labelledby\": anchorId\n\t\t\t} );\n\t\t\tpanel.attr( \"aria-labelledby\", anchorId );\n\t\t} );\n\n\t\tthis.panels.attr( \"role\", \"tabpanel\" );\n\t\tthis._addClass( this.panels, \"ui-tabs-panel\", \"ui-widget-content\" );\n\n\t\t// Avoid memory leaks (#10056)\n\t\tif ( prevTabs ) {\n\t\t\tthis._off( prevTabs.not( this.tabs ) );\n\t\t\tthis._off( prevAnchors.not( this.anchors ) );\n\t\t\tthis._off( prevPanels.not( this.panels ) );\n\t\t}\n\t},\n\n\t// Allow overriding how to find the list for rare usage scenarios (#7715)\n\t_getList: function() {\n\t\treturn this.tablist || this.element.find( \"ol, ul\" ).eq( 0 );\n\t},\n\n\t_createPanel: function( id ) {\n\t\treturn $( \"<div>\" )\n\t\t\t.attr( \"id\", id )\n\t\t\t.data( \"ui-tabs-destroy\", true );\n\t},\n\n\t_setOptionDisabled: function( disabled ) {\n\t\tvar currentItem, li, i;\n\n\t\tif ( Array.isArray( disabled ) ) {\n\t\t\tif ( !disabled.length ) {\n\t\t\t\tdisabled = false;\n\t\t\t} else if ( disabled.length === this.anchors.length ) {\n\t\t\t\tdisabled = true;\n\t\t\t}\n\t\t}\n\n\t\t// Disable tabs\n\t\tfor ( i = 0; ( li = this.tabs[ i ] ); i++ ) {\n\t\t\tcurrentItem = $( li );\n\t\t\tif ( disabled === true || $.inArray( i, disabled ) !== -1 ) {\n\t\t\t\tcurrentItem.attr( \"aria-disabled\", \"true\" );\n\t\t\t\tthis._addClass( currentItem, null, \"ui-state-disabled\" );\n\t\t\t} else {\n\t\t\t\tcurrentItem.removeAttr( \"aria-disabled\" );\n\t\t\t\tthis._removeClass( currentItem, null, \"ui-state-disabled\" );\n\t\t\t}\n\t\t}\n\n\t\tthis.options.disabled = disabled;\n\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null,\n\t\t\tdisabled === true );\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {};\n\t\tif ( event ) {\n\t\t\t$.each( event.split( \" \" ), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t} );\n\t\t}\n\n\t\tthis._off( this.anchors.add( this.tabs ).add( this.panels ) );\n\n\t\t// Always prevent the default action, even when disabled\n\t\tthis._on( true, this.anchors, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\t\tthis._on( this.anchors, events );\n\t\tthis._on( this.tabs, { keydown: \"_tabKeydown\" } );\n\t\tthis._on( this.panels, { keydown: \"_panelKeydown\" } );\n\n\t\tthis._focusable( this.tabs );\n\t\tthis._hoverable( this.tabs );\n\t},\n\n\t_setupHeightStyle: function( heightStyle ) {\n\t\tvar maxHeight,\n\t\t\tparent = this.element.parent();\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tmaxHeight -= this.element.outerHeight() - this.element.height();\n\n\t\t\tthis.element.siblings( \":visible\" ).each( function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.element.children().not( this.panels ).each( function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.panels.each( function() {\n\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t} )\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.panels.each( function() {\n\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t} ).height( maxHeight );\n\t\t}\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tanchor = $( event.currentTarget ),\n\t\t\ttab = anchor.closest( \"li\" ),\n\t\t\tclickedIsActive = tab[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : this._getPanelForTab( tab ),\n\t\t\ttoHide = !active.length ? $() : this._getPanelForTab( active ),\n\t\t\teventData = {\n\t\t\t\toldTab: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewTab: collapsing ? $() : tab,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif ( tab.hasClass( \"ui-state-disabled\" ) ||\n\n\t\t\t\t// tab is already loading\n\t\t\t\ttab.hasClass( \"ui-tabs-loading\" ) ||\n\n\t\t\t\t// can't switch durning an animation\n\t\t\t\tthis.running ||\n\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.tabs.index( tab );\n\n\t\tthis.active = clickedIsActive ? $() : tab;\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tif ( !toHide.length && !toShow.length ) {\n\t\t\t$.error( \"jQuery UI Tabs: Mismatching fragment identifier.\" );\n\t\t}\n\n\t\tif ( toShow.length ) {\n\t\t\tthis.load( this.tabs.index( tab ), event );\n\t\t}\n\t\tthis._toggle( event, eventData );\n\t},\n\n\t// Handles show/hide for selecting tabs\n\t_toggle: function( event, eventData ) {\n\t\tvar that = this,\n\t\t\ttoShow = eventData.newPanel,\n\t\t\ttoHide = eventData.oldPanel;\n\n\t\tthis.running = true;\n\n\t\tfunction complete() {\n\t\t\tthat.running = false;\n\t\t\tthat._trigger( \"activate\", event, eventData );\n\t\t}\n\n\t\tfunction show() {\n\t\t\tthat._addClass( eventData.newTab.closest( \"li\" ), \"ui-tabs-active\", \"ui-state-active\" );\n\n\t\t\tif ( toShow.length && that.options.show ) {\n\t\t\t\tthat._show( toShow, that.options.show, complete );\n\t\t\t} else {\n\t\t\t\ttoShow.show();\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\n\t\t// Start out by hiding, then showing, then completing\n\t\tif ( toHide.length && this.options.hide ) {\n\t\t\tthis._hide( toHide, this.options.hide, function() {\n\t\t\t\tthat._removeClass( eventData.oldTab.closest( \"li\" ),\n\t\t\t\t\t\"ui-tabs-active\", \"ui-state-active\" );\n\t\t\t\tshow();\n\t\t\t} );\n\t\t} else {\n\t\t\tthis._removeClass( eventData.oldTab.closest( \"li\" ),\n\t\t\t\t\"ui-tabs-active\", \"ui-state-active\" );\n\t\t\ttoHide.hide();\n\t\t\tshow();\n\t\t}\n\n\t\ttoHide.attr( \"aria-hidden\", \"true\" );\n\t\teventData.oldTab.attr( {\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\"\n\t\t} );\n\n\t\t// If we're switching tabs, remove the old tab from the tab order.\n\t\t// If we're opening from collapsed state, remove the previous tab from the tab order.\n\t\t// If we're collapsing, then keep the collapsing tab in the tab order.\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\teventData.oldTab.attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.tabs.filter( function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t} )\n\t\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow.attr( \"aria-hidden\", \"false\" );\n\t\teventData.newTab.attr( {\n\t\t\t\"aria-selected\": \"true\",\n\t\t\t\"aria-expanded\": \"true\",\n\t\t\ttabIndex: 0\n\t\t} );\n\t},\n\n\t_activate: function( index ) {\n\t\tvar anchor,\n\t\t\tactive = this._findActive( index );\n\n\t\t// Trying to activate the already active panel\n\t\tif ( active[ 0 ] === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Trying to collapse, simulate a click on the current active header\n\t\tif ( !active.length ) {\n\t\t\tactive = this.active;\n\t\t}\n\n\t\tanchor = active.find( \".ui-tabs-anchor\" )[ 0 ];\n\t\tthis._eventHandler( {\n\t\t\ttarget: anchor,\n\t\t\tcurrentTarget: anchor,\n\t\t\tpreventDefault: $.noop\n\t\t} );\n\t},\n\n\t_findActive: function( index ) {\n\t\treturn index === false ? $() : this.tabs.eq( index );\n\t},\n\n\t_getIndex: function( index ) {\n\n\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\tif ( typeof index === \"string\" ) {\n\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" +\n\t\t\t\t$.escapeSelector( index ) + \"']\" ) );\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_destroy: function() {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tthis.tablist\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.off( this.eventNamespace );\n\n\t\tthis.anchors\n\t\t\t.removeAttr( \"role tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis.tabs.add( this.panels ).each( function() {\n\t\t\tif ( $.data( this, \"ui-tabs-destroy\" ) ) {\n\t\t\t\t$( this ).remove();\n\t\t\t} else {\n\t\t\t\t$( this ).removeAttr( \"role tabIndex \" +\n\t\t\t\t\t\"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded\" );\n\t\t\t}\n\t\t} );\n\n\t\tthis.tabs.each( function() {\n\t\t\tvar li = $( this ),\n\t\t\t\tprev = li.data( \"ui-tabs-aria-controls\" );\n\t\t\tif ( prev ) {\n\t\t\t\tli\n\t\t\t\t\t.attr( \"aria-controls\", prev )\n\t\t\t\t\t.removeData( \"ui-tabs-aria-controls\" );\n\t\t\t} else {\n\t\t\t\tli.removeAttr( \"aria-controls\" );\n\t\t\t}\n\t\t} );\n\n\t\tthis.panels.show();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tthis.panels.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\tenable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = false;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( Array.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.map( disabled, function( num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tdisabled = $.map( this.tabs, function( li, num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t\tthis._setOptionDisabled( disabled );\n\t},\n\n\tdisable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = true;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.inArray( index, disabled ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( Array.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.merge( [ index ], disabled ).sort();\n\t\t\t} else {\n\t\t\t\tdisabled = [ index ];\n\t\t\t}\n\t\t}\n\t\tthis._setOptionDisabled( disabled );\n\t},\n\n\tload: function( index, event ) {\n\t\tindex = this._getIndex( index );\n\t\tvar that = this,\n\t\t\ttab = this.tabs.eq( index ),\n\t\t\tanchor = tab.find( \".ui-tabs-anchor\" ),\n\t\t\tpanel = this._getPanelForTab( tab ),\n\t\t\teventData = {\n\t\t\t\ttab: tab,\n\t\t\t\tpanel: panel\n\t\t\t},\n\t\t\tcomplete = function( jqXHR, status ) {\n\t\t\t\tif ( status === \"abort\" ) {\n\t\t\t\t\tthat.panels.stop( false, true );\n\t\t\t\t}\n\n\t\t\t\tthat._removeClass( tab, \"ui-tabs-loading\" );\n\t\t\t\tpanel.removeAttr( \"aria-busy\" );\n\n\t\t\t\tif ( jqXHR === that.xhr ) {\n\t\t\t\t\tdelete that.xhr;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Not remote\n\t\tif ( this._isLocal( anchor[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );\n\n\t\t// Support: jQuery <1.8\n\t\t// jQuery <1.8 returns false if the request is canceled in beforeSend,\n\t\t// but as of 1.8, $.ajax() always returns a jqXHR object.\n\t\tif ( this.xhr && this.xhr.statusText !== \"canceled\" ) {\n\t\t\tthis._addClass( tab, \"ui-tabs-loading\" );\n\t\t\tpanel.attr( \"aria-busy\", \"true\" );\n\n\t\t\tthis.xhr\n\t\t\t\t.done( function( response, status, jqXHR ) {\n\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tpanel.html( response );\n\t\t\t\t\t\tthat._trigger( \"load\", event, eventData );\n\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t} )\n\t\t\t\t.fail( function( jqXHR, status ) {\n\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_ajaxSettings: function( anchor, event, eventData ) {\n\t\tvar that = this;\n\t\treturn {\n\n\t\t\t// Support: IE <11 only\n\t\t\t// Strip any hash that exists to prevent errors with the Ajax request\n\t\t\turl: anchor.attr( \"href\" ).replace( /#.*$/, \"\" ),\n\t\t\tbeforeSend: function( jqXHR, settings ) {\n\t\t\t\treturn that._trigger( \"beforeLoad\", event,\n\t\t\t\t\t$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );\n\t\t\t}\n\t\t};\n\t},\n\n\t_getPanelForTab: function( tab ) {\n\t\tvar id = $( tab ).attr( \"aria-controls\" );\n\t\treturn this.element.find( this._sanitizeSelector( \"#\" + id ) );\n\t}\n} );\n\n// DEPRECATED\n// TODO: Switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for ui-tab class (now ui-tabs-tab)\n\t$.widget( \"ui.tabs\", $.ui.tabs, {\n\t\t_processTabs: function() {\n\t\t\tthis._superApply( arguments );\n\t\t\tthis._addClass( this.tabs, \"ui-tab\" );\n\t\t}\n\t} );\n}\n\nreturn $.ui.tabs;\n\n} );\n","/*!\n * jQuery Validation Plugin v1.19.5\n *\n * https://jqueryvalidation.org/\n *\n * Copyright (c) 2022 Jörn Zaefferer\n * Released under the MIT license\n */\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine( [\"jquery\"], factory );\n\t} else if (typeof module === \"object\" && module.exports) {\n\t\tmodule.exports = factory( require( \"jquery\" ) );\n\t} else {\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\n$.extend( $.fn, {\n\n\t// https://jqueryvalidation.org/validate/\n\tvalidate: function( options ) {\n\n\t\t// If nothing is selected, return nothing; can't chain anyway\n\t\tif ( !this.length ) {\n\t\t\tif ( options && options.debug && window.console ) {\n\t\t\t\tconsole.warn( \"Nothing selected, can't validate, returning nothing.\" );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if a validator for this form was already created\n\t\tvar validator = $.data( this[ 0 ], \"validator\" );\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\n\t\t// Add novalidate tag if HTML5.\n\t\tthis.attr( \"novalidate\", \"novalidate\" );\n\n\t\tvalidator = new $.validator( options, this[ 0 ] );\n\t\t$.data( this[ 0 ], \"validator\", validator );\n\n\t\tif ( validator.settings.onsubmit ) {\n\n\t\t\tthis.on( \"click.validate\", \":submit\", function( event ) {\n\n\t\t\t\t// Track the used submit button to properly handle scripted\n\t\t\t\t// submits later.\n\t\t\t\tvalidator.submitButton = event.currentTarget;\n\n\t\t\t\t// Allow suppressing validation by adding a cancel class to the submit button\n\t\t\t\tif ( $( this ).hasClass( \"cancel\" ) ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\n\t\t\t\t// Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n\t\t\t\tif ( $( this ).attr( \"formnovalidate\" ) !== undefined ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Validate the form on submit\n\t\t\tthis.on( \"submit.validate\", function( event ) {\n\t\t\t\tif ( validator.settings.debug ) {\n\n\t\t\t\t\t// Prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tfunction handle() {\n\t\t\t\t\tvar hidden, result;\n\n\t\t\t\t\t// Insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t// The hidden input is inserted in two cases:\n\t\t\t\t\t//   - A user defined a `submitHandler`\n\t\t\t\t\t//   - There was a pending request due to `remote` method and `stopRequest()`\n\t\t\t\t\t//     was called to submit the form in case it's valid\n\t\t\t\t\tif ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {\n\t\t\t\t\t\thidden = $( \"<input type='hidden'/>\" )\n\t\t\t\t\t\t\t.attr( \"name\", validator.submitButton.name )\n\t\t\t\t\t\t\t.val( $( validator.submitButton ).val() )\n\t\t\t\t\t\t\t.appendTo( validator.currentForm );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( validator.settings.submitHandler && !validator.settings.debug ) {\n\t\t\t\t\t\tresult = validator.settings.submitHandler.call( validator, validator.currentForm, event );\n\t\t\t\t\t\tif ( hidden ) {\n\n\t\t\t\t\t\t\t// And clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( result !== undefined ) {\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// Prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn validator;\n\t},\n\n\t// https://jqueryvalidation.org/valid/\n\tvalid: function() {\n\t\tvar valid, validator, errorList;\n\n\t\tif ( $( this[ 0 ] ).is( \"form\" ) ) {\n\t\t\tvalid = this.validate().form();\n\t\t} else {\n\t\t\terrorList = [];\n\t\t\tvalid = true;\n\t\t\tvalidator = $( this[ 0 ].form ).validate();\n\t\t\tthis.each( function() {\n\t\t\t\tvalid = validator.element( this ) && valid;\n\t\t\t\tif ( !valid ) {\n\t\t\t\t\terrorList = errorList.concat( validator.errorList );\n\t\t\t\t}\n\t\t\t} );\n\t\t\tvalidator.errorList = errorList;\n\t\t}\n\t\treturn valid;\n\t},\n\n\t// https://jqueryvalidation.org/rules/\n\trules: function( command, argument ) {\n\t\tvar element = this[ 0 ],\n\t\t\tisContentEditable = typeof this.attr( \"contenteditable\" ) !== \"undefined\" && this.attr( \"contenteditable\" ) !== \"false\",\n\t\t\tsettings, staticRules, existingRules, data, param, filtered;\n\n\t\t// If nothing is selected, return empty object; can't chain anyway\n\t\tif ( element == null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !element.form && isContentEditable ) {\n\t\t\telement.form = this.closest( \"form\" )[ 0 ];\n\t\t\telement.name = this.attr( \"name\" );\n\t\t}\n\n\t\tif ( element.form == null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( command ) {\n\t\t\tsettings = $.data( element.form, \"validator\" ).settings;\n\t\t\tstaticRules = settings.rules;\n\t\t\texistingRules = $.validator.staticRules( element );\n\t\t\tswitch ( command ) {\n\t\t\tcase \"add\":\n\t\t\t\t$.extend( existingRules, $.validator.normalizeRule( argument ) );\n\n\t\t\t\t// Remove messages from rules, but allow them to be set separately\n\t\t\t\tdelete existingRules.messages;\n\t\t\t\tstaticRules[ element.name ] = existingRules;\n\t\t\t\tif ( argument.messages ) {\n\t\t\t\t\tsettings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\tif ( !argument ) {\n\t\t\t\t\tdelete staticRules[ element.name ];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tfiltered = {};\n\t\t\t\t$.each( argument.split( /\\s/ ), function( index, method ) {\n\t\t\t\t\tfiltered[ method ] = existingRules[ method ];\n\t\t\t\t\tdelete existingRules[ method ];\n\t\t\t\t} );\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\n\t\tdata = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.classRules( element ),\n\t\t\t$.validator.attributeRules( element ),\n\t\t\t$.validator.dataRules( element ),\n\t\t\t$.validator.staticRules( element )\n\t\t), element );\n\n\t\t// Make sure required is at front\n\t\tif ( data.required ) {\n\t\t\tparam = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend( { required: param }, data );\n\t\t}\n\n\t\t// Make sure remote is at back\n\t\tif ( data.remote ) {\n\t\t\tparam = data.remote;\n\t\t\tdelete data.remote;\n\t\t\tdata = $.extend( data, { remote: param } );\n\t\t}\n\n\t\treturn data;\n\t}\n} );\n\n// JQuery trim is deprecated, provide a trim method based on String.prototype.trim\nvar trim = function( str ) {\n\n\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill\n\treturn str.replace( /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\" );\n};\n\n// Custom selectors\n$.extend( $.expr.pseudos || $.expr[ \":\" ], {\t\t// '|| $.expr[ \":\" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support\n\n\t// https://jqueryvalidation.org/blank-selector/\n\tblank: function( a ) {\n\t\treturn !trim( \"\" + $( a ).val() );\n\t},\n\n\t// https://jqueryvalidation.org/filled-selector/\n\tfilled: function( a ) {\n\t\tvar val = $( a ).val();\n\t\treturn val !== null && !!trim( \"\" + val );\n\t},\n\n\t// https://jqueryvalidation.org/unchecked-selector/\n\tunchecked: function( a ) {\n\t\treturn !$( a ).prop( \"checked\" );\n\t}\n} );\n\n// Constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n// https://jqueryvalidation.org/jQuery.validator.format/\n$.validator.format = function( source, params ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn function() {\n\t\t\tvar args = $.makeArray( arguments );\n\t\t\targs.unshift( source );\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\t}\n\tif ( params === undefined ) {\n\t\treturn source;\n\t}\n\tif ( arguments.length > 2 && params.constructor !== Array  ) {\n\t\tparams = $.makeArray( arguments ).slice( 1 );\n\t}\n\tif ( params.constructor !== Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each( params, function( i, n ) {\n\t\tsource = source.replace( new RegExp( \"\\\\{\" + i + \"\\\\}\", \"g\" ), function() {\n\t\t\treturn n;\n\t\t} );\n\t} );\n\treturn source;\n};\n\n$.extend( $.validator, {\n\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: \"error\",\n\t\tpendingClass: \"pending\",\n\t\tvalidClass: \"valid\",\n\t\terrorElement: \"label\",\n\t\tfocusCleanup: false,\n\t\tfocusInvalid: true,\n\t\terrorContainer: $( [] ),\n\t\terrorLabelContainer: $( [] ),\n\t\tonsubmit: true,\n\t\tignore: \":hidden\",\n\t\tignoreTitle: false,\n\t\tonfocusin: function( element ) {\n\t\t\tthis.lastActive = element;\n\n\t\t\t// Hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup ) {\n\t\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.hideThese( this.errorsFor( element ) );\n\t\t\t}\n\t\t},\n\t\tonfocusout: function( element ) {\n\t\t\tif ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonkeyup: function( element, event ) {\n\n\t\t\t// Avoid revalidate the field when pressing one of the following keys\n\t\t\t// Shift       => 16\n\t\t\t// Ctrl        => 17\n\t\t\t// Alt         => 18\n\t\t\t// Caps lock   => 20\n\t\t\t// End         => 35\n\t\t\t// Home        => 36\n\t\t\t// Left arrow  => 37\n\t\t\t// Up arrow    => 38\n\t\t\t// Right arrow => 39\n\t\t\t// Down arrow  => 40\n\t\t\t// Insert      => 45\n\t\t\t// Num lock    => 144\n\t\t\t// AltGr key   => 225\n\t\t\tvar excludedKeys = [\n\t\t\t\t16, 17, 18, 20, 35, 36, 37,\n\t\t\t\t38, 39, 40, 45, 144, 225\n\t\t\t];\n\n\t\t\tif ( event.which === 9 && this.elementValue( element ) === \"\" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t} else if ( element.name in this.submitted || element.name in this.invalid ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonclick: function( element ) {\n\n\t\t\t// Click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted ) {\n\t\t\t\tthis.element( element );\n\n\t\t\t// Or option elements, check parent select in that case\n\t\t\t} else if ( element.parentNode.name in this.submitted ) {\n\t\t\t\tthis.element( element.parentNode );\n\t\t\t}\n\t\t},\n\t\thighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName( element.name ).addClass( errorClass ).removeClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).addClass( errorClass ).removeClass( validClass );\n\t\t\t}\n\t\t},\n\t\tunhighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName( element.name ).removeClass( errorClass ).addClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).removeClass( errorClass ).addClass( validClass );\n\t\t\t}\n\t\t}\n\t},\n\n\t// https://jqueryvalidation.org/jQuery.validator.setDefaults/\n\tsetDefaults: function( settings ) {\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: \"This field is required.\",\n\t\tremote: \"Please fix this field.\",\n\t\temail: \"Please enter a valid email address.\",\n\t\turl: \"Please enter a valid URL.\",\n\t\tdate: \"Please enter a valid date.\",\n\t\tdateISO: \"Please enter a valid date (ISO).\",\n\t\tnumber: \"Please enter a valid number.\",\n\t\tdigits: \"Please enter only digits.\",\n\t\tequalTo: \"Please enter the same value again.\",\n\t\tmaxlength: $.validator.format( \"Please enter no more than {0} characters.\" ),\n\t\tminlength: $.validator.format( \"Please enter at least {0} characters.\" ),\n\t\trangelength: $.validator.format( \"Please enter a value between {0} and {1} characters long.\" ),\n\t\trange: $.validator.format( \"Please enter a value between {0} and {1}.\" ),\n\t\tmax: $.validator.format( \"Please enter a value less than or equal to {0}.\" ),\n\t\tmin: $.validator.format( \"Please enter a value greater than or equal to {0}.\" ),\n\t\tstep: $.validator.format( \"Please enter a multiple of {0}.\" )\n\t},\n\n\tautoCreateRanges: false,\n\n\tprototype: {\n\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $( this.settings.errorLabelContainer );\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );\n\t\t\tthis.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\n\t\t\tvar currentForm = this.currentForm,\n\t\t\t\tgroups = ( this.groups = {} ),\n\t\t\t\trules;\n\t\t\t$.each( this.settings.groups, function( key, value ) {\n\t\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\t\tvalue = value.split( /\\s/ );\n\t\t\t\t}\n\t\t\t\t$.each( value, function( index, name ) {\n\t\t\t\t\tgroups[ name ] = key;\n\t\t\t\t} );\n\t\t\t} );\n\t\t\trules = this.settings.rules;\n\t\t\t$.each( rules, function( key, value ) {\n\t\t\t\trules[ key ] = $.validator.normalizeRule( value );\n\t\t\t} );\n\n\t\t\tfunction delegate( event ) {\n\t\t\t\tvar isContentEditable = typeof $( this ).attr( \"contenteditable\" ) !== \"undefined\" && $( this ).attr( \"contenteditable\" ) !== \"false\";\n\n\t\t\t\t// Set form expando on contenteditable\n\t\t\t\tif ( !this.form && isContentEditable ) {\n\t\t\t\t\tthis.form = $( this ).closest( \"form\" )[ 0 ];\n\t\t\t\t\tthis.name = $( this ).attr( \"name\" );\n\t\t\t\t}\n\n\t\t\t\t// Ignore the element if it belongs to another form. This will happen mainly\n\t\t\t\t// when setting the `form` attribute of an input to the id of another form.\n\t\t\t\tif ( currentForm !== this.form ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar validator = $.data( this.form, \"validator\" ),\n\t\t\t\t\teventType = \"on\" + event.type.replace( /^validate/, \"\" ),\n\t\t\t\t\tsettings = validator.settings;\n\t\t\t\tif ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) {\n\t\t\t\t\tsettings[ eventType ].call( validator, this, event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.on( \"focusin.validate focusout.validate keyup.validate\",\n\t\t\t\t\t\":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], \" +\n\t\t\t\t\t\"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n\t\t\t\t\t\"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], \" +\n\t\t\t\t\t\"[type='radio'], [type='checkbox'], [contenteditable], [type='button']\", delegate )\n\n\t\t\t\t// Support: Chrome, oldIE\n\t\t\t\t// \"select\" is provided as event.target when clicking a option\n\t\t\t\t.on( \"click.validate\", \"select, option, [type='radio'], [type='checkbox']\", delegate );\n\n\t\t\tif ( this.settings.invalidHandler ) {\n\t\t\t\t$( this.currentForm ).on( \"invalid-form.validate\", this.settings.invalidHandler );\n\t\t\t}\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.form/\n\t\tform: function() {\n\t\t\tthis.checkForm();\n\t\t\t$.extend( this.submitted, this.errorMap );\n\t\t\tthis.invalid = $.extend( {}, this.errorMap );\n\t\t\tif ( !this.valid() ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ] );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {\n\t\t\t\tthis.check( elements[ i ] );\n\t\t\t}\n\t\t\treturn this.valid();\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.element/\n\t\telement: function( element ) {\n\t\t\tvar cleanElement = this.clean( element ),\n\t\t\t\tcheckElement = this.validationTargetFor( cleanElement ),\n\t\t\t\tv = this,\n\t\t\t\tresult = true,\n\t\t\t\trs, group;\n\n\t\t\tif ( checkElement === undefined ) {\n\t\t\t\tdelete this.invalid[ cleanElement.name ];\n\t\t\t} else {\n\t\t\t\tthis.prepareElement( checkElement );\n\t\t\t\tthis.currentElements = $( checkElement );\n\n\t\t\t\t// If this element is grouped, then validate all group elements already\n\t\t\t\t// containing a value\n\t\t\t\tgroup = this.groups[ checkElement.name ];\n\t\t\t\tif ( group ) {\n\t\t\t\t\t$.each( this.groups, function( name, testgroup ) {\n\t\t\t\t\t\tif ( testgroup === group && name !== checkElement.name ) {\n\t\t\t\t\t\t\tcleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );\n\t\t\t\t\t\t\tif ( cleanElement && cleanElement.name in v.invalid ) {\n\t\t\t\t\t\t\t\tv.currentElements.push( cleanElement );\n\t\t\t\t\t\t\t\tresult = v.check( cleanElement ) && result;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\trs = this.check( checkElement ) !== false;\n\t\t\t\tresult = result && rs;\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tthis.invalid[ checkElement.name ] = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.invalid[ checkElement.name ] = true;\n\t\t\t\t}\n\n\t\t\t\tif ( !this.numberOfInvalids() ) {\n\n\t\t\t\t\t// Hide error containers on last error\n\t\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t\t}\n\t\t\t\tthis.showErrors();\n\n\t\t\t\t// Add aria-invalid status for screen readers\n\t\t\t\t$( element ).attr( \"aria-invalid\", !rs );\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.showErrors/\n\t\tshowErrors: function( errors ) {\n\t\t\tif ( errors ) {\n\t\t\t\tvar validator = this;\n\n\t\t\t\t// Add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = $.map( this.errorMap, function( message, name ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\telement: validator.findByName( name )[ 0 ]\n\t\t\t\t\t};\n\t\t\t\t} );\n\n\t\t\t\t// Remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function( element ) {\n\t\t\t\t\treturn !( element.name in errors );\n\t\t\t\t} );\n\t\t\t}\n\t\t\tif ( this.settings.showErrors ) {\n\t\t\t\tthis.settings.showErrors.call( this, this.errorMap, this.errorList );\n\t\t\t} else {\n\t\t\t\tthis.defaultShowErrors();\n\t\t\t}\n\t\t},\n\n\t\t// https://jqueryvalidation.org/Validator.resetForm/\n\t\tresetForm: function() {\n\t\t\tif ( $.fn.resetForm ) {\n\t\t\t\t$( this.currentForm ).resetForm();\n\t\t\t}\n\t\t\tthis.invalid = {};\n\t\t\tthis.submitted = {};\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tvar elements = this.elements()\n\t\t\t\t.removeData( \"previousValue\" )\n\t\t\t\t.removeAttr( \"aria-invalid\" );\n\n\t\t\tthis.resetElements( elements );\n\t\t},\n\n\t\tresetElements: function( elements ) {\n\t\t\tvar i;\n\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0; elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ],\n\t\t\t\t\t\tthis.settings.errorClass, \"\" );\n\t\t\t\t\tthis.findByName( elements[ i ].name ).removeClass( this.settings.validClass );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telements\n\t\t\t\t\t.removeClass( this.settings.errorClass )\n\t\t\t\t\t.removeClass( this.settings.validClass );\n\t\t\t}\n\t\t},\n\n\t\tnumberOfInvalids: function() {\n\t\t\treturn this.objectLength( this.invalid );\n\t\t},\n\n\t\tobjectLength: function( obj ) {\n\t\t\t/* jshint unused: false */\n\t\t\tvar count = 0,\n\t\t\t\ti;\n\t\t\tfor ( i in obj ) {\n\n\t\t\t\t// This check allows counting elements with empty error\n\t\t\t\t// message as invalid elements\n\t\t\t\tif ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\thideErrors: function() {\n\t\t\tthis.hideThese( this.toHide );\n\t\t},\n\n\t\thideThese: function( errors ) {\n\t\t\terrors.not( this.containers ).text( \"\" );\n\t\t\tthis.addWrapper( errors ).hide();\n\t\t},\n\n\t\tvalid: function() {\n\t\t\treturn this.size() === 0;\n\t\t},\n\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\n\t\tfocusInvalid: function() {\n\t\t\tif ( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )\n\t\t\t\t\t.filter( \":visible\" )\n\t\t\t\t\t.trigger( \"focus\" )\n\n\t\t\t\t\t// Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n\t\t\t\t\t.trigger( \"focusin\" );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// Ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep( this.errorList, function( n ) {\n\t\t\t\treturn n.element.name === lastActive.name;\n\t\t\t} ).length === 1 && lastActive;\n\t\t},\n\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\n\t\t\t// Select all valid inputs inside the form (no submit or reset buttons)\n\t\t\treturn $( this.currentForm )\n\t\t\t.find( \"input, select, textarea, [contenteditable]\" )\n\t\t\t.not( \":submit, :reset, :image, :disabled\" )\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter( function() {\n\t\t\t\tvar name = this.name || $( this ).attr( \"name\" ); // For contenteditable\n\t\t\t\tvar isContentEditable = typeof $( this ).attr( \"contenteditable\" ) !== \"undefined\" && $( this ).attr( \"contenteditable\" ) !== \"false\";\n\n\t\t\t\tif ( !name && validator.settings.debug && window.console ) {\n\t\t\t\t\tconsole.error( \"%o has no name assigned\", this );\n\t\t\t\t}\n\n\t\t\t\t// Set form expando on contenteditable\n\t\t\t\tif ( isContentEditable ) {\n\t\t\t\t\tthis.form = $( this ).closest( \"form\" )[ 0 ];\n\t\t\t\t\tthis.name = name;\n\t\t\t\t}\n\n\t\t\t\t// Ignore elements that belong to other/nested forms\n\t\t\t\tif ( this.form !== validator.currentForm ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\trulesCache[ name ] = true;\n\t\t\t\treturn true;\n\t\t\t} );\n\t\t},\n\n\t\tclean: function( selector ) {\n\t\t\treturn $( selector )[ 0 ];\n\t\t},\n\n\t\terrors: function() {\n\t\t\tvar errorClass = this.settings.errorClass.split( \" \" ).join( \".\" );\n\t\t\treturn $( this.settings.errorElement + \".\" + errorClass, this.errorContext );\n\t\t},\n\n\t\tresetInternals: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $( [] );\n\t\t\tthis.toHide = $( [] );\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.resetInternals();\n\t\t\tthis.currentElements = $( [] );\n\t\t},\n\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor( element );\n\t\t},\n\n\t\telementValue: function( element ) {\n\t\t\tvar $element = $( element ),\n\t\t\t\ttype = element.type,\n\t\t\t\tisContentEditable = typeof $element.attr( \"contenteditable\" ) !== \"undefined\" && $element.attr( \"contenteditable\" ) !== \"false\",\n\t\t\t\tval, idx;\n\n\t\t\tif ( type === \"radio\" || type === \"checkbox\" ) {\n\t\t\t\treturn this.findByName( element.name ).filter( \":checked\" ).val();\n\t\t\t} else if ( type === \"number\" && typeof element.validity !== \"undefined\" ) {\n\t\t\t\treturn element.validity.badInput ? \"NaN\" : $element.val();\n\t\t\t}\n\n\t\t\tif ( isContentEditable ) {\n\t\t\t\tval = $element.text();\n\t\t\t} else {\n\t\t\t\tval = $element.val();\n\t\t\t}\n\n\t\t\tif ( type === \"file\" ) {\n\n\t\t\t\t// Modern browser (chrome & safari)\n\t\t\t\tif ( val.substr( 0, 12 ) === \"C:\\\\fakepath\\\\\" ) {\n\t\t\t\t\treturn val.substr( 12 );\n\t\t\t\t}\n\n\t\t\t\t// Legacy browsers\n\t\t\t\t// Unix-based path\n\t\t\t\tidx = val.lastIndexOf( \"/\" );\n\t\t\t\tif ( idx >= 0 ) {\n\t\t\t\t\treturn val.substr( idx + 1 );\n\t\t\t\t}\n\n\t\t\t\t// Windows-based path\n\t\t\t\tidx = val.lastIndexOf( \"\\\\\" );\n\t\t\t\tif ( idx >= 0 ) {\n\t\t\t\t\treturn val.substr( idx + 1 );\n\t\t\t\t}\n\n\t\t\t\t// Just the file name\n\t\t\t\treturn val;\n\t\t\t}\n\n\t\t\tif ( typeof val === \"string\" ) {\n\t\t\t\treturn val.replace( /\\r/g, \"\" );\n\t\t\t}\n\t\t\treturn val;\n\t\t},\n\n\t\tcheck: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\n\t\t\tvar rules = $( element ).rules(),\n\t\t\t\trulesCount = $.map( rules, function( n, i ) {\n\t\t\t\t\treturn i;\n\t\t\t\t} ).length,\n\t\t\t\tdependencyMismatch = false,\n\t\t\t\tval = this.elementValue( element ),\n\t\t\t\tresult, method, rule, normalizer;\n\n\t\t\t// Prioritize the local normalizer defined for this element over the global one\n\t\t\t// if the former exists, otherwise user the global one in case it exists.\n\t\t\tif ( typeof rules.normalizer === \"function\" ) {\n\t\t\t\tnormalizer = rules.normalizer;\n\t\t\t} else if (\ttypeof this.settings.normalizer === \"function\" ) {\n\t\t\t\tnormalizer = this.settings.normalizer;\n\t\t\t}\n\n\t\t\t// If normalizer is defined, then call it to retreive the changed value instead\n\t\t\t// of using the real one.\n\t\t\t// Note that `this` in the normalizer is `element`.\n\t\t\tif ( normalizer ) {\n\t\t\t\tval = normalizer.call( element, val );\n\n\t\t\t\t// Delete the normalizer from rules to avoid treating it as a pre-defined method.\n\t\t\t\tdelete rules.normalizer;\n\t\t\t}\n\n\t\t\tfor ( method in rules ) {\n\t\t\t\trule = { method: method, parameters: rules[ method ] };\n\t\t\t\ttry {\n\t\t\t\t\tresult = $.validator.methods[ method ].call( this, val, element, rule.parameters );\n\n\t\t\t\t\t// If a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don't mark it as valid when there are no other rules\n\t\t\t\t\tif ( result === \"dependency-mismatch\" && rulesCount === 1 ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\n\t\t\t\t\tif ( result === \"pending\" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor( element ) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\n\t\t\t\t\t\tconsole.log( \"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e );\n\t\t\t\t\t}\n\t\t\t\t\tif ( e instanceof TypeError ) {\n\t\t\t\t\t\te.message += \".  Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\";\n\t\t\t\t\t}\n\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( dependencyMismatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.objectLength( rules ) ) {\n\t\t\t\tthis.successList.push( element );\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t// Return the custom message for the given element and validation method\n\t\t// specified in the element's HTML5 data attribute\n\t\t// return the generic message if present and no method specific message is present\n\t\tcustomDataMessage: function( element, method ) {\n\t\t\treturn $( element ).data( \"msg\" + method.charAt( 0 ).toUpperCase() +\n\t\t\t\tmethod.substring( 1 ).toLowerCase() ) || $( element ).data( \"msg\" );\n\t\t},\n\n\t\t// Return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[ name ];\n\t\t\treturn m && ( m.constructor === String ? m : m[ method ] );\n\t\t},\n\n\t\t// Return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor ( var i = 0; i < arguments.length; i++ ) {\n\t\t\t\tif ( arguments[ i ] !== undefined ) {\n\t\t\t\t\treturn arguments[ i ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\n\t\t// The second parameter 'rule' used to be a string, and extended to an object literal\n\t\t// of the following form:\n\t\t// rule = {\n\t\t//     method: \"method name\",\n\t\t//     parameters: \"the given method parameters\"\n\t\t// }\n\t\t//\n\t\t// The old behavior still supported, kept to maintain backward compatibility with\n\t\t// old code, and will be removed in the next major release.\n\t\tdefaultMessage: function( element, rule ) {\n\t\t\tif ( typeof rule === \"string\" ) {\n\t\t\t\trule = { method: rule };\n\t\t\t}\n\n\t\t\tvar message = this.findDefined(\n\t\t\t\t\tthis.customMessage( element.name, rule.method ),\n\t\t\t\t\tthis.customDataMessage( element, rule.method ),\n\n\t\t\t\t\t// 'title' is never undefined, so handle empty string as undefined\n\t\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t\t$.validator.messages[ rule.method ],\n\t\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n\t\t\t\t),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message === \"function\" ) {\n\t\t\t\tmessage = message.call( this, rule.parameters, element );\n\t\t\t} else if ( theregex.test( message ) ) {\n\t\t\t\tmessage = $.validator.format( message.replace( theregex, \"{$1}\" ), rule.parameters );\n\t\t\t}\n\n\t\t\treturn message;\n\t\t},\n\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule );\n\n\t\t\tthis.errorList.push( {\n\t\t\t\tmessage: message,\n\t\t\t\telement: element,\n\t\t\t\tmethod: rule.method\n\t\t\t} );\n\n\t\t\tthis.errorMap[ element.name ] = message;\n\t\t\tthis.submitted[ element.name ] = message;\n\t\t},\n\n\t\taddWrapper: function( toToggle ) {\n\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\t}\n\t\t\treturn toToggle;\n\t\t},\n\n\t\tdefaultShowErrors: function() {\n\t\t\tvar i, elements, error;\n\t\t\tfor ( i = 0; this.errorList[ i ]; i++ ) {\n\t\t\t\terror = this.errorList[ i ];\n\t\t\t\tif ( this.settings.highlight ) {\n\t\t\t\t\tthis.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif ( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif ( this.settings.success ) {\n\t\t\t\tfor ( i = 0; this.successList[ i ]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not( this.invalidElements() );\n\t\t},\n\n\t\tinvalidElements: function() {\n\t\t\treturn $( this.errorList ).map( function() {\n\t\t\t\treturn this.element;\n\t\t\t} );\n\t\t},\n\n\t\tshowLabel: function( element, message ) {\n\t\t\tvar place, group, errorID, v,\n\t\t\t\terror = this.errorsFor( element ),\n\t\t\t\telementID = this.idOrName( element ),\n\t\t\t\tdescribedBy = $( element ).attr( \"aria-describedby\" );\n\n\t\t\tif ( error.length ) {\n\n\t\t\t\t// Refresh error/success class\n\t\t\t\terror.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\n\t\t\t\t// Replace message on existing label\n\t\t\t\terror.html( message );\n\t\t\t} else {\n\n\t\t\t\t// Create error element\n\t\t\t\terror = $( \"<\" + this.settings.errorElement + \">\" )\n\t\t\t\t\t.attr( \"id\", elementID + \"-error\" )\n\t\t\t\t\t.addClass( this.settings.errorClass )\n\t\t\t\t\t.html( message || \"\" );\n\n\t\t\t\t// Maintain reference to the element to be placed into the DOM\n\t\t\t\tplace = error;\n\t\t\t\tif ( this.settings.wrapper ) {\n\n\t\t\t\t\t// Make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tplace = error.hide().show().wrap( \"<\" + this.settings.wrapper + \"/>\" ).parent();\n\t\t\t\t}\n\t\t\t\tif ( this.labelContainer.length ) {\n\t\t\t\t\tthis.labelContainer.append( place );\n\t\t\t\t} else if ( this.settings.errorPlacement ) {\n\t\t\t\t\tthis.settings.errorPlacement.call( this, place, $( element ) );\n\t\t\t\t} else {\n\t\t\t\t\tplace.insertAfter( element );\n\t\t\t\t}\n\n\t\t\t\t// Link error back to the element\n\t\t\t\tif ( error.is( \"label\" ) ) {\n\n\t\t\t\t\t// If the error is a label, then associate using 'for'\n\t\t\t\t\terror.attr( \"for\", elementID );\n\n\t\t\t\t\t// If the element is not a child of an associated label, then it's necessary\n\t\t\t\t\t// to explicitly apply aria-describedby\n\t\t\t\t} else if ( error.parents( \"label[for='\" + this.escapeCssMeta( elementID ) + \"']\" ).length === 0 ) {\n\t\t\t\t\terrorID = error.attr( \"id\" );\n\n\t\t\t\t\t// Respect existing non-error aria-describedby\n\t\t\t\t\tif ( !describedBy ) {\n\t\t\t\t\t\tdescribedBy = errorID;\n\t\t\t\t\t} else if ( !describedBy.match( new RegExp( \"\\\\b\" + this.escapeCssMeta( errorID ) + \"\\\\b\" ) ) ) {\n\n\t\t\t\t\t\t// Add to end of list if not already present\n\t\t\t\t\t\tdescribedBy += \" \" + errorID;\n\t\t\t\t\t}\n\t\t\t\t\t$( element ).attr( \"aria-describedby\", describedBy );\n\n\t\t\t\t\t// If this element is grouped, then assign to all elements in the same group\n\t\t\t\t\tgroup = this.groups[ element.name ];\n\t\t\t\t\tif ( group ) {\n\t\t\t\t\t\tv = this;\n\t\t\t\t\t\t$.each( v.groups, function( name, testgroup ) {\n\t\t\t\t\t\t\tif ( testgroup === group ) {\n\t\t\t\t\t\t\t\t$( \"[name='\" + v.escapeCssMeta( name ) + \"']\", v.currentForm )\n\t\t\t\t\t\t\t\t\t.attr( \"aria-describedby\", error.attr( \"id\" ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\terror.text( \"\" );\n\t\t\t\tif ( typeof this.settings.success === \"string\" ) {\n\t\t\t\t\terror.addClass( this.settings.success );\n\t\t\t\t} else {\n\t\t\t\t\tthis.settings.success( error, element );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add( error );\n\t\t},\n\n\t\terrorsFor: function( element ) {\n\t\t\tvar name = this.escapeCssMeta( this.idOrName( element ) ),\n\t\t\t\tdescriber = $( element ).attr( \"aria-describedby\" ),\n\t\t\t\tselector = \"label[for='\" + name + \"'], label[for='\" + name + \"'] *\";\n\n\t\t\t// 'aria-describedby' should directly reference the error element\n\t\t\tif ( describer ) {\n\t\t\t\tselector = selector + \", #\" + this.escapeCssMeta( describer )\n\t\t\t\t\t.replace( /\\s+/g, \", #\" );\n\t\t\t}\n\n\t\t\treturn this\n\t\t\t\t.errors()\n\t\t\t\t.filter( selector );\n\t\t},\n\n\t\t// See https://api.jquery.com/category/selectors/, for CSS\n\t\t// meta-characters that should be escaped in order to be used with JQuery\n\t\t// as a literal part of a name/id or any selector.\n\t\tescapeCssMeta: function( string ) {\n\t\t\tif ( string === undefined ) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t\treturn string.replace( /([\\\\!\"#$%&'()*+,./:;<=>?@\\[\\]^`{|}~])/g, \"\\\\$1\" );\n\t\t},\n\n\t\tidOrName: function( element ) {\n\t\t\treturn this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );\n\t\t},\n\n\t\tvalidationTargetFor: function( element ) {\n\n\t\t\t// If radio/checkbox, validate first element in group instead\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\telement = this.findByName( element.name );\n\t\t\t}\n\n\t\t\t// Always apply ignore filter\n\t\t\treturn $( element ).not( this.settings.ignore )[ 0 ];\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn ( /radio|checkbox/i ).test( element.type );\n\t\t},\n\n\t\tfindByName: function( name ) {\n\t\t\treturn $( this.currentForm ).find( \"[name='\" + this.escapeCssMeta( name ) + \"']\" );\n\t\t},\n\n\t\tgetLength: function( value, element ) {\n\t\t\tswitch ( element.nodeName.toLowerCase() ) {\n\t\t\tcase \"select\":\n\t\t\t\treturn $( \"option:selected\", element ).length;\n\t\t\tcase \"input\":\n\t\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\t\treturn this.findByName( element.name ).filter( \":checked\" ).length;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\n\t\tdepend: function( param, element ) {\n\t\t\treturn this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;\n\t\t},\n\n\t\tdependTypes: {\n\t\t\t\"boolean\": function( param ) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t\"string\": function( param, element ) {\n\t\t\t\treturn !!$( param, element.form ).length;\n\t\t\t},\n\t\t\t\"function\": function( param, element ) {\n\t\t\t\treturn param( element );\n\t\t\t}\n\t\t},\n\n\t\toptional: function( element ) {\n\t\t\tvar val = this.elementValue( element );\n\t\t\treturn !$.validator.methods.required.call( this, val, element ) && \"dependency-mismatch\";\n\t\t},\n\n\t\tstartRequest: function( element ) {\n\t\t\tif ( !this.pending[ element.name ] ) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\t$( element ).addClass( this.settings.pendingClass );\n\t\t\t\tthis.pending[ element.name ] = true;\n\t\t\t}\n\t\t},\n\n\t\tstopRequest: function( element, valid ) {\n\t\t\tthis.pendingRequest--;\n\n\t\t\t// Sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif ( this.pendingRequest < 0 ) {\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\t}\n\t\t\tdelete this.pending[ element.name ];\n\t\t\t$( element ).removeClass( this.settings.pendingClass );\n\t\t\tif ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {\n\t\t\t\t$( this.currentForm ).trigger( \"submit\" );\n\n\t\t\t\t// Remove the hidden input that was used as a replacement for the\n\t\t\t\t// missing submit button. The hidden input is added by `handle()`\n\t\t\t\t// to ensure that the value of the used submit button is passed on\n\t\t\t\t// for scripted submits triggered by this method\n\t\t\t\tif ( this.submitButton ) {\n\t\t\t\t\t$( \"input:hidden[name='\" + this.submitButton.name + \"']\", this.currentForm ).remove();\n\t\t\t\t}\n\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ] );\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\n\t\tpreviousValue: function( element, method ) {\n\t\t\tmethod = typeof method === \"string\" && method || \"remote\";\n\n\t\t\treturn $.data( element, \"previousValue\" ) || $.data( element, \"previousValue\", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, { method: method } )\n\t\t\t} );\n\t\t},\n\n\t\t// Cleans up all forms and elements, removes validator-specific events\n\t\tdestroy: function() {\n\t\t\tthis.resetForm();\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.off( \".validate\" )\n\t\t\t\t.removeData( \"validator\" )\n\t\t\t\t.find( \".validate-equalTo-blur\" )\n\t\t\t\t\t.off( \".validate-equalTo\" )\n\t\t\t\t\t.removeClass( \"validate-equalTo-blur\" )\n\t\t\t\t.find( \".validate-lessThan-blur\" )\n\t\t\t\t\t.off( \".validate-lessThan\" )\n\t\t\t\t\t.removeClass( \"validate-lessThan-blur\" )\n\t\t\t\t.find( \".validate-lessThanEqual-blur\" )\n\t\t\t\t\t.off( \".validate-lessThanEqual\" )\n\t\t\t\t\t.removeClass( \"validate-lessThanEqual-blur\" )\n\t\t\t\t.find( \".validate-greaterThanEqual-blur\" )\n\t\t\t\t\t.off( \".validate-greaterThanEqual\" )\n\t\t\t\t\t.removeClass( \"validate-greaterThanEqual-blur\" )\n\t\t\t\t.find( \".validate-greaterThan-blur\" )\n\t\t\t\t\t.off( \".validate-greaterThan\" )\n\t\t\t\t\t.removeClass( \"validate-greaterThan-blur\" );\n\t\t}\n\n\t},\n\n\tclassRuleSettings: {\n\t\trequired: { required: true },\n\t\temail: { email: true },\n\t\turl: { url: true },\n\t\tdate: { date: true },\n\t\tdateISO: { dateISO: true },\n\t\tnumber: { number: true },\n\t\tdigits: { digits: true },\n\t\tcreditcard: { creditcard: true }\n\t},\n\n\taddClassRules: function( className, rules ) {\n\t\tif ( className.constructor === String ) {\n\t\t\tthis.classRuleSettings[ className ] = rules;\n\t\t} else {\n\t\t\t$.extend( this.classRuleSettings, className );\n\t\t}\n\t},\n\n\tclassRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tclasses = $( element ).attr( \"class\" );\n\n\t\tif ( classes ) {\n\t\t\t$.each( classes.split( \" \" ), function() {\n\t\t\t\tif ( this in $.validator.classRuleSettings ) {\n\t\t\t\t\t$.extend( rules, $.validator.classRuleSettings[ this ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeAttributeRule: function( rules, type, method, value ) {\n\n\t\t// Convert the value to a number for number inputs, and for text for backwards compability\n\t\t// allows type=\"date\" and others to be compared as strings\n\t\tif ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n\t\t\tvalue = Number( value );\n\n\t\t\t// Support Opera Mini, which returns NaN for undefined minlength\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\tvalue = undefined;\n\t\t\t}\n\t\t}\n\n\t\tif ( value || value === 0 ) {\n\t\t\trules[ method ] = value;\n\t\t} else if ( type === method && type !== \"range\" ) {\n\n\t\t\t// Exception: the jquery validate 'range' method\n\t\t\t// does not test for the html5 'range' type\n\t\t\trules[ type === \"date\" ? \"dateISO\" : method ] = true;\n\t\t}\n\t},\n\n\tattributeRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( \"type\" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\n\t\t\t// Support for <input required> in both html5 and older browsers\n\t\t\tif ( method === \"required\" ) {\n\t\t\t\tvalue = element.getAttribute( method );\n\n\t\t\t\t// Some browsers return an empty string for the required attribute\n\t\t\t\t// and non-HTML5 browsers might have required=\"\" markup\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\tvalue = true;\n\t\t\t\t}\n\n\t\t\t\t// Force non-HTML5 browsers to return bool\n\t\t\t\tvalue = !!value;\n\t\t\t} else {\n\t\t\t\tvalue = $element.attr( method );\n\t\t\t}\n\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\n\t\t// 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs\n\t\tif ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\tdataRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( \"type\" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\t\t\tvalue = $element.data( \"rule\" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );\n\n\t\t\t// Cast empty attributes like `data-rule-required` to `true`\n\t\t\tif ( value === \"\" ) {\n\t\t\t\tvalue = true;\n\t\t\t}\n\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\t\treturn rules;\n\t},\n\n\tstaticRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tvalidator = $.data( element.form, \"validator\" );\n\n\t\tif ( validator.settings.rules ) {\n\t\t\trules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeRules: function( rules, element ) {\n\n\t\t// Handle dependency check\n\t\t$.each( rules, function( prop, val ) {\n\n\t\t\t// Ignore rule when param is explicitly false, eg. required:false\n\t\t\tif ( val === false ) {\n\t\t\t\tdelete rules[ prop ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( val.param || val.depends ) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch ( typeof val.depends ) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tkeepRule = !!$( val.depends, element.form ).length;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"function\":\n\t\t\t\t\tkeepRule = val.depends.call( element, element );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( keepRule ) {\n\t\t\t\t\trules[ prop ] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\t$.data( element.form, \"validator\" ).resetElements( $( element ) );\n\t\t\t\t\tdelete rules[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Evaluate parameters\n\t\t$.each( rules, function( rule, parameter ) {\n\t\t\trules[ rule ] = typeof parameter === \"function\" && rule !== \"normalizer\" ? parameter( element ) : parameter;\n\t\t} );\n\n\t\t// Clean number parameters\n\t\t$.each( [ \"minlength\", \"maxlength\" ], function() {\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\trules[ this ] = Number( rules[ this ] );\n\t\t\t}\n\t\t} );\n\t\t$.each( [ \"rangelength\", \"range\" ], function() {\n\t\t\tvar parts;\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\tif ( Array.isArray( rules[ this ] ) ) {\n\t\t\t\t\trules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];\n\t\t\t\t} else if ( typeof rules[ this ] === \"string\" ) {\n\t\t\t\t\tparts = rules[ this ].replace( /[\\[\\]]/g, \"\" ).split( /[\\s,]+/ );\n\t\t\t\t\trules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tif ( $.validator.autoCreateRanges ) {\n\n\t\t\t// Auto-create ranges\n\t\t\tif ( rules.min != null && rules.max != null ) {\n\t\t\t\trules.range = [ rules.min, rules.max ];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif ( rules.minlength != null && rules.maxlength != null ) {\n\t\t\t\trules.rangelength = [ rules.minlength, rules.maxlength ];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n\tnormalizeRule: function( data ) {\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each( data.split( /\\s/ ), function() {\n\t\t\t\ttransformed[ this ] = true;\n\t\t\t} );\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\n\t// https://jqueryvalidation.org/jQuery.validator.addMethod/\n\taddMethod: function( name, method, message ) {\n\t\t$.validator.methods[ name ] = method;\n\t\t$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];\n\t\tif ( method.length < 3 ) {\n\t\t\t$.validator.addClassRules( name, $.validator.normalizeRule( name ) );\n\t\t}\n\t},\n\n\t// https://jqueryvalidation.org/jQuery.validator.methods/\n\tmethods: {\n\n\t\t// https://jqueryvalidation.org/required-method/\n\t\trequired: function( value, element, param ) {\n\n\t\t\t// Check if dependency is met\n\t\t\tif ( !this.depend( param, element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\tif ( element.nodeName.toLowerCase() === \"select\" ) {\n\n\t\t\t\t// Could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $( element ).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\t}\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\treturn this.getLength( value, element ) > 0;\n\t\t\t}\n\t\t\treturn value !== undefined && value !== null && value.length > 0;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/email-method/\n\t\temail: function( value, element ) {\n\n\t\t\t// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\n\t\t\t// Retrieved 2014-01-14\n\t\t\t// If you have a problem with this implementation, report a bug against the above spec\n\t\t\t// Or use custom methods to implement your own email validation\n\t\t\treturn this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/url-method/\n\t\turl: function( value, element ) {\n\n\t\t\t// Copyright (c) 2010-2013 Diego Perini, MIT licensed\n\t\t\t// https://gist.github.com/dperini/729294\n\t\t\t// see also https://mathiasbynens.be/demo/url-regex\n\t\t\t// modified to allow protocol-relative URLs\n\t\t\treturn this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:(?:[^\\]\\[?\\/<~#`!@$^&*()+=}|:\";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\\]\\[?\\/<~#`!@$^&*()+=}|:\";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/date-method/\n\t\tdate: ( function() {\n\t\t\tvar called = false;\n\n\t\t\treturn function( value, element ) {\n\t\t\t\tif ( !called ) {\n\t\t\t\t\tcalled = true;\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"The `date` method is deprecated and will be removed in version '2.0.0'.\\n\" +\n\t\t\t\t\t\t\t\"Please don't use it, since it relies on the Date constructor, which\\n\" +\n\t\t\t\t\t\t\t\"behaves very differently across browsers and locales. Use `dateISO`\\n\" +\n\t\t\t\t\t\t\t\"instead or one of the locale specific methods in `localizations/`\\n\" +\n\t\t\t\t\t\t\t\"and `additional-methods.js`.\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );\n\t\t\t};\n\t\t}() ),\n\n\t\t// https://jqueryvalidation.org/dateISO-method/\n\t\tdateISO: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/number-method/\n\t\tnumber: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/digits-method/\n\t\tdigits: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d+$/.test( value );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/minlength-method/\n\t\tminlength: function( value, element, param ) {\n\t\t\tvar length = Array.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length >= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/maxlength-method/\n\t\tmaxlength: function( value, element, param ) {\n\t\t\tvar length = Array.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length <= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/rangelength-method/\n\t\trangelength: function( value, element, param ) {\n\t\t\tvar length = Array.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/min-method/\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value >= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/max-method/\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value <= param;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/range-method/\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );\n\t\t},\n\n\t\t// https://jqueryvalidation.org/step-method/\n\t\tstep: function( value, element, param ) {\n\t\t\tvar type = $( element ).attr( \"type\" ),\n\t\t\t\terrorMessage = \"Step attribute on input type \" + type + \" is not supported.\",\n\t\t\t\tsupportedTypes = [ \"text\", \"number\", \"range\" ],\n\t\t\t\tre = new RegExp( \"\\\\b\" + type + \"\\\\b\" ),\n\t\t\t\tnotSupported = type && !re.test( supportedTypes.join() ),\n\t\t\t\tdecimalPlaces = function( num ) {\n\t\t\t\t\tvar match = ( \"\" + num ).match( /(?:\\.(\\d+))?$/ );\n\t\t\t\t\tif ( !match ) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Number of digits right of decimal point.\n\t\t\t\t\treturn match[ 1 ] ? match[ 1 ].length : 0;\n\t\t\t\t},\n\t\t\t\ttoInt = function( num ) {\n\t\t\t\t\treturn Math.round( num * Math.pow( 10, decimals ) );\n\t\t\t\t},\n\t\t\t\tvalid = true,\n\t\t\t\tdecimals;\n\n\t\t\t// Works only for text, number and range input types\n\t\t\t// TODO find a way to support input types date, datetime, datetime-local, month, time and week\n\t\t\tif ( notSupported ) {\n\t\t\t\tthrow new Error( errorMessage );\n\t\t\t}\n\n\t\t\tdecimals = decimalPlaces( param );\n\n\t\t\t// Value can't have too many decimals\n\t\t\tif ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {\n\t\t\t\tvalid = false;\n\t\t\t}\n\n\t\t\treturn this.optional( element ) || valid;\n\t\t},\n\n\t\t// https://jqueryvalidation.org/equalTo-method/\n\t\tequalTo: function( value, element, param ) {\n\n\t\t\t// Bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\tvar target = $( param );\n\t\t\tif ( this.settings.onfocusout && target.not( \".validate-equalTo-blur\" ).length ) {\n\t\t\t\ttarget.addClass( \"validate-equalTo-blur\" ).on( \"blur.validate-equalTo\", function() {\n\t\t\t\t\t$( element ).valid();\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn value === target.val();\n\t\t},\n\n\t\t// https://jqueryvalidation.org/remote-method/\n\t\tremote: function( value, element, param, method ) {\n\t\t\tif ( this.optional( element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\n\t\t\tmethod = typeof method === \"string\" && method || \"remote\";\n\n\t\t\tvar previous = this.previousValue( element, method ),\n\t\t\t\tvalidator, data, optionDataString;\n\n\t\t\tif ( !this.settings.messages[ element.name ] ) {\n\t\t\t\tthis.settings.messages[ element.name ] = {};\n\t\t\t}\n\t\t\tprevious.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];\n\t\t\tthis.settings.messages[ element.name ][ method ] = previous.message;\n\n\t\t\tparam = typeof param === \"string\" && { url: param } || param;\n\t\t\toptionDataString = $.param( $.extend( { data: value }, param.data ) );\n\t\t\tif ( previous.old === optionDataString ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = optionDataString;\n\t\t\tvalidator = this;\n\t\t\tthis.startRequest( element );\n\t\t\tdata = {};\n\t\t\tdata[ element.name ] = value;\n\t\t\t$.ajax( $.extend( true, {\n\t\t\t\tmode: \"abort\",\n\t\t\t\tport: \"validate\" + element.name,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tdata: data,\n\t\t\t\tcontext: validator.currentForm,\n\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\tvar valid = response === true || response === \"true\",\n\t\t\t\t\t\terrors, message, submitted;\n\n\t\t\t\t\tvalidator.settings.messages[ element.name ][ method ] = previous.originalMessage;\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tsubmitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.resetInternals();\n\t\t\t\t\t\tvalidator.toHide = validator.errorsFor( element );\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push( element );\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = false;\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors = {};\n\t\t\t\t\t\tmessage = response || validator.defaultMessage( element, { method: method, parameters: value } );\n\t\t\t\t\t\terrors[ element.name ] = previous.message = message;\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = true;\n\t\t\t\t\t\tvalidator.showErrors( errors );\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest( element, valid );\n\t\t\t\t}\n\t\t\t}, param ) );\n\t\t\treturn \"pending\";\n\t\t}\n\t}\n\n} );\n\n// Ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n\nvar pendingRequests = {},\n\tajax;\n\n// Use a prefilter if available (1.5+)\nif ( $.ajaxPrefilter ) {\n\t$.ajaxPrefilter( function( settings, _, xhr ) {\n\t\tvar port = settings.port;\n\t\tif ( settings.mode === \"abort\" ) {\n\t\t\tif ( pendingRequests[ port ] ) {\n\t\t\t\tpendingRequests[ port ].abort();\n\t\t\t}\n\t\t\tpendingRequests[ port ] = xhr;\n\t\t}\n\t} );\n} else {\n\n\t// Proxy ajax\n\tajax = $.ajax;\n\t$.ajax = function( settings ) {\n\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n\t\tif ( mode === \"abort\" ) {\n\t\t\tif ( pendingRequests[ port ] ) {\n\t\t\t\tpendingRequests[ port ].abort();\n\t\t\t}\n\t\t\tpendingRequests[ port ] = ajax.apply( this, arguments );\n\t\t\treturn pendingRequests[ port ];\n\t\t}\n\t\treturn ajax.apply( this, arguments );\n\t};\n}\nreturn $;\n}));","/*!\n * jQuery Browser Plugin 0.1.0\n * https://github.com/gabceb/jquery-browser-plugin\n *\n * Original jquery-browser code Copyright 2005, 2015 jQuery Foundation, Inc. and other contributors\n * http://jquery.org/license\n *\n * Modifications Copyright 2015 Gabriel Cebrian\n * https://github.com/gabceb\n *\n * Released under the MIT license\n *\n * Date: 05-07-2015\n */\n/*global window: false */\n\n(function (factory) {\n  if (typeof define === 'function' && define.amd) {\n    // AMD. Register as an anonymous module.\n    define(['jquery'], function ($) {\n      return factory($);\n    });\n  } else if (typeof module === 'object' && typeof module.exports === 'object') {\n    // Node-like environment\n    module.exports = factory(require('jquery'));\n  } else {\n    // Browser globals\n    factory(window.jQuery);\n  }\n}(function(jQuery) {\n  \"use strict\";\n\n  function uaMatch( ua ) {\n    // If an UA is not provided, default to the current browser UA.\n    if ( ua === undefined ) {\n      ua = window.navigator.userAgent;\n    }\n    ua = ua.toLowerCase();\n\n    var match = /(edge)\\/([\\w.]+)/.exec( ua ) ||\n        /(opr)[\\/]([\\w.]+)/.exec( ua ) ||\n        /(chrome)[ \\/]([\\w.]+)/.exec( ua ) ||\n        /(iemobile)[\\/]([\\w.]+)/.exec( ua ) ||\n        /(version)(applewebkit)[ \\/]([\\w.]+).*(safari)[ \\/]([\\w.]+)/.exec( ua ) ||\n        /(webkit)[ \\/]([\\w.]+).*(version)[ \\/]([\\w.]+).*(safari)[ \\/]([\\w.]+)/.exec( ua ) ||\n        /(webkit)[ \\/]([\\w.]+)/.exec( ua ) ||\n        /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec( ua ) ||\n        /(msie) ([\\w.]+)/.exec( ua ) ||\n        ua.indexOf(\"trident\") >= 0 && /(rv)(?::| )([\\w.]+)/.exec( ua ) ||\n        ua.indexOf(\"compatible\") < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec( ua ) ||\n        [];\n\n    var platform_match = /(ipad)/.exec( ua ) ||\n        /(ipod)/.exec( ua ) ||\n        /(windows phone)/.exec( ua ) ||\n        /(iphone)/.exec( ua ) ||\n        /(kindle)/.exec( ua ) ||\n        /(silk)/.exec( ua ) ||\n        /(android)/.exec( ua ) ||\n        /(win)/.exec( ua ) ||\n        /(mac)/.exec( ua ) ||\n        /(linux)/.exec( ua ) ||\n        /(cros)/.exec( ua ) ||\n        /(playbook)/.exec( ua ) ||\n        /(bb)/.exec( ua ) ||\n        /(blackberry)/.exec( ua ) ||\n        [];\n\n    var browser = {},\n        matched = {\n          browser: match[ 5 ] || match[ 3 ] || match[ 1 ] || \"\",\n          version: match[ 2 ] || match[ 4 ] || \"0\",\n          versionNumber: match[ 4 ] || match[ 2 ] || \"0\",\n          platform: platform_match[ 0 ] || \"\"\n        };\n\n    if ( matched.browser ) {\n      browser[ matched.browser ] = true;\n      browser.version = matched.version;\n      browser.versionNumber = parseInt(matched.versionNumber, 10);\n    }\n\n    if ( matched.platform ) {\n      browser[ matched.platform ] = true;\n    }\n\n    // These are all considered mobile platforms, meaning they run a mobile browser\n    if ( browser.android || browser.bb || browser.blackberry || browser.ipad || browser.iphone ||\n      browser.ipod || browser.kindle || browser.playbook || browser.silk || browser[ \"windows phone\" ]) {\n      browser.mobile = true;\n    }\n\n    // These are all considered desktop platforms, meaning they run a desktop browser\n    if ( browser.cros || browser.mac || browser.linux || browser.win ) {\n      browser.desktop = true;\n    }\n\n    // Chrome, Opera 15+ and Safari are webkit based browsers\n    if ( browser.chrome || browser.opr || browser.safari ) {\n      browser.webkit = true;\n    }\n\n    // IE11 has a new token so we will assign it msie to avoid breaking changes\n    if ( browser.rv || browser.iemobile) {\n      var ie = \"msie\";\n\n      matched.browser = ie;\n      browser[ie] = true;\n    }\n\n    // Edge is officially known as Microsoft Edge, so rewrite the key to match\n    if ( browser.edge ) {\n      delete browser.edge;\n      var msedge = \"msedge\";\n\n      matched.browser = msedge;\n      browser[msedge] = true;\n    }\n\n    // Blackberry browsers are marked as Safari on BlackBerry\n    if ( browser.safari && browser.blackberry ) {\n      var blackberry = \"blackberry\";\n\n      matched.browser = blackberry;\n      browser[blackberry] = true;\n    }\n\n    // Playbook browsers are marked as Safari on Playbook\n    if ( browser.safari && browser.playbook ) {\n      var playbook = \"playbook\";\n\n      matched.browser = playbook;\n      browser[playbook] = true;\n    }\n\n    // BB10 is a newer OS version of BlackBerry\n    if ( browser.bb ) {\n      var bb = \"blackberry\";\n\n      matched.browser = bb;\n      browser[bb] = true;\n    }\n\n    // Opera 15+ are identified as opr\n    if ( browser.opr ) {\n      var opera = \"opera\";\n\n      matched.browser = opera;\n      browser[opera] = true;\n    }\n\n    // Stock Android browsers are marked as Safari on Android.\n    if ( browser.safari && browser.android ) {\n      var android = \"android\";\n\n      matched.browser = android;\n      browser[android] = true;\n    }\n\n    // Kindle browsers are marked as Safari on Kindle\n    if ( browser.safari && browser.kindle ) {\n      var kindle = \"kindle\";\n\n      matched.browser = kindle;\n      browser[kindle] = true;\n    }\n\n     // Kindle Silk browsers are marked as Safari on Kindle\n    if ( browser.safari && browser.silk ) {\n      var silk = \"silk\";\n\n      matched.browser = silk;\n      browser[silk] = true;\n    }\n\n    // Assign the name and platform variable\n    browser.name = matched.browser;\n    browser.platform = matched.platform;\n    return browser;\n  }\n\n  // Run the matching process, also assign the function to the returned object\n  // for manual, jQuery-free use if desired\n  window.jQBrowser = uaMatch( window.navigator.userAgent );\n  window.jQBrowser.uaMatch = uaMatch;\n\n  // Only assign to jQuery.browser if jQuery is loaded\n  if ( jQuery ) {\n    jQuery.browser = window.jQBrowser;\n  }\n\n  return window.jQBrowser;\n}));\n","/*!\n * jquery.event.drag - v 2.2\n * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com\n * Open Source MIT License - http://threedubmedia.com/code/license\n */\n// Created: 2008-06-04\n// Updated: 2012-05-21\n// REQUIRES: jquery 1.7.x\n\nmodule.exports = function( $ ){\n  // add the jquery instance method\n  $.fn.drag = function( str, arg, opts ){\n  \t// figure out the event type\n  \tvar type = typeof str == \"string\" ? str : \"\",\n  \t// figure out the event handler...\n  \tfn = $.isFunction( str ) ? str : $.isFunction( arg ) ? arg : null;\n  \t// fix the event type\n  \tif ( type.indexOf(\"drag\") !== 0 )\n  \t\ttype = \"drag\"+ type;\n  \t// were options passed\n  \topts = ( str == fn ? arg : opts ) || {};\n  \t// trigger or bind event handler\n  \treturn fn ? this.bind( type, opts, fn ) : this.trigger( type );\n  };\n\n  // local refs (increase compression)\n  var $event = $.event,\n  $special = $event.special,\n  // configure the drag special event\n  drag = $special.drag = {\n\n  \t// these are the default settings\n  \tdefaults: {\n  \t\twhich: 1, // mouse button pressed to start drag sequence\n  \t\tdistance: 0, // distance dragged before dragstart\n  \t\tnot: ':input', // selector to suppress dragging on target elements\n  \t\thandle: null, // selector to match handle target elements\n  \t\trelative: false, // true to use \"position\", false to use \"offset\"\n  \t\tdrop: true, // false to suppress drop events, true or selector to allow\n  \t\tclick: false // false to suppress click events after dragend (no proxy)\n  \t},\n\n  \t// the key name for stored drag data\n  \tdatakey: \"dragdata\",\n\n  \t// prevent bubbling for better performance\n  \tnoBubble: true,\n\n  \t// count bound related events\n  \tadd: function( obj ){\n  \t\t// read the interaction data\n  \t\tvar data = $.data( this, drag.datakey ),\n  \t\t// read any passed options\n  \t\topts = obj.data || {};\n  \t\t// count another realted event\n  \t\tdata.related += 1;\n  \t\t// extend data options bound with this event\n  \t\t// don't iterate \"opts\" in case it is a node\n  \t\t$.each( drag.defaults, function( key, def ){\n  \t\t\tif ( opts[ key ] !== undefined )\n  \t\t\t\tdata[ key ] = opts[ key ];\n  \t\t});\n  \t},\n\n  \t// forget unbound related events\n  \tremove: function(){\n  \t\t$.data( this, drag.datakey ).related -= 1;\n  \t},\n\n  \t// configure interaction, capture settings\n  \tsetup: function(){\n  \t\t// check for related events\n  \t\tif ( $.data( this, drag.datakey ) )\n  \t\t\treturn;\n  \t\t// initialize the drag data with copied defaults\n  \t\tvar data = $.extend({ related:0 }, drag.defaults );\n  \t\t// store the interaction data\n  \t\t$.data( this, drag.datakey, data );\n  \t\t// bind the mousedown event, which starts drag interactions\n  \t\t$event.add( this, \"touchstart mousedown\", drag.init, data );\n  \t\t// prevent image dragging in IE...\n  \t\tif ( this.attachEvent )\n  \t\t\tthis.attachEvent(\"ondragstart\", drag.dontstart );\n  \t},\n\n  \t// destroy configured interaction\n  \tteardown: function(){\n  \t\tvar data = $.data( this, drag.datakey ) || {};\n  \t\t// check for related events\n  \t\tif ( data.related )\n  \t\t\treturn;\n  \t\t// remove the stored data\n  \t\t$.removeData( this, drag.datakey );\n  \t\t// remove the mousedown event\n  \t\t$event.remove( this, \"touchstart mousedown\", drag.init );\n  \t\t// enable text selection\n  \t\tdrag.textselect( true );\n  \t\t// un-prevent image dragging in IE...\n  \t\tif ( this.detachEvent )\n  \t\t\tthis.detachEvent(\"ondragstart\", drag.dontstart );\n  \t},\n\n  \t// initialize the interaction\n  \tinit: function( event ){\n  \t\t// sorry, only one touch at a time\n  \t\tif ( drag.touched )\n  \t\t\treturn;\n  \t\t// the drag/drop interaction data\n  \t\tvar dd = event.data, results;\n  \t\t// check the which directive\n  \t\tif ( event.which != 0 && dd.which > 0 && event.which != dd.which )\n  \t\t\treturn;\n  \t\t// check for suppressed selector\n  \t\tif ( $( event.target ).is( dd.not ) )\n  \t\t\treturn;\n  \t\t// check for handle selector\n  \t\tif ( dd.handle && !$( event.target ).closest( dd.handle, event.currentTarget ).length )\n  \t\t\treturn;\n\n  \t\tdrag.touched = event.type == 'touchstart' ? this : null;\n  \t\tdd.propagates = 1;\n  \t\tdd.mousedown = this;\n  \t\tdd.interactions = [ drag.interaction( this, dd ) ];\n  \t\tdd.target = event.target;\n  \t\tdd.pageX = event.pageX;\n  \t\tdd.pageY = event.pageY;\n  \t\tdd.dragging = null;\n  \t\t// handle draginit event...\n  \t\tresults = drag.hijack( event, \"draginit\", dd );\n  \t\t// early cancel\n  \t\tif ( !dd.propagates )\n  \t\t\treturn;\n  \t\t// flatten the result set\n  \t\tresults = drag.flatten( results );\n  \t\t// insert new interaction elements\n  \t\tif ( results && results.length ){\n  \t\t\tdd.interactions = [];\n  \t\t\t$.each( results, function(){\n  \t\t\t\tdd.interactions.push( drag.interaction( this, dd ) );\n  \t\t\t});\n  \t\t}\n  \t\t// remember how many interactions are propagating\n  \t\tdd.propagates = dd.interactions.length;\n  \t\t// locate and init the drop targets\n  \t\tif ( dd.drop !== false && $special.drop )\n  \t\t\t$special.drop.handler( event, dd );\n  \t\t// disable text selection\n  \t\tdrag.textselect( false );\n  \t\t// bind additional events...\n  \t\tif ( drag.touched )\n  \t\t\t$event.add( drag.touched, \"touchmove touchend\", drag.handler, dd );\n  \t\telse\n  \t\t\t$event.add( document, \"mousemove mouseup\", drag.handler, dd );\n  \t\t// helps prevent text selection or scrolling\n  \t\tif ( !drag.touched || dd.live )\n  \t\t\treturn false;\n  \t},\n\n  \t// returns an interaction object\n  \tinteraction: function( elem, dd ){\n  \t\tvar offset = $( elem )[ dd.relative ? \"position\" : \"offset\" ]() || { top:0, left:0 };\n  \t\treturn {\n  \t\t\tdrag: elem,\n  \t\t\tcallback: new drag.callback(),\n  \t\t\tdroppable: [],\n  \t\t\toffset: offset\n  \t\t};\n  \t},\n\n  \t// handle drag-releatd DOM events\n  \thandler: function( event ){\n  \t\t// read the data before hijacking anything\n  \t\tvar dd = event.data;\n  \t\t// handle various events\n  \t\tswitch ( event.type ){\n  \t\t\t// mousemove, check distance, start dragging\n  \t\t\tcase !dd.dragging && 'touchmove':\n  \t\t\t\tevent.preventDefault();\n  \t\t\tcase !dd.dragging && 'mousemove':\n  \t\t\t\t//  drag tolerance, x� + y� = distance�\n  \t\t\t\tif ( Math.pow(  event.pageX-dd.pageX, 2 ) + Math.pow(  event.pageY-dd.pageY, 2 ) < Math.pow( dd.distance, 2 ) )\n  \t\t\t\t\tbreak; // distance tolerance not reached\n  \t\t\t\tevent.target = dd.target; // force target from \"mousedown\" event (fix distance issue)\n  \t\t\t\tdrag.hijack( event, \"dragstart\", dd ); // trigger \"dragstart\"\n  \t\t\t\tif ( dd.propagates ) // \"dragstart\" not rejected\n  \t\t\t\t\tdd.dragging = true; // activate interaction\n  \t\t\t// mousemove, dragging\n  \t\t\tcase 'touchmove':\n  \t\t\t\tevent.preventDefault();\n  \t\t\tcase 'mousemove':\n  \t\t\t\tif ( dd.dragging ){\n  \t\t\t\t\t// trigger \"drag\"\n  \t\t\t\t\tdrag.hijack( event, \"drag\", dd );\n  \t\t\t\t\tif ( dd.propagates ){\n  \t\t\t\t\t\t// manage drop events\n  \t\t\t\t\t\tif ( dd.drop !== false && $special.drop )\n  \t\t\t\t\t\t\t$special.drop.handler( event, dd ); // \"dropstart\", \"dropend\"\n  \t\t\t\t\t\tbreak; // \"drag\" not rejected, stop\n  \t\t\t\t\t}\n  \t\t\t\t\tevent.type = \"mouseup\"; // helps \"drop\" handler behave\n  \t\t\t\t}\n  \t\t\t// mouseup, stop dragging\n  \t\t\tcase 'touchend':\n  \t\t\tcase 'mouseup':\n  \t\t\tdefault:\n  \t\t\t\tif ( drag.touched )\n  \t\t\t\t\t$event.remove( drag.touched, \"touchmove touchend\", drag.handler ); // remove touch events\n  \t\t\t\telse\n  \t\t\t\t\t$event.remove( document, \"mousemove mouseup\", drag.handler ); // remove page events\n  \t\t\t\tif ( dd.dragging ){\n  \t\t\t\t\tif ( dd.drop !== false && $special.drop )\n  \t\t\t\t\t\t$special.drop.handler( event, dd ); // \"drop\"\n  \t\t\t\t\tdrag.hijack( event, \"dragend\", dd ); // trigger \"dragend\"\n  \t\t\t\t}\n  \t\t\t\tdrag.textselect( true ); // enable text selection\n  \t\t\t\t// if suppressing click events...\n  \t\t\t\tif ( dd.click === false && dd.dragging )\n  \t\t\t\t\t$.data( dd.mousedown, \"suppress.click\", new Date().getTime() + 5 );\n  \t\t\t\tdd.dragging = drag.touched = false; // deactivate element\n  \t\t\t\tbreak;\n  \t\t}\n  \t},\n\n  \t// re-use event object for custom events\n  \thijack: function( event, type, dd, x, elem ){\n  \t\t// not configured\n  \t\tif ( !dd )\n  \t\t\treturn;\n  \t\t// remember the original event and type\n  \t\tvar orig = { event:event.originalEvent, type:event.type },\n  \t\t// is the event drag related or drog related?\n  \t\tmode = type.indexOf(\"drop\") ? \"drag\" : \"drop\",\n  \t\t// iteration vars\n  \t\tresult, i = x || 0, ia, $elems, callback,\n  \t\tlen = !isNaN( x ) ? x : dd.interactions.length;\n  \t\t// modify the event type\n  \t\tevent.type = type;\n  \t\t// remove the original event\n  \t\tevent.originalEvent = null;\n  \t\t// initialize the results\n  \t\tdd.results = [];\n  \t\t// handle each interacted element\n  \t\tdo if ( ia = dd.interactions[ i ] ){\n  \t\t\t// validate the interaction\n  \t\t\tif ( type !== \"dragend\" && ia.cancelled )\n  \t\t\t\tcontinue;\n  \t\t\t// set the dragdrop properties on the event object\n  \t\t\tcallback = drag.properties( event, dd, ia );\n  \t\t\t// prepare for more results\n  \t\t\tia.results = [];\n  \t\t\t// handle each element\n  \t\t\t$( elem || ia[ mode ] || dd.droppable ).each(function( p, subject ){\n  \t\t\t\t// identify drag or drop targets individually\n  \t\t\t\tcallback.target = subject;\n  \t\t\t\t// force propagtion of the custom event\n  \t\t\t\tevent.isPropagationStopped = function(){ return false; };\n  \t\t\t\t// handle the event\n  \t\t\t\tresult = subject ? $event.dispatch.call( subject, event, callback ) : null;\n  \t\t\t\t// stop the drag interaction for this element\n  \t\t\t\tif ( result === false ){\n  \t\t\t\t\tif ( mode == \"drag\" ){\n  \t\t\t\t\t\tia.cancelled = true;\n  \t\t\t\t\t\tdd.propagates -= 1;\n  \t\t\t\t\t}\n  \t\t\t\t\tif ( type == \"drop\" ){\n  \t\t\t\t\t\tia[ mode ][p] = null;\n  \t\t\t\t\t}\n  \t\t\t\t}\n  \t\t\t\t// assign any dropinit elements\n  \t\t\t\telse if ( type == \"dropinit\" )\n  \t\t\t\t\tia.droppable.push( drag.element( result ) || subject );\n  \t\t\t\t// accept a returned proxy element\n  \t\t\t\tif ( type == \"dragstart\" )\n  \t\t\t\t\tia.proxy = $( drag.element( result ) || ia.drag )[0];\n  \t\t\t\t// remember this result\n  \t\t\t\tia.results.push( result );\n  \t\t\t\t// forget the event result, for recycling\n  \t\t\t\tdelete event.result;\n  \t\t\t\t// break on cancelled handler\n  \t\t\t\tif ( type !== \"dropinit\" )\n  \t\t\t\t\treturn result;\n  \t\t\t});\n  \t\t\t// flatten the results\n  \t\t\tdd.results[ i ] = drag.flatten( ia.results );\n  \t\t\t// accept a set of valid drop targets\n  \t\t\tif ( type == \"dropinit\" )\n  \t\t\t\tia.droppable = drag.flatten( ia.droppable );\n  \t\t\t// locate drop targets\n  \t\t\tif ( type == \"dragstart\" && !ia.cancelled )\n  \t\t\t\tcallback.update();\n  \t\t}\n  \t\twhile ( ++i < len )\n  \t\t// restore the original event & type\n  \t\tevent.type = orig.type;\n  \t\tevent.originalEvent = orig.event;\n  \t\t// return all handler results\n  \t\treturn drag.flatten( dd.results );\n  \t},\n\n  \t// extend the callback object with drag/drop properties...\n  \tproperties: function( event, dd, ia ){\n  \t\tvar obj = ia.callback;\n  \t\t// elements\n  \t\tobj.drag = ia.drag;\n  \t\tobj.proxy = ia.proxy || ia.drag;\n  \t\t// starting mouse position\n  \t\tobj.startX = dd.pageX;\n  \t\tobj.startY = dd.pageY;\n  \t\t// current distance dragged\n  \t\tobj.deltaX = event.pageX - dd.pageX;\n  \t\tobj.deltaY = event.pageY - dd.pageY;\n  \t\t// original element position\n  \t\tobj.originalX = ia.offset.left;\n  \t\tobj.originalY = ia.offset.top;\n  \t\t// adjusted element position\n  \t\tobj.offsetX = obj.originalX + obj.deltaX;\n  \t\tobj.offsetY = obj.originalY + obj.deltaY;\n  \t\t// assign the drop targets information\n  \t\tobj.drop = drag.flatten( ( ia.drop || [] ).slice() );\n  \t\tobj.available = drag.flatten( ( ia.droppable || [] ).slice() );\n  \t\treturn obj;\n  \t},\n\n  \t// determine is the argument is an element or jquery instance\n  \telement: function( arg ){\n  \t\tif ( arg && ( arg.jquery || arg.nodeType == 1 ) )\n  \t\t\treturn arg;\n  \t},\n\n  \t// flatten nested jquery objects and arrays into a single dimension array\n  \tflatten: function( arr ){\n  \t\treturn $.map( arr, function( member ){\n  \t\t\treturn member && member.jquery ? $.makeArray( member ) :\n  \t\t\t\tmember && member.length ? drag.flatten( member ) : member;\n  \t\t});\n  \t},\n\n  \t// toggles text selection attributes ON (true) or OFF (false)\n  \ttextselect: function( bool ){\n  \t\t$( document )[ bool ? \"unbind\" : \"bind\" ](\"selectstart\", drag.dontstart )\n  \t\t\t.css(\"MozUserSelect\", bool ? \"\" : \"none\" );\n  \t\t// .attr(\"unselectable\", bool ? \"off\" : \"on\" )\n  \t\tdocument.unselectable = bool ? \"off\" : \"on\";\n  \t},\n\n  \t// suppress \"selectstart\" and \"ondragstart\" events\n  \tdontstart: function(){\n  \t\treturn false;\n  \t},\n\n  \t// a callback instance contructor\n  \tcallback: function(){}\n\n  };\n\n  // callback methods\n  drag.callback.prototype = {\n  \tupdate: function(){\n  \t\tif ( $special.drop && this.available.length )\n  \t\t\t$.each( this.available, function( i ){\n  \t\t\t\t$special.drop.locate( this, i );\n  \t\t\t});\n  \t}\n  };\n\n  // patch $.event.$dispatch to allow suppressing clicks\n  var $dispatch = $event.dispatch;\n  $event.dispatch = function( event ){\n  \tif ( $.data( this, \"suppress.\"+ event.type ) - new Date().getTime() > 0 ){\n  \t\t$.removeData( this, \"suppress.\"+ event.type );\n  \t\treturn;\n  \t}\n  \treturn $dispatch.apply( this, arguments );\n  };\n\n  // event fix hooks for touch events...\n  var touchHooks =\n  $event.fixHooks.touchstart =\n  $event.fixHooks.touchmove =\n  $event.fixHooks.touchend =\n  $event.fixHooks.touchcancel = {\n  \tprops: \"clientX clientY pageX pageY screenX screenY\".split( \" \" ),\n  \tfilter: function( event, orig ) {\n  \t\tif ( orig ){\n  \t\t\tvar touched = ( orig.touches && orig.touches[0] )\n  \t\t\t\t|| ( orig.changedTouches && orig.changedTouches[0] )\n  \t\t\t\t|| null;\n  \t\t\t// iOS webkit: touchstart, touchmove, touchend\n  \t\t\tif ( touched )\n  \t\t\t\t$.each( touchHooks.props, function( i, prop ){\n  \t\t\t\t\tevent[ prop ] = touched[ prop ];\n  \t\t\t\t});\n  \t\t}\n  \t\treturn event;\n  \t}\n  };\n\n  // share the same special event configuration with related events...\n  $special.draginit = $special.dragstart = $special.dragend = drag;\n};\n","/*!\n * jquery.event.drag.live - v 2.2\n * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com\n * Open Source MIT License - http://threedubmedia.com/code/license\n */\n// Created: 2010-06-07\n// Updated: 2012-05-21\n// REQUIRES: jquery 1.7.x, event.drag 2.2\n\nmodule.exports = function( $ ){\n  require('./jquery.event.drag')($);\n\n  // local refs (increase compression)\n  var $event = $.event,\n  // ref the special event config\n  drag = $event.special.drag,\n  // old drag event add method\n  origadd = drag.add,\n  // old drag event teradown method\n  origteardown = drag.teardown;\n\n  // allow events to bubble for delegation\n  drag.noBubble = false;\n\n  // the namespace for internal live events\n  drag.livekey = \"livedrag\";\n\n  // new drop event add method\n  drag.add = function( obj ){\n  \t// call the old method\n  \torigadd.apply( this, arguments );\n  \t// read the data\n  \tvar data = $.data( this, drag.datakey );\n  \t// bind the live \"draginit\" delegator\n  \tif ( !data.live && obj.selector ){\n  \t\tdata.live = true;\n  \t\t$event.add( this, \"draginit.\"+ drag.livekey, drag.delegate );\n  \t}\n  };\n\n  // new drop event teardown method\n  drag.teardown = function(){\n  \t// call the old method\n  \torigteardown.apply( this, arguments );\n  \t// read the data\n  \tvar data = $.data( this, drag.datakey ) || {};\n  \t// bind the live \"draginit\" delegator\n  \tif ( data.live ){\n  \t\t// remove the \"live\" delegation\n  \t\t$event.remove( this, \"draginit.\"+ drag.livekey, drag.delegate );\n  \t\tdata.live = false;\n  \t}\n  };\n\n  // identify potential delegate elements\n  drag.delegate = function( event ){\n  \t// local refs\n  \tvar elems = [], target,\n  \t// element event structure\n  \tevents = $._data( this, \"events\" ) || {};\n  \t// query live events\n  \t$.each( events || [], function( key, arr ){\n  \t\t// no event type matches\n  \t\tif ( key.indexOf(\"drag\") !== 0 )\n  \t\t\treturn;\n  \t\t$.each( arr || [], function( i, obj ){\n  \t\t\t// locate the element to delegate\n  \t\t\ttarget = $( event.target ).closest( obj.selector )[0];\n  \t\t\t// no element found\n  \t\t\tif ( !target )\n  \t\t\t\treturn;\n  \t\t\t// add an event handler\n  \t\t\t$event.add( target, obj.origType+'.'+drag.livekey, obj.origHandler || obj.handler, obj.data );\n  \t\t\t// remember new elements\n  \t\t\tif ( $.inArray( target, elems ) < 0 )\n  \t\t\t\telems.push( target );\n  \t\t});\n  \t});\n  \t// if there are no elements, break\n  \tif ( !elems.length )\n  \t\treturn false;\n  \t// return the matched results, and clenup when complete\n  \treturn $( elems ).bind(\"dragend.\"+ drag.livekey, function(){\n  \t\t$event.remove( this, \".\"+ drag.livekey ); // cleanup delegation\n  \t});\n  };\n};\n","// tipsy, facebook style tooltips for jquery\n// version 1.0.2\n// (c) 2008-2010 jason frame [jason@onehackoranother.com]\n// released under the MIT license\n\n(function($, window, undefined) {\n\n    function maybeCall(thing, ctx) {\n        return (typeof thing == 'function') ? (thing.call(ctx)) : thing;\n    }\n\n    function isElementInDOM(ele) {\n        while (ele = ele.parentNode) {\n            if (ele == document) return true;\n        }\n        return false;\n    }\n\n\t// Returns true if it is a DOM element\n\t// http://stackoverflow.com/a/384380/999\n\tfunction isElement(o){\n\t\treturn (\n\t\t\ttypeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\to && typeof o === \"object\" && o.nodeType === 1 && typeof o.nodeName===\"string\"\n\t\t);\t\n\t}\n\n    var tipsyIDcounter = 0;\n    function tipsyID() {\n        return \"tipsyuid\" + (tipsyIDcounter++);\n    }\n\n    function Tipsy(element, options) {\n        this.$element = $(element);\n        this.options = options;\n        this.enabled = true;\n        this.fixTitle();\n    }\n\n    Tipsy.prototype = {\n        show: function() {\n            if (!isElementInDOM(this.$element[0])) {\n                return;\n            }\n\n            if (isElement(this.$element) && !this.$element.is(':visible')) { \n                return; \n            }\n            \n            var title;\n            if (this.enabled && (title = this.getTitle())) {\n                var $tip = this.tip();\n\n                $tip.find('.tipsy-inner' + this.options.theme)[this.options.html ? 'html' : 'text'](title);\n\n                $tip[0].className = 'tipsy' + this.options.theme; // reset classname in case of dynamic gravity\n                if (this.options.className) {\n                    $tip.addClass(maybeCall(this.options.className, this.$element[0]));\n                }\n\n                $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);\n\n                var pos = $.extend({}, this.$element.offset());\n\n                // If the element is contained in a SVG object, use getBBox\n                if (this.$element.parents('svg').size() > 0) {\n                    pos = $.extend(pos, this.$element[0].getBBox());\n                } else {\n                    pos = $.extend(pos, {\n                        width: this.$element[0].offsetWidth || 0,\n                        height: this.$element[0].offsetHeight || 0\n                    });\n                }\n\n                var actualWidth = $tip[0].offsetWidth,\n                    actualHeight = $tip[0].offsetHeight,\n                    gravity = maybeCall(this.options.gravity, this.$element[0]);\n\n                var tp;\n                switch (gravity.charAt(0)) {\n                    case 'n':\n                        tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};\n                        break;\n                    case 's':\n                        tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};\n                        break;\n                    case 'e':\n                        tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};\n                        break;\n                    case 'w':\n                        tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};\n                        break;\n                    default:\n                        break;\n                }\n\n                if (gravity.length == 2) {\n                    if (gravity.charAt(1) == 'w') {\n                        tp.left = pos.left + pos.width / 2 - 15;\n                    } else {\n                        tp.left = pos.left + pos.width / 2 - actualWidth + 15;\n                    }\n                }\n\n                $tip.css(tp).addClass('tipsy-' + gravity + this.options.theme);\n                $tip.find('.tipsy-arrow' + this.options.theme)[0].className = 'tipsy-arrow' + this.options.theme + ' tipsy-arrow-' + gravity.charAt(0) + this.options.theme;\n\n                if (this.options.fade) {\n                    if(this.options.shadow)\n                        $(\".tipsy-inner\").css({'box-shadow': '0px 0px '+this.options.shadowBlur+'px '+this.options.shadowSpread+'px rgba(0, 0, 0, '+this.options.shadowOpacity+')', '-webkit-box-shadow': '0px 0px '+this.options.shadowBlur+'px '+this.options.shadowSpread+'px rgba(0, 0, 0, '+this.options.shadowOpacity+')'});\n                    $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}, this.options.fadeInTime);\n                } else {\n                    $tip.css({visibility: 'visible', opacity: this.options.opacity});\n                }\n\n                if (this.options.aria) {\n                    var $tipID = tipsyID();\n                    $tip.attr(\"id\", $tipID);\n                    this.$element.attr(\"aria-describedby\", $tipID);\n                }\n            }\n        },\n\n        hide: function() {\n            if (this.options.fade) {\n                this.tip().stop().fadeOut(this.options.fadeOutTime, function() { $(this).remove(); });\n            } else {\n                this.tip().remove();\n            }\n            if (this.options.aria) {\n                this.$element.removeAttr(\"aria-describedby\");\n            }\n        },\n\n        fixTitle: function() {\n            var $e = this.$element,\n                id = maybeCall(this.options.id, this.$element[0]);\n            if ($e.prop('title') || typeof($e.prop('original-title')) != 'string') {\n                $e.prop('original-title', $e.prop('title') || '').removeAttr('title');\n                // add aria-describedby pointing to the tooltip's id\n                $e.attr('aria-describedby', id);\n                // if it doesn't already have a tabindex, force the trigger element into the tab cycle\n                // to make it keyboard accessible with tabindex=0. this automatically makes elements\n                // that are not normally keyboard accessible (div or span) that have been tipsy-fied\n                // also operable with the keyboard.\n                if ($e.attr('tabindex') === undefined) {\n                    $e.attr('tabindex', 0);\n                }\n            }\n        },\n\n        getTitle: function() {\n            var title, $e = this.$element, o = this.options;\n            this.fixTitle();\n            if (typeof o.title == 'string') {\n                title = $e.prop(o.title == 'title' ? 'original-title' : o.title);\n            } else if (typeof o.title == 'function') {\n                title = o.title.call($e[0]);\n            }\n            title = ('' + title).replace(/(^\\s*|\\s*$)/, \"\");\n            return title || o.fallback;\n        },\n\n        tip: function() {\n            var id = maybeCall(this.options.id, this.$element[0]);\n\n            if (!this.$tip) {\n                // generate tooltip, with appropriate ARIA role and an 'id' (can be set in options),\n                // so it can be targetted by aria-describedby in the trigger element\n                this.$tip = $('<div class=\"tipsy' + this.options.theme + '\" id=\"'+id+'\" role=\"tooltip\"></div>').html('<div class=\"tipsy-arrow' + this.options.theme + '\"></div><div class=\"tipsy-inner' + this.options.theme + '\"></div>').attr(\"role\",\"tooltip\");\n                this.$tip.data('tipsy-pointee', this.$element[0]);\n            }\n            return this.$tip;\n        },\n\n        validate: function() {\n            if (!this.$element[0].parentNode) {\n                this.hide();\n                this.$element = null;\n                this.options = null;\n            }\n        },\n\n        enable: function() { this.enabled = true; },\n        disable: function() { this.enabled = false; },\n        toggleEnabled: function() { this.enabled = !this.enabled; }\n    };\n\n    $.fn.tipsy = function(options) {\n\n        $.fn.tipsy.enable();\n\n        if (options === true) {\n            return this.data('tipsy');\n        } else if (typeof options == 'string') {\n            var tipsy = this.data('tipsy');\n            if (tipsy) tipsy[options]();\n            return this;\n        }\n\n        options = $.extend({}, $.fn.tipsy.defaults, options);\n\n        // Establish theme\n        options.theme = (options.theme && options.theme !== '') ? '-' + options.theme : '';\n\n        function get(ele) {\n            var tipsy = $.data(ele, 'tipsy');\n            if (!tipsy) {\n                tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));\n                $.data(ele, 'tipsy', tipsy);\n            }\n            return tipsy;\n        }\n\n        function enter() {\n            if ($.fn.tipsy.enabled !== true) {\n                return;\n            }\n            var tipsy = get(this);\n            tipsy.hoverState = 'in';\n            if (options.delayIn === 0) {\n                tipsy.show();\n            } else {\n                tipsy.fixTitle();\n                setTimeout(function() {\n                    if (tipsy.hoverState == 'in' && isElementInDOM(tipsy.$element)) {\n                        tipsy.show();\n                    }\n                }, options.delayIn);\n            }\n        }\n\n        function leave() {\n            var tipsy = get(this);\n            tipsy.hoverState = 'out';\n            if (options.delayOut === 0) {\n                tipsy.hide();\n            } else {\n                setTimeout(function() { if (tipsy.hoverState == 'out' || !tipsy.$element || !tipsy.$element.is(':visible')) tipsy.hide(); }, options.delayOut);\n            }\n        }\n\n        if (!options.live) this.each(function() { get(this); });\n\n        if (options.trigger != 'manual') {\n            // one of the biggest changes from 1.0.0a: by default, bind to BOTH mouseenter/mouseleave AND focus/blur\n            // this ensures out-of-the-box keyboard accessibility, showing tooltips when users TAB to a (focusable) element\n            // sites that still use 'hover' will also get this new interactive behavior automatically, only those who\n            // explicitly set 'focus' will only get focus/blur (for forms, for instance)\n\n            if (options.live && options.live !== true) {\n                if (options.trigger != 'focus') {\n                    $(this).on('mouseenter', options.live, enter);\n                    $(this).on('mouseleave', options.live, leave);\n                }\n                if (options.trigger != 'blur') {\n                    $(this).on('focus', options.live, enter);\n                    $(this).on('blur', options.live, leave);\n                }\n            } else {\n                if (options.live && !$.live) {\n                    //live === true and using jQuery >= 1.9\n                    throw \"Since jQuery 1.9, pass selector as live argument. eg. $(document).tipsy({live: 'a.live'});\";\n                }\n                var binder = options.live ? 'live' : 'bind';\n                if (options.trigger != 'focus') {\n                    this[binder]('mouseenter', enter)[binder]('mouseleave', leave);\n                }\n                if (options.trigger != 'blur') {\n                    this[binder]('focus', enter)[binder]('blur', leave);\n                }\n            }\n        }\n\n        return this;\n\n    };\n\n    $.fn.tipsy.defaults = {\n        aria: false,\n        className: null,\n        id: 'tipsy',\n        delayIn: 0,\n        delayOut: 0,\n        fade: false,\n        fadeInTime: 400,\n        fadeOutTime: 400, \n        shadow: false,\n        shadowBlur: 8,\n        shadowOpacity: 1,\n        shadowSpread: 0,\n        fallback: '',\n        gravity: 'n',\n        html: false,\n        live: false,\n        offset: 0,\n        opacity: 0.8,\n        title: 'title',\n        trigger: 'interactive',\n        theme: ''\n    };\n\n    $.fn.tipsy.revalidate = function() {\n      $('.tipsy').each(function() {\n        var pointee = $.data(this, 'tipsy-pointee');\n        if (!pointee || !isElementInDOM(pointee)) {\n          $(this).remove();\n        }\n      });\n    };\n\n    $.fn.tipsy.enable = function() {\n        $.fn.tipsy.enabled = true;\n    };\n\n    $.fn.tipsy.disable = function() {\n        $.fn.tipsy.enabled = false;\n    };\n\n    // Overwrite this method to provide options on a per-element basis.\n    // For example, you could store the gravity in a 'tipsy-gravity' attribute:\n    // return $.extend({}, options, {gravity: $(ele).prop('tipsy-gravity') || 'n' });\n    // (remember - do not modify 'options' in place!)\n    $.fn.tipsy.elementOptions = function(ele, options) {\n        return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;\n    };\n\n    $.fn.tipsy.autoNS = function() {\n        return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';\n    };\n\n    $.fn.tipsy.autoWE = function() {\n        return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';\n    };\n\n    $.fn.tipsy.autoNWNE = function() {\n        return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'ne' : 'nw';\n    };\n\n    $.fn.tipsy.autoSWSE = function() {\n        return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'se' : 'sw';\n    };\n\n    /**\n     * yields a closure of the supplied parameters, producing a function that takes\n     * no arguments and is suitable for use as an autogravity function like so:\n     *\n     * @param marginNorth (int) - distance from the viewable region top edge that an\n     *        element should be before setting its tooltip's gravity to be away\n     *        from that edge.\n     * @param marginEast (int) - distance from the viewable region right edge that an\n     *        element should be before setting its tooltip's gravity to be away\n     *        from that edge.\n     * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer\n     *        if there are no viewable region edges effecting the tooltip's\n     *        gravity. It will try to vary from this minimally, for example,\n     *        if 'sw' is preferred and an element is near the right viewable\n     *        region edge, but not the top edge, it will set the gravity for\n     *        that element's tooltip to be 'se', preserving the southern\n     *        component.\n     */\n    $.fn.tipsy.autoBounds = function(marginNorth, marginEast, prefer) {\n        return function() {\n            var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},\n                boundTop = $(document).scrollTop() + marginNorth,\n                boundLeft = $(document).scrollLeft() + marginEast,\n                $this = $(this);\n\n            if ($this.offset().top < boundTop) dir.ns = 'n';\n            if ($this.offset().left < boundLeft) dir.ew = 'w';\n            if ($(window).width() + $(document).scrollLeft() - $this.offset().left < marginEast) dir.ew = 'e';\n            if ($(window).height() + $(document).scrollTop() - $this.offset().top < marginNorth) dir.ns = 's';\n\n            return dir.ns + (dir.ew ? dir.ew : '');\n        };\n    };\n\n    /**\n     * Improved version of autoBounds for automatic placement of chunky tips\n     * The original autoBounds failed in two regards: 1. it would never return a 'w' or 'e', gravity even if they\n     * were preferred and/or optimal, 2. it only respected the margin between the left hand side of an element and\n     * left hand side of the viewport, and the top of an element and the top of the viewport. This version checks\n     * to see if the bottom of an element is too close to the bottom of the screen, similarly for the right hand side\n     */\n    $.fn.tipsy.autoBounds2 = function(margin, prefer) {\n        return function() {\n            var dir = {},\n                boundTop = $(document).scrollTop() + margin,\n                boundLeft = $(document).scrollLeft() + margin,\n                $this = $(this);\n\n            // bi-directional string (ne, se, sw, etc...)\n            if (prefer.length > 1) {\n                dir.ns = prefer[0];\n                dir.ew = prefer[1];\n            } else {\n                // single direction string (e, w, n or s)\n                if (prefer[0] == 'e' || prefer[0] == 'w') {\n                    dir.ew = prefer[0];\n                } else {\n                    dir.ns = prefer[0];\n                }\n            }\n\n            if ($this.offset().top < boundTop) dir.ns = 'n';\n            if ($this.offset().left < boundLeft) dir.ew = 'w';\n            if ($(window).width() + $(document).scrollLeft() - ($this.offset().left + $this.width()) < margin) dir.ew = 'e';\n            if ($(window).height() + $(document).scrollTop() - ($this.offset().top + $this.height()) < margin) dir.ns = 's';\n\n            if (dir.ns) {\n                return dir.ns + (dir.ew ? dir.ew : '');\n            }\n            return dir.ew;\n        }\n    };\n    \n})(jQuery, window);\n","/*!\n * jQuery JavaScript Library v3.7.0\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-05-11T18:29Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.0\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (see trac-13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\n\t\t\t\"<option selected=''></option></select>\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented\n// as part of Sizzle so let's maintain them in the 3.x line\n// for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","(function($) {\n  window.NestedFormEvents = function() {\n    this.addFields = $.proxy(this.addFields, this);\n    this.removeFields = $.proxy(this.removeFields, this);\n  };\n\n  NestedFormEvents.prototype = {\n    addFields: function(e) {\n      // Setup\n      var link      = e.currentTarget;\n      var assoc     = $(link).data('association');// Name of child\n      var blueprint = $('#' + $(link).data('blueprint-id'));\n      var content   = blueprint.data('blueprint');// Fields template\n\n      // Make the context correct by replacing <parents> with the generated ID\n      // of each of the parent objects\n      var context = ($(link).closest('.fields').closestChild('input, textarea, select').eq(0).attr('name') || '').replace(/\\[[a-z_]+\\]$/, '');\n\n      // If the parent has no inputs we need to strip off the last pair\n      var current = content.match(new RegExp('\\\\[([a-z_]+)\\\\]\\\\[new_' + assoc + '\\\\]'));\n      if (current) {\n        context = context.replace(new RegExp('\\\\[' + current[1] + '\\\\]\\\\[(new_)?\\\\d+\\\\]$'), '');\n      }\n\n      // context will be something like this for a brand new form:\n      // project[tasks_attributes][1255929127459][assignments_attributes][1255929128105]\n      // or for an edit form:\n      // project[tasks_attributes][0][assignments_attributes][1]\n      if (context) {\n        var parentNames = context.match(/[a-z_]+_attributes(?=\\]\\[(new_)?\\d+\\])/g) || [];\n        var parentIds   = context.match(/[0-9]+/g) || [];\n\n        for(var i = 0; i < parentNames.length; i++) {\n          if(parentIds[i]) {\n            content = content.replace(\n              new RegExp('(_' + parentNames[i] + ')_.+?_', 'g'),\n              '$1_' + parentIds[i] + '_');\n\n            content = content.replace(\n              new RegExp('(\\\\[' + parentNames[i] + '\\\\])\\\\[.+?\\\\]', 'g'),\n              '$1[' + parentIds[i] + ']');\n          }\n        }\n      }\n\n      // Make a unique ID for the new child\n      var regexp  = new RegExp('new_' + assoc, 'g');\n      var new_id  = this.newId();\n      content     = $.trim(content.replace(regexp, new_id));\n\n      var field = this.insertFields(content, assoc, link);\n      // bubble up event upto document (through form)\n      field\n        .trigger({ type: 'nested:fieldAdded', field: field })\n        .trigger({ type: 'nested:fieldAdded:' + assoc, field: field });\n      return false;\n    },\n    newId: function() {\n      return new Date().getTime();\n    },\n    insertFields: function(content, assoc, link) {\n      var target = $(link).data('target');\n      if (target) {\n        return $(content).appendTo($(target));\n      } else {\n        return $(content).insertBefore(link);\n      }\n    },\n    removeFields: function(e) {\n      var $link = $(e.currentTarget),\n          assoc = $link.data('association'); // Name of child to be removed\n      \n      var hiddenField = $link.prev('input[type=hidden]');\n      hiddenField.val('1');\n      \n      var wrapperSelector = $link.data('wrapper') || '.fields';\n      var field = $link.closest(wrapperSelector);\n      field.hide();\n      \n      field\n        .trigger({ type: 'nested:fieldRemoved', field: field })\n        .trigger({ type: 'nested:fieldRemoved:' + assoc, field: field });\n      return false;\n    }\n  };\n\n  window.nestedFormEvents = new NestedFormEvents();\n  $(document)\n    .delegate('form a.add_nested_fields',    'click', nestedFormEvents.addFields)\n    .delegate('form a.remove_nested_fields', 'click', nestedFormEvents.removeFields);\n})(jQuery);\n\n// http://plugins.jquery.com/project/closestChild\n/*\n * Copyright 2011, Tobias Lindig\n *\n * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\n * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\n *\n */\n(function($) {\n  $.fn.closestChild = function(selector) {\n    // breadth first search for the first matched node\n    if (selector && selector != '') {\n      var queue = [];\n      queue.push(this);\n\n      while(queue.length > 0) {\n        var node = queue.shift();\n        var children = node.children();\n\n        for(var i = 0; i < children.length; ++i) {\n          var child = $(children[i]);\n\n          if (child.is(selector)) {\n            return child; //well, we found one\n          }\n\n          queue.push(child);\n        }\n      }\n    }\n\n    return $();//nothing found\n  };\n})(jQuery);\n","/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.17.21';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function',\n      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading whitespace. */\n  var reTrimStart = /^\\s+/;\n\n  /** Used to match a single whitespace character. */\n  var reWhitespace = /\\s/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /**\n   * Used to validate the `validate` option in `_.template` variable.\n   *\n   * Forbids characters which could potentially change the meaning of the function argument definition:\n   * - \"(),\" (modification of function parameters)\n   * - \"=\" (default value)\n   * - \"[]{}\" (destructuring of function parameters)\n   * - \"/\" (beginning of a comment)\n   * - whitespace\n   */\n  var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.trim`.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} Returns the trimmed string.\n   */\n  function baseTrim(string) {\n    return string\n      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n      : string;\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n   * character of `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the index of the last non-whitespace character.\n   */\n  function trimmedEndIndex(string) {\n    var index = string.length;\n\n    while (index-- && reWhitespace.test(string.charAt(index))) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {number} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            }\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      return object == null || delete object[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        result[pair[0]] = pair[1];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = baseTrim(value);\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('déjà vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Throw an error if a forbidden character was found in `variable`, to prevent\n      // potential command injection attacks.\n      else if (reForbiddenIdentifierChars.test(variable)) {\n        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n      }\n\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return baseTrim(string);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.slice(0, trimmedEndIndex(string) + 1);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    define(function() {\n      return _;\n    });\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else if (freeModule) {\n    // Export for Node.js.\n    (freeModule.exports = _)._ = _;\n    // Export for CommonJS support.\n    freeExports._ = _;\n  }\n  else {\n    // Export to the global object.\n    root._ = _;\n  }\n}.call(this));\n","//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var af = moment.defineLocale('af', {\n        months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),\n        monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n        weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),\n        weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n        weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n        meridiemParse: /vm|nm/i,\n        isPM : function (input) {\n            return /^nm$/i.test(input);\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'vm' : 'VM';\n            } else {\n                return isLower ? 'nm' : 'NM';\n            }\n        },\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[Vandag om] LT',\n            nextDay : '[Môre om] LT',\n            nextWeek : 'dddd [om] LT',\n            lastDay : '[Gister om] LT',\n            lastWeek : '[Laas] dddd [om] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'oor %s',\n            past : '%s gelede',\n            s : '\\'n paar sekondes',\n            m : '\\'n minuut',\n            mm : '%d minute',\n            h : '\\'n uur',\n            hh : '%d ure',\n            d : '\\'n dag',\n            dd : '%d dae',\n            M : '\\'n maand',\n            MM : '%d maande',\n            y : '\\'n jaar',\n            yy : '%d jaar'\n        },\n        ordinalParse: /\\d{1,2}(ste|de)/,\n        ordinal : function (number) {\n            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter\n        },\n        week : {\n            dow : 1, // Maandag is die eerste dag van die week.\n            doy : 4  // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n        }\n    });\n\n    return af;\n\n}));","//! moment.js locale configuration\n//! locale : Arabic (Lybia) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '1',\n        '2': '2',\n        '3': '3',\n        '4': '4',\n        '5': '5',\n        '6': '6',\n        '7': '7',\n        '8': '8',\n        '9': '9',\n        '0': '0'\n    }, pluralForm = function (n) {\n        return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n    }, plurals = {\n        s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n        m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n        h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n        d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n        M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n        y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n    }, pluralize = function (u) {\n        return function (number, withoutSuffix, string, isFuture) {\n            var f = pluralForm(number),\n                str = plurals[u][pluralForm(number)];\n            if (f === 2) {\n                str = str[withoutSuffix ? 0 : 1];\n            }\n            return str.replace(/%d/i, number);\n        };\n    }, months = [\n        'يناير',\n        'فبراير',\n        'مارس',\n        'أبريل',\n        'مايو',\n        'يونيو',\n        'يوليو',\n        'أغسطس',\n        'سبتمبر',\n        'أكتوبر',\n        'نوفمبر',\n        'ديسمبر'\n    ];\n\n    var ar_ly = moment.defineLocale('ar-ly', {\n        months : months,\n        monthsShort : months,\n        weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'D/\\u200FM/\\u200FYYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        meridiemParse: /ص|م/,\n        isPM : function (input) {\n            return 'م' === input;\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar : {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'بعد %s',\n            past : 'منذ %s',\n            s : pluralize('s'),\n            m : pluralize('m'),\n            mm : pluralize('m'),\n            h : pluralize('h'),\n            hh : pluralize('h'),\n            d : pluralize('d'),\n            dd : pluralize('d'),\n            M : pluralize('M'),\n            MM : pluralize('M'),\n            y : pluralize('y'),\n            yy : pluralize('y')\n        },\n        preparse: function (string) {\n            return string.replace(/\\u200f/g, '').replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            }).replace(/,/g, '،');\n        },\n        week : {\n            dow : 6, // Saturday is the first day of the week.\n            doy : 12  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ar_ly;\n\n}));","//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ar_ma = moment.defineLocale('ar-ma', {\n        months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n        monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n        weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'في %s',\n            past : 'منذ %s',\n            s : 'ثوان',\n            m : 'دقيقة',\n            mm : '%d دقائق',\n            h : 'ساعة',\n            hh : '%d ساعات',\n            d : 'يوم',\n            dd : '%d أيام',\n            M : 'شهر',\n            MM : '%d أشهر',\n            y : 'سنة',\n            yy : '%d سنوات'\n        },\n        week : {\n            dow : 6, // Saturday is the first day of the week.\n            doy : 12  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ar_ma;\n\n}));","//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '١',\n        '2': '٢',\n        '3': '٣',\n        '4': '٤',\n        '5': '٥',\n        '6': '٦',\n        '7': '٧',\n        '8': '٨',\n        '9': '٩',\n        '0': '٠'\n    }, numberMap = {\n        '١': '1',\n        '٢': '2',\n        '٣': '3',\n        '٤': '4',\n        '٥': '5',\n        '٦': '6',\n        '٧': '7',\n        '٨': '8',\n        '٩': '9',\n        '٠': '0'\n    };\n\n    var ar_sa = moment.defineLocale('ar-sa', {\n        months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n        monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n        weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        meridiemParse: /ص|م/,\n        isPM : function (input) {\n            return 'م' === input;\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar : {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'في %s',\n            past : 'منذ %s',\n            s : 'ثوان',\n            m : 'دقيقة',\n            mm : '%d دقائق',\n            h : 'ساعة',\n            hh : '%d ساعات',\n            d : 'يوم',\n            dd : '%d أيام',\n            M : 'شهر',\n            MM : '%d أشهر',\n            y : 'سنة',\n            yy : '%d سنوات'\n        },\n        preparse: function (string) {\n            return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                return numberMap[match];\n            }).replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            }).replace(/,/g, '،');\n        },\n        week : {\n            dow : 6, // Saturday is the first day of the week.\n            doy : 12  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ar_sa;\n\n}));","//! moment.js locale configuration\n//! locale  :  Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ar_tn = moment.defineLocale('ar-tn', {\n        months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n        monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar: {\n            sameDay: '[اليوم على الساعة] LT',\n            nextDay: '[غدا على الساعة] LT',\n            nextWeek: 'dddd [على الساعة] LT',\n            lastDay: '[أمس على الساعة] LT',\n            lastWeek: 'dddd [على الساعة] LT',\n            sameElse: 'L'\n        },\n        relativeTime: {\n            future: 'في %s',\n            past: 'منذ %s',\n            s: 'ثوان',\n            m: 'دقيقة',\n            mm: '%d دقائق',\n            h: 'ساعة',\n            hh: '%d ساعات',\n            d: 'يوم',\n            dd: '%d أيام',\n            M: 'شهر',\n            MM: '%d أشهر',\n            y: 'سنة',\n            yy: '%d سنوات'\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4 // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return ar_tn;\n\n}));","//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '١',\n        '2': '٢',\n        '3': '٣',\n        '4': '٤',\n        '5': '٥',\n        '6': '٦',\n        '7': '٧',\n        '8': '٨',\n        '9': '٩',\n        '0': '٠'\n    }, numberMap = {\n        '١': '1',\n        '٢': '2',\n        '٣': '3',\n        '٤': '4',\n        '٥': '5',\n        '٦': '6',\n        '٧': '7',\n        '٨': '8',\n        '٩': '9',\n        '٠': '0'\n    }, pluralForm = function (n) {\n        return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n    }, plurals = {\n        s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n        m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n        h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n        d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n        M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n        y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n    }, pluralize = function (u) {\n        return function (number, withoutSuffix, string, isFuture) {\n            var f = pluralForm(number),\n                str = plurals[u][pluralForm(number)];\n            if (f === 2) {\n                str = str[withoutSuffix ? 0 : 1];\n            }\n            return str.replace(/%d/i, number);\n        };\n    }, months = [\n        'كانون الثاني يناير',\n        'شباط فبراير',\n        'آذار مارس',\n        'نيسان أبريل',\n        'أيار مايو',\n        'حزيران يونيو',\n        'تموز يوليو',\n        'آب أغسطس',\n        'أيلول سبتمبر',\n        'تشرين الأول أكتوبر',\n        'تشرين الثاني نوفمبر',\n        'كانون الأول ديسمبر'\n    ];\n\n    var ar = moment.defineLocale('ar', {\n        months : months,\n        monthsShort : months,\n        weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'D/\\u200FM/\\u200FYYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        meridiemParse: /ص|م/,\n        isPM : function (input) {\n            return 'م' === input;\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar : {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'بعد %s',\n            past : 'منذ %s',\n            s : pluralize('s'),\n            m : pluralize('m'),\n            mm : pluralize('m'),\n            h : pluralize('h'),\n            hh : pluralize('h'),\n            d : pluralize('d'),\n            dd : pluralize('d'),\n            M : pluralize('M'),\n            MM : pluralize('M'),\n            y : pluralize('y'),\n            yy : pluralize('y')\n        },\n        preparse: function (string) {\n            return string.replace(/\\u200f/g, '').replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                return numberMap[match];\n            }).replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            }).replace(/,/g, '،');\n        },\n        week : {\n            dow : 6, // Saturday is the first day of the week.\n            doy : 12  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ar;\n\n}));","//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var suffixes = {\n        1: '-inci',\n        5: '-inci',\n        8: '-inci',\n        70: '-inci',\n        80: '-inci',\n        2: '-nci',\n        7: '-nci',\n        20: '-nci',\n        50: '-nci',\n        3: '-üncü',\n        4: '-üncü',\n        100: '-üncü',\n        6: '-ncı',\n        9: '-uncu',\n        10: '-uncu',\n        30: '-uncu',\n        60: '-ıncı',\n        90: '-ıncı'\n    };\n\n    var az = moment.defineLocale('az', {\n        months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),\n        monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n        weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),\n        weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n        weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[bugün saat] LT',\n            nextDay : '[sabah saat] LT',\n            nextWeek : '[gələn həftə] dddd [saat] LT',\n            lastDay : '[dünən] LT',\n            lastWeek : '[keçən həftə] dddd [saat] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s sonra',\n            past : '%s əvvəl',\n            s : 'birneçə saniyyə',\n            m : 'bir dəqiqə',\n            mm : '%d dəqiqə',\n            h : 'bir saat',\n            hh : '%d saat',\n            d : 'bir gün',\n            dd : '%d gün',\n            M : 'bir ay',\n            MM : '%d ay',\n            y : 'bir il',\n            yy : '%d il'\n        },\n        meridiemParse: /gecə|səhər|gündüz|axşam/,\n        isPM : function (input) {\n            return /^(gündüz|axşam)$/.test(input);\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'gecə';\n            } else if (hour < 12) {\n                return 'səhər';\n            } else if (hour < 17) {\n                return 'gündüz';\n            } else {\n                return 'axşam';\n            }\n        },\n        ordinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n        ordinal : function (number) {\n            if (number === 0) {  // special case for zero\n                return number + '-ıncı';\n            }\n            var a = number % 10,\n                b = number % 100 - a,\n                c = number >= 100 ? 100 : null;\n            return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return az;\n\n}));","//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n            'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n            'dd': 'дзень_дні_дзён',\n            'MM': 'месяц_месяцы_месяцаў',\n            'yy': 'год_гады_гадоў'\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвіліна' : 'хвіліну';\n        }\n        else if (key === 'h') {\n            return withoutSuffix ? 'гадзіна' : 'гадзіну';\n        }\n        else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n\n    var be = moment.defineLocale('be', {\n        months : {\n            format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),\n            standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')\n        },\n        monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n        weekdays : {\n            format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),\n            standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),\n            isFormat: /\\[ ?[Вв] ?(?:мінулую|наступную)? ?\\] ?dddd/\n        },\n        weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY г.',\n            LLL : 'D MMMM YYYY г., HH:mm',\n            LLLL : 'dddd, D MMMM YYYY г., HH:mm'\n        },\n        calendar : {\n            sameDay: '[Сёння ў] LT',\n            nextDay: '[Заўтра ў] LT',\n            lastDay: '[Учора ў] LT',\n            nextWeek: function () {\n                return '[У] dddd [ў] LT';\n            },\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return '[У мінулую] dddd [ў] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                        return '[У мінулы] dddd [ў] LT';\n                }\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'праз %s',\n            past : '%s таму',\n            s : 'некалькі секунд',\n            m : relativeTimeWithPlural,\n            mm : relativeTimeWithPlural,\n            h : relativeTimeWithPlural,\n            hh : relativeTimeWithPlural,\n            d : 'дзень',\n            dd : relativeTimeWithPlural,\n            M : 'месяц',\n            MM : relativeTimeWithPlural,\n            y : 'год',\n            yy : relativeTimeWithPlural\n        },\n        meridiemParse: /ночы|раніцы|дня|вечара/,\n        isPM : function (input) {\n            return /^(дня|вечара)$/.test(input);\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночы';\n            } else if (hour < 12) {\n                return 'раніцы';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечара';\n            }\n        },\n        ordinalParse: /\\d{1,2}-(і|ы|га)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы';\n                case 'D':\n                    return number + '-га';\n                default:\n                    return number;\n            }\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return be;\n\n}));","//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var bg = moment.defineLocale('bg', {\n        months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),\n        monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),\n        weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n        weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'D.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY H:mm',\n            LLLL : 'dddd, D MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay : '[Днес в] LT',\n            nextDay : '[Утре в] LT',\n            nextWeek : 'dddd [в] LT',\n            lastDay : '[Вчера в] LT',\n            lastWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[В изминалата] dddd [в] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[В изминалия] dddd [в] LT';\n                }\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'след %s',\n            past : 'преди %s',\n            s : 'няколко секунди',\n            m : 'минута',\n            mm : '%d минути',\n            h : 'час',\n            hh : '%d часа',\n            d : 'ден',\n            dd : '%d дни',\n            M : 'месец',\n            MM : '%d месеца',\n            y : 'година',\n            yy : '%d години'\n        },\n        ordinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal : function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return bg;\n\n}));","//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '১',\n        '2': '২',\n        '3': '৩',\n        '4': '৪',\n        '5': '৫',\n        '6': '৬',\n        '7': '৭',\n        '8': '৮',\n        '9': '৯',\n        '0': '০'\n    },\n    numberMap = {\n        '১': '1',\n        '২': '2',\n        '৩': '3',\n        '৪': '4',\n        '৫': '5',\n        '৬': '6',\n        '৭': '7',\n        '৮': '8',\n        '৯': '9',\n        '০': '0'\n    };\n\n    var bn = moment.defineLocale('bn', {\n        months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n        monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n        weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n        weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n        weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),\n        longDateFormat : {\n            LT : 'A h:mm সময়',\n            LTS : 'A h:mm:ss সময়',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, A h:mm সময়',\n            LLLL : 'dddd, D MMMM YYYY, A h:mm সময়'\n        },\n        calendar : {\n            sameDay : '[আজ] LT',\n            nextDay : '[আগামীকাল] LT',\n            nextWeek : 'dddd, LT',\n            lastDay : '[গতকাল] LT',\n            lastWeek : '[গত] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s পরে',\n            past : '%s আগে',\n            s : 'কয়েক সেকেন্ড',\n            m : 'এক মিনিট',\n            mm : '%d মিনিট',\n            h : 'এক ঘন্টা',\n            hh : '%d ঘন্টা',\n            d : 'এক দিন',\n            dd : '%d দিন',\n            M : 'এক মাস',\n            MM : '%d মাস',\n            y : 'এক বছর',\n            yy : '%d বছর'\n        },\n        preparse: function (string) {\n            return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if ((meridiem === 'রাত' && hour >= 4) ||\n                    (meridiem === 'দুপুর' && hour < 5) ||\n                    meridiem === 'বিকাল') {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'রাত';\n            } else if (hour < 10) {\n                return 'সকাল';\n            } else if (hour < 17) {\n                return 'দুপুর';\n            } else if (hour < 20) {\n                return 'বিকাল';\n            } else {\n                return 'রাত';\n            }\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return bn;\n\n}));","//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '༡',\n        '2': '༢',\n        '3': '༣',\n        '4': '༤',\n        '5': '༥',\n        '6': '༦',\n        '7': '༧',\n        '8': '༨',\n        '9': '༩',\n        '0': '༠'\n    },\n    numberMap = {\n        '༡': '1',\n        '༢': '2',\n        '༣': '3',\n        '༤': '4',\n        '༥': '5',\n        '༦': '6',\n        '༧': '7',\n        '༨': '8',\n        '༩': '9',\n        '༠': '0'\n    };\n\n    var bo = moment.defineLocale('bo', {\n        months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n        monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n        weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),\n        weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n        weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n        longDateFormat : {\n            LT : 'A h:mm',\n            LTS : 'A h:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, A h:mm',\n            LLLL : 'dddd, D MMMM YYYY, A h:mm'\n        },\n        calendar : {\n            sameDay : '[དི་རིང] LT',\n            nextDay : '[སང་ཉིན] LT',\n            nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT',\n            lastDay : '[ཁ་སང] LT',\n            lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s ལ་',\n            past : '%s སྔན་ལ',\n            s : 'ལམ་སང',\n            m : 'སྐར་མ་གཅིག',\n            mm : '%d སྐར་མ',\n            h : 'ཆུ་ཚོད་གཅིག',\n            hh : '%d ཆུ་ཚོད',\n            d : 'ཉིན་གཅིག',\n            dd : '%d ཉིན་',\n            M : 'ཟླ་བ་གཅིག',\n            MM : '%d ཟླ་བ',\n            y : 'ལོ་གཅིག',\n            yy : '%d ལོ'\n        },\n        preparse: function (string) {\n            return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if ((meridiem === 'མཚན་མོ' && hour >= 4) ||\n                    (meridiem === 'ཉིན་གུང' && hour < 5) ||\n                    meridiem === 'དགོང་དག') {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'མཚན་མོ';\n            } else if (hour < 10) {\n                return 'ཞོགས་ཀས';\n            } else if (hour < 17) {\n                return 'ཉིན་གུང';\n            } else if (hour < 20) {\n                return 'དགོང་དག';\n            } else {\n                return 'མཚན་མོ';\n            }\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return bo;\n\n}));","//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function relativeTimeWithMutation(number, withoutSuffix, key) {\n        var format = {\n            'mm': 'munutenn',\n            'MM': 'miz',\n            'dd': 'devezh'\n        };\n        return number + ' ' + mutation(format[key], number);\n    }\n    function specialMutationForYears(number) {\n        switch (lastNumber(number)) {\n            case 1:\n            case 3:\n            case 4:\n            case 5:\n            case 9:\n                return number + ' bloaz';\n            default:\n                return number + ' vloaz';\n        }\n    }\n    function lastNumber(number) {\n        if (number > 9) {\n            return lastNumber(number % 10);\n        }\n        return number;\n    }\n    function mutation(text, number) {\n        if (number === 2) {\n            return softMutation(text);\n        }\n        return text;\n    }\n    function softMutation(text) {\n        var mutationTable = {\n            'm': 'v',\n            'b': 'v',\n            'd': 'z'\n        };\n        if (mutationTable[text.charAt(0)] === undefined) {\n            return text;\n        }\n        return mutationTable[text.charAt(0)] + text.substring(1);\n    }\n\n    var br = moment.defineLocale('br', {\n        months : 'Genver_C\\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),\n        monthsShort : 'Gen_C\\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n        weekdays : 'Sul_Lun_Meurzh_Merc\\'her_Yaou_Gwener_Sadorn'.split('_'),\n        weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n        weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'h[e]mm A',\n            LTS : 'h[e]mm:ss A',\n            L : 'DD/MM/YYYY',\n            LL : 'D [a viz] MMMM YYYY',\n            LLL : 'D [a viz] MMMM YYYY h[e]mm A',\n            LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A'\n        },\n        calendar : {\n            sameDay : '[Hiziv da] LT',\n            nextDay : '[Warc\\'hoazh da] LT',\n            nextWeek : 'dddd [da] LT',\n            lastDay : '[Dec\\'h da] LT',\n            lastWeek : 'dddd [paset da] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'a-benn %s',\n            past : '%s \\'zo',\n            s : 'un nebeud segondennoù',\n            m : 'ur vunutenn',\n            mm : relativeTimeWithMutation,\n            h : 'un eur',\n            hh : '%d eur',\n            d : 'un devezh',\n            dd : relativeTimeWithMutation,\n            M : 'ur miz',\n            MM : relativeTimeWithMutation,\n            y : 'ur bloaz',\n            yy : specialMutationForYears\n        },\n        ordinalParse: /\\d{1,2}(añ|vet)/,\n        ordinal : function (number) {\n            var output = (number === 1) ? 'añ' : 'vet';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return br;\n\n}));","//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var bs = moment.defineLocale('bs', {\n        months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),\n        monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n        weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY H:mm',\n            LLLL : 'dddd, D. MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay  : '[danas u] LT',\n            nextDay  : '[sutra u] LT',\n            nextWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay  : '[jučer u] LT',\n            lastWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                        return '[prošlu] dddd [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'za %s',\n            past   : 'prije %s',\n            s      : 'par sekundi',\n            m      : translate,\n            mm     : translate,\n            h      : translate,\n            hh     : translate,\n            d      : 'dan',\n            dd     : translate,\n            M      : 'mjesec',\n            MM     : translate,\n            y      : 'godinu',\n            yy     : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return bs;\n\n}));","//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ca = moment.defineLocale('ca', {\n        months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),\n        monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),\n        weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n        weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY H:mm',\n            LLLL : 'dddd D MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay : function () {\n                return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n            },\n            nextDay : function () {\n                return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n            },\n            nextWeek : function () {\n                return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n            },\n            lastDay : function () {\n                return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n            },\n            lastWeek : function () {\n                return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'en %s',\n            past : 'fa %s',\n            s : 'uns segons',\n            m : 'un minut',\n            mm : '%d minuts',\n            h : 'una hora',\n            hh : '%d hores',\n            d : 'un dia',\n            dd : '%d dies',\n            M : 'un mes',\n            MM : '%d mesos',\n            y : 'un any',\n            yy : '%d anys'\n        },\n        ordinalParse: /\\d{1,2}(r|n|t|è|a)/,\n        ordinal : function (number, period) {\n            var output = (number === 1) ? 'r' :\n                (number === 2) ? 'n' :\n                (number === 3) ? 'r' :\n                (number === 4) ? 't' : 'è';\n            if (period === 'w' || period === 'W') {\n                output = 'a';\n            }\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return ca;\n\n}));","//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),\n        monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');\n    function plural(n) {\n        return (n > 1) && (n < 5) && (~~(n / 10) !== 1);\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':  // a few seconds / in a few seconds / a few seconds ago\n                return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';\n            case 'm':  // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minuty' : 'minut');\n                } else {\n                    return result + 'minutami';\n                }\n                break;\n            case 'h':  // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodin');\n                } else {\n                    return result + 'hodinami';\n                }\n                break;\n            case 'd':  // a day / in a day / a day ago\n                return (withoutSuffix || isFuture) ? 'den' : 'dnem';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dny' : 'dní');\n                } else {\n                    return result + 'dny';\n                }\n                break;\n            case 'M':  // a month / in a month / a month ago\n                return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'měsíce' : 'měsíců');\n                } else {\n                    return result + 'měsíci';\n                }\n                break;\n            case 'y':  // a year / in a year / a year ago\n                return (withoutSuffix || isFuture) ? 'rok' : 'rokem';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'let');\n                } else {\n                    return result + 'lety';\n                }\n                break;\n        }\n    }\n\n    var cs = moment.defineLocale('cs', {\n        months : months,\n        monthsShort : monthsShort,\n        monthsParse : (function (months, monthsShort) {\n            var i, _monthsParse = [];\n            for (i = 0; i < 12; i++) {\n                // use custom parser to solve problem with July (červenec)\n                _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');\n            }\n            return _monthsParse;\n        }(months, monthsShort)),\n        shortMonthsParse : (function (monthsShort) {\n            var i, _shortMonthsParse = [];\n            for (i = 0; i < 12; i++) {\n                _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');\n            }\n            return _shortMonthsParse;\n        }(monthsShort)),\n        longMonthsParse : (function (months) {\n            var i, _longMonthsParse = [];\n            for (i = 0; i < 12; i++) {\n                _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');\n            }\n            return _longMonthsParse;\n        }(months)),\n        weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n        weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),\n        weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),\n        longDateFormat : {\n            LT: 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY H:mm',\n            LLLL : 'dddd D. MMMM YYYY H:mm',\n            l : 'D. M. YYYY'\n        },\n        calendar : {\n            sameDay: '[dnes v] LT',\n            nextDay: '[zítra v] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [v] LT';\n                    case 3:\n                        return '[ve středu v] LT';\n                    case 4:\n                        return '[ve čtvrtek v] LT';\n                    case 5:\n                        return '[v pátek v] LT';\n                    case 6:\n                        return '[v sobotu v] LT';\n                }\n            },\n            lastDay: '[včera v] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulou neděli v] LT';\n                    case 1:\n                    case 2:\n                        return '[minulé] dddd [v] LT';\n                    case 3:\n                        return '[minulou středu v] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [v] LT';\n                    case 6:\n                        return '[minulou sobotu v] LT';\n                }\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'za %s',\n            past : 'před %s',\n            s : translate,\n            m : translate,\n            mm : translate,\n            h : translate,\n            hh : translate,\n            d : translate,\n            dd : translate,\n            M : translate,\n            MM : translate,\n            y : translate,\n            yy : translate\n        },\n        ordinalParse : /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return cs;\n\n}));","//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var cv = moment.defineLocale('cv', {\n        months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),\n        monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n        weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),\n        weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n        weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD-MM-YYYY',\n            LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n            LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n            LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'\n        },\n        calendar : {\n            sameDay: '[Паян] LT [сехетре]',\n            nextDay: '[Ыран] LT [сехетре]',\n            lastDay: '[Ӗнер] LT [сехетре]',\n            nextWeek: '[Ҫитес] dddd LT [сехетре]',\n            lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : function (output) {\n                var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';\n                return output + affix;\n            },\n            past : '%s каялла',\n            s : 'пӗр-ик ҫеккунт',\n            m : 'пӗр минут',\n            mm : '%d минут',\n            h : 'пӗр сехет',\n            hh : '%d сехет',\n            d : 'пӗр кун',\n            dd : '%d кун',\n            M : 'пӗр уйӑх',\n            MM : '%d уйӑх',\n            y : 'пӗр ҫул',\n            yy : '%d ҫул'\n        },\n        ordinalParse: /\\d{1,2}-мӗш/,\n        ordinal : '%d-мӗш',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return cv;\n\n}));","//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var cy = moment.defineLocale('cy', {\n        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),\n        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),\n        weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),\n        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n        weekdaysParseExact : true,\n        // time formats are the same as en-gb\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar: {\n            sameDay: '[Heddiw am] LT',\n            nextDay: '[Yfory am] LT',\n            nextWeek: 'dddd [am] LT',\n            lastDay: '[Ddoe am] LT',\n            lastWeek: 'dddd [diwethaf am] LT',\n            sameElse: 'L'\n        },\n        relativeTime: {\n            future: 'mewn %s',\n            past: '%s yn ôl',\n            s: 'ychydig eiliadau',\n            m: 'munud',\n            mm: '%d munud',\n            h: 'awr',\n            hh: '%d awr',\n            d: 'diwrnod',\n            dd: '%d diwrnod',\n            M: 'mis',\n            MM: '%d mis',\n            y: 'blwyddyn',\n            yy: '%d flynedd'\n        },\n        ordinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n        ordinal: function (number) {\n            var b = number,\n                output = '',\n                lookup = [\n                    '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed\n                    'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed\n                ];\n            if (b > 20) {\n                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n                    output = 'fed'; // not 30ain, 70ain or 90ain\n                } else {\n                    output = 'ain';\n                }\n            } else if (b > 0) {\n                output = lookup[b];\n            }\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return cy;\n\n}));","//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var da = moment.defineLocale('da', {\n        months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),\n        monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n        weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY HH:mm',\n            LLLL : 'dddd [d.] D. MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[I dag kl.] LT',\n            nextDay : '[I morgen kl.] LT',\n            nextWeek : 'dddd [kl.] LT',\n            lastDay : '[I går kl.] LT',\n            lastWeek : '[sidste] dddd [kl] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'om %s',\n            past : '%s siden',\n            s : 'få sekunder',\n            m : 'et minut',\n            mm : '%d minutter',\n            h : 'en time',\n            hh : '%d timer',\n            d : 'en dag',\n            dd : '%d dage',\n            M : 'en måned',\n            MM : '%d måneder',\n            y : 'et år',\n            yy : '%d år'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return da;\n\n}));","//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            'm': ['eine Minute', 'einer Minute'],\n            'h': ['eine Stunde', 'einer Stunde'],\n            'd': ['ein Tag', 'einem Tag'],\n            'dd': [number + ' Tage', number + ' Tagen'],\n            'M': ['ein Monat', 'einem Monat'],\n            'MM': [number + ' Monate', number + ' Monaten'],\n            'y': ['ein Jahr', 'einem Jahr'],\n            'yy': [number + ' Jahre', number + ' Jahren']\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var de_at = moment.defineLocale('de-at', {\n        months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n        monthsShort : 'Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n        weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY HH:mm',\n            LLLL : 'dddd, D. MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]'\n        },\n        relativeTime : {\n            future : 'in %s',\n            past : 'vor %s',\n            s : 'ein paar Sekunden',\n            m : processRelativeTime,\n            mm : '%d Minuten',\n            h : processRelativeTime,\n            hh : '%d Stunden',\n            d : processRelativeTime,\n            dd : processRelativeTime,\n            M : processRelativeTime,\n            MM : processRelativeTime,\n            y : processRelativeTime,\n            yy : processRelativeTime\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return de_at;\n\n}));","//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            'm': ['eine Minute', 'einer Minute'],\n            'h': ['eine Stunde', 'einer Stunde'],\n            'd': ['ein Tag', 'einem Tag'],\n            'dd': [number + ' Tage', number + ' Tagen'],\n            'M': ['ein Monat', 'einem Monat'],\n            'MM': [number + ' Monate', number + ' Monaten'],\n            'y': ['ein Jahr', 'einem Jahr'],\n            'yy': [number + ' Jahre', number + ' Jahren']\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n\n    var de = moment.defineLocale('de', {\n        months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n        monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n        weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n        weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY HH:mm',\n            LLLL : 'dddd, D. MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[heute um] LT [Uhr]',\n            sameElse: 'L',\n            nextDay: '[morgen um] LT [Uhr]',\n            nextWeek: 'dddd [um] LT [Uhr]',\n            lastDay: '[gestern um] LT [Uhr]',\n            lastWeek: '[letzten] dddd [um] LT [Uhr]'\n        },\n        relativeTime : {\n            future : 'in %s',\n            past : 'vor %s',\n            s : 'ein paar Sekunden',\n            m : processRelativeTime,\n            mm : '%d Minuten',\n            h : processRelativeTime,\n            hh : '%d Stunden',\n            d : processRelativeTime,\n            dd : processRelativeTime,\n            M : processRelativeTime,\n            MM : processRelativeTime,\n            y : processRelativeTime,\n            yy : processRelativeTime\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return de;\n\n}));","//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var months = [\n        'ޖެނުއަރީ',\n        'ފެބްރުއަރީ',\n        'މާރިޗު',\n        'އޭޕްރީލު',\n        'މޭ',\n        'ޖޫން',\n        'ޖުލައި',\n        'އޯގަސްޓު',\n        'ސެޕްޓެމްބަރު',\n        'އޮކްޓޯބަރު',\n        'ނޮވެމްބަރު',\n        'ޑިސެމްބަރު'\n    ], weekdays = [\n        'އާދިއްތަ',\n        'ހޯމަ',\n        'އަންގާރަ',\n        'ބުދަ',\n        'ބުރާސްފަތި',\n        'ހުކުރު',\n        'ހޮނިހިރު'\n    ];\n\n    var dv = moment.defineLocale('dv', {\n        months : months,\n        monthsShort : months,\n        weekdays : weekdays,\n        weekdaysShort : weekdays,\n        weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n        longDateFormat : {\n\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'D/M/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        meridiemParse: /މކ|މފ/,\n        isPM : function (input) {\n            return 'މފ' === input;\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'މކ';\n            } else {\n                return 'މފ';\n            }\n        },\n        calendar : {\n            sameDay : '[މިއަދު] LT',\n            nextDay : '[މާދަމާ] LT',\n            nextWeek : 'dddd LT',\n            lastDay : '[އިއްޔެ] LT',\n            lastWeek : '[ފާއިތުވި] dddd LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'ތެރޭގައި %s',\n            past : 'ކުރިން %s',\n            s : 'ސިކުންތުކޮޅެއް',\n            m : 'މިނިޓެއް',\n            mm : 'މިނިޓު %d',\n            h : 'ގަޑިއިރެއް',\n            hh : 'ގަޑިއިރު %d',\n            d : 'ދުވަހެއް',\n            dd : 'ދުވަސް %d',\n            M : 'މަހެއް',\n            MM : 'މަސް %d',\n            y : 'އަހަރެއް',\n            yy : 'އަހަރު %d'\n        },\n        preparse: function (string) {\n            return string.replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/,/g, '،');\n        },\n        week : {\n            dow : 7,  // Sunday is the first day of the week.\n            doy : 12  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return dv;\n\n}));","//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n    function isFunction(input) {\n        return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n    }\n\n\n    var el = moment.defineLocale('el', {\n        monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),\n        monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),\n        months : function (momentToFormat, format) {\n            if (/D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'\n                return this._monthsGenitiveEl[momentToFormat.month()];\n            } else {\n                return this._monthsNominativeEl[momentToFormat.month()];\n            }\n        },\n        monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n        weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),\n        weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n        weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n        meridiem : function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'μμ' : 'ΜΜ';\n            } else {\n                return isLower ? 'πμ' : 'ΠΜ';\n            }\n        },\n        isPM : function (input) {\n            return ((input + '').toLowerCase()[0] === 'μ');\n        },\n        meridiemParse : /[ΠΜ]\\.?Μ?\\.?/i,\n        longDateFormat : {\n            LT : 'h:mm A',\n            LTS : 'h:mm:ss A',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY h:mm A',\n            LLLL : 'dddd, D MMMM YYYY h:mm A'\n        },\n        calendarEl : {\n            sameDay : '[Σήμερα {}] LT',\n            nextDay : '[Αύριο {}] LT',\n            nextWeek : 'dddd [{}] LT',\n            lastDay : '[Χθες {}] LT',\n            lastWeek : function () {\n                switch (this.day()) {\n                    case 6:\n                        return '[το προηγούμενο] dddd [{}] LT';\n                    default:\n                        return '[την προηγούμενη] dddd [{}] LT';\n                }\n            },\n            sameElse : 'L'\n        },\n        calendar : function (key, mom) {\n            var output = this._calendarEl[key],\n                hours = mom && mom.hours();\n            if (isFunction(output)) {\n                output = output.apply(mom);\n            }\n            return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));\n        },\n        relativeTime : {\n            future : 'σε %s',\n            past : '%s πριν',\n            s : 'λίγα δευτερόλεπτα',\n            m : 'ένα λεπτό',\n            mm : '%d λεπτά',\n            h : 'μία ώρα',\n            hh : '%d ώρες',\n            d : 'μία μέρα',\n            dd : '%d μέρες',\n            M : 'ένας μήνας',\n            MM : '%d μήνες',\n            y : 'ένας χρόνος',\n            yy : '%d χρόνια'\n        },\n        ordinalParse: /\\d{1,2}η/,\n        ordinal: '%dη',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4st is the first week of the year.\n        }\n    });\n\n    return el;\n\n}));","//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var en_au = moment.defineLocale('en-au', {\n        months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n        monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat : {\n            LT : 'h:mm A',\n            LTS : 'h:mm:ss A',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY h:mm A',\n            LLLL : 'dddd, D MMMM YYYY h:mm A'\n        },\n        calendar : {\n            sameDay : '[Today at] LT',\n            nextDay : '[Tomorrow at] LT',\n            nextWeek : 'dddd [at] LT',\n            lastDay : '[Yesterday at] LT',\n            lastWeek : '[Last] dddd [at] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'in %s',\n            past : '%s ago',\n            s : 'a few seconds',\n            m : 'a minute',\n            mm : '%d minutes',\n            h : 'an hour',\n            hh : '%d hours',\n            d : 'a day',\n            dd : '%d days',\n            M : 'a month',\n            MM : '%d months',\n            y : 'a year',\n            yy : '%d years'\n        },\n        ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (~~(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return en_au;\n\n}));","//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var en_ca = moment.defineLocale('en-ca', {\n        months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n        monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat : {\n            LT : 'h:mm A',\n            LTS : 'h:mm:ss A',\n            L : 'YYYY-MM-DD',\n            LL : 'MMMM D, YYYY',\n            LLL : 'MMMM D, YYYY h:mm A',\n            LLLL : 'dddd, MMMM D, YYYY h:mm A'\n        },\n        calendar : {\n            sameDay : '[Today at] LT',\n            nextDay : '[Tomorrow at] LT',\n            nextWeek : 'dddd [at] LT',\n            lastDay : '[Yesterday at] LT',\n            lastWeek : '[Last] dddd [at] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'in %s',\n            past : '%s ago',\n            s : 'a few seconds',\n            m : 'a minute',\n            mm : '%d minutes',\n            h : 'an hour',\n            hh : '%d hours',\n            d : 'a day',\n            dd : '%d days',\n            M : 'a month',\n            MM : '%d months',\n            y : 'a year',\n            yy : '%d years'\n        },\n        ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (~~(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        }\n    });\n\n    return en_ca;\n\n}));","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var en_gb = moment.defineLocale('en-gb', {\n        months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n        monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[Today at] LT',\n            nextDay : '[Tomorrow at] LT',\n            nextWeek : 'dddd [at] LT',\n            lastDay : '[Yesterday at] LT',\n            lastWeek : '[Last] dddd [at] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'in %s',\n            past : '%s ago',\n            s : 'a few seconds',\n            m : 'a minute',\n            mm : '%d minutes',\n            h : 'an hour',\n            hh : '%d hours',\n            d : 'a day',\n            dd : '%d days',\n            M : 'a month',\n            MM : '%d months',\n            y : 'a year',\n            yy : '%d years'\n        },\n        ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (~~(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return en_gb;\n\n}));","//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var en_ie = moment.defineLocale('en-ie', {\n        months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n        monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD-MM-YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[Today at] LT',\n            nextDay : '[Tomorrow at] LT',\n            nextWeek : 'dddd [at] LT',\n            lastDay : '[Yesterday at] LT',\n            lastWeek : '[Last] dddd [at] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'in %s',\n            past : '%s ago',\n            s : 'a few seconds',\n            m : 'a minute',\n            mm : '%d minutes',\n            h : 'an hour',\n            hh : '%d hours',\n            d : 'a day',\n            dd : '%d days',\n            M : 'a month',\n            MM : '%d months',\n            y : 'a year',\n            yy : '%d years'\n        },\n        ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (~~(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return en_ie;\n\n}));","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var en_nz = moment.defineLocale('en-nz', {\n        months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n        monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        longDateFormat : {\n            LT : 'h:mm A',\n            LTS : 'h:mm:ss A',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY h:mm A',\n            LLLL : 'dddd, D MMMM YYYY h:mm A'\n        },\n        calendar : {\n            sameDay : '[Today at] LT',\n            nextDay : '[Tomorrow at] LT',\n            nextWeek : 'dddd [at] LT',\n            lastDay : '[Yesterday at] LT',\n            lastWeek : '[Last] dddd [at] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'in %s',\n            past : '%s ago',\n            s : 'a few seconds',\n            m : 'a minute',\n            mm : '%d minutes',\n            h : 'an hour',\n            hh : '%d hours',\n            d : 'a day',\n            dd : '%d days',\n            M : 'a month',\n            MM : '%d months',\n            y : 'a year',\n            yy : '%d years'\n        },\n        ordinalParse: /\\d{1,2}(st|nd|rd|th)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (~~(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return en_nz;\n\n}));","//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! komento: Mi estas malcerta se mi korekte traktis akuzativojn en tiu traduko.\n//!          Se ne, bonvolu korekti kaj avizi min por ke mi povas lerni!\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var eo = moment.defineLocale('eo', {\n        months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),\n        monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),\n        weekdays : 'Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato'.split('_'),\n        weekdaysShort : 'Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab'.split('_'),\n        weekdaysMin : 'Di_Lu_Ma_Me_Ĵa_Ve_Sa'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'YYYY-MM-DD',\n            LL : 'D[-an de] MMMM, YYYY',\n            LLL : 'D[-an de] MMMM, YYYY HH:mm',\n            LLLL : 'dddd, [la] D[-an de] MMMM, YYYY HH:mm'\n        },\n        meridiemParse: /[ap]\\.t\\.m/i,\n        isPM: function (input) {\n            return input.charAt(0).toLowerCase() === 'p';\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'p.t.m.' : 'P.T.M.';\n            } else {\n                return isLower ? 'a.t.m.' : 'A.T.M.';\n            }\n        },\n        calendar : {\n            sameDay : '[Hodiaŭ je] LT',\n            nextDay : '[Morgaŭ je] LT',\n            nextWeek : 'dddd [je] LT',\n            lastDay : '[Hieraŭ je] LT',\n            lastWeek : '[pasinta] dddd [je] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'je %s',\n            past : 'antaŭ %s',\n            s : 'sekundoj',\n            m : 'minuto',\n            mm : '%d minutoj',\n            h : 'horo',\n            hh : '%d horoj',\n            d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo\n            dd : '%d tagoj',\n            M : 'monato',\n            MM : '%d monatoj',\n            y : 'jaro',\n            yy : '%d jaroj'\n        },\n        ordinalParse: /\\d{1,2}a/,\n        ordinal : '%da',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return eo;\n\n}));","//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\n    var es_do = moment.defineLocale('es-do', {\n        months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n        monthsShort : function (m, format) {\n            if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsParseExact : true,\n        weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'h:mm A',\n            LTS : 'h:mm:ss A',\n            L : 'DD/MM/YYYY',\n            LL : 'D [de] MMMM [de] YYYY',\n            LLL : 'D [de] MMMM [de] YYYY h:mm A',\n            LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A'\n        },\n        calendar : {\n            sameDay : function () {\n                return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            nextDay : function () {\n                return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            nextWeek : function () {\n                return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            lastDay : function () {\n                return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            lastWeek : function () {\n                return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'en %s',\n            past : 'hace %s',\n            s : 'unos segundos',\n            m : 'un minuto',\n            mm : '%d minutos',\n            h : 'una hora',\n            hh : '%d horas',\n            d : 'un día',\n            dd : '%d días',\n            M : 'un mes',\n            MM : '%d meses',\n            y : 'un año',\n            yy : '%d años'\n        },\n        ordinalParse : /\\d{1,2}º/,\n        ordinal : '%dº',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return es_do;\n\n}));","//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n        monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\n    var es = moment.defineLocale('es', {\n        months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n        monthsShort : function (m, format) {\n            if (/-MMM-/.test(format)) {\n                return monthsShort[m.month()];\n            } else {\n                return monthsShortDot[m.month()];\n            }\n        },\n        monthsParseExact : true,\n        weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n        weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n        weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D [de] MMMM [de] YYYY',\n            LLL : 'D [de] MMMM [de] YYYY H:mm',\n            LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'\n        },\n        calendar : {\n            sameDay : function () {\n                return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            nextDay : function () {\n                return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            nextWeek : function () {\n                return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            lastDay : function () {\n                return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            lastWeek : function () {\n                return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'en %s',\n            past : 'hace %s',\n            s : 'unos segundos',\n            m : 'un minuto',\n            mm : '%d minutos',\n            h : 'una hora',\n            hh : '%d horas',\n            d : 'un día',\n            dd : '%d días',\n            M : 'un mes',\n            MM : '%d meses',\n            y : 'un año',\n            yy : '%d años'\n        },\n        ordinalParse : /\\d{1,2}º/,\n        ordinal : '%dº',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return es;\n\n}));","//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n            'm' : ['ühe minuti', 'üks minut'],\n            'mm': [number + ' minuti', number + ' minutit'],\n            'h' : ['ühe tunni', 'tund aega', 'üks tund'],\n            'hh': [number + ' tunni', number + ' tundi'],\n            'd' : ['ühe päeva', 'üks päev'],\n            'M' : ['kuu aja', 'kuu aega', 'üks kuu'],\n            'MM': [number + ' kuu', number + ' kuud'],\n            'y' : ['ühe aasta', 'aasta', 'üks aasta'],\n            'yy': [number + ' aasta', number + ' aastat']\n        };\n        if (withoutSuffix) {\n            return format[key][2] ? format[key][2] : format[key][1];\n        }\n        return isFuture ? format[key][0] : format[key][1];\n    }\n\n    var et = moment.defineLocale('et', {\n        months        : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),\n        monthsShort   : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n        weekdays      : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),\n        weekdaysShort : 'P_E_T_K_N_R_L'.split('_'),\n        weekdaysMin   : 'P_E_T_K_N_R_L'.split('_'),\n        longDateFormat : {\n            LT   : 'H:mm',\n            LTS : 'H:mm:ss',\n            L    : 'DD.MM.YYYY',\n            LL   : 'D. MMMM YYYY',\n            LLL  : 'D. MMMM YYYY H:mm',\n            LLLL : 'dddd, D. MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay  : '[Täna,] LT',\n            nextDay  : '[Homme,] LT',\n            nextWeek : '[Järgmine] dddd LT',\n            lastDay  : '[Eile,] LT',\n            lastWeek : '[Eelmine] dddd LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s pärast',\n            past   : '%s tagasi',\n            s      : processRelativeTime,\n            m      : processRelativeTime,\n            mm     : processRelativeTime,\n            h      : processRelativeTime,\n            hh     : processRelativeTime,\n            d      : processRelativeTime,\n            dd     : '%d päeva',\n            M      : processRelativeTime,\n            MM     : processRelativeTime,\n            y      : processRelativeTime,\n            yy     : processRelativeTime\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return et;\n\n}));","//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var eu = moment.defineLocale('eu', {\n        months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),\n        monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),\n        weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'),\n        weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'YYYY-MM-DD',\n            LL : 'YYYY[ko] MMMM[ren] D[a]',\n            LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n            LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n            l : 'YYYY-M-D',\n            ll : 'YYYY[ko] MMM D[a]',\n            lll : 'YYYY[ko] MMM D[a] HH:mm',\n            llll : 'ddd, YYYY[ko] MMM D[a] HH:mm'\n        },\n        calendar : {\n            sameDay : '[gaur] LT[etan]',\n            nextDay : '[bihar] LT[etan]',\n            nextWeek : 'dddd LT[etan]',\n            lastDay : '[atzo] LT[etan]',\n            lastWeek : '[aurreko] dddd LT[etan]',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s barru',\n            past : 'duela %s',\n            s : 'segundo batzuk',\n            m : 'minutu bat',\n            mm : '%d minutu',\n            h : 'ordu bat',\n            hh : '%d ordu',\n            d : 'egun bat',\n            dd : '%d egun',\n            M : 'hilabete bat',\n            MM : '%d hilabete',\n            y : 'urte bat',\n            yy : '%d urte'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return eu;\n\n}));","//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '۱',\n        '2': '۲',\n        '3': '۳',\n        '4': '۴',\n        '5': '۵',\n        '6': '۶',\n        '7': '۷',\n        '8': '۸',\n        '9': '۹',\n        '0': '۰'\n    }, numberMap = {\n        '۱': '1',\n        '۲': '2',\n        '۳': '3',\n        '۴': '4',\n        '۵': '5',\n        '۶': '6',\n        '۷': '7',\n        '۸': '8',\n        '۹': '9',\n        '۰': '0'\n    };\n\n    var fa = moment.defineLocale('fa', {\n        months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n        monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n        weekdays : 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split('_'),\n        weekdaysShort : 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split('_'),\n        weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        meridiemParse: /قبل از ظهر|بعد از ظهر/,\n        isPM: function (input) {\n            return /بعد از ظهر/.test(input);\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'قبل از ظهر';\n            } else {\n                return 'بعد از ظهر';\n            }\n        },\n        calendar : {\n            sameDay : '[امروز ساعت] LT',\n            nextDay : '[فردا ساعت] LT',\n            nextWeek : 'dddd [ساعت] LT',\n            lastDay : '[دیروز ساعت] LT',\n            lastWeek : 'dddd [پیش] [ساعت] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'در %s',\n            past : '%s پیش',\n            s : 'چندین ثانیه',\n            m : 'یک دقیقه',\n            mm : '%d دقیقه',\n            h : 'یک ساعت',\n            hh : '%d ساعت',\n            d : 'یک روز',\n            dd : '%d روز',\n            M : 'یک ماه',\n            MM : '%d ماه',\n            y : 'یک سال',\n            yy : '%d سال'\n        },\n        preparse: function (string) {\n            return string.replace(/[۰-۹]/g, function (match) {\n                return numberMap[match];\n            }).replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            }).replace(/,/g, '،');\n        },\n        ordinalParse: /\\d{1,2}م/,\n        ordinal : '%dم',\n        week : {\n            dow : 6, // Saturday is the first day of the week.\n            doy : 12 // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return fa;\n\n}));","//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),\n        numbersFuture = [\n            'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',\n            numbersPast[7], numbersPast[8], numbersPast[9]\n        ];\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = '';\n        switch (key) {\n            case 's':\n                return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n            case 'm':\n                return isFuture ? 'minuutin' : 'minuutti';\n            case 'mm':\n                result = isFuture ? 'minuutin' : 'minuuttia';\n                break;\n            case 'h':\n                return isFuture ? 'tunnin' : 'tunti';\n            case 'hh':\n                result = isFuture ? 'tunnin' : 'tuntia';\n                break;\n            case 'd':\n                return isFuture ? 'päivän' : 'päivä';\n            case 'dd':\n                result = isFuture ? 'päivän' : 'päivää';\n                break;\n            case 'M':\n                return isFuture ? 'kuukauden' : 'kuukausi';\n            case 'MM':\n                result = isFuture ? 'kuukauden' : 'kuukautta';\n                break;\n            case 'y':\n                return isFuture ? 'vuoden' : 'vuosi';\n            case 'yy':\n                result = isFuture ? 'vuoden' : 'vuotta';\n                break;\n        }\n        result = verbalNumber(number, isFuture) + ' ' + result;\n        return result;\n    }\n    function verbalNumber(number, isFuture) {\n        return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;\n    }\n\n    var fi = moment.defineLocale('fi', {\n        months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),\n        monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),\n        weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),\n        weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'),\n        weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'),\n        longDateFormat : {\n            LT : 'HH.mm',\n            LTS : 'HH.mm.ss',\n            L : 'DD.MM.YYYY',\n            LL : 'Do MMMM[ta] YYYY',\n            LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm',\n            LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n            l : 'D.M.YYYY',\n            ll : 'Do MMM YYYY',\n            lll : 'Do MMM YYYY, [klo] HH.mm',\n            llll : 'ddd, Do MMM YYYY, [klo] HH.mm'\n        },\n        calendar : {\n            sameDay : '[tänään] [klo] LT',\n            nextDay : '[huomenna] [klo] LT',\n            nextWeek : 'dddd [klo] LT',\n            lastDay : '[eilen] [klo] LT',\n            lastWeek : '[viime] dddd[na] [klo] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s päästä',\n            past : '%s sitten',\n            s : translate,\n            m : translate,\n            mm : translate,\n            h : translate,\n            hh : translate,\n            d : translate,\n            dd : translate,\n            M : translate,\n            MM : translate,\n            y : translate,\n            yy : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return fi;\n\n}));","//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var fo = moment.defineLocale('fo', {\n        months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n        monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n        weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),\n        weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n        weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D. MMMM, YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[Í dag kl.] LT',\n            nextDay : '[Í morgin kl.] LT',\n            nextWeek : 'dddd [kl.] LT',\n            lastDay : '[Í gjár kl.] LT',\n            lastWeek : '[síðstu] dddd [kl] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'um %s',\n            past : '%s síðani',\n            s : 'fá sekund',\n            m : 'ein minutt',\n            mm : '%d minuttir',\n            h : 'ein tími',\n            hh : '%d tímar',\n            d : 'ein dagur',\n            dd : '%d dagar',\n            M : 'ein mánaði',\n            MM : '%d mánaðir',\n            y : 'eitt ár',\n            yy : '%d ár'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return fo;\n\n}));","//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var fr_ca = moment.defineLocale('fr-ca', {\n        months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n        monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'YYYY-MM-DD',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Aujourd\\'hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'dans %s',\n            past : 'il y a %s',\n            s : 'quelques secondes',\n            m : 'une minute',\n            mm : '%d minutes',\n            h : 'une heure',\n            hh : '%d heures',\n            d : 'un jour',\n            dd : '%d jours',\n            M : 'un mois',\n            MM : '%d mois',\n            y : 'un an',\n            yy : '%d ans'\n        },\n        ordinalParse: /\\d{1,2}(er|e)/,\n        ordinal : function (number) {\n            return number + (number === 1 ? 'er' : 'e');\n        }\n    });\n\n    return fr_ca;\n\n}));","//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var fr_ch = moment.defineLocale('fr-ch', {\n        months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n        monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Aujourd\\'hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'dans %s',\n            past : 'il y a %s',\n            s : 'quelques secondes',\n            m : 'une minute',\n            mm : '%d minutes',\n            h : 'une heure',\n            hh : '%d heures',\n            d : 'un jour',\n            dd : '%d jours',\n            M : 'un mois',\n            MM : '%d mois',\n            y : 'un an',\n            yy : '%d ans'\n        },\n        ordinalParse: /\\d{1,2}(er|e)/,\n        ordinal : function (number) {\n            return number + (number === 1 ? 'er' : 'e');\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return fr_ch;\n\n}));","//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var fr = moment.defineLocale('fr', {\n        months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n        monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n        weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n        weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Aujourd\\'hui à] LT',\n            nextDay: '[Demain à] LT',\n            nextWeek: 'dddd [à] LT',\n            lastDay: '[Hier à] LT',\n            lastWeek: 'dddd [dernier à] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'dans %s',\n            past : 'il y a %s',\n            s : 'quelques secondes',\n            m : 'une minute',\n            mm : '%d minutes',\n            h : 'une heure',\n            hh : '%d heures',\n            d : 'un jour',\n            dd : '%d jours',\n            M : 'un mois',\n            MM : '%d mois',\n            y : 'un an',\n            yy : '%d ans'\n        },\n        ordinalParse: /\\d{1,2}(er|)/,\n        ordinal : function (number) {\n            return number + (number === 1 ? 'er' : '');\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return fr;\n\n}));","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n        monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n    var fy = moment.defineLocale('fy', {\n        months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),\n        monthsShort : function (m, format) {\n            if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n        monthsParseExact : true,\n        weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),\n        weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'),\n        weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD-MM-YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[hjoed om] LT',\n            nextDay: '[moarn om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[juster om] LT',\n            lastWeek: '[ôfrûne] dddd [om] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'oer %s',\n            past : '%s lyn',\n            s : 'in pear sekonden',\n            m : 'ien minút',\n            mm : '%d minuten',\n            h : 'ien oere',\n            hh : '%d oeren',\n            d : 'ien dei',\n            dd : '%d dagen',\n            M : 'ien moanne',\n            MM : '%d moannen',\n            y : 'ien jier',\n            yy : '%d jierren'\n        },\n        ordinalParse: /\\d{1,2}(ste|de)/,\n        ordinal : function (number) {\n            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return fy;\n\n}));","//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var months = [\n        'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'\n    ];\n\n    var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];\n\n    var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];\n\n    var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];\n\n    var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n    var gd = moment.defineLocale('gd', {\n        months : months,\n        monthsShort : monthsShort,\n        monthsParseExact : true,\n        weekdays : weekdays,\n        weekdaysShort : weekdaysShort,\n        weekdaysMin : weekdaysMin,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[An-diugh aig] LT',\n            nextDay : '[A-màireach aig] LT',\n            nextWeek : 'dddd [aig] LT',\n            lastDay : '[An-dè aig] LT',\n            lastWeek : 'dddd [seo chaidh] [aig] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'ann an %s',\n            past : 'bho chionn %s',\n            s : 'beagan diogan',\n            m : 'mionaid',\n            mm : '%d mionaidean',\n            h : 'uair',\n            hh : '%d uairean',\n            d : 'latha',\n            dd : '%d latha',\n            M : 'mìos',\n            MM : '%d mìosan',\n            y : 'bliadhna',\n            yy : '%d bliadhna'\n        },\n        ordinalParse : /\\d{1,2}(d|na|mh)/,\n        ordinal : function (number) {\n            var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return gd;\n\n}));","//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var gl = moment.defineLocale('gl', {\n        months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),\n        monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n        weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n        weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D [de] MMMM [de] YYYY',\n            LLL : 'D [de] MMMM [de] YYYY H:mm',\n            LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'\n        },\n        calendar : {\n            sameDay : function () {\n                return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';\n            },\n            nextDay : function () {\n                return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';\n            },\n            nextWeek : function () {\n                return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';\n            },\n            lastDay : function () {\n                return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';\n            },\n            lastWeek : function () {\n                return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : function (str) {\n                if (str.indexOf('un') === 0) {\n                    return 'n' + str;\n                }\n                return 'en ' + str;\n            },\n            past : 'hai %s',\n            s : 'uns segundos',\n            m : 'un minuto',\n            mm : '%d minutos',\n            h : 'unha hora',\n            hh : '%d horas',\n            d : 'un día',\n            dd : '%d días',\n            M : 'un mes',\n            MM : '%d meses',\n            y : 'un ano',\n            yy : '%d anos'\n        },\n        ordinalParse : /\\d{1,2}º/,\n        ordinal : '%dº',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return gl;\n\n}));","//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var he = moment.defineLocale('he', {\n        months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),\n        monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n        weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n        weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n        weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D [ב]MMMM YYYY',\n            LLL : 'D [ב]MMMM YYYY HH:mm',\n            LLLL : 'dddd, D [ב]MMMM YYYY HH:mm',\n            l : 'D/M/YYYY',\n            ll : 'D MMM YYYY',\n            lll : 'D MMM YYYY HH:mm',\n            llll : 'ddd, D MMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[היום ב־]LT',\n            nextDay : '[מחר ב־]LT',\n            nextWeek : 'dddd [בשעה] LT',\n            lastDay : '[אתמול ב־]LT',\n            lastWeek : '[ביום] dddd [האחרון בשעה] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'בעוד %s',\n            past : 'לפני %s',\n            s : 'מספר שניות',\n            m : 'דקה',\n            mm : '%d דקות',\n            h : 'שעה',\n            hh : function (number) {\n                if (number === 2) {\n                    return 'שעתיים';\n                }\n                return number + ' שעות';\n            },\n            d : 'יום',\n            dd : function (number) {\n                if (number === 2) {\n                    return 'יומיים';\n                }\n                return number + ' ימים';\n            },\n            M : 'חודש',\n            MM : function (number) {\n                if (number === 2) {\n                    return 'חודשיים';\n                }\n                return number + ' חודשים';\n            },\n            y : 'שנה',\n            yy : function (number) {\n                if (number === 2) {\n                    return 'שנתיים';\n                } else if (number % 10 === 0 && number !== 10) {\n                    return number + ' שנה';\n                }\n                return number + ' שנים';\n            }\n        },\n        meridiemParse: /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n        isPM : function (input) {\n            return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 5) {\n                return 'לפנות בוקר';\n            } else if (hour < 10) {\n                return 'בבוקר';\n            } else if (hour < 12) {\n                return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n            } else if (hour < 18) {\n                return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n            } else {\n                return 'בערב';\n            }\n        }\n    });\n\n    return he;\n\n}));","//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '१',\n        '2': '२',\n        '3': '३',\n        '4': '४',\n        '5': '५',\n        '6': '६',\n        '7': '७',\n        '8': '८',\n        '9': '९',\n        '0': '०'\n    },\n    numberMap = {\n        '१': '1',\n        '२': '2',\n        '३': '3',\n        '४': '4',\n        '५': '5',\n        '६': '6',\n        '७': '7',\n        '८': '8',\n        '९': '9',\n        '०': '0'\n    };\n\n    var hi = moment.defineLocale('hi', {\n        months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),\n        monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n        monthsParseExact: true,\n        weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat : {\n            LT : 'A h:mm बजे',\n            LTS : 'A h:mm:ss बजे',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, A h:mm बजे',\n            LLLL : 'dddd, D MMMM YYYY, A h:mm बजे'\n        },\n        calendar : {\n            sameDay : '[आज] LT',\n            nextDay : '[कल] LT',\n            nextWeek : 'dddd, LT',\n            lastDay : '[कल] LT',\n            lastWeek : '[पिछले] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s में',\n            past : '%s पहले',\n            s : 'कुछ ही क्षण',\n            m : 'एक मिनट',\n            mm : '%d मिनट',\n            h : 'एक घंटा',\n            hh : '%d घंटे',\n            d : 'एक दिन',\n            dd : '%d दिन',\n            M : 'एक महीने',\n            MM : '%d महीने',\n            y : 'एक वर्ष',\n            yy : '%d वर्ष'\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n        meridiemParse: /रात|सुबह|दोपहर|शाम/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'रात') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सुबह') {\n                return hour;\n            } else if (meridiem === 'दोपहर') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'शाम') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'रात';\n            } else if (hour < 10) {\n                return 'सुबह';\n            } else if (hour < 17) {\n                return 'दोपहर';\n            } else if (hour < 20) {\n                return 'शाम';\n            } else {\n                return 'रात';\n            }\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return hi;\n\n}));","//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'm':\n                return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n            case 'mm':\n                if (number === 1) {\n                    result += 'minuta';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'minute';\n                } else {\n                    result += 'minuta';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'jedan sat' : 'jednog sata';\n            case 'hh':\n                if (number === 1) {\n                    result += 'sat';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'sata';\n                } else {\n                    result += 'sati';\n                }\n                return result;\n            case 'dd':\n                if (number === 1) {\n                    result += 'dan';\n                } else {\n                    result += 'dana';\n                }\n                return result;\n            case 'MM':\n                if (number === 1) {\n                    result += 'mjesec';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'mjeseca';\n                } else {\n                    result += 'mjeseci';\n                }\n                return result;\n            case 'yy':\n                if (number === 1) {\n                    result += 'godina';\n                } else if (number === 2 || number === 3 || number === 4) {\n                    result += 'godine';\n                } else {\n                    result += 'godina';\n                }\n                return result;\n        }\n    }\n\n    var hr = moment.defineLocale('hr', {\n        months : {\n            format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),\n            standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')\n        },\n        monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),\n        monthsParseExact: true,\n        weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n        weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY H:mm',\n            LLLL : 'dddd, D. MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay  : '[danas u] LT',\n            nextDay  : '[sutra u] LT',\n            nextWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay  : '[jučer u] LT',\n            lastWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                        return '[prošlu] dddd [u] LT';\n                    case 6:\n                        return '[prošle] [subote] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prošli] dddd [u] LT';\n                }\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'za %s',\n            past   : 'prije %s',\n            s      : 'par sekundi',\n            m      : translate,\n            mm     : translate,\n            h      : translate,\n            hh     : translate,\n            d      : 'dan',\n            dd     : translate,\n            M      : 'mjesec',\n            MM     : translate,\n            y      : 'godinu',\n            yy     : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return hr;\n\n}));","//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n    function translate(number, withoutSuffix, key, isFuture) {\n        var num = number,\n            suffix;\n        switch (key) {\n            case 's':\n                return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';\n            case 'm':\n                return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'mm':\n                return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n            case 'h':\n                return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'hh':\n                return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n            case 'd':\n                return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'dd':\n                return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n            case 'M':\n                return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'MM':\n                return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n            case 'y':\n                return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n            case 'yy':\n                return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n        }\n        return '';\n    }\n    function week(isFuture) {\n        return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';\n    }\n\n    var hu = moment.defineLocale('hu', {\n        months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),\n        monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),\n        weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n        weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n        weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'YYYY.MM.DD.',\n            LL : 'YYYY. MMMM D.',\n            LLL : 'YYYY. MMMM D. H:mm',\n            LLLL : 'YYYY. MMMM D., dddd H:mm'\n        },\n        meridiemParse: /de|du/i,\n        isPM: function (input) {\n            return input.charAt(1).toLowerCase() === 'u';\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower === true ? 'de' : 'DE';\n            } else {\n                return isLower === true ? 'du' : 'DU';\n            }\n        },\n        calendar : {\n            sameDay : '[ma] LT[-kor]',\n            nextDay : '[holnap] LT[-kor]',\n            nextWeek : function () {\n                return week.call(this, true);\n            },\n            lastDay : '[tegnap] LT[-kor]',\n            lastWeek : function () {\n                return week.call(this, false);\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s múlva',\n            past : '%s',\n            s : translate,\n            m : translate,\n            mm : translate,\n            h : translate,\n            hh : translate,\n            d : translate,\n            dd : translate,\n            M : translate,\n            MM : translate,\n            y : translate,\n            yy : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return hu;\n\n}));","//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var hy_am = moment.defineLocale('hy-am', {\n        months : {\n            format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),\n            standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')\n        },\n        monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n        weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),\n        weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY թ.',\n            LLL : 'D MMMM YYYY թ., HH:mm',\n            LLLL : 'dddd, D MMMM YYYY թ., HH:mm'\n        },\n        calendar : {\n            sameDay: '[այսօր] LT',\n            nextDay: '[վաղը] LT',\n            lastDay: '[երեկ] LT',\n            nextWeek: function () {\n                return 'dddd [օրը ժամը] LT';\n            },\n            lastWeek: function () {\n                return '[անցած] dddd [օրը ժամը] LT';\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : '%s հետո',\n            past : '%s առաջ',\n            s : 'մի քանի վայրկյան',\n            m : 'րոպե',\n            mm : '%d րոպե',\n            h : 'ժամ',\n            hh : '%d ժամ',\n            d : 'օր',\n            dd : '%d օր',\n            M : 'ամիս',\n            MM : '%d ամիս',\n            y : 'տարի',\n            yy : '%d տարի'\n        },\n        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n        isPM: function (input) {\n            return /^(ցերեկվա|երեկոյան)$/.test(input);\n        },\n        meridiem : function (hour) {\n            if (hour < 4) {\n                return 'գիշերվա';\n            } else if (hour < 12) {\n                return 'առավոտվա';\n            } else if (hour < 17) {\n                return 'ցերեկվա';\n            } else {\n                return 'երեկոյան';\n            }\n        },\n        ordinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'DDD':\n                case 'w':\n                case 'W':\n                case 'DDDo':\n                    if (number === 1) {\n                        return number + '-ին';\n                    }\n                    return number + '-րդ';\n                default:\n                    return number;\n            }\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return hy_am;\n\n}));","//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var id = moment.defineLocale('id', {\n        months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),\n        monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),\n        weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n        weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n        weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat : {\n            LT : 'HH.mm',\n            LTS : 'HH.mm.ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY [pukul] HH.mm',\n            LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n        },\n        meridiemParse: /pagi|siang|sore|malam/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'siang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sore' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'siang';\n            } else if (hours < 19) {\n                return 'sore';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar : {\n            sameDay : '[Hari ini pukul] LT',\n            nextDay : '[Besok pukul] LT',\n            nextWeek : 'dddd [pukul] LT',\n            lastDay : '[Kemarin pukul] LT',\n            lastWeek : 'dddd [lalu pukul] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'dalam %s',\n            past : '%s yang lalu',\n            s : 'beberapa detik',\n            m : 'semenit',\n            mm : '%d menit',\n            h : 'sejam',\n            hh : '%d jam',\n            d : 'sehari',\n            dd : '%d hari',\n            M : 'sebulan',\n            MM : '%d bulan',\n            y : 'setahun',\n            yy : '%d tahun'\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return id;\n\n}));","//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function plural(n) {\n        if (n % 100 === 11) {\n            return true;\n        } else if (n % 10 === 1) {\n            return false;\n        }\n        return true;\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';\n            case 'm':\n                return withoutSuffix ? 'mínúta' : 'mínútu';\n            case 'mm':\n                if (plural(number)) {\n                    return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');\n                } else if (withoutSuffix) {\n                    return result + 'mínúta';\n                }\n                return result + 'mínútu';\n            case 'hh':\n                if (plural(number)) {\n                    return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');\n                }\n                return result + 'klukkustund';\n            case 'd':\n                if (withoutSuffix) {\n                    return 'dagur';\n                }\n                return isFuture ? 'dag' : 'degi';\n            case 'dd':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'dagar';\n                    }\n                    return result + (isFuture ? 'daga' : 'dögum');\n                } else if (withoutSuffix) {\n                    return result + 'dagur';\n                }\n                return result + (isFuture ? 'dag' : 'degi');\n            case 'M':\n                if (withoutSuffix) {\n                    return 'mánuður';\n                }\n                return isFuture ? 'mánuð' : 'mánuði';\n            case 'MM':\n                if (plural(number)) {\n                    if (withoutSuffix) {\n                        return result + 'mánuðir';\n                    }\n                    return result + (isFuture ? 'mánuði' : 'mánuðum');\n                } else if (withoutSuffix) {\n                    return result + 'mánuður';\n                }\n                return result + (isFuture ? 'mánuð' : 'mánuði');\n            case 'y':\n                return withoutSuffix || isFuture ? 'ár' : 'ári';\n            case 'yy':\n                if (plural(number)) {\n                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n                }\n                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n        }\n    }\n\n    var is = moment.defineLocale('is', {\n        months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),\n        monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n        weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),\n        weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n        weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY [kl.] H:mm',\n            LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm'\n        },\n        calendar : {\n            sameDay : '[í dag kl.] LT',\n            nextDay : '[á morgun kl.] LT',\n            nextWeek : 'dddd [kl.] LT',\n            lastDay : '[í gær kl.] LT',\n            lastWeek : '[síðasta] dddd [kl.] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'eftir %s',\n            past : 'fyrir %s síðan',\n            s : translate,\n            m : translate,\n            mm : translate,\n            h : 'klukkustund',\n            hh : translate,\n            d : translate,\n            dd : translate,\n            M : translate,\n            MM : translate,\n            y : translate,\n            yy : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return is;\n\n}));","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var it = moment.defineLocale('it', {\n        months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n        monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n        weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'),\n        weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'),\n        weekdaysMin : 'Do_Lu_Ma_Me_Gi_Ve_Sa'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Oggi alle] LT',\n            nextDay: '[Domani alle] LT',\n            nextWeek: 'dddd [alle] LT',\n            lastDay: '[Ieri alle] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[la scorsa] dddd [alle] LT';\n                    default:\n                        return '[lo scorso] dddd [alle] LT';\n                }\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : function (s) {\n                return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;\n            },\n            past : '%s fa',\n            s : 'alcuni secondi',\n            m : 'un minuto',\n            mm : '%d minuti',\n            h : 'un\\'ora',\n            hh : '%d ore',\n            d : 'un giorno',\n            dd : '%d giorni',\n            M : 'un mese',\n            MM : '%d mesi',\n            y : 'un anno',\n            yy : '%d anni'\n        },\n        ordinalParse : /\\d{1,2}º/,\n        ordinal: '%dº',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return it;\n\n}));","//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ja = moment.defineLocale('ja', {\n        months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n        weekdaysShort : '日_月_火_水_木_金_土'.split('_'),\n        weekdaysMin : '日_月_火_水_木_金_土'.split('_'),\n        longDateFormat : {\n            LT : 'Ah時m分',\n            LTS : 'Ah時m分s秒',\n            L : 'YYYY/MM/DD',\n            LL : 'YYYY年M月D日',\n            LLL : 'YYYY年M月D日Ah時m分',\n            LLLL : 'YYYY年M月D日Ah時m分 dddd'\n        },\n        meridiemParse: /午前|午後/i,\n        isPM : function (input) {\n            return input === '午後';\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return '午前';\n            } else {\n                return '午後';\n            }\n        },\n        calendar : {\n            sameDay : '[今日] LT',\n            nextDay : '[明日] LT',\n            nextWeek : '[来週]dddd LT',\n            lastDay : '[昨日] LT',\n            lastWeek : '[前週]dddd LT',\n            sameElse : 'L'\n        },\n        ordinalParse : /\\d{1,2}日/,\n        ordinal : function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                default:\n                    return number;\n            }\n        },\n        relativeTime : {\n            future : '%s後',\n            past : '%s前',\n            s : '数秒',\n            m : '1分',\n            mm : '%d分',\n            h : '1時間',\n            hh : '%d時間',\n            d : '1日',\n            dd : '%d日',\n            M : '1ヶ月',\n            MM : '%dヶ月',\n            y : '1年',\n            yy : '%d年'\n        }\n    });\n\n    return ja;\n\n}));","//! moment.js locale configuration\n//! locale : Japanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var jv = moment.defineLocale('jv', {\n        months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),\n        monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n        weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n        weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n        weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n        longDateFormat : {\n            LT : 'HH.mm',\n            LTS : 'HH.mm.ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY [pukul] HH.mm',\n            LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n        },\n        meridiemParse: /enjing|siyang|sonten|ndalu/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'enjing') {\n                return hour;\n            } else if (meridiem === 'siyang') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'enjing';\n            } else if (hours < 15) {\n                return 'siyang';\n            } else if (hours < 19) {\n                return 'sonten';\n            } else {\n                return 'ndalu';\n            }\n        },\n        calendar : {\n            sameDay : '[Dinten puniko pukul] LT',\n            nextDay : '[Mbenjang pukul] LT',\n            nextWeek : 'dddd [pukul] LT',\n            lastDay : '[Kala wingi pukul] LT',\n            lastWeek : 'dddd [kepengker pukul] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'wonten ing %s',\n            past : '%s ingkang kepengker',\n            s : 'sawetawis detik',\n            m : 'setunggal menit',\n            mm : '%d menit',\n            h : 'setunggal jam',\n            hh : '%d jam',\n            d : 'sedinten',\n            dd : '%d dinten',\n            M : 'sewulan',\n            MM : '%d wulan',\n            y : 'setaun',\n            yy : '%d taun'\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return jv;\n\n}));","//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/irakli-janiashvili\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ka = moment.defineLocale('ka', {\n        months : {\n            standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),\n            format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')\n        },\n        monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n        weekdays : {\n            standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),\n            format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),\n            isFormat: /(წინა|შემდეგ)/\n        },\n        weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n        weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n        longDateFormat : {\n            LT : 'h:mm A',\n            LTS : 'h:mm:ss A',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY h:mm A',\n            LLLL : 'dddd, D MMMM YYYY h:mm A'\n        },\n        calendar : {\n            sameDay : '[დღეს] LT[-ზე]',\n            nextDay : '[ხვალ] LT[-ზე]',\n            lastDay : '[გუშინ] LT[-ზე]',\n            nextWeek : '[შემდეგ] dddd LT[-ზე]',\n            lastWeek : '[წინა] dddd LT-ზე',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : function (s) {\n                return (/(წამი|წუთი|საათი|წელი)/).test(s) ?\n                    s.replace(/ი$/, 'ში') :\n                    s + 'ში';\n            },\n            past : function (s) {\n                if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {\n                    return s.replace(/(ი|ე)$/, 'ის წინ');\n                }\n                if ((/წელი/).test(s)) {\n                    return s.replace(/წელი$/, 'წლის წინ');\n                }\n            },\n            s : 'რამდენიმე წამი',\n            m : 'წუთი',\n            mm : '%d წუთი',\n            h : 'საათი',\n            hh : '%d საათი',\n            d : 'დღე',\n            dd : '%d დღე',\n            M : 'თვე',\n            MM : '%d თვე',\n            y : 'წელი',\n            yy : '%d წელი'\n        },\n        ordinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n        ordinal : function (number) {\n            if (number === 0) {\n                return number;\n            }\n            if (number === 1) {\n                return number + '-ლი';\n            }\n            if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {\n                return 'მე-' + number;\n            }\n            return number + '-ე';\n        },\n        week : {\n            dow : 1,\n            doy : 7\n        }\n    });\n\n    return ka;\n\n}));","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var suffixes = {\n        0: '-ші',\n        1: '-ші',\n        2: '-ші',\n        3: '-ші',\n        4: '-ші',\n        5: '-ші',\n        6: '-шы',\n        7: '-ші',\n        8: '-ші',\n        9: '-шы',\n        10: '-шы',\n        20: '-шы',\n        30: '-шы',\n        40: '-шы',\n        50: '-ші',\n        60: '-шы',\n        70: '-ші',\n        80: '-ші',\n        90: '-шы',\n        100: '-ші'\n    };\n\n    var kk = moment.defineLocale('kk', {\n        months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),\n        monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n        weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),\n        weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n        weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[Бүгін сағат] LT',\n            nextDay : '[Ертең сағат] LT',\n            nextWeek : 'dddd [сағат] LT',\n            lastDay : '[Кеше сағат] LT',\n            lastWeek : '[Өткен аптаның] dddd [сағат] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s ішінде',\n            past : '%s бұрын',\n            s : 'бірнеше секунд',\n            m : 'бір минут',\n            mm : '%d минут',\n            h : 'бір сағат',\n            hh : '%d сағат',\n            d : 'бір күн',\n            dd : '%d күн',\n            M : 'бір ай',\n            MM : '%d ай',\n            y : 'бір жыл',\n            yy : '%d жыл'\n        },\n        ordinalParse: /\\d{1,2}-(ші|шы)/,\n        ordinal : function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return kk;\n\n}));","//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var km = moment.defineLocale('km', {\n        months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n        monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n        weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n        weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n        weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar: {\n            sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n            nextDay: '[ស្អែក ម៉ោង] LT',\n            nextWeek: 'dddd [ម៉ោង] LT',\n            lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n            lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n            sameElse: 'L'\n        },\n        relativeTime: {\n            future: '%sទៀត',\n            past: '%sមុន',\n            s: 'ប៉ុន្មានវិនាទី',\n            m: 'មួយនាទី',\n            mm: '%d នាទី',\n            h: 'មួយម៉ោង',\n            hh: '%d ម៉ោង',\n            d: 'មួយថ្ងៃ',\n            dd: '%d ថ្ងៃ',\n            M: 'មួយខែ',\n            MM: '%d ខែ',\n            y: 'មួយឆ្នាំ',\n            yy: '%d ឆ្នាំ'\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4 // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return km;\n\n}));","//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee <jeeeyul@gmail.com>\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ko = moment.defineLocale('ko', {\n        months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n        monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n        weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n        weekdaysShort : '일_월_화_수_목_금_토'.split('_'),\n        weekdaysMin : '일_월_화_수_목_금_토'.split('_'),\n        longDateFormat : {\n            LT : 'A h시 m분',\n            LTS : 'A h시 m분 s초',\n            L : 'YYYY.MM.DD',\n            LL : 'YYYY년 MMMM D일',\n            LLL : 'YYYY년 MMMM D일 A h시 m분',\n            LLLL : 'YYYY년 MMMM D일 dddd A h시 m분'\n        },\n        calendar : {\n            sameDay : '오늘 LT',\n            nextDay : '내일 LT',\n            nextWeek : 'dddd LT',\n            lastDay : '어제 LT',\n            lastWeek : '지난주 dddd LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s 후',\n            past : '%s 전',\n            s : '몇 초',\n            ss : '%d초',\n            m : '일분',\n            mm : '%d분',\n            h : '한 시간',\n            hh : '%d시간',\n            d : '하루',\n            dd : '%d일',\n            M : '한 달',\n            MM : '%d달',\n            y : '일 년',\n            yy : '%d년'\n        },\n        ordinalParse : /\\d{1,2}일/,\n        ordinal : '%d일',\n        meridiemParse : /오전|오후/,\n        isPM : function (token) {\n            return token === '오후';\n        },\n        meridiem : function (hour, minute, isUpper) {\n            return hour < 12 ? '오전' : '오후';\n        }\n    });\n\n    return ko;\n\n}));","//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n\n    var suffixes = {\n        0: '-чү',\n        1: '-чи',\n        2: '-чи',\n        3: '-чү',\n        4: '-чү',\n        5: '-чи',\n        6: '-чы',\n        7: '-чи',\n        8: '-чи',\n        9: '-чу',\n        10: '-чу',\n        20: '-чы',\n        30: '-чу',\n        40: '-чы',\n        50: '-чү',\n        60: '-чы',\n        70: '-чи',\n        80: '-чи',\n        90: '-чу',\n        100: '-чү'\n    };\n\n    var ky = moment.defineLocale('ky', {\n        months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),\n        monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),\n        weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n        weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[Бүгүн саат] LT',\n            nextDay : '[Эртең саат] LT',\n            nextWeek : 'dddd [саат] LT',\n            lastDay : '[Кече саат] LT',\n            lastWeek : '[Өткен аптанын] dddd [күнү] [саат] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s ичинде',\n            past : '%s мурун',\n            s : 'бирнече секунд',\n            m : 'бир мүнөт',\n            mm : '%d мүнөт',\n            h : 'бир саат',\n            hh : '%d саат',\n            d : 'бир күн',\n            dd : '%d күн',\n            M : 'бир ай',\n            MM : '%d ай',\n            y : 'бир жыл',\n            yy : '%d жыл'\n        },\n        ordinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n        ordinal : function (number) {\n            var a = number % 10,\n                b = number >= 100 ? 100 : null;\n            return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ky;\n\n}));","//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            'm': ['eng Minutt', 'enger Minutt'],\n            'h': ['eng Stonn', 'enger Stonn'],\n            'd': ['een Dag', 'engem Dag'],\n            'M': ['ee Mount', 'engem Mount'],\n            'y': ['ee Joer', 'engem Joer']\n        };\n        return withoutSuffix ? format[key][0] : format[key][1];\n    }\n    function processFutureTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'a ' + string;\n        }\n        return 'an ' + string;\n    }\n    function processPastTime(string) {\n        var number = string.substr(0, string.indexOf(' '));\n        if (eifelerRegelAppliesToNumber(number)) {\n            return 'viru ' + string;\n        }\n        return 'virun ' + string;\n    }\n    /**\n     * Returns true if the word before the given number loses the '-n' ending.\n     * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n     *\n     * @param number {integer}\n     * @returns {boolean}\n     */\n    function eifelerRegelAppliesToNumber(number) {\n        number = parseInt(number, 10);\n        if (isNaN(number)) {\n            return false;\n        }\n        if (number < 0) {\n            // Negative Number --> always true\n            return true;\n        } else if (number < 10) {\n            // Only 1 digit\n            if (4 <= number && number <= 7) {\n                return true;\n            }\n            return false;\n        } else if (number < 100) {\n            // 2 digits\n            var lastDigit = number % 10, firstDigit = number / 10;\n            if (lastDigit === 0) {\n                return eifelerRegelAppliesToNumber(firstDigit);\n            }\n            return eifelerRegelAppliesToNumber(lastDigit);\n        } else if (number < 10000) {\n            // 3 or 4 digits --> recursively check first digit\n            while (number >= 10) {\n                number = number / 10;\n            }\n            return eifelerRegelAppliesToNumber(number);\n        } else {\n            // Anything larger than 4 digits: recursively check first n-3 digits\n            number = number / 1000;\n            return eifelerRegelAppliesToNumber(number);\n        }\n    }\n\n    var lb = moment.defineLocale('lb', {\n        months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n        monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n        monthsParseExact : true,\n        weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),\n        weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n        weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat: {\n            LT: 'H:mm [Auer]',\n            LTS: 'H:mm:ss [Auer]',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm [Auer]',\n            LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'\n        },\n        calendar: {\n            sameDay: '[Haut um] LT',\n            sameElse: 'L',\n            nextDay: '[Muer um] LT',\n            nextWeek: 'dddd [um] LT',\n            lastDay: '[Gëschter um] LT',\n            lastWeek: function () {\n                // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n                switch (this.day()) {\n                    case 2:\n                    case 4:\n                        return '[Leschten] dddd [um] LT';\n                    default:\n                        return '[Leschte] dddd [um] LT';\n                }\n            }\n        },\n        relativeTime : {\n            future : processFutureTime,\n            past : processPastTime,\n            s : 'e puer Sekonnen',\n            m : processRelativeTime,\n            mm : '%d Minutten',\n            h : processRelativeTime,\n            hh : '%d Stonnen',\n            d : processRelativeTime,\n            dd : '%d Deeg',\n            M : processRelativeTime,\n            MM : '%d Méint',\n            y : processRelativeTime,\n            yy : '%d Joer'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal: '%d.',\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return lb;\n\n}));","//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var lo = moment.defineLocale('lo', {\n        months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n        monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n        weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n        weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'ວັນdddd D MMMM YYYY HH:mm'\n        },\n        meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n        isPM: function (input) {\n            return input === 'ຕອນແລງ';\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ຕອນເຊົ້າ';\n            } else {\n                return 'ຕອນແລງ';\n            }\n        },\n        calendar : {\n            sameDay : '[ມື້ນີ້ເວລາ] LT',\n            nextDay : '[ມື້ອື່ນເວລາ] LT',\n            nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT',\n            lastDay : '[ມື້ວານນີ້ເວລາ] LT',\n            lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'ອີກ %s',\n            past : '%sຜ່ານມາ',\n            s : 'ບໍ່ເທົ່າໃດວິນາທີ',\n            m : '1 ນາທີ',\n            mm : '%d ນາທີ',\n            h : '1 ຊົ່ວໂມງ',\n            hh : '%d ຊົ່ວໂມງ',\n            d : '1 ມື້',\n            dd : '%d ມື້',\n            M : '1 ເດືອນ',\n            MM : '%d ເດືອນ',\n            y : '1 ປີ',\n            yy : '%d ປີ'\n        },\n        ordinalParse: /(ທີ່)\\d{1,2}/,\n        ordinal : function (number) {\n            return 'ທີ່' + number;\n        }\n    });\n\n    return lo;\n\n}));","//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var units = {\n        'm' : 'minutė_minutės_minutę',\n        'mm': 'minutės_minučių_minutes',\n        'h' : 'valanda_valandos_valandą',\n        'hh': 'valandos_valandų_valandas',\n        'd' : 'diena_dienos_dieną',\n        'dd': 'dienos_dienų_dienas',\n        'M' : 'mėnuo_mėnesio_mėnesį',\n        'MM': 'mėnesiai_mėnesių_mėnesius',\n        'y' : 'metai_metų_metus',\n        'yy': 'metai_metų_metus'\n    };\n    function translateSeconds(number, withoutSuffix, key, isFuture) {\n        if (withoutSuffix) {\n            return 'kelios sekundės';\n        } else {\n            return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n        }\n    }\n    function translateSingular(number, withoutSuffix, key, isFuture) {\n        return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);\n    }\n    function special(number) {\n        return number % 10 === 0 || (number > 10 && number < 20);\n    }\n    function forms(key) {\n        return units[key].split('_');\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        if (number === 1) {\n            return result + translateSingular(number, withoutSuffix, key[0], isFuture);\n        } else if (withoutSuffix) {\n            return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n        } else {\n            if (isFuture) {\n                return result + forms(key)[1];\n            } else {\n                return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n            }\n        }\n    }\n    var lt = moment.defineLocale('lt', {\n        months : {\n            format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),\n            standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),\n            isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s+)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s+)+D[oD]?/\n        },\n        monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n        weekdays : {\n            format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),\n            standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),\n            isFormat: /dddd HH:mm/\n        },\n        weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n        weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'YYYY-MM-DD',\n            LL : 'YYYY [m.] MMMM D [d.]',\n            LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n            l : 'YYYY-MM-DD',\n            ll : 'YYYY [m.] MMMM D [d.]',\n            lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n            llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'\n        },\n        calendar : {\n            sameDay : '[Šiandien] LT',\n            nextDay : '[Rytoj] LT',\n            nextWeek : 'dddd LT',\n            lastDay : '[Vakar] LT',\n            lastWeek : '[Praėjusį] dddd LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'po %s',\n            past : 'prieš %s',\n            s : translateSeconds,\n            m : translateSingular,\n            mm : translate,\n            h : translateSingular,\n            hh : translate,\n            d : translateSingular,\n            dd : translate,\n            M : translateSingular,\n            MM : translate,\n            y : translateSingular,\n            yy : translate\n        },\n        ordinalParse: /\\d{1,2}-oji/,\n        ordinal : function (number) {\n            return number + '-oji';\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return lt;\n\n}));","//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var units = {\n        'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n        'h': 'stundas_stundām_stunda_stundas'.split('_'),\n        'hh': 'stundas_stundām_stunda_stundas'.split('_'),\n        'd': 'dienas_dienām_diena_dienas'.split('_'),\n        'dd': 'dienas_dienām_diena_dienas'.split('_'),\n        'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n        'y': 'gada_gadiem_gads_gadi'.split('_'),\n        'yy': 'gada_gadiem_gads_gadi'.split('_')\n    };\n    /**\n     * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n     */\n    function format(forms, number, withoutSuffix) {\n        if (withoutSuffix) {\n            // E.g. \"21 minūte\", \"3 minūtes\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n        } else {\n            // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n            // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n            return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n        }\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        return number + ' ' + format(units[key], number, withoutSuffix);\n    }\n    function relativeTimeWithSingular(number, withoutSuffix, key) {\n        return format(units[key], number, withoutSuffix);\n    }\n    function relativeSeconds(number, withoutSuffix) {\n        return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n    }\n\n    var lv = moment.defineLocale('lv', {\n        months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),\n        monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n        weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),\n        weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY.',\n            LL : 'YYYY. [gada] D. MMMM',\n            LLL : 'YYYY. [gada] D. MMMM, HH:mm',\n            LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'\n        },\n        calendar : {\n            sameDay : '[Šodien pulksten] LT',\n            nextDay : '[Rīt pulksten] LT',\n            nextWeek : 'dddd [pulksten] LT',\n            lastDay : '[Vakar pulksten] LT',\n            lastWeek : '[Pagājušā] dddd [pulksten] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'pēc %s',\n            past : 'pirms %s',\n            s : relativeSeconds,\n            m : relativeTimeWithSingular,\n            mm : relativeTimeWithPlural,\n            h : relativeTimeWithSingular,\n            hh : relativeTimeWithPlural,\n            d : relativeTimeWithSingular,\n            dd : relativeTimeWithPlural,\n            M : relativeTimeWithSingular,\n            MM : relativeTimeWithPlural,\n            y : relativeTimeWithSingular,\n            yy : relativeTimeWithPlural\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return lv;\n\n}));","//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var translator = {\n        words: { //Different grammatical cases\n            m: ['jedan minut', 'jednog minuta'],\n            mm: ['minut', 'minuta', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            dd: ['dan', 'dana', 'dana'],\n            MM: ['mjesec', 'mjeseca', 'mjeseci'],\n            yy: ['godina', 'godine', 'godina']\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n            }\n        }\n    };\n\n    var me = moment.defineLocale('me', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact : true,\n        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS : 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm'\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sjutra u] LT',\n\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedjelju] [u] LT';\n                    case 3:\n                        return '[u] [srijedu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay  : '[juče u] LT',\n            lastWeek : function () {\n                var lastWeekDays = [\n                    '[prošle] [nedjelje] [u] LT',\n                    '[prošlog] [ponedjeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srijede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT'\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'za %s',\n            past   : 'prije %s',\n            s      : 'nekoliko sekundi',\n            m      : translator.translate,\n            mm     : translator.translate,\n            h      : translator.translate,\n            hh     : translator.translate,\n            d      : 'dan',\n            dd     : translator.translate,\n            M      : 'mjesec',\n            MM     : translator.translate,\n            y      : 'godinu',\n            yy     : translator.translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return me;\n\n}));","//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var mi = moment.defineLocale('mi', {\n        months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),\n        monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),\n        monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n        monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n        weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n        weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY [i] HH:mm',\n            LLLL: 'dddd, D MMMM YYYY [i] HH:mm'\n        },\n        calendar: {\n            sameDay: '[i teie mahana, i] LT',\n            nextDay: '[apopo i] LT',\n            nextWeek: 'dddd [i] LT',\n            lastDay: '[inanahi i] LT',\n            lastWeek: 'dddd [whakamutunga i] LT',\n            sameElse: 'L'\n        },\n        relativeTime: {\n            future: 'i roto i %s',\n            past: '%s i mua',\n            s: 'te hēkona ruarua',\n            m: 'he meneti',\n            mm: '%d meneti',\n            h: 'te haora',\n            hh: '%d haora',\n            d: 'he ra',\n            dd: '%d ra',\n            M: 'he marama',\n            MM: '%d marama',\n            y: 'he tau',\n            yy: '%d tau'\n        },\n        ordinalParse: /\\d{1,2}º/,\n        ordinal: '%dº',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return mi;\n\n}));","//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var mk = moment.defineLocale('mk', {\n        months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),\n        monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n        weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),\n        weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n        weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'D.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY H:mm',\n            LLLL : 'dddd, D MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay : '[Денес во] LT',\n            nextDay : '[Утре во] LT',\n            nextWeek : '[Во] dddd [во] LT',\n            lastDay : '[Вчера во] LT',\n            lastWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 6:\n                        return '[Изминатата] dddd [во] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[Изминатиот] dddd [во] LT';\n                }\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'после %s',\n            past : 'пред %s',\n            s : 'неколку секунди',\n            m : 'минута',\n            mm : '%d минути',\n            h : 'час',\n            hh : '%d часа',\n            d : 'ден',\n            dd : '%d дена',\n            M : 'месец',\n            MM : '%d месеци',\n            y : 'година',\n            yy : '%d години'\n        },\n        ordinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n        ordinal : function (number) {\n            var lastDigit = number % 10,\n                last2Digits = number % 100;\n            if (number === 0) {\n                return number + '-ев';\n            } else if (last2Digits === 0) {\n                return number + '-ен';\n            } else if (last2Digits > 10 && last2Digits < 20) {\n                return number + '-ти';\n            } else if (lastDigit === 1) {\n                return number + '-ви';\n            } else if (lastDigit === 2) {\n                return number + '-ри';\n            } else if (lastDigit === 7 || lastDigit === 8) {\n                return number + '-ми';\n            } else {\n                return number + '-ти';\n            }\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return mk;\n\n}));","//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ml = moment.defineLocale('ml', {\n        months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),\n        monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),\n        weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n        weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n        longDateFormat : {\n            LT : 'A h:mm -നു',\n            LTS : 'A h:mm:ss -നു',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, A h:mm -നു',\n            LLLL : 'dddd, D MMMM YYYY, A h:mm -നു'\n        },\n        calendar : {\n            sameDay : '[ഇന്ന്] LT',\n            nextDay : '[നാളെ] LT',\n            nextWeek : 'dddd, LT',\n            lastDay : '[ഇന്നലെ] LT',\n            lastWeek : '[കഴിഞ്ഞ] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s കഴിഞ്ഞ്',\n            past : '%s മുൻപ്',\n            s : 'അൽപ നിമിഷങ്ങൾ',\n            m : 'ഒരു മിനിറ്റ്',\n            mm : '%d മിനിറ്റ്',\n            h : 'ഒരു മണിക്കൂർ',\n            hh : '%d മണിക്കൂർ',\n            d : 'ഒരു ദിവസം',\n            dd : '%d ദിവസം',\n            M : 'ഒരു മാസം',\n            MM : '%d മാസം',\n            y : 'ഒരു വർഷം',\n            yy : '%d വർഷം'\n        },\n        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if ((meridiem === 'രാത്രി' && hour >= 4) ||\n                    meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n                    meridiem === 'വൈകുന്നേരം') {\n                return hour + 12;\n            } else {\n                return hour;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'രാത്രി';\n            } else if (hour < 12) {\n                return 'രാവിലെ';\n            } else if (hour < 17) {\n                return 'ഉച്ച കഴിഞ്ഞ്';\n            } else if (hour < 20) {\n                return 'വൈകുന്നേരം';\n            } else {\n                return 'രാത്രി';\n            }\n        }\n    });\n\n    return ml;\n\n}));","//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '१',\n        '2': '२',\n        '3': '३',\n        '4': '४',\n        '5': '५',\n        '6': '६',\n        '7': '७',\n        '8': '८',\n        '9': '९',\n        '0': '०'\n    },\n    numberMap = {\n        '१': '1',\n        '२': '2',\n        '३': '3',\n        '४': '4',\n        '५': '5',\n        '६': '6',\n        '७': '7',\n        '८': '8',\n        '९': '9',\n        '०': '0'\n    };\n\n    function relativeTimeMr(number, withoutSuffix, string, isFuture)\n    {\n        var output = '';\n        if (withoutSuffix) {\n            switch (string) {\n                case 's': output = 'काही सेकंद'; break;\n                case 'm': output = 'एक मिनिट'; break;\n                case 'mm': output = '%d मिनिटे'; break;\n                case 'h': output = 'एक तास'; break;\n                case 'hh': output = '%d तास'; break;\n                case 'd': output = 'एक दिवस'; break;\n                case 'dd': output = '%d दिवस'; break;\n                case 'M': output = 'एक महिना'; break;\n                case 'MM': output = '%d महिने'; break;\n                case 'y': output = 'एक वर्ष'; break;\n                case 'yy': output = '%d वर्षे'; break;\n            }\n        }\n        else {\n            switch (string) {\n                case 's': output = 'काही सेकंदां'; break;\n                case 'm': output = 'एका मिनिटा'; break;\n                case 'mm': output = '%d मिनिटां'; break;\n                case 'h': output = 'एका तासा'; break;\n                case 'hh': output = '%d तासां'; break;\n                case 'd': output = 'एका दिवसा'; break;\n                case 'dd': output = '%d दिवसां'; break;\n                case 'M': output = 'एका महिन्या'; break;\n                case 'MM': output = '%d महिन्यां'; break;\n                case 'y': output = 'एका वर्षा'; break;\n                case 'yy': output = '%d वर्षां'; break;\n            }\n        }\n        return output.replace(/%d/i, number);\n    }\n\n    var mr = moment.defineLocale('mr', {\n        months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n        monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n        weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n        weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),\n        longDateFormat : {\n            LT : 'A h:mm वाजता',\n            LTS : 'A h:mm:ss वाजता',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, A h:mm वाजता',\n            LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता'\n        },\n        calendar : {\n            sameDay : '[आज] LT',\n            nextDay : '[उद्या] LT',\n            nextWeek : 'dddd, LT',\n            lastDay : '[काल] LT',\n            lastWeek: '[मागील] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future: '%sमध्ये',\n            past: '%sपूर्वी',\n            s: relativeTimeMr,\n            m: relativeTimeMr,\n            mm: relativeTimeMr,\n            h: relativeTimeMr,\n            hh: relativeTimeMr,\n            d: relativeTimeMr,\n            dd: relativeTimeMr,\n            M: relativeTimeMr,\n            MM: relativeTimeMr,\n            y: relativeTimeMr,\n            yy: relativeTimeMr\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'रात्री') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'सकाळी') {\n                return hour;\n            } else if (meridiem === 'दुपारी') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'सायंकाळी') {\n                return hour + 12;\n            }\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'रात्री';\n            } else if (hour < 10) {\n                return 'सकाळी';\n            } else if (hour < 17) {\n                return 'दुपारी';\n            } else if (hour < 20) {\n                return 'सायंकाळी';\n            } else {\n                return 'रात्री';\n            }\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return mr;\n\n}));","//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ms_my = moment.defineLocale('ms-my', {\n        months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n        monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat : {\n            LT : 'HH.mm',\n            LTS : 'HH.mm.ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY [pukul] HH.mm',\n            LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar : {\n            sameDay : '[Hari ini pukul] LT',\n            nextDay : '[Esok pukul] LT',\n            nextWeek : 'dddd [pukul] LT',\n            lastDay : '[Kelmarin pukul] LT',\n            lastWeek : 'dddd [lepas pukul] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'dalam %s',\n            past : '%s yang lepas',\n            s : 'beberapa saat',\n            m : 'seminit',\n            mm : '%d minit',\n            h : 'sejam',\n            hh : '%d jam',\n            d : 'sehari',\n            dd : '%d hari',\n            M : 'sebulan',\n            MM : '%d bulan',\n            y : 'setahun',\n            yy : '%d tahun'\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ms_my;\n\n}));","//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var ms = moment.defineLocale('ms', {\n        months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n        monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n        weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n        weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n        weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n        longDateFormat : {\n            LT : 'HH.mm',\n            LTS : 'HH.mm.ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY [pukul] HH.mm',\n            LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'\n        },\n        meridiemParse: /pagi|tengahari|petang|malam/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'pagi') {\n                return hour;\n            } else if (meridiem === 'tengahari') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'petang' || meridiem === 'malam') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'pagi';\n            } else if (hours < 15) {\n                return 'tengahari';\n            } else if (hours < 19) {\n                return 'petang';\n            } else {\n                return 'malam';\n            }\n        },\n        calendar : {\n            sameDay : '[Hari ini pukul] LT',\n            nextDay : '[Esok pukul] LT',\n            nextWeek : 'dddd [pukul] LT',\n            lastDay : '[Kelmarin pukul] LT',\n            lastWeek : 'dddd [lepas pukul] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'dalam %s',\n            past : '%s yang lepas',\n            s : 'beberapa saat',\n            m : 'seminit',\n            mm : '%d minit',\n            h : 'sejam',\n            hh : '%d jam',\n            d : 'sehari',\n            dd : '%d hari',\n            M : 'sebulan',\n            MM : '%d bulan',\n            y : 'setahun',\n            yy : '%d tahun'\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ms;\n\n}));","//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '၁',\n        '2': '၂',\n        '3': '၃',\n        '4': '၄',\n        '5': '၅',\n        '6': '၆',\n        '7': '၇',\n        '8': '၈',\n        '9': '၉',\n        '0': '၀'\n    }, numberMap = {\n        '၁': '1',\n        '၂': '2',\n        '၃': '3',\n        '၄': '4',\n        '၅': '5',\n        '၆': '6',\n        '၇': '7',\n        '၈': '8',\n        '၉': '9',\n        '၀': '0'\n    };\n\n    var my = moment.defineLocale('my', {\n        months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),\n        monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n        weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),\n        weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n        weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'DD/MM/YYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar: {\n            sameDay: '[ယနေ.] LT [မှာ]',\n            nextDay: '[မနက်ဖြန်] LT [မှာ]',\n            nextWeek: 'dddd LT [မှာ]',\n            lastDay: '[မနေ.က] LT [မှာ]',\n            lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n            sameElse: 'L'\n        },\n        relativeTime: {\n            future: 'လာမည့် %s မှာ',\n            past: 'လွန်ခဲ့သော %s က',\n            s: 'စက္ကန်.အနည်းငယ်',\n            m: 'တစ်မိနစ်',\n            mm: '%d မိနစ်',\n            h: 'တစ်နာရီ',\n            hh: '%d နာရီ',\n            d: 'တစ်ရက်',\n            dd: '%d ရက်',\n            M: 'တစ်လ',\n            MM: '%d လ',\n            y: 'တစ်နှစ်',\n            yy: '%d နှစ်'\n        },\n        preparse: function (string) {\n            return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        week: {\n            dow: 1, // Monday is the first day of the week.\n            doy: 4 // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return my;\n\n}));","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//!           Sigurd Gartmann : https://github.com/sigurdga\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var nb = moment.defineLocale('nb', {\n        months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n        monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n        weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n        weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY [kl.] HH:mm',\n            LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'\n        },\n        calendar : {\n            sameDay: '[i dag kl.] LT',\n            nextDay: '[i morgen kl.] LT',\n            nextWeek: 'dddd [kl.] LT',\n            lastDay: '[i går kl.] LT',\n            lastWeek: '[forrige] dddd [kl.] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'om %s',\n            past : '%s siden',\n            s : 'noen sekunder',\n            m : 'ett minutt',\n            mm : '%d minutter',\n            h : 'en time',\n            hh : '%d timer',\n            d : 'en dag',\n            dd : '%d dager',\n            M : 'en måned',\n            MM : '%d måneder',\n            y : 'ett år',\n            yy : '%d år'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return nb;\n\n}));","//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '१',\n        '2': '२',\n        '3': '३',\n        '4': '४',\n        '5': '५',\n        '6': '६',\n        '7': '७',\n        '8': '८',\n        '9': '९',\n        '0': '०'\n    },\n    numberMap = {\n        '१': '1',\n        '२': '2',\n        '३': '3',\n        '४': '4',\n        '५': '5',\n        '६': '6',\n        '७': '7',\n        '८': '8',\n        '९': '9',\n        '०': '0'\n    };\n\n    var ne = moment.defineLocale('ne', {\n        months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),\n        monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),\n        weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n        weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'Aको h:mm बजे',\n            LTS : 'Aको h:mm:ss बजे',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, Aको h:mm बजे',\n            LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे'\n        },\n        preparse: function (string) {\n            return string.replace(/[१२३४५६७८९०]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'राति') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'बिहान') {\n                return hour;\n            } else if (meridiem === 'दिउँसो') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'साँझ') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 3) {\n                return 'राति';\n            } else if (hour < 12) {\n                return 'बिहान';\n            } else if (hour < 16) {\n                return 'दिउँसो';\n            } else if (hour < 20) {\n                return 'साँझ';\n            } else {\n                return 'राति';\n            }\n        },\n        calendar : {\n            sameDay : '[आज] LT',\n            nextDay : '[भोलि] LT',\n            nextWeek : '[आउँदो] dddd[,] LT',\n            lastDay : '[हिजो] LT',\n            lastWeek : '[गएको] dddd[,] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%sमा',\n            past : '%s अगाडि',\n            s : 'केही क्षण',\n            m : 'एक मिनेट',\n            mm : '%d मिनेट',\n            h : 'एक घण्टा',\n            hh : '%d घण्टा',\n            d : 'एक दिन',\n            dd : '%d दिन',\n            M : 'एक महिना',\n            MM : '%d महिना',\n            y : 'एक बर्ष',\n            yy : '%d बर्ष'\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ne;\n\n}));","//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n        monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n\n    var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\n    var monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n    var nl = moment.defineLocale('nl', {\n        months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n        monthsShort : function (m, format) {\n            if (/-MMM-/.test(format)) {\n                return monthsShortWithoutDots[m.month()];\n            } else {\n                return monthsShortWithDots[m.month()];\n            }\n        },\n\n        monthsRegex: monthsRegex,\n        monthsShortRegex: monthsRegex,\n        monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,\n        monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n        monthsParse : monthsParse,\n        longMonthsParse : monthsParse,\n        shortMonthsParse : monthsParse,\n\n        weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n        weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),\n        weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD-MM-YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[vandaag om] LT',\n            nextDay: '[morgen om] LT',\n            nextWeek: 'dddd [om] LT',\n            lastDay: '[gisteren om] LT',\n            lastWeek: '[afgelopen] dddd [om] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'over %s',\n            past : '%s geleden',\n            s : 'een paar seconden',\n            m : 'één minuut',\n            mm : '%d minuten',\n            h : 'één uur',\n            hh : '%d uur',\n            d : 'één dag',\n            dd : '%d dagen',\n            M : 'één maand',\n            MM : '%d maanden',\n            y : 'één jaar',\n            yy : '%d jaar'\n        },\n        ordinalParse: /\\d{1,2}(ste|de)/,\n        ordinal : function (number) {\n            return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return nl;\n\n}));","//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! author : https://github.com/mechuwind\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var nn = moment.defineLocale('nn', {\n        months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n        monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n        weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n        weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),\n        weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY [kl.] H:mm',\n            LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'\n        },\n        calendar : {\n            sameDay: '[I dag klokka] LT',\n            nextDay: '[I morgon klokka] LT',\n            nextWeek: 'dddd [klokka] LT',\n            lastDay: '[I går klokka] LT',\n            lastWeek: '[Føregåande] dddd [klokka] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'om %s',\n            past : '%s sidan',\n            s : 'nokre sekund',\n            m : 'eit minutt',\n            mm : '%d minutt',\n            h : 'ein time',\n            hh : '%d timar',\n            d : 'ein dag',\n            dd : '%d dagar',\n            M : 'ein månad',\n            MM : '%d månader',\n            y : 'eit år',\n            yy : '%d år'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return nn;\n\n}));","//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '੧',\n        '2': '੨',\n        '3': '੩',\n        '4': '੪',\n        '5': '੫',\n        '6': '੬',\n        '7': '੭',\n        '8': '੮',\n        '9': '੯',\n        '0': '੦'\n    },\n    numberMap = {\n        '੧': '1',\n        '੨': '2',\n        '੩': '3',\n        '੪': '4',\n        '੫': '5',\n        '੬': '6',\n        '੭': '7',\n        '੮': '8',\n        '੯': '9',\n        '੦': '0'\n    };\n\n    var pa_in = moment.defineLocale('pa-in', {\n        // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.\n        months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n        monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n        weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),\n        weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n        longDateFormat : {\n            LT : 'A h:mm ਵਜੇ',\n            LTS : 'A h:mm:ss ਵਜੇ',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, A h:mm ਵਜੇ',\n            LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'\n        },\n        calendar : {\n            sameDay : '[ਅਜ] LT',\n            nextDay : '[ਕਲ] LT',\n            nextWeek : 'dddd, LT',\n            lastDay : '[ਕਲ] LT',\n            lastWeek : '[ਪਿਛਲੇ] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s ਵਿੱਚ',\n            past : '%s ਪਿਛਲੇ',\n            s : 'ਕੁਝ ਸਕਿੰਟ',\n            m : 'ਇਕ ਮਿੰਟ',\n            mm : '%d ਮਿੰਟ',\n            h : 'ਇੱਕ ਘੰਟਾ',\n            hh : '%d ਘੰਟੇ',\n            d : 'ਇੱਕ ਦਿਨ',\n            dd : '%d ਦਿਨ',\n            M : 'ਇੱਕ ਮਹੀਨਾ',\n            MM : '%d ਮਹੀਨੇ',\n            y : 'ਇੱਕ ਸਾਲ',\n            yy : '%d ਸਾਲ'\n        },\n        preparse: function (string) {\n            return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n        // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n        meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ਰਾਤ') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ਸਵੇਰ') {\n                return hour;\n            } else if (meridiem === 'ਦੁਪਹਿਰ') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'ਸ਼ਾਮ') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ਰਾਤ';\n            } else if (hour < 10) {\n                return 'ਸਵੇਰ';\n            } else if (hour < 17) {\n                return 'ਦੁਪਹਿਰ';\n            } else if (hour < 20) {\n                return 'ਸ਼ਾਮ';\n            } else {\n                return 'ਰਾਤ';\n            }\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return pa_in;\n\n}));","//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),\n        monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');\n    function plural(n) {\n        return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);\n    }\n    function translate(number, withoutSuffix, key) {\n        var result = number + ' ';\n        switch (key) {\n            case 'm':\n                return withoutSuffix ? 'minuta' : 'minutę';\n            case 'mm':\n                return result + (plural(number) ? 'minuty' : 'minut');\n            case 'h':\n                return withoutSuffix  ? 'godzina'  : 'godzinę';\n            case 'hh':\n                return result + (plural(number) ? 'godziny' : 'godzin');\n            case 'MM':\n                return result + (plural(number) ? 'miesiące' : 'miesięcy');\n            case 'yy':\n                return result + (plural(number) ? 'lata' : 'lat');\n        }\n    }\n\n    var pl = moment.defineLocale('pl', {\n        months : function (momentToFormat, format) {\n            if (format === '') {\n                // Hack: if format empty we know this is used to generate\n                // RegExp by moment. Give then back both valid forms of months\n                // in RegExp ready format.\n                return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';\n            } else if (/D MMMM/.test(format)) {\n                return monthsSubjective[momentToFormat.month()];\n            } else {\n                return monthsNominative[momentToFormat.month()];\n            }\n        },\n        monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n        weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n        weekdaysShort : 'nie_pon_wt_śr_czw_pt_sb'.split('_'),\n        weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Dziś o] LT',\n            nextDay: '[Jutro o] LT',\n            nextWeek: '[W] dddd [o] LT',\n            lastDay: '[Wczoraj o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[W zeszłą niedzielę o] LT';\n                    case 3:\n                        return '[W zeszłą środę o] LT';\n                    case 6:\n                        return '[W zeszłą sobotę o] LT';\n                    default:\n                        return '[W zeszły] dddd [o] LT';\n                }\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'za %s',\n            past : '%s temu',\n            s : 'kilka sekund',\n            m : translate,\n            mm : translate,\n            h : translate,\n            hh : translate,\n            d : '1 dzień',\n            dd : '%d dni',\n            M : 'miesiąc',\n            MM : translate,\n            y : 'rok',\n            yy : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return pl;\n\n}));","//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var pt_br = moment.defineLocale('pt-br', {\n        months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n        monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n        weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),\n        weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n        weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D [de] MMMM [de] YYYY',\n            LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',\n            LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'\n        },\n        calendar : {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return (this.day() === 0 || this.day() === 6) ?\n                    '[Último] dddd [às] LT' : // Saturday + Sunday\n                    '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'em %s',\n            past : '%s atrás',\n            s : 'poucos segundos',\n            m : 'um minuto',\n            mm : '%d minutos',\n            h : 'uma hora',\n            hh : '%d horas',\n            d : 'um dia',\n            dd : '%d dias',\n            M : 'um mês',\n            MM : '%d meses',\n            y : 'um ano',\n            yy : '%d anos'\n        },\n        ordinalParse: /\\d{1,2}º/,\n        ordinal : '%dº'\n    });\n\n    return pt_br;\n\n}));","//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var pt = moment.defineLocale('pt', {\n        months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n        monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n        weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),\n        weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n        weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D [de] MMMM [de] YYYY',\n            LLL : 'D [de] MMMM [de] YYYY HH:mm',\n            LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Hoje às] LT',\n            nextDay: '[Amanhã às] LT',\n            nextWeek: 'dddd [às] LT',\n            lastDay: '[Ontem às] LT',\n            lastWeek: function () {\n                return (this.day() === 0 || this.day() === 6) ?\n                    '[Último] dddd [às] LT' : // Saturday + Sunday\n                    '[Última] dddd [às] LT'; // Monday - Friday\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'em %s',\n            past : 'há %s',\n            s : 'segundos',\n            m : 'um minuto',\n            mm : '%d minutos',\n            h : 'uma hora',\n            hh : '%d horas',\n            d : 'um dia',\n            dd : '%d dias',\n            M : 'um mês',\n            MM : '%d meses',\n            y : 'um ano',\n            yy : '%d anos'\n        },\n        ordinalParse: /\\d{1,2}º/,\n        ordinal : '%dº',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return pt;\n\n}));","//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n                'mm': 'minute',\n                'hh': 'ore',\n                'dd': 'zile',\n                'MM': 'luni',\n                'yy': 'ani'\n            },\n            separator = ' ';\n        if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n            separator = ' de ';\n        }\n        return number + separator + format[key];\n    }\n\n    var ro = moment.defineLocale('ro', {\n        months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),\n        monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n        weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n        weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY H:mm',\n            LLLL : 'dddd, D MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay: '[azi la] LT',\n            nextDay: '[mâine la] LT',\n            nextWeek: 'dddd [la] LT',\n            lastDay: '[ieri la] LT',\n            lastWeek: '[fosta] dddd [la] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'peste %s',\n            past : '%s în urmă',\n            s : 'câteva secunde',\n            m : 'un minut',\n            mm : relativeTimeWithPlural,\n            h : 'o oră',\n            hh : relativeTimeWithPlural,\n            d : 'o zi',\n            dd : relativeTimeWithPlural,\n            M : 'o lună',\n            MM : relativeTimeWithPlural,\n            y : 'un an',\n            yy : relativeTimeWithPlural\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ro;\n\n}));","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n            'hh': 'час_часа_часов',\n            'dd': 'день_дня_дней',\n            'MM': 'месяц_месяца_месяцев',\n            'yy': 'год_года_лет'\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'минута' : 'минуту';\n        }\n        else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];\n\n    // http://new.gramota.ru/spravka/rules/139-prop : § 103\n    // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n    // CLDR data:          http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n    var ru = moment.defineLocale('ru', {\n        months : {\n            format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),\n            standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')\n        },\n        monthsShort : {\n            // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку ?\n            format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),\n            standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')\n        },\n        weekdays : {\n            standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),\n            format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),\n            isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\\] ?dddd/\n        },\n        weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n        monthsParse : monthsParse,\n        longMonthsParse : monthsParse,\n        shortMonthsParse : monthsParse,\n\n        // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n        monthsRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // копия предыдущего\n        monthsShortRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n        // полные названия с падежами\n        monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n        // Выражение, которое соотвествует только сокращённым формам\n        monthsShortStrictRegex: /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY г.',\n            LLL : 'D MMMM YYYY г., HH:mm',\n            LLLL : 'dddd, D MMMM YYYY г., HH:mm'\n        },\n        calendar : {\n            sameDay: '[Сегодня в] LT',\n            nextDay: '[Завтра в] LT',\n            lastDay: '[Вчера в] LT',\n            nextWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В следующее] dddd [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В следующий] dddd [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В следующую] dddd [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd [в] LT';\n                    } else {\n                        return '[В] dddd [в] LT';\n                    }\n                }\n            },\n            lastWeek: function (now) {\n                if (now.week() !== this.week()) {\n                    switch (this.day()) {\n                        case 0:\n                            return '[В прошлое] dddd [в] LT';\n                        case 1:\n                        case 2:\n                        case 4:\n                            return '[В прошлый] dddd [в] LT';\n                        case 3:\n                        case 5:\n                        case 6:\n                            return '[В прошлую] dddd [в] LT';\n                    }\n                } else {\n                    if (this.day() === 2) {\n                        return '[Во] dddd [в] LT';\n                    } else {\n                        return '[В] dddd [в] LT';\n                    }\n                }\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'через %s',\n            past : '%s назад',\n            s : 'несколько секунд',\n            m : relativeTimeWithPlural,\n            mm : relativeTimeWithPlural,\n            h : 'час',\n            hh : relativeTimeWithPlural,\n            d : 'день',\n            dd : relativeTimeWithPlural,\n            M : 'месяц',\n            MM : relativeTimeWithPlural,\n            y : 'год',\n            yy : relativeTimeWithPlural\n        },\n        meridiemParse: /ночи|утра|дня|вечера/i,\n        isPM : function (input) {\n            return /^(дня|вечера)$/.test(input);\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночи';\n            } else if (hour < 12) {\n                return 'утра';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечера';\n            }\n        },\n        ordinalParse: /\\d{1,2}-(й|го|я)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                case 'w':\n                case 'W':\n                    return number + '-я';\n                default:\n                    return number;\n            }\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ru;\n\n}));","//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n\n    var se = moment.defineLocale('se', {\n        months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),\n        monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n        weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),\n        weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n        weekdaysMin : 's_v_m_g_d_b_L'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'MMMM D. [b.] YYYY',\n            LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm',\n            LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'\n        },\n        calendar : {\n            sameDay: '[otne ti] LT',\n            nextDay: '[ihttin ti] LT',\n            nextWeek: 'dddd [ti] LT',\n            lastDay: '[ikte ti] LT',\n            lastWeek: '[ovddit] dddd [ti] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : '%s geažes',\n            past : 'maŋit %s',\n            s : 'moadde sekunddat',\n            m : 'okta minuhta',\n            mm : '%d minuhtat',\n            h : 'okta diimmu',\n            hh : '%d diimmut',\n            d : 'okta beaivi',\n            dd : '%d beaivvit',\n            M : 'okta mánnu',\n            MM : '%d mánut',\n            y : 'okta jahki',\n            yy : '%d jagit'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return se;\n\n}));","//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    /*jshint -W100*/\n    var si = moment.defineLocale('si', {\n        months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),\n        monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),\n        weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),\n        weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n        weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'a h:mm',\n            LTS : 'a h:mm:ss',\n            L : 'YYYY/MM/DD',\n            LL : 'YYYY MMMM D',\n            LLL : 'YYYY MMMM D, a h:mm',\n            LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'\n        },\n        calendar : {\n            sameDay : '[අද] LT[ට]',\n            nextDay : '[හෙට] LT[ට]',\n            nextWeek : 'dddd LT[ට]',\n            lastDay : '[ඊයේ] LT[ට]',\n            lastWeek : '[පසුගිය] dddd LT[ට]',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%sකින්',\n            past : '%sකට පෙර',\n            s : 'තත්පර කිහිපය',\n            m : 'මිනිත්තුව',\n            mm : 'මිනිත්තු %d',\n            h : 'පැය',\n            hh : 'පැය %d',\n            d : 'දිනය',\n            dd : 'දින %d',\n            M : 'මාසය',\n            MM : 'මාස %d',\n            y : 'වසර',\n            yy : 'වසර %d'\n        },\n        ordinalParse: /\\d{1,2} වැනි/,\n        ordinal : function (number) {\n            return number + ' වැනි';\n        },\n        meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n        isPM : function (input) {\n            return input === 'ප.ව.' || input === 'පස් වරු';\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'ප.ව.' : 'පස් වරු';\n            } else {\n                return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n            }\n        }\n    });\n\n    return si;\n\n}));","//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),\n        monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n    function plural(n) {\n        return (n > 1) && (n < 5);\n    }\n    function translate(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':  // a few seconds / in a few seconds / a few seconds ago\n                return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';\n            case 'm':  // a minute / in a minute / a minute ago\n                return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');\n            case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'minúty' : 'minút');\n                } else {\n                    return result + 'minútami';\n                }\n                break;\n            case 'h':  // an hour / in an hour / an hour ago\n                return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n            case 'hh': // 9 hours / in 9 hours / 9 hours ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'hodiny' : 'hodín');\n                } else {\n                    return result + 'hodinami';\n                }\n                break;\n            case 'd':  // a day / in a day / a day ago\n                return (withoutSuffix || isFuture) ? 'deň' : 'dňom';\n            case 'dd': // 9 days / in 9 days / 9 days ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'dni' : 'dní');\n                } else {\n                    return result + 'dňami';\n                }\n                break;\n            case 'M':  // a month / in a month / a month ago\n                return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';\n            case 'MM': // 9 months / in 9 months / 9 months ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'mesiace' : 'mesiacov');\n                } else {\n                    return result + 'mesiacmi';\n                }\n                break;\n            case 'y':  // a year / in a year / a year ago\n                return (withoutSuffix || isFuture) ? 'rok' : 'rokom';\n            case 'yy': // 9 years / in 9 years / 9 years ago\n                if (withoutSuffix || isFuture) {\n                    return result + (plural(number) ? 'roky' : 'rokov');\n                } else {\n                    return result + 'rokmi';\n                }\n                break;\n        }\n    }\n\n    var sk = moment.defineLocale('sk', {\n        months : months,\n        monthsShort : monthsShort,\n        weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n        weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),\n        weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),\n        longDateFormat : {\n            LT: 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY H:mm',\n            LLLL : 'dddd D. MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay: '[dnes o] LT',\n            nextDay: '[zajtra o] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[v] dddd [o] LT';\n                    case 3:\n                        return '[v stredu o] LT';\n                    case 4:\n                        return '[vo štvrtok o] LT';\n                    case 5:\n                        return '[v piatok o] LT';\n                    case 6:\n                        return '[v sobotu o] LT';\n                }\n            },\n            lastDay: '[včera o] LT',\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[minulú nedeľu o] LT';\n                    case 1:\n                    case 2:\n                        return '[minulý] dddd [o] LT';\n                    case 3:\n                        return '[minulú stredu o] LT';\n                    case 4:\n                    case 5:\n                        return '[minulý] dddd [o] LT';\n                    case 6:\n                        return '[minulú sobotu o] LT';\n                }\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'za %s',\n            past : 'pred %s',\n            s : translate,\n            m : translate,\n            mm : translate,\n            h : translate,\n            hh : translate,\n            d : translate,\n            dd : translate,\n            M : translate,\n            MM : translate,\n            y : translate,\n            yy : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return sk;\n\n}));","//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var result = number + ' ';\n        switch (key) {\n            case 's':\n                return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n            case 'm':\n                return withoutSuffix ? 'ena minuta' : 'eno minuto';\n            case 'mm':\n                if (number === 1) {\n                    result += withoutSuffix ? 'minuta' : 'minuto';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n                }\n                return result;\n            case 'h':\n                return withoutSuffix ? 'ena ura' : 'eno uro';\n            case 'hh':\n                if (number === 1) {\n                    result += withoutSuffix ? 'ura' : 'uro';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'uri' : 'urama';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'ure' : 'urami';\n                } else {\n                    result += withoutSuffix || isFuture ? 'ur' : 'urami';\n                }\n                return result;\n            case 'd':\n                return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n            case 'dd':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n                } else {\n                    result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n                }\n                return result;\n            case 'M':\n                return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n            case 'MM':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n                } else {\n                    result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n                }\n                return result;\n            case 'y':\n                return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n            case 'yy':\n                if (number === 1) {\n                    result += withoutSuffix || isFuture ? 'leto' : 'letom';\n                } else if (number === 2) {\n                    result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n                } else if (number < 5) {\n                    result += withoutSuffix || isFuture ? 'leta' : 'leti';\n                } else {\n                    result += withoutSuffix || isFuture ? 'let' : 'leti';\n                }\n                return result;\n        }\n    }\n\n    var sl = moment.defineLocale('sl', {\n        months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),\n        monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n        weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n        weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM YYYY',\n            LLL : 'D. MMMM YYYY H:mm',\n            LLLL : 'dddd, D. MMMM YYYY H:mm'\n        },\n        calendar : {\n            sameDay  : '[danes ob] LT',\n            nextDay  : '[jutri ob] LT',\n\n            nextWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[v] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[v] [sredo] [ob] LT';\n                    case 6:\n                        return '[v] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[v] dddd [ob] LT';\n                }\n            },\n            lastDay  : '[včeraj ob] LT',\n            lastWeek : function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[prejšnjo] [nedeljo] [ob] LT';\n                    case 3:\n                        return '[prejšnjo] [sredo] [ob] LT';\n                    case 6:\n                        return '[prejšnjo] [soboto] [ob] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[prejšnji] dddd [ob] LT';\n                }\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'čez %s',\n            past   : 'pred %s',\n            s      : processRelativeTime,\n            m      : processRelativeTime,\n            mm     : processRelativeTime,\n            h      : processRelativeTime,\n            hh     : processRelativeTime,\n            d      : processRelativeTime,\n            dd     : processRelativeTime,\n            M      : processRelativeTime,\n            MM     : processRelativeTime,\n            y      : processRelativeTime,\n            yy     : processRelativeTime\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return sl;\n\n}));","//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var sq = moment.defineLocale('sq', {\n        months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),\n        monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n        weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),\n        weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n        weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'),\n        weekdaysParseExact : true,\n        meridiemParse: /PD|MD/,\n        isPM: function (input) {\n            return input.charAt(0) === 'M';\n        },\n        meridiem : function (hours, minutes, isLower) {\n            return hours < 12 ? 'PD' : 'MD';\n        },\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[Sot në] LT',\n            nextDay : '[Nesër në] LT',\n            nextWeek : 'dddd [në] LT',\n            lastDay : '[Dje në] LT',\n            lastWeek : 'dddd [e kaluar në] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'në %s',\n            past : '%s më parë',\n            s : 'disa sekonda',\n            m : 'një minutë',\n            mm : '%d minuta',\n            h : 'një orë',\n            hh : '%d orë',\n            d : 'një ditë',\n            dd : '%d ditë',\n            M : 'një muaj',\n            MM : '%d muaj',\n            y : 'një vit',\n            yy : '%d vite'\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return sq;\n\n}));","//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var translator = {\n        words: { //Different grammatical cases\n            m: ['један минут', 'једне минуте'],\n            mm: ['минут', 'минуте', 'минута'],\n            h: ['један сат', 'једног сата'],\n            hh: ['сат', 'сата', 'сати'],\n            dd: ['дан', 'дана', 'дана'],\n            MM: ['месец', 'месеца', 'месеци'],\n            yy: ['година', 'године', 'година']\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n            }\n        }\n    };\n\n    var sr_cyrl = moment.defineLocale('sr-cyrl', {\n        months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),\n        monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n        weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n        weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS : 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm'\n        },\n        calendar: {\n            sameDay: '[данас у] LT',\n            nextDay: '[сутра у] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[у] [недељу] [у] LT';\n                    case 3:\n                        return '[у] [среду] [у] LT';\n                    case 6:\n                        return '[у] [суботу] [у] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[у] dddd [у] LT';\n                }\n            },\n            lastDay  : '[јуче у] LT',\n            lastWeek : function () {\n                var lastWeekDays = [\n                    '[прошле] [недеље] [у] LT',\n                    '[прошлог] [понедељка] [у] LT',\n                    '[прошлог] [уторка] [у] LT',\n                    '[прошле] [среде] [у] LT',\n                    '[прошлог] [четвртка] [у] LT',\n                    '[прошлог] [петка] [у] LT',\n                    '[прошле] [суботе] [у] LT'\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'за %s',\n            past   : 'пре %s',\n            s      : 'неколико секунди',\n            m      : translator.translate,\n            mm     : translator.translate,\n            h      : translator.translate,\n            hh     : translator.translate,\n            d      : 'дан',\n            dd     : translator.translate,\n            M      : 'месец',\n            MM     : translator.translate,\n            y      : 'годину',\n            yy     : translator.translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return sr_cyrl;\n\n}));","//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var translator = {\n        words: { //Different grammatical cases\n            m: ['jedan minut', 'jedne minute'],\n            mm: ['minut', 'minute', 'minuta'],\n            h: ['jedan sat', 'jednog sata'],\n            hh: ['sat', 'sata', 'sati'],\n            dd: ['dan', 'dana', 'dana'],\n            MM: ['mesec', 'meseca', 'meseci'],\n            yy: ['godina', 'godine', 'godina']\n        },\n        correctGrammaticalCase: function (number, wordKey) {\n            return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);\n        },\n        translate: function (number, withoutSuffix, key) {\n            var wordKey = translator.words[key];\n            if (key.length === 1) {\n                return withoutSuffix ? wordKey[0] : wordKey[1];\n            } else {\n                return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n            }\n        }\n    };\n\n    var sr = moment.defineLocale('sr', {\n        months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n        monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n        monthsParseExact: true,\n        weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),\n        weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat: {\n            LT: 'H:mm',\n            LTS : 'H:mm:ss',\n            L: 'DD.MM.YYYY',\n            LL: 'D. MMMM YYYY',\n            LLL: 'D. MMMM YYYY H:mm',\n            LLLL: 'dddd, D. MMMM YYYY H:mm'\n        },\n        calendar: {\n            sameDay: '[danas u] LT',\n            nextDay: '[sutra u] LT',\n            nextWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                        return '[u] [nedelju] [u] LT';\n                    case 3:\n                        return '[u] [sredu] [u] LT';\n                    case 6:\n                        return '[u] [subotu] [u] LT';\n                    case 1:\n                    case 2:\n                    case 4:\n                    case 5:\n                        return '[u] dddd [u] LT';\n                }\n            },\n            lastDay  : '[juče u] LT',\n            lastWeek : function () {\n                var lastWeekDays = [\n                    '[prošle] [nedelje] [u] LT',\n                    '[prošlog] [ponedeljka] [u] LT',\n                    '[prošlog] [utorka] [u] LT',\n                    '[prošle] [srede] [u] LT',\n                    '[prošlog] [četvrtka] [u] LT',\n                    '[prošlog] [petka] [u] LT',\n                    '[prošle] [subote] [u] LT'\n                ];\n                return lastWeekDays[this.day()];\n            },\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'za %s',\n            past   : 'pre %s',\n            s      : 'nekoliko sekundi',\n            m      : translator.translate,\n            mm     : translator.translate,\n            h      : translator.translate,\n            hh     : translator.translate,\n            d      : 'dan',\n            dd     : translator.translate,\n            M      : 'mesec',\n            MM     : translator.translate,\n            y      : 'godinu',\n            yy     : translator.translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return sr;\n\n}));","//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n\n    var ss = moment.defineLocale('ss', {\n        months : \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split('_'),\n        monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n        weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),\n        weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n        weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'h:mm A',\n            LTS : 'h:mm:ss A',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY h:mm A',\n            LLLL : 'dddd, D MMMM YYYY h:mm A'\n        },\n        calendar : {\n            sameDay : '[Namuhla nga] LT',\n            nextDay : '[Kusasa nga] LT',\n            nextWeek : 'dddd [nga] LT',\n            lastDay : '[Itolo nga] LT',\n            lastWeek : 'dddd [leliphelile] [nga] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'nga %s',\n            past : 'wenteka nga %s',\n            s : 'emizuzwana lomcane',\n            m : 'umzuzu',\n            mm : '%d emizuzu',\n            h : 'lihora',\n            hh : '%d emahora',\n            d : 'lilanga',\n            dd : '%d emalanga',\n            M : 'inyanga',\n            MM : '%d tinyanga',\n            y : 'umnyaka',\n            yy : '%d iminyaka'\n        },\n        meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 11) {\n                return 'ekuseni';\n            } else if (hours < 15) {\n                return 'emini';\n            } else if (hours < 19) {\n                return 'entsambama';\n            } else {\n                return 'ebusuku';\n            }\n        },\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'ekuseni') {\n                return hour;\n            } else if (meridiem === 'emini') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n                if (hour === 0) {\n                    return 0;\n                }\n                return hour + 12;\n            }\n        },\n        ordinalParse: /\\d{1,2}/,\n        ordinal : '%d',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return ss;\n\n}));","//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var sv = moment.defineLocale('sv', {\n        months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),\n        monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n        weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n        weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n        weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'YYYY-MM-DD',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY [kl.] HH:mm',\n            LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',\n            lll : 'D MMM YYYY HH:mm',\n            llll : 'ddd D MMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Idag] LT',\n            nextDay: '[Imorgon] LT',\n            lastDay: '[Igår] LT',\n            nextWeek: '[På] dddd LT',\n            lastWeek: '[I] dddd[s] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'om %s',\n            past : 'för %s sedan',\n            s : 'några sekunder',\n            m : 'en minut',\n            mm : '%d minuter',\n            h : 'en timme',\n            hh : '%d timmar',\n            d : 'en dag',\n            dd : '%d dagar',\n            M : 'en månad',\n            MM : '%d månader',\n            y : 'ett år',\n            yy : '%d år'\n        },\n        ordinalParse: /\\d{1,2}(e|a)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (~~(number % 100 / 10) === 1) ? 'e' :\n                (b === 1) ? 'a' :\n                (b === 2) ? 'a' :\n                (b === 3) ? 'e' : 'e';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return sv;\n\n}));","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var sw = moment.defineLocale('sw', {\n        months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),\n        monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n        weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),\n        weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n        weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[leo saa] LT',\n            nextDay : '[kesho saa] LT',\n            nextWeek : '[wiki ijayo] dddd [saat] LT',\n            lastDay : '[jana] LT',\n            lastWeek : '[wiki iliyopita] dddd [saat] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s baadaye',\n            past : 'tokea %s',\n            s : 'hivi punde',\n            m : 'dakika moja',\n            mm : 'dakika %d',\n            h : 'saa limoja',\n            hh : 'masaa %d',\n            d : 'siku moja',\n            dd : 'masiku %d',\n            M : 'mwezi mmoja',\n            MM : 'miezi %d',\n            y : 'mwaka mmoja',\n            yy : 'miaka %d'\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return sw;\n\n}));","//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var symbolMap = {\n        '1': '௧',\n        '2': '௨',\n        '3': '௩',\n        '4': '௪',\n        '5': '௫',\n        '6': '௬',\n        '7': '௭',\n        '8': '௮',\n        '9': '௯',\n        '0': '௦'\n    }, numberMap = {\n        '௧': '1',\n        '௨': '2',\n        '௩': '3',\n        '௪': '4',\n        '௫': '5',\n        '௬': '6',\n        '௭': '7',\n        '௮': '8',\n        '௯': '9',\n        '௦': '0'\n    };\n\n    var ta = moment.defineLocale('ta', {\n        months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n        monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n        weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),\n        weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),\n        weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, HH:mm',\n            LLLL : 'dddd, D MMMM YYYY, HH:mm'\n        },\n        calendar : {\n            sameDay : '[இன்று] LT',\n            nextDay : '[நாளை] LT',\n            nextWeek : 'dddd, LT',\n            lastDay : '[நேற்று] LT',\n            lastWeek : '[கடந்த வாரம்] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s இல்',\n            past : '%s முன்',\n            s : 'ஒரு சில விநாடிகள்',\n            m : 'ஒரு நிமிடம்',\n            mm : '%d நிமிடங்கள்',\n            h : 'ஒரு மணி நேரம்',\n            hh : '%d மணி நேரம்',\n            d : 'ஒரு நாள்',\n            dd : '%d நாட்கள்',\n            M : 'ஒரு மாதம்',\n            MM : '%d மாதங்கள்',\n            y : 'ஒரு வருடம்',\n            yy : '%d ஆண்டுகள்'\n        },\n        ordinalParse: /\\d{1,2}வது/,\n        ordinal : function (number) {\n            return number + 'வது';\n        },\n        preparse: function (string) {\n            return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n                return numberMap[match];\n            });\n        },\n        postformat: function (string) {\n            return string.replace(/\\d/g, function (match) {\n                return symbolMap[match];\n            });\n        },\n        // refer http://ta.wikipedia.org/s/1er1\n        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 2) {\n                return ' யாமம்';\n            } else if (hour < 6) {\n                return ' வைகறை';  // வைகறை\n            } else if (hour < 10) {\n                return ' காலை'; // காலை\n            } else if (hour < 14) {\n                return ' நண்பகல்'; // நண்பகல்\n            } else if (hour < 18) {\n                return ' எற்பாடு'; // எற்பாடு\n            } else if (hour < 22) {\n                return ' மாலை'; // மாலை\n            } else {\n                return ' யாமம்';\n            }\n        },\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'யாமம்') {\n                return hour < 2 ? hour : hour + 12;\n            } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n                return hour;\n            } else if (meridiem === 'நண்பகல்') {\n                return hour >= 10 ? hour : hour + 12;\n            } else {\n                return hour + 12;\n            }\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return ta;\n\n}));","//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var te = moment.defineLocale('te', {\n        months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),\n        monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),\n        weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n        weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n        longDateFormat : {\n            LT : 'A h:mm',\n            LTS : 'A h:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY, A h:mm',\n            LLLL : 'dddd, D MMMM YYYY, A h:mm'\n        },\n        calendar : {\n            sameDay : '[నేడు] LT',\n            nextDay : '[రేపు] LT',\n            nextWeek : 'dddd, LT',\n            lastDay : '[నిన్న] LT',\n            lastWeek : '[గత] dddd, LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s లో',\n            past : '%s క్రితం',\n            s : 'కొన్ని క్షణాలు',\n            m : 'ఒక నిమిషం',\n            mm : '%d నిమిషాలు',\n            h : 'ఒక గంట',\n            hh : '%d గంటలు',\n            d : 'ఒక రోజు',\n            dd : '%d రోజులు',\n            M : 'ఒక నెల',\n            MM : '%d నెలలు',\n            y : 'ఒక సంవత్సరం',\n            yy : '%d సంవత్సరాలు'\n        },\n        ordinalParse : /\\d{1,2}వ/,\n        ordinal : '%dవ',\n        meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === 'రాత్రి') {\n                return hour < 4 ? hour : hour + 12;\n            } else if (meridiem === 'ఉదయం') {\n                return hour;\n            } else if (meridiem === 'మధ్యాహ్నం') {\n                return hour >= 10 ? hour : hour + 12;\n            } else if (meridiem === 'సాయంత్రం') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'రాత్రి';\n            } else if (hour < 10) {\n                return 'ఉదయం';\n            } else if (hour < 17) {\n                return 'మధ్యాహ్నం';\n            } else if (hour < 20) {\n                return 'సాయంత్రం';\n            } else {\n                return 'రాత్రి';\n            }\n        },\n        week : {\n            dow : 0, // Sunday is the first day of the week.\n            doy : 6  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return te;\n\n}));","//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var th = moment.defineLocale('th', {\n        months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),\n        monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),\n        monthsParseExact: true,\n        weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n        weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n        weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'H:mm',\n            LTS : 'H:mm:ss',\n            L : 'YYYY/MM/DD',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY เวลา H:mm',\n            LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'\n        },\n        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n        isPM: function (input) {\n            return input === 'หลังเที่ยง';\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ก่อนเที่ยง';\n            } else {\n                return 'หลังเที่ยง';\n            }\n        },\n        calendar : {\n            sameDay : '[วันนี้ เวลา] LT',\n            nextDay : '[พรุ่งนี้ เวลา] LT',\n            nextWeek : 'dddd[หน้า เวลา] LT',\n            lastDay : '[เมื่อวานนี้ เวลา] LT',\n            lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'อีก %s',\n            past : '%sที่แล้ว',\n            s : 'ไม่กี่วินาที',\n            m : '1 นาที',\n            mm : '%d นาที',\n            h : '1 ชั่วโมง',\n            hh : '%d ชั่วโมง',\n            d : '1 วัน',\n            dd : '%d วัน',\n            M : '1 เดือน',\n            MM : '%d เดือน',\n            y : '1 ปี',\n            yy : '%d ปี'\n        }\n    });\n\n    return th;\n\n}));","//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var tl_ph = moment.defineLocale('tl-ph', {\n        months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n        monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n        weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n        weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n        weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'MM/D/YYYY',\n            LL : 'MMMM D, YYYY',\n            LLL : 'MMMM D, YYYY HH:mm',\n            LLLL : 'dddd, MMMM DD, YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Ngayon sa] LT',\n            nextDay: '[Bukas sa] LT',\n            nextWeek: 'dddd [sa] LT',\n            lastDay: '[Kahapon sa] LT',\n            lastWeek: 'dddd [huling linggo] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'sa loob ng %s',\n            past : '%s ang nakalipas',\n            s : 'ilang segundo',\n            m : 'isang minuto',\n            mm : '%d minuto',\n            h : 'isang oras',\n            hh : '%d oras',\n            d : 'isang araw',\n            dd : '%d araw',\n            M : 'isang buwan',\n            MM : '%d buwan',\n            y : 'isang taon',\n            yy : '%d taon'\n        },\n        ordinalParse: /\\d{1,2}/,\n        ordinal : function (number) {\n            return number;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return tl_ph;\n\n}));","//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n    function translateFuture(output) {\n        var time = output;\n        time = (output.indexOf('jaj') !== -1) ?\n        time.slice(0, -3) + 'leS' :\n        (output.indexOf('jar') !== -1) ?\n        time.slice(0, -3) + 'waQ' :\n        (output.indexOf('DIS') !== -1) ?\n        time.slice(0, -3) + 'nem' :\n        time + ' pIq';\n        return time;\n    }\n\n    function translatePast(output) {\n        var time = output;\n        time = (output.indexOf('jaj') !== -1) ?\n        time.slice(0, -3) + 'Hu’' :\n        (output.indexOf('jar') !== -1) ?\n        time.slice(0, -3) + 'wen' :\n        (output.indexOf('DIS') !== -1) ?\n        time.slice(0, -3) + 'ben' :\n        time + ' ret';\n        return time;\n    }\n\n    function translate(number, withoutSuffix, string, isFuture) {\n        var numberNoun = numberAsNoun(number);\n        switch (string) {\n            case 'mm':\n                return numberNoun + ' tup';\n            case 'hh':\n                return numberNoun + ' rep';\n            case 'dd':\n                return numberNoun + ' jaj';\n            case 'MM':\n                return numberNoun + ' jar';\n            case 'yy':\n                return numberNoun + ' DIS';\n        }\n    }\n\n    function numberAsNoun(number) {\n        var hundred = Math.floor((number % 1000) / 100),\n        ten = Math.floor((number % 100) / 10),\n        one = number % 10,\n        word = '';\n        if (hundred > 0) {\n            word += numbersNouns[hundred] + 'vatlh';\n        }\n        if (ten > 0) {\n            word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';\n        }\n        if (one > 0) {\n            word += ((word !== '') ? ' ' : '') + numbersNouns[one];\n        }\n        return (word === '') ? 'pagh' : word;\n    }\n\n    var tlh = moment.defineLocale('tlh', {\n        months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),\n        monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[DaHjaj] LT',\n            nextDay: '[wa’leS] LT',\n            nextWeek: 'LLL',\n            lastDay: '[wa’Hu’] LT',\n            lastWeek: 'LLL',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : translateFuture,\n            past : translatePast,\n            s : 'puS lup',\n            m : 'wa’ tup',\n            mm : translate,\n            h : 'wa’ rep',\n            hh : translate,\n            d : 'wa’ jaj',\n            dd : translate,\n            M : 'wa’ jar',\n            MM : translate,\n            y : 'wa’ DIS',\n            yy : translate\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return tlh;\n\n}));","//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//!           Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var suffixes = {\n        1: '\\'inci',\n        5: '\\'inci',\n        8: '\\'inci',\n        70: '\\'inci',\n        80: '\\'inci',\n        2: '\\'nci',\n        7: '\\'nci',\n        20: '\\'nci',\n        50: '\\'nci',\n        3: '\\'üncü',\n        4: '\\'üncü',\n        100: '\\'üncü',\n        6: '\\'ncı',\n        9: '\\'uncu',\n        10: '\\'uncu',\n        30: '\\'uncu',\n        60: '\\'ıncı',\n        90: '\\'ıncı'\n    };\n\n    var tr = moment.defineLocale('tr', {\n        months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),\n        monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n        weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),\n        weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),\n        weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[bugün saat] LT',\n            nextDay : '[yarın saat] LT',\n            nextWeek : '[haftaya] dddd [saat] LT',\n            lastDay : '[dün] LT',\n            lastWeek : '[geçen hafta] dddd [saat] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : '%s sonra',\n            past : '%s önce',\n            s : 'birkaç saniye',\n            m : 'bir dakika',\n            mm : '%d dakika',\n            h : 'bir saat',\n            hh : '%d saat',\n            d : 'bir gün',\n            dd : '%d gün',\n            M : 'bir ay',\n            MM : '%d ay',\n            y : 'bir yıl',\n            yy : '%d yıl'\n        },\n        ordinalParse: /\\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,\n        ordinal : function (number) {\n            if (number === 0) {  // special case for zero\n                return number + '\\'ıncı';\n            }\n            var a = number % 10,\n                b = number % 100 - a,\n                c = number >= 100 ? 100 : null;\n            return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return tr;\n\n}));","//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n    // This is currently too difficult (maybe even impossible) to add.\n    var tzl = moment.defineLocale('tzl', {\n        months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),\n        monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n        weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n        weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n        weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n        longDateFormat : {\n            LT : 'HH.mm',\n            LTS : 'HH.mm.ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D. MMMM [dallas] YYYY',\n            LLL : 'D. MMMM [dallas] YYYY HH.mm',\n            LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'\n        },\n        meridiemParse: /d\\'o|d\\'a/i,\n        isPM : function (input) {\n            return 'd\\'o' === input.toLowerCase();\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours > 11) {\n                return isLower ? 'd\\'o' : 'D\\'O';\n            } else {\n                return isLower ? 'd\\'a' : 'D\\'A';\n            }\n        },\n        calendar : {\n            sameDay : '[oxhi à] LT',\n            nextDay : '[demà à] LT',\n            nextWeek : 'dddd [à] LT',\n            lastDay : '[ieiri à] LT',\n            lastWeek : '[sür el] dddd [lasteu à] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'osprei %s',\n            past : 'ja%s',\n            s : processRelativeTime,\n            m : processRelativeTime,\n            mm : processRelativeTime,\n            h : processRelativeTime,\n            hh : processRelativeTime,\n            d : processRelativeTime,\n            dd : processRelativeTime,\n            M : processRelativeTime,\n            MM : processRelativeTime,\n            y : processRelativeTime,\n            yy : processRelativeTime\n        },\n        ordinalParse: /\\d{1,2}\\./,\n        ordinal : '%d.',\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    function processRelativeTime(number, withoutSuffix, key, isFuture) {\n        var format = {\n            's': ['viensas secunds', '\\'iensas secunds'],\n            'm': ['\\'n míut', '\\'iens míut'],\n            'mm': [number + ' míuts', '' + number + ' míuts'],\n            'h': ['\\'n þora', '\\'iensa þora'],\n            'hh': [number + ' þoras', '' + number + ' þoras'],\n            'd': ['\\'n ziua', '\\'iensa ziua'],\n            'dd': [number + ' ziuas', '' + number + ' ziuas'],\n            'M': ['\\'n mes', '\\'iens mes'],\n            'MM': [number + ' mesen', '' + number + ' mesen'],\n            'y': ['\\'n ar', '\\'iens ar'],\n            'yy': [number + ' ars', '' + number + ' ars']\n        };\n        return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);\n    }\n\n    return tzl;\n\n}));","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var tzm_latn = moment.defineLocale('tzm-latn', {\n        months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n        monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n        weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[asdkh g] LT',\n            nextDay: '[aska g] LT',\n            nextWeek: 'dddd [g] LT',\n            lastDay: '[assant g] LT',\n            lastWeek: 'dddd [g] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'dadkh s yan %s',\n            past : 'yan %s',\n            s : 'imik',\n            m : 'minuḍ',\n            mm : '%d minuḍ',\n            h : 'saɛa',\n            hh : '%d tassaɛin',\n            d : 'ass',\n            dd : '%d ossan',\n            M : 'ayowr',\n            MM : '%d iyyirn',\n            y : 'asgas',\n            yy : '%d isgasn'\n        },\n        week : {\n            dow : 6, // Saturday is the first day of the week.\n            doy : 12  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return tzm_latn;\n\n}));","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var tzm = moment.defineLocale('tzm', {\n        months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n        monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n        weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n            nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n            nextWeek: 'dddd [ⴴ] LT',\n            lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n            lastWeek: 'dddd [ⴴ] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n            past : 'ⵢⴰⵏ %s',\n            s : 'ⵉⵎⵉⴽ',\n            m : 'ⵎⵉⵏⵓⴺ',\n            mm : '%d ⵎⵉⵏⵓⴺ',\n            h : 'ⵙⴰⵄⴰ',\n            hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n            d : 'ⴰⵙⵙ',\n            dd : '%d oⵙⵙⴰⵏ',\n            M : 'ⴰⵢoⵓⵔ',\n            MM : '%d ⵉⵢⵢⵉⵔⵏ',\n            y : 'ⴰⵙⴳⴰⵙ',\n            yy : '%d ⵉⵙⴳⴰⵙⵏ'\n        },\n        week : {\n            dow : 6, // Saturday is the first day of the week.\n            doy : 12  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return tzm;\n\n}));","//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    function plural(word, num) {\n        var forms = word.split('_');\n        return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);\n    }\n    function relativeTimeWithPlural(number, withoutSuffix, key) {\n        var format = {\n            'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n            'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n            'dd': 'день_дні_днів',\n            'MM': 'місяць_місяці_місяців',\n            'yy': 'рік_роки_років'\n        };\n        if (key === 'm') {\n            return withoutSuffix ? 'хвилина' : 'хвилину';\n        }\n        else if (key === 'h') {\n            return withoutSuffix ? 'година' : 'годину';\n        }\n        else {\n            return number + ' ' + plural(format[key], +number);\n        }\n    }\n    function weekdaysCaseReplace(m, format) {\n        var weekdays = {\n            'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),\n            'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),\n            'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')\n        },\n        nounCase = (/(\\[[ВвУу]\\]) ?dddd/).test(format) ?\n            'accusative' :\n            ((/\\[?(?:минулої|наступної)? ?\\] ?dddd/).test(format) ?\n                'genitive' :\n                'nominative');\n        return weekdays[nounCase][m.day()];\n    }\n    function processHoursFunction(str) {\n        return function () {\n            return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n        };\n    }\n\n    var uk = moment.defineLocale('uk', {\n        months : {\n            'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),\n            'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')\n        },\n        monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),\n        weekdays : weekdaysCaseReplace,\n        weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD.MM.YYYY',\n            LL : 'D MMMM YYYY р.',\n            LLL : 'D MMMM YYYY р., HH:mm',\n            LLLL : 'dddd, D MMMM YYYY р., HH:mm'\n        },\n        calendar : {\n            sameDay: processHoursFunction('[Сьогодні '),\n            nextDay: processHoursFunction('[Завтра '),\n            lastDay: processHoursFunction('[Вчора '),\n            nextWeek: processHoursFunction('[У] dddd ['),\n            lastWeek: function () {\n                switch (this.day()) {\n                    case 0:\n                    case 3:\n                    case 5:\n                    case 6:\n                        return processHoursFunction('[Минулої] dddd [').call(this);\n                    case 1:\n                    case 2:\n                    case 4:\n                        return processHoursFunction('[Минулого] dddd [').call(this);\n                }\n            },\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : 'за %s',\n            past : '%s тому',\n            s : 'декілька секунд',\n            m : relativeTimeWithPlural,\n            mm : relativeTimeWithPlural,\n            h : 'годину',\n            hh : relativeTimeWithPlural,\n            d : 'день',\n            dd : relativeTimeWithPlural,\n            M : 'місяць',\n            MM : relativeTimeWithPlural,\n            y : 'рік',\n            yy : relativeTimeWithPlural\n        },\n        // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n        meridiemParse: /ночі|ранку|дня|вечора/,\n        isPM: function (input) {\n            return /^(дня|вечора)$/.test(input);\n        },\n        meridiem : function (hour, minute, isLower) {\n            if (hour < 4) {\n                return 'ночі';\n            } else if (hour < 12) {\n                return 'ранку';\n            } else if (hour < 17) {\n                return 'дня';\n            } else {\n                return 'вечора';\n            }\n        },\n        ordinalParse: /\\d{1,2}-(й|го)/,\n        ordinal: function (number, period) {\n            switch (period) {\n                case 'M':\n                case 'd':\n                case 'DDD':\n                case 'w':\n                case 'W':\n                    return number + '-й';\n                case 'D':\n                    return number + '-го';\n                default:\n                    return number;\n            }\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 1st is the first week of the year.\n        }\n    });\n\n    return uk;\n\n}));","//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var uz = moment.defineLocale('uz', {\n        months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),\n        monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n        weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n        weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n        weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'D MMMM YYYY, dddd HH:mm'\n        },\n        calendar : {\n            sameDay : '[Бугун соат] LT [да]',\n            nextDay : '[Эртага] LT [да]',\n            nextWeek : 'dddd [куни соат] LT [да]',\n            lastDay : '[Кеча соат] LT [да]',\n            lastWeek : '[Утган] dddd [куни соат] LT [да]',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'Якин %s ичида',\n            past : 'Бир неча %s олдин',\n            s : 'фурсат',\n            m : 'бир дакика',\n            mm : '%d дакика',\n            h : 'бир соат',\n            hh : '%d соат',\n            d : 'бир кун',\n            dd : '%d кун',\n            M : 'бир ой',\n            MM : '%d ой',\n            y : 'бир йил',\n            yy : '%d йил'\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 7  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return uz;\n\n}));","//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var vi = moment.defineLocale('vi', {\n        months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),\n        monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),\n        weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n        weekdaysParseExact : true,\n        meridiemParse: /sa|ch/i,\n        isPM : function (input) {\n            return /^ch$/i.test(input);\n        },\n        meridiem : function (hours, minutes, isLower) {\n            if (hours < 12) {\n                return isLower ? 'sa' : 'SA';\n            } else {\n                return isLower ? 'ch' : 'CH';\n            }\n        },\n        longDateFormat : {\n            LT : 'HH:mm',\n            LTS : 'HH:mm:ss',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM [năm] YYYY',\n            LLL : 'D MMMM [năm] YYYY HH:mm',\n            LLLL : 'dddd, D MMMM [năm] YYYY HH:mm',\n            l : 'DD/M/YYYY',\n            ll : 'D MMM YYYY',\n            lll : 'D MMM YYYY HH:mm',\n            llll : 'ddd, D MMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay: '[Hôm nay lúc] LT',\n            nextDay: '[Ngày mai lúc] LT',\n            nextWeek: 'dddd [tuần tới lúc] LT',\n            lastDay: '[Hôm qua lúc] LT',\n            lastWeek: 'dddd [tuần rồi lúc] LT',\n            sameElse: 'L'\n        },\n        relativeTime : {\n            future : '%s tới',\n            past : '%s trước',\n            s : 'vài giây',\n            m : 'một phút',\n            mm : '%d phút',\n            h : 'một giờ',\n            hh : '%d giờ',\n            d : 'một ngày',\n            dd : '%d ngày',\n            M : 'một tháng',\n            MM : '%d tháng',\n            y : 'một năm',\n            yy : '%d năm'\n        },\n        ordinalParse: /\\d{1,2}/,\n        ordinal : function (number) {\n            return number;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return vi;\n\n}));","//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var x_pseudo = moment.defineLocale('x-pseudo', {\n        months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),\n        monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),\n        monthsParseExact : true,\n        weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),\n        weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n        weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n        weekdaysParseExact : true,\n        longDateFormat : {\n            LT : 'HH:mm',\n            L : 'DD/MM/YYYY',\n            LL : 'D MMMM YYYY',\n            LLL : 'D MMMM YYYY HH:mm',\n            LLLL : 'dddd, D MMMM YYYY HH:mm'\n        },\n        calendar : {\n            sameDay : '[T~ódá~ý át] LT',\n            nextDay : '[T~ómó~rró~w át] LT',\n            nextWeek : 'dddd [át] LT',\n            lastDay : '[Ý~ést~érdá~ý át] LT',\n            lastWeek : '[L~ást] dddd [át] LT',\n            sameElse : 'L'\n        },\n        relativeTime : {\n            future : 'í~ñ %s',\n            past : '%s á~gó',\n            s : 'á ~féw ~sécó~ñds',\n            m : 'á ~míñ~úté',\n            mm : '%d m~íñú~tés',\n            h : 'á~ñ hó~úr',\n            hh : '%d h~óúrs',\n            d : 'á ~dáý',\n            dd : '%d d~áýs',\n            M : 'á ~móñ~th',\n            MM : '%d m~óñt~hs',\n            y : 'á ~ýéár',\n            yy : '%d ý~éárs'\n        },\n        ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (~~(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        },\n        week : {\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return x_pseudo;\n\n}));","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var zh_cn = moment.defineLocale('zh-cn', {\n        months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n        monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n        weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat : {\n            LT : 'Ah点mm分',\n            LTS : 'Ah点m分s秒',\n            L : 'YYYY-MM-DD',\n            LL : 'YYYY年MMMD日',\n            LLL : 'YYYY年MMMD日Ah点mm分',\n            LLLL : 'YYYY年MMMD日ddddAh点mm分',\n            l : 'YYYY-MM-DD',\n            ll : 'YYYY年MMMD日',\n            lll : 'YYYY年MMMD日Ah点mm分',\n            llll : 'YYYY年MMMD日ddddAh点mm分'\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour: function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' ||\n                    meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            } else {\n                // '中午'\n                return hour >= 11 ? hour : hour + 12;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar : {\n            sameDay : function () {\n                return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT';\n            },\n            nextDay : function () {\n                return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT';\n            },\n            lastDay : function () {\n                return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT';\n            },\n            nextWeek : function () {\n                var startOfWeek, prefix;\n                startOfWeek = moment().startOf('week');\n                prefix = this.diff(startOfWeek, 'days') >= 7 ? '[下]' : '[本]';\n                return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';\n            },\n            lastWeek : function () {\n                var startOfWeek, prefix;\n                startOfWeek = moment().startOf('week');\n                prefix = this.unix() < startOfWeek.unix()  ? '[上]' : '[本]';\n                return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm';\n            },\n            sameElse : 'LL'\n        },\n        ordinalParse: /\\d{1,2}(日|月|周)/,\n        ordinal : function (number, period) {\n            switch (period) {\n                case 'd':\n                case 'D':\n                case 'DDD':\n                    return number + '日';\n                case 'M':\n                    return number + '月';\n                case 'w':\n                case 'W':\n                    return number + '周';\n                default:\n                    return number;\n            }\n        },\n        relativeTime : {\n            future : '%s内',\n            past : '%s前',\n            s : '几秒',\n            m : '1 分钟',\n            mm : '%d 分钟',\n            h : '1 小时',\n            hh : '%d 小时',\n            d : '1 天',\n            dd : '%d 天',\n            M : '1 个月',\n            MM : '%d 个月',\n            y : '1 年',\n            yy : '%d 年'\n        },\n        week : {\n            // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n            dow : 1, // Monday is the first day of the week.\n            doy : 4  // The week that contains Jan 4th is the first week of the year.\n        }\n    });\n\n    return zh_cn;\n\n}));","//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var zh_hk = moment.defineLocale('zh-hk', {\n        months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n        monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat : {\n            LT : 'Ah點mm分',\n            LTS : 'Ah點m分s秒',\n            L : 'YYYY年MMMD日',\n            LL : 'YYYY年MMMD日',\n            LLL : 'YYYY年MMMD日Ah點mm分',\n            LLLL : 'YYYY年MMMD日ddddAh點mm分',\n            l : 'YYYY年MMMD日',\n            ll : 'YYYY年MMMD日',\n            lll : 'YYYY年MMMD日Ah點mm分',\n            llll : 'YYYY年MMMD日ddddAh點mm分'\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar : {\n            sameDay : '[今天]LT',\n            nextDay : '[明天]LT',\n            nextWeek : '[下]ddddLT',\n            lastDay : '[昨天]LT',\n            lastWeek : '[上]ddddLT',\n            sameElse : 'L'\n        },\n        ordinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal : function (number, period) {\n            switch (period) {\n                case 'd' :\n                case 'D' :\n                case 'DDD' :\n                    return number + '日';\n                case 'M' :\n                    return number + '月';\n                case 'w' :\n                case 'W' :\n                    return number + '週';\n                default :\n                    return number;\n            }\n        },\n        relativeTime : {\n            future : '%s內',\n            past : '%s前',\n            s : '幾秒',\n            m : '1 分鐘',\n            mm : '%d 分鐘',\n            h : '1 小時',\n            hh : '%d 小時',\n            d : '1 天',\n            dd : '%d 天',\n            M : '1 個月',\n            MM : '%d 個月',\n            y : '1 年',\n            yy : '%d 年'\n        }\n    });\n\n    return zh_hk;\n\n}));","//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, function (moment) { 'use strict';\n\n\n    var zh_tw = moment.defineLocale('zh-tw', {\n        months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n        monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n        weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n        weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n        weekdaysMin : '日_一_二_三_四_五_六'.split('_'),\n        longDateFormat : {\n            LT : 'Ah點mm分',\n            LTS : 'Ah點m分s秒',\n            L : 'YYYY年MMMD日',\n            LL : 'YYYY年MMMD日',\n            LLL : 'YYYY年MMMD日Ah點mm分',\n            LLLL : 'YYYY年MMMD日ddddAh點mm分',\n            l : 'YYYY年MMMD日',\n            ll : 'YYYY年MMMD日',\n            lll : 'YYYY年MMMD日Ah點mm分',\n            llll : 'YYYY年MMMD日ddddAh點mm分'\n        },\n        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n        meridiemHour : function (hour, meridiem) {\n            if (hour === 12) {\n                hour = 0;\n            }\n            if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n                return hour;\n            } else if (meridiem === '中午') {\n                return hour >= 11 ? hour : hour + 12;\n            } else if (meridiem === '下午' || meridiem === '晚上') {\n                return hour + 12;\n            }\n        },\n        meridiem : function (hour, minute, isLower) {\n            var hm = hour * 100 + minute;\n            if (hm < 600) {\n                return '凌晨';\n            } else if (hm < 900) {\n                return '早上';\n            } else if (hm < 1130) {\n                return '上午';\n            } else if (hm < 1230) {\n                return '中午';\n            } else if (hm < 1800) {\n                return '下午';\n            } else {\n                return '晚上';\n            }\n        },\n        calendar : {\n            sameDay : '[今天]LT',\n            nextDay : '[明天]LT',\n            nextWeek : '[下]ddddLT',\n            lastDay : '[昨天]LT',\n            lastWeek : '[上]ddddLT',\n            sameElse : 'L'\n        },\n        ordinalParse: /\\d{1,2}(日|月|週)/,\n        ordinal : function (number, period) {\n            switch (period) {\n                case 'd' :\n                case 'D' :\n                case 'DDD' :\n                    return number + '日';\n                case 'M' :\n                    return number + '月';\n                case 'w' :\n                case 'W' :\n                    return number + '週';\n                default :\n                    return number;\n            }\n        },\n        relativeTime : {\n            future : '%s內',\n            past : '%s前',\n            s : '幾秒',\n            m : '1 分鐘',\n            mm : '%d 分鐘',\n            h : '1 小時',\n            hh : '%d 小時',\n            d : '1 天',\n            dd : '%d 天',\n            M : '1 個月',\n            MM : '%d 個月',\n            y : '1 年',\n            yy : '%d 年'\n        }\n    });\n\n    return zh_tw;\n\n}));","var map = {\n\t\"./af\": 6714,\n\t\"./af.js\": 6714,\n\t\"./ar\": 9692,\n\t\"./ar-ly\": 5391,\n\t\"./ar-ly.js\": 5391,\n\t\"./ar-ma\": 4990,\n\t\"./ar-ma.js\": 4990,\n\t\"./ar-sa\": 5718,\n\t\"./ar-sa.js\": 5718,\n\t\"./ar-tn\": 7415,\n\t\"./ar-tn.js\": 7415,\n\t\"./ar.js\": 9692,\n\t\"./az\": 6853,\n\t\"./az.js\": 6853,\n\t\"./be\": 9425,\n\t\"./be.js\": 9425,\n\t\"./bg\": 5091,\n\t\"./bg.js\": 5091,\n\t\"./bn\": 3996,\n\t\"./bn.js\": 3996,\n\t\"./bo\": 9977,\n\t\"./bo.js\": 9977,\n\t\"./br\": 36,\n\t\"./br.js\": 36,\n\t\"./bs\": 7379,\n\t\"./bs.js\": 7379,\n\t\"./ca\": 2612,\n\t\"./ca.js\": 2612,\n\t\"./cs\": 1998,\n\t\"./cs.js\": 1998,\n\t\"./cv\": 1243,\n\t\"./cv.js\": 1243,\n\t\"./cy\": 7338,\n\t\"./cy.js\": 7338,\n\t\"./da\": 3256,\n\t\"./da.js\": 3256,\n\t\"./de\": 1401,\n\t\"./de-at\": 5144,\n\t\"./de-at.js\": 5144,\n\t\"./de.js\": 1401,\n\t\"./dv\": 5529,\n\t\"./dv.js\": 5529,\n\t\"./el\": 5857,\n\t\"./el.js\": 5857,\n\t\"./en-au\": 2323,\n\t\"./en-au.js\": 2323,\n\t\"./en-ca\": 2597,\n\t\"./en-ca.js\": 2597,\n\t\"./en-gb\": 5702,\n\t\"./en-gb.js\": 5702,\n\t\"./en-ie\": 4785,\n\t\"./en-ie.js\": 4785,\n\t\"./en-nz\": 256,\n\t\"./en-nz.js\": 256,\n\t\"./eo\": 9861,\n\t\"./eo.js\": 9861,\n\t\"./es\": 4225,\n\t\"./es-do\": 1202,\n\t\"./es-do.js\": 1202,\n\t\"./es.js\": 4225,\n\t\"./et\": 457,\n\t\"./et.js\": 457,\n\t\"./eu\": 6770,\n\t\"./eu.js\": 6770,\n\t\"./fa\": 6886,\n\t\"./fa.js\": 6886,\n\t\"./fi\": 1341,\n\t\"./fi.js\": 1341,\n\t\"./fo\": 6558,\n\t\"./fo.js\": 6558,\n\t\"./fr\": 5681,\n\t\"./fr-ca\": 666,\n\t\"./fr-ca.js\": 666,\n\t\"./fr-ch\": 2820,\n\t\"./fr-ch.js\": 2820,\n\t\"./fr.js\": 5681,\n\t\"./fy\": 4313,\n\t\"./fy.js\": 4313,\n\t\"./gd\": 4560,\n\t\"./gd.js\": 4560,\n\t\"./gl\": 58,\n\t\"./gl.js\": 58,\n\t\"./he\": 865,\n\t\"./he.js\": 865,\n\t\"./hi\": 3523,\n\t\"./hi.js\": 3523,\n\t\"./hr\": 4258,\n\t\"./hr.js\": 4258,\n\t\"./hu\": 1018,\n\t\"./hu.js\": 1018,\n\t\"./hy-am\": 5458,\n\t\"./hy-am.js\": 5458,\n\t\"./id\": 6813,\n\t\"./id.js\": 6813,\n\t\"./is\": 8062,\n\t\"./is.js\": 8062,\n\t\"./it\": 2349,\n\t\"./it.js\": 2349,\n\t\"./ja\": 4122,\n\t\"./ja.js\": 4122,\n\t\"./jv\": 1193,\n\t\"./jv.js\": 1193,\n\t\"./ka\": 6269,\n\t\"./ka.js\": 6269,\n\t\"./kk\": 7700,\n\t\"./kk.js\": 7700,\n\t\"./km\": 9588,\n\t\"./km.js\": 9588,\n\t\"./ko\": 4047,\n\t\"./ko.js\": 4047,\n\t\"./ky\": 3460,\n\t\"./ky.js\": 3460,\n\t\"./lb\": 7120,\n\t\"./lb.js\": 7120,\n\t\"./lo\": 8898,\n\t\"./lo.js\": 8898,\n\t\"./lt\": 8617,\n\t\"./lt.js\": 8617,\n\t\"./lv\": 8647,\n\t\"./lv.js\": 8647,\n\t\"./me\": 4550,\n\t\"./me.js\": 4550,\n\t\"./mi\": 7725,\n\t\"./mi.js\": 7725,\n\t\"./mk\": 7695,\n\t\"./mk.js\": 7695,\n\t\"./ml\": 4737,\n\t\"./ml.js\": 4737,\n\t\"./mr\": 2197,\n\t\"./mr.js\": 2197,\n\t\"./ms\": 9806,\n\t\"./ms-my\": 7803,\n\t\"./ms-my.js\": 7803,\n\t\"./ms.js\": 9806,\n\t\"./my\": 7257,\n\t\"./my.js\": 7257,\n\t\"./nb\": 8458,\n\t\"./nb.js\": 8458,\n\t\"./ne\": 7802,\n\t\"./ne.js\": 7802,\n\t\"./nl\": 5002,\n\t\"./nl.js\": 5002,\n\t\"./nn\": 2451,\n\t\"./nn.js\": 2451,\n\t\"./pa-in\": 7584,\n\t\"./pa-in.js\": 7584,\n\t\"./pl\": 999,\n\t\"./pl.js\": 999,\n\t\"./pt\": 5927,\n\t\"./pt-br\": 3008,\n\t\"./pt-br.js\": 3008,\n\t\"./pt.js\": 5927,\n\t\"./ro\": 5167,\n\t\"./ro.js\": 5167,\n\t\"./ru\": 5428,\n\t\"./ru.js\": 5428,\n\t\"./se\": 9906,\n\t\"./se.js\": 9906,\n\t\"./si\": 6061,\n\t\"./si.js\": 6061,\n\t\"./sk\": 2001,\n\t\"./sk.js\": 2001,\n\t\"./sl\": 3759,\n\t\"./sl.js\": 3759,\n\t\"./sq\": 6421,\n\t\"./sq.js\": 6421,\n\t\"./sr\": 2685,\n\t\"./sr-cyrl\": 6050,\n\t\"./sr-cyrl.js\": 6050,\n\t\"./sr.js\": 2685,\n\t\"./ss\": 4780,\n\t\"./ss.js\": 4780,\n\t\"./sv\": 1623,\n\t\"./sv.js\": 1623,\n\t\"./sw\": 1126,\n\t\"./sw.js\": 1126,\n\t\"./ta\": 9541,\n\t\"./ta.js\": 9541,\n\t\"./te\": 4170,\n\t\"./te.js\": 4170,\n\t\"./th\": 792,\n\t\"./th.js\": 792,\n\t\"./tl-ph\": 7405,\n\t\"./tl-ph.js\": 7405,\n\t\"./tlh\": 6968,\n\t\"./tlh.js\": 6968,\n\t\"./tr\": 291,\n\t\"./tr.js\": 291,\n\t\"./tzl\": 1538,\n\t\"./tzl.js\": 1538,\n\t\"./tzm\": 9350,\n\t\"./tzm-latn\": 7179,\n\t\"./tzm-latn.js\": 7179,\n\t\"./tzm.js\": 9350,\n\t\"./uk\": 4969,\n\t\"./uk.js\": 4969,\n\t\"./uz\": 9644,\n\t\"./uz.js\": 9644,\n\t\"./vi\": 3264,\n\t\"./vi.js\": 3264,\n\t\"./x-pseudo\": 8574,\n\t\"./x-pseudo.js\": 8574,\n\t\"./zh-cn\": 107,\n\t\"./zh-cn.js\": 107,\n\t\"./zh-hk\": 2670,\n\t\"./zh-hk.js\": 2670,\n\t\"./zh-tw\": 7648,\n\t\"./zh-tw.js\": 7648\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 147;","//! moment.js\n//! version : 2.15.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, function () { 'use strict';\n\n    var hookCallback;\n\n    function utils_hooks__hooks () {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback (callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return input != null && Object.prototype.toString.call(input) === '[object Object]';\n    }\n\n    function isObjectEmpty(obj) {\n        var k;\n        for (k in obj) {\n            // even if its not own property I'd still call it non-empty\n            return false;\n        }\n        return true;\n    }\n\n    function isDate(input) {\n        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n    }\n\n    function map(arr, fn) {\n        var res = [], i;\n        for (i = 0; i < arr.length; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function create_utc__createUTC (input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty           : false,\n            unusedTokens    : [],\n            unusedInput     : [],\n            overflow        : -2,\n            charsLeftOver   : 0,\n            nullInput       : false,\n            invalidMonth    : null,\n            invalidFormat   : false,\n            userInvalidated : false,\n            iso             : false,\n            parsedDateParts : [],\n            meridiem        : null\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this);\n            var len = t.length >>> 0;\n\n            for (var i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function valid__isValid(m) {\n        if (m._isValid == null) {\n            var flags = getParsingFlags(m);\n            var parsedParts = some.call(flags.parsedDateParts, function (i) {\n                return i != null;\n            });\n            var isNowValid = !isNaN(m._d.getTime()) &&\n                flags.overflow < 0 &&\n                !flags.empty &&\n                !flags.invalidMonth &&\n                !flags.invalidWeekday &&\n                !flags.nullInput &&\n                !flags.invalidFormat &&\n                !flags.userInvalidated &&\n                (!flags.meridiem || (flags.meridiem && parsedParts));\n\n            if (m._strict) {\n                isNowValid = isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n\n            if (Object.isFrozen == null || !Object.isFrozen(m)) {\n                m._isValid = isNowValid;\n            }\n            else {\n                return isNowValid;\n            }\n        }\n        return m._isValid;\n    }\n\n    function valid__createInvalid (flags) {\n        var m = create_utc__createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        }\n        else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = utils_hooks__hooks.momentProperties = [];\n\n    function copyConfig(to, from) {\n        var i, prop, val;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentProperties.length > 0) {\n            for (i in momentProperties) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    var updateInProgress = false;\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            utils_hooks__hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment (obj) {\n        return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n    }\n\n    function absFloor (number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if ((dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    function warn(msg) {\n        if (utils_hooks__hooks.suppressDeprecationWarnings === false &&\n                (typeof console !==  'undefined') && console.warn) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (utils_hooks__hooks.deprecationHandler != null) {\n                utils_hooks__hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [];\n                var arg;\n                for (var i = 0; i < arguments.length; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (var key in arguments[0]) {\n                            arg += key + ': ' + arguments[0][key] + ', ';\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (utils_hooks__hooks.deprecationHandler != null) {\n            utils_hooks__hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    utils_hooks__hooks.suppressDeprecationWarnings = false;\n    utils_hooks__hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n    }\n\n    function locale_set__set (config) {\n        var prop, i;\n        for (i in config) {\n            prop = config[i];\n            if (isFunction(prop)) {\n                this[i] = prop;\n            } else {\n                this['_' + i] = prop;\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _ordinalParseLenient.\n        this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig), prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (hasOwnProp(parentConfig, prop) &&\n                    !hasOwnProp(childConfig, prop) &&\n                    isObject(parentConfig[prop])) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i, res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    };\n\n    function locale_calendar__calendar (key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    var defaultLongDateFormat = {\n        LTS  : 'h:mm:ss A',\n        LT   : 'h:mm A',\n        L    : 'MM/DD/YYYY',\n        LL   : 'MMMM D, YYYY',\n        LLL  : 'MMMM D, YYYY h:mm A',\n        LLLL : 'dddd, MMMM D, YYYY h:mm A'\n    };\n\n    function longDateFormat (key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n            return val.slice(1);\n        });\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate () {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d';\n    var defaultOrdinalParse = /\\d{1,2}/;\n\n    function ordinal (number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future : 'in %s',\n        past   : '%s ago',\n        s  : 'a few seconds',\n        m  : 'a minute',\n        mm : '%d minutes',\n        h  : 'an hour',\n        hh : '%d hours',\n        d  : 'a day',\n        dd : '%d days',\n        M  : 'a month',\n        MM : '%d months',\n        y  : 'a year',\n        yy : '%d years'\n    };\n\n    function relative__relativeTime (number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return (isFunction(output)) ?\n            output(number, withoutSuffix, string, isFuture) :\n            output.replace(/%d/i, number);\n    }\n\n    function pastFuture (diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    var aliases = {};\n\n    function addUnitAlias (unit, shorthand) {\n        var lowerCase = unit.toLowerCase();\n        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n    }\n\n    function normalizeUnits(units) {\n        return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {};\n\n    function addUnitPriority(unit, priority) {\n        priorities[unit] = priority;\n    }\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [];\n        for (var u in unitsObj) {\n            units.push({unit: u, priority: priorities[u]});\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    function makeGetSet (unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                get_set__set(this, unit, value);\n                utils_hooks__hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get_set__get(this, unit);\n            }\n        };\n    }\n\n    function get_set__get (mom, unit) {\n        return mom.isValid() ?\n            mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n    }\n\n    function get_set__set (mom, unit, value) {\n        if (mom.isValid()) {\n            mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n        }\n    }\n\n    // MOMENTS\n\n    function stringGet (units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n\n    function stringSet (units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units);\n            for (var i = 0; i < prioritized.length; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n    }\n\n    var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n    var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n    var formatFunctions = {};\n\n    var formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken (token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(func.apply(this, arguments), token);\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens), i, length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '', i;\n            for (i = 0; i < length; i++) {\n                output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var match1         = /\\d/;            //       0 - 9\n    var match2         = /\\d\\d/;          //      00 - 99\n    var match3         = /\\d{3}/;         //     000 - 999\n    var match4         = /\\d{4}/;         //    0000 - 9999\n    var match6         = /[+-]?\\d{6}/;    // -999999 - 999999\n    var match1to2      = /\\d\\d?/;         //       0 - 99\n    var match3to4      = /\\d\\d\\d\\d?/;     //     999 - 9999\n    var match5to6      = /\\d\\d\\d\\d\\d\\d?/; //   99999 - 999999\n    var match1to3      = /\\d{1,3}/;       //       0 - 999\n    var match1to4      = /\\d{1,4}/;       //       0 - 9999\n    var match1to6      = /[+-]?\\d{1,6}/;  // -999999 - 999999\n\n    var matchUnsigned  = /\\d+/;           //       0 - inf\n    var matchSigned    = /[+-]?\\d+/;      //    -inf - inf\n\n    var matchOffset    = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n    var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n    var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n    // any word (or two) characters or numbers including two/three word month in arabic.\n    // includes scottish gaelic two word and hyphenated months\n    var matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n\n    var regexes = {};\n\n    function addRegexToken (token, regex, strictRegex) {\n        regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n            return (isStrict && strictRegex) ? strictRegex : regex;\n        };\n    }\n\n    function getParseRegexForToken (token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n            return p1 || p2 || p3 || p4;\n        }));\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    var tokens = {};\n\n    function addParseToken (token, callback) {\n        var i, func = callback;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (typeof callback === 'number') {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        for (i = 0; i < token.length; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken (token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    var YEAR = 0;\n    var MONTH = 1;\n    var DATE = 2;\n    var HOUR = 3;\n    var MINUTE = 4;\n    var SECOND = 5;\n    var MILLISECOND = 6;\n    var WEEK = 7;\n    var WEEKDAY = 8;\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // ALIASES\n\n    addUnitAlias('month', 'M');\n\n    // PRIORITY\n\n    addUnitPriority('month', 8);\n\n    // PARSING\n\n    addRegexToken('M',    match1to2);\n    addRegexToken('MM',   match1to2, match2);\n    addRegexToken('MMM',  function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s+)+MMMM?/;\n    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n    function localeMonths (m, format) {\n        if (!m) {\n            return this._months;\n        }\n        return isArray(this._months) ? this._months[m.month()] :\n            this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n    }\n\n    var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n    function localeMonthsShort (m, format) {\n        if (!m) {\n            return this._monthsShort;\n        }\n        return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n            this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n    }\n\n    function units_month__handleStrictParse(monthName, format, strict) {\n        var i, ii, mom, llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = create_utc__createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse (monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return units_month__handleStrictParse.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = create_utc__createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n                return i;\n            } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth (mom, value) {\n        var dayOfMonth;\n\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (typeof value !== 'number') {\n                    return mom;\n                }\n            }\n        }\n\n        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n        return mom;\n    }\n\n    function getSetMonth (value) {\n        if (value != null) {\n            setMonth(this, value);\n            utils_hooks__hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get_set__get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth () {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    var defaultMonthsShortRegex = matchWord;\n    function monthsShortRegex (isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict ?\n                this._monthsShortStrictRegex : this._monthsShortRegex;\n        }\n    }\n\n    var defaultMonthsRegex = matchWord;\n    function monthsRegex (isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict ?\n                this._monthsStrictRegex : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse () {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [], longPieces = [], mixedPieces = [],\n            i, mom;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = create_utc__createUTC([2000, i]);\n            shortPieces.push(this.monthsShort(mom, ''));\n            longPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.months(mom, ''));\n            mixedPieces.push(this.monthsShort(mom, ''));\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n        for (i = 0; i < 12; i++) {\n            shortPieces[i] = regexEscape(shortPieces[i]);\n            longPieces[i] = regexEscape(longPieces[i]);\n        }\n        for (i = 0; i < 24; i++) {\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\n        }\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n        this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n    }\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? '' + y : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY',   4],       0, 'year');\n    addFormatToken(0, ['YYYYY',  5],       0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // ALIASES\n\n    addUnitAlias('year', 'y');\n\n    // PRIORITIES\n\n    addUnitPriority('year', 1);\n\n    // PARSING\n\n    addRegexToken('Y',      matchSigned);\n    addRegexToken('YY',     match1to2, match2);\n    addRegexToken('YYYY',   match1to4, match4);\n    addRegexToken('YYYYY',  match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    // HOOKS\n\n    utils_hooks__hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear () {\n        return isLeapYear(this.year());\n    }\n\n    function createDate (y, m, d, h, M, s, ms) {\n        //can't just apply() to create a date:\n        //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\n        var date = new Date(y, m, d, h, M, s, ms);\n\n        //the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n            date.setFullYear(y);\n        }\n        return date;\n    }\n\n    function createUTCDate (y) {\n        var date = new Date(Date.UTC.apply(null, arguments));\n\n        //the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n            date.setUTCFullYear(y);\n        }\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear, resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n            resWeek, resYear;\n\n        if (week < 1) {\n            resYear = mom.year() - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(mom.year(), dow, doy)) {\n            resWeek = week - weeksInYear(mom.year(), dow, doy);\n            resYear = mom.year() + 1;\n        } else {\n            resYear = mom.year();\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear\n        };\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // ALIASES\n\n    addUnitAlias('week', 'w');\n    addUnitAlias('isoWeek', 'W');\n\n    // PRIORITIES\n\n    addUnitPriority('week', 5);\n    addUnitPriority('isoWeek', 5);\n\n    // PARSING\n\n    addRegexToken('w',  match1to2);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W',  match1to2);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n        week[token.substr(0, 1)] = toInt(input);\n    });\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek (mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek () {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear () {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek (input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek (input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // ALIASES\n\n    addUnitAlias('day', 'd');\n    addUnitAlias('weekday', 'e');\n    addUnitAlias('isoWeekday', 'E');\n\n    // PRIORITY\n    addUnitPriority('day', 11);\n    addUnitPriority('weekday', 11);\n    addUnitPriority('isoWeekday', 11);\n\n    // PARSING\n\n    addRegexToken('d',    match1to2);\n    addRegexToken('e',    match1to2);\n    addRegexToken('E',    match1to2);\n    addRegexToken('dd',   function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd',   function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd',   function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n\n    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n    function localeWeekdays (m, format) {\n        if (!m) {\n            return this._weekdays;\n        }\n        return isArray(this._weekdays) ? this._weekdays[m.day()] :\n            this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n    }\n\n    var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n    function localeWeekdaysShort (m) {\n        return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n    }\n\n    var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n    function localeWeekdaysMin (m) {\n        return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n    }\n\n    function day_of_week__handleStrictParse(weekdayName, format, strict) {\n        var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = create_utc__createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse (weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return day_of_week__handleStrictParse.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = create_utc__createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n                this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n                this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n            }\n            if (!this._weekdaysParse[i]) {\n                regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n                return i;\n            } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n                return i;\n            } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek (input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek (input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek (input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    var defaultWeekdaysRegex = matchWord;\n    function weekdaysRegex (isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict ?\n                this._weekdaysStrictRegex : this._weekdaysRegex;\n        }\n    }\n\n    var defaultWeekdaysShortRegex = matchWord;\n    function weekdaysShortRegex (isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict ?\n                this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n        }\n    }\n\n    var defaultWeekdaysMinRegex = matchWord;\n    function weekdaysMinRegex (isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict ?\n                this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n        }\n    }\n\n\n    function computeWeekdaysParse () {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n            i, mom, minp, shortp, longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = create_utc__createUTC([2000, 1]).day(i);\n            minp = this.weekdaysMin(mom, '');\n            shortp = this.weekdaysShort(mom, '');\n            longp = this.weekdays(mom, '');\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n        for (i = 0; i < 7; i++) {\n            shortPieces[i] = regexEscape(shortPieces[i]);\n            longPieces[i] = regexEscape(longPieces[i]);\n            mixedPieces[i] = regexEscape(mixedPieces[i]);\n        }\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n        this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n        this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2);\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2);\n    });\n\n    function meridiem (token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // ALIASES\n\n    addUnitAlias('hour', 'h');\n\n    // PRIORITY\n    addUnitPriority('hour', 13);\n\n    // PARSING\n\n    function matchMeridiem (isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a',  matchMeridiem);\n    addRegexToken('A',  matchMeridiem);\n    addRegexToken('H',  match1to2);\n    addRegexToken('h',  match1to2);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4;\n        var pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4;\n        var pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM (input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return ((input + '').toLowerCase().charAt(0) === 'p');\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n    function localeMeridiem (hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n\n    // MOMENTS\n\n    // Setting the hour should keep the time, because the user explicitly\n    // specified which hour he wants. So trying to maintain the same hour (in\n    // a new timezone) makes sense. Adding/subtracting hours does not follow\n    // this rule.\n    var getSetHour = makeGetSet('Hours', true);\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        ordinalParse: defaultOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse\n    };\n\n    // internal storage for locale config files\n    var locales = {};\n    var globalLocale;\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0, j, next, locale, split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return null;\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (!locales[name] && (typeof module !== 'undefined') &&\n                module && module.exports) {\n            try {\n                oldLocale = globalLocale._abbr;\n                require('./locale/' + name);\n                // because defineLocale currently also sets the global locale, we\n                // want to undo that for lazy loaded locales\n                locale_locales__getSetGlobalLocale(oldLocale);\n            } catch (e) { }\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function locale_locales__getSetGlobalLocale (key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = locale_locales__getLocale(key);\n            }\n            else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale (name, config) {\n        if (config !== null) {\n            var parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple('defineLocaleOverride',\n                        'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    // treat as if there is no base config\n                    deprecateSimple('parentLocaleUndefined',\n                            'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/');\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            // backwards compat for now: also set the locale\n            locale_locales__getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        if (config != null) {\n            var locale, parentConfig = baseConfig;\n            // MERGE\n            if (locales[name] != null) {\n                parentConfig = locales[name]._config;\n            }\n            config = mergeConfigs(parentConfig, config);\n            locale = new Locale(config);\n            locale.parentLocale = locales[name];\n            locales[name] = locale;\n\n            // backwards compat for now: also set the locale\n            locale_locales__getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function locale_locales__getLocale (key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function locale_locales__listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow (m) {\n        var overflow;\n        var a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :\n                a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n                a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n                a[MINUTE]      < 0 || a[MINUTE]      > 59  ? MINUTE :\n                a[SECOND]      < 0 || a[SECOND]      > 59  ? SECOND :\n                a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n                -1;\n\n            if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\n    var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\n\n    var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\n    var isoDates = [\n        ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n        ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n        ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n        ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n        ['YYYY-DDD', /\\d{4}-\\d{3}/],\n        ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n        ['YYYYYYMMDD', /[+-]\\d{10}/],\n        ['YYYYMMDD', /\\d{8}/],\n        // YYYYMM is NOT allowed by the standard\n        ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n        ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n        ['YYYYDDD', /\\d{7}/]\n    ];\n\n    // iso time formats and regexes\n    var isoTimes = [\n        ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n        ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n        ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n        ['HH:mm', /\\d\\d:\\d\\d/],\n        ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n        ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n        ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n        ['HHmm', /\\d\\d\\d\\d/],\n        ['HH', /\\d\\d/]\n    ];\n\n    var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n    // date from iso format\n    function configFromISO(config) {\n        var i, l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime, dateFormat, timeFormat, tzFormat;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n\n            for (i = 0, l = isoDates.length; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimes.length; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from iso format or fallback\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n            utils_hooks__hooks.createFromInputFallback(config);\n        }\n    }\n\n    utils_hooks__hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +\n        'which is not reliable across all browsers and versions. Non ISO date formats are ' +\n        'discouraged and will be removed in an upcoming major release. Please refer to ' +\n        'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        // hooks is actually the exported moment object\n        var nowValue = new Date(utils_hooks__hooks.now());\n        if (config._useUTC) {\n            return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray (config) {\n        var i, date, input = [], currentDate, yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (config._dayOfYear > daysInYear(yearToUse)) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (config._a[HOUR] === 24 &&\n                config._a[MINUTE] === 0 &&\n                config._a[SECOND] === 0 &&\n                config._a[MILLISECOND] === 0) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);\n            week = defaults(w.w, 1);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from begining of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to begining of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // constant that refers to the ISO standard\n    utils_hooks__hooks.ISO_8601 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === utils_hooks__hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i, parsedInput, tokens, token, skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0;\n\n        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n        for (i = 0; i < tokens.length; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n            // console.log('token', token, 'parsedInput', parsedInput,\n            //         'regex', getParseRegexForToken(token, config));\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                }\n                else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            }\n            else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n\n    function meridiemFixWrap (locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n\n            scoreToBeat,\n            i,\n            currentScore;\n\n        if (config._f.length === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < config._f.length; i++) {\n            currentScore = 0;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (!valid__isValid(tempConfig)) {\n                continue;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (scoreToBeat == null || currentScore < scoreToBeat) {\n                scoreToBeat = currentScore;\n                bestMoment = tempConfig;\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i);\n        config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n            return obj && parseInt(obj, 10);\n        });\n\n        configFromArray(config);\n    }\n\n    function createFromConfig (config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig (config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || locale_locales__getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return valid__createInvalid({nullInput: true});\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (format) {\n            configFromStringAndFormat(config);\n        }  else {\n            configFromInput(config);\n        }\n\n        if (!valid__isValid(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (input === undefined) {\n            config._d = new Date(utils_hooks__hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (typeof(input) === 'object') {\n            configFromObject(config);\n        } else if (typeof(input) === 'number') {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            utils_hooks__hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC (input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (typeof(locale) === 'boolean') {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if ((isObject(input) && isObjectEmpty(input)) ||\n                (isArray(input) && input.length === 0)) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function local__createLocal (input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n        'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n        function () {\n            var other = local__createLocal.apply(null, arguments);\n            if (this.isValid() && other.isValid()) {\n                return other < this ? this : other;\n            } else {\n                return valid__createInvalid();\n            }\n        }\n    );\n\n    var prototypeMax = deprecate(\n        'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n        function () {\n            var other = local__createLocal.apply(null, arguments);\n            if (this.isValid() && other.isValid()) {\n                return other > this ? this : other;\n            } else {\n                return valid__createInvalid();\n            }\n        }\n    );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return local__createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min () {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max () {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +(new Date());\n    };\n\n    function Duration (duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        // representation for dateAddRemove\n        this._milliseconds = +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days +\n            weeks * 7;\n        // It is impossible translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months +\n            quarters * 3 +\n            years * 12;\n\n        this._data = {};\n\n        this._locale = locale_locales__getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration (obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound (number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // FORMATTING\n\n    function offset (token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset();\n            var sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z',  matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(matchShortOffset, input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = ((string || '').match(matcher) || []);\n        var chunk   = matches[matches.length - 1] || [];\n        var parts   = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            utils_hooks__hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return local__createLocal(input).local();\n        }\n    }\n\n    function getDateOffset (m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    utils_hooks__hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset (input, keepLocalTime) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n            } else if (Math.abs(input) < 16) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    utils_hooks__hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone (input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC (keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal (keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset () {\n        if (this._tzm) {\n            this.utcOffset(this._tzm);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n\n            if (tZone === 0) {\n                this.utcOffset(0, true);\n            } else {\n                this.utcOffset(offsetFromString(matchOffset, this._i));\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset (input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? local__createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime () {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted () {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {};\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);\n            this._isDSTShifted = this.isValid() &&\n                compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal () {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset () {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc () {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n    // and further modified to allow for strings containing both week and day\n    var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\n\n    function create__createDuration (input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms : input._milliseconds,\n                d  : input._days,\n                M  : input._months\n            };\n        } else if (typeof input === 'number') {\n            duration = {};\n            if (key) {\n                duration[key] = input;\n            } else {\n                duration.milliseconds = input;\n            }\n        } else if (!!(match = aspNetRegex.exec(input))) {\n            sign = (match[1] === '-') ? -1 : 1;\n            duration = {\n                y  : 0,\n                d  : toInt(match[DATE])                         * sign,\n                h  : toInt(match[HOUR])                         * sign,\n                m  : toInt(match[MINUTE])                       * sign,\n                s  : toInt(match[SECOND])                       * sign,\n                ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n            };\n        } else if (!!(match = isoRegex.exec(input))) {\n            sign = (match[1] === '-') ? -1 : 1;\n            duration = {\n                y : parseIso(match[2], sign),\n                M : parseIso(match[3], sign),\n                w : parseIso(match[4], sign),\n                d : parseIso(match[5], sign),\n                h : parseIso(match[6], sign),\n                m : parseIso(match[7], sign),\n                s : parseIso(match[8], sign)\n            };\n        } else if (duration == null) {// checks for null or undefined\n            duration = {};\n        } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n            diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        return ret;\n    }\n\n    create__createDuration.fn = Duration.prototype;\n\n    function parseIso (inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {milliseconds: 0, months: 0};\n\n        res.months = other.month() - base.month() +\n            (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return {milliseconds: 0, months: 0};\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n                'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n                tmp = val; val = period; period = tmp;\n            }\n\n            val = typeof val === 'string' ? +val : val;\n            dur = create__createDuration(val, period);\n            add_subtract__addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (days) {\n            get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);\n        }\n        if (months) {\n            setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);\n        }\n        if (updateOffset) {\n            utils_hooks__hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add_subtract__add      = createAdder(1, 'add');\n    var add_subtract__subtract = createAdder(-1, 'subtract');\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6 ? 'sameElse' :\n                diff < -1 ? 'lastWeek' :\n                diff < 0 ? 'lastDay' :\n                diff < 1 ? 'sameDay' :\n                diff < 2 ? 'nextDay' :\n                diff < 7 ? 'nextWeek' : 'sameElse';\n    }\n\n    function moment_calendar__calendar (time, formats) {\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || local__createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = utils_hooks__hooks.calendarFormat(this, sod) || 'sameElse';\n\n        var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n        return this.format(output || this.localeData().calendar(format, this, local__createLocal(now)));\n    }\n\n    function clone () {\n        return new Moment(this);\n    }\n\n    function isAfter (input, units) {\n        var localInput = isMoment(input) ? input : local__createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore (input, units) {\n        var localInput = isMoment(input) ? input : local__createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween (from, to, units, inclusivity) {\n        inclusivity = inclusivity || '()';\n        return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\n            (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n    }\n\n    function isSame (input, units) {\n        var localInput = isMoment(input) ? input : local__createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units || 'millisecond');\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n        }\n    }\n\n    function isSameOrAfter (input, units) {\n        return this.isSame(input, units) || this.isAfter(input,units);\n    }\n\n    function isSameOrBefore (input, units) {\n        return this.isSame(input, units) || this.isBefore(input,units);\n    }\n\n    function diff (input, units, asFloat) {\n        var that,\n            zoneDelta,\n            delta, output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        if (units === 'year' || units === 'month' || units === 'quarter') {\n            output = monthDiff(this, that);\n            if (units === 'quarter') {\n                output = output / 3;\n            } else if (units === 'year') {\n                output = output / 12;\n            }\n        } else {\n            delta = this - that;\n            output = units === 'second' ? delta / 1e3 : // 1000\n                units === 'minute' ? delta / 6e4 : // 1000 * 60\n                units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n                units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n                units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n                delta;\n        }\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff (a, b) {\n        // difference in months\n        var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2, adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString () {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function moment_format__toISOString () {\n        var m = this.clone().utc();\n        if (0 < m.year() && m.year() <= 9999) {\n            if (isFunction(Date.prototype.toISOString)) {\n                // native implementation is ~50x faster, use it when we can\n                return this.toDate().toISOString();\n            } else {\n                return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n            }\n        } else {\n            return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n        }\n    }\n\n    function format (inputString) {\n        if (!inputString) {\n            inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from (time, withoutSuffix) {\n        if (this.isValid() &&\n                ((isMoment(time) && time.isValid()) ||\n                 local__createLocal(time).isValid())) {\n            return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow (withoutSuffix) {\n        return this.from(local__createLocal(), withoutSuffix);\n    }\n\n    function to (time, withoutSuffix) {\n        if (this.isValid() &&\n                ((isMoment(time) && time.isValid()) ||\n                 local__createLocal(time).isValid())) {\n            return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow (withoutSuffix) {\n        return this.to(local__createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale (key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = locale_locales__getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData () {\n        return this._locale;\n    }\n\n    function startOf (units) {\n        units = normalizeUnits(units);\n        // the following switch intentionally omits break keywords\n        // to utilize falling through the cases.\n        switch (units) {\n            case 'year':\n                this.month(0);\n                /* falls through */\n            case 'quarter':\n            case 'month':\n                this.date(1);\n                /* falls through */\n            case 'week':\n            case 'isoWeek':\n            case 'day':\n            case 'date':\n                this.hours(0);\n                /* falls through */\n            case 'hour':\n                this.minutes(0);\n                /* falls through */\n            case 'minute':\n                this.seconds(0);\n                /* falls through */\n            case 'second':\n                this.milliseconds(0);\n        }\n\n        // weeks are a special case\n        if (units === 'week') {\n            this.weekday(0);\n        }\n        if (units === 'isoWeek') {\n            this.isoWeekday(1);\n        }\n\n        // quarters are also special\n        if (units === 'quarter') {\n            this.month(Math.floor(this.month() / 3) * 3);\n        }\n\n        return this;\n    }\n\n    function endOf (units) {\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond') {\n            return this;\n        }\n\n        // 'date' is an alias for 'day', so it should be considered as such.\n        if (units === 'date') {\n            units = 'day';\n        }\n\n        return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n    }\n\n    function to_type__valueOf () {\n        return this._d.valueOf() - ((this._offset || 0) * 60000);\n    }\n\n    function unix () {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate () {\n        return new Date(this.valueOf());\n    }\n\n    function toArray () {\n        var m = this;\n        return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n    }\n\n    function toObject () {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds()\n        };\n    }\n\n    function toJSON () {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function moment_valid__isValid () {\n        return valid__isValid(this);\n    }\n\n    function parsingFlags () {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt () {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict\n        };\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken (token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg',     'weekYear');\n    addWeekYearFormatToken('ggggg',    'weekYear');\n    addWeekYearFormatToken('GGGG',  'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    addUnitAlias('weekYear', 'gg');\n    addUnitAlias('isoWeekYear', 'GG');\n\n    // PRIORITY\n\n    addUnitPriority('weekYear', 1);\n    addUnitPriority('isoWeekYear', 1);\n\n\n    // PARSING\n\n    addRegexToken('G',      matchSigned);\n    addRegexToken('g',      matchSigned);\n    addRegexToken('GG',     match1to2, match2);\n    addRegexToken('gg',     match1to2, match2);\n    addRegexToken('GGGG',   match1to4, match4);\n    addRegexToken('gggg',   match1to4, match4);\n    addRegexToken('GGGGG',  match1to6, match6);\n    addRegexToken('ggggg',  match1to6, match6);\n\n    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n        week[token.substr(0, 2)] = toInt(input);\n    });\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = utils_hooks__hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear (input) {\n        return getSetWeekYearHelper.call(this,\n                input,\n                this.week(),\n                this.weekday(),\n                this.localeData()._week.dow,\n                this.localeData()._week.doy);\n    }\n\n    function getSetISOWeekYear (input) {\n        return getSetWeekYearHelper.call(this,\n                input, this.isoWeek(), this.isoWeekday(), 1, 4);\n    }\n\n    function getISOWeeksInYear () {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getWeeksInYear () {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // ALIASES\n\n    addUnitAlias('quarter', 'Q');\n\n    // PRIORITY\n\n    addUnitPriority('quarter', 7);\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter (input) {\n        return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // ALIASES\n\n    addUnitAlias('date', 'D');\n\n    // PRIOROITY\n    addUnitPriority('date', 9);\n\n    // PARSING\n\n    addRegexToken('D',  match1to2);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0], 10);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // ALIASES\n\n    addUnitAlias('dayOfYear', 'DDD');\n\n    // PRIORITY\n    addUnitPriority('dayOfYear', 4);\n\n    // PARSING\n\n    addRegexToken('DDD',  match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear (input) {\n        var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n        return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // ALIASES\n\n    addUnitAlias('minute', 'm');\n\n    // PRIORITY\n\n    addUnitPriority('minute', 14);\n\n    // PARSING\n\n    addRegexToken('m',  match1to2);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // ALIASES\n\n    addUnitAlias('second', 's');\n\n    // PRIORITY\n\n    addUnitPriority('second', 15);\n\n    // PARSING\n\n    addRegexToken('s',  match1to2);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n\n    // ALIASES\n\n    addUnitAlias('millisecond', 'ms');\n\n    // PRIORITY\n\n    addUnitPriority('millisecond', 16);\n\n    // PARSING\n\n    addRegexToken('S',    match1to3, match1);\n    addRegexToken('SS',   match1to3, match2);\n    addRegexToken('SSS',  match1to3, match3);\n\n    var token;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n    // MOMENTS\n\n    var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z',  0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr () {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName () {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var momentPrototype__proto = Moment.prototype;\n\n    momentPrototype__proto.add               = add_subtract__add;\n    momentPrototype__proto.calendar          = moment_calendar__calendar;\n    momentPrototype__proto.clone             = clone;\n    momentPrototype__proto.diff              = diff;\n    momentPrototype__proto.endOf             = endOf;\n    momentPrototype__proto.format            = format;\n    momentPrototype__proto.from              = from;\n    momentPrototype__proto.fromNow           = fromNow;\n    momentPrototype__proto.to                = to;\n    momentPrototype__proto.toNow             = toNow;\n    momentPrototype__proto.get               = stringGet;\n    momentPrototype__proto.invalidAt         = invalidAt;\n    momentPrototype__proto.isAfter           = isAfter;\n    momentPrototype__proto.isBefore          = isBefore;\n    momentPrototype__proto.isBetween         = isBetween;\n    momentPrototype__proto.isSame            = isSame;\n    momentPrototype__proto.isSameOrAfter     = isSameOrAfter;\n    momentPrototype__proto.isSameOrBefore    = isSameOrBefore;\n    momentPrototype__proto.isValid           = moment_valid__isValid;\n    momentPrototype__proto.lang              = lang;\n    momentPrototype__proto.locale            = locale;\n    momentPrototype__proto.localeData        = localeData;\n    momentPrototype__proto.max               = prototypeMax;\n    momentPrototype__proto.min               = prototypeMin;\n    momentPrototype__proto.parsingFlags      = parsingFlags;\n    momentPrototype__proto.set               = stringSet;\n    momentPrototype__proto.startOf           = startOf;\n    momentPrototype__proto.subtract          = add_subtract__subtract;\n    momentPrototype__proto.toArray           = toArray;\n    momentPrototype__proto.toObject          = toObject;\n    momentPrototype__proto.toDate            = toDate;\n    momentPrototype__proto.toISOString       = moment_format__toISOString;\n    momentPrototype__proto.toJSON            = toJSON;\n    momentPrototype__proto.toString          = toString;\n    momentPrototype__proto.unix              = unix;\n    momentPrototype__proto.valueOf           = to_type__valueOf;\n    momentPrototype__proto.creationData      = creationData;\n\n    // Year\n    momentPrototype__proto.year       = getSetYear;\n    momentPrototype__proto.isLeapYear = getIsLeapYear;\n\n    // Week Year\n    momentPrototype__proto.weekYear    = getSetWeekYear;\n    momentPrototype__proto.isoWeekYear = getSetISOWeekYear;\n\n    // Quarter\n    momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;\n\n    // Month\n    momentPrototype__proto.month       = getSetMonth;\n    momentPrototype__proto.daysInMonth = getDaysInMonth;\n\n    // Week\n    momentPrototype__proto.week           = momentPrototype__proto.weeks        = getSetWeek;\n    momentPrototype__proto.isoWeek        = momentPrototype__proto.isoWeeks     = getSetISOWeek;\n    momentPrototype__proto.weeksInYear    = getWeeksInYear;\n    momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;\n\n    // Day\n    momentPrototype__proto.date       = getSetDayOfMonth;\n    momentPrototype__proto.day        = momentPrototype__proto.days             = getSetDayOfWeek;\n    momentPrototype__proto.weekday    = getSetLocaleDayOfWeek;\n    momentPrototype__proto.isoWeekday = getSetISODayOfWeek;\n    momentPrototype__proto.dayOfYear  = getSetDayOfYear;\n\n    // Hour\n    momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;\n\n    // Minute\n    momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;\n\n    // Second\n    momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;\n\n    // Millisecond\n    momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;\n\n    // Offset\n    momentPrototype__proto.utcOffset            = getSetOffset;\n    momentPrototype__proto.utc                  = setOffsetToUTC;\n    momentPrototype__proto.local                = setOffsetToLocal;\n    momentPrototype__proto.parseZone            = setOffsetToParsedOffset;\n    momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    momentPrototype__proto.isDST                = isDaylightSavingTime;\n    momentPrototype__proto.isLocal              = isLocal;\n    momentPrototype__proto.isUtcOffset          = isUtcOffset;\n    momentPrototype__proto.isUtc                = isUtc;\n    momentPrototype__proto.isUTC                = isUtc;\n\n    // Timezone\n    momentPrototype__proto.zoneAbbr = getZoneAbbr;\n    momentPrototype__proto.zoneName = getZoneName;\n\n    // Deprecations\n    momentPrototype__proto.dates  = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n    momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n    momentPrototype__proto.years  = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n    momentPrototype__proto.zone   = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n    momentPrototype__proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n    var momentPrototype = momentPrototype__proto;\n\n    function moment__createUnix (input) {\n        return local__createLocal(input * 1000);\n    }\n\n    function moment__createInZone () {\n        return local__createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat (string) {\n        return string;\n    }\n\n    var prototype__proto = Locale.prototype;\n\n    prototype__proto.calendar        = locale_calendar__calendar;\n    prototype__proto.longDateFormat  = longDateFormat;\n    prototype__proto.invalidDate     = invalidDate;\n    prototype__proto.ordinal         = ordinal;\n    prototype__proto.preparse        = preParsePostFormat;\n    prototype__proto.postformat      = preParsePostFormat;\n    prototype__proto.relativeTime    = relative__relativeTime;\n    prototype__proto.pastFuture      = pastFuture;\n    prototype__proto.set             = locale_set__set;\n\n    // Month\n    prototype__proto.months            =        localeMonths;\n    prototype__proto.monthsShort       =        localeMonthsShort;\n    prototype__proto.monthsParse       =        localeMonthsParse;\n    prototype__proto.monthsRegex       = monthsRegex;\n    prototype__proto.monthsShortRegex  = monthsShortRegex;\n\n    // Week\n    prototype__proto.week = localeWeek;\n    prototype__proto.firstDayOfYear = localeFirstDayOfYear;\n    prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;\n\n    // Day of Week\n    prototype__proto.weekdays       =        localeWeekdays;\n    prototype__proto.weekdaysMin    =        localeWeekdaysMin;\n    prototype__proto.weekdaysShort  =        localeWeekdaysShort;\n    prototype__proto.weekdaysParse  =        localeWeekdaysParse;\n\n    prototype__proto.weekdaysRegex       =        weekdaysRegex;\n    prototype__proto.weekdaysShortRegex  =        weekdaysShortRegex;\n    prototype__proto.weekdaysMinRegex    =        weekdaysMinRegex;\n\n    // Hours\n    prototype__proto.isPM = localeIsPM;\n    prototype__proto.meridiem = localeMeridiem;\n\n    function lists__get (format, index, field, setter) {\n        var locale = locale_locales__getLocale();\n        var utc = create_utc__createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl (format, index, field) {\n        if (typeof format === 'number') {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return lists__get(format, index, field, 'month');\n        }\n\n        var i;\n        var out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = lists__get(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl (localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (typeof format === 'number') {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (typeof format === 'number') {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = locale_locales__getLocale(),\n            shift = localeSorted ? locale._week.dow : 0;\n\n        if (index != null) {\n            return lists__get(format, (index + shift) % 7, field, 'day');\n        }\n\n        var i;\n        var out = [];\n        for (i = 0; i < 7; i++) {\n            out[i] = lists__get(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function lists__listMonths (format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function lists__listMonthsShort (format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function lists__listWeekdays (localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function lists__listWeekdaysShort (localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function lists__listWeekdaysMin (localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    locale_locales__getSetGlobalLocale('en', {\n        ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (toInt(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        }\n    });\n\n    // Side effect imports\n    utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);\n    utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);\n\n    var mathAbs = Math.abs;\n\n    function duration_abs__abs () {\n        var data           = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days         = mathAbs(this._days);\n        this._months       = mathAbs(this._months);\n\n        data.milliseconds  = mathAbs(data.milliseconds);\n        data.seconds       = mathAbs(data.seconds);\n        data.minutes       = mathAbs(data.minutes);\n        data.hours         = mathAbs(data.hours);\n        data.months        = mathAbs(data.months);\n        data.years         = mathAbs(data.years);\n\n        return this;\n    }\n\n    function duration_add_subtract__addSubtract (duration, input, value, direction) {\n        var other = create__createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days         += direction * other._days;\n        duration._months       += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function duration_add_subtract__add (input, value) {\n        return duration_add_subtract__addSubtract(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function duration_add_subtract__subtract (input, value) {\n        return duration_add_subtract__addSubtract(this, input, value, -1);\n    }\n\n    function absCeil (number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble () {\n        var milliseconds = this._milliseconds;\n        var days         = this._days;\n        var months       = this._months;\n        var data         = this._data;\n        var seconds, minutes, hours, years, monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0))) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds           = absFloor(milliseconds / 1000);\n        data.seconds      = seconds % 60;\n\n        minutes           = absFloor(seconds / 60);\n        data.minutes      = minutes % 60;\n\n        hours             = absFloor(minutes / 60);\n        data.hours        = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days   = days;\n        data.months = months;\n        data.years  = years;\n\n        return this;\n    }\n\n    function daysToMonths (days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return days * 4800 / 146097;\n    }\n\n    function monthsToDays (months) {\n        // the reverse of daysToMonths\n        return months * 146097 / 4800;\n    }\n\n    function as (units) {\n        var days;\n        var months;\n        var milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'year') {\n            days   = this._days   + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            return units === 'month' ? months : months / 12;\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week'   : return days / 7     + milliseconds / 6048e5;\n                case 'day'    : return days         + milliseconds / 864e5;\n                case 'hour'   : return days * 24    + milliseconds / 36e5;\n                case 'minute' : return days * 1440  + milliseconds / 6e4;\n                case 'second' : return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n                default: throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    // TODO: Use this.as('ms')?\n    function duration_as__valueOf () {\n        return (\n            this._milliseconds +\n            this._days * 864e5 +\n            (this._months % 12) * 2592e6 +\n            toInt(this._months / 12) * 31536e6\n        );\n    }\n\n    function makeAs (alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms');\n    var asSeconds      = makeAs('s');\n    var asMinutes      = makeAs('m');\n    var asHours        = makeAs('h');\n    var asDays         = makeAs('d');\n    var asWeeks        = makeAs('w');\n    var asMonths       = makeAs('M');\n    var asYears        = makeAs('y');\n\n    function duration_get__get (units) {\n        units = normalizeUnits(units);\n        return this[units + 's']();\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this._data[name];\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds');\n    var seconds      = makeGetter('seconds');\n    var minutes      = makeGetter('minutes');\n    var hours        = makeGetter('hours');\n    var days         = makeGetter('days');\n    var months       = makeGetter('months');\n    var years        = makeGetter('years');\n\n    function weeks () {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round;\n    var thresholds = {\n        s: 45,  // seconds to minute\n        m: 45,  // minutes to hour\n        h: 22,  // hours to day\n        d: 26,  // days to month\n        M: 11   // months to year\n    };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {\n        var duration = create__createDuration(posNegDuration).abs();\n        var seconds  = round(duration.as('s'));\n        var minutes  = round(duration.as('m'));\n        var hours    = round(duration.as('h'));\n        var days     = round(duration.as('d'));\n        var months   = round(duration.as('M'));\n        var years    = round(duration.as('y'));\n\n        var a = seconds < thresholds.s && ['s', seconds]  ||\n                minutes <= 1           && ['m']           ||\n                minutes < thresholds.m && ['mm', minutes] ||\n                hours   <= 1           && ['h']           ||\n                hours   < thresholds.h && ['hh', hours]   ||\n                days    <= 1           && ['d']           ||\n                days    < thresholds.d && ['dd', days]    ||\n                months  <= 1           && ['M']           ||\n                months  < thresholds.M && ['MM', months]  ||\n                years   <= 1           && ['y']           || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof(roundingFunction) === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        return true;\n    }\n\n    function humanize (withSuffix) {\n        var locale = this.localeData();\n        var output = duration_humanize__relativeTime(this, !withSuffix, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var iso_string__abs = Math.abs;\n\n    function iso_string__toISOString() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        var seconds = iso_string__abs(this._milliseconds) / 1000;\n        var days         = iso_string__abs(this._days);\n        var months       = iso_string__abs(this._months);\n        var minutes, hours, years;\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes           = absFloor(seconds / 60);\n        hours             = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years  = absFloor(months / 12);\n        months %= 12;\n\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        var Y = years;\n        var M = months;\n        var D = days;\n        var h = hours;\n        var m = minutes;\n        var s = seconds;\n        var total = this.asSeconds();\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        return (total < 0 ? '-' : '') +\n            'P' +\n            (Y ? Y + 'Y' : '') +\n            (M ? M + 'M' : '') +\n            (D ? D + 'D' : '') +\n            ((h || m || s) ? 'T' : '') +\n            (h ? h + 'H' : '') +\n            (m ? m + 'M' : '') +\n            (s ? s + 'S' : '');\n    }\n\n    var duration_prototype__proto = Duration.prototype;\n\n    duration_prototype__proto.abs            = duration_abs__abs;\n    duration_prototype__proto.add            = duration_add_subtract__add;\n    duration_prototype__proto.subtract       = duration_add_subtract__subtract;\n    duration_prototype__proto.as             = as;\n    duration_prototype__proto.asMilliseconds = asMilliseconds;\n    duration_prototype__proto.asSeconds      = asSeconds;\n    duration_prototype__proto.asMinutes      = asMinutes;\n    duration_prototype__proto.asHours        = asHours;\n    duration_prototype__proto.asDays         = asDays;\n    duration_prototype__proto.asWeeks        = asWeeks;\n    duration_prototype__proto.asMonths       = asMonths;\n    duration_prototype__proto.asYears        = asYears;\n    duration_prototype__proto.valueOf        = duration_as__valueOf;\n    duration_prototype__proto._bubble        = bubble;\n    duration_prototype__proto.get            = duration_get__get;\n    duration_prototype__proto.milliseconds   = milliseconds;\n    duration_prototype__proto.seconds        = seconds;\n    duration_prototype__proto.minutes        = minutes;\n    duration_prototype__proto.hours          = hours;\n    duration_prototype__proto.days           = days;\n    duration_prototype__proto.weeks          = weeks;\n    duration_prototype__proto.months         = months;\n    duration_prototype__proto.years          = years;\n    duration_prototype__proto.humanize       = humanize;\n    duration_prototype__proto.toISOString    = iso_string__toISOString;\n    duration_prototype__proto.toString       = iso_string__toISOString;\n    duration_prototype__proto.toJSON         = iso_string__toISOString;\n    duration_prototype__proto.locale         = locale;\n    duration_prototype__proto.localeData     = localeData;\n\n    // Deprecations\n    duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);\n    duration_prototype__proto.lang = lang;\n\n    // Side effect imports\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input, 10) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    // Side effect imports\n\n\n    utils_hooks__hooks.version = '2.15.1';\n\n    setHookCallback(local__createLocal);\n\n    utils_hooks__hooks.fn                    = momentPrototype;\n    utils_hooks__hooks.min                   = min;\n    utils_hooks__hooks.max                   = max;\n    utils_hooks__hooks.now                   = now;\n    utils_hooks__hooks.utc                   = create_utc__createUTC;\n    utils_hooks__hooks.unix                  = moment__createUnix;\n    utils_hooks__hooks.months                = lists__listMonths;\n    utils_hooks__hooks.isDate                = isDate;\n    utils_hooks__hooks.locale                = locale_locales__getSetGlobalLocale;\n    utils_hooks__hooks.invalid               = valid__createInvalid;\n    utils_hooks__hooks.duration              = create__createDuration;\n    utils_hooks__hooks.isMoment              = isMoment;\n    utils_hooks__hooks.weekdays              = lists__listWeekdays;\n    utils_hooks__hooks.parseZone             = moment__createInZone;\n    utils_hooks__hooks.localeData            = locale_locales__getLocale;\n    utils_hooks__hooks.isDuration            = isDuration;\n    utils_hooks__hooks.monthsShort           = lists__listMonthsShort;\n    utils_hooks__hooks.weekdaysMin           = lists__listWeekdaysMin;\n    utils_hooks__hooks.defineLocale          = defineLocale;\n    utils_hooks__hooks.updateLocale          = updateLocale;\n    utils_hooks__hooks.locales               = locale_locales__listLocales;\n    utils_hooks__hooks.weekdaysShort         = lists__listWeekdaysShort;\n    utils_hooks__hooks.normalizeUnits        = normalizeUnits;\n    utils_hooks__hooks.relativeTimeRounding = duration_humanize__getSetRelativeTimeRounding;\n    utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;\n    utils_hooks__hooks.calendarFormat        = getCalendarFormat;\n    utils_hooks__hooks.prototype             = momentPrototype;\n\n    var _moment = utils_hooks__hooks;\n\n    return _moment;\n\n}));","$ = jQuery = require('jquery');\r\nmodule.exports = require('./select2.js');","/*\nCopyright 2012 Igor Vaynberg\n\nVersion: 3.5.2 Timestamp: Sat Nov  1 14:43:36 EDT 2014\n\nThis software is licensed under the Apache License, Version 2.0 (the \"Apache License\") or the GNU\nGeneral Public License version 2 (the \"GPL License\"). You may choose either license to govern your\nuse of this software only upon the condition that you accept all of the terms of either the Apache\nLicense or the GPL License.\n\nYou may obtain a copy of the Apache License and the GPL License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n    http://www.gnu.org/licenses/gpl-2.0.html\n\nUnless required by applicable law or agreed to in writing, software distributed under the\nApache License or the GPL License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for\nthe specific language governing permissions and limitations under the Apache License and the GPL License.\n*/\n(function ($) {\n    if(typeof $.fn.each2 == \"undefined\") {\n        $.extend($.fn, {\n            /*\n            * 4-10 times faster .each replacement\n            * use it carefully, as it overrides jQuery context of element on each iteration\n            */\n            each2 : function (c) {\n                var j = $([0]), i = -1, l = this.length;\n                while (\n                    ++i < l\n                    && (j.context = j[0] = this[i])\n                    && c.call(j[0], i, j) !== false //\"this\"=DOM, i=index, j=jQuery object\n                );\n                return this;\n            }\n        });\n    }\n})(jQuery);\n\n(function ($, undefined) {\n    \"use strict\";\n    /*global document, window, jQuery, console */\n\n    if (window.Select2 !== undefined) {\n        return;\n    }\n\n    var AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,\n        lastMousePosition={x:0,y:0}, $document, scrollBarDimensions,\n\n    KEY = {\n        TAB: 9,\n        ENTER: 13,\n        ESC: 27,\n        SPACE: 32,\n        LEFT: 37,\n        UP: 38,\n        RIGHT: 39,\n        DOWN: 40,\n        SHIFT: 16,\n        CTRL: 17,\n        ALT: 18,\n        PAGE_UP: 33,\n        PAGE_DOWN: 34,\n        HOME: 36,\n        END: 35,\n        BACKSPACE: 8,\n        DELETE: 46,\n        isArrow: function (k) {\n            k = k.which ? k.which : k;\n            switch (k) {\n            case KEY.LEFT:\n            case KEY.RIGHT:\n            case KEY.UP:\n            case KEY.DOWN:\n                return true;\n            }\n            return false;\n        },\n        isControl: function (e) {\n            var k = e.which;\n            switch (k) {\n            case KEY.SHIFT:\n            case KEY.CTRL:\n            case KEY.ALT:\n                return true;\n            }\n\n            if (e.metaKey) return true;\n\n            return false;\n        },\n        isFunctionKey: function (k) {\n            k = k.which ? k.which : k;\n            return k >= 112 && k <= 123;\n        }\n    },\n    MEASURE_SCROLLBAR_TEMPLATE = \"<div class='select2-measure-scrollbar'></div>\",\n\n    DIACRITICS = {\"\\u24B6\":\"A\",\"\\uFF21\":\"A\",\"\\u00C0\":\"A\",\"\\u00C1\":\"A\",\"\\u00C2\":\"A\",\"\\u1EA6\":\"A\",\"\\u1EA4\":\"A\",\"\\u1EAA\":\"A\",\"\\u1EA8\":\"A\",\"\\u00C3\":\"A\",\"\\u0100\":\"A\",\"\\u0102\":\"A\",\"\\u1EB0\":\"A\",\"\\u1EAE\":\"A\",\"\\u1EB4\":\"A\",\"\\u1EB2\":\"A\",\"\\u0226\":\"A\",\"\\u01E0\":\"A\",\"\\u00C4\":\"A\",\"\\u01DE\":\"A\",\"\\u1EA2\":\"A\",\"\\u00C5\":\"A\",\"\\u01FA\":\"A\",\"\\u01CD\":\"A\",\"\\u0200\":\"A\",\"\\u0202\":\"A\",\"\\u1EA0\":\"A\",\"\\u1EAC\":\"A\",\"\\u1EB6\":\"A\",\"\\u1E00\":\"A\",\"\\u0104\":\"A\",\"\\u023A\":\"A\",\"\\u2C6F\":\"A\",\"\\uA732\":\"AA\",\"\\u00C6\":\"AE\",\"\\u01FC\":\"AE\",\"\\u01E2\":\"AE\",\"\\uA734\":\"AO\",\"\\uA736\":\"AU\",\"\\uA738\":\"AV\",\"\\uA73A\":\"AV\",\"\\uA73C\":\"AY\",\"\\u24B7\":\"B\",\"\\uFF22\":\"B\",\"\\u1E02\":\"B\",\"\\u1E04\":\"B\",\"\\u1E06\":\"B\",\"\\u0243\":\"B\",\"\\u0182\":\"B\",\"\\u0181\":\"B\",\"\\u24B8\":\"C\",\"\\uFF23\":\"C\",\"\\u0106\":\"C\",\"\\u0108\":\"C\",\"\\u010A\":\"C\",\"\\u010C\":\"C\",\"\\u00C7\":\"C\",\"\\u1E08\":\"C\",\"\\u0187\":\"C\",\"\\u023B\":\"C\",\"\\uA73E\":\"C\",\"\\u24B9\":\"D\",\"\\uFF24\":\"D\",\"\\u1E0A\":\"D\",\"\\u010E\":\"D\",\"\\u1E0C\":\"D\",\"\\u1E10\":\"D\",\"\\u1E12\":\"D\",\"\\u1E0E\":\"D\",\"\\u0110\":\"D\",\"\\u018B\":\"D\",\"\\u018A\":\"D\",\"\\u0189\":\"D\",\"\\uA779\":\"D\",\"\\u01F1\":\"DZ\",\"\\u01C4\":\"DZ\",\"\\u01F2\":\"Dz\",\"\\u01C5\":\"Dz\",\"\\u24BA\":\"E\",\"\\uFF25\":\"E\",\"\\u00C8\":\"E\",\"\\u00C9\":\"E\",\"\\u00CA\":\"E\",\"\\u1EC0\":\"E\",\"\\u1EBE\":\"E\",\"\\u1EC4\":\"E\",\"\\u1EC2\":\"E\",\"\\u1EBC\":\"E\",\"\\u0112\":\"E\",\"\\u1E14\":\"E\",\"\\u1E16\":\"E\",\"\\u0114\":\"E\",\"\\u0116\":\"E\",\"\\u00CB\":\"E\",\"\\u1EBA\":\"E\",\"\\u011A\":\"E\",\"\\u0204\":\"E\",\"\\u0206\":\"E\",\"\\u1EB8\":\"E\",\"\\u1EC6\":\"E\",\"\\u0228\":\"E\",\"\\u1E1C\":\"E\",\"\\u0118\":\"E\",\"\\u1E18\":\"E\",\"\\u1E1A\":\"E\",\"\\u0190\":\"E\",\"\\u018E\":\"E\",\"\\u24BB\":\"F\",\"\\uFF26\":\"F\",\"\\u1E1E\":\"F\",\"\\u0191\":\"F\",\"\\uA77B\":\"F\",\"\\u24BC\":\"G\",\"\\uFF27\":\"G\",\"\\u01F4\":\"G\",\"\\u011C\":\"G\",\"\\u1E20\":\"G\",\"\\u011E\":\"G\",\"\\u0120\":\"G\",\"\\u01E6\":\"G\",\"\\u0122\":\"G\",\"\\u01E4\":\"G\",\"\\u0193\":\"G\",\"\\uA7A0\":\"G\",\"\\uA77D\":\"G\",\"\\uA77E\":\"G\",\"\\u24BD\":\"H\",\"\\uFF28\":\"H\",\"\\u0124\":\"H\",\"\\u1E22\":\"H\",\"\\u1E26\":\"H\",\"\\u021E\":\"H\",\"\\u1E24\":\"H\",\"\\u1E28\":\"H\",\"\\u1E2A\":\"H\",\"\\u0126\":\"H\",\"\\u2C67\":\"H\",\"\\u2C75\":\"H\",\"\\uA78D\":\"H\",\"\\u24BE\":\"I\",\"\\uFF29\":\"I\",\"\\u00CC\":\"I\",\"\\u00CD\":\"I\",\"\\u00CE\":\"I\",\"\\u0128\":\"I\",\"\\u012A\":\"I\",\"\\u012C\":\"I\",\"\\u0130\":\"I\",\"\\u00CF\":\"I\",\"\\u1E2E\":\"I\",\"\\u1EC8\":\"I\",\"\\u01CF\":\"I\",\"\\u0208\":\"I\",\"\\u020A\":\"I\",\"\\u1ECA\":\"I\",\"\\u012E\":\"I\",\"\\u1E2C\":\"I\",\"\\u0197\":\"I\",\"\\u24BF\":\"J\",\"\\uFF2A\":\"J\",\"\\u0134\":\"J\",\"\\u0248\":\"J\",\"\\u24C0\":\"K\",\"\\uFF2B\":\"K\",\"\\u1E30\":\"K\",\"\\u01E8\":\"K\",\"\\u1E32\":\"K\",\"\\u0136\":\"K\",\"\\u1E34\":\"K\",\"\\u0198\":\"K\",\"\\u2C69\":\"K\",\"\\uA740\":\"K\",\"\\uA742\":\"K\",\"\\uA744\":\"K\",\"\\uA7A2\":\"K\",\"\\u24C1\":\"L\",\"\\uFF2C\":\"L\",\"\\u013F\":\"L\",\"\\u0139\":\"L\",\"\\u013D\":\"L\",\"\\u1E36\":\"L\",\"\\u1E38\":\"L\",\"\\u013B\":\"L\",\"\\u1E3C\":\"L\",\"\\u1E3A\":\"L\",\"\\u0141\":\"L\",\"\\u023D\":\"L\",\"\\u2C62\":\"L\",\"\\u2C60\":\"L\",\"\\uA748\":\"L\",\"\\uA746\":\"L\",\"\\uA780\":\"L\",\"\\u01C7\":\"LJ\",\"\\u01C8\":\"Lj\",\"\\u24C2\":\"M\",\"\\uFF2D\":\"M\",\"\\u1E3E\":\"M\",\"\\u1E40\":\"M\",\"\\u1E42\":\"M\",\"\\u2C6E\":\"M\",\"\\u019C\":\"M\",\"\\u24C3\":\"N\",\"\\uFF2E\":\"N\",\"\\u01F8\":\"N\",\"\\u0143\":\"N\",\"\\u00D1\":\"N\",\"\\u1E44\":\"N\",\"\\u0147\":\"N\",\"\\u1E46\":\"N\",\"\\u0145\":\"N\",\"\\u1E4A\":\"N\",\"\\u1E48\":\"N\",\"\\u0220\":\"N\",\"\\u019D\":\"N\",\"\\uA790\":\"N\",\"\\uA7A4\":\"N\",\"\\u01CA\":\"NJ\",\"\\u01CB\":\"Nj\",\"\\u24C4\":\"O\",\"\\uFF2F\":\"O\",\"\\u00D2\":\"O\",\"\\u00D3\":\"O\",\"\\u00D4\":\"O\",\"\\u1ED2\":\"O\",\"\\u1ED0\":\"O\",\"\\u1ED6\":\"O\",\"\\u1ED4\":\"O\",\"\\u00D5\":\"O\",\"\\u1E4C\":\"O\",\"\\u022C\":\"O\",\"\\u1E4E\":\"O\",\"\\u014C\":\"O\",\"\\u1E50\":\"O\",\"\\u1E52\":\"O\",\"\\u014E\":\"O\",\"\\u022E\":\"O\",\"\\u0230\":\"O\",\"\\u00D6\":\"O\",\"\\u022A\":\"O\",\"\\u1ECE\":\"O\",\"\\u0150\":\"O\",\"\\u01D1\":\"O\",\"\\u020C\":\"O\",\"\\u020E\":\"O\",\"\\u01A0\":\"O\",\"\\u1EDC\":\"O\",\"\\u1EDA\":\"O\",\"\\u1EE0\":\"O\",\"\\u1EDE\":\"O\",\"\\u1EE2\":\"O\",\"\\u1ECC\":\"O\",\"\\u1ED8\":\"O\",\"\\u01EA\":\"O\",\"\\u01EC\":\"O\",\"\\u00D8\":\"O\",\"\\u01FE\":\"O\",\"\\u0186\":\"O\",\"\\u019F\":\"O\",\"\\uA74A\":\"O\",\"\\uA74C\":\"O\",\"\\u01A2\":\"OI\",\"\\uA74E\":\"OO\",\"\\u0222\":\"OU\",\"\\u24C5\":\"P\",\"\\uFF30\":\"P\",\"\\u1E54\":\"P\",\"\\u1E56\":\"P\",\"\\u01A4\":\"P\",\"\\u2C63\":\"P\",\"\\uA750\":\"P\",\"\\uA752\":\"P\",\"\\uA754\":\"P\",\"\\u24C6\":\"Q\",\"\\uFF31\":\"Q\",\"\\uA756\":\"Q\",\"\\uA758\":\"Q\",\"\\u024A\":\"Q\",\"\\u24C7\":\"R\",\"\\uFF32\":\"R\",\"\\u0154\":\"R\",\"\\u1E58\":\"R\",\"\\u0158\":\"R\",\"\\u0210\":\"R\",\"\\u0212\":\"R\",\"\\u1E5A\":\"R\",\"\\u1E5C\":\"R\",\"\\u0156\":\"R\",\"\\u1E5E\":\"R\",\"\\u024C\":\"R\",\"\\u2C64\":\"R\",\"\\uA75A\":\"R\",\"\\uA7A6\":\"R\",\"\\uA782\":\"R\",\"\\u24C8\":\"S\",\"\\uFF33\":\"S\",\"\\u1E9E\":\"S\",\"\\u015A\":\"S\",\"\\u1E64\":\"S\",\"\\u015C\":\"S\",\"\\u1E60\":\"S\",\"\\u0160\":\"S\",\"\\u1E66\":\"S\",\"\\u1E62\":\"S\",\"\\u1E68\":\"S\",\"\\u0218\":\"S\",\"\\u015E\":\"S\",\"\\u2C7E\":\"S\",\"\\uA7A8\":\"S\",\"\\uA784\":\"S\",\"\\u24C9\":\"T\",\"\\uFF34\":\"T\",\"\\u1E6A\":\"T\",\"\\u0164\":\"T\",\"\\u1E6C\":\"T\",\"\\u021A\":\"T\",\"\\u0162\":\"T\",\"\\u1E70\":\"T\",\"\\u1E6E\":\"T\",\"\\u0166\":\"T\",\"\\u01AC\":\"T\",\"\\u01AE\":\"T\",\"\\u023E\":\"T\",\"\\uA786\":\"T\",\"\\uA728\":\"TZ\",\"\\u24CA\":\"U\",\"\\uFF35\":\"U\",\"\\u00D9\":\"U\",\"\\u00DA\":\"U\",\"\\u00DB\":\"U\",\"\\u0168\":\"U\",\"\\u1E78\":\"U\",\"\\u016A\":\"U\",\"\\u1E7A\":\"U\",\"\\u016C\":\"U\",\"\\u00DC\":\"U\",\"\\u01DB\":\"U\",\"\\u01D7\":\"U\",\"\\u01D5\":\"U\",\"\\u01D9\":\"U\",\"\\u1EE6\":\"U\",\"\\u016E\":\"U\",\"\\u0170\":\"U\",\"\\u01D3\":\"U\",\"\\u0214\":\"U\",\"\\u0216\":\"U\",\"\\u01AF\":\"U\",\"\\u1EEA\":\"U\",\"\\u1EE8\":\"U\",\"\\u1EEE\":\"U\",\"\\u1EEC\":\"U\",\"\\u1EF0\":\"U\",\"\\u1EE4\":\"U\",\"\\u1E72\":\"U\",\"\\u0172\":\"U\",\"\\u1E76\":\"U\",\"\\u1E74\":\"U\",\"\\u0244\":\"U\",\"\\u24CB\":\"V\",\"\\uFF36\":\"V\",\"\\u1E7C\":\"V\",\"\\u1E7E\":\"V\",\"\\u01B2\":\"V\",\"\\uA75E\":\"V\",\"\\u0245\":\"V\",\"\\uA760\":\"VY\",\"\\u24CC\":\"W\",\"\\uFF37\":\"W\",\"\\u1E80\":\"W\",\"\\u1E82\":\"W\",\"\\u0174\":\"W\",\"\\u1E86\":\"W\",\"\\u1E84\":\"W\",\"\\u1E88\":\"W\",\"\\u2C72\":\"W\",\"\\u24CD\":\"X\",\"\\uFF38\":\"X\",\"\\u1E8A\":\"X\",\"\\u1E8C\":\"X\",\"\\u24CE\":\"Y\",\"\\uFF39\":\"Y\",\"\\u1EF2\":\"Y\",\"\\u00DD\":\"Y\",\"\\u0176\":\"Y\",\"\\u1EF8\":\"Y\",\"\\u0232\":\"Y\",\"\\u1E8E\":\"Y\",\"\\u0178\":\"Y\",\"\\u1EF6\":\"Y\",\"\\u1EF4\":\"Y\",\"\\u01B3\":\"Y\",\"\\u024E\":\"Y\",\"\\u1EFE\":\"Y\",\"\\u24CF\":\"Z\",\"\\uFF3A\":\"Z\",\"\\u0179\":\"Z\",\"\\u1E90\":\"Z\",\"\\u017B\":\"Z\",\"\\u017D\":\"Z\",\"\\u1E92\":\"Z\",\"\\u1E94\":\"Z\",\"\\u01B5\":\"Z\",\"\\u0224\":\"Z\",\"\\u2C7F\":\"Z\",\"\\u2C6B\":\"Z\",\"\\uA762\":\"Z\",\"\\u24D0\":\"a\",\"\\uFF41\":\"a\",\"\\u1E9A\":\"a\",\"\\u00E0\":\"a\",\"\\u00E1\":\"a\",\"\\u00E2\":\"a\",\"\\u1EA7\":\"a\",\"\\u1EA5\":\"a\",\"\\u1EAB\":\"a\",\"\\u1EA9\":\"a\",\"\\u00E3\":\"a\",\"\\u0101\":\"a\",\"\\u0103\":\"a\",\"\\u1EB1\":\"a\",\"\\u1EAF\":\"a\",\"\\u1EB5\":\"a\",\"\\u1EB3\":\"a\",\"\\u0227\":\"a\",\"\\u01E1\":\"a\",\"\\u00E4\":\"a\",\"\\u01DF\":\"a\",\"\\u1EA3\":\"a\",\"\\u00E5\":\"a\",\"\\u01FB\":\"a\",\"\\u01CE\":\"a\",\"\\u0201\":\"a\",\"\\u0203\":\"a\",\"\\u1EA1\":\"a\",\"\\u1EAD\":\"a\",\"\\u1EB7\":\"a\",\"\\u1E01\":\"a\",\"\\u0105\":\"a\",\"\\u2C65\":\"a\",\"\\u0250\":\"a\",\"\\uA733\":\"aa\",\"\\u00E6\":\"ae\",\"\\u01FD\":\"ae\",\"\\u01E3\":\"ae\",\"\\uA735\":\"ao\",\"\\uA737\":\"au\",\"\\uA739\":\"av\",\"\\uA73B\":\"av\",\"\\uA73D\":\"ay\",\"\\u24D1\":\"b\",\"\\uFF42\":\"b\",\"\\u1E03\":\"b\",\"\\u1E05\":\"b\",\"\\u1E07\":\"b\",\"\\u0180\":\"b\",\"\\u0183\":\"b\",\"\\u0253\":\"b\",\"\\u24D2\":\"c\",\"\\uFF43\":\"c\",\"\\u0107\":\"c\",\"\\u0109\":\"c\",\"\\u010B\":\"c\",\"\\u010D\":\"c\",\"\\u00E7\":\"c\",\"\\u1E09\":\"c\",\"\\u0188\":\"c\",\"\\u023C\":\"c\",\"\\uA73F\":\"c\",\"\\u2184\":\"c\",\"\\u24D3\":\"d\",\"\\uFF44\":\"d\",\"\\u1E0B\":\"d\",\"\\u010F\":\"d\",\"\\u1E0D\":\"d\",\"\\u1E11\":\"d\",\"\\u1E13\":\"d\",\"\\u1E0F\":\"d\",\"\\u0111\":\"d\",\"\\u018C\":\"d\",\"\\u0256\":\"d\",\"\\u0257\":\"d\",\"\\uA77A\":\"d\",\"\\u01F3\":\"dz\",\"\\u01C6\":\"dz\",\"\\u24D4\":\"e\",\"\\uFF45\":\"e\",\"\\u00E8\":\"e\",\"\\u00E9\":\"e\",\"\\u00EA\":\"e\",\"\\u1EC1\":\"e\",\"\\u1EBF\":\"e\",\"\\u1EC5\":\"e\",\"\\u1EC3\":\"e\",\"\\u1EBD\":\"e\",\"\\u0113\":\"e\",\"\\u1E15\":\"e\",\"\\u1E17\":\"e\",\"\\u0115\":\"e\",\"\\u0117\":\"e\",\"\\u00EB\":\"e\",\"\\u1EBB\":\"e\",\"\\u011B\":\"e\",\"\\u0205\":\"e\",\"\\u0207\":\"e\",\"\\u1EB9\":\"e\",\"\\u1EC7\":\"e\",\"\\u0229\":\"e\",\"\\u1E1D\":\"e\",\"\\u0119\":\"e\",\"\\u1E19\":\"e\",\"\\u1E1B\":\"e\",\"\\u0247\":\"e\",\"\\u025B\":\"e\",\"\\u01DD\":\"e\",\"\\u24D5\":\"f\",\"\\uFF46\":\"f\",\"\\u1E1F\":\"f\",\"\\u0192\":\"f\",\"\\uA77C\":\"f\",\"\\u24D6\":\"g\",\"\\uFF47\":\"g\",\"\\u01F5\":\"g\",\"\\u011D\":\"g\",\"\\u1E21\":\"g\",\"\\u011F\":\"g\",\"\\u0121\":\"g\",\"\\u01E7\":\"g\",\"\\u0123\":\"g\",\"\\u01E5\":\"g\",\"\\u0260\":\"g\",\"\\uA7A1\":\"g\",\"\\u1D79\":\"g\",\"\\uA77F\":\"g\",\"\\u24D7\":\"h\",\"\\uFF48\":\"h\",\"\\u0125\":\"h\",\"\\u1E23\":\"h\",\"\\u1E27\":\"h\",\"\\u021F\":\"h\",\"\\u1E25\":\"h\",\"\\u1E29\":\"h\",\"\\u1E2B\":\"h\",\"\\u1E96\":\"h\",\"\\u0127\":\"h\",\"\\u2C68\":\"h\",\"\\u2C76\":\"h\",\"\\u0265\":\"h\",\"\\u0195\":\"hv\",\"\\u24D8\":\"i\",\"\\uFF49\":\"i\",\"\\u00EC\":\"i\",\"\\u00ED\":\"i\",\"\\u00EE\":\"i\",\"\\u0129\":\"i\",\"\\u012B\":\"i\",\"\\u012D\":\"i\",\"\\u00EF\":\"i\",\"\\u1E2F\":\"i\",\"\\u1EC9\":\"i\",\"\\u01D0\":\"i\",\"\\u0209\":\"i\",\"\\u020B\":\"i\",\"\\u1ECB\":\"i\",\"\\u012F\":\"i\",\"\\u1E2D\":\"i\",\"\\u0268\":\"i\",\"\\u0131\":\"i\",\"\\u24D9\":\"j\",\"\\uFF4A\":\"j\",\"\\u0135\":\"j\",\"\\u01F0\":\"j\",\"\\u0249\":\"j\",\"\\u24DA\":\"k\",\"\\uFF4B\":\"k\",\"\\u1E31\":\"k\",\"\\u01E9\":\"k\",\"\\u1E33\":\"k\",\"\\u0137\":\"k\",\"\\u1E35\":\"k\",\"\\u0199\":\"k\",\"\\u2C6A\":\"k\",\"\\uA741\":\"k\",\"\\uA743\":\"k\",\"\\uA745\":\"k\",\"\\uA7A3\":\"k\",\"\\u24DB\":\"l\",\"\\uFF4C\":\"l\",\"\\u0140\":\"l\",\"\\u013A\":\"l\",\"\\u013E\":\"l\",\"\\u1E37\":\"l\",\"\\u1E39\":\"l\",\"\\u013C\":\"l\",\"\\u1E3D\":\"l\",\"\\u1E3B\":\"l\",\"\\u017F\":\"l\",\"\\u0142\":\"l\",\"\\u019A\":\"l\",\"\\u026B\":\"l\",\"\\u2C61\":\"l\",\"\\uA749\":\"l\",\"\\uA781\":\"l\",\"\\uA747\":\"l\",\"\\u01C9\":\"lj\",\"\\u24DC\":\"m\",\"\\uFF4D\":\"m\",\"\\u1E3F\":\"m\",\"\\u1E41\":\"m\",\"\\u1E43\":\"m\",\"\\u0271\":\"m\",\"\\u026F\":\"m\",\"\\u24DD\":\"n\",\"\\uFF4E\":\"n\",\"\\u01F9\":\"n\",\"\\u0144\":\"n\",\"\\u00F1\":\"n\",\"\\u1E45\":\"n\",\"\\u0148\":\"n\",\"\\u1E47\":\"n\",\"\\u0146\":\"n\",\"\\u1E4B\":\"n\",\"\\u1E49\":\"n\",\"\\u019E\":\"n\",\"\\u0272\":\"n\",\"\\u0149\":\"n\",\"\\uA791\":\"n\",\"\\uA7A5\":\"n\",\"\\u01CC\":\"nj\",\"\\u24DE\":\"o\",\"\\uFF4F\":\"o\",\"\\u00F2\":\"o\",\"\\u00F3\":\"o\",\"\\u00F4\":\"o\",\"\\u1ED3\":\"o\",\"\\u1ED1\":\"o\",\"\\u1ED7\":\"o\",\"\\u1ED5\":\"o\",\"\\u00F5\":\"o\",\"\\u1E4D\":\"o\",\"\\u022D\":\"o\",\"\\u1E4F\":\"o\",\"\\u014D\":\"o\",\"\\u1E51\":\"o\",\"\\u1E53\":\"o\",\"\\u014F\":\"o\",\"\\u022F\":\"o\",\"\\u0231\":\"o\",\"\\u00F6\":\"o\",\"\\u022B\":\"o\",\"\\u1ECF\":\"o\",\"\\u0151\":\"o\",\"\\u01D2\":\"o\",\"\\u020D\":\"o\",\"\\u020F\":\"o\",\"\\u01A1\":\"o\",\"\\u1EDD\":\"o\",\"\\u1EDB\":\"o\",\"\\u1EE1\":\"o\",\"\\u1EDF\":\"o\",\"\\u1EE3\":\"o\",\"\\u1ECD\":\"o\",\"\\u1ED9\":\"o\",\"\\u01EB\":\"o\",\"\\u01ED\":\"o\",\"\\u00F8\":\"o\",\"\\u01FF\":\"o\",\"\\u0254\":\"o\",\"\\uA74B\":\"o\",\"\\uA74D\":\"o\",\"\\u0275\":\"o\",\"\\u01A3\":\"oi\",\"\\u0223\":\"ou\",\"\\uA74F\":\"oo\",\"\\u24DF\":\"p\",\"\\uFF50\":\"p\",\"\\u1E55\":\"p\",\"\\u1E57\":\"p\",\"\\u01A5\":\"p\",\"\\u1D7D\":\"p\",\"\\uA751\":\"p\",\"\\uA753\":\"p\",\"\\uA755\":\"p\",\"\\u24E0\":\"q\",\"\\uFF51\":\"q\",\"\\u024B\":\"q\",\"\\uA757\":\"q\",\"\\uA759\":\"q\",\"\\u24E1\":\"r\",\"\\uFF52\":\"r\",\"\\u0155\":\"r\",\"\\u1E59\":\"r\",\"\\u0159\":\"r\",\"\\u0211\":\"r\",\"\\u0213\":\"r\",\"\\u1E5B\":\"r\",\"\\u1E5D\":\"r\",\"\\u0157\":\"r\",\"\\u1E5F\":\"r\",\"\\u024D\":\"r\",\"\\u027D\":\"r\",\"\\uA75B\":\"r\",\"\\uA7A7\":\"r\",\"\\uA783\":\"r\",\"\\u24E2\":\"s\",\"\\uFF53\":\"s\",\"\\u00DF\":\"s\",\"\\u015B\":\"s\",\"\\u1E65\":\"s\",\"\\u015D\":\"s\",\"\\u1E61\":\"s\",\"\\u0161\":\"s\",\"\\u1E67\":\"s\",\"\\u1E63\":\"s\",\"\\u1E69\":\"s\",\"\\u0219\":\"s\",\"\\u015F\":\"s\",\"\\u023F\":\"s\",\"\\uA7A9\":\"s\",\"\\uA785\":\"s\",\"\\u1E9B\":\"s\",\"\\u24E3\":\"t\",\"\\uFF54\":\"t\",\"\\u1E6B\":\"t\",\"\\u1E97\":\"t\",\"\\u0165\":\"t\",\"\\u1E6D\":\"t\",\"\\u021B\":\"t\",\"\\u0163\":\"t\",\"\\u1E71\":\"t\",\"\\u1E6F\":\"t\",\"\\u0167\":\"t\",\"\\u01AD\":\"t\",\"\\u0288\":\"t\",\"\\u2C66\":\"t\",\"\\uA787\":\"t\",\"\\uA729\":\"tz\",\"\\u24E4\":\"u\",\"\\uFF55\":\"u\",\"\\u00F9\":\"u\",\"\\u00FA\":\"u\",\"\\u00FB\":\"u\",\"\\u0169\":\"u\",\"\\u1E79\":\"u\",\"\\u016B\":\"u\",\"\\u1E7B\":\"u\",\"\\u016D\":\"u\",\"\\u00FC\":\"u\",\"\\u01DC\":\"u\",\"\\u01D8\":\"u\",\"\\u01D6\":\"u\",\"\\u01DA\":\"u\",\"\\u1EE7\":\"u\",\"\\u016F\":\"u\",\"\\u0171\":\"u\",\"\\u01D4\":\"u\",\"\\u0215\":\"u\",\"\\u0217\":\"u\",\"\\u01B0\":\"u\",\"\\u1EEB\":\"u\",\"\\u1EE9\":\"u\",\"\\u1EEF\":\"u\",\"\\u1EED\":\"u\",\"\\u1EF1\":\"u\",\"\\u1EE5\":\"u\",\"\\u1E73\":\"u\",\"\\u0173\":\"u\",\"\\u1E77\":\"u\",\"\\u1E75\":\"u\",\"\\u0289\":\"u\",\"\\u24E5\":\"v\",\"\\uFF56\":\"v\",\"\\u1E7D\":\"v\",\"\\u1E7F\":\"v\",\"\\u028B\":\"v\",\"\\uA75F\":\"v\",\"\\u028C\":\"v\",\"\\uA761\":\"vy\",\"\\u24E6\":\"w\",\"\\uFF57\":\"w\",\"\\u1E81\":\"w\",\"\\u1E83\":\"w\",\"\\u0175\":\"w\",\"\\u1E87\":\"w\",\"\\u1E85\":\"w\",\"\\u1E98\":\"w\",\"\\u1E89\":\"w\",\"\\u2C73\":\"w\",\"\\u24E7\":\"x\",\"\\uFF58\":\"x\",\"\\u1E8B\":\"x\",\"\\u1E8D\":\"x\",\"\\u24E8\":\"y\",\"\\uFF59\":\"y\",\"\\u1EF3\":\"y\",\"\\u00FD\":\"y\",\"\\u0177\":\"y\",\"\\u1EF9\":\"y\",\"\\u0233\":\"y\",\"\\u1E8F\":\"y\",\"\\u00FF\":\"y\",\"\\u1EF7\":\"y\",\"\\u1E99\":\"y\",\"\\u1EF5\":\"y\",\"\\u01B4\":\"y\",\"\\u024F\":\"y\",\"\\u1EFF\":\"y\",\"\\u24E9\":\"z\",\"\\uFF5A\":\"z\",\"\\u017A\":\"z\",\"\\u1E91\":\"z\",\"\\u017C\":\"z\",\"\\u017E\":\"z\",\"\\u1E93\":\"z\",\"\\u1E95\":\"z\",\"\\u01B6\":\"z\",\"\\u0225\":\"z\",\"\\u0240\":\"z\",\"\\u2C6C\":\"z\",\"\\uA763\":\"z\",\"\\u0386\":\"\\u0391\",\"\\u0388\":\"\\u0395\",\"\\u0389\":\"\\u0397\",\"\\u038A\":\"\\u0399\",\"\\u03AA\":\"\\u0399\",\"\\u038C\":\"\\u039F\",\"\\u038E\":\"\\u03A5\",\"\\u03AB\":\"\\u03A5\",\"\\u038F\":\"\\u03A9\",\"\\u03AC\":\"\\u03B1\",\"\\u03AD\":\"\\u03B5\",\"\\u03AE\":\"\\u03B7\",\"\\u03AF\":\"\\u03B9\",\"\\u03CA\":\"\\u03B9\",\"\\u0390\":\"\\u03B9\",\"\\u03CC\":\"\\u03BF\",\"\\u03CD\":\"\\u03C5\",\"\\u03CB\":\"\\u03C5\",\"\\u03B0\":\"\\u03C5\",\"\\u03C9\":\"\\u03C9\",\"\\u03C2\":\"\\u03C3\"};\n\n    $document = $(document);\n\n    nextUid=(function() { var counter=1; return function() { return counter++; }; }());\n\n\n    function reinsertElement(element) {\n        var placeholder = $(document.createTextNode(''));\n\n        element.before(placeholder);\n        placeholder.before(element);\n        placeholder.remove();\n    }\n\n    function stripDiacritics(str) {\n        // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n        function match(a) {\n            return DIACRITICS[a] || a;\n        }\n\n        return str.replace(/[^\\u0000-\\u007E]/g, match);\n    }\n\n    function indexOf(value, array) {\n        var i = 0, l = array.length;\n        for (; i < l; i = i + 1) {\n            if (equal(value, array[i])) return i;\n        }\n        return -1;\n    }\n\n    function measureScrollbar () {\n        var $template = $( MEASURE_SCROLLBAR_TEMPLATE );\n        $template.appendTo(document.body);\n\n        var dim = {\n            width: $template.width() - $template[0].clientWidth,\n            height: $template.height() - $template[0].clientHeight\n        };\n        $template.remove();\n\n        return dim;\n    }\n\n    /**\n     * Compares equality of a and b\n     * @param a\n     * @param b\n     */\n    function equal(a, b) {\n        if (a === b) return true;\n        if (a === undefined || b === undefined) return false;\n        if (a === null || b === null) return false;\n        // Check whether 'a' or 'b' is a string (primitive or object).\n        // The concatenation of an empty string (+'') converts its argument to a string's primitive.\n        if (a.constructor === String) return a+'' === b+''; // a+'' - in case 'a' is a String object\n        if (b.constructor === String) return b+'' === a+''; // b+'' - in case 'b' is a String object\n        return false;\n    }\n\n    /**\n     * Splits the string into an array of values, transforming each value. An empty array is returned for nulls or empty\n     * strings\n     * @param string\n     * @param separator\n     */\n    function splitVal(string, separator, transform) {\n        var val, i, l;\n        if (string === null || string.length < 1) return [];\n        val = string.split(separator);\n        for (i = 0, l = val.length; i < l; i = i + 1) val[i] = transform(val[i]);\n        return val;\n    }\n\n    function getSideBorderPadding(element) {\n        return element.outerWidth(false) - element.width();\n    }\n\n    function installKeyUpChangeEvent(element) {\n        var key=\"keyup-change-value\";\n        element.on(\"keydown\", function () {\n            if ($.data(element, key) === undefined) {\n                $.data(element, key, element.val());\n            }\n        });\n        element.on(\"keyup\", function () {\n            var val= $.data(element, key);\n            if (val !== undefined && element.val() !== val) {\n                $.removeData(element, key);\n                element.trigger(\"keyup-change\");\n            }\n        });\n    }\n\n\n    /**\n     * filters mouse events so an event is fired only if the mouse moved.\n     *\n     * filters out mouse events that occur when mouse is stationary but\n     * the elements under the pointer are scrolled.\n     */\n    function installFilteredMouseMove(element) {\n        element.on(\"mousemove\", function (e) {\n            var lastpos = lastMousePosition;\n            if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {\n                $(e.target).trigger(\"mousemove-filtered\", e);\n            }\n        });\n    }\n\n    /**\n     * Debounces a function. Returns a function that calls the original fn function only if no invocations have been made\n     * within the last quietMillis milliseconds.\n     *\n     * @param quietMillis number of milliseconds to wait before invoking fn\n     * @param fn function to be debounced\n     * @param ctx object to be used as this reference within fn\n     * @return debounced version of fn\n     */\n    function debounce(quietMillis, fn, ctx) {\n        ctx = ctx || undefined;\n        var timeout;\n        return function () {\n            var args = arguments;\n            window.clearTimeout(timeout);\n            timeout = window.setTimeout(function() {\n                fn.apply(ctx, args);\n            }, quietMillis);\n        };\n    }\n\n    function installDebouncedScroll(threshold, element) {\n        var notify = debounce(threshold, function (e) { element.trigger(\"scroll-debounced\", e);});\n        element.on(\"scroll\", function (e) {\n            if (indexOf(e.target, element.get()) >= 0) notify(e);\n        });\n    }\n\n    function focus($el) {\n        if ($el[0] === document.activeElement) return;\n\n        /* set the focus in a 0 timeout - that way the focus is set after the processing\n            of the current event has finished - which seems like the only reliable way\n            to set focus */\n        window.setTimeout(function() {\n            var el=$el[0], pos=$el.val().length, range;\n\n            $el.focus();\n\n            /* make sure el received focus so we do not error out when trying to manipulate the caret.\n                sometimes modals or others listeners may steal it after its set */\n            var isVisible = (el.offsetWidth > 0 || el.offsetHeight > 0);\n            if (isVisible && el === document.activeElement) {\n\n                /* after the focus is set move the caret to the end, necessary when we val()\n                    just before setting focus */\n                if(el.setSelectionRange)\n                {\n                    el.setSelectionRange(pos, pos);\n                }\n                else if (el.createTextRange) {\n                    range = el.createTextRange();\n                    range.collapse(false);\n                    range.select();\n                }\n            }\n        }, 0);\n    }\n\n    function getCursorInfo(el) {\n        el = $(el)[0];\n        var offset = 0;\n        var length = 0;\n        if ('selectionStart' in el) {\n            offset = el.selectionStart;\n            length = el.selectionEnd - offset;\n        } else if ('selection' in document) {\n            el.focus();\n            var sel = document.selection.createRange();\n            length = document.selection.createRange().text.length;\n            sel.moveStart('character', -el.value.length);\n            offset = sel.text.length - length;\n        }\n        return { offset: offset, length: length };\n    }\n\n    function killEvent(event) {\n        event.preventDefault();\n        event.stopPropagation();\n    }\n    function killEventImmediately(event) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n    }\n\n    function measureTextWidth(e) {\n        if (!sizer){\n            var style = e[0].currentStyle || window.getComputedStyle(e[0], null);\n            sizer = $(document.createElement(\"div\")).css({\n                position: \"absolute\",\n                left: \"-10000px\",\n                top: \"-10000px\",\n                display: \"none\",\n                fontSize: style.fontSize,\n                fontFamily: style.fontFamily,\n                fontStyle: style.fontStyle,\n                fontWeight: style.fontWeight,\n                letterSpacing: style.letterSpacing,\n                textTransform: style.textTransform,\n                whiteSpace: \"nowrap\"\n            });\n            sizer.attr(\"class\",\"select2-sizer\");\n            $(document.body).append(sizer);\n        }\n        sizer.text(e.val());\n        return sizer.width();\n    }\n\n    function syncCssClasses(dest, src, adapter) {\n        var classes, replacements = [], adapted;\n\n        classes = $.trim(dest.attr(\"class\"));\n\n        if (classes) {\n            classes = '' + classes; // for IE which returns object\n\n            $(classes.split(/\\s+/)).each2(function() {\n                if (this.indexOf(\"select2-\") === 0) {\n                    replacements.push(this);\n                }\n            });\n        }\n\n        classes = $.trim(src.attr(\"class\"));\n\n        if (classes) {\n            classes = '' + classes; // for IE which returns object\n\n            $(classes.split(/\\s+/)).each2(function() {\n                if (this.indexOf(\"select2-\") !== 0) {\n                    adapted = adapter(this);\n\n                    if (adapted) {\n                        replacements.push(adapted);\n                    }\n                }\n            });\n        }\n\n        dest.attr(\"class\", replacements.join(\" \"));\n    }\n\n\n    function markMatch(text, term, markup, escapeMarkup) {\n        var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),\n            tl=term.length;\n\n        if (match<0) {\n            markup.push(escapeMarkup(text));\n            return;\n        }\n\n        markup.push(escapeMarkup(text.substring(0, match)));\n        markup.push(\"<span class='select2-match'>\");\n        markup.push(escapeMarkup(text.substring(match, match + tl)));\n        markup.push(\"</span>\");\n        markup.push(escapeMarkup(text.substring(match + tl, text.length)));\n    }\n\n    function defaultEscapeMarkup(markup) {\n        var replace_map = {\n            '\\\\': '&#92;',\n            '&': '&amp;',\n            '<': '&lt;',\n            '>': '&gt;',\n            '\"': '&quot;',\n            \"'\": '&#39;',\n            \"/\": '&#47;'\n        };\n\n        return String(markup).replace(/[&<>\"'\\/\\\\]/g, function (match) {\n            return replace_map[match];\n        });\n    }\n\n    /**\n     * Produces an ajax-based query function\n     *\n     * @param options object containing configuration parameters\n     * @param options.params parameter map for the transport ajax call, can contain such options as cache, jsonpCallback, etc. see $.ajax\n     * @param options.transport function that will be used to execute the ajax request. must be compatible with parameters supported by $.ajax\n     * @param options.url url for the data\n     * @param options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.\n     * @param options.dataType request data type: ajax, jsonp, other datatypes supported by jQuery's $.ajax function or the transport function if specified\n     * @param options.quietMillis (optional) milliseconds to wait before making the ajaxRequest, helps debounce the ajax function if invoked too often\n     * @param options.results a function(remoteData, pageNumber, query) that converts data returned form the remote request to the format expected by Select2.\n     *      The expected format is an object containing the following keys:\n     *      results array of objects that will be used as choices\n     *      more (optional) boolean indicating whether there are more results available\n     *      Example: {results:[{id:1, text:'Red'},{id:2, text:'Blue'}], more:true}\n     */\n    function ajax(options) {\n        var timeout, // current scheduled but not yet executed request\n            handler = null,\n            quietMillis = options.quietMillis || 100,\n            ajaxUrl = options.url,\n            self = this;\n\n        return function (query) {\n            window.clearTimeout(timeout);\n            timeout = window.setTimeout(function () {\n                var data = options.data, // ajax data function\n                    url = ajaxUrl, // ajax url string or function\n                    transport = options.transport || $.fn.select2.ajaxDefaults.transport,\n                    // deprecated - to be removed in 4.0  - use params instead\n                    deprecated = {\n                        type: options.type || 'GET', // set type of request (GET or POST)\n                        cache: options.cache || false,\n                        jsonpCallback: options.jsonpCallback||undefined,\n                        dataType: options.dataType||\"json\"\n                    },\n                    params = $.extend({}, $.fn.select2.ajaxDefaults.params, deprecated);\n\n                data = data ? data.call(self, query.term, query.page, query.context) : null;\n                url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;\n\n                if (handler && typeof handler.abort === \"function\") { handler.abort(); }\n\n                if (options.params) {\n                    if ($.isFunction(options.params)) {\n                        $.extend(params, options.params.call(self));\n                    } else {\n                        $.extend(params, options.params);\n                    }\n                }\n\n                $.extend(params, {\n                    url: url,\n                    dataType: options.dataType,\n                    data: data,\n                    success: function (data) {\n                        // TODO - replace query.page with query so users have access to term, page, etc.\n                        // added query as third paramter to keep backwards compatibility\n                        var results = options.results(data, query.page, query);\n                        query.callback(results);\n                    },\n                    error: function(jqXHR, textStatus, errorThrown){\n                        var results = {\n                            hasError: true,\n                            jqXHR: jqXHR,\n                            textStatus: textStatus,\n                            errorThrown: errorThrown\n                        };\n\n                        query.callback(results);\n                    }\n                });\n                handler = transport.call(self, params);\n            }, quietMillis);\n        };\n    }\n\n    /**\n     * Produces a query function that works with a local array\n     *\n     * @param options object containing configuration parameters. The options parameter can either be an array or an\n     * object.\n     *\n     * If the array form is used it is assumed that it contains objects with 'id' and 'text' keys.\n     *\n     * If the object form is used it is assumed that it contains 'data' and 'text' keys. The 'data' key should contain\n     * an array of objects that will be used as choices. These objects must contain at least an 'id' key. The 'text'\n     * key can either be a String in which case it is expected that each element in the 'data' array has a key with the\n     * value of 'text' which will be used to match choices. Alternatively, text can be a function(item) that can extract\n     * the text.\n     */\n    function local(options) {\n        var data = options, // data elements\n            dataText,\n            tmp,\n            text = function (item) { return \"\"+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search\n\n         if ($.isArray(data)) {\n            tmp = data;\n            data = { results: tmp };\n        }\n\n         if ($.isFunction(data) === false) {\n            tmp = data;\n            data = function() { return tmp; };\n        }\n\n        var dataItem = data();\n        if (dataItem.text) {\n            text = dataItem.text;\n            // if text is not a function we assume it to be a key name\n            if (!$.isFunction(text)) {\n                dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available\n                text = function (item) { return item[dataText]; };\n            }\n        }\n\n        return function (query) {\n            var t = query.term, filtered = { results: [] }, process;\n            if (t === \"\") {\n                query.callback(data());\n                return;\n            }\n\n            process = function(datum, collection) {\n                var group, attr;\n                datum = datum[0];\n                if (datum.children) {\n                    group = {};\n                    for (attr in datum) {\n                        if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];\n                    }\n                    group.children=[];\n                    $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });\n                    if (group.children.length || query.matcher(t, text(group), datum)) {\n                        collection.push(group);\n                    }\n                } else {\n                    if (query.matcher(t, text(datum), datum)) {\n                        collection.push(datum);\n                    }\n                }\n            };\n\n            $(data().results).each2(function(i, datum) { process(datum, filtered.results); });\n            query.callback(filtered);\n        };\n    }\n\n    // TODO javadoc\n    function tags(data) {\n        var isFunc = $.isFunction(data);\n        return function (query) {\n            var t = query.term, filtered = {results: []};\n            var result = isFunc ? data(query) : data;\n            if ($.isArray(result)) {\n                $(result).each(function () {\n                    var isObject = this.text !== undefined,\n                        text = isObject ? this.text : this;\n                    if (t === \"\" || query.matcher(t, text)) {\n                        filtered.results.push(isObject ? this : {id: this, text: this});\n                    }\n                });\n                query.callback(filtered);\n            }\n        };\n    }\n\n    /**\n     * Checks if the formatter function should be used.\n     *\n     * Throws an error if it is not a function. Returns true if it should be used,\n     * false if no formatting should be performed.\n     *\n     * @param formatter\n     */\n    function checkFormatter(formatter, formatterName) {\n        if ($.isFunction(formatter)) return true;\n        if (!formatter) return false;\n        if (typeof(formatter) === 'string') return true;\n        throw new Error(formatterName +\" must be a string, function, or falsy value\");\n    }\n\n  /**\n   * Returns a given value\n   * If given a function, returns its output\n   *\n   * @param val string|function\n   * @param context value of \"this\" to be passed to function\n   * @returns {*}\n   */\n    function evaluate(val, context) {\n        if ($.isFunction(val)) {\n            var args = Array.prototype.slice.call(arguments, 2);\n            return val.apply(context, args);\n        }\n        return val;\n    }\n\n    function countResults(results) {\n        var count = 0;\n        $.each(results, function(i, item) {\n            if (item.children) {\n                count += countResults(item.children);\n            } else {\n                count++;\n            }\n        });\n        return count;\n    }\n\n    /**\n     * Default tokenizer. This function uses breaks the input on substring match of any string from the\n     * opts.tokenSeparators array and uses opts.createSearchChoice to create the choice object. Both of those\n     * two options have to be defined in order for the tokenizer to work.\n     *\n     * @param input text user has typed so far or pasted into the search field\n     * @param selection currently selected choices\n     * @param selectCallback function(choice) callback tho add the choice to selection\n     * @param opts select2's opts\n     * @return undefined/null to leave the current input unchanged, or a string to change the input to the returned value\n     */\n    function defaultTokenizer(input, selection, selectCallback, opts) {\n        var original = input, // store the original so we can compare and know if we need to tell the search to update its text\n            dupe = false, // check for whether a token we extracted represents a duplicate selected choice\n            token, // token\n            index, // position at which the separator was found\n            i, l, // looping variables\n            separator; // the matched separator\n\n        if (!opts.createSearchChoice || !opts.tokenSeparators || opts.tokenSeparators.length < 1) return undefined;\n\n        while (true) {\n            index = -1;\n\n            for (i = 0, l = opts.tokenSeparators.length; i < l; i++) {\n                separator = opts.tokenSeparators[i];\n                index = input.indexOf(separator);\n                if (index >= 0) break;\n            }\n\n            if (index < 0) break; // did not find any token separator in the input string, bail\n\n            token = input.substring(0, index);\n            input = input.substring(index + separator.length);\n\n            if (token.length > 0) {\n                token = opts.createSearchChoice.call(this, token, selection);\n                if (token !== undefined && token !== null && opts.id(token) !== undefined && opts.id(token) !== null) {\n                    dupe = false;\n                    for (i = 0, l = selection.length; i < l; i++) {\n                        if (equal(opts.id(token), opts.id(selection[i]))) {\n                            dupe = true; break;\n                        }\n                    }\n\n                    if (!dupe) selectCallback(token);\n                }\n            }\n        }\n\n        if (original!==input) return input;\n    }\n\n    function cleanupJQueryElements() {\n        var self = this;\n\n        $.each(arguments, function (i, element) {\n            self[element].remove();\n            self[element] = null;\n        });\n    }\n\n    /**\n     * Creates a new class\n     *\n     * @param superClass\n     * @param methods\n     */\n    function clazz(SuperClass, methods) {\n        var constructor = function () {};\n        constructor.prototype = new SuperClass;\n        constructor.prototype.constructor = constructor;\n        constructor.prototype.parent = SuperClass.prototype;\n        constructor.prototype = $.extend(constructor.prototype, methods);\n        return constructor;\n    }\n\n    AbstractSelect2 = clazz(Object, {\n\n        // abstract\n        bind: function (func) {\n            var self = this;\n            return function () {\n                func.apply(self, arguments);\n            };\n        },\n\n        // abstract\n        init: function (opts) {\n            var results, search, resultsSelector = \".select2-results\";\n\n            // prepare options\n            this.opts = opts = this.prepareOpts(opts);\n\n            this.id=opts.id;\n\n            // destroy if called on an existing component\n            if (opts.element.data(\"select2\") !== undefined &&\n                opts.element.data(\"select2\") !== null) {\n                opts.element.data(\"select2\").destroy();\n            }\n\n            this.container = this.createContainer();\n\n            this.liveRegion = $('.select2-hidden-accessible');\n            if (this.liveRegion.length == 0) {\n                this.liveRegion = $(\"<span>\", {\n                        role: \"status\",\n                        \"aria-live\": \"polite\"\n                    })\n                    .addClass(\"select2-hidden-accessible\")\n                    .appendTo(document.body);\n            }\n\n            this.containerId=\"s2id_\"+(opts.element.attr(\"id\") || \"autogen\"+nextUid());\n            this.containerEventName= this.containerId\n                .replace(/([.])/g, '_')\n                .replace(/([;&,\\-\\.\\+\\*\\~':\"\\!\\^#$%@\\[\\]\\(\\)=>\\|])/g, '\\\\$1');\n            this.container.attr(\"id\", this.containerId);\n\n            this.container.attr(\"title\", opts.element.attr(\"title\"));\n\n            this.body = $(document.body);\n\n            syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);\n\n            this.container.attr(\"style\", opts.element.attr(\"style\"));\n            this.container.css(evaluate(opts.containerCss, this.opts.element));\n            this.container.addClass(evaluate(opts.containerCssClass, this.opts.element));\n\n            this.elementTabIndex = this.opts.element.attr(\"tabindex\");\n\n            // swap container for the element\n            this.opts.element\n                .data(\"select2\", this)\n                .attr(\"tabindex\", \"-1\")\n                .before(this.container)\n                .on(\"click.select2\", killEvent); // do not leak click events\n\n            this.container.data(\"select2\", this);\n\n            this.dropdown = this.container.find(\".select2-drop\");\n\n            syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);\n\n            this.dropdown.addClass(evaluate(opts.dropdownCssClass, this.opts.element));\n            this.dropdown.data(\"select2\", this);\n            this.dropdown.on(\"click\", killEvent);\n\n            this.results = results = this.container.find(resultsSelector);\n            this.search = search = this.container.find(\"input.select2-input\");\n\n            this.queryCount = 0;\n            this.resultsPage = 0;\n            this.context = null;\n\n            // initialize the container\n            this.initContainer();\n\n            this.container.on(\"click\", killEvent);\n\n            installFilteredMouseMove(this.results);\n\n            this.dropdown.on(\"mousemove-filtered\", resultsSelector, this.bind(this.highlightUnderEvent));\n            this.dropdown.on(\"touchstart touchmove touchend\", resultsSelector, this.bind(function (event) {\n                this._touchEvent = true;\n                this.highlightUnderEvent(event);\n            }));\n            this.dropdown.on(\"touchmove\", resultsSelector, this.bind(this.touchMoved));\n            this.dropdown.on(\"touchstart touchend\", resultsSelector, this.bind(this.clearTouchMoved));\n\n            // Waiting for a click event on touch devices to select option and hide dropdown\n            // otherwise click will be triggered on an underlying element\n            this.dropdown.on('click', this.bind(function (event) {\n                if (this._touchEvent) {\n                    this._touchEvent = false;\n                    this.selectHighlighted();\n                }\n            }));\n\n            installDebouncedScroll(80, this.results);\n            this.dropdown.on(\"scroll-debounced\", resultsSelector, this.bind(this.loadMoreIfNeeded));\n\n            // do not propagate change event from the search field out of the component\n            $(this.container).on(\"change\", \".select2-input\", function(e) {e.stopPropagation();});\n            $(this.dropdown).on(\"change\", \".select2-input\", function(e) {e.stopPropagation();});\n\n            // if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel\n            if ($.fn.mousewheel) {\n                results.mousewheel(function (e, delta, deltaX, deltaY) {\n                    var top = results.scrollTop();\n                    if (deltaY > 0 && top - deltaY <= 0) {\n                        results.scrollTop(0);\n                        killEvent(e);\n                    } else if (deltaY < 0 && results.get(0).scrollHeight - results.scrollTop() + deltaY <= results.height()) {\n                        results.scrollTop(results.get(0).scrollHeight - results.height());\n                        killEvent(e);\n                    }\n                });\n            }\n\n            installKeyUpChangeEvent(search);\n            search.on(\"keyup-change input paste\", this.bind(this.updateResults));\n            search.on(\"focus\", function () { search.addClass(\"select2-focused\"); });\n            search.on(\"blur\", function () { search.removeClass(\"select2-focused\");});\n\n            this.dropdown.on(\"mouseup\", resultsSelector, this.bind(function (e) {\n                if ($(e.target).closest(\".select2-result-selectable\").length > 0) {\n                    this.highlightUnderEvent(e);\n                    this.selectHighlighted(e);\n                }\n            }));\n\n            // trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening\n            // for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's\n            // dom it will trigger the popup close, which is not what we want\n            // focusin can cause focus wars between modals and select2 since the dropdown is outside the modal.\n            this.dropdown.on(\"click mouseup mousedown touchstart touchend focusin\", function (e) { e.stopPropagation(); });\n\n            this.nextSearchTerm = undefined;\n\n            if ($.isFunction(this.opts.initSelection)) {\n                // initialize selection based on the current value of the source element\n                this.initSelection();\n\n                // if the user has provided a function that can set selection based on the value of the source element\n                // we monitor the change event on the element and trigger it, allowing for two way synchronization\n                this.monitorSource();\n            }\n\n            if (opts.maximumInputLength !== null) {\n                this.search.attr(\"maxlength\", opts.maximumInputLength);\n            }\n\n            var disabled = opts.element.prop(\"disabled\");\n            if (disabled === undefined) disabled = false;\n            this.enable(!disabled);\n\n            var readonly = opts.element.prop(\"readonly\");\n            if (readonly === undefined) readonly = false;\n            this.readonly(readonly);\n\n            // Calculate size of scrollbar\n            scrollBarDimensions = scrollBarDimensions || measureScrollbar();\n\n            this.autofocus = opts.element.prop(\"autofocus\");\n            opts.element.prop(\"autofocus\", false);\n            if (this.autofocus) this.focus();\n\n            this.search.attr(\"placeholder\", opts.searchInputPlaceholder);\n        },\n\n        // abstract\n        destroy: function () {\n            var element=this.opts.element, select2 = element.data(\"select2\"), self = this;\n\n            this.close();\n\n            if (element.length && element[0].detachEvent && self._sync) {\n                element.each(function () {\n                    if (self._sync) {\n                        this.detachEvent(\"onpropertychange\", self._sync);\n                    }\n                });\n            }\n            if (this.propertyObserver) {\n                this.propertyObserver.disconnect();\n                this.propertyObserver = null;\n            }\n            this._sync = null;\n\n            if (select2 !== undefined) {\n                select2.container.remove();\n                select2.liveRegion.remove();\n                select2.dropdown.remove();\n                element\n                    .show()\n                    .removeData(\"select2\")\n                    .off(\".select2\")\n                    .prop(\"autofocus\", this.autofocus || false);\n                if (this.elementTabIndex) {\n                    element.attr({tabindex: this.elementTabIndex});\n                } else {\n                    element.removeAttr(\"tabindex\");\n                }\n                element.show();\n            }\n\n            cleanupJQueryElements.call(this,\n                \"container\",\n                \"liveRegion\",\n                \"dropdown\",\n                \"results\",\n                \"search\"\n            );\n        },\n\n        // abstract\n        optionToData: function(element) {\n            if (element.is(\"option\")) {\n                return {\n                    id:element.prop(\"value\"),\n                    text:element.text(),\n                    element: element.get(),\n                    css: element.attr(\"class\"),\n                    disabled: element.prop(\"disabled\"),\n                    locked: equal(element.attr(\"locked\"), \"locked\") || equal(element.data(\"locked\"), true)\n                };\n            } else if (element.is(\"optgroup\")) {\n                return {\n                    text:element.attr(\"label\"),\n                    children:[],\n                    element: element.get(),\n                    css: element.attr(\"class\")\n                };\n            }\n        },\n\n        // abstract\n        prepareOpts: function (opts) {\n            var element, select, idKey, ajaxUrl, self = this;\n\n            element = opts.element;\n\n            if (element.get(0).tagName.toLowerCase() === \"select\") {\n                this.select = select = opts.element;\n            }\n\n            if (select) {\n                // these options are not allowed when attached to a select because they are picked up off the element itself\n                $.each([\"id\", \"multiple\", \"ajax\", \"query\", \"createSearchChoice\", \"initSelection\", \"data\", \"tags\"], function () {\n                    if (this in opts) {\n                        throw new Error(\"Option '\" + this + \"' is not allowed for Select2 when attached to a <select> element.\");\n                    }\n                });\n            }\n\n            opts = $.extend({}, {\n                populateResults: function(container, results, query) {\n                    var populate, id=this.opts.id, liveRegion=this.liveRegion;\n\n                    populate=function(results, container, depth) {\n\n                        var i, l, result, selectable, disabled, compound, node, label, innerContainer, formatted;\n\n                        results = opts.sortResults(results, container, query);\n\n                        // collect the created nodes for bulk append\n                        var nodes = [];\n                        for (i = 0, l = results.length; i < l; i = i + 1) {\n\n                            result=results[i];\n\n                            disabled = (result.disabled === true);\n                            selectable = (!disabled) && (id(result) !== undefined);\n\n                            compound=result.children && result.children.length > 0;\n\n                            node=$(\"<li></li>\");\n                            node.addClass(\"select2-results-dept-\"+depth);\n                            node.addClass(\"select2-result\");\n                            node.addClass(selectable ? \"select2-result-selectable\" : \"select2-result-unselectable\");\n                            if (disabled) { node.addClass(\"select2-disabled\"); }\n                            if (compound) { node.addClass(\"select2-result-with-children\"); }\n                            node.addClass(self.opts.formatResultCssClass(result));\n                            node.attr(\"role\", \"presentation\");\n\n                            label=$(document.createElement(\"div\"));\n                            label.addClass(\"select2-result-label\");\n                            label.attr(\"id\", \"select2-result-label-\" + nextUid());\n                            label.attr(\"role\", \"option\");\n\n                            formatted=opts.formatResult(result, label, query, self.opts.escapeMarkup);\n                            if (formatted!==undefined) {\n                                label.html(formatted);\n                                node.append(label);\n                            }\n\n\n                            if (compound) {\n\n                                innerContainer=$(\"<ul></ul>\");\n                                innerContainer.addClass(\"select2-result-sub\");\n                                populate(result.children, innerContainer, depth+1);\n                                node.append(innerContainer);\n                            }\n\n                            node.data(\"select2-data\", result);\n                            nodes.push(node[0]);\n                        }\n\n                        // bulk append the created nodes\n                        container.append(nodes);\n                        liveRegion.text(opts.formatMatches(results.length));\n                    };\n\n                    populate(results, container, 0);\n                }\n            }, $.fn.select2.defaults, opts);\n\n            if (typeof(opts.id) !== \"function\") {\n                idKey = opts.id;\n                opts.id = function (e) { return e[idKey]; };\n            }\n\n            if ($.isArray(opts.element.data(\"select2Tags\"))) {\n                if (\"tags\" in opts) {\n                    throw \"tags specified as both an attribute 'data-select2-tags' and in options of Select2 \" + opts.element.attr(\"id\");\n                }\n                opts.tags=opts.element.data(\"select2Tags\");\n            }\n\n            if (select) {\n                opts.query = this.bind(function (query) {\n                    var data = { results: [], more: false },\n                        term = query.term,\n                        children, placeholderOption, process;\n\n                    process=function(element, collection) {\n                        var group;\n                        if (element.is(\"option\")) {\n                            if (query.matcher(term, element.text(), element)) {\n                                collection.push(self.optionToData(element));\n                            }\n                        } else if (element.is(\"optgroup\")) {\n                            group=self.optionToData(element);\n                            element.children().each2(function(i, elm) { process(elm, group.children); });\n                            if (group.children.length>0) {\n                                collection.push(group);\n                            }\n                        }\n                    };\n\n                    children=element.children();\n\n                    // ignore the placeholder option if there is one\n                    if (this.getPlaceholder() !== undefined && children.length > 0) {\n                        placeholderOption = this.getPlaceholderOption();\n                        if (placeholderOption) {\n                            children=children.not(placeholderOption);\n                        }\n                    }\n\n                    children.each2(function(i, elm) { process(elm, data.results); });\n\n                    query.callback(data);\n                });\n                // this is needed because inside val() we construct choices from options and their id is hardcoded\n                opts.id=function(e) { return e.id; };\n            } else {\n                if (!(\"query\" in opts)) {\n\n                    if (\"ajax\" in opts) {\n                        ajaxUrl = opts.element.data(\"ajax-url\");\n                        if (ajaxUrl && ajaxUrl.length > 0) {\n                            opts.ajax.url = ajaxUrl;\n                        }\n                        opts.query = ajax.call(opts.element, opts.ajax);\n                    } else if (\"data\" in opts) {\n                        opts.query = local(opts.data);\n                    } else if (\"tags\" in opts) {\n                        opts.query = tags(opts.tags);\n                        if (opts.createSearchChoice === undefined) {\n                            opts.createSearchChoice = function (term) { return {id: $.trim(term), text: $.trim(term)}; };\n                        }\n                        if (opts.initSelection === undefined) {\n                            opts.initSelection = function (element, callback) {\n                                var data = [];\n                                $(splitVal(element.val(), opts.separator, opts.transformVal)).each(function () {\n                                    var obj = { id: this, text: this },\n                                        tags = opts.tags;\n                                    if ($.isFunction(tags)) tags=tags();\n                                    $(tags).each(function() { if (equal(this.id, obj.id)) { obj = this; return false; } });\n                                    data.push(obj);\n                                });\n\n                                callback(data);\n                            };\n                        }\n                    }\n                }\n            }\n            if (typeof(opts.query) !== \"function\") {\n                throw \"query function not defined for Select2 \" + opts.element.attr(\"id\");\n            }\n\n            if (opts.createSearchChoicePosition === 'top') {\n                opts.createSearchChoicePosition = function(list, item) { list.unshift(item); };\n            }\n            else if (opts.createSearchChoicePosition === 'bottom') {\n                opts.createSearchChoicePosition = function(list, item) { list.push(item); };\n            }\n            else if (typeof(opts.createSearchChoicePosition) !== \"function\")  {\n                throw \"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function\";\n            }\n\n            return opts;\n        },\n\n        /**\n         * Monitor the original element for changes and update select2 accordingly\n         */\n        // abstract\n        monitorSource: function () {\n            var el = this.opts.element, observer, self = this;\n\n            el.on(\"change.select2\", this.bind(function (e) {\n                if (this.opts.element.data(\"select2-change-triggered\") !== true) {\n                    this.initSelection();\n                }\n            }));\n\n            this._sync = this.bind(function () {\n\n                // sync enabled state\n                var disabled = el.prop(\"disabled\");\n                if (disabled === undefined) disabled = false;\n                this.enable(!disabled);\n\n                var readonly = el.prop(\"readonly\");\n                if (readonly === undefined) readonly = false;\n                this.readonly(readonly);\n\n                if (this.container) {\n                    syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);\n                    this.container.addClass(evaluate(this.opts.containerCssClass, this.opts.element));\n                }\n\n                if (this.dropdown) {\n                    syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);\n                    this.dropdown.addClass(evaluate(this.opts.dropdownCssClass, this.opts.element));\n                }\n\n            });\n\n            // IE8-10 (IE9/10 won't fire propertyChange via attachEventListener)\n            if (el.length && el[0].attachEvent) {\n                el.each(function() {\n                    this.attachEvent(\"onpropertychange\", self._sync);\n                });\n            }\n\n            // safari, chrome, firefox, IE11\n            observer = window.MutationObserver || window.WebKitMutationObserver|| window.MozMutationObserver;\n            if (observer !== undefined) {\n                if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }\n                this.propertyObserver = new observer(function (mutations) {\n                    $.each(mutations, self._sync);\n                });\n                this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });\n            }\n        },\n\n        // abstract\n        triggerSelect: function(data) {\n            var evt = $.Event(\"select2-selecting\", { val: this.id(data), object: data, choice: data });\n            this.opts.element.trigger(evt);\n            return !evt.isDefaultPrevented();\n        },\n\n        /**\n         * Triggers the change event on the source element\n         */\n        // abstract\n        triggerChange: function (details) {\n\n            details = details || {};\n            details= $.extend({}, details, { type: \"change\", val: this.val() });\n            // prevents recursive triggering\n            this.opts.element.data(\"select2-change-triggered\", true);\n            this.opts.element.trigger(details);\n            this.opts.element.data(\"select2-change-triggered\", false);\n\n            // some validation frameworks ignore the change event and listen instead to keyup, click for selects\n            // so here we trigger the click event manually\n            this.opts.element.click();\n\n            // ValidationEngine ignores the change event and listens instead to blur\n            // so here we trigger the blur event manually if so desired\n            if (this.opts.blurOnChange)\n                this.opts.element.blur();\n        },\n\n        //abstract\n        isInterfaceEnabled: function()\n        {\n            return this.enabledInterface === true;\n        },\n\n        // abstract\n        enableInterface: function() {\n            var enabled = this._enabled && !this._readonly,\n                disabled = !enabled;\n\n            if (enabled === this.enabledInterface) return false;\n\n            this.container.toggleClass(\"select2-container-disabled\", disabled);\n            this.close();\n            this.enabledInterface = enabled;\n\n            return true;\n        },\n\n        // abstract\n        enable: function(enabled) {\n            if (enabled === undefined) enabled = true;\n            if (this._enabled === enabled) return;\n            this._enabled = enabled;\n\n            this.opts.element.prop(\"disabled\", !enabled);\n            this.enableInterface();\n        },\n\n        // abstract\n        disable: function() {\n            this.enable(false);\n        },\n\n        // abstract\n        readonly: function(enabled) {\n            if (enabled === undefined) enabled = false;\n            if (this._readonly === enabled) return;\n            this._readonly = enabled;\n\n            this.opts.element.prop(\"readonly\", enabled);\n            this.enableInterface();\n        },\n\n        // abstract\n        opened: function () {\n            return (this.container) ? this.container.hasClass(\"select2-dropdown-open\") : false;\n        },\n\n        // abstract\n        positionDropdown: function() {\n            var $dropdown = this.dropdown,\n                container = this.container,\n                offset = container.offset(),\n                height = container.outerHeight(false),\n                width = container.outerWidth(false),\n                dropHeight = $dropdown.outerHeight(false),\n                $window = $(window),\n                windowWidth = $window.width(),\n                windowHeight = $window.height(),\n                viewPortRight = $window.scrollLeft() + windowWidth,\n                viewportBottom = $window.scrollTop() + windowHeight,\n                dropTop = offset.top + height,\n                dropLeft = offset.left,\n                enoughRoomBelow = dropTop + dropHeight <= viewportBottom,\n                enoughRoomAbove = (offset.top - dropHeight) >= $window.scrollTop(),\n                dropWidth = $dropdown.outerWidth(false),\n                enoughRoomOnRight = function() {\n                    return dropLeft + dropWidth <= viewPortRight;\n                },\n                enoughRoomOnLeft = function() {\n                    return offset.left + viewPortRight + container.outerWidth(false)  > dropWidth;\n                },\n                aboveNow = $dropdown.hasClass(\"select2-drop-above\"),\n                bodyOffset,\n                above,\n                changeDirection,\n                css,\n                resultsListNode;\n\n            // always prefer the current above/below alignment, unless there is not enough room\n            if (aboveNow) {\n                above = true;\n                if (!enoughRoomAbove && enoughRoomBelow) {\n                    changeDirection = true;\n                    above = false;\n                }\n            } else {\n                above = false;\n                if (!enoughRoomBelow && enoughRoomAbove) {\n                    changeDirection = true;\n                    above = true;\n                }\n            }\n\n            //if we are changing direction we need to get positions when dropdown is hidden;\n            if (changeDirection) {\n                $dropdown.hide();\n                offset = this.container.offset();\n                height = this.container.outerHeight(false);\n                width = this.container.outerWidth(false);\n                dropHeight = $dropdown.outerHeight(false);\n                viewPortRight = $window.scrollLeft() + windowWidth;\n                viewportBottom = $window.scrollTop() + windowHeight;\n                dropTop = offset.top + height;\n                dropLeft = offset.left;\n                dropWidth = $dropdown.outerWidth(false);\n                $dropdown.show();\n\n                // fix so the cursor does not move to the left within the search-textbox in IE\n                this.focusSearch();\n            }\n\n            if (this.opts.dropdownAutoWidth) {\n                resultsListNode = $('.select2-results', $dropdown)[0];\n                $dropdown.addClass('select2-drop-auto-width');\n                $dropdown.css('width', '');\n                // Add scrollbar width to dropdown if vertical scrollbar is present\n                dropWidth = $dropdown.outerWidth(false) + (resultsListNode.scrollHeight === resultsListNode.clientHeight ? 0 : scrollBarDimensions.width);\n                dropWidth > width ? width = dropWidth : dropWidth = width;\n                dropHeight = $dropdown.outerHeight(false);\n            }\n            else {\n                this.container.removeClass('select2-drop-auto-width');\n            }\n\n            //console.log(\"below/ droptop:\", dropTop, \"dropHeight\", dropHeight, \"sum\", (dropTop+dropHeight)+\" viewport bottom\", viewportBottom, \"enough?\", enoughRoomBelow);\n            //console.log(\"above/ offset.top\", offset.top, \"dropHeight\", dropHeight, \"top\", (offset.top-dropHeight), \"scrollTop\", this.body.scrollTop(), \"enough?\", enoughRoomAbove);\n\n            // fix positioning when body has an offset and is not position: static\n            if (this.body.css('position') !== 'static') {\n                bodyOffset = this.body.offset();\n                dropTop -= bodyOffset.top;\n                dropLeft -= bodyOffset.left;\n            }\n\n            if (!enoughRoomOnRight() && enoughRoomOnLeft()) {\n                dropLeft = offset.left + this.container.outerWidth(false) - dropWidth;\n            }\n\n            css =  {\n                left: dropLeft,\n                width: width\n            };\n\n            if (above) {\n                css.top = offset.top - dropHeight;\n                css.bottom = 'auto';\n                this.container.addClass(\"select2-drop-above\");\n                $dropdown.addClass(\"select2-drop-above\");\n            }\n            else {\n                css.top = dropTop;\n                css.bottom = 'auto';\n                this.container.removeClass(\"select2-drop-above\");\n                $dropdown.removeClass(\"select2-drop-above\");\n            }\n            css = $.extend(css, evaluate(this.opts.dropdownCss, this.opts.element));\n\n            $dropdown.css(css);\n        },\n\n        // abstract\n        shouldOpen: function() {\n            var event;\n\n            if (this.opened()) return false;\n\n            if (this._enabled === false || this._readonly === true) return false;\n\n            event = $.Event(\"select2-opening\");\n            this.opts.element.trigger(event);\n            return !event.isDefaultPrevented();\n        },\n\n        // abstract\n        clearDropdownAlignmentPreference: function() {\n            // clear the classes used to figure out the preference of where the dropdown should be opened\n            this.container.removeClass(\"select2-drop-above\");\n            this.dropdown.removeClass(\"select2-drop-above\");\n        },\n\n        /**\n         * Opens the dropdown\n         *\n         * @return {Boolean} whether or not dropdown was opened. This method will return false if, for example,\n         * the dropdown is already open, or if the 'open' event listener on the element called preventDefault().\n         */\n        // abstract\n        open: function () {\n\n            if (!this.shouldOpen()) return false;\n\n            this.opening();\n\n            // Only bind the document mousemove when the dropdown is visible\n            $document.on(\"mousemove.select2Event\", function (e) {\n                lastMousePosition.x = e.pageX;\n                lastMousePosition.y = e.pageY;\n            });\n\n            return true;\n        },\n\n        /**\n         * Performs the opening of the dropdown\n         */\n        // abstract\n        opening: function() {\n            var cid = this.containerEventName,\n                scroll = \"scroll.\" + cid,\n                resize = \"resize.\"+cid,\n                orient = \"orientationchange.\"+cid,\n                mask;\n\n            this.container.addClass(\"select2-dropdown-open\").addClass(\"select2-container-active\");\n\n            this.clearDropdownAlignmentPreference();\n\n            if(this.dropdown[0] !== this.body.children().last()[0]) {\n                this.dropdown.detach().appendTo(this.body);\n            }\n\n            // create the dropdown mask if doesn't already exist\n            mask = $(\"#select2-drop-mask\");\n            if (mask.length === 0) {\n                mask = $(document.createElement(\"div\"));\n                mask.attr(\"id\",\"select2-drop-mask\").attr(\"class\",\"select2-drop-mask\");\n                mask.hide();\n                mask.appendTo(this.body);\n                mask.on(\"mousedown touchstart click\", function (e) {\n                    // Prevent IE from generating a click event on the body\n                    reinsertElement(mask);\n\n                    var dropdown = $(\"#select2-drop\"), self;\n                    if (dropdown.length > 0) {\n                        self=dropdown.data(\"select2\");\n                        if (self.opts.selectOnBlur) {\n                            self.selectHighlighted({noFocus: true});\n                        }\n                        self.close();\n                        e.preventDefault();\n                        e.stopPropagation();\n                    }\n                });\n            }\n\n            // ensure the mask is always right before the dropdown\n            if (this.dropdown.prev()[0] !== mask[0]) {\n                this.dropdown.before(mask);\n            }\n\n            // move the global id to the correct dropdown\n            $(\"#select2-drop\").removeAttr(\"id\");\n            this.dropdown.attr(\"id\", \"select2-drop\");\n\n            // show the elements\n            mask.show();\n\n            this.positionDropdown();\n            this.dropdown.show();\n            this.positionDropdown();\n\n            this.dropdown.addClass(\"select2-drop-active\");\n\n            // attach listeners to events that can change the position of the container and thus require\n            // the position of the dropdown to be updated as well so it does not come unglued from the container\n            var that = this;\n            this.container.parents().add(window).each(function () {\n                $(this).on(resize+\" \"+scroll+\" \"+orient, function (e) {\n                    if (that.opened()) that.positionDropdown();\n                });\n            });\n\n\n        },\n\n        // abstract\n        close: function () {\n            if (!this.opened()) return;\n\n            var cid = this.containerEventName,\n                scroll = \"scroll.\" + cid,\n                resize = \"resize.\"+cid,\n                orient = \"orientationchange.\"+cid;\n\n            // unbind event listeners\n            this.container.parents().add(window).each(function () { $(this).off(scroll).off(resize).off(orient); });\n\n            this.clearDropdownAlignmentPreference();\n\n            $(\"#select2-drop-mask\").hide();\n            this.dropdown.removeAttr(\"id\"); // only the active dropdown has the select2-drop id\n            this.dropdown.hide();\n            this.container.removeClass(\"select2-dropdown-open\").removeClass(\"select2-container-active\");\n            this.results.empty();\n\n            // Now that the dropdown is closed, unbind the global document mousemove event\n            $document.off(\"mousemove.select2Event\");\n\n            this.clearSearch();\n            this.search.removeClass(\"select2-active\");\n            this.opts.element.trigger($.Event(\"select2-close\"));\n        },\n\n        /**\n         * Opens control, sets input value, and updates results.\n         */\n        // abstract\n        externalSearch: function (term) {\n            this.open();\n            this.search.val(term);\n            this.updateResults(false);\n        },\n\n        // abstract\n        clearSearch: function () {\n\n        },\n\n        //abstract\n        getMaximumSelectionSize: function() {\n            return evaluate(this.opts.maximumSelectionSize, this.opts.element);\n        },\n\n        // abstract\n        ensureHighlightVisible: function () {\n            var results = this.results, children, index, child, hb, rb, y, more, topOffset;\n\n            index = this.highlight();\n\n            if (index < 0) return;\n\n            if (index == 0) {\n\n                // if the first element is highlighted scroll all the way to the top,\n                // that way any unselectable headers above it will also be scrolled\n                // into view\n\n                results.scrollTop(0);\n                return;\n            }\n\n            children = this.findHighlightableChoices().find('.select2-result-label');\n\n            child = $(children[index]);\n\n            topOffset = (child.offset() || {}).top || 0;\n\n            hb = topOffset + child.outerHeight(true);\n\n            // if this is the last child lets also make sure select2-more-results is visible\n            if (index === children.length - 1) {\n                more = results.find(\"li.select2-more-results\");\n                if (more.length > 0) {\n                    hb = more.offset().top + more.outerHeight(true);\n                }\n            }\n\n            rb = results.offset().top + results.outerHeight(false);\n            if (hb > rb) {\n                results.scrollTop(results.scrollTop() + (hb - rb));\n            }\n            y = topOffset - results.offset().top;\n\n            // make sure the top of the element is visible\n            if (y < 0 && child.css('display') != 'none' ) {\n                results.scrollTop(results.scrollTop() + y); // y is negative\n            }\n        },\n\n        // abstract\n        findHighlightableChoices: function() {\n            return this.results.find(\".select2-result-selectable:not(.select2-disabled):not(.select2-selected)\");\n        },\n\n        // abstract\n        moveHighlight: function (delta) {\n            var choices = this.findHighlightableChoices(),\n                index = this.highlight();\n\n            while (index > -1 && index < choices.length) {\n                index += delta;\n                var choice = $(choices[index]);\n                if (choice.hasClass(\"select2-result-selectable\") && !choice.hasClass(\"select2-disabled\") && !choice.hasClass(\"select2-selected\")) {\n                    this.highlight(index);\n                    break;\n                }\n            }\n        },\n\n        // abstract\n        highlight: function (index) {\n            var choices = this.findHighlightableChoices(),\n                choice,\n                data;\n\n            if (arguments.length === 0) {\n                return indexOf(choices.filter(\".select2-highlighted\")[0], choices.get());\n            }\n\n            if (index >= choices.length) index = choices.length - 1;\n            if (index < 0) index = 0;\n\n            this.removeHighlight();\n\n            choice = $(choices[index]);\n            choice.addClass(\"select2-highlighted\");\n\n            // ensure assistive technology can determine the active choice\n            this.search.attr(\"aria-activedescendant\", choice.find(\".select2-result-label\").attr(\"id\"));\n\n            this.ensureHighlightVisible();\n\n            this.liveRegion.text(choice.text());\n\n            data = choice.data(\"select2-data\");\n            if (data) {\n                this.opts.element.trigger({ type: \"select2-highlight\", val: this.id(data), choice: data });\n            }\n        },\n\n        removeHighlight: function() {\n            this.results.find(\".select2-highlighted\").removeClass(\"select2-highlighted\");\n        },\n\n        touchMoved: function() {\n            this._touchMoved = true;\n        },\n\n        clearTouchMoved: function() {\n          this._touchMoved = false;\n        },\n\n        // abstract\n        countSelectableResults: function() {\n            return this.findHighlightableChoices().length;\n        },\n\n        // abstract\n        highlightUnderEvent: function (event) {\n            var el = $(event.target).closest(\".select2-result-selectable\");\n            if (el.length > 0 && !el.is(\".select2-highlighted\")) {\n                var choices = this.findHighlightableChoices();\n                this.highlight(choices.index(el));\n            } else if (el.length == 0) {\n                // if we are over an unselectable item remove all highlights\n                this.removeHighlight();\n            }\n        },\n\n        // abstract\n        loadMoreIfNeeded: function () {\n            var results = this.results,\n                more = results.find(\"li.select2-more-results\"),\n                below, // pixels the element is below the scroll fold, below==0 is when the element is starting to be visible\n                page = this.resultsPage + 1,\n                self=this,\n                term=this.search.val(),\n                context=this.context;\n\n            if (more.length === 0) return;\n            below = more.offset().top - results.offset().top - results.height();\n\n            if (below <= this.opts.loadMorePadding) {\n                more.addClass(\"select2-active\");\n                this.opts.query({\n                        element: this.opts.element,\n                        term: term,\n                        page: page,\n                        context: context,\n                        matcher: this.opts.matcher,\n                        callback: this.bind(function (data) {\n\n                    // ignore a response if the select2 has been closed before it was received\n                    if (!self.opened()) return;\n\n\n                    self.opts.populateResults.call(this, results, data.results, {term: term, page: page, context:context});\n                    self.postprocessResults(data, false, false);\n\n                    if (data.more===true) {\n                        more.detach().appendTo(results).html(self.opts.escapeMarkup(evaluate(self.opts.formatLoadMore, self.opts.element, page+1)));\n                        window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);\n                    } else {\n                        more.remove();\n                    }\n                    self.positionDropdown();\n                    self.resultsPage = page;\n                    self.context = data.context;\n                    this.opts.element.trigger({ type: \"select2-loaded\", items: data });\n                })});\n            }\n        },\n\n        /**\n         * Default tokenizer function which does nothing\n         */\n        tokenize: function() {\n\n        },\n\n        /**\n         * @param initial whether or not this is the call to this method right after the dropdown has been opened\n         */\n        // abstract\n        updateResults: function (initial) {\n            var search = this.search,\n                results = this.results,\n                opts = this.opts,\n                data,\n                self = this,\n                input,\n                term = search.val(),\n                lastTerm = $.data(this.container, \"select2-last-term\"),\n                // sequence number used to drop out-of-order responses\n                queryNumber;\n\n            // prevent duplicate queries against the same term\n            if (initial !== true && lastTerm && equal(term, lastTerm)) return;\n\n            $.data(this.container, \"select2-last-term\", term);\n\n            // if the search is currently hidden we do not alter the results\n            if (initial !== true && (this.showSearchInput === false || !this.opened())) {\n                return;\n            }\n\n            function postRender() {\n                search.removeClass(\"select2-active\");\n                self.positionDropdown();\n                if (results.find('.select2-no-results,.select2-selection-limit,.select2-searching').length) {\n                    self.liveRegion.text(results.text());\n                }\n                else {\n                    self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable:not(\".select2-selected\")').length));\n                }\n            }\n\n            function render(html) {\n                results.html(html);\n                postRender();\n            }\n\n            queryNumber = ++this.queryCount;\n\n            var maxSelSize = this.getMaximumSelectionSize();\n            if (maxSelSize >=1) {\n                data = this.data();\n                if ($.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, \"formatSelectionTooBig\")) {\n                    render(\"<li class='select2-selection-limit'>\" + evaluate(opts.formatSelectionTooBig, opts.element, maxSelSize) + \"</li>\");\n                    return;\n                }\n            }\n\n            if (search.val().length < opts.minimumInputLength) {\n                if (checkFormatter(opts.formatInputTooShort, \"formatInputTooShort\")) {\n                    render(\"<li class='select2-no-results'>\" + evaluate(opts.formatInputTooShort, opts.element, search.val(), opts.minimumInputLength) + \"</li>\");\n                } else {\n                    render(\"\");\n                }\n                if (initial && this.showSearch) this.showSearch(true);\n                return;\n            }\n\n            if (opts.maximumInputLength && search.val().length > opts.maximumInputLength) {\n                if (checkFormatter(opts.formatInputTooLong, \"formatInputTooLong\")) {\n                    render(\"<li class='select2-no-results'>\" + evaluate(opts.formatInputTooLong, opts.element, search.val(), opts.maximumInputLength) + \"</li>\");\n                } else {\n                    render(\"\");\n                }\n                return;\n            }\n\n            if (opts.formatSearching && this.findHighlightableChoices().length === 0) {\n                render(\"<li class='select2-searching'>\" + evaluate(opts.formatSearching, opts.element) + \"</li>\");\n            }\n\n            search.addClass(\"select2-active\");\n\n            this.removeHighlight();\n\n            // give the tokenizer a chance to pre-process the input\n            input = this.tokenize();\n            if (input != undefined && input != null) {\n                search.val(input);\n            }\n\n            this.resultsPage = 1;\n\n            opts.query({\n                element: opts.element,\n                    term: search.val(),\n                    page: this.resultsPage,\n                    context: null,\n                    matcher: opts.matcher,\n                    callback: this.bind(function (data) {\n                var def; // default choice\n\n                // ignore old responses\n                if (queryNumber != this.queryCount) {\n                  return;\n                }\n\n                // ignore a response if the select2 has been closed before it was received\n                if (!this.opened()) {\n                    this.search.removeClass(\"select2-active\");\n                    return;\n                }\n\n                // handle ajax error\n                if(data.hasError !== undefined && checkFormatter(opts.formatAjaxError, \"formatAjaxError\")) {\n                    render(\"<li class='select2-ajax-error'>\" + evaluate(opts.formatAjaxError, opts.element, data.jqXHR, data.textStatus, data.errorThrown) + \"</li>\");\n                    return;\n                }\n\n                // save context, if any\n                this.context = (data.context===undefined) ? null : data.context;\n                // create a default choice and prepend it to the list\n                if (this.opts.createSearchChoice && search.val() !== \"\") {\n                    def = this.opts.createSearchChoice.call(self, search.val(), data.results);\n                    if (def !== undefined && def !== null && self.id(def) !== undefined && self.id(def) !== null) {\n                        if ($(data.results).filter(\n                            function () {\n                                return equal(self.id(this), self.id(def));\n                            }).length === 0) {\n                            this.opts.createSearchChoicePosition(data.results, def);\n                        }\n                    }\n                }\n\n                if (data.results.length === 0 && checkFormatter(opts.formatNoMatches, \"formatNoMatches\")) {\n                    render(\"<li class='select2-no-results'>\" + evaluate(opts.formatNoMatches, opts.element, search.val()) + \"</li>\");\n                    return;\n                }\n\n                results.empty();\n                self.opts.populateResults.call(this, results, data.results, {term: search.val(), page: this.resultsPage, context:null});\n\n                if (data.more === true && checkFormatter(opts.formatLoadMore, \"formatLoadMore\")) {\n                    results.append(\"<li class='select2-more-results'>\" + opts.escapeMarkup(evaluate(opts.formatLoadMore, opts.element, this.resultsPage)) + \"</li>\");\n                    window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);\n                }\n\n                this.postprocessResults(data, initial);\n\n                postRender();\n\n                this.opts.element.trigger({ type: \"select2-loaded\", items: data });\n            })});\n        },\n\n        // abstract\n        cancel: function () {\n            this.close();\n        },\n\n        // abstract\n        blur: function () {\n            // if selectOnBlur == true, select the currently highlighted option\n            if (this.opts.selectOnBlur)\n                this.selectHighlighted({noFocus: true});\n\n            this.close();\n            this.container.removeClass(\"select2-container-active\");\n            // synonymous to .is(':focus'), which is available in jquery >= 1.6\n            if (this.search[0] === document.activeElement) { this.search.blur(); }\n            this.clearSearch();\n            this.selection.find(\".select2-search-choice-focus\").removeClass(\"select2-search-choice-focus\");\n        },\n\n        // abstract\n        focusSearch: function () {\n            focus(this.search);\n        },\n\n        // abstract\n        selectHighlighted: function (options) {\n            if (this._touchMoved) {\n              this.clearTouchMoved();\n              return;\n            }\n            var index=this.highlight(),\n                highlighted=this.results.find(\".select2-highlighted\"),\n                data = highlighted.closest('.select2-result').data(\"select2-data\");\n\n            if (data) {\n                this.highlight(index);\n                this.onSelect(data, options);\n            } else if (options && options.noFocus) {\n                this.close();\n            }\n        },\n\n        // abstract\n        getPlaceholder: function () {\n            var placeholderOption;\n            return this.opts.element.attr(\"placeholder\") ||\n                this.opts.element.attr(\"data-placeholder\") || // jquery 1.4 compat\n                this.opts.element.data(\"placeholder\") ||\n                this.opts.placeholder ||\n                ((placeholderOption = this.getPlaceholderOption()) !== undefined ? placeholderOption.text() : undefined);\n        },\n\n        // abstract\n        getPlaceholderOption: function() {\n            if (this.select) {\n                var firstOption = this.select.children('option').first();\n                if (this.opts.placeholderOption !== undefined ) {\n                    //Determine the placeholder option based on the specified placeholderOption setting\n                    return (this.opts.placeholderOption === \"first\" && firstOption) ||\n                           (typeof this.opts.placeholderOption === \"function\" && this.opts.placeholderOption(this.select));\n                } else if ($.trim(firstOption.text()) === \"\" && firstOption.val() === \"\") {\n                    //No explicit placeholder option specified, use the first if it's blank\n                    return firstOption;\n                }\n            }\n        },\n\n        /**\n         * Get the desired width for the container element.  This is\n         * derived first from option `width` passed to select2, then\n         * the inline 'style' on the original element, and finally\n         * falls back to the jQuery calculated element width.\n         */\n        // abstract\n        initContainerWidth: function () {\n            function resolveContainerWidth() {\n                var style, attrs, matches, i, l, attr;\n\n                if (this.opts.width === \"off\") {\n                    return null;\n                } else if (this.opts.width === \"element\"){\n                    return this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px';\n                } else if (this.opts.width === \"copy\" || this.opts.width === \"resolve\") {\n                    // check if there is inline style on the element that contains width\n                    style = this.opts.element.attr('style');\n                    if (style !== undefined) {\n                        attrs = style.split(';');\n                        for (i = 0, l = attrs.length; i < l; i = i + 1) {\n                            attr = attrs[i].replace(/\\s/g, '');\n                            matches = attr.match(/^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);\n                            if (matches !== null && matches.length >= 1)\n                                return matches[1];\n                        }\n                    }\n\n                    if (this.opts.width === \"resolve\") {\n                        // next check if css('width') can resolve a width that is percent based, this is sometimes possible\n                        // when attached to input type=hidden or elements hidden via css\n                        style = this.opts.element.css('width');\n                        if (style.indexOf(\"%\") > 0) return style;\n\n                        // finally, fallback on the calculated width of the element\n                        return (this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px');\n                    }\n\n                    return null;\n                } else if ($.isFunction(this.opts.width)) {\n                    return this.opts.width();\n                } else {\n                    return this.opts.width;\n               }\n            };\n\n            var width = resolveContainerWidth.call(this);\n            if (width !== null) {\n                this.container.css(\"width\", width);\n            }\n        }\n    });\n\n    SingleSelect2 = clazz(AbstractSelect2, {\n\n        // single\n\n        createContainer: function () {\n            var container = $(document.createElement(\"div\")).attr({\n                \"class\": \"select2-container\"\n            }).html([\n                \"<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>\",\n                \"   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>\",\n                \"   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>\",\n                \"</a>\",\n                \"<label for='' class='select2-offscreen'></label>\",\n                \"<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />\",\n                \"<div class='select2-drop select2-display-none'>\",\n                \"   <div class='select2-search'>\",\n                \"       <label for='' class='select2-offscreen'></label>\",\n                \"       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'\",\n                \"       aria-autocomplete='list' />\",\n                \"   </div>\",\n                \"   <ul class='select2-results' role='listbox'>\",\n                \"   </ul>\",\n                \"</div>\"].join(\"\"));\n            return container;\n        },\n\n        // single\n        enableInterface: function() {\n            if (this.parent.enableInterface.apply(this, arguments)) {\n                this.focusser.prop(\"disabled\", !this.isInterfaceEnabled());\n            }\n        },\n\n        // single\n        opening: function () {\n            var el, range, len;\n\n            if (this.opts.minimumResultsForSearch >= 0) {\n                this.showSearch(true);\n            }\n\n            this.parent.opening.apply(this, arguments);\n\n            if (this.showSearchInput !== false) {\n                // IE appends focusser.val() at the end of field :/ so we manually insert it at the beginning using a range\n                // all other browsers handle this just fine\n\n                this.search.val(this.focusser.val());\n            }\n            if (this.opts.shouldFocusInput(this)) {\n                this.search.focus();\n                // move the cursor to the end after focussing, otherwise it will be at the beginning and\n                // new text will appear *before* focusser.val()\n                el = this.search.get(0);\n                if (el.createTextRange) {\n                    range = el.createTextRange();\n                    range.collapse(false);\n                    range.select();\n                } else if (el.setSelectionRange) {\n                    len = this.search.val().length;\n                    el.setSelectionRange(len, len);\n                }\n            }\n\n            // initializes search's value with nextSearchTerm (if defined by user)\n            // ignore nextSearchTerm if the dropdown is opened by the user pressing a letter\n            if(this.search.val() === \"\") {\n                if(this.nextSearchTerm != undefined){\n                    this.search.val(this.nextSearchTerm);\n                    this.search.select();\n                }\n            }\n\n            this.focusser.prop(\"disabled\", true).val(\"\");\n            this.updateResults(true);\n            this.opts.element.trigger($.Event(\"select2-open\"));\n        },\n\n        // single\n        close: function () {\n            if (!this.opened()) return;\n            this.parent.close.apply(this, arguments);\n\n            this.focusser.prop(\"disabled\", false);\n\n            if (this.opts.shouldFocusInput(this)) {\n                this.focusser.focus();\n            }\n        },\n\n        // single\n        focus: function () {\n            if (this.opened()) {\n                this.close();\n            } else {\n                this.focusser.prop(\"disabled\", false);\n                if (this.opts.shouldFocusInput(this)) {\n                    this.focusser.focus();\n                }\n            }\n        },\n\n        // single\n        isFocused: function () {\n            return this.container.hasClass(\"select2-container-active\");\n        },\n\n        // single\n        cancel: function () {\n            this.parent.cancel.apply(this, arguments);\n            this.focusser.prop(\"disabled\", false);\n\n            if (this.opts.shouldFocusInput(this)) {\n                this.focusser.focus();\n            }\n        },\n\n        // single\n        destroy: function() {\n            $(\"label[for='\" + this.focusser.attr('id') + \"']\")\n                .attr('for', this.opts.element.attr(\"id\"));\n            this.parent.destroy.apply(this, arguments);\n\n            cleanupJQueryElements.call(this,\n                \"selection\",\n                \"focusser\"\n            );\n        },\n\n        // single\n        initContainer: function () {\n\n            var selection,\n                container = this.container,\n                dropdown = this.dropdown,\n                idSuffix = nextUid(),\n                elementLabel;\n\n            if (this.opts.minimumResultsForSearch < 0) {\n                this.showSearch(false);\n            } else {\n                this.showSearch(true);\n            }\n\n            this.selection = selection = container.find(\".select2-choice\");\n\n            this.focusser = container.find(\".select2-focusser\");\n\n            // add aria associations\n            selection.find(\".select2-chosen\").attr(\"id\", \"select2-chosen-\"+idSuffix);\n            this.focusser.attr(\"aria-labelledby\", \"select2-chosen-\"+idSuffix);\n            this.results.attr(\"id\", \"select2-results-\"+idSuffix);\n            this.search.attr(\"aria-owns\", \"select2-results-\"+idSuffix);\n\n            // rewrite labels from original element to focusser\n            this.focusser.attr(\"id\", \"s2id_autogen\"+idSuffix);\n\n            elementLabel = $(\"label[for='\" + this.opts.element.attr(\"id\") + \"']\");\n            this.opts.element.focus(this.bind(function () { this.focus(); }));\n\n            this.focusser.prev()\n                .text(elementLabel.text())\n                .attr('for', this.focusser.attr('id'));\n\n            // Ensure the original element retains an accessible name\n            var originalTitle = this.opts.element.attr(\"title\");\n            this.opts.element.attr(\"title\", (originalTitle || elementLabel.text()));\n\n            this.focusser.attr(\"tabindex\", this.elementTabIndex);\n\n            // write label for search field using the label from the focusser element\n            this.search.attr(\"id\", this.focusser.attr('id') + '_search');\n\n            this.search.prev()\n                .text($(\"label[for='\" + this.focusser.attr('id') + \"']\").text())\n                .attr('for', this.search.attr('id'));\n\n            this.search.on(\"keydown\", this.bind(function (e) {\n                if (!this.isInterfaceEnabled()) return;\n\n                // filter 229 keyCodes (input method editor is processing key input)\n                if (229 == e.keyCode) return;\n\n                if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {\n                    // prevent the page from scrolling\n                    killEvent(e);\n                    return;\n                }\n\n                switch (e.which) {\n                    case KEY.UP:\n                    case KEY.DOWN:\n                        this.moveHighlight((e.which === KEY.UP) ? -1 : 1);\n                        killEvent(e);\n                        return;\n                    case KEY.ENTER:\n                        this.selectHighlighted();\n                        killEvent(e);\n                        return;\n                    case KEY.TAB:\n                        this.selectHighlighted({noFocus: true});\n                        return;\n                    case KEY.ESC:\n                        this.cancel(e);\n                        killEvent(e);\n                        return;\n                }\n            }));\n\n            this.search.on(\"blur\", this.bind(function(e) {\n                // a workaround for chrome to keep the search field focussed when the scroll bar is used to scroll the dropdown.\n                // without this the search field loses focus which is annoying\n                if (document.activeElement === this.body.get(0)) {\n                    window.setTimeout(this.bind(function() {\n                        if (this.opened()) {\n                            this.search.focus();\n                        }\n                    }), 0);\n                }\n            }));\n\n            this.focusser.on(\"keydown\", this.bind(function (e) {\n                if (!this.isInterfaceEnabled()) return;\n\n                if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) {\n                    return;\n                }\n\n                if (this.opts.openOnEnter === false && e.which === KEY.ENTER) {\n                    killEvent(e);\n                    return;\n                }\n\n                if (e.which == KEY.DOWN || e.which == KEY.UP\n                    || (e.which == KEY.ENTER && this.opts.openOnEnter)) {\n\n                    if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) return;\n\n                    this.open();\n                    killEvent(e);\n                    return;\n                }\n\n                if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {\n                    if (this.opts.allowClear) {\n                        this.clear();\n                    }\n                    killEvent(e);\n                    return;\n                }\n            }));\n\n\n            installKeyUpChangeEvent(this.focusser);\n            this.focusser.on(\"keyup-change input\", this.bind(function(e) {\n                if (this.opts.minimumResultsForSearch >= 0) {\n                    e.stopPropagation();\n                    if (this.opened()) return;\n                    this.open();\n                }\n            }));\n\n            selection.on(\"mousedown touchstart\", \"abbr\", this.bind(function (e) {\n                if (!this.isInterfaceEnabled()) {\n                    return;\n                }\n\n                this.clear();\n                killEventImmediately(e);\n                this.close();\n\n                if (this.selection) {\n                    this.selection.focus();\n                }\n            }));\n\n            selection.on(\"mousedown touchstart\", this.bind(function (e) {\n                // Prevent IE from generating a click event on the body\n                reinsertElement(selection);\n\n                if (!this.container.hasClass(\"select2-container-active\")) {\n                    this.opts.element.trigger($.Event(\"select2-focus\"));\n                }\n\n                if (this.opened()) {\n                    this.close();\n                } else if (this.isInterfaceEnabled()) {\n                    this.open();\n                }\n\n                killEvent(e);\n            }));\n\n            dropdown.on(\"mousedown touchstart\", this.bind(function() {\n                if (this.opts.shouldFocusInput(this)) {\n                    this.search.focus();\n                }\n            }));\n\n            selection.on(\"focus\", this.bind(function(e) {\n                killEvent(e);\n            }));\n\n            this.focusser.on(\"focus\", this.bind(function(){\n                if (!this.container.hasClass(\"select2-container-active\")) {\n                    this.opts.element.trigger($.Event(\"select2-focus\"));\n                }\n                this.container.addClass(\"select2-container-active\");\n            })).on(\"blur\", this.bind(function() {\n                if (!this.opened()) {\n                    this.container.removeClass(\"select2-container-active\");\n                    this.opts.element.trigger($.Event(\"select2-blur\"));\n                }\n            }));\n            this.search.on(\"focus\", this.bind(function(){\n                if (!this.container.hasClass(\"select2-container-active\")) {\n                    this.opts.element.trigger($.Event(\"select2-focus\"));\n                }\n                this.container.addClass(\"select2-container-active\");\n            }));\n\n            this.initContainerWidth();\n            this.opts.element.hide();\n            this.setPlaceholder();\n\n        },\n\n        // single\n        clear: function(triggerChange) {\n            var data=this.selection.data(\"select2-data\");\n            if (data) { // guard against queued quick consecutive clicks\n                var evt = $.Event(\"select2-clearing\");\n                this.opts.element.trigger(evt);\n                if (evt.isDefaultPrevented()) {\n                    return;\n                }\n                var placeholderOption = this.getPlaceholderOption();\n                this.opts.element.val(placeholderOption ? placeholderOption.val() : \"\");\n                this.selection.find(\".select2-chosen\").empty();\n                this.selection.removeData(\"select2-data\");\n                this.setPlaceholder();\n\n                if (triggerChange !== false){\n                    this.opts.element.trigger({ type: \"select2-removed\", val: this.id(data), choice: data });\n                    this.triggerChange({removed:data});\n                }\n            }\n        },\n\n        /**\n         * Sets selection based on source element's value\n         */\n        // single\n        initSelection: function () {\n            var selected;\n            if (this.isPlaceholderOptionSelected()) {\n                this.updateSelection(null);\n                this.close();\n                this.setPlaceholder();\n            } else {\n                var self = this;\n                this.opts.initSelection.call(null, this.opts.element, function(selected){\n                    if (selected !== undefined && selected !== null) {\n                        self.updateSelection(selected);\n                        self.close();\n                        self.setPlaceholder();\n                        self.nextSearchTerm = self.opts.nextSearchTerm(selected, self.search.val());\n                    }\n                });\n            }\n        },\n\n        isPlaceholderOptionSelected: function() {\n            var placeholderOption;\n            if (this.getPlaceholder() === undefined) return false; // no placeholder specified so no option should be considered\n            return ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.prop(\"selected\"))\n                || (this.opts.element.val() === \"\")\n                || (this.opts.element.val() === undefined)\n                || (this.opts.element.val() === null);\n        },\n\n        // single\n        prepareOpts: function () {\n            var opts = this.parent.prepareOpts.apply(this, arguments),\n                self=this;\n\n            if (opts.element.get(0).tagName.toLowerCase() === \"select\") {\n                // install the selection initializer\n                opts.initSelection = function (element, callback) {\n                    var selected = element.find(\"option\").filter(function() { return this.selected && !this.disabled });\n                    // a single select box always has a value, no need to null check 'selected'\n                    callback(self.optionToData(selected));\n                };\n            } else if (\"data\" in opts) {\n                // install default initSelection when applied to hidden input and data is local\n                opts.initSelection = opts.initSelection || function (element, callback) {\n                    var id = element.val();\n                    //search in data by id, storing the actual matching item\n                    var match = null;\n                    opts.query({\n                        matcher: function(term, text, el){\n                            var is_match = equal(id, opts.id(el));\n                            if (is_match) {\n                                match = el;\n                            }\n                            return is_match;\n                        },\n                        callback: !$.isFunction(callback) ? $.noop : function() {\n                            callback(match);\n                        }\n                    });\n                };\n            }\n\n            return opts;\n        },\n\n        // single\n        getPlaceholder: function() {\n            // if a placeholder is specified on a single select without a valid placeholder option ignore it\n            if (this.select) {\n                if (this.getPlaceholderOption() === undefined) {\n                    return undefined;\n                }\n            }\n\n            return this.parent.getPlaceholder.apply(this, arguments);\n        },\n\n        // single\n        setPlaceholder: function () {\n            var placeholder = this.getPlaceholder();\n\n            if (this.isPlaceholderOptionSelected() && placeholder !== undefined) {\n\n                // check for a placeholder option if attached to a select\n                if (this.select && this.getPlaceholderOption() === undefined) return;\n\n                this.selection.find(\".select2-chosen\").html(this.opts.escapeMarkup(placeholder));\n\n                this.selection.addClass(\"select2-default\");\n\n                this.container.removeClass(\"select2-allowclear\");\n            }\n        },\n\n        // single\n        postprocessResults: function (data, initial, noHighlightUpdate) {\n            var selected = 0, self = this, showSearchInput = true;\n\n            // find the selected element in the result list\n\n            this.findHighlightableChoices().each2(function (i, elm) {\n                if (equal(self.id(elm.data(\"select2-data\")), self.opts.element.val())) {\n                    selected = i;\n                    return false;\n                }\n            });\n\n            // and highlight it\n            if (noHighlightUpdate !== false) {\n                if (initial === true && selected >= 0) {\n                    this.highlight(selected);\n                } else {\n                    this.highlight(0);\n                }\n            }\n\n            // hide the search box if this is the first we got the results and there are enough of them for search\n\n            if (initial === true) {\n                var min = this.opts.minimumResultsForSearch;\n                if (min >= 0) {\n                    this.showSearch(countResults(data.results) >= min);\n                }\n            }\n        },\n\n        // single\n        showSearch: function(showSearchInput) {\n            if (this.showSearchInput === showSearchInput) return;\n\n            this.showSearchInput = showSearchInput;\n\n            this.dropdown.find(\".select2-search\").toggleClass(\"select2-search-hidden\", !showSearchInput);\n            this.dropdown.find(\".select2-search\").toggleClass(\"select2-offscreen\", !showSearchInput);\n            //add \"select2-with-searchbox\" to the container if search box is shown\n            $(this.dropdown, this.container).toggleClass(\"select2-with-searchbox\", showSearchInput);\n        },\n\n        // single\n        onSelect: function (data, options) {\n\n            if (!this.triggerSelect(data)) { return; }\n\n            var old = this.opts.element.val(),\n                oldData = this.data();\n\n            this.opts.element.val(this.id(data));\n            this.updateSelection(data);\n\n            this.opts.element.trigger({ type: \"select2-selected\", val: this.id(data), choice: data });\n\n            this.nextSearchTerm = this.opts.nextSearchTerm(data, this.search.val());\n            this.close();\n\n            if ((!options || !options.noFocus) && this.opts.shouldFocusInput(this)) {\n                this.focusser.focus();\n            }\n\n            if (!equal(old, this.id(data))) {\n                this.triggerChange({ added: data, removed: oldData });\n            }\n        },\n\n        // single\n        updateSelection: function (data) {\n\n            var container=this.selection.find(\".select2-chosen\"), formatted, cssClass;\n\n            this.selection.data(\"select2-data\", data);\n\n            container.empty();\n            if (data !== null) {\n                formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);\n            }\n            if (formatted !== undefined) {\n                container.append(formatted);\n            }\n            cssClass=this.opts.formatSelectionCssClass(data, container);\n            if (cssClass !== undefined) {\n                container.addClass(cssClass);\n            }\n\n            this.selection.removeClass(\"select2-default\");\n\n            if (this.opts.allowClear && this.getPlaceholder() !== undefined) {\n                this.container.addClass(\"select2-allowclear\");\n            }\n        },\n\n        // single\n        val: function () {\n            var val,\n                triggerChange = false,\n                data = null,\n                self = this,\n                oldData = this.data();\n\n            if (arguments.length === 0) {\n                return this.opts.element.val();\n            }\n\n            val = arguments[0];\n\n            if (arguments.length > 1) {\n                triggerChange = arguments[1];\n            }\n\n            if (this.select) {\n                this.select\n                    .val(val)\n                    .find(\"option\").filter(function() { return this.selected }).each2(function (i, elm) {\n                        data = self.optionToData(elm);\n                        return false;\n                    });\n                this.updateSelection(data);\n                this.setPlaceholder();\n                if (triggerChange) {\n                    this.triggerChange({added: data, removed:oldData});\n                }\n            } else {\n                // val is an id. !val is true for [undefined,null,'',0] - 0 is legal\n                if (!val && val !== 0) {\n                    this.clear(triggerChange);\n                    return;\n                }\n                if (this.opts.initSelection === undefined) {\n                    throw new Error(\"cannot call val() if initSelection() is not defined\");\n                }\n                this.opts.element.val(val);\n                this.opts.initSelection(this.opts.element, function(data){\n                    self.opts.element.val(!data ? \"\" : self.id(data));\n                    self.updateSelection(data);\n                    self.setPlaceholder();\n                    if (triggerChange) {\n                        self.triggerChange({added: data, removed:oldData});\n                    }\n                });\n            }\n        },\n\n        // single\n        clearSearch: function () {\n            this.search.val(\"\");\n            this.focusser.val(\"\");\n        },\n\n        // single\n        data: function(value) {\n            var data,\n                triggerChange = false;\n\n            if (arguments.length === 0) {\n                data = this.selection.data(\"select2-data\");\n                if (data == undefined) data = null;\n                return data;\n            } else {\n                if (arguments.length > 1) {\n                    triggerChange = arguments[1];\n                }\n                if (!value) {\n                    this.clear(triggerChange);\n                } else {\n                    data = this.data();\n                    this.opts.element.val(!value ? \"\" : this.id(value));\n                    this.updateSelection(value);\n                    if (triggerChange) {\n                        this.triggerChange({added: value, removed:data});\n                    }\n                }\n            }\n        }\n    });\n\n    MultiSelect2 = clazz(AbstractSelect2, {\n\n        // multi\n        createContainer: function () {\n            var container = $(document.createElement(\"div\")).attr({\n                \"class\": \"select2-container select2-container-multi\"\n            }).html([\n                \"<ul class='select2-choices'>\",\n                \"  <li class='select2-search-field'>\",\n                \"    <label for='' class='select2-offscreen'></label>\",\n                \"    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>\",\n                \"  </li>\",\n                \"</ul>\",\n                \"<div class='select2-drop select2-drop-multi select2-display-none'>\",\n                \"   <ul class='select2-results'>\",\n                \"   </ul>\",\n                \"</div>\"].join(\"\"));\n            return container;\n        },\n\n        // multi\n        prepareOpts: function () {\n            var opts = this.parent.prepareOpts.apply(this, arguments),\n                self=this;\n\n            // TODO validate placeholder is a string if specified\n            if (opts.element.get(0).tagName.toLowerCase() === \"select\") {\n                // install the selection initializer\n                opts.initSelection = function (element, callback) {\n\n                    var data = [];\n\n                    element.find(\"option\").filter(function() { return this.selected && !this.disabled }).each2(function (i, elm) {\n                        data.push(self.optionToData(elm));\n                    });\n                    callback(data);\n                };\n            } else if (\"data\" in opts) {\n                // install default initSelection when applied to hidden input and data is local\n                opts.initSelection = opts.initSelection || function (element, callback) {\n                    var ids = splitVal(element.val(), opts.separator, opts.transformVal);\n                    //search in data by array of ids, storing matching items in a list\n                    var matches = [];\n                    opts.query({\n                        matcher: function(term, text, el){\n                            var is_match = $.grep(ids, function(id) {\n                                return equal(id, opts.id(el));\n                            }).length;\n                            if (is_match) {\n                                matches.push(el);\n                            }\n                            return is_match;\n                        },\n                        callback: !$.isFunction(callback) ? $.noop : function() {\n                            // reorder matches based on the order they appear in the ids array because right now\n                            // they are in the order in which they appear in data array\n                            var ordered = [];\n                            for (var i = 0; i < ids.length; i++) {\n                                var id = ids[i];\n                                for (var j = 0; j < matches.length; j++) {\n                                    var match = matches[j];\n                                    if (equal(id, opts.id(match))) {\n                                        ordered.push(match);\n                                        matches.splice(j, 1);\n                                        break;\n                                    }\n                                }\n                            }\n                            callback(ordered);\n                        }\n                    });\n                };\n            }\n\n            return opts;\n        },\n\n        // multi\n        selectChoice: function (choice) {\n\n            var selected = this.container.find(\".select2-search-choice-focus\");\n            if (selected.length && choice && choice[0] == selected[0]) {\n\n            } else {\n                if (selected.length) {\n                    this.opts.element.trigger(\"choice-deselected\", selected);\n                }\n                selected.removeClass(\"select2-search-choice-focus\");\n                if (choice && choice.length) {\n                    this.close();\n                    choice.addClass(\"select2-search-choice-focus\");\n                    this.opts.element.trigger(\"choice-selected\", choice);\n                }\n            }\n        },\n\n        // multi\n        destroy: function() {\n            $(\"label[for='\" + this.search.attr('id') + \"']\")\n                .attr('for', this.opts.element.attr(\"id\"));\n            this.parent.destroy.apply(this, arguments);\n\n            cleanupJQueryElements.call(this,\n                \"searchContainer\",\n                \"selection\"\n            );\n        },\n\n        // multi\n        initContainer: function () {\n\n            var selector = \".select2-choices\", selection;\n\n            this.searchContainer = this.container.find(\".select2-search-field\");\n            this.selection = selection = this.container.find(selector);\n\n            var _this = this;\n            this.selection.on(\"click\", \".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)\", function (e) {\n                _this.search[0].focus();\n                _this.selectChoice($(this));\n            });\n\n            // rewrite labels from original element to focusser\n            this.search.attr(\"id\", \"s2id_autogen\"+nextUid());\n\n            this.search.prev()\n                .text($(\"label[for='\" + this.opts.element.attr(\"id\") + \"']\").text())\n                .attr('for', this.search.attr('id'));\n            this.opts.element.focus(this.bind(function () { this.focus(); }));\n\n            this.search.on(\"input paste\", this.bind(function() {\n                if (this.search.attr('placeholder') && this.search.val().length == 0) return;\n                if (!this.isInterfaceEnabled()) return;\n                if (!this.opened()) {\n                    this.open();\n                }\n            }));\n\n            this.search.attr(\"tabindex\", this.elementTabIndex);\n\n            this.keydowns = 0;\n            this.search.on(\"keydown\", this.bind(function (e) {\n                if (!this.isInterfaceEnabled()) return;\n\n                ++this.keydowns;\n                var selected = selection.find(\".select2-search-choice-focus\");\n                var prev = selected.prev(\".select2-search-choice:not(.select2-locked)\");\n                var next = selected.next(\".select2-search-choice:not(.select2-locked)\");\n                var pos = getCursorInfo(this.search);\n\n                if (selected.length &&\n                    (e.which == KEY.LEFT || e.which == KEY.RIGHT || e.which == KEY.BACKSPACE || e.which == KEY.DELETE || e.which == KEY.ENTER)) {\n                    var selectedChoice = selected;\n                    if (e.which == KEY.LEFT && prev.length) {\n                        selectedChoice = prev;\n                    }\n                    else if (e.which == KEY.RIGHT) {\n                        selectedChoice = next.length ? next : null;\n                    }\n                    else if (e.which === KEY.BACKSPACE) {\n                        if (this.unselect(selected.first())) {\n                            this.search.width(10);\n                            selectedChoice = prev.length ? prev : next;\n                        }\n                    } else if (e.which == KEY.DELETE) {\n                        if (this.unselect(selected.first())) {\n                            this.search.width(10);\n                            selectedChoice = next.length ? next : null;\n                        }\n                    } else if (e.which == KEY.ENTER) {\n                        selectedChoice = null;\n                    }\n\n                    this.selectChoice(selectedChoice);\n                    killEvent(e);\n                    if (!selectedChoice || !selectedChoice.length) {\n                        this.open();\n                    }\n                    return;\n                } else if (((e.which === KEY.BACKSPACE && this.keydowns == 1)\n                    || e.which == KEY.LEFT) && (pos.offset == 0 && !pos.length)) {\n\n                    this.selectChoice(selection.find(\".select2-search-choice:not(.select2-locked)\").last());\n                    killEvent(e);\n                    return;\n                } else {\n                    this.selectChoice(null);\n                }\n\n                if (this.opened()) {\n                    switch (e.which) {\n                    case KEY.UP:\n                    case KEY.DOWN:\n                        this.moveHighlight((e.which === KEY.UP) ? -1 : 1);\n                        killEvent(e);\n                        return;\n                    case KEY.ENTER:\n                        this.selectHighlighted();\n                        killEvent(e);\n                        return;\n                    case KEY.TAB:\n                        this.selectHighlighted({noFocus:true});\n                        this.close();\n                        return;\n                    case KEY.ESC:\n                        this.cancel(e);\n                        killEvent(e);\n                        return;\n                    }\n                }\n\n                if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e)\n                 || e.which === KEY.BACKSPACE || e.which === KEY.ESC) {\n                    return;\n                }\n\n                if (e.which === KEY.ENTER) {\n                    if (this.opts.openOnEnter === false) {\n                        return;\n                    } else if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {\n                        return;\n                    }\n                }\n\n                this.open();\n\n                if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {\n                    // prevent the page from scrolling\n                    killEvent(e);\n                }\n\n                if (e.which === KEY.ENTER) {\n                    // prevent form from being submitted\n                    killEvent(e);\n                }\n\n            }));\n\n            this.search.on(\"keyup\", this.bind(function (e) {\n                this.keydowns = 0;\n                this.resizeSearch();\n            })\n            );\n\n            this.search.on(\"blur\", this.bind(function(e) {\n                this.container.removeClass(\"select2-container-active\");\n                this.search.removeClass(\"select2-focused\");\n                this.selectChoice(null);\n                if (!this.opened()) this.clearSearch();\n                e.stopImmediatePropagation();\n                this.opts.element.trigger($.Event(\"select2-blur\"));\n            }));\n\n            this.container.on(\"click\", selector, this.bind(function (e) {\n                if (!this.isInterfaceEnabled()) return;\n                if ($(e.target).closest(\".select2-search-choice\").length > 0) {\n                    // clicked inside a select2 search choice, do not open\n                    return;\n                }\n                this.selectChoice(null);\n                this.clearPlaceholder();\n                if (!this.container.hasClass(\"select2-container-active\")) {\n                    this.opts.element.trigger($.Event(\"select2-focus\"));\n                }\n                this.open();\n                this.focusSearch();\n                e.preventDefault();\n            }));\n\n            this.container.on(\"focus\", selector, this.bind(function () {\n                if (!this.isInterfaceEnabled()) return;\n                if (!this.container.hasClass(\"select2-container-active\")) {\n                    this.opts.element.trigger($.Event(\"select2-focus\"));\n                }\n                this.container.addClass(\"select2-container-active\");\n                this.dropdown.addClass(\"select2-drop-active\");\n                this.clearPlaceholder();\n            }));\n\n            this.initContainerWidth();\n            this.opts.element.hide();\n\n            // set the placeholder if necessary\n            this.clearSearch();\n        },\n\n        // multi\n        enableInterface: function() {\n            if (this.parent.enableInterface.apply(this, arguments)) {\n                this.search.prop(\"disabled\", !this.isInterfaceEnabled());\n            }\n        },\n\n        // multi\n        initSelection: function () {\n            var data;\n            if (this.opts.element.val() === \"\" && this.opts.element.text() === \"\") {\n                this.updateSelection([]);\n                this.close();\n                // set the placeholder if necessary\n                this.clearSearch();\n            }\n            if (this.select || this.opts.element.val() !== \"\") {\n                var self = this;\n                this.opts.initSelection.call(null, this.opts.element, function(data){\n                    if (data !== undefined && data !== null) {\n                        self.updateSelection(data);\n                        self.close();\n                        // set the placeholder if necessary\n                        self.clearSearch();\n                    }\n                });\n            }\n        },\n\n        // multi\n        clearSearch: function () {\n            var placeholder = this.getPlaceholder(),\n                maxWidth = this.getMaxSearchWidth();\n\n            if (placeholder !== undefined  && this.getVal().length === 0 && this.search.hasClass(\"select2-focused\") === false) {\n                this.search.val(placeholder).addClass(\"select2-default\");\n                // stretch the search box to full width of the container so as much of the placeholder is visible as possible\n                // we could call this.resizeSearch(), but we do not because that requires a sizer and we do not want to create one so early because of a firefox bug, see #944\n                this.search.width(maxWidth > 0 ? maxWidth : this.container.css(\"width\"));\n            } else {\n                this.search.val(\"\").width(10);\n            }\n        },\n\n        // multi\n        clearPlaceholder: function () {\n            if (this.search.hasClass(\"select2-default\")) {\n                this.search.val(\"\").removeClass(\"select2-default\");\n            }\n        },\n\n        // multi\n        opening: function () {\n            this.clearPlaceholder(); // should be done before super so placeholder is not used to search\n            this.resizeSearch();\n\n            this.parent.opening.apply(this, arguments);\n\n            this.focusSearch();\n\n            // initializes search's value with nextSearchTerm (if defined by user)\n            // ignore nextSearchTerm if the dropdown is opened by the user pressing a letter\n            if(this.search.val() === \"\") {\n                if(this.nextSearchTerm != undefined){\n                    this.search.val(this.nextSearchTerm);\n                    this.search.select();\n                }\n            }\n\n            this.updateResults(true);\n            if (this.opts.shouldFocusInput(this)) {\n                this.search.focus();\n            }\n            this.opts.element.trigger($.Event(\"select2-open\"));\n        },\n\n        // multi\n        close: function () {\n            if (!this.opened()) return;\n            this.parent.close.apply(this, arguments);\n        },\n\n        // multi\n        focus: function () {\n            this.close();\n            this.search.focus();\n        },\n\n        // multi\n        isFocused: function () {\n            return this.search.hasClass(\"select2-focused\");\n        },\n\n        // multi\n        updateSelection: function (data) {\n            var ids = [], filtered = [], self = this;\n\n            // filter out duplicates\n            $(data).each(function () {\n                if (indexOf(self.id(this), ids) < 0) {\n                    ids.push(self.id(this));\n                    filtered.push(this);\n                }\n            });\n            data = filtered;\n\n            this.selection.find(\".select2-search-choice\").remove();\n            $(data).each(function () {\n                self.addSelectedChoice(this);\n            });\n            self.postprocessResults();\n        },\n\n        // multi\n        tokenize: function() {\n            var input = this.search.val();\n            input = this.opts.tokenizer.call(this, input, this.data(), this.bind(this.onSelect), this.opts);\n            if (input != null && input != undefined) {\n                this.search.val(input);\n                if (input.length > 0) {\n                    this.open();\n                }\n            }\n\n        },\n\n        // multi\n        onSelect: function (data, options) {\n\n            if (!this.triggerSelect(data) || data.text === \"\") { return; }\n\n            this.addSelectedChoice(data);\n\n            this.opts.element.trigger({ type: \"selected\", val: this.id(data), choice: data });\n\n            // keep track of the search's value before it gets cleared\n            this.nextSearchTerm = this.opts.nextSearchTerm(data, this.search.val());\n\n            this.clearSearch();\n            this.updateResults();\n\n            if (this.select || !this.opts.closeOnSelect) this.postprocessResults(data, false, this.opts.closeOnSelect===true);\n\n            if (this.opts.closeOnSelect) {\n                this.close();\n                this.search.width(10);\n            } else {\n                if (this.countSelectableResults()>0) {\n                    this.search.width(10);\n                    this.resizeSearch();\n                    if (this.getMaximumSelectionSize() > 0 && this.val().length >= this.getMaximumSelectionSize()) {\n                        // if we reached max selection size repaint the results so choices\n                        // are replaced with the max selection reached message\n                        this.updateResults(true);\n                    } else {\n                        // initializes search's value with nextSearchTerm and update search result\n                        if(this.nextSearchTerm != undefined){\n                            this.search.val(this.nextSearchTerm);\n                            this.updateResults();\n                            this.search.select();\n                        }\n                    }\n                    this.positionDropdown();\n                } else {\n                    // if nothing left to select close\n                    this.close();\n                    this.search.width(10);\n                }\n            }\n\n            // since its not possible to select an element that has already been\n            // added we do not need to check if this is a new element before firing change\n            this.triggerChange({ added: data });\n\n            if (!options || !options.noFocus)\n                this.focusSearch();\n        },\n\n        // multi\n        cancel: function () {\n            this.close();\n            this.focusSearch();\n        },\n\n        addSelectedChoice: function (data) {\n            var enableChoice = !data.locked,\n                enabledItem = $(\n                    \"<li class='select2-search-choice'>\" +\n                    \"    <div></div>\" +\n                    \"    <a href='#' class='select2-search-choice-close' tabindex='-1'></a>\" +\n                    \"</li>\"),\n                disabledItem = $(\n                    \"<li class='select2-search-choice select2-locked'>\" +\n                    \"<div></div>\" +\n                    \"</li>\");\n            var choice = enableChoice ? enabledItem : disabledItem,\n                id = this.id(data),\n                val = this.getVal(),\n                formatted,\n                cssClass;\n\n            formatted=this.opts.formatSelection(data, choice.find(\"div\"), this.opts.escapeMarkup);\n            if (formatted != undefined) {\n                choice.find(\"div\").replaceWith($(\"<div></div>\").html(formatted));\n            }\n            cssClass=this.opts.formatSelectionCssClass(data, choice.find(\"div\"));\n            if (cssClass != undefined) {\n                choice.addClass(cssClass);\n            }\n\n            if(enableChoice){\n              choice.find(\".select2-search-choice-close\")\n                  .on(\"mousedown\", killEvent)\n                  .on(\"click dblclick\", this.bind(function (e) {\n                  if (!this.isInterfaceEnabled()) return;\n\n                  this.unselect($(e.target));\n                  this.selection.find(\".select2-search-choice-focus\").removeClass(\"select2-search-choice-focus\");\n                  killEvent(e);\n                  this.close();\n                  this.focusSearch();\n              })).on(\"focus\", this.bind(function () {\n                  if (!this.isInterfaceEnabled()) return;\n                  this.container.addClass(\"select2-container-active\");\n                  this.dropdown.addClass(\"select2-drop-active\");\n              }));\n            }\n\n            choice.data(\"select2-data\", data);\n            choice.insertBefore(this.searchContainer);\n\n            val.push(id);\n            this.setVal(val);\n        },\n\n        // multi\n        unselect: function (selected) {\n            var val = this.getVal(),\n                data,\n                index;\n            selected = selected.closest(\".select2-search-choice\");\n\n            if (selected.length === 0) {\n                throw \"Invalid argument: \" + selected + \". Must be .select2-search-choice\";\n            }\n\n            data = selected.data(\"select2-data\");\n\n            if (!data) {\n                // prevent a race condition when the 'x' is clicked really fast repeatedly the event can be queued\n                // and invoked on an element already removed\n                return;\n            }\n\n            var evt = $.Event(\"select2-removing\");\n            evt.val = this.id(data);\n            evt.choice = data;\n            this.opts.element.trigger(evt);\n\n            if (evt.isDefaultPrevented()) {\n                return false;\n            }\n\n            while((index = indexOf(this.id(data), val)) >= 0) {\n                val.splice(index, 1);\n                this.setVal(val);\n                if (this.select) this.postprocessResults();\n            }\n\n            selected.remove();\n\n            this.opts.element.trigger({ type: \"select2-removed\", val: this.id(data), choice: data });\n            this.triggerChange({ removed: data });\n\n            return true;\n        },\n\n        // multi\n        postprocessResults: function (data, initial, noHighlightUpdate) {\n            var val = this.getVal(),\n                choices = this.results.find(\".select2-result\"),\n                compound = this.results.find(\".select2-result-with-children\"),\n                self = this;\n\n            choices.each2(function (i, choice) {\n                var id = self.id(choice.data(\"select2-data\"));\n                if (indexOf(id, val) >= 0) {\n                    choice.addClass(\"select2-selected\");\n                    // mark all children of the selected parent as selected\n                    choice.find(\".select2-result-selectable\").addClass(\"select2-selected\");\n                }\n            });\n\n            compound.each2(function(i, choice) {\n                // hide an optgroup if it doesn't have any selectable children\n                if (!choice.is('.select2-result-selectable')\n                    && choice.find(\".select2-result-selectable:not(.select2-selected)\").length === 0) {\n                    choice.addClass(\"select2-selected\");\n                }\n            });\n\n            if (this.highlight() == -1 && noHighlightUpdate !== false && this.opts.closeOnSelect === true){\n                self.highlight(0);\n            }\n\n            //If all results are chosen render formatNoMatches\n            if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){\n                if(!data || data && !data.more && this.results.find(\".select2-no-results\").length === 0) {\n                    if (checkFormatter(self.opts.formatNoMatches, \"formatNoMatches\")) {\n                        this.results.append(\"<li class='select2-no-results'>\" + evaluate(self.opts.formatNoMatches, self.opts.element, self.search.val()) + \"</li>\");\n                    }\n                }\n            }\n\n        },\n\n        // multi\n        getMaxSearchWidth: function() {\n            return this.selection.width() - getSideBorderPadding(this.search);\n        },\n\n        // multi\n        resizeSearch: function () {\n            var minimumWidth, left, maxWidth, containerLeft, searchWidth,\n                sideBorderPadding = getSideBorderPadding(this.search);\n\n            minimumWidth = measureTextWidth(this.search) + 10;\n\n            left = this.search.offset().left;\n\n            maxWidth = this.selection.width();\n            containerLeft = this.selection.offset().left;\n\n            searchWidth = maxWidth - (left - containerLeft) - sideBorderPadding;\n\n            if (searchWidth < minimumWidth) {\n                searchWidth = maxWidth - sideBorderPadding;\n            }\n\n            if (searchWidth < 40) {\n                searchWidth = maxWidth - sideBorderPadding;\n            }\n\n            if (searchWidth <= 0) {\n              searchWidth = minimumWidth;\n            }\n\n            this.search.width(Math.floor(searchWidth));\n        },\n\n        // multi\n        getVal: function () {\n            var val;\n            if (this.select) {\n                val = this.select.val();\n                return val === null ? [] : val;\n            } else {\n                val = this.opts.element.val();\n                return splitVal(val, this.opts.separator, this.opts.transformVal);\n            }\n        },\n\n        // multi\n        setVal: function (val) {\n            var unique;\n            if (this.select) {\n                this.select.val(val);\n            } else {\n                unique = [];\n                // filter out duplicates\n                $(val).each(function () {\n                    if (indexOf(this, unique) < 0) unique.push(this);\n                });\n                this.opts.element.val(unique.length === 0 ? \"\" : unique.join(this.opts.separator));\n            }\n        },\n\n        // multi\n        buildChangeDetails: function (old, current) {\n            var current = current.slice(0),\n                old = old.slice(0);\n\n            // remove intersection from each array\n            for (var i = 0; i < current.length; i++) {\n                for (var j = 0; j < old.length; j++) {\n                    if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {\n                        current.splice(i, 1);\n                        if(i>0){\n                            i--;\n                        }\n                        old.splice(j, 1);\n                        j--;\n                    }\n                }\n            }\n\n            return {added: current, removed: old};\n        },\n\n\n        // multi\n        val: function (val, triggerChange) {\n            var oldData, self=this;\n\n            if (arguments.length === 0) {\n                return this.getVal();\n            }\n\n            oldData=this.data();\n            if (!oldData.length) oldData=[];\n\n            // val is an id. !val is true for [undefined,null,'',0] - 0 is legal\n            if (!val && val !== 0) {\n                this.opts.element.val(\"\");\n                this.updateSelection([]);\n                this.clearSearch();\n                if (triggerChange) {\n                    this.triggerChange({added: this.data(), removed: oldData});\n                }\n                return;\n            }\n\n            // val is a list of ids\n            this.setVal(val);\n\n            if (this.select) {\n                this.opts.initSelection(this.select, this.bind(this.updateSelection));\n                if (triggerChange) {\n                    this.triggerChange(this.buildChangeDetails(oldData, this.data()));\n                }\n            } else {\n                if (this.opts.initSelection === undefined) {\n                    throw new Error(\"val() cannot be called if initSelection() is not defined\");\n                }\n\n                this.opts.initSelection(this.opts.element, function(data){\n                    var ids=$.map(data, self.id);\n                    self.setVal(ids);\n                    self.updateSelection(data);\n                    self.clearSearch();\n                    if (triggerChange) {\n                        self.triggerChange(self.buildChangeDetails(oldData, self.data()));\n                    }\n                });\n            }\n            this.clearSearch();\n        },\n\n        // multi\n        onSortStart: function() {\n            if (this.select) {\n                throw new Error(\"Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.\");\n            }\n\n            // collapse search field into 0 width so its container can be collapsed as well\n            this.search.width(0);\n            // hide the container\n            this.searchContainer.hide();\n        },\n\n        // multi\n        onSortEnd:function() {\n\n            var val=[], self=this;\n\n            // show search and move it to the end of the list\n            this.searchContainer.show();\n            // make sure the search container is the last item in the list\n            this.searchContainer.appendTo(this.searchContainer.parent());\n            // since we collapsed the width in dragStarted, we resize it here\n            this.resizeSearch();\n\n            // update selection\n            this.selection.find(\".select2-search-choice\").each(function() {\n                val.push(self.opts.id($(this).data(\"select2-data\")));\n            });\n            this.setVal(val);\n            this.triggerChange();\n        },\n\n        // multi\n        data: function(values, triggerChange) {\n            var self=this, ids, old;\n            if (arguments.length === 0) {\n                 return this.selection\n                     .children(\".select2-search-choice\")\n                     .map(function() { return $(this).data(\"select2-data\"); })\n                     .get();\n            } else {\n                old = this.data();\n                if (!values) { values = []; }\n                ids = $.map(values, function(e) { return self.opts.id(e); });\n                this.setVal(ids);\n                this.updateSelection(values);\n                this.clearSearch();\n                if (triggerChange) {\n                    this.triggerChange(this.buildChangeDetails(old, this.data()));\n                }\n            }\n        }\n    });\n\n    $.fn.select2 = function () {\n\n        var args = Array.prototype.slice.call(arguments, 0),\n            opts,\n            select2,\n            method, value, multiple,\n            allowedMethods = [\"val\", \"destroy\", \"opened\", \"open\", \"close\", \"focus\", \"isFocused\", \"container\", \"dropdown\", \"onSortStart\", \"onSortEnd\", \"enable\", \"disable\", \"readonly\", \"positionDropdown\", \"data\", \"search\"],\n            valueMethods = [\"opened\", \"isFocused\", \"container\", \"dropdown\"],\n            propertyMethods = [\"val\", \"data\"],\n            methodsMap = { search: \"externalSearch\" };\n\n        this.each(function () {\n            if (args.length === 0 || typeof(args[0]) === \"object\") {\n                opts = args.length === 0 ? {} : $.extend({}, args[0]);\n                opts.element = $(this);\n\n                if (opts.element.get(0).tagName.toLowerCase() === \"select\") {\n                    multiple = opts.element.prop(\"multiple\");\n                } else {\n                    multiple = opts.multiple || false;\n                    if (\"tags\" in opts) {opts.multiple = multiple = true;}\n                }\n\n                select2 = multiple ? new window.Select2[\"class\"].multi() : new window.Select2[\"class\"].single();\n                select2.init(opts);\n            } else if (typeof(args[0]) === \"string\") {\n\n                if (indexOf(args[0], allowedMethods) < 0) {\n                    throw \"Unknown method: \" + args[0];\n                }\n\n                value = undefined;\n                select2 = $(this).data(\"select2\");\n                if (select2 === undefined) return;\n\n                method=args[0];\n\n                if (method === \"container\") {\n                    value = select2.container;\n                } else if (method === \"dropdown\") {\n                    value = select2.dropdown;\n                } else {\n                    if (methodsMap[method]) method = methodsMap[method];\n\n                    value = select2[method].apply(select2, args.slice(1));\n                }\n                if (indexOf(args[0], valueMethods) >= 0\n                    || (indexOf(args[0], propertyMethods) >= 0 && args.length == 1)) {\n                    return false; // abort the iteration, ready to return first matched value\n                }\n            } else {\n                throw \"Invalid arguments to select2 plugin: \" + args;\n            }\n        });\n        return (value === undefined) ? this : value;\n    };\n\n    // plugin defaults, accessible to users\n    $.fn.select2.defaults = {\n        width: \"copy\",\n        loadMorePadding: 0,\n        closeOnSelect: true,\n        openOnEnter: true,\n        containerCss: {},\n        dropdownCss: {},\n        containerCssClass: \"\",\n        dropdownCssClass: \"\",\n        formatResult: function(result, container, query, escapeMarkup) {\n            var markup=[];\n            markMatch(this.text(result), query.term, markup, escapeMarkup);\n            return markup.join(\"\");\n        },\n        transformVal: function(val) {\n            return $.trim(val);\n        },\n        formatSelection: function (data, container, escapeMarkup) {\n            return data ? escapeMarkup(this.text(data)) : undefined;\n        },\n        sortResults: function (results, container, query) {\n            return results;\n        },\n        formatResultCssClass: function(data) {return data.css;},\n        formatSelectionCssClass: function(data, container) {return undefined;},\n        minimumResultsForSearch: 0,\n        minimumInputLength: 0,\n        maximumInputLength: null,\n        maximumSelectionSize: 0,\n        id: function (e) { return e == undefined ? null : e.id; },\n        text: function (e) {\n          if (e && this.data && this.data.text) {\n            if ($.isFunction(this.data.text)) {\n              return this.data.text(e);\n            } else {\n              return e[this.data.text];\n            }\n          } else {\n            return e.text;\n          }\n        },\n        matcher: function(term, text) {\n            return stripDiacritics(''+text).toUpperCase().indexOf(stripDiacritics(''+term).toUpperCase()) >= 0;\n        },\n        separator: \",\",\n        tokenSeparators: [],\n        tokenizer: defaultTokenizer,\n        escapeMarkup: defaultEscapeMarkup,\n        blurOnChange: false,\n        selectOnBlur: false,\n        adaptContainerCssClass: function(c) { return c; },\n        adaptDropdownCssClass: function(c) { return null; },\n        nextSearchTerm: function(selectedObject, currentSearchTerm) { return undefined; },\n        searchInputPlaceholder: '',\n        createSearchChoicePosition: 'top',\n        shouldFocusInput: function (instance) {\n            // Attempt to detect touch devices\n            var supportsTouchEvents = (('ontouchstart' in window) ||\n                                       (navigator.msMaxTouchPoints > 0));\n\n            // Only devices which support touch events should be special cased\n            if (!supportsTouchEvents) {\n                return true;\n            }\n\n            // Never focus the input if search is disabled\n            if (instance.opts.minimumResultsForSearch < 0) {\n                return false;\n            }\n\n            return true;\n        }\n    };\n\n    $.fn.select2.locales = [];\n\n    $.fn.select2.locales['en'] = {\n         formatMatches: function (matches) { if (matches === 1) { return \"One result is available, press enter to select it.\"; } return matches + \" results are available, use up and down arrow keys to navigate.\"; },\n         formatNoMatches: function () { return \"No matches found\"; },\n         formatAjaxError: function (jqXHR, textStatus, errorThrown) { return \"Loading failed\"; },\n         formatInputTooShort: function (input, min) { var n = min - input.length; return \"Please enter \" + n + \" or more character\" + (n == 1 ? \"\" : \"s\"); },\n         formatInputTooLong: function (input, max) { var n = input.length - max; return \"Please delete \" + n + \" character\" + (n == 1 ? \"\" : \"s\"); },\n         formatSelectionTooBig: function (limit) { return \"You can only select \" + limit + \" item\" + (limit == 1 ? \"\" : \"s\"); },\n         formatLoadMore: function (pageNumber) { return \"Loading more results…\"; },\n         formatSearching: function () { return \"Searching…\"; }\n    };\n\n    $.extend($.fn.select2.defaults, $.fn.select2.locales['en']);\n\n    $.fn.select2.ajaxDefaults = {\n        transport: $.ajax,\n        params: {\n            type: \"GET\",\n            cache: false,\n            dataType: \"json\"\n        }\n    };\n\n    // exports\n    window.Select2 = {\n        query: {\n            ajax: ajax,\n            local: local,\n            tags: tags\n        }, util: {\n            debounce: debounce,\n            markMatch: markMatch,\n            escapeMarkup: defaultEscapeMarkup,\n            stripDiacritics: stripDiacritics\n        }, \"class\": {\n            \"abstract\": AbstractSelect2,\n            \"single\": SingleSelect2,\n            \"multi\": MultiSelect2\n        }\n    };\n\n}(jQuery));\n","//     Underscore.js 1.5.1\n//     http://underscorejs.org\n//     (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n//     Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n  // Baseline setup\n  // --------------\n\n  // Establish the root object, `window` in the browser, or `global` on the server.\n  var root = this;\n\n  // Save the previous value of the `_` variable.\n  var previousUnderscore = root._;\n\n  // Establish the object that gets returned to break out of a loop iteration.\n  var breaker = {};\n\n  // Save bytes in the minified (but not gzipped) version:\n  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n  // Create quick reference variables for speed access to core prototypes.\n  var\n    push             = ArrayProto.push,\n    slice            = ArrayProto.slice,\n    concat           = ArrayProto.concat,\n    toString         = ObjProto.toString,\n    hasOwnProperty   = ObjProto.hasOwnProperty;\n\n  // All **ECMAScript 5** native function implementations that we hope to use\n  // are declared here.\n  var\n    nativeForEach      = ArrayProto.forEach,\n    nativeMap          = ArrayProto.map,\n    nativeReduce       = ArrayProto.reduce,\n    nativeReduceRight  = ArrayProto.reduceRight,\n    nativeFilter       = ArrayProto.filter,\n    nativeEvery        = ArrayProto.every,\n    nativeSome         = ArrayProto.some,\n    nativeIndexOf      = ArrayProto.indexOf,\n    nativeLastIndexOf  = ArrayProto.lastIndexOf,\n    nativeIsArray      = Array.isArray,\n    nativeKeys         = Object.keys,\n    nativeBind         = FuncProto.bind;\n\n  // Create a safe reference to the Underscore object for use below.\n  var _ = function(obj) {\n    if (obj instanceof _) return obj;\n    if (!(this instanceof _)) return new _(obj);\n    this._wrapped = obj;\n  };\n\n  // Export the Underscore object for **Node.js**, with\n  // backwards-compatibility for the old `require()` API. If we're in\n  // the browser, add `_` as a global object via a string identifier,\n  // for Closure Compiler \"advanced\" mode.\n  if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      exports = module.exports = _;\n    }\n    exports._ = _;\n  } else {\n    root._ = _;\n  }\n\n  // Current version.\n  _.VERSION = '1.5.1';\n\n  // Collection Functions\n  // --------------------\n\n  // The cornerstone, an `each` implementation, aka `forEach`.\n  // Handles objects with the built-in `forEach`, arrays, and raw objects.\n  // Delegates to **ECMAScript 5**'s native `forEach` if available.\n  var each = _.each = _.forEach = function(obj, iterator, context) {\n    if (obj == null) return;\n    if (nativeForEach && obj.forEach === nativeForEach) {\n      obj.forEach(iterator, context);\n    } else if (obj.length === +obj.length) {\n      for (var i = 0, l = obj.length; i < l; i++) {\n        if (iterator.call(context, obj[i], i, obj) === breaker) return;\n      }\n    } else {\n      for (var key in obj) {\n        if (_.has(obj, key)) {\n          if (iterator.call(context, obj[key], key, obj) === breaker) return;\n        }\n      }\n    }\n  };\n\n  // Return the results of applying the iterator to each element.\n  // Delegates to **ECMAScript 5**'s native `map` if available.\n  _.map = _.collect = function(obj, iterator, context) {\n    var results = [];\n    if (obj == null) return results;\n    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n    each(obj, function(value, index, list) {\n      results.push(iterator.call(context, value, index, list));\n    });\n    return results;\n  };\n\n  var reduceError = 'Reduce of empty array with no initial value';\n\n  // **Reduce** builds up a single result from a list of values, aka `inject`,\n  // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.\n  _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {\n    var initial = arguments.length > 2;\n    if (obj == null) obj = [];\n    if (nativeReduce && obj.reduce === nativeReduce) {\n      if (context) iterator = _.bind(iterator, context);\n      return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);\n    }\n    each(obj, function(value, index, list) {\n      if (!initial) {\n        memo = value;\n        initial = true;\n      } else {\n        memo = iterator.call(context, memo, value, index, list);\n      }\n    });\n    if (!initial) throw new TypeError(reduceError);\n    return memo;\n  };\n\n  // The right-associative version of reduce, also known as `foldr`.\n  // Delegates to **ECMAScript 5**'s native `reduceRight` if available.\n  _.reduceRight = _.foldr = function(obj, iterator, memo, context) {\n    var initial = arguments.length > 2;\n    if (obj == null) obj = [];\n    if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {\n      if (context) iterator = _.bind(iterator, context);\n      return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);\n    }\n    var length = obj.length;\n    if (length !== +length) {\n      var keys = _.keys(obj);\n      length = keys.length;\n    }\n    each(obj, function(value, index, list) {\n      index = keys ? keys[--length] : --length;\n      if (!initial) {\n        memo = obj[index];\n        initial = true;\n      } else {\n        memo = iterator.call(context, memo, obj[index], index, list);\n      }\n    });\n    if (!initial) throw new TypeError(reduceError);\n    return memo;\n  };\n\n  // Return the first value which passes a truth test. Aliased as `detect`.\n  _.find = _.detect = function(obj, iterator, context) {\n    var result;\n    any(obj, function(value, index, list) {\n      if (iterator.call(context, value, index, list)) {\n        result = value;\n        return true;\n      }\n    });\n    return result;\n  };\n\n  // Return all the elements that pass a truth test.\n  // Delegates to **ECMAScript 5**'s native `filter` if available.\n  // Aliased as `select`.\n  _.filter = _.select = function(obj, iterator, context) {\n    var results = [];\n    if (obj == null) return results;\n    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\n    each(obj, function(value, index, list) {\n      if (iterator.call(context, value, index, list)) results.push(value);\n    });\n    return results;\n  };\n\n  // Return all the elements for which a truth test fails.\n  _.reject = function(obj, iterator, context) {\n    return _.filter(obj, function(value, index, list) {\n      return !iterator.call(context, value, index, list);\n    }, context);\n  };\n\n  // Determine whether all of the elements match a truth test.\n  // Delegates to **ECMAScript 5**'s native `every` if available.\n  // Aliased as `all`.\n  _.every = _.all = function(obj, iterator, context) {\n    iterator || (iterator = _.identity);\n    var result = true;\n    if (obj == null) return result;\n    if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);\n    each(obj, function(value, index, list) {\n      if (!(result = result && iterator.call(context, value, index, list))) return breaker;\n    });\n    return !!result;\n  };\n\n  // Determine if at least one element in the object matches a truth test.\n  // Delegates to **ECMAScript 5**'s native `some` if available.\n  // Aliased as `any`.\n  var any = _.some = _.any = function(obj, iterator, context) {\n    iterator || (iterator = _.identity);\n    var result = false;\n    if (obj == null) return result;\n    if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\n    each(obj, function(value, index, list) {\n      if (result || (result = iterator.call(context, value, index, list))) return breaker;\n    });\n    return !!result;\n  };\n\n  // Determine if the array or object contains a given value (using `===`).\n  // Aliased as `include`.\n  _.contains = _.include = function(obj, target) {\n    if (obj == null) return false;\n    if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n    return any(obj, function(value) {\n      return value === target;\n    });\n  };\n\n  // Invoke a method (with arguments) on every item in a collection.\n  _.invoke = function(obj, method) {\n    var args = slice.call(arguments, 2);\n    var isFunc = _.isFunction(method);\n    return _.map(obj, function(value) {\n      return (isFunc ? method : value[method]).apply(value, args);\n    });\n  };\n\n  // Convenience version of a common use case of `map`: fetching a property.\n  _.pluck = function(obj, key) {\n    return _.map(obj, function(value){ return value[key]; });\n  };\n\n  // Convenience version of a common use case of `filter`: selecting only objects\n  // containing specific `key:value` pairs.\n  _.where = function(obj, attrs, first) {\n    if (_.isEmpty(attrs)) return first ? void 0 : [];\n    return _[first ? 'find' : 'filter'](obj, function(value) {\n      for (var key in attrs) {\n        if (attrs[key] !== value[key]) return false;\n      }\n      return true;\n    });\n  };\n\n  // Convenience version of a common use case of `find`: getting the first object\n  // containing specific `key:value` pairs.\n  _.findWhere = function(obj, attrs) {\n    return _.where(obj, attrs, true);\n  };\n\n  // Return the maximum element or (element-based computation).\n  // Can't optimize arrays of integers longer than 65,535 elements.\n  // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)\n  _.max = function(obj, iterator, context) {\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n      return Math.max.apply(Math, obj);\n    }\n    if (!iterator && _.isEmpty(obj)) return -Infinity;\n    var result = {computed : -Infinity, value: -Infinity};\n    each(obj, function(value, index, list) {\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\n      computed > result.computed && (result = {value : value, computed : computed});\n    });\n    return result.value;\n  };\n\n  // Return the minimum element (or element-based computation).\n  _.min = function(obj, iterator, context) {\n    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n      return Math.min.apply(Math, obj);\n    }\n    if (!iterator && _.isEmpty(obj)) return Infinity;\n    var result = {computed : Infinity, value: Infinity};\n    each(obj, function(value, index, list) {\n      var computed = iterator ? iterator.call(context, value, index, list) : value;\n      computed < result.computed && (result = {value : value, computed : computed});\n    });\n    return result.value;\n  };\n\n  // Shuffle an array.\n  _.shuffle = function(obj) {\n    var rand;\n    var index = 0;\n    var shuffled = [];\n    each(obj, function(value) {\n      rand = _.random(index++);\n      shuffled[index - 1] = shuffled[rand];\n      shuffled[rand] = value;\n    });\n    return shuffled;\n  };\n\n  // An internal function to generate lookup iterators.\n  var lookupIterator = function(value) {\n    return _.isFunction(value) ? value : function(obj){ return obj[value]; };\n  };\n\n  // Sort the object's values by a criterion produced by an iterator.\n  _.sortBy = function(obj, value, context) {\n    var iterator = lookupIterator(value);\n    return _.pluck(_.map(obj, function(value, index, list) {\n      return {\n        value : value,\n        index : index,\n        criteria : iterator.call(context, value, index, list)\n      };\n    }).sort(function(left, right) {\n      var a = left.criteria;\n      var b = right.criteria;\n      if (a !== b) {\n        if (a > b || a === void 0) return 1;\n        if (a < b || b === void 0) return -1;\n      }\n      return left.index < right.index ? -1 : 1;\n    }), 'value');\n  };\n\n  // An internal function used for aggregate \"group by\" operations.\n  var group = function(obj, value, context, behavior) {\n    var result = {};\n    var iterator = lookupIterator(value == null ? _.identity : value);\n    each(obj, function(value, index) {\n      var key = iterator.call(context, value, index, obj);\n      behavior(result, key, value);\n    });\n    return result;\n  };\n\n  // Groups the object's values by a criterion. Pass either a string attribute\n  // to group by, or a function that returns the criterion.\n  _.groupBy = function(obj, value, context) {\n    return group(obj, value, context, function(result, key, value) {\n      (_.has(result, key) ? result[key] : (result[key] = [])).push(value);\n    });\n  };\n\n  // Counts instances of an object that group by a certain criterion. Pass\n  // either a string attribute to count by, or a function that returns the\n  // criterion.\n  _.countBy = function(obj, value, context) {\n    return group(obj, value, context, function(result, key) {\n      if (!_.has(result, key)) result[key] = 0;\n      result[key]++;\n    });\n  };\n\n  // Use a comparator function to figure out the smallest index at which\n  // an object should be inserted so as to maintain order. Uses binary search.\n  _.sortedIndex = function(array, obj, iterator, context) {\n    iterator = iterator == null ? _.identity : lookupIterator(iterator);\n    var value = iterator.call(context, obj);\n    var low = 0, high = array.length;\n    while (low < high) {\n      var mid = (low + high) >>> 1;\n      iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;\n    }\n    return low;\n  };\n\n  // Safely create a real, live array from anything iterable.\n  _.toArray = function(obj) {\n    if (!obj) return [];\n    if (_.isArray(obj)) return slice.call(obj);\n    if (obj.length === +obj.length) return _.map(obj, _.identity);\n    return _.values(obj);\n  };\n\n  // Return the number of elements in an object.\n  _.size = function(obj) {\n    if (obj == null) return 0;\n    return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;\n  };\n\n  // Array Functions\n  // ---------------\n\n  // Get the first element of an array. Passing **n** will return the first N\n  // values in the array. Aliased as `head` and `take`. The **guard** check\n  // allows it to work with `_.map`.\n  _.first = _.head = _.take = function(array, n, guard) {\n    if (array == null) return void 0;\n    return (n != null) && !guard ? slice.call(array, 0, n) : array[0];\n  };\n\n  // Returns everything but the last entry of the array. Especially useful on\n  // the arguments object. Passing **n** will return all the values in\n  // the array, excluding the last N. The **guard** check allows it to work with\n  // `_.map`.\n  _.initial = function(array, n, guard) {\n    return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));\n  };\n\n  // Get the last element of an array. Passing **n** will return the last N\n  // values in the array. The **guard** check allows it to work with `_.map`.\n  _.last = function(array, n, guard) {\n    if (array == null) return void 0;\n    if ((n != null) && !guard) {\n      return slice.call(array, Math.max(array.length - n, 0));\n    } else {\n      return array[array.length - 1];\n    }\n  };\n\n  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n  // Especially useful on the arguments object. Passing an **n** will return\n  // the rest N values in the array. The **guard**\n  // check allows it to work with `_.map`.\n  _.rest = _.tail = _.drop = function(array, n, guard) {\n    return slice.call(array, (n == null) || guard ? 1 : n);\n  };\n\n  // Trim out all falsy values from an array.\n  _.compact = function(array) {\n    return _.filter(array, _.identity);\n  };\n\n  // Internal implementation of a recursive `flatten` function.\n  var flatten = function(input, shallow, output) {\n    if (shallow && _.every(input, _.isArray)) {\n      return concat.apply(output, input);\n    }\n    each(input, function(value) {\n      if (_.isArray(value) || _.isArguments(value)) {\n        shallow ? push.apply(output, value) : flatten(value, shallow, output);\n      } else {\n        output.push(value);\n      }\n    });\n    return output;\n  };\n\n  // Return a completely flattened version of an array.\n  _.flatten = function(array, shallow) {\n    return flatten(array, shallow, []);\n  };\n\n  // Return a version of the array that does not contain the specified value(s).\n  _.without = function(array) {\n    return _.difference(array, slice.call(arguments, 1));\n  };\n\n  // Produce a duplicate-free version of the array. If the array has already\n  // been sorted, you have the option of using a faster algorithm.\n  // Aliased as `unique`.\n  _.uniq = _.unique = function(array, isSorted, iterator, context) {\n    if (_.isFunction(isSorted)) {\n      context = iterator;\n      iterator = isSorted;\n      isSorted = false;\n    }\n    var initial = iterator ? _.map(array, iterator, context) : array;\n    var results = [];\n    var seen = [];\n    each(initial, function(value, index) {\n      if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {\n        seen.push(value);\n        results.push(array[index]);\n      }\n    });\n    return results;\n  };\n\n  // Produce an array that contains the union: each distinct element from all of\n  // the passed-in arrays.\n  _.union = function() {\n    return _.uniq(_.flatten(arguments, true));\n  };\n\n  // Produce an array that contains every item shared between all the\n  // passed-in arrays.\n  _.intersection = function(array) {\n    var rest = slice.call(arguments, 1);\n    return _.filter(_.uniq(array), function(item) {\n      return _.every(rest, function(other) {\n        return _.indexOf(other, item) >= 0;\n      });\n    });\n  };\n\n  // Take the difference between one array and a number of other arrays.\n  // Only the elements present in just the first array will remain.\n  _.difference = function(array) {\n    var rest = concat.apply(ArrayProto, slice.call(arguments, 1));\n    return _.filter(array, function(value){ return !_.contains(rest, value); });\n  };\n\n  // Zip together multiple lists into a single array -- elements that share\n  // an index go together.\n  _.zip = function() {\n    var length = _.max(_.pluck(arguments, \"length\").concat(0));\n    var results = new Array(length);\n    for (var i = 0; i < length; i++) {\n      results[i] = _.pluck(arguments, '' + i);\n    }\n    return results;\n  };\n\n  // Converts lists into objects. Pass either a single array of `[key, value]`\n  // pairs, or two parallel arrays of the same length -- one of keys, and one of\n  // the corresponding values.\n  _.object = function(list, values) {\n    if (list == null) return {};\n    var result = {};\n    for (var i = 0, l = list.length; i < l; i++) {\n      if (values) {\n        result[list[i]] = values[i];\n      } else {\n        result[list[i][0]] = list[i][1];\n      }\n    }\n    return result;\n  };\n\n  // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),\n  // we need this function. Return the position of the first occurrence of an\n  // item in an array, or -1 if the item is not included in the array.\n  // Delegates to **ECMAScript 5**'s native `indexOf` if available.\n  // If the array is large and already in sort order, pass `true`\n  // for **isSorted** to use binary search.\n  _.indexOf = function(array, item, isSorted) {\n    if (array == null) return -1;\n    var i = 0, l = array.length;\n    if (isSorted) {\n      if (typeof isSorted == 'number') {\n        i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);\n      } else {\n        i = _.sortedIndex(array, item);\n        return array[i] === item ? i : -1;\n      }\n    }\n    if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);\n    for (; i < l; i++) if (array[i] === item) return i;\n    return -1;\n  };\n\n  // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.\n  _.lastIndexOf = function(array, item, from) {\n    if (array == null) return -1;\n    var hasIndex = from != null;\n    if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {\n      return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);\n    }\n    var i = (hasIndex ? from : array.length);\n    while (i--) if (array[i] === item) return i;\n    return -1;\n  };\n\n  // Generate an integer Array containing an arithmetic progression. A port of\n  // the native Python `range()` function. See\n  // [the Python documentation](http://docs.python.org/library/functions.html#range).\n  _.range = function(start, stop, step) {\n    if (arguments.length <= 1) {\n      stop = start || 0;\n      start = 0;\n    }\n    step = arguments[2] || 1;\n\n    var len = Math.max(Math.ceil((stop - start) / step), 0);\n    var idx = 0;\n    var range = new Array(len);\n\n    while(idx < len) {\n      range[idx++] = start;\n      start += step;\n    }\n\n    return range;\n  };\n\n  // Function (ahem) Functions\n  // ------------------\n\n  // Reusable constructor function for prototype setting.\n  var ctor = function(){};\n\n  // Create a function bound to a given object (assigning `this`, and arguments,\n  // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n  // available.\n  _.bind = function(func, context) {\n    var args, bound;\n    if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n    if (!_.isFunction(func)) throw new TypeError;\n    args = slice.call(arguments, 2);\n    return bound = function() {\n      if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));\n      ctor.prototype = func.prototype;\n      var self = new ctor;\n      ctor.prototype = null;\n      var result = func.apply(self, args.concat(slice.call(arguments)));\n      if (Object(result) === result) return result;\n      return self;\n    };\n  };\n\n  // Partially apply a function by creating a version that has had some of its\n  // arguments pre-filled, without changing its dynamic `this` context.\n  _.partial = function(func) {\n    var args = slice.call(arguments, 1);\n    return function() {\n      return func.apply(this, args.concat(slice.call(arguments)));\n    };\n  };\n\n  // Bind all of an object's methods to that object. Useful for ensuring that\n  // all callbacks defined on an object belong to it.\n  _.bindAll = function(obj) {\n    var funcs = slice.call(arguments, 1);\n    if (funcs.length === 0) throw new Error(\"bindAll must be passed function names\");\n    each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });\n    return obj;\n  };\n\n  // Memoize an expensive function by storing its results.\n  _.memoize = function(func, hasher) {\n    var memo = {};\n    hasher || (hasher = _.identity);\n    return function() {\n      var key = hasher.apply(this, arguments);\n      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));\n    };\n  };\n\n  // Delays a function for the given number of milliseconds, and then calls\n  // it with the arguments supplied.\n  _.delay = function(func, wait) {\n    var args = slice.call(arguments, 2);\n    return setTimeout(function(){ return func.apply(null, args); }, wait);\n  };\n\n  // Defers a function, scheduling it to run after the current call stack has\n  // cleared.\n  _.defer = function(func) {\n    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n  };\n\n  // Returns a function, that, when invoked, will only be triggered at most once\n  // during a given window of time. Normally, the throttled function will run\n  // as much as it can, without ever going more than once per `wait` duration;\n  // but if you'd like to disable the execution on the leading edge, pass\n  // `{leading: false}`. To disable execution on the trailing edge, ditto.\n  _.throttle = function(func, wait, options) {\n    var context, args, result;\n    var timeout = null;\n    var previous = 0;\n    options || (options = {});\n    var later = function() {\n      previous = options.leading === false ? 0 : new Date;\n      timeout = null;\n      result = func.apply(context, args);\n    };\n    return function() {\n      var now = new Date;\n      if (!previous && options.leading === false) previous = now;\n      var remaining = wait - (now - previous);\n      context = this;\n      args = arguments;\n      if (remaining <= 0) {\n        clearTimeout(timeout);\n        timeout = null;\n        previous = now;\n        result = func.apply(context, args);\n      } else if (!timeout && options.trailing !== false) {\n        timeout = setTimeout(later, remaining);\n      }\n      return result;\n    };\n  };\n\n  // Returns a function, that, as long as it continues to be invoked, will not\n  // be triggered. The function will be called after it stops being called for\n  // N milliseconds. If `immediate` is passed, trigger the function on the\n  // leading edge, instead of the trailing.\n  _.debounce = function(func, wait, immediate) {\n    var result;\n    var timeout = null;\n    return function() {\n      var context = this, args = arguments;\n      var later = function() {\n        timeout = null;\n        if (!immediate) result = func.apply(context, args);\n      };\n      var callNow = immediate && !timeout;\n      clearTimeout(timeout);\n      timeout = setTimeout(later, wait);\n      if (callNow) result = func.apply(context, args);\n      return result;\n    };\n  };\n\n  // Returns a function that will be executed at most one time, no matter how\n  // often you call it. Useful for lazy initialization.\n  _.once = function(func) {\n    var ran = false, memo;\n    return function() {\n      if (ran) return memo;\n      ran = true;\n      memo = func.apply(this, arguments);\n      func = null;\n      return memo;\n    };\n  };\n\n  // Returns the first function passed as an argument to the second,\n  // allowing you to adjust arguments, run code before and after, and\n  // conditionally execute the original function.\n  _.wrap = function(func, wrapper) {\n    return function() {\n      var args = [func];\n      push.apply(args, arguments);\n      return wrapper.apply(this, args);\n    };\n  };\n\n  // Returns a function that is the composition of a list of functions, each\n  // consuming the return value of the function that follows.\n  _.compose = function() {\n    var funcs = arguments;\n    return function() {\n      var args = arguments;\n      for (var i = funcs.length - 1; i >= 0; i--) {\n        args = [funcs[i].apply(this, args)];\n      }\n      return args[0];\n    };\n  };\n\n  // Returns a function that will only be executed after being called N times.\n  _.after = function(times, func) {\n    return function() {\n      if (--times < 1) {\n        return func.apply(this, arguments);\n      }\n    };\n  };\n\n  // Object Functions\n  // ----------------\n\n  // Retrieve the names of an object's properties.\n  // Delegates to **ECMAScript 5**'s native `Object.keys`\n  _.keys = nativeKeys || function(obj) {\n    if (obj !== Object(obj)) throw new TypeError('Invalid object');\n    var keys = [];\n    for (var key in obj) if (_.has(obj, key)) keys.push(key);\n    return keys;\n  };\n\n  // Retrieve the values of an object's properties.\n  _.values = function(obj) {\n    var values = [];\n    for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);\n    return values;\n  };\n\n  // Convert an object into a list of `[key, value]` pairs.\n  _.pairs = function(obj) {\n    var pairs = [];\n    for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);\n    return pairs;\n  };\n\n  // Invert the keys and values of an object. The values must be serializable.\n  _.invert = function(obj) {\n    var result = {};\n    for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;\n    return result;\n  };\n\n  // Return a sorted list of the function names available on the object.\n  // Aliased as `methods`\n  _.functions = _.methods = function(obj) {\n    var names = [];\n    for (var key in obj) {\n      if (_.isFunction(obj[key])) names.push(key);\n    }\n    return names.sort();\n  };\n\n  // Extend a given object with all the properties in passed-in object(s).\n  _.extend = function(obj) {\n    each(slice.call(arguments, 1), function(source) {\n      if (source) {\n        for (var prop in source) {\n          obj[prop] = source[prop];\n        }\n      }\n    });\n    return obj;\n  };\n\n  // Return a copy of the object only containing the whitelisted properties.\n  _.pick = function(obj) {\n    var copy = {};\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n    each(keys, function(key) {\n      if (key in obj) copy[key] = obj[key];\n    });\n    return copy;\n  };\n\n   // Return a copy of the object without the blacklisted properties.\n  _.omit = function(obj) {\n    var copy = {};\n    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n    for (var key in obj) {\n      if (!_.contains(keys, key)) copy[key] = obj[key];\n    }\n    return copy;\n  };\n\n  // Fill in a given object with default properties.\n  _.defaults = function(obj) {\n    each(slice.call(arguments, 1), function(source) {\n      if (source) {\n        for (var prop in source) {\n          if (obj[prop] === void 0) obj[prop] = source[prop];\n        }\n      }\n    });\n    return obj;\n  };\n\n  // Create a (shallow-cloned) duplicate of an object.\n  _.clone = function(obj) {\n    if (!_.isObject(obj)) return obj;\n    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n  };\n\n  // Invokes interceptor with the obj, and then returns obj.\n  // The primary purpose of this method is to \"tap into\" a method chain, in\n  // order to perform operations on intermediate results within the chain.\n  _.tap = function(obj, interceptor) {\n    interceptor(obj);\n    return obj;\n  };\n\n  // Internal recursive comparison function for `isEqual`.\n  var eq = function(a, b, aStack, bStack) {\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) return a !== 0 || 1 / a == 1 / b;\n    // A strict comparison is necessary because `null == undefined`.\n    if (a == null || b == null) return a === b;\n    // Unwrap any wrapped objects.\n    if (a instanceof _) a = a._wrapped;\n    if (b instanceof _) b = b._wrapped;\n    // Compare `[[Class]]` names.\n    var className = toString.call(a);\n    if (className != toString.call(b)) return false;\n    switch (className) {\n      // Strings, numbers, dates, and booleans are compared by value.\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        return a == String(b);\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n        // other numeric values.\n        return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        return +a == +b;\n      // RegExps are compared by their source patterns and flags.\n      case '[object RegExp]':\n        return a.source == b.source &&\n               a.global == b.global &&\n               a.multiline == b.multiline &&\n               a.ignoreCase == b.ignoreCase;\n    }\n    if (typeof a != 'object' || typeof b != 'object') return false;\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] == a) return bStack[length] == b;\n    }\n    // Objects with different constructors are not equivalent, but `Object`s\n    // from different frames are.\n    var aCtor = a.constructor, bCtor = b.constructor;\n    if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&\n                             _.isFunction(bCtor) && (bCtor instanceof bCtor))) {\n      return false;\n    }\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n    var size = 0, result = true;\n    // Recursively compare objects and arrays.\n    if (className == '[object Array]') {\n      // Compare array lengths to determine if a deep comparison is necessary.\n      size = a.length;\n      result = size == b.length;\n      if (result) {\n        // Deep compare the contents, ignoring non-numeric properties.\n        while (size--) {\n          if (!(result = eq(a[size], b[size], aStack, bStack))) break;\n        }\n      }\n    } else {\n      // Deep compare objects.\n      for (var key in a) {\n        if (_.has(a, key)) {\n          // Count the expected number of properties.\n          size++;\n          // Deep compare each member.\n          if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;\n        }\n      }\n      // Ensure that both objects contain the same number of properties.\n      if (result) {\n        for (key in b) {\n          if (_.has(b, key) && !(size--)) break;\n        }\n        result = !size;\n      }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n    return result;\n  };\n\n  // Perform a deep comparison to check if two objects are equal.\n  _.isEqual = function(a, b) {\n    return eq(a, b, [], []);\n  };\n\n  // Is a given array, string, or object empty?\n  // An \"empty\" object has no enumerable own-properties.\n  _.isEmpty = function(obj) {\n    if (obj == null) return true;\n    if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;\n    for (var key in obj) if (_.has(obj, key)) return false;\n    return true;\n  };\n\n  // Is a given value a DOM element?\n  _.isElement = function(obj) {\n    return !!(obj && obj.nodeType === 1);\n  };\n\n  // Is a given value an array?\n  // Delegates to ECMA5's native Array.isArray\n  _.isArray = nativeIsArray || function(obj) {\n    return toString.call(obj) == '[object Array]';\n  };\n\n  // Is a given variable an object?\n  _.isObject = function(obj) {\n    return obj === Object(obj);\n  };\n\n  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.\n  each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {\n    _['is' + name] = function(obj) {\n      return toString.call(obj) == '[object ' + name + ']';\n    };\n  });\n\n  // Define a fallback version of the method in browsers (ahem, IE), where\n  // there isn't any inspectable \"Arguments\" type.\n  if (!_.isArguments(arguments)) {\n    _.isArguments = function(obj) {\n      return !!(obj && _.has(obj, 'callee'));\n    };\n  }\n\n  // Optimize `isFunction` if appropriate.\n  if (typeof (/./) !== 'function') {\n    _.isFunction = function(obj) {\n      return typeof obj === 'function';\n    };\n  }\n\n  // Is a given object a finite number?\n  _.isFinite = function(obj) {\n    return isFinite(obj) && !isNaN(parseFloat(obj));\n  };\n\n  // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n  _.isNaN = function(obj) {\n    return _.isNumber(obj) && obj != +obj;\n  };\n\n  // Is a given value a boolean?\n  _.isBoolean = function(obj) {\n    return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\n  };\n\n  // Is a given value equal to null?\n  _.isNull = function(obj) {\n    return obj === null;\n  };\n\n  // Is a given variable undefined?\n  _.isUndefined = function(obj) {\n    return obj === void 0;\n  };\n\n  // Shortcut function for checking if an object has a given property directly\n  // on itself (in other words, not on a prototype).\n  _.has = function(obj, key) {\n    return hasOwnProperty.call(obj, key);\n  };\n\n  // Utility Functions\n  // -----------------\n\n  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n  // previous owner. Returns a reference to the Underscore object.\n  _.noConflict = function() {\n    root._ = previousUnderscore;\n    return this;\n  };\n\n  // Keep the identity function around for default iterators.\n  _.identity = function(value) {\n    return value;\n  };\n\n  // Run a function **n** times.\n  _.times = function(n, iterator, context) {\n    var accum = Array(Math.max(0, n));\n    for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);\n    return accum;\n  };\n\n  // Return a random integer between min and max (inclusive).\n  _.random = function(min, max) {\n    if (max == null) {\n      max = min;\n      min = 0;\n    }\n    return min + Math.floor(Math.random() * (max - min + 1));\n  };\n\n  // List of HTML entities for escaping.\n  var entityMap = {\n    escape: {\n      '&': '&amp;',\n      '<': '&lt;',\n      '>': '&gt;',\n      '\"': '&quot;',\n      \"'\": '&#x27;',\n      '/': '&#x2F;'\n    }\n  };\n  entityMap.unescape = _.invert(entityMap.escape);\n\n  // Regexes containing the keys and values listed immediately above.\n  var entityRegexes = {\n    escape:   new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),\n    unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')\n  };\n\n  // Functions for escaping and unescaping strings to/from HTML interpolation.\n  _.each(['escape', 'unescape'], function(method) {\n    _[method] = function(string) {\n      if (string == null) return '';\n      return ('' + string).replace(entityRegexes[method], function(match) {\n        return entityMap[method][match];\n      });\n    };\n  });\n\n  // If the value of the named `property` is a function then invoke it with the\n  // `object` as context; otherwise, return it.\n  _.result = function(object, property) {\n    if (object == null) return void 0;\n    var value = object[property];\n    return _.isFunction(value) ? value.call(object) : value;\n  };\n\n  // Add your own custom functions to the Underscore object.\n  _.mixin = function(obj) {\n    each(_.functions(obj), function(name){\n      var func = _[name] = obj[name];\n      _.prototype[name] = function() {\n        var args = [this._wrapped];\n        push.apply(args, arguments);\n        return result.call(this, func.apply(_, args));\n      };\n    });\n  };\n\n  // Generate a unique integer id (unique within the entire client session).\n  // Useful for temporary DOM ids.\n  var idCounter = 0;\n  _.uniqueId = function(prefix) {\n    var id = ++idCounter + '';\n    return prefix ? prefix + id : id;\n  };\n\n  // By default, Underscore uses ERB-style template delimiters, change the\n  // following template settings to use alternative delimiters.\n  _.templateSettings = {\n    evaluate    : /<%([\\s\\S]+?)%>/g,\n    interpolate : /<%=([\\s\\S]+?)%>/g,\n    escape      : /<%-([\\s\\S]+?)%>/g\n  };\n\n  // When customizing `templateSettings`, if you don't want to define an\n  // interpolation, evaluation or escaping regex, we need one that is\n  // guaranteed not to match.\n  var noMatch = /(.)^/;\n\n  // Certain characters need to be escaped so that they can be put into a\n  // string literal.\n  var escapes = {\n    \"'\":      \"'\",\n    '\\\\':     '\\\\',\n    '\\r':     'r',\n    '\\n':     'n',\n    '\\t':     't',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  var escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\n\n  // JavaScript micro-templating, similar to John Resig's implementation.\n  // Underscore templating handles arbitrary delimiters, preserves whitespace,\n  // and correctly escapes quotes within interpolated code.\n  _.template = function(text, data, settings) {\n    var render;\n    settings = _.defaults({}, settings, _.templateSettings);\n\n    // Combine delimiters into one regular expression via alternation.\n    var matcher = new RegExp([\n      (settings.escape || noMatch).source,\n      (settings.interpolate || noMatch).source,\n      (settings.evaluate || noMatch).source\n    ].join('|') + '|$', 'g');\n\n    // Compile the template source, escaping string literals appropriately.\n    var index = 0;\n    var source = \"__p+='\";\n    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n      source += text.slice(index, offset)\n        .replace(escaper, function(match) { return '\\\\' + escapes[match]; });\n\n      if (escape) {\n        source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n      }\n      if (interpolate) {\n        source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n      }\n      if (evaluate) {\n        source += \"';\\n\" + evaluate + \"\\n__p+='\";\n      }\n      index = offset + match.length;\n      return match;\n    });\n    source += \"';\\n\";\n\n    // If a variable is not specified, place data values in local scope.\n    if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n    source = \"var __t,__p='',__j=Array.prototype.join,\" +\n      \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n      source + \"return __p;\\n\";\n\n    try {\n      render = new Function(settings.variable || 'obj', '_', source);\n    } catch (e) {\n      e.source = source;\n      throw e;\n    }\n\n    if (data) return render(data, _);\n    var template = function(data) {\n      return render.call(this, data, _);\n    };\n\n    // Provide the compiled function source as a convenience for precompilation.\n    template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\n\n    return template;\n  };\n\n  // Add a \"chain\" function, which will delegate to the wrapper.\n  _.chain = function(obj) {\n    return _(obj).chain();\n  };\n\n  // OOP\n  // ---------------\n  // If Underscore is called as a function, it returns a wrapped object that\n  // can be used OO-style. This wrapper holds altered versions of all the\n  // underscore functions. Wrapped objects may be chained.\n\n  // Helper function to continue chaining intermediate results.\n  var result = function(obj) {\n    return this._chain ? _(obj).chain() : obj;\n  };\n\n  // Add all of the Underscore functions to the wrapper object.\n  _.mixin(_);\n\n  // Add all mutator Array functions to the wrapper.\n  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      var obj = this._wrapped;\n      method.apply(obj, arguments);\n      if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];\n      return result.call(this, obj);\n    };\n  });\n\n  // Add all accessor Array functions to the wrapper.\n  each(['concat', 'join', 'slice'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      return result.call(this, method.apply(this._wrapped, arguments));\n    };\n  });\n\n  _.extend(_.prototype, {\n\n    // Start chaining a wrapped Underscore object.\n    chain: function() {\n      this._chain = true;\n      return this;\n    },\n\n    // Extracts the result from a wrapped and chained object.\n    value: function() {\n      return this._wrapped;\n    }\n\n  });\n\n}).call(this);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nexport default baseGetTag;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n  return typeof value == 'string' ||\n    (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nexport default overArg;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nexport default assocIndexOf;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nexport default listCacheDelete;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nexport default listCacheClear;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nexport default listCacheSet;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nexport default hashSet;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nexport default getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nexport default isKeyable;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nexport default mapCacheClear;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nexport default mapCacheSet;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n","import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nexport default stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nexport default stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nexport default stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nexport default stackHas;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nexport default stackSet;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nexport default defineProperty;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nexport default baseAssignValue;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nexport default assignValue;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\nexport default copyObject;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nexport default stubFalse;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nexport default baseUnary;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nexport default baseTimes;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nexport default isPrototype;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default baseKeys;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default baseKeysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nexport default nativeKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\nexport default cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\nexport default copyArray;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nexport default stubArray;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nexport default getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nexport default arrayFilter;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nexport default arrayPush;\n","import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n  var result = [];\n  while (object) {\n    arrayPush(result, getSymbols(object));\n    object = getPrototype(object);\n  }\n  return result;\n};\n\nexport default getSymbolsIn;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n  return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nexport default getTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = new array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\nexport default initCloneArray;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\nexport default cloneArrayBuffer;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\nexport default cloneRegExp;\n","import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return new Ctor;\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return new Ctor;\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\nexport default initCloneByTag;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\nexport default baseCreate;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\nexport default initCloneObject;\n","import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n  return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n","import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n  return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n","import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_FLAT_FLAG = 2,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Deep clone\n *  2 - Flatten inherited properties\n *  4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n  var result,\n      isDeep = bitmask & CLONE_DEEP_FLAG,\n      isFlat = bitmask & CLONE_FLAT_FLAG,\n      isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      result = (isFlat || isFunc) ? {} : initCloneObject(value);\n      if (!isDeep) {\n        return isFlat\n          ? copySymbolsIn(value, baseAssignIn(result, value))\n          : copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (isSet(value)) {\n    value.forEach(function(subValue) {\n      result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n    });\n  } else if (isMap(value)) {\n    value.forEach(function(subValue, key) {\n      result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n    });\n  }\n\n  var keysFunc = isFull\n    ? (isFlat ? getAllKeysIn : getAllKeys)\n    : (isFlat ? keysIn : keys);\n\n  var props = isArr ? undefined : keysFunc(value);\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n  });\n  return result;\n}\n\nexport default baseClone;\n","import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n  return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n  return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n","import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n","import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\nexport default arrayEach;\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n *   if (_.isElement(value)) {\n *     return value.cloneNode(true);\n *   }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\nfunction cloneDeepWith(value, customizer) {\n  customizer = typeof customizer == 'function' ? customizer : undefined;\n  return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n}\n\nexport default cloneDeepWith;\n","import isObjectLike from './isObjectLike.js';\nimport isPlainObject from './isPlainObject.js';\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\nfunction isElement(value) {\n  return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n}\n\nexport default isElement;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\nexport default assignMergeValue;\n","import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\nexport default createBaseFor;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key === 'constructor' && typeof object[key] === 'function') {\n    return;\n  }\n\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\nexport default safeGet;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    stack || (stack = new Stack);\n    if (isObject(srcValue)) {\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nexport default identity;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\nexport default overRest;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\nexport default baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\nexport default constant;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\nexport default shortOut;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\nexport default createAssigner;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\nexport default isIterateeCall;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n *   'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n *   'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n  baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { isObject, isString, isPlainObject, cloneDeepWith, isElement, isFunction, merge } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /* globals window, document */ /**\n * @module utils/dom/global\n */ // This interface exists to make our API pages more readable.\n/**\n * A helper (module) giving an access to the global DOM objects such as `window` and `document`.\n */ /**\n * A helper (module) giving an access to the global DOM objects such as `window` and\n * `document`. Accessing these objects using this helper allows easy and bulletproof\n * testing, i.e. stubbing native properties:\n *\n * ```ts\n * import { global } from 'ckeditor5/utils';\n *\n * // This stub will work for any code using global module.\n * testUtils.sinon.stub( global, 'window', {\n * \tinnerWidth: 10000\n * } );\n *\n * console.log( global.window.innerWidth );\n * ```\n */ let globalVar; // named globalVar instead of global: https://github.com/ckeditor/ckeditor5/issues/12971\n// In some environments window and document API might not be available.\ntry {\n    globalVar = {\n        window,\n        document\n    };\n} catch (e) {\n    // It's not possible to mock a window object to simulate lack of a window object without writing extremely convoluted code.\n    /* istanbul ignore next -- @preserve */ // Let's cast it to not change module's API.\n    // We only handle this so loading editor in environments without window and document doesn't fail.\n    // For better DX we shouldn't introduce mixed types and require developers to check the type manually.\n    // This module should not be used on purpose in any environment outside browser.\n    globalVar = {\n        window: {},\n        document: {}\n    };\n}\nvar global = globalVar;\n\n/**\n * Safely returns `userAgent` from browser's navigator API in a lower case.\n * If navigator API is not available it will return an empty string.\n */ function getUserAgent() {\n    // In some environments navigator API might not be available.\n    try {\n        return navigator.userAgent.toLowerCase();\n    } catch (e) {\n        return '';\n    }\n}\nconst userAgent = /* #__PURE__ */ getUserAgent();\n/**\n * A namespace containing environment and browser information.\n */ const env = {\n    isMac: /* #__PURE__ */ isMac(userAgent),\n    isWindows: /* #__PURE__ */ isWindows(userAgent),\n    isGecko: /* #__PURE__ */ isGecko(userAgent),\n    isSafari: /* #__PURE__ */ isSafari(userAgent),\n    isiOS: /* #__PURE__ */ isiOS(userAgent),\n    isAndroid: /* #__PURE__ */ isAndroid(userAgent),\n    isBlink: /* #__PURE__ */ isBlink(userAgent),\n    get isMediaForcedColors () {\n        return isMediaForcedColors();\n    },\n    get isMotionReduced () {\n        return isMotionReduced();\n    },\n    features: {\n        isRegExpUnicodePropertySupported: /* #__PURE__ */ isRegExpUnicodePropertySupported()\n    }\n};\n/**\n * Checks if User Agent represented by the string is running on Macintosh.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is running on Macintosh or not.\n */ function isMac(userAgent) {\n    return userAgent.indexOf('macintosh') > -1;\n}\n/**\n * Checks if User Agent represented by the string is running on Windows.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is running on Windows or not.\n */ function isWindows(userAgent) {\n    return userAgent.indexOf('windows') > -1;\n}\n/**\n * Checks if User Agent represented by the string is Firefox (Gecko).\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Firefox or not.\n */ function isGecko(userAgent) {\n    return !!userAgent.match(/gecko\\/\\d+/);\n}\n/**\n * Checks if User Agent represented by the string is Safari.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Safari or not.\n */ function isSafari(userAgent) {\n    return userAgent.indexOf(' applewebkit/') > -1 && userAgent.indexOf('chrome') === -1;\n}\n/**\n * Checks if User Agent represented by the string is running in iOS.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is running in iOS or not.\n */ function isiOS(userAgent) {\n    // \"Request mobile site\" || \"Request desktop site\".\n    return !!userAgent.match(/iphone|ipad/i) || isMac(userAgent) && navigator.maxTouchPoints > 0;\n}\n/**\n * Checks if User Agent represented by the string is Android mobile device.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Safari or not.\n */ function isAndroid(userAgent) {\n    return userAgent.indexOf('android') > -1;\n}\n/**\n * Checks if User Agent represented by the string is Blink engine.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Blink engine or not.\n */ function isBlink(userAgent) {\n    // The Edge browser before switching to the Blink engine used to report itself as Chrome (and \"Edge/\")\n    // but after switching to the Blink it replaced \"Edge/\" with \"Edg/\".\n    return userAgent.indexOf('chrome/') > -1 && userAgent.indexOf('edge/') < 0;\n}\n/**\n * Checks if the current environment supports ES2018 Unicode properties like `\\p{P}` or `\\p{L}`.\n * More information about unicode properties might be found\n * [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).\n */ function isRegExpUnicodePropertySupported() {\n    let isSupported = false;\n    // Feature detection for Unicode properties. Added in ES2018. Currently Firefox does not support it.\n    // See https://github.com/ckeditor/ckeditor5-mention/issues/44#issuecomment-487002174.\n    try {\n        // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n        isSupported = 'ć'.search(new RegExp('[\\\\p{L}]', 'u')) === 0;\n    } catch (error) {\n    // Firefox throws a SyntaxError when the group is unsupported.\n    }\n    return isSupported;\n}\n/**\n * Checks if the user agent has enabled a forced colors mode (e.g. Windows High Contrast mode).\n *\n * Returns `false` in environments where `window` global object is not available.\n */ function isMediaForcedColors() {\n    return global.window.matchMedia ? global.window.matchMedia('(forced-colors: active)').matches : false;\n}\n/**\n * Checks if the user enabled \"prefers reduced motion\" setting in browser.\n *\n * Returns `false` in environments where `window` global object is not available.\n */ function isMotionReduced() {\n    return global.window.matchMedia ? global.window.matchMedia('(prefers-reduced-motion)').matches : false;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/fastdiff\n */ /**\n * Finds positions of the first and last change in the given string/array and generates a set of changes:\n *\n * ```ts\n * fastDiff( '12a', '12xyza' );\n * // [ { index: 2, type: 'insert', values: [ 'x', 'y', 'z' ] } ]\n *\n * fastDiff( '12a', '12aa' );\n * // [ { index: 3, type: 'insert', values: [ 'a' ] } ]\n *\n * fastDiff( '12xyza', '12a' );\n * // [ { index: 2, type: 'delete', howMany: 3 } ]\n *\n * fastDiff( [ '1', '2', 'a', 'a' ], [ '1', '2', 'a' ] );\n * // [ { index: 3, type: 'delete', howMany: 1 } ]\n *\n * fastDiff( [ '1', '2', 'a', 'b', 'c', '3' ], [ '2', 'a', 'b' ] );\n * // [ { index: 0, type: 'insert', values: [ '2', 'a', 'b' ] }, { index: 3, type: 'delete', howMany: 6 } ]\n * ```\n *\n * Passed arrays can contain any type of data, however to compare them correctly custom comparator function\n * should be passed as a third parameter:\n *\n * ```ts\n * fastDiff( [ { value: 1 }, { value: 2 } ], [ { value: 1 }, { value: 3 } ], ( a, b ) => {\n * \treturn a.value === b.value;\n * } );\n * // [ { index: 1, type: 'insert', values: [ { value: 3 } ] }, { index: 2, type: 'delete', howMany: 1 } ]\n * ```\n *\n * The resulted set of changes can be applied to the input in order to transform it into the output, for example:\n *\n * ```ts\n * let input = '12abc3';\n * const output = '2ab';\n * const changes = fastDiff( input, output );\n *\n * changes.forEach( change => {\n * \tif ( change.type == 'insert' ) {\n * \t\tinput = input.substring( 0, change.index ) + change.values.join( '' ) + input.substring( change.index );\n * \t} else if ( change.type == 'delete' ) {\n * \t\tinput = input.substring( 0, change.index ) + input.substring( change.index + change.howMany );\n * \t}\n * } );\n *\n * // input equals output now\n * ```\n *\n * or in case of arrays:\n *\n * ```ts\n * let input = [ '1', '2', 'a', 'b', 'c', '3' ];\n * const output = [ '2', 'a', 'b' ];\n * const changes = fastDiff( input, output );\n *\n * changes.forEach( change => {\n * \tif ( change.type == 'insert' ) {\n * \t\tinput = input.slice( 0, change.index ).concat( change.values, input.slice( change.index ) );\n * \t} else if ( change.type == 'delete' ) {\n * \t\tinput = input.slice( 0, change.index ).concat( input.slice( change.index + change.howMany ) );\n * \t}\n * } );\n *\n * // input equals output now\n * ```\n *\n * By passing `true` as the fourth parameter (`atomicChanges`) the output of this function will become compatible with\n * the {@link module:utils/diff~diff `diff()`} function:\n *\n * ```ts\n * fastDiff( '12a', '12xyza', undefined, true );\n * // [ 'equal', 'equal', 'insert', 'insert', 'insert', 'equal' ]\n * ```\n *\n * The default output format of this function is compatible with the output format of\n * {@link module:utils/difftochanges~diffToChanges `diffToChanges()`}. The `diffToChanges()` input format is, in turn,\n * compatible with the output of {@link module:utils/diff~diff `diff()`}:\n *\n * ```ts\n * const a = '1234';\n * const b = '12xyz34';\n *\n * // Both calls will return the same results (grouped changes format).\n * fastDiff( a, b );\n * diffToChanges( diff( a, b ) );\n *\n * // Again, both calls will return the same results (atomic changes format).\n * fastDiff( a, b, undefined, true );\n * diff( a, b );\n * ```\n *\n * @typeParam T The type of array elements.\n * @typeParam AtomicChanges The type of `atomicChanges` parameter (selects the result type).\n * @param a Input array or string.\n * @param b Input array or string.\n * @param cmp Optional function used to compare array values, by default `===` (strict equal operator) is used.\n * @param atomicChanges Whether an array of `inset|delete|equal` operations should\n * be returned instead of changes set. This makes this function compatible with {@link module:utils/diff~diff `diff()`}.\n * Defaults to `false`.\n * @returns Array of changes. The elements are either {@link module:utils/diff~DiffResult} or {@link module:utils/difftochanges~Change},\n * depending on `atomicChanges` parameter.\n */ function fastDiff(a, b, cmp, atomicChanges) {\n    // Set the comparator function.\n    cmp = cmp || function(a, b) {\n        return a === b;\n    };\n    // Convert the string (or any array-like object - eg. NodeList) to an array by using the slice() method because,\n    // unlike Array.from(), it returns array of UTF-16 code units instead of the code points of a string.\n    // One code point might be a surrogate pair of two code units. All text offsets are expected to be in code units.\n    // See ckeditor/ckeditor5#3147.\n    //\n    // We need to make sure here that fastDiff() works identical to diff().\n    const arrayA = Array.isArray(a) ? a : Array.prototype.slice.call(a);\n    const arrayB = Array.isArray(b) ? b : Array.prototype.slice.call(b);\n    // Find first and last change.\n    const changeIndexes = findChangeBoundaryIndexes(arrayA, arrayB, cmp);\n    // Transform into changes array.\n    const result = atomicChanges ? changeIndexesToAtomicChanges(changeIndexes, arrayB.length) : changeIndexesToChanges(arrayB, changeIndexes);\n    return result;\n}\n/**\n * Finds position of the first and last change in the given arrays. For example:\n *\n * ```ts\n * const indexes = findChangeBoundaryIndexes( [ '1', '2', '3', '4' ], [ '1', '3', '4', '2', '4' ] );\n * console.log( indexes ); // { firstIndex: 1, lastIndexOld: 3, lastIndexNew: 4 }\n * ```\n *\n * The above indexes means that in the first array the modified part is `1[23]4` and in the second array it is `1[342]4`.\n * Based on such indexes, array with `insert`/`delete` operations which allows transforming first value into the second one\n * can be generated.\n */ function findChangeBoundaryIndexes(arr1, arr2, cmp) {\n    // Find the first difference between passed values.\n    const firstIndex = findFirstDifferenceIndex(arr1, arr2, cmp);\n    // If arrays are equal return -1 indexes object.\n    if (firstIndex === -1) {\n        return {\n            firstIndex: -1,\n            lastIndexOld: -1,\n            lastIndexNew: -1\n        };\n    }\n    // Remove the common part of each value and reverse them to make it simpler to find the last difference between them.\n    const oldArrayReversed = cutAndReverse(arr1, firstIndex);\n    const newArrayReversed = cutAndReverse(arr2, firstIndex);\n    // Find the first difference between reversed values.\n    // It should be treated as \"how many elements from the end the last difference occurred\".\n    //\n    // For example:\n    //\n    // \t\t\t\tinitial\t->\tafter cut\t-> reversed:\n    // oldValue:\t'321ba'\t->\t'21ba'\t\t-> 'ab12'\n    // newValue:\t'31xba'\t->\t'1xba'\t\t-> 'abx1'\n    // lastIndex:\t\t\t\t\t\t\t-> 2\n    //\n    // So the last change occurred two characters from the end of the arrays.\n    const lastIndex = findFirstDifferenceIndex(oldArrayReversed, newArrayReversed, cmp);\n    // Use `lastIndex` to calculate proper offset, starting from the beginning (`lastIndex` kind of starts from the end).\n    const lastIndexOld = arr1.length - lastIndex;\n    const lastIndexNew = arr2.length - lastIndex;\n    return {\n        firstIndex,\n        lastIndexOld,\n        lastIndexNew\n    };\n}\n/**\n * Returns a first index on which given arrays differ. If both arrays are the same, -1 is returned.\n */ function findFirstDifferenceIndex(arr1, arr2, cmp) {\n    for(let i = 0; i < Math.max(arr1.length, arr2.length); i++){\n        if (arr1[i] === undefined || arr2[i] === undefined || !cmp(arr1[i], arr2[i])) {\n            return i;\n        }\n    }\n    return -1; // Return -1 if arrays are equal.\n}\n/**\n * Returns a copy of the given array with `howMany` elements removed starting from the beginning and in reversed order.\n *\n * @param arr Array to be processed.\n * @param howMany How many elements from array beginning to remove.\n * @returns Shortened and reversed array.\n */ function cutAndReverse(arr, howMany) {\n    return arr.slice(howMany).reverse();\n}\n/**\n * Generates changes array based on change indexes from `findChangeBoundaryIndexes` function. This function will\n * generate array with 0 (no changes), 1 (deletion or insertion) or 2 records (insertion and deletion).\n *\n * @param newArray New array for which change indexes were calculated.\n * @param changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n * @returns Array of changes compatible with {@link module:utils/difftochanges~diffToChanges} format.\n */ function changeIndexesToChanges(newArray, changeIndexes) {\n    const result = [];\n    const { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n    // Order operations as 'insert', 'delete' array to keep compatibility with {@link module:utils/difftochanges~diffToChanges}\n    // in most cases. However, 'diffToChanges' does not stick to any order so in some cases\n    // (for example replacing '12345' with 'abcd') it will generate 'delete', 'insert' order.\n    if (lastIndexNew - firstIndex > 0) {\n        result.push({\n            index: firstIndex,\n            type: 'insert',\n            values: newArray.slice(firstIndex, lastIndexNew)\n        });\n    }\n    if (lastIndexOld - firstIndex > 0) {\n        result.push({\n            index: firstIndex + (lastIndexNew - firstIndex),\n            type: 'delete',\n            howMany: lastIndexOld - firstIndex\n        });\n    }\n    return result;\n}\n/**\n * Generates array with set `equal|insert|delete` operations based on change indexes from `findChangeBoundaryIndexes` function.\n *\n * @param changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n * @param newLength Length of the new array on which `findChangeBoundaryIndexes` calculated change indexes.\n * @returns Array of changes compatible with {@link module:utils/diff~diff} format.\n */ function changeIndexesToAtomicChanges(changeIndexes, newLength) {\n    const { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n    // No changes.\n    if (firstIndex === -1) {\n        return Array(newLength).fill('equal');\n    }\n    let result = [];\n    if (firstIndex > 0) {\n        result = result.concat(Array(firstIndex).fill('equal'));\n    }\n    if (lastIndexNew - firstIndex > 0) {\n        result = result.concat(Array(lastIndexNew - firstIndex).fill('insert'));\n    }\n    if (lastIndexOld - firstIndex > 0) {\n        result = result.concat(Array(lastIndexOld - firstIndex).fill('delete'));\n    }\n    if (lastIndexNew < newLength) {\n        result = result.concat(Array(newLength - lastIndexNew).fill('equal'));\n    }\n    return result;\n}\n\n// The following code is based on the \"O(NP) Sequence Comparison Algorithm\"\n// by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n/**\n * Calculates the difference between two arrays or strings producing an array containing a list of changes\n * necessary to transform input into output.\n *\n * ```ts\n * diff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ]\n * ```\n *\n * This function is based on the \"O(NP) Sequence Comparison Algorithm\" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n * Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).\n * Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting\n * such a scenario. The return formats of both functions are identical.\n *\n * @param a Input array or string.\n * @param b Output array or string.\n * @param cmp Optional function used to compare array values, by default === is used.\n * @returns Array of changes.\n */ function diff(a, b, cmp) {\n    // Set the comparator function.\n    cmp = cmp || function(a, b) {\n        return a === b;\n    };\n    const aLength = a.length;\n    const bLength = b.length;\n    // Perform `fastDiff` for longer strings/arrays (see #269).\n    if (aLength > 200 || bLength > 200 || aLength + bLength > 300) {\n        return diff.fastDiff(a, b, cmp, true);\n    }\n    // Temporary action type statics.\n    let _insert, _delete;\n    // Swapped the arrays to use the shorter one as the first one.\n    if (bLength < aLength) {\n        const tmp = a;\n        a = b;\n        b = tmp;\n        // We swap the action types as well.\n        _insert = 'delete';\n        _delete = 'insert';\n    } else {\n        _insert = 'insert';\n        _delete = 'delete';\n    }\n    const m = a.length;\n    const n = b.length;\n    const delta = n - m;\n    // Edit scripts, for each diagonal.\n    const es = {};\n    // Furthest points, the furthest y we can get on each diagonal.\n    const fp = {};\n    function snake(k) {\n        // We use -1 as an alternative below to handle initial values ( instead of filling the fp with -1 first ).\n        // Furthest points (y) on the diagonal below k.\n        const y1 = (fp[k - 1] !== undefined ? fp[k - 1] : -1) + 1;\n        // Furthest points (y) on the diagonal above k.\n        const y2 = fp[k + 1] !== undefined ? fp[k + 1] : -1;\n        // The way we should go to get further.\n        const dir = y1 > y2 ? -1 : 1;\n        // Clone previous changes array (if any).\n        if (es[k + dir]) {\n            es[k] = es[k + dir].slice(0);\n        }\n        // Create changes array.\n        if (!es[k]) {\n            es[k] = [];\n        }\n        // Push the action.\n        es[k].push(y1 > y2 ? _insert : _delete);\n        // Set the beginning coordinates.\n        let y = Math.max(y1, y2);\n        let x = y - k;\n        // Traverse the diagonal as long as the values match.\n        while(x < m && y < n && cmp(a[x], b[y])){\n            x++;\n            y++;\n            // Push no change action.\n            es[k].push('equal');\n        }\n        return y;\n    }\n    let p = 0;\n    let k;\n    // Traverse the graph until we reach the end of the longer string.\n    do {\n        // Updates furthest points and edit scripts for diagonals below delta.\n        for(k = -p; k < delta; k++){\n            fp[k] = snake(k);\n        }\n        // Updates furthest points and edit scripts for diagonals above delta.\n        for(k = delta + p; k > delta; k--){\n            fp[k] = snake(k);\n        }\n        // Updates furthest point and edit script for the delta diagonal.\n        // note that the delta diagonal is the one which goes through the sink (m, n).\n        fp[delta] = snake(delta);\n        p++;\n    }while (fp[delta] !== n)\n    // Return the final list of edit changes.\n    // We remove the first item that represents the action for the injected nulls.\n    return es[delta].slice(1);\n}\n// Store the API in static property to easily overwrite it in tests.\n// Too bad dependency injection does not work in Webpack + ES 6 (const) + Babel.\ndiff.fastDiff = fastDiff;\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/difftochanges\n */ /**\n * Creates a set of changes which need to be applied to the input in order to transform\n * it into the output. This function can be used with strings or arrays.\n *\n * ```ts\n * const input = Array.from( 'abc' );\n * const output = Array.from( 'xaby' );\n * const changes = diffToChanges( diff( input, output ), output );\n *\n * changes.forEach( change => {\n * \tif ( change.type == 'insert' ) {\n * \t\tinput.splice( change.index, 0, ...change.values );\n * \t} else if ( change.type == 'delete' ) {\n * \t\tinput.splice( change.index, change.howMany );\n * \t}\n * } );\n *\n * input.join( '' ) == output.join( '' ); // -> true\n * ```\n *\n * @typeParam T The type of output array element.\n * @param diff Result of {@link module:utils/diff~diff}.\n * @param output The string or array which was passed as diff's output.\n * @returns Set of changes (insert or delete) which need to be applied to the input\n * in order to transform it into the output.\n */ function diffToChanges(diff, output) {\n    const changes = [];\n    let index = 0;\n    let lastOperation = null;\n    diff.forEach((change)=>{\n        if (change == 'equal') {\n            pushLast();\n            index++;\n        } else if (change == 'insert') {\n            if (lastOperation && lastOperation.type == 'insert') {\n                lastOperation.values.push(output[index]);\n            } else {\n                pushLast();\n                lastOperation = {\n                    type: 'insert',\n                    index,\n                    values: [\n                        output[index]\n                    ]\n                };\n            }\n            index++;\n        } else /* if ( change == 'delete' ) */ {\n            if (lastOperation && lastOperation.type == 'delete') {\n                lastOperation.howMany++;\n            } else {\n                pushLast();\n                lastOperation = {\n                    type: 'delete',\n                    index,\n                    howMany: 1\n                };\n            }\n        }\n    });\n    pushLast();\n    return changes;\n    function pushLast() {\n        if (lastOperation) {\n            changes.push(lastOperation);\n            lastOperation = null;\n        }\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/mix\n */ /**\n * Copies enumerable properties and symbols from the objects given as 2nd+ parameters to the\n * prototype of first object (a constructor).\n *\n * ```\n * class Editor {\n * \t...\n * }\n *\n * const SomeMixin = {\n * \ta() {\n * \t\treturn 'a';\n * \t}\n * };\n *\n * mix( Editor, SomeMixin, ... );\n *\n * new Editor().a(); // -> 'a'\n * ```\n *\n * Note: Properties which already exist in the base class will not be overriden.\n *\n * @deprecated Use mixin pattern, see: https://www.typescriptlang.org/docs/handbook/mixins.html.\n * @param baseClass Class which prototype will be extended.\n * @param mixins Objects from which to get properties.\n */ function mix(baseClass, ...mixins) {\n    mixins.forEach((mixin)=>{\n        const propertyNames = Object.getOwnPropertyNames(mixin);\n        const propertySymbols = Object.getOwnPropertySymbols(mixin);\n        propertyNames.concat(propertySymbols).forEach((key)=>{\n            if (key in baseClass.prototype) {\n                return;\n            }\n            if (typeof mixin == 'function' && (key == 'length' || key == 'name' || key == 'prototype')) {\n                return;\n            }\n            const sourceDescriptor = Object.getOwnPropertyDescriptor(mixin, key);\n            sourceDescriptor.enumerable = false;\n            Object.defineProperty(baseClass.prototype, key, sourceDescriptor);\n        });\n    });\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/spy\n */ /**\n * Creates a spy function (ala Sinon.js) that can be used to inspect call to it.\n *\n * The following are the present features:\n *\n * * spy.called: property set to `true` if the function has been called at least once.\n *\n * @returns The spy function.\n */ function spy() {\n    return function spy() {\n        spy.called = true;\n    };\n}\n\n/**\n * The event object passed to event callbacks. It is used to provide information about the event as well as a tool to\n * manipulate it.\n */ class EventInfo {\n    /**\n\t * The object that fired the event.\n\t */ source;\n    /**\n\t * The event name.\n\t */ name;\n    /**\n\t * Path this event has followed. See {@link module:utils/emittermixin~Emitter#delegate}.\n\t */ path;\n    /**\n\t * Stops the event emitter to call further callbacks for this event interaction.\n\t */ stop;\n    /**\n\t * Removes the current callback from future interactions of this event.\n\t */ off;\n    /**\n\t * The value which will be returned by {@link module:utils/emittermixin~Emitter#fire}.\n\t *\n\t * It's `undefined` by default and can be changed by an event listener:\n\t *\n\t * ```ts\n\t * dataController.fire( 'getSelectedContent', ( evt ) => {\n\t * \t// This listener will make `dataController.fire( 'getSelectedContent' )`\n\t * \t// always return an empty DocumentFragment.\n\t * \tevt.return = new DocumentFragment();\n\t *\n\t * \t// Make sure no other listeners are executed.\n\t * \tevt.stop();\n\t * } );\n\t * ```\n\t */ return;\n    /**\n\t * @param source The emitter.\n\t * @param name The event name.\n\t */ constructor(source, name){\n        this.source = source;\n        this.name = name;\n        this.path = [];\n        // The following methods are defined in the constructor because they must be re-created per instance.\n        this.stop = spy();\n        this.off = spy();\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/uid\n */ /**\n * A hash table of hex numbers to avoid using toString() in uid() which is costly.\n * [ '00', '01', '02', ..., 'fe', 'ff' ]\n */ const HEX_NUMBERS = new Array(256).fill('').map((_, index)=>('0' + index.toString(16)).slice(-2));\n/**\n * Returns a unique id. The id starts with an \"e\" character and a randomly generated string of\n * 32 alphanumeric characters.\n *\n * **Note**: The characters the unique id is built from correspond to the hex number notation\n * (from \"0\" to \"9\", from \"a\" to \"f\"). In other words, each id corresponds to an \"e\" followed\n * by 16 8-bit numbers next to each other.\n *\n * @returns An unique id string.\n */ function uid() {\n    // Let's create some positive random 32bit integers first.\n    const [r1, r2, r3, r4] = crypto.getRandomValues(new Uint32Array(4));\n    // Make sure that id does not start with number.\n    return 'e' + HEX_NUMBERS[r1 >> 0 & 0xFF] + HEX_NUMBERS[r1 >> 8 & 0xFF] + HEX_NUMBERS[r1 >> 16 & 0xFF] + HEX_NUMBERS[r1 >> 24 & 0xFF] + HEX_NUMBERS[r2 >> 0 & 0xFF] + HEX_NUMBERS[r2 >> 8 & 0xFF] + HEX_NUMBERS[r2 >> 16 & 0xFF] + HEX_NUMBERS[r2 >> 24 & 0xFF] + HEX_NUMBERS[r3 >> 0 & 0xFF] + HEX_NUMBERS[r3 >> 8 & 0xFF] + HEX_NUMBERS[r3 >> 16 & 0xFF] + HEX_NUMBERS[r3 >> 24 & 0xFF] + HEX_NUMBERS[r4 >> 0 & 0xFF] + HEX_NUMBERS[r4 >> 8 & 0xFF] + HEX_NUMBERS[r4 >> 16 & 0xFF] + HEX_NUMBERS[r4 >> 24 & 0xFF];\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/priorities\n */ /**\n * String representing a priority value.\n */ /**\n * Provides group of constants to use instead of hardcoding numeric priority values.\n */ const priorities = {\n    get (priority = 'normal') {\n        if (typeof priority != 'number') {\n            return this[priority] || this.normal;\n        } else {\n            return priority;\n        }\n    },\n    highest: 100000,\n    high: 1000,\n    normal: 0,\n    low: -1000,\n    lowest: -100000\n};\n\n/**\n * Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.\n *\n * @param objects Array of objects with priority to insert object to.\n * @param objectToInsert Object with `priority` property.\n */ function insertToPriorityArray(objects, objectToInsert) {\n    const priority = priorities.get(objectToInsert.priority);\n    for(let i = 0; i < objects.length; i++){\n        if (priorities.get(objects[i].priority) < priority) {\n            objects.splice(i, 0, objectToInsert);\n            return;\n        }\n    }\n    objects.push(objectToInsert);\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/ckeditorerror\n */ /* globals console */ /**\n * URL to the documentation with error codes.\n */ const DOCUMENTATION_URL = 'https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html';\n/**\n * The CKEditor error class.\n *\n * You should throw `CKEditorError` when:\n *\n * * An unexpected situation occurred and the editor (most probably) will not work properly. Such exception will be handled\n * by the {@link module:watchdog/watchdog~Watchdog watchdog} (if it is integrated),\n * * If the editor is incorrectly integrated or the editor API is used in the wrong way. This way you will give\n * feedback to the developer as soon as possible. Keep in mind that for common integration issues which should not\n * stop editor initialization (like missing upload adapter, wrong name of a toolbar component) we use\n * {@link module:utils/ckeditorerror~logWarning `logWarning()`} and\n * {@link module:utils/ckeditorerror~logError `logError()`}\n * to improve developers experience and let them see the a working editor as soon as possible.\n *\n * ```ts\n * /**\n *  * Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.\n *  *\n *  * @error plugin-load\n *  * @param pluginName The name of the plugin that could not be loaded.\n *  * @param moduleName The name of the module which tried to load this plugin.\n *  *\\/\n * throw new CKEditorError( 'plugin-load', {\n * \tpluginName: 'foo',\n * \tmoduleName: 'bar'\n * } );\n * ```\n */ class CKEditorError extends Error {\n    /**\n\t * A context of the error by which the Watchdog is able to determine which editor crashed.\n\t */ context;\n    /**\n\t * The additional error data passed to the constructor. Undefined if none was passed.\n\t */ data;\n    /**\n\t * Creates an instance of the CKEditorError class.\n\t *\n\t * @param errorName The error id in an `error-name` format. A link to this error documentation page will be added\n\t * to the thrown error's `message`.\n\t * @param context A context of the error by which the {@link module:watchdog/watchdog~Watchdog watchdog}\n\t * is able to determine which editor crashed. It should be an editor instance or a property connected to it. It can be also\n\t * a `null` value if the editor should not be restarted in case of the error (e.g. during the editor initialization).\n\t * The error context should be checked using the `areConnectedThroughProperties( editor, context )` utility\n\t * to check if the object works as the context.\n\t * @param data Additional data describing the error. A stringified version of this object\n\t * will be appended to the error message, so the data are quickly visible in the console. The original\n\t * data object will also be later available under the {@link #data} property.\n\t */ constructor(errorName, context, data){\n        super(getErrorMessage(errorName, data));\n        this.name = 'CKEditorError';\n        this.context = context;\n        this.data = data;\n    }\n    /**\n\t * Checks if the error is of the `CKEditorError` type.\n\t */ is(type) {\n        return type === 'CKEditorError';\n    }\n    /**\n\t * A utility that ensures that the thrown error is a {@link module:utils/ckeditorerror~CKEditorError} one.\n\t * It is useful when combined with the {@link module:watchdog/watchdog~Watchdog} feature, which can restart the editor in case\n\t * of a {@link module:utils/ckeditorerror~CKEditorError} error.\n\t *\n\t * @param err The error to rethrow.\n\t * @param context An object connected through properties with the editor instance. This context will be used\n\t * by the watchdog to verify which editor should be restarted.\n\t */ static rethrowUnexpectedError(err, context) {\n        if (err.is && err.is('CKEditorError')) {\n            throw err;\n        }\n        /**\n\t\t * An unexpected error occurred inside the CKEditor 5 codebase. This error will look like the original one\n\t\t * to make the debugging easier.\n\t\t *\n\t\t * This error is only useful when the editor is initialized using the {@link module:watchdog/watchdog~Watchdog} feature.\n\t\t * In case of such error (or any {@link module:utils/ckeditorerror~CKEditorError} error) the watchdog should restart the editor.\n\t\t *\n\t\t * @error unexpected-error\n\t\t */ const error = new CKEditorError(err.message, context);\n        // Restore the original stack trace to make the error look like the original one.\n        // See https://github.com/ckeditor/ckeditor5/issues/5595 for more details.\n        error.stack = err.stack;\n        throw error;\n    }\n}\n/**\n * Logs a warning to the console with a properly formatted message and adds a link to the documentation.\n * Use whenever you want to log a warning to the console.\n *\n * ```ts\n * /**\n *  * There was a problem processing the configuration of the toolbar. The item with the given\n *  * name does not exist, so it was omitted when rendering the toolbar.\n *  *\n *  * @error toolbarview-item-unavailable\n *  * @param {String} name The name of the component.\n *  *\\/\n * logWarning( 'toolbarview-item-unavailable', { name } );\n * ```\n *\n * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to throw an error and when to log\n * a warning or an error to the console.\n *\n * @param errorName The error name to be logged.\n * @param data Additional data to be logged.\n */ function logWarning(errorName, data) {\n    console.warn(...formatConsoleArguments(errorName, data));\n}\n/**\n * Logs an error to the console with a properly formatted message and adds a link to the documentation.\n * Use whenever you want to log an error to the console.\n *\n * ```ts\n * /**\n *  * There was a problem processing the configuration of the toolbar. The item with the given\n *  * name does not exist, so it was omitted when rendering the toolbar.\n *  *\n *  * @error toolbarview-item-unavailable\n *  * @param {String} name The name of the component.\n *  *\\/\n *  logError( 'toolbarview-item-unavailable', { name } );\n * ```\n *\n * **Note**: In most cases logging a warning using {@link module:utils/ckeditorerror~logWarning} is enough.\n *\n * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to use each method.\n *\n * @param errorName The error name to be logged.\n * @param data Additional data to be logged.\n */ function logError(errorName, data) {\n    console.error(...formatConsoleArguments(errorName, data));\n}\n/**\n * Returns formatted link to documentation message.\n */ function getLinkToDocumentationMessage(errorName) {\n    return `\\nRead more: ${DOCUMENTATION_URL}#error-${errorName}`;\n}\n/**\n * Returns formatted error message.\n */ function getErrorMessage(errorName, data) {\n    const processedObjects = new WeakSet();\n    const circularReferencesReplacer = (key, value)=>{\n        if (typeof value === 'object' && value !== null) {\n            if (processedObjects.has(value)) {\n                return `[object ${value.constructor.name}]`;\n            }\n            processedObjects.add(value);\n        }\n        return value;\n    };\n    const stringifiedData = data ? ` ${JSON.stringify(data, circularReferencesReplacer)}` : '';\n    const documentationLink = getLinkToDocumentationMessage(errorName);\n    return errorName + stringifiedData + documentationLink;\n}\n/**\n * Returns formatted console error arguments.\n */ function formatConsoleArguments(errorName, data) {\n    const documentationMessage = getLinkToDocumentationMessage(errorName);\n    return data ? [\n        errorName,\n        data,\n        documentationMessage\n    ] : [\n        errorName,\n        documentationMessage\n    ];\n}\n\nconst version = '43.1.0';\n// The second argument is not a month. It is `monthIndex` and starts from `0`.\nconst releaseDate = new Date(2024, 8, 5);\n/* istanbul ignore next -- @preserve */ if (globalThis.CKEDITOR_VERSION) {\n    /**\n\t * The best solution to avoid this error is migrating your CKEditor&nbsp;5 instance to\n\t * {@glink updating/nim-migration/migration-to-new-installation-methods new installation methods}.\n\t *\n\t * Mentioned below are predefined builds, which are a deprecated installation method. The solutions\n\t * provided are kept here for legacy support only.\n\t *\n\t * This error is thrown when due to a mistake in how CKEditor 5 was installed or initialized, some\n\t * of its modules were duplicated (evaluated and executed twice). Module duplication leads to inevitable runtime\n\t * errors.\n\t *\n\t * There are many situations in which some modules can be loaded twice. In the worst case scenario,\n\t * you may need to check your project for each of these issues and fix them all.\n\t *\n\t * # Trying to add a plugin to an existing build\n\t *\n\t * If you import an existing CKEditor 5 build and a plugin like this:\n\t *\n\t * ```ts\n\t * import ClassicEditor from '@ckeditor/ckeditor5-build-classic';\n\t * import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight';\n\t * ```\n\t *\n\t * Then your project loads some CKEditor 5 packages twice. How does it happen?\n\t *\n\t * The build package contains a file which is already compiled with webpack. This means\n\t * that it contains all the necessary code from e.g. `@ckeditor/ckeditor5-engine` and `@ckeditor/ckeditor5-utils`.\n\t *\n\t * However, the `Highlight` plugin imports some of the modules from these packages, too. If you ask webpack to\n\t * build such a project, you will end up with the modules being included (and run) twice &ndash; first, because they are\n\t * included inside the build package, and second, because they are required by the `Highlight` plugin.\n\t *\n\t * Therefore, **you must never add plugins to an existing build** unless your plugin has no dependencies.\n\t *\n\t * Adding plugins to a build is done by taking the source version of this build (so, before it was built with webpack)\n\t * and adding plugins there. In this situation, webpack will know that it only needs to load each plugin once.\n\t *\n\t * # Confused an editor build with an editor implementation\n\t *\n\t * This scenario is very similar to the previous one, but has a different origin.\n\t *\n\t * Let's assume that you wanted to use CKEditor 5 from source.\n\t *\n\t * The correct way to do so is to import an editor and plugins and run them together like this:\n\t *\n\t * ```ts\n\t * import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';\n\t * import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';\n\t * import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';\n\t * import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';\n\t * import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';\n\t *\n\t * ClassicEditor\n\t * \t.create( document.querySelector( '#editor' ), {\n\t * \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t * \t\ttoolbar: [ 'bold', 'italic' ]\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( error => {\n\t * \t\tconsole.error( error.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * However, you might have mistakenly imported a build instead of the source `ClassicEditor`. In this case\n\t * your imports will look like this:\n\t *\n\t * ```ts\n\t * import ClassicEditor from '@ckeditor/ckeditor5-build-classic';\n\t * import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';\n\t * import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';\n\t * import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';\n\t * import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';\n\t * ```\n\t *\n\t * This creates the same situation as in the previous section because you use a build together with source plugins.\n\t *\n\t * Remember: `@ckeditor/ckeditor5-build-*` packages contain editor builds and `@ckeditor/ckeditor5-editor-*` contain source editors.\n\t *\n\t * # Loading two or more builds on one page\n\t *\n\t * If you use CKEditor 5 builds, you might have loaded two (or more) `ckeditor.js` files on one web page.\n\t * Check your web page for duplicated `<script>` elements or make sure your page builder/bundler includes CKEditor only once.\n\t *\n\t * If you want to use two different types of editors at once, see the\n\t * {@glink getting-started/legacy/advanced/using-two-editors \"Using two different editors\"}\n\t * section.\n\t *\n\t * # Using outdated packages\n\t *\n\t * Building CKEditor 5 from source requires using multiple npm packages. These packages have their dependencies\n\t * to other packages. If you use the latest version of, for example, `@ckeditor/ckeditor5-editor-classic` with\n\t * an outdated version of `@ckeditor/ckeditor5-image`, npm or yarn will need to install two different versions of\n\t * `@ckeditor/ckeditor5-core` because `@ckeditor/ckeditor5-editor-classic` and `@ckeditor/ckeditor5-image` may require\n\t * different versions of the core package.\n\t *\n\t * The solution to this issue is to update all packages to their latest version. We recommend\n\t * using tools like [`npm-check-updates`](https://www.npmjs.com/package/npm-check-updates) which simplify this process.\n\t *\n\t * # Conflicting version of dependencies\n\t *\n\t * This is a special case of the previous scenario. If you use CKEditor 5 with some third-party plugins,\n\t * it may happen that even if you use the latest versions of the official packages and the latest version of\n\t * these third-party packages, there will be a conflict between some of their dependencies.\n\t *\n\t * Such a problem can be resolved by either downgrading CKEditor 5 packages (which we do not recommend) or\n\t * asking the author of the third-party package to upgrade its depdendencies (or forking their project and doing this yourself).\n\t *\n\t * **Note:** All official CKEditor 5 packages (excluding integrations and `ckeditor5-dev-*` packages) are released in the\n\t * same major version. This means that in the `x.y.z` version, the `x` is the same for all packages. This is the simplest way to check\n\t * whether you use packages coming from the same CKEditor 5 version. You can read more about versioning in the\n\t * {@glink updating/versioning-policy Versioning policy} guide.\n\t *\n\t * # Packages were duplicated in `node_modules`\n\t *\n\t * In some situations, especially when calling `npm install` multiple times, it may happen\n\t * that npm will not correctly \"deduplicate\" packages.\n\t *\n\t * Normally, npm deduplicates all packages so, for example, `@ckeditor/ckeditor5-core` is installed only once in `node_modules/`.\n\t * However, it is known to fail to do so from time to time.\n\t *\n\t * We recommend checking if any of the steps listed below help:\n\t *\n\t * * `rm -rf node_modules && npm install` to make sure you have a clean `node_modules/` directory. This step\n\t * is known to help in most cases.\n\t * * If you use `yarn.lock` or `package-lock.json`, remove it before `npm install`.\n\t * * Check whether all CKEditor 5 packages are up to date and reinstall them\n\t * if you changed anything (`rm -rf node_modules && npm install`).\n\t *\n\t * If all packages are correct and compatible with each other, the steps above are known to help. If not, you may\n\t * try to check with `npm ls` how many times packages like `@ckeditor/ckeditor5-core`, `@ckeditor/ckeditor5-engine` and\n\t *`@ckeditor/ckeditor5-utils` are installed. If more than once, verify which package causes that.\n\t *\n\t * @error ckeditor-duplicated-modules\n\t */ throw new CKEditorError('ckeditor-duplicated-modules', null);\n} else {\n    globalThis.CKEDITOR_VERSION = version;\n}\n\nconst _listeningTo = Symbol('listeningTo');\nconst _emitterId = Symbol('emitterId');\nconst _delegations = Symbol('delegations');\nconst defaultEmitterClass$1 = /* #__PURE__ */ EmitterMixin(Object);\nfunction EmitterMixin(base) {\n    if (!base) {\n        return defaultEmitterClass$1;\n    }\n    class Mixin extends base {\n        on(event, callback, options) {\n            this.listenTo(this, event, callback, options);\n        }\n        once(event, callback, options) {\n            let wasFired = false;\n            const onceCallback = (event, ...args)=>{\n                // Ensure the callback is called only once even if the callback itself leads to re-firing the event\n                // (which would call the callback again).\n                if (!wasFired) {\n                    wasFired = true;\n                    // Go off() at the first call.\n                    event.off();\n                    // Go with the original callback.\n                    callback.call(this, event, ...args);\n                }\n            };\n            // Make a similar on() call, simply replacing the callback.\n            this.listenTo(this, event, onceCallback, options);\n        }\n        off(event, callback) {\n            this.stopListening(this, event, callback);\n        }\n        listenTo(emitter, event, callback, options = {}) {\n            let emitterInfo, eventCallbacks;\n            // _listeningTo contains a list of emitters that this object is listening to.\n            // This list has the following format:\n            //\n            // _listeningTo: {\n            //     emitterId: {\n            //         emitter: emitter,\n            //         callbacks: {\n            //             event1: [ callback1, callback2, ... ]\n            //             ....\n            //         }\n            //     },\n            //     ...\n            // }\n            if (!this[_listeningTo]) {\n                this[_listeningTo] = {};\n            }\n            const emitters = this[_listeningTo];\n            if (!_getEmitterId(emitter)) {\n                _setEmitterId(emitter);\n            }\n            const emitterId = _getEmitterId(emitter);\n            if (!(emitterInfo = emitters[emitterId])) {\n                emitterInfo = emitters[emitterId] = {\n                    emitter,\n                    callbacks: {}\n                };\n            }\n            if (!(eventCallbacks = emitterInfo.callbacks[event])) {\n                eventCallbacks = emitterInfo.callbacks[event] = [];\n            }\n            eventCallbacks.push(callback);\n            // Finally register the callback to the event.\n            addEventListener(this, emitter, event, callback, options);\n        }\n        stopListening(emitter, event, callback) {\n            const emitters = this[_listeningTo];\n            let emitterId = emitter && _getEmitterId(emitter);\n            const emitterInfo = emitters && emitterId ? emitters[emitterId] : undefined;\n            const eventCallbacks = emitterInfo && event ? emitterInfo.callbacks[event] : undefined;\n            // Stop if nothing has been listened.\n            if (!emitters || emitter && !emitterInfo || event && !eventCallbacks) {\n                return;\n            }\n            // All params provided. off() that single callback.\n            if (callback) {\n                removeEventListener(this, emitter, event, callback);\n                // We must remove callbacks as well in order to prevent memory leaks.\n                // See https://github.com/ckeditor/ckeditor5/pull/8480\n                const index = eventCallbacks.indexOf(callback);\n                if (index !== -1) {\n                    if (eventCallbacks.length === 1) {\n                        delete emitterInfo.callbacks[event];\n                    } else {\n                        removeEventListener(this, emitter, event, callback);\n                    }\n                }\n            } else if (eventCallbacks) {\n                while(callback = eventCallbacks.pop()){\n                    removeEventListener(this, emitter, event, callback);\n                }\n                delete emitterInfo.callbacks[event];\n            } else if (emitterInfo) {\n                for(event in emitterInfo.callbacks){\n                    this.stopListening(emitter, event);\n                }\n                delete emitters[emitterId];\n            } else {\n                for(emitterId in emitters){\n                    this.stopListening(emitters[emitterId].emitter);\n                }\n                delete this[_listeningTo];\n            }\n        }\n        fire(eventOrInfo, ...args) {\n            try {\n                const eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo(this, eventOrInfo);\n                const event = eventInfo.name;\n                let callbacks = getCallbacksForEvent(this, event);\n                // Record that the event passed this emitter on its path.\n                eventInfo.path.push(this);\n                // Handle event listener callbacks first.\n                if (callbacks) {\n                    // Arguments passed to each callback.\n                    const callbackArgs = [\n                        eventInfo,\n                        ...args\n                    ];\n                    // Copying callbacks array is the easiest and most secure way of preventing infinite loops, when event callbacks\n                    // are added while processing other callbacks. Previous solution involved adding counters (unique ids) but\n                    // failed if callbacks were added to the queue before currently processed callback.\n                    // If this proves to be too inefficient, another method is to change `.on()` so callbacks are stored if same\n                    // event is currently processed. Then, `.fire()` at the end, would have to add all stored events.\n                    callbacks = Array.from(callbacks);\n                    for(let i = 0; i < callbacks.length; i++){\n                        callbacks[i].callback.apply(this, callbackArgs);\n                        // Remove the callback from future requests if off() has been called.\n                        if (eventInfo.off.called) {\n                            // Remove the called mark for the next calls.\n                            delete eventInfo.off.called;\n                            this._removeEventListener(event, callbacks[i].callback);\n                        }\n                        // Do not execute next callbacks if stop() was called.\n                        if (eventInfo.stop.called) {\n                            break;\n                        }\n                    }\n                }\n                // Delegate event to other emitters if needed.\n                const delegations = this[_delegations];\n                if (delegations) {\n                    const destinations = delegations.get(event);\n                    const passAllDestinations = delegations.get('*');\n                    if (destinations) {\n                        fireDelegatedEvents(destinations, eventInfo, args);\n                    }\n                    if (passAllDestinations) {\n                        fireDelegatedEvents(passAllDestinations, eventInfo, args);\n                    }\n                }\n                return eventInfo.return;\n            } catch (err) {\n                // @if CK_DEBUG // throw err;\n                /* istanbul ignore next -- @preserve */ CKEditorError.rethrowUnexpectedError(err, this);\n            }\n        }\n        delegate(...events) {\n            return {\n                to: (emitter, nameOrFunction)=>{\n                    if (!this[_delegations]) {\n                        this[_delegations] = new Map();\n                    }\n                    // Originally there was a for..of loop which unfortunately caused an error in Babel that didn't allow\n                    // build an application. See: https://github.com/ckeditor/ckeditor5-react/issues/40.\n                    events.forEach((eventName)=>{\n                        const destinations = this[_delegations].get(eventName);\n                        if (!destinations) {\n                            this[_delegations].set(eventName, new Map([\n                                [\n                                    emitter,\n                                    nameOrFunction\n                                ]\n                            ]));\n                        } else {\n                            destinations.set(emitter, nameOrFunction);\n                        }\n                    });\n                }\n            };\n        }\n        stopDelegating(event, emitter) {\n            if (!this[_delegations]) {\n                return;\n            }\n            if (!event) {\n                this[_delegations].clear();\n            } else if (!emitter) {\n                this[_delegations].delete(event);\n            } else {\n                const destinations = this[_delegations].get(event);\n                if (destinations) {\n                    destinations.delete(emitter);\n                }\n            }\n        }\n        _addEventListener(event, callback, options) {\n            createEventNamespace(this, event);\n            const lists = getCallbacksListsForNamespace(this, event);\n            const priority = priorities.get(options.priority);\n            const callbackDefinition = {\n                callback,\n                priority\n            };\n            // Add the callback to all callbacks list.\n            for (const callbacks of lists){\n                // Add the callback to the list in the right priority position.\n                insertToPriorityArray(callbacks, callbackDefinition);\n            }\n        }\n        _removeEventListener(event, callback) {\n            const lists = getCallbacksListsForNamespace(this, event);\n            for (const callbacks of lists){\n                for(let i = 0; i < callbacks.length; i++){\n                    if (callbacks[i].callback == callback) {\n                        // Remove the callback from the list (fixing the next index).\n                        callbacks.splice(i, 1);\n                        i--;\n                    }\n                }\n            }\n        }\n    }\n    return Mixin;\n}\n// Backward compatibility with `mix`\n[\n    'on',\n    'once',\n    'off',\n    'listenTo',\n    'stopListening',\n    'fire',\n    'delegate',\n    'stopDelegating',\n    '_addEventListener',\n    '_removeEventListener'\n].forEach((key)=>{\n    EmitterMixin[key] = defaultEmitterClass$1.prototype[key];\n});\n/**\n * Checks if `listeningEmitter` listens to an emitter with given `listenedToEmitterId` and if so, returns that emitter.\n * If not, returns `null`.\n *\n * @internal\n * @param listeningEmitter An emitter that listens.\n * @param listenedToEmitterId Unique emitter id of emitter listened to.\n */ function _getEmitterListenedTo(listeningEmitter, listenedToEmitterId) {\n    const listeningTo = listeningEmitter[_listeningTo];\n    if (listeningTo && listeningTo[listenedToEmitterId]) {\n        return listeningTo[listenedToEmitterId].emitter;\n    }\n    return null;\n}\n/**\n * Sets emitter's unique id.\n *\n * **Note:** `_emitterId` can be set only once.\n *\n * @internal\n * @param emitter An emitter for which id will be set.\n * @param id Unique id to set. If not passed, random unique id will be set.\n */ function _setEmitterId(emitter, id) {\n    if (!emitter[_emitterId]) {\n        emitter[_emitterId] = id || uid();\n    }\n}\n/**\n * Returns emitter's unique id.\n *\n * @internal\n * @param emitter An emitter which id will be returned.\n */ function _getEmitterId(emitter) {\n    return emitter[_emitterId];\n}\n/**\n * Gets the internal `_events` property of the given object.\n * `_events` property store all lists with callbacks for registered event names.\n * If there were no events registered on the object, empty `_events` object is created.\n */ function getEvents(source) {\n    if (!source._events) {\n        Object.defineProperty(source, '_events', {\n            value: {}\n        });\n    }\n    return source._events;\n}\n/**\n * Creates event node for generic-specific events relation architecture.\n */ function makeEventNode() {\n    return {\n        callbacks: [],\n        childEvents: []\n    };\n}\n/**\n * Creates an architecture for generic-specific events relation.\n * If needed, creates all events for given eventName, i.e. if the first registered event\n * is foo:bar:abc, it will create foo:bar:abc, foo:bar and foo event and tie them together.\n * It also copies callbacks from more generic events to more specific events when\n * specific events are created.\n */ function createEventNamespace(source, eventName) {\n    const events = getEvents(source);\n    // First, check if the event we want to add to the structure already exists.\n    if (events[eventName]) {\n        // If it exists, we don't have to do anything.\n        return;\n    }\n    // In other case, we have to create the structure for the event.\n    // Note, that we might need to create intermediate events too.\n    // I.e. if foo:bar:abc is being registered and we only have foo in the structure,\n    // we need to also register foo:bar.\n    // Currently processed event name.\n    let name = eventName;\n    // Name of the event that is a child event for currently processed event.\n    let childEventName = null;\n    // Array containing all newly created specific events.\n    const newEventNodes = [];\n    // While loop can't check for ':' index because we have to handle generic events too.\n    // In each loop, we truncate event name, going from the most specific name to the generic one.\n    // I.e. foo:bar:abc -> foo:bar -> foo.\n    while(name !== ''){\n        if (events[name]) {\n            break;\n        }\n        // If this event is not yet registered, create a new object for it.\n        events[name] = makeEventNode();\n        // Add it to the array with newly created events.\n        newEventNodes.push(events[name]);\n        // Add previously processed event name as a child of this event.\n        if (childEventName) {\n            events[name].childEvents.push(childEventName);\n        }\n        childEventName = name;\n        // If `.lastIndexOf()` returns -1, `.substr()` will return '' which will break the loop.\n        name = name.substr(0, name.lastIndexOf(':'));\n    }\n    if (name !== '') {\n        // If name is not empty, we found an already registered event that was a parent of the\n        // event we wanted to register.\n        // Copy that event's callbacks to newly registered events.\n        for (const node of newEventNodes){\n            node.callbacks = events[name].callbacks.slice();\n        }\n        // Add last newly created event to the already registered event.\n        events[name].childEvents.push(childEventName);\n    }\n}\n/**\n * Gets an array containing callbacks list for a given event and it's more specific events.\n * I.e. if given event is foo:bar and there is also foo:bar:abc event registered, this will\n * return callback list of foo:bar and foo:bar:abc (but not foo).\n */ function getCallbacksListsForNamespace(source, eventName) {\n    const eventNode = getEvents(source)[eventName];\n    if (!eventNode) {\n        return [];\n    }\n    let callbacksLists = [\n        eventNode.callbacks\n    ];\n    for(let i = 0; i < eventNode.childEvents.length; i++){\n        const childCallbacksLists = getCallbacksListsForNamespace(source, eventNode.childEvents[i]);\n        callbacksLists = callbacksLists.concat(childCallbacksLists);\n    }\n    return callbacksLists;\n}\n/**\n * Get the list of callbacks for a given event, but only if there any callbacks have been registered.\n * If there are no callbacks registered for given event, it checks if this is a specific event and looks\n * for callbacks for it's more generic version.\n */ function getCallbacksForEvent(source, eventName) {\n    let event;\n    if (!source._events || !(event = source._events[eventName]) || !event.callbacks.length) {\n        // There are no callbacks registered for specified eventName.\n        // But this could be a specific-type event that is in a namespace.\n        if (eventName.indexOf(':') > -1) {\n            // If the eventName is specific, try to find callback lists for more generic event.\n            return getCallbacksForEvent(source, eventName.substr(0, eventName.lastIndexOf(':')));\n        } else {\n            // If this is a top-level generic event, return null;\n            return null;\n        }\n    }\n    return event.callbacks;\n}\n/**\n * Fires delegated events for given map of destinations.\n *\n * @param destinations A map containing `[ {@link module:utils/emittermixin~Emitter}, \"event name\" ]` pair destinations.\n * @param eventInfo The original event info object.\n * @param fireArgs Arguments the original event was fired with.\n */ function fireDelegatedEvents(destinations, eventInfo, fireArgs) {\n    for (let [emitter, name] of destinations){\n        if (!name) {\n            name = eventInfo.name;\n        } else if (typeof name == 'function') {\n            name = name(eventInfo.name);\n        }\n        const delegatedInfo = new EventInfo(eventInfo.source, name);\n        delegatedInfo.path = [\n            ...eventInfo.path\n        ];\n        emitter.fire(delegatedInfo, ...fireArgs);\n    }\n}\n/**\n * Helper for registering event callback on the emitter.\n */ function addEventListener(listener, emitter, event, callback, options) {\n    if (emitter._addEventListener) {\n        emitter._addEventListener(event, callback, options);\n    } else {\n        // Allow listening on objects that do not implement Emitter interface.\n        // This is needed in some tests that are using mocks instead of the real objects with EmitterMixin mixed.\n        listener._addEventListener.call(emitter, event, callback, options);\n    }\n}\n/**\n * Helper for removing event callback from the emitter.\n */ function removeEventListener(listener, emitter, event, callback) {\n    if (emitter._removeEventListener) {\n        emitter._removeEventListener(event, callback);\n    } else {\n        // Allow listening on objects that do not implement Emitter interface.\n        // This is needed in some tests that are using mocks instead of the real objects with EmitterMixin mixed.\n        listener._removeEventListener.call(emitter, event, callback);\n    }\n}\n\nconst observablePropertiesSymbol = Symbol('observableProperties');\nconst boundObservablesSymbol = Symbol('boundObservables');\nconst boundPropertiesSymbol = Symbol('boundProperties');\nconst decoratedMethods = Symbol('decoratedMethods');\nconst decoratedOriginal = Symbol('decoratedOriginal');\nconst defaultObservableClass = /* #__PURE__ */ ObservableMixin(/* #__PURE__ */ EmitterMixin());\nfunction ObservableMixin(base) {\n    if (!base) {\n        return defaultObservableClass;\n    }\n    class Mixin extends base {\n        set(name, value) {\n            // If the first parameter is an Object, iterate over its properties.\n            if (isObject(name)) {\n                Object.keys(name).forEach((property)=>{\n                    this.set(property, name[property]);\n                }, this);\n                return;\n            }\n            initObservable(this);\n            const properties = this[observablePropertiesSymbol];\n            if (name in this && !properties.has(name)) {\n                /**\n\t\t\t\t * Cannot override an existing property.\n\t\t\t\t *\n\t\t\t\t * This error is thrown when trying to {@link module:utils/observablemixin~Observable#set set} a property with\n\t\t\t\t * a name of an already existing property. For example:\n\t\t\t\t *\n\t\t\t\t * ```ts\n\t\t\t\t * let observable = new Model();\n\t\t\t\t * observable.property = 1;\n\t\t\t\t * observable.set( 'property', 2 );\t\t\t// throws\n\t\t\t\t *\n\t\t\t\t * observable.set( 'property', 1 );\n\t\t\t\t * observable.set( 'property', 2 );\t\t\t// ok, because this is an existing property.\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * @error observable-set-cannot-override\n\t\t\t\t */ throw new CKEditorError('observable-set-cannot-override', this);\n            }\n            Object.defineProperty(this, name, {\n                enumerable: true,\n                configurable: true,\n                get () {\n                    return properties.get(name);\n                },\n                set (value) {\n                    const oldValue = properties.get(name);\n                    // Fire `set` event before the new value will be set to make it possible\n                    // to override observable property without affecting `change` event.\n                    // See https://github.com/ckeditor/ckeditor5-utils/issues/171.\n                    let newValue = this.fire(`set:${name}`, name, value, oldValue);\n                    if (newValue === undefined) {\n                        newValue = value;\n                    }\n                    // Allow undefined as an initial value like A.define( 'x', undefined ) (#132).\n                    // Note: When properties map has no such own property, then its value is undefined.\n                    if (oldValue !== newValue || !properties.has(name)) {\n                        properties.set(name, newValue);\n                        this.fire(`change:${name}`, name, newValue, oldValue);\n                    }\n                }\n            });\n            this[name] = value;\n        }\n        bind(...bindProperties) {\n            if (!bindProperties.length || !isStringArray(bindProperties)) {\n                /**\n\t\t\t\t * All properties must be strings.\n\t\t\t\t *\n\t\t\t\t * @error observable-bind-wrong-properties\n\t\t\t\t */ throw new CKEditorError('observable-bind-wrong-properties', this);\n            }\n            if (new Set(bindProperties).size !== bindProperties.length) {\n                /**\n\t\t\t\t * Properties must be unique.\n\t\t\t\t *\n\t\t\t\t * @error observable-bind-duplicate-properties\n\t\t\t\t */ throw new CKEditorError('observable-bind-duplicate-properties', this);\n            }\n            initObservable(this);\n            const boundProperties = this[boundPropertiesSymbol];\n            bindProperties.forEach((propertyName)=>{\n                if (boundProperties.has(propertyName)) {\n                    /**\n\t\t\t\t\t * Cannot bind the same property more than once.\n\t\t\t\t\t *\n\t\t\t\t\t * @error observable-bind-rebind\n\t\t\t\t\t */ throw new CKEditorError('observable-bind-rebind', this);\n                }\n            });\n            const bindings = new Map();\n            bindProperties.forEach((a)=>{\n                const binding = {\n                    property: a,\n                    to: []\n                };\n                boundProperties.set(a, binding);\n                bindings.set(a, binding);\n            });\n            return {\n                to: bindTo,\n                toMany: bindToMany,\n                _observable: this,\n                _bindProperties: bindProperties,\n                _to: [],\n                _bindings: bindings\n            };\n        }\n        unbind(...unbindProperties) {\n            // Nothing to do here if not inited yet.\n            if (!this[observablePropertiesSymbol]) {\n                return;\n            }\n            const boundProperties = this[boundPropertiesSymbol];\n            const boundObservables = this[boundObservablesSymbol];\n            if (unbindProperties.length) {\n                if (!isStringArray(unbindProperties)) {\n                    /**\n\t\t\t\t\t * Properties must be strings.\n\t\t\t\t\t *\n\t\t\t\t\t * @error observable-unbind-wrong-properties\n\t\t\t\t\t */ throw new CKEditorError('observable-unbind-wrong-properties', this);\n                }\n                unbindProperties.forEach((propertyName)=>{\n                    const binding = boundProperties.get(propertyName);\n                    // Nothing to do if the binding is not defined\n                    if (!binding) {\n                        return;\n                    }\n                    binding.to.forEach(([toObservable, toProperty])=>{\n                        const toProperties = boundObservables.get(toObservable);\n                        const toPropertyBindings = toProperties[toProperty];\n                        toPropertyBindings.delete(binding);\n                        if (!toPropertyBindings.size) {\n                            delete toProperties[toProperty];\n                        }\n                        if (!Object.keys(toProperties).length) {\n                            boundObservables.delete(toObservable);\n                            this.stopListening(toObservable, 'change');\n                        }\n                    });\n                    boundProperties.delete(propertyName);\n                });\n            } else {\n                boundObservables.forEach((bindings, boundObservable)=>{\n                    this.stopListening(boundObservable, 'change');\n                });\n                boundObservables.clear();\n                boundProperties.clear();\n            }\n        }\n        decorate(methodName) {\n            initObservable(this);\n            const originalMethod = this[methodName];\n            if (!originalMethod) {\n                /**\n\t\t\t\t * Cannot decorate an undefined method.\n\t\t\t\t *\n\t\t\t\t * @error observablemixin-cannot-decorate-undefined\n\t\t\t\t * @param {Object} object The object which method should be decorated.\n\t\t\t\t * @param {String} methodName Name of the method which does not exist.\n\t\t\t\t */ throw new CKEditorError('observablemixin-cannot-decorate-undefined', this, {\n                    object: this,\n                    methodName\n                });\n            }\n            this.on(methodName, (evt, args)=>{\n                evt.return = originalMethod.apply(this, args);\n            });\n            this[methodName] = function(...args) {\n                return this.fire(methodName, args);\n            };\n            this[methodName][decoratedOriginal] = originalMethod;\n            if (!this[decoratedMethods]) {\n                this[decoratedMethods] = [];\n            }\n            this[decoratedMethods].push(methodName);\n        }\n        // Override the EmitterMixin stopListening method to be able to clean (and restore) decorated methods.\n        // This is needed in case of:\n        //  1. Have x.foo() decorated.\n        //  2. Call x.stopListening()\n        //  3. Call x.foo(). Problem: nothing happens (the original foo() method is not executed)\n        stopListening(emitter, event, callback) {\n            // Removing all listeners so let's clean the decorated methods to the original state.\n            if (!emitter && this[decoratedMethods]) {\n                for (const methodName of this[decoratedMethods]){\n                    this[methodName] = this[methodName][decoratedOriginal];\n                }\n                delete this[decoratedMethods];\n            }\n            super.stopListening(emitter, event, callback);\n        }\n        [observablePropertiesSymbol];\n        [decoratedMethods];\n        [boundPropertiesSymbol];\n        [boundObservablesSymbol];\n    }\n    return Mixin;\n}\n// Backward compatibility with `mix`\n[\n    'set',\n    'bind',\n    'unbind',\n    'decorate',\n    'on',\n    'once',\n    'off',\n    'listenTo',\n    'stopListening',\n    'fire',\n    'delegate',\n    'stopDelegating',\n    '_addEventListener',\n    '_removeEventListener'\n].forEach((key)=>{\n    ObservableMixin[key] = defaultObservableClass.prototype[key];\n});\n// Init symbol properties needed for the observable mechanism to work.\nfunction initObservable(observable) {\n    // Do nothing if already inited.\n    if (observable[observablePropertiesSymbol]) {\n        return;\n    }\n    // The internal hash containing the observable's state.\n    Object.defineProperty(observable, observablePropertiesSymbol, {\n        value: new Map()\n    });\n    // Map containing bindings to external observables. It shares the binding objects\n    // (`{ observable: A, property: 'a', to: ... }`) with {@link module:utils/observablemixin~Observable#_boundProperties} and\n    // it is used to observe external observables to update own properties accordingly.\n    // See {@link module:utils/observablemixin~Observable#bind}.\n    //\n    //\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n    //\t\tconsole.log( A._boundObservables );\n    //\n    //\t\t\tMap( {\n    //\t\t\t\tB: {\n    //\t\t\t\t\tx: Set( [\n    //\t\t\t\t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n    //\t\t\t\t\t\t{ observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n    //\t\t\t\t\t] ),\n    //\t\t\t\t\ty: Set( [\n    //\t\t\t\t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n    //\t\t\t\t\t] )\n    //\t\t\t\t}\n    //\t\t\t} )\n    //\n    //\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n    //\t\tconsole.log( A._boundObservables );\n    //\n    //\t\t\tMap( {\n    //\t\t\t\tB: {\n    //\t\t\t\t\tx: Set( [\n    //\t\t\t\t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n    //\t\t\t\t\t\t{ observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n    //\t\t\t\t\t] ),\n    //\t\t\t\t\ty: Set( [\n    //\t\t\t\t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n    //\t\t\t\t\t] ),\n    //\t\t\t\t\tz: Set( [\n    //\t\t\t\t\t\t{ observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n    //\t\t\t\t\t] )\n    //\t\t\t\t},\n    //\t\t\t\tC: {\n    //\t\t\t\t\tw: Set( [\n    //\t\t\t\t\t\t{ observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n    //\t\t\t\t\t] )\n    //\t\t\t\t}\n    //\t\t\t} )\n    //\n    Object.defineProperty(observable, boundObservablesSymbol, {\n        value: new Map()\n    });\n    // Object that stores which properties of this observable are bound and how. It shares\n    // the binding objects (`{ observable: A, property: 'a', to: ... }`) with\n    // {@link module:utils/observablemixin~Observable#_boundObservables}. This data structure is\n    // a reverse of {@link module:utils/observablemixin~Observable#_boundObservables} and it is helpful for\n    // {@link module:utils/observablemixin~Observable#unbind}.\n    //\n    // See {@link module:utils/observablemixin~Observable#bind}.\n    //\n    //\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n    //\t\tconsole.log( A._boundProperties );\n    //\n    //\t\t\tMap( {\n    //\t\t\t\ta: { observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n    //\t\t\t\tb: { observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n    //\t\t\t\tc: { observable: A, property: 'c', to: [ [ B, 'x' ] ] }\n    //\t\t\t} )\n    //\n    //\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n    //\t\tconsole.log( A._boundProperties );\n    //\n    //\t\t\tMap( {\n    //\t\t\t\ta: { observable: A, property: 'a', to: [ [ B, 'x' ] ] },\n    //\t\t\t\tb: { observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n    //\t\t\t\tc: { observable: A, property: 'c', to: [ [ B, 'x' ] ] },\n    //\t\t\t\td: { observable: A, property: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n    //\t\t\t} )\n    Object.defineProperty(observable, boundPropertiesSymbol, {\n        value: new Map()\n    });\n}\n/**\n * A chaining for {@link module:utils/observablemixin~Observable#bind} providing `.to()` interface.\n *\n * @param args Arguments of the `.to( args )` binding.\n */ function bindTo(...args) {\n    const parsedArgs = parseBindToArgs(...args);\n    const bindingsKeys = Array.from(this._bindings.keys());\n    const numberOfBindings = bindingsKeys.length;\n    // Eliminate A.bind( 'x' ).to( B, C )\n    if (!parsedArgs.callback && parsedArgs.to.length > 1) {\n        /**\n\t\t * Binding multiple observables only possible with callback.\n\t\t *\n\t\t * @error observable-bind-to-no-callback\n\t\t */ throw new CKEditorError('observable-bind-to-no-callback', this);\n    }\n    // Eliminate A.bind( 'x', 'y' ).to( B, callback )\n    if (numberOfBindings > 1 && parsedArgs.callback) {\n        /**\n\t\t * Cannot bind multiple properties and use a callback in one binding.\n\t\t *\n\t\t * @error observable-bind-to-extra-callback\n\t\t */ throw new CKEditorError('observable-bind-to-extra-callback', this);\n    }\n    parsedArgs.to.forEach((to)=>{\n        // Eliminate A.bind( 'x', 'y' ).to( B, 'a' )\n        if (to.properties.length && to.properties.length !== numberOfBindings) {\n            /**\n\t\t\t * The number of properties must match.\n\t\t\t *\n\t\t\t * @error observable-bind-to-properties-length\n\t\t\t */ throw new CKEditorError('observable-bind-to-properties-length', this);\n        }\n        // When no to.properties specified, observing source properties instead i.e.\n        // A.bind( 'x', 'y' ).to( B ) -> Observe B.x and B.y\n        if (!to.properties.length) {\n            to.properties = this._bindProperties;\n        }\n    });\n    this._to = parsedArgs.to;\n    // Fill {@link BindChain#_bindings} with callback. When the callback is set there's only one binding.\n    if (parsedArgs.callback) {\n        this._bindings.get(bindingsKeys[0]).callback = parsedArgs.callback;\n    }\n    attachBindToListeners(this._observable, this._to);\n    // Update observable._boundProperties and observable._boundObservables.\n    updateBindToBound(this);\n    // Set initial values of bound properties.\n    this._bindProperties.forEach((propertyName)=>{\n        updateBoundObservableProperty(this._observable, propertyName);\n    });\n}\n/**\n * Binds to an attribute in a set of iterable observables.\n */ function bindToMany(observables, attribute, callback) {\n    if (this._bindings.size > 1) {\n        /**\n\t\t * Binding one attribute to many observables only possible with one attribute.\n\t\t *\n\t\t * @error observable-bind-to-many-not-one-binding\n\t\t */ throw new CKEditorError('observable-bind-to-many-not-one-binding', this);\n    }\n    this.to(// Bind to #attribute of each observable...\n    ...getBindingTargets(observables, attribute), // ...using given callback to parse attribute values.\n    callback);\n}\n/**\n * Returns an array of binding components for\n * {@link Observable#bind} from a set of iterable observables.\n */ function getBindingTargets(observables, attribute) {\n    const observableAndAttributePairs = observables.map((observable)=>[\n            observable,\n            attribute\n        ]);\n    // Merge pairs to one-dimension array of observables and attributes.\n    return Array.prototype.concat.apply([], observableAndAttributePairs);\n}\n/**\n * Check if all entries of the array are of `String` type.\n */ function isStringArray(arr) {\n    return arr.every((a)=>typeof a == 'string');\n}\n/**\n * Parses and validates {@link Observable#bind}`.to( args )` arguments and returns\n * an object with a parsed structure. For example\n *\n * ```ts\n * A.bind( 'x' ).to( B, 'a', C, 'b', call );\n * ```\n *\n * becomes\n *\n * ```ts\n * {\n * \tto: [\n * \t\t{ observable: B, properties: [ 'a' ] },\n * \t\t{ observable: C, properties: [ 'b' ] },\n * \t],\n * \tcallback: call\n * }\n *\n * @param args Arguments of {@link Observable#bind}`.to( args )`.\n */ function parseBindToArgs(...args) {\n    // Eliminate A.bind( 'x' ).to()\n    if (!args.length) {\n        /**\n\t\t * Invalid argument syntax in `to()`.\n\t\t *\n\t\t * @error observable-bind-to-parse-error\n\t\t */ throw new CKEditorError('observable-bind-to-parse-error', null);\n    }\n    const parsed = {\n        to: []\n    };\n    let lastObservable;\n    if (typeof args[args.length - 1] == 'function') {\n        parsed.callback = args.pop();\n    }\n    args.forEach((a)=>{\n        if (typeof a == 'string') {\n            lastObservable.properties.push(a);\n        } else if (typeof a == 'object') {\n            lastObservable = {\n                observable: a,\n                properties: []\n            };\n            parsed.to.push(lastObservable);\n        } else {\n            throw new CKEditorError('observable-bind-to-parse-error', null);\n        }\n    });\n    return parsed;\n}\n/**\n * Synchronizes {@link module:utils/observable#_boundObservables} with {@link Binding}.\n *\n * @param binding A binding to store in {@link Observable#_boundObservables}.\n * @param toObservable A observable, which is a new component of `binding`.\n * @param toPropertyName A name of `toObservable`'s property, a new component of the `binding`.\n */ function updateBoundObservables(observable, binding, toObservable, toPropertyName) {\n    const boundObservables = observable[boundObservablesSymbol];\n    const bindingsToObservable = boundObservables.get(toObservable);\n    const bindings = bindingsToObservable || {};\n    if (!bindings[toPropertyName]) {\n        bindings[toPropertyName] = new Set();\n    }\n    // Pass the binding to a corresponding Set in `observable._boundObservables`.\n    bindings[toPropertyName].add(binding);\n    if (!bindingsToObservable) {\n        boundObservables.set(toObservable, bindings);\n    }\n}\n/**\n * Synchronizes {@link Observable#_boundProperties} and {@link Observable#_boundObservables}\n * with {@link BindChain}.\n *\n * Assuming the following binding being created\n *\n * ```ts\n * A.bind( 'a', 'b' ).to( B, 'x', 'y' );\n * ```\n *\n * the following bindings were initialized by {@link Observable#bind} in {@link BindChain#_bindings}:\n *\n * ```ts\n * {\n * \ta: { observable: A, property: 'a', to: [] },\n * \tb: { observable: A, property: 'b', to: [] },\n * }\n * ```\n *\n * Iterate over all bindings in this chain and fill their `to` properties with\n * corresponding to( ... ) arguments (components of the binding), so\n *\n * ```ts\n * {\n * \ta: { observable: A, property: 'a', to: [ B, 'x' ] },\n * \tb: { observable: A, property: 'b', to: [ B, 'y' ] },\n * }\n * ```\n *\n * Then update the structure of {@link Observable#_boundObservables} with updated\n * binding, so it becomes:\n *\n * ```ts\n * Map( {\n * \tB: {\n * \t\tx: Set( [\n * \t\t\t{ observable: A, property: 'a', to: [ [ B, 'x' ] ] }\n * \t\t] ),\n * \t\ty: Set( [\n * \t\t\t{ observable: A, property: 'b', to: [ [ B, 'y' ] ] },\n * \t\t] )\n * \t}\n * } )\n * ```\n *\n * @param chain The binding initialized by {@link Observable#bind}.\n */ function updateBindToBound(chain) {\n    let toProperty;\n    chain._bindings.forEach((binding, propertyName)=>{\n        // Note: For a binding without a callback, this will run only once\n        // like in A.bind( 'x', 'y' ).to( B, 'a', 'b' )\n        // TODO: ES6 destructuring.\n        chain._to.forEach((to)=>{\n            toProperty = to.properties[binding.callback ? 0 : chain._bindProperties.indexOf(propertyName)];\n            binding.to.push([\n                to.observable,\n                toProperty\n            ]);\n            updateBoundObservables(chain._observable, binding, to.observable, toProperty);\n        });\n    });\n}\n/**\n * Updates an property of a {@link Observable} with a value\n * determined by an entry in {@link Observable#_boundProperties}.\n *\n * @param observable A observable which property is to be updated.\n * @param propertyName An property to be updated.\n */ function updateBoundObservableProperty(observable, propertyName) {\n    const boundProperties = observable[boundPropertiesSymbol];\n    const binding = boundProperties.get(propertyName);\n    let propertyValue;\n    // When a binding with callback is created like\n    //\n    // \t\tA.bind( 'a' ).to( B, 'b', C, 'c', callback );\n    //\n    // collect B.b and C.c, then pass them to callback to set A.a.\n    if (binding.callback) {\n        propertyValue = binding.callback.apply(observable, binding.to.map((to)=>to[0][to[1]]));\n    } else {\n        propertyValue = binding.to[0];\n        propertyValue = propertyValue[0][propertyValue[1]];\n    }\n    if (Object.prototype.hasOwnProperty.call(observable, propertyName)) {\n        observable[propertyName] = propertyValue;\n    } else {\n        observable.set(propertyName, propertyValue);\n    }\n}\n/**\n * Starts listening to changes in {@link BindChain._to} observables to update\n * {@link BindChain._observable} {@link BindChain._bindProperties}. Also sets the\n * initial state of {@link BindChain._observable}.\n *\n * @param chain The chain initialized by {@link Observable#bind}.\n */ function attachBindToListeners(observable, toBindings) {\n    toBindings.forEach((to)=>{\n        const boundObservables = observable[boundObservablesSymbol];\n        let bindings;\n        // If there's already a chain between the observables (`observable` listens to\n        // `to.observable`), there's no need to create another `change` event listener.\n        if (!boundObservables.get(to.observable)) {\n            observable.listenTo(to.observable, 'change', (evt, propertyName)=>{\n                bindings = boundObservables.get(to.observable)[propertyName];\n                // Note: to.observable will fire for any property change, react\n                // to changes of properties which are bound only.\n                if (bindings) {\n                    bindings.forEach((binding)=>{\n                        updateBoundObservableProperty(observable, binding.property);\n                    });\n                }\n            });\n        }\n    });\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/elementreplacer\n */ /**\n * Utility class allowing to hide existing HTML elements or replace them with given ones in a way that doesn't remove\n * the original elements from the DOM.\n */ class ElementReplacer {\n    /**\n\t * The elements replaced by {@link #replace} and their replacements.\n\t */ _replacedElements;\n    constructor(){\n        this._replacedElements = [];\n    }\n    /**\n\t * Hides the `element` and, if specified, inserts the the given element next to it.\n\t *\n\t * The effect of this method can be reverted by {@link #restore}.\n\t *\n\t * @param element The element to replace.\n\t * @param newElement The replacement element. If not passed, then the `element` will just be hidden.\n\t */ replace(element, newElement) {\n        this._replacedElements.push({\n            element,\n            newElement\n        });\n        element.style.display = 'none';\n        if (newElement) {\n            element.parentNode.insertBefore(newElement, element.nextSibling);\n        }\n    }\n    /**\n\t * Restores what {@link #replace} did.\n\t */ restore() {\n        this._replacedElements.forEach(({ element, newElement })=>{\n            element.style.display = '';\n            if (newElement) {\n                newElement.remove();\n            }\n        });\n        this._replacedElements = [];\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/abortabledebounce\n */ /**\n * Returns a function wrapper that will execute the provided function and abort any previous call that is still in progress.\n *\n * @param func The function to be called. It will be provided with `AbortSignal` as the first parameter.\n */ function abortableDebounce(func) {\n    let controller = new AbortController();\n    function abortable(...args) {\n        controller.abort();\n        controller = new AbortController();\n        return func(controller.signal, ...args);\n    }\n    abortable.abort = ()=>controller.abort();\n    return abortable;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/count\n */ /**\n * Returns the number of items return by the iterator.\n *\n * ```ts\n * count( [ 1, 2, 3, 4, 5 ] ); // 5;\n * ```\n *\n * @param iterable Any iterable.\n * @returns Number of items returned by that iterable.\n */ function count(iterable) {\n    let count = 0;\n    for (const _ of iterable){\n        count++;\n    }\n    return count;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/comparearrays\n */ /**\n * Compares how given arrays relate to each other. One array can be: same as another array, prefix of another array\n * or completely different. If arrays are different, first index at which they differ is returned. Otherwise,\n * a flag specifying the relation is returned. Flags are negative numbers, so whenever a number >= 0 is returned\n * it means that arrays differ.\n *\n * ```ts\n * compareArrays( [ 0, 2 ], [ 0, 2 ] );\t\t// 'same'\n * compareArrays( [ 0, 2 ], [ 0, 2, 1 ] );\t\t// 'prefix'\n * compareArrays( [ 0, 2 ], [ 0 ] );\t\t\t// 'extension'\n * compareArrays( [ 0, 2 ], [ 1, 2 ] );\t\t// 0\n * compareArrays( [ 0, 2 ], [ 0, 1 ] );\t\t// 1\n * ```\n *\n * @param a Array that is compared.\n * @param b Array to compare with.\n * @returns How array `a` is related to `b`.\n */ function compareArrays(a, b) {\n    const minLen = Math.min(a.length, b.length);\n    for(let i = 0; i < minLen; i++){\n        if (a[i] != b[i]) {\n            // The arrays are different.\n            return i;\n        }\n    }\n    // Both arrays were same at all points.\n    if (a.length == b.length) {\n        // If their length is also same, they are the same.\n        return 'same';\n    } else if (a.length < b.length) {\n        // Compared array is shorter so it is a prefix of the other array.\n        return 'prefix';\n    } else {\n        // Compared array is longer so it is an extension of the other array.\n        return 'extension';\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/isiterable\n */ /**\n * Checks if value implements iterator interface.\n *\n * @param value The value to check.\n * @returns True if value implements iterator interface.\n */ function isIterable(value) {\n    return !!(value && value[Symbol.iterator]);\n}\n\n/**\n * Creates an HTML or SVG element with attributes and children elements.\n *\n * ```ts\n * createElement( document, 'p' ); // <p>\n * createElement( document, 'mask', { xmlns: 'http://www.w3.org/2000/svg' } ); // <mask>\n * ```\n *\n * @param doc Document used to create the element.\n * @param name Name of the element.\n * @param attributes Object where keys represent attribute keys and values represent attribute values.\n * @param children Child or any iterable of children. Strings will be automatically turned into Text nodes.\n * @returns HTML or SVG element.\n */ function createElement(doc, name, attributes = {}, children = []) {\n    const namespace = attributes && attributes.xmlns;\n    const element = namespace ? doc.createElementNS(namespace, name) : doc.createElement(name);\n    for(const key in attributes){\n        element.setAttribute(key, attributes[key]);\n    }\n    if (isString(children) || !isIterable(children)) {\n        children = [\n            children\n        ];\n    }\n    for (let child of children){\n        if (isString(child)) {\n            child = doc.createTextNode(child);\n        }\n        element.appendChild(child);\n    }\n    return element;\n}\n\n/**\n * Handles a configuration dictionary.\n *\n * @typeParam Cfg A type of the configuration dictionary.\n */ class Config {\n    /**\n\t * Store for the whole configuration.\n\t */ _config;\n    /**\n\t * Creates an instance of the {@link ~Config} class.\n\t *\n\t * @param configurations The initial configurations to be set. Usually, provided by the user.\n\t * @param defaultConfigurations The default configurations. Usually, provided by the system.\n\t */ constructor(configurations, defaultConfigurations){\n        this._config = {};\n        // Set default configuration.\n        if (defaultConfigurations) {\n            // Clone the configuration to make sure that the properties will not be shared\n            // between editors and make the watchdog feature work correctly.\n            this.define(cloneConfig(defaultConfigurations));\n        }\n        // Set initial configuration.\n        if (configurations) {\n            this._setObjectToTarget(this._config, configurations);\n        }\n    }\n    set(name, value) {\n        this._setToTarget(this._config, name, value);\n    }\n    define(name, value) {\n        const isDefine = true;\n        this._setToTarget(this._config, name, value, isDefine);\n    }\n    /**\n\t * Gets the value for a configuration entry.\n\t *\n\t * ```ts\n\t * config.get( 'name' );\n\t * ```\n\t *\n\t * Deep configurations can be retrieved by separating each part with a dot.\n\t *\n\t * ```ts\n\t * config.get( 'toolbar.collapsed' );\n\t * ```\n\t *\n\t * @param name The configuration name. Configuration names are case-sensitive.\n\t * @returns The configuration value or `undefined` if the configuration entry was not found.\n\t */ get(name) {\n        return this._getFromSource(this._config, name);\n    }\n    /**\n\t * Iterates over all top level configuration names.\n\t */ *names() {\n        for (const name of Object.keys(this._config)){\n            yield name;\n        }\n    }\n    /**\n\t * Saves passed configuration to the specified target (nested object).\n\t *\n\t * @param target Nested config object.\n\t * @param name The configuration name or an object from which take properties as\n\t * configuration entries. Configuration names are case-sensitive.\n\t * @param value The configuration value. Used if a name is passed.\n\t * @param isDefine Define if passed configuration should overwrite existing one.\n\t */ _setToTarget(target, name, value, isDefine = false) {\n        // In case of an object, iterate through it and call `_setToTarget` again for each property.\n        if (isPlainObject(name)) {\n            this._setObjectToTarget(target, name, isDefine);\n            return;\n        }\n        // The configuration name should be split into parts if it has dots. E.g. `resize.width` -> [`resize`, `width`].\n        const parts = name.split('.');\n        // Take the name of the configuration out of the parts. E.g. `resize.width` -> `width`.\n        name = parts.pop();\n        // Iterate over parts to check if currently stored configuration has proper structure.\n        for (const part of parts){\n            // If there is no object for specified part then create one.\n            if (!isPlainObject(target[part])) {\n                target[part] = {};\n            }\n            // Nested object becomes a target.\n            target = target[part];\n        }\n        // In case of value is an object.\n        if (isPlainObject(value)) {\n            // We take care of proper config structure.\n            if (!isPlainObject(target[name])) {\n                target[name] = {};\n            }\n            target = target[name];\n            // And iterate through this object calling `_setToTarget` again for each property.\n            this._setObjectToTarget(target, value, isDefine);\n            return;\n        }\n        // Do nothing if we are defining configuration for non empty name.\n        if (isDefine && typeof target[name] != 'undefined') {\n            return;\n        }\n        target[name] = value;\n    }\n    /**\n\t * Get specified configuration from specified source (nested object).\n\t *\n\t * @param source level of nested object.\n\t * @param name The configuration name. Configuration names are case-sensitive.\n\t * @returns The configuration value or `undefined` if the configuration entry was not found.\n\t */ _getFromSource(source, name) {\n        // The configuration name should be split into parts if it has dots. E.g. `resize.width` -> [`resize`, `width`].\n        const parts = name.split('.');\n        // Take the name of the configuration out of the parts. E.g. `resize.width` -> `width`.\n        name = parts.pop();\n        // Iterate over parts to check if currently stored configuration has proper structure.\n        for (const part of parts){\n            if (!isPlainObject(source[part])) {\n                source = null;\n                break;\n            }\n            // Nested object becomes a source.\n            source = source[part];\n        }\n        // Always returns undefined for non existing configuration.\n        return source ? cloneConfig(source[name]) : undefined;\n    }\n    /**\n\t * Iterates through passed object and calls {@link #_setToTarget} method with object key and value for each property.\n\t *\n\t * @param target Nested config object.\n\t * @param configuration Configuration data set\n\t * @param isDefine Defines if passed configuration is default configuration or not.\n\t */ _setObjectToTarget(target, configuration, isDefine) {\n        Object.keys(configuration).forEach((key)=>{\n            this._setToTarget(target, key, configuration[key], isDefine);\n        });\n    }\n}\n/**\n * Clones configuration object or value.\n */ function cloneConfig(source) {\n    return cloneDeepWith(source, leaveItemReferences);\n}\n/**\n * A customized function for cloneDeepWith.\n * In case if it's a DOM Element it will leave references to DOM Elements instead of cloning them.\n * If it's a function it will leave reference to actuall function.\n */ function leaveItemReferences(value) {\n    return isElement(value) || typeof value === 'function' ? value : undefined;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/isnode\n */ /**\n * Checks if the object is a native DOM Node.\n */ function isNode(obj) {\n    if (obj) {\n        if (obj.defaultView) {\n            return obj instanceof obj.defaultView.Document;\n        } else if (obj.ownerDocument && obj.ownerDocument.defaultView) {\n            return obj instanceof obj.ownerDocument.defaultView.Node;\n        }\n    }\n    return false;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/iswindow\n */ /**\n * Checks if the object is a native DOM Window.\n */ function isWindow(obj) {\n    const stringifiedObject = Object.prototype.toString.apply(obj);\n    // Returns `true` for the `window` object in browser environments.\n    if (stringifiedObject == '[object Window]') {\n        return true;\n    }\n    // Returns `true` for the `window` object in the Electron environment.\n    if (stringifiedObject == '[object global]') {\n        return true;\n    }\n    return false;\n}\n\nconst defaultEmitterClass = /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ EmitterMixin());\nfunction DomEmitterMixin(base) {\n    if (!base) {\n        return defaultEmitterClass;\n    }\n    class Mixin extends base {\n        listenTo(emitter, event, callback, options = {}) {\n            // Check if emitter is an instance of DOM Node. If so, use corresponding ProxyEmitter (or create one if not existing).\n            if (isNode(emitter) || isWindow(emitter)) {\n                const proxyOptions = {\n                    capture: !!options.useCapture,\n                    passive: !!options.usePassive\n                };\n                const proxyEmitter = this._getProxyEmitter(emitter, proxyOptions) || new ProxyEmitter(emitter, proxyOptions);\n                this.listenTo(proxyEmitter, event, callback, options);\n            } else {\n                // Execute parent class method with Emitter (or ProxyEmitter) instance.\n                super.listenTo(emitter, event, callback, options);\n            }\n        }\n        stopListening(emitter, event, callback) {\n            // Check if the emitter is an instance of DOM Node. If so, forward the call to the corresponding ProxyEmitters.\n            if (isNode(emitter) || isWindow(emitter)) {\n                const proxyEmitters = this._getAllProxyEmitters(emitter);\n                for (const proxy of proxyEmitters){\n                    this.stopListening(proxy, event, callback);\n                }\n            } else {\n                // Execute parent class method with Emitter (or ProxyEmitter) instance.\n                super.stopListening(emitter, event, callback);\n            }\n        }\n        /**\n\t\t * Retrieves ProxyEmitter instance for given DOM Node residing in this Host and given options.\n\t\t *\n\t\t * @param node DOM Node of the ProxyEmitter.\n\t\t * @param options Additional options.\n\t\t * @param options.useCapture Indicates that events of this type will be dispatched to the registered\n\t\t * listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t\t * @param options.usePassive Indicates that the function specified by listener will never call preventDefault()\n\t\t * and prevents blocking browser's main thread by this event handler.\n\t\t * @returns ProxyEmitter instance bound to the DOM Node.\n\t\t */ _getProxyEmitter(node, options) {\n            return _getEmitterListenedTo(this, getProxyEmitterId(node, options));\n        }\n        /**\n\t\t * Retrieves all the ProxyEmitter instances for given DOM Node residing in this Host.\n\t\t *\n\t\t * @param node DOM Node of the ProxyEmitter.\n\t\t */ _getAllProxyEmitters(node) {\n            return [\n                {\n                    capture: false,\n                    passive: false\n                },\n                {\n                    capture: false,\n                    passive: true\n                },\n                {\n                    capture: true,\n                    passive: false\n                },\n                {\n                    capture: true,\n                    passive: true\n                }\n            ].map((options)=>this._getProxyEmitter(node, options)).filter((proxy)=>!!proxy);\n        }\n    }\n    return Mixin;\n}\n// Backward compatibility with `mix`\n[\n    '_getProxyEmitter',\n    '_getAllProxyEmitters',\n    'on',\n    'once',\n    'off',\n    'listenTo',\n    'stopListening',\n    'fire',\n    'delegate',\n    'stopDelegating',\n    '_addEventListener',\n    '_removeEventListener'\n].forEach((key)=>{\n    DomEmitterMixin[key] = defaultEmitterClass.prototype[key];\n});\n/**\n * Creates a ProxyEmitter instance. Such an instance is a bridge between a DOM Node firing events\n * and any Host listening to them. It is backwards compatible with {@link module:utils/emittermixin~Emitter#on}.\n * There is a separate instance for each combination of modes (useCapture & usePassive). The mode is concatenated with\n * UID stored in HTMLElement to give each instance unique identifier.\n *\n *                                  listenTo( click, ... )\n *                    +-----------------------------------------+\n *                    |              stopListening( ... )       |\n *     +----------------------------+                           |             addEventListener( click, ... )\n *     | Host                       |                           |   +---------------------------------------------+\n *     +----------------------------+                           |   |       removeEventListener( click, ... )     |\n *     | _listeningTo: {            |                +----------v-------------+                                   |\n *     |   UID+mode: {              |                | ProxyEmitter           |                                   |\n *     |     emitter: ProxyEmitter, |                +------------------------+                      +------------v----------+\n *     |     callbacks: {           |                | events: {              |                      | Node (HTMLElement)    |\n *     |       click: [ callbacks ] |                |   click: [ callbacks ] |                      +-----------------------+\n *     |     }                      |                | },                     |                      | data-ck-expando: UID  |\n *     |   }                        |                | _domNode: Node,        |                      +-----------------------+\n *     | }                          |                | _domListeners: {},     |                                   |\n *     | +------------------------+ |                | _emitterId: UID+mode   |                                   |\n *     | | DomEmitterMixin        | |                +--------------^---------+                                   |\n *     | +------------------------+ |                           |   |                                             |\n *     +--------------^-------------+                           |   +---------------------------------------------+\n *                    |                                         |                  click (DOM Event)\n *                    +-----------------------------------------+\n *                                fire( click, DOM Event )\n */ class ProxyEmitter extends /* #__PURE__ */ EmitterMixin() {\n    _domNode;\n    _options;\n    /**\n\t * @param node DOM Node that fires events.\n\t * @param options Additional options.\n\t * @param options.useCapture Indicates that events of this type will be dispatched to the registered\n\t * listener before being dispatched to any EventTarget beneath it in the DOM tree.\n\t * @param options.usePassive Indicates that the function specified by listener will never call preventDefault()\n\t * and prevents blocking browser's main thread by this event handler.\n\t */ constructor(node, options){\n        super();\n        // Set emitter ID to match DOM Node \"expando\" property.\n        _setEmitterId(this, getProxyEmitterId(node, options));\n        // Remember the DOM Node this ProxyEmitter is bound to.\n        this._domNode = node;\n        // And given options.\n        this._options = options;\n    }\n    /**\n\t * Collection of native DOM listeners.\n\t */ _domListeners;\n    /**\n\t * Registers a callback function to be executed when an event is fired.\n\t *\n\t * It attaches a native DOM listener to the DOM Node. When fired,\n\t * a corresponding Emitter event will also fire with DOM Event object as an argument.\n\t *\n\t * **Note**: This is automatically called by the\n\t * {@link module:utils/emittermixin~Emitter#listenTo `Emitter#listenTo()`}.\n\t *\n\t * @param event The name of the event.\n\t */ attach(event) {\n        // If the DOM Listener for given event already exist it is pointless\n        // to attach another one.\n        if (this._domListeners && this._domListeners[event]) {\n            return;\n        }\n        const domListener = this._createDomListener(event);\n        // Attach the native DOM listener to DOM Node.\n        this._domNode.addEventListener(event, domListener, this._options);\n        if (!this._domListeners) {\n            this._domListeners = {};\n        }\n        // Store the native DOM listener in this ProxyEmitter. It will be helpful\n        // when stopping listening to the event.\n        this._domListeners[event] = domListener;\n    }\n    /**\n\t * Stops executing the callback on the given event.\n\t *\n\t * **Note**: This is automatically called by the\n\t * {@link module:utils/emittermixin~Emitter#stopListening `Emitter#stopListening()`}.\n\t *\n\t * @param event The name of the event.\n\t */ detach(event) {\n        let events;\n        // Remove native DOM listeners which are orphans. If no callbacks\n        // are awaiting given event, detach native DOM listener from DOM Node.\n        // See: {@link attach}.\n        if (this._domListeners[event] && (!(events = this._events[event]) || !events.callbacks.length)) {\n            this._domListeners[event].removeListener();\n        }\n    }\n    /**\n\t * Adds callback to emitter for given event.\n\t *\n\t * @internal\n\t * @param event The name of the event.\n\t * @param callback The function to be called on event.\n\t * @param options Additional options.\n\t */ _addEventListener(event, callback, options) {\n        this.attach(event);\n        EmitterMixin().prototype._addEventListener.call(this, event, callback, options);\n    }\n    /**\n\t * Removes callback from emitter for given event.\n\t *\n\t * @internal\n\t * @param event The name of the event.\n\t * @param callback The function to stop being called.\n\t */ _removeEventListener(event, callback) {\n        EmitterMixin().prototype._removeEventListener.call(this, event, callback);\n        this.detach(event);\n    }\n    /**\n\t * Creates a native DOM listener callback. When the native DOM event\n\t * is fired it will fire corresponding event on this ProxyEmitter.\n\t * Note: A native DOM Event is passed as an argument.\n\t *\n\t * @param event The name of the event.\n\t * @returns The DOM listener callback.\n\t */ _createDomListener(event) {\n        const domListener = (domEvt)=>{\n            this.fire(event, domEvt);\n        };\n        // Supply the DOM listener callback with a function that will help\n        // detach it from the DOM Node, when it is no longer necessary.\n        // See: {@link detach}.\n        domListener.removeListener = ()=>{\n            this._domNode.removeEventListener(event, domListener, this._options);\n            delete this._domListeners[event];\n        };\n        return domListener;\n    }\n}\n/**\n * Gets an unique DOM Node identifier. The identifier will be set if not defined.\n *\n * @returns UID for given DOM Node.\n */ function getNodeUID(node) {\n    return node['data-ck-expando'] || (node['data-ck-expando'] = uid());\n}\n/**\n * Gets id of the ProxyEmitter for the given node.\n */ function getProxyEmitterId(node, options) {\n    let id = getNodeUID(node);\n    for (const option of Object.keys(options).sort()){\n        if (options[option]) {\n            id += '-' + option;\n        }\n    }\n    return id;\n}\n\n/**\n * Returns the closest scrollable ancestor of a DOM element.\n *\n * @param domElement DOM element.\n * @returns First ancestor of `domElement` that is scrollable or null if such ancestor doesn't exist.\n */ function findClosestScrollableAncestor(domElement) {\n    let element = domElement.parentElement;\n    if (!element) {\n        return null;\n    }\n    while(element.tagName != 'BODY'){\n        const overflow = element.style.overflowY || global.window.getComputedStyle(element).overflowY;\n        if (overflow === 'auto' || overflow === 'scroll') {\n            break;\n        }\n        element = element.parentElement;\n        if (!element) {\n            return null;\n        }\n    }\n    return element;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /* globals Node */ /**\n * @module utils/dom/getancestors\n */ /**\n * Returns all ancestors of given DOM node, starting from the top-most (root). Includes the given node itself. If the\n * node is a part of `DocumentFragment` that `DocumentFragment` will be returned. In contrary, if the node is\n * appended to a `Document`, that `Document` will not be returned (algorithms operating on DOM tree care for `Document#documentElement`\n * at most, which will be returned).\n *\n * @param node DOM node.\n * @returns Array of given `node` parents.\n */ function getAncestors(node) {\n    const nodes = [];\n    let currentNode = node;\n    // We are interested in `Node`s `DocumentFragment`s only.\n    while(currentNode && currentNode.nodeType != Node.DOCUMENT_NODE){\n        nodes.unshift(currentNode);\n        currentNode = currentNode.parentNode;\n    }\n    return nodes;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /* globals HTMLTextAreaElement */ /**\n * @module utils/dom/getdatafromelement\n */ /**\n * Gets data from a given source element.\n *\n * @param el The element from which the data will be retrieved.\n * @returns The data string.\n */ function getDataFromElement(el) {\n    if (el instanceof HTMLTextAreaElement) {\n        return el.value;\n    }\n    return el.innerHTML;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/getborderwidths\n */ /**\n * Returns an object containing CSS border widths of a specified HTML element.\n *\n * @param element An element which has CSS borders.\n * @returns An object containing `top`, `left`, `right` and `bottom` properties\n * with numerical values of the `border-[top,left,right,bottom]-width` CSS styles.\n */ function getBorderWidths(element) {\n    // Call getComputedStyle on the window the element document belongs to.\n    const style = element.ownerDocument.defaultView.getComputedStyle(element);\n    return {\n        top: parseInt(style.borderTopWidth, 10),\n        right: parseInt(style.borderRightWidth, 10),\n        bottom: parseInt(style.borderBottomWidth, 10),\n        left: parseInt(style.borderLeftWidth, 10)\n    };\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/getrangefrommouseevent\n */ /**\n * Returns a DOM range from a given point specified by a mouse event.\n *\n * @param domEvent The mouse event.\n * @returns The DOM range.\n */ function getRangeFromMouseEvent(domEvent) {\n    if (!domEvent.target) {\n        return null;\n    }\n    const domDoc = domEvent.target.ownerDocument;\n    const x = domEvent.clientX;\n    const y = domEvent.clientY;\n    let domRange = null;\n    // Webkit & Blink.\n    if (domDoc.caretRangeFromPoint && domDoc.caretRangeFromPoint(x, y)) {\n        domRange = domDoc.caretRangeFromPoint(x, y);\n    } else if (domEvent.rangeParent) {\n        domRange = domDoc.createRange();\n        domRange.setStart(domEvent.rangeParent, domEvent.rangeOffset);\n        domRange.collapse(true);\n    }\n    return domRange;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/istext\n */ /**\n * Checks if the object is a native DOM Text node.\n */ function isText(obj) {\n    return Object.prototype.toString.call(obj) == '[object Text]';\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/isrange\n */ /**\n * Checks if the object is a native DOM Range.\n */ function isRange(obj) {\n    return Object.prototype.toString.apply(obj) == '[object Range]';\n}\n\n/**\n * For a given element, returns the nearest ancestor element which CSS position is not \"static\".\n *\n * @param element The native DOM element to be checked.\n */ function getPositionedAncestor(element) {\n    if (!element || !element.parentNode) {\n        return null;\n    }\n    if (element.offsetParent === global.document.body) {\n        return null;\n    }\n    return element.offsetParent;\n}\n\nconst rectProperties = [\n    'top',\n    'right',\n    'bottom',\n    'left',\n    'width',\n    'height'\n];\n/**\n * A helper class representing a `ClientRect` object, e.g. value returned by\n * the native `object.getBoundingClientRect()` method. Provides a set of methods\n * to manipulate the rect and compare it against other rect instances.\n */ class Rect {\n    /**\n\t * The \"top\" value of the rect.\n\t *\n\t * @readonly\n\t */ top;\n    /**\n\t * The \"right\" value of the rect.\n\t *\n\t * @readonly\n\t */ right;\n    /**\n\t * The \"bottom\" value of the rect.\n\t *\n\t * @readonly\n\t */ bottom;\n    /**\n\t * The \"left\" value of the rect.\n\t *\n\t * @readonly\n\t */ left;\n    /**\n\t * The \"width\" value of the rect.\n\t *\n\t * @readonly\n\t */ width;\n    /**\n\t * The \"height\" value of the rect.\n\t *\n\t * @readonly\n\t */ height;\n    /**\n\t * The object this rect is for.\n\t *\n\t * @readonly\n\t */ _source;\n    /**\n\t * Creates an instance of rect.\n\t *\n\t * ```ts\n\t * // Rect of an HTMLElement.\n\t * const rectA = new Rect( document.body );\n\t *\n\t * // Rect of a DOM Range.\n\t * const rectB = new Rect( document.getSelection().getRangeAt( 0 ) );\n\t *\n\t * // Rect of a window (web browser viewport).\n\t * const rectC = new Rect( window );\n\t *\n\t * // Rect out of an object.\n\t * const rectD = new Rect( { top: 0, right: 10, bottom: 10, left: 0, width: 10, height: 10 } );\n\t *\n\t * // Rect out of another Rect instance.\n\t * const rectE = new Rect( rectD );\n\t *\n\t * // Rect out of a ClientRect.\n\t * const rectF = new Rect( document.body.getClientRects().item( 0 ) );\n\t * ```\n\t *\n\t * **Note**: By default a rect of an HTML element includes its CSS borders and scrollbars (if any)\n\t * ant the rect of a `window` includes scrollbars too. Use {@link #excludeScrollbarsAndBorders}\n\t * to get the inner part of the rect.\n\t *\n\t * @param source A source object to create the rect.\n\t */ constructor(source){\n        const isSourceRange = isRange(source);\n        Object.defineProperty(this, '_source', {\n            // If the source is a Rect instance, copy it's #_source.\n            value: source._source || source,\n            writable: true,\n            enumerable: false\n        });\n        if (isDomElement(source) || isSourceRange) {\n            // The `Rect` class depends on `getBoundingClientRect` and `getClientRects` DOM methods. If the source\n            // of a rect in an HTML element or a DOM range but it does not belong to any rendered DOM tree, these methods\n            // will fail to obtain the geometry and the rect instance makes little sense to the features using it.\n            // To get rid of this warning make sure the source passed to the constructor is a descendant of `window.document.body`.\n            // @if CK_DEBUG // const sourceNode = isSourceRange ? source.startContainer : source;\n            // @if CK_DEBUG // if ( !sourceNode.ownerDocument || !sourceNode.ownerDocument.body.contains( sourceNode ) ) {\n            // @if CK_DEBUG // \tconsole.warn(\n            // @if CK_DEBUG // \t\t'rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',\n            // @if CK_DEBUG // \t\t{ source } );\n            // @if CK_DEBUG // }\n            if (isSourceRange) {\n                const rangeRects = Rect.getDomRangeRects(source);\n                copyRectProperties(this, Rect.getBoundingRect(rangeRects));\n            } else {\n                copyRectProperties(this, source.getBoundingClientRect());\n            }\n        } else if (isWindow(source)) {\n            const { innerWidth, innerHeight } = source;\n            copyRectProperties(this, {\n                top: 0,\n                right: innerWidth,\n                bottom: innerHeight,\n                left: 0,\n                width: innerWidth,\n                height: innerHeight\n            });\n        } else {\n            copyRectProperties(this, source);\n        }\n    }\n    /**\n\t * Returns a clone of the rect.\n\t *\n\t * @returns A cloned rect.\n\t */ clone() {\n        return new Rect(this);\n    }\n    /**\n\t * Moves the rect so that its upper–left corner lands in desired `[ x, y ]` location.\n\t *\n\t * @param x Desired horizontal location.\n\t * @param y Desired vertical location.\n\t * @returns A rect which has been moved.\n\t */ moveTo(x, y) {\n        this.top = y;\n        this.right = x + this.width;\n        this.bottom = y + this.height;\n        this.left = x;\n        return this;\n    }\n    /**\n\t * Moves the rect in–place by a dedicated offset.\n\t *\n\t * @param x A horizontal offset.\n\t * @param y A vertical offset\n\t * @returns A rect which has been moved.\n\t */ moveBy(x, y) {\n        this.top += y;\n        this.right += x;\n        this.left += x;\n        this.bottom += y;\n        return this;\n    }\n    /**\n\t * Returns a new rect a a result of intersection with another rect.\n\t */ getIntersection(anotherRect) {\n        const rect = {\n            top: Math.max(this.top, anotherRect.top),\n            right: Math.min(this.right, anotherRect.right),\n            bottom: Math.min(this.bottom, anotherRect.bottom),\n            left: Math.max(this.left, anotherRect.left),\n            width: 0,\n            height: 0\n        };\n        rect.width = rect.right - rect.left;\n        rect.height = rect.bottom - rect.top;\n        if (rect.width < 0 || rect.height < 0) {\n            return null;\n        } else {\n            const newRect = new Rect(rect);\n            newRect._source = this._source;\n            return newRect;\n        }\n    }\n    /**\n\t * Returns the area of intersection with another rect.\n\t *\n\t * @returns Area of intersection.\n\t */ getIntersectionArea(anotherRect) {\n        const rect = this.getIntersection(anotherRect);\n        if (rect) {\n            return rect.getArea();\n        } else {\n            return 0;\n        }\n    }\n    /**\n\t * Returns the area of the rect.\n\t */ getArea() {\n        return this.width * this.height;\n    }\n    /**\n\t * Returns a new rect, a part of the original rect, which is actually visible to the user and is relative to the,`body`,\n\t * e.g. an original rect cropped by parent element rects which have `overflow` set in CSS\n\t * other than `\"visible\"`.\n\t *\n\t * If there's no such visible rect, which is when the rect is limited by one or many of\n\t * the ancestors, `null` is returned.\n\t *\n\t * **Note**: This method does not consider the boundaries of the viewport (window).\n\t * To get a rect cropped by all ancestors and the viewport, use an intersection such as:\n\t *\n\t * ```ts\n\t * const visibleInViewportRect = new Rect( window ).getIntersection( new Rect( source ).getVisible() );\n\t * ```\n\t *\n\t * @returns A visible rect instance or `null`, if there's none.\n\t */ getVisible() {\n        const source = this._source;\n        let visibleRect = this.clone();\n        // There's no ancestor to crop <body> with the overflow.\n        if (isBody(source)) {\n            return visibleRect;\n        }\n        let child = source;\n        let parent = source.parentNode || source.commonAncestorContainer;\n        let absolutelyPositionedChildElement;\n        // Check the ancestors all the way up to the <body>.\n        while(parent && !isBody(parent)){\n            const isParentOverflowVisible = getElementOverflow(parent) === 'visible';\n            if (child instanceof HTMLElement && getElementPosition(child) === 'absolute') {\n                absolutelyPositionedChildElement = child;\n            }\n            const parentElementPosition = getElementPosition(parent);\n            // The child will be cropped only if it has `position: absolute` and the parent has `position: relative` + some overflow.\n            // Otherwise there's no chance of visual clipping and the parent can be skipped\n            // https://github.com/ckeditor/ckeditor5/issues/14107.\n            //\n            // condition: isParentOverflowVisible\n            // \t\t+---------------------------+\n            //\t\t| #parent\t\t\t\t\t|\n            //\t\t| (overflow: visible)\t\t|\n            //\t\t|\t\t\t\t+-----------+---------------+\n            //\t\t|\t\t\t\t| child\t\t\t\t\t\t|\n            //\t\t|\t\t\t\t+-----------+---------------+\n            //\t\t+---------------------------+\n            //\n            // condition: absolutelyPositionedChildElement && parentElementPosition === 'relative' && isParentOverflowVisible\n            // \t\t+---------------------------+\n            //\t\t| parent\t\t\t\t\t|\n            //\t\t| (position: relative;)\t\t|\n            //\t\t| (overflow: visible;)\t\t|\n            //\t\t|\t\t\t\t+-----------+---------------+\n            //\t\t|\t\t\t\t| child  \t\t\t\t\t|\n            //\t\t|\t\t\t\t| (position: absolute;)\t\t|\n            //\t\t|\t\t\t\t+-----------+---------------+\n            //\t\t+---------------------------+\n            //\n            // condition: absolutelyPositionedChildElement && parentElementPosition !== 'relative'\n            // \t\t+---------------------------+\n            //\t\t| parent\t\t\t\t\t|\n            //\t\t| (position: static;)\t\t|\n            //\t\t|\t\t\t\t+-----------+---------------+\n            //\t\t|\t\t\t\t| child  \t\t\t\t\t|\n            //\t\t|\t\t\t\t| (position: absolute;)\t\t|\n            //\t\t|\t\t\t\t+-----------+---------------+\n            //\t\t+---------------------------+\n            if (isParentOverflowVisible || absolutelyPositionedChildElement && (parentElementPosition === 'relative' && isParentOverflowVisible || parentElementPosition !== 'relative')) {\n                child = parent;\n                parent = parent.parentNode;\n                continue;\n            }\n            const parentRect = new Rect(parent);\n            const intersectionRect = visibleRect.getIntersection(parentRect);\n            if (intersectionRect) {\n                if (intersectionRect.getArea() < visibleRect.getArea()) {\n                    // Reduce the visible rect to the intersection.\n                    visibleRect = intersectionRect;\n                }\n            } else {\n                // There's no intersection, the rect is completely invisible.\n                return null;\n            }\n            child = parent;\n            parent = parent.parentNode;\n        }\n        return visibleRect;\n    }\n    /**\n\t * Checks if all property values ({@link #top}, {@link #left}, {@link #right},\n\t * {@link #bottom}, {@link #width} and {@link #height}) are the equal in both rect\n\t * instances.\n\t *\n\t * @param anotherRect A rect instance to compare with.\n\t * @returns `true` when Rects are equal. `false` otherwise.\n\t */ isEqual(anotherRect) {\n        for (const prop of rectProperties){\n            if (this[prop] !== anotherRect[prop]) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Checks whether a rect fully contains another rect instance.\n\t *\n\t * @param anotherRect\n\t * @returns `true` if contains, `false` otherwise.\n\t */ contains(anotherRect) {\n        const intersectRect = this.getIntersection(anotherRect);\n        return !!(intersectRect && intersectRect.isEqual(anotherRect));\n    }\n    /**\n\t * Recalculates screen coordinates to coordinates relative to the positioned ancestor offset.\n\t */ toAbsoluteRect() {\n        const { scrollX, scrollY } = global.window;\n        const absoluteRect = this.clone().moveBy(scrollX, scrollY);\n        if (isDomElement(absoluteRect._source)) {\n            const positionedAncestor = getPositionedAncestor(absoluteRect._source);\n            if (positionedAncestor) {\n                shiftRectToCompensatePositionedAncestor(absoluteRect, positionedAncestor);\n            }\n        }\n        return absoluteRect;\n    }\n    /**\n\t * Excludes scrollbars and CSS borders from the rect.\n\t *\n\t * * Borders are removed when {@link #_source} is an HTML element.\n\t * * Scrollbars are excluded from HTML elements and the `window`.\n\t *\n\t * @returns A rect which has been updated.\n\t */ excludeScrollbarsAndBorders() {\n        const source = this._source;\n        let scrollBarWidth, scrollBarHeight, direction;\n        if (isWindow(source)) {\n            scrollBarWidth = source.innerWidth - source.document.documentElement.clientWidth;\n            scrollBarHeight = source.innerHeight - source.document.documentElement.clientHeight;\n            direction = source.getComputedStyle(source.document.documentElement).direction;\n        } else {\n            const borderWidths = getBorderWidths(source);\n            scrollBarWidth = source.offsetWidth - source.clientWidth - borderWidths.left - borderWidths.right;\n            scrollBarHeight = source.offsetHeight - source.clientHeight - borderWidths.top - borderWidths.bottom;\n            direction = source.ownerDocument.defaultView.getComputedStyle(source).direction;\n            this.left += borderWidths.left;\n            this.top += borderWidths.top;\n            this.right -= borderWidths.right;\n            this.bottom -= borderWidths.bottom;\n            this.width = this.right - this.left;\n            this.height = this.bottom - this.top;\n        }\n        this.width -= scrollBarWidth;\n        if (direction === 'ltr') {\n            this.right -= scrollBarWidth;\n        } else {\n            this.left += scrollBarWidth;\n        }\n        this.height -= scrollBarHeight;\n        this.bottom -= scrollBarHeight;\n        return this;\n    }\n    /**\n\t * Returns an array of rects of the given native DOM Range.\n\t *\n\t * @param range A native DOM range.\n\t * @returns DOM Range rects.\n\t */ static getDomRangeRects(range) {\n        const rects = [];\n        // Safari does not iterate over ClientRectList using for...of loop.\n        const clientRects = Array.from(range.getClientRects());\n        if (clientRects.length) {\n            for (const rect of clientRects){\n                rects.push(new Rect(rect));\n            }\n        } else {\n            let startContainer = range.startContainer;\n            if (isText(startContainer)) {\n                startContainer = startContainer.parentNode;\n            }\n            const rect = new Rect(startContainer.getBoundingClientRect());\n            rect.right = rect.left;\n            rect.width = 0;\n            rects.push(rect);\n        }\n        return rects;\n    }\n    /**\n\t * Returns a bounding rectangle that contains all the given `rects`.\n\t *\n\t * @param rects A list of rectangles that should be contained in the result rectangle.\n\t * @returns Bounding rectangle or `null` if no `rects` were given.\n\t */ static getBoundingRect(rects) {\n        const boundingRectData = {\n            left: Number.POSITIVE_INFINITY,\n            top: Number.POSITIVE_INFINITY,\n            right: Number.NEGATIVE_INFINITY,\n            bottom: Number.NEGATIVE_INFINITY,\n            width: 0,\n            height: 0\n        };\n        let rectangleCount = 0;\n        for (const rect of rects){\n            rectangleCount++;\n            boundingRectData.left = Math.min(boundingRectData.left, rect.left);\n            boundingRectData.top = Math.min(boundingRectData.top, rect.top);\n            boundingRectData.right = Math.max(boundingRectData.right, rect.right);\n            boundingRectData.bottom = Math.max(boundingRectData.bottom, rect.bottom);\n        }\n        if (rectangleCount == 0) {\n            return null;\n        }\n        boundingRectData.width = boundingRectData.right - boundingRectData.left;\n        boundingRectData.height = boundingRectData.bottom - boundingRectData.top;\n        return new Rect(boundingRectData);\n    }\n}\n/**\n * Acquires all the rect properties from the passed source.\n */ function copyRectProperties(rect, source) {\n    for (const p of rectProperties){\n        rect[p] = source[p];\n    }\n}\n/**\n * Checks if provided object is a <body> HTML element.\n */ function isBody(value) {\n    if (!isDomElement(value)) {\n        return false;\n    }\n    return value === value.ownerDocument.body;\n}\n/**\n * Checks if provided object \"looks like\" a DOM Element and has API required by `Rect` class.\n */ function isDomElement(value) {\n    // Note: earlier we used `isElement()` from lodash library, however that function is less performant because\n    // it makes complicated checks to make sure that given value is a DOM element.\n    return value !== null && typeof value === 'object' && value.nodeType === 1 && typeof value.getBoundingClientRect === 'function';\n}\n/**\n * Returns the value of the `position` style of an `HTMLElement`.\n */ function getElementPosition(element) {\n    return element instanceof HTMLElement ? element.ownerDocument.defaultView.getComputedStyle(element).position : 'static';\n}\n/**\n * Returns the value of the `overflow` style of an `HTMLElement` or a `Range`.\n */ function getElementOverflow(element) {\n    return element instanceof HTMLElement ? element.ownerDocument.defaultView.getComputedStyle(element).overflow : 'visible';\n}\n/**\n * For a given absolute Rect coordinates object and a positioned element ancestor, it updates its\n * coordinates that make up for the position and the scroll of the ancestor.\n *\n * This is necessary because while Rects (and DOMRects) are relative to the browser's viewport, their coordinates\n * are used in real–life to position elements with `position: absolute`, which are scoped by any positioned\n * (and scrollable) ancestors.\n */ function shiftRectToCompensatePositionedAncestor(rect, positionedElementAncestor) {\n    const ancestorPosition = new Rect(positionedElementAncestor);\n    const ancestorBorderWidths = getBorderWidths(positionedElementAncestor);\n    let moveX = 0;\n    let moveY = 0;\n    // (https://github.com/ckeditor/ckeditor5-ui-default/issues/126)\n    // If there's some positioned ancestor of the panel, then its `Rect` must be taken into\n    // consideration. `Rect` is always relative to the viewport while `position: absolute` works\n    // with respect to that positioned ancestor.\n    moveX -= ancestorPosition.left;\n    moveY -= ancestorPosition.top;\n    // (https://github.com/ckeditor/ckeditor5-utils/issues/139)\n    // If there's some positioned ancestor of the panel, not only its position must be taken into\n    // consideration (see above) but also its internal scrolls. Scroll have an impact here because `Rect`\n    // is relative to the viewport (it doesn't care about scrolling), while `position: absolute`\n    // must compensate that scrolling.\n    moveX += positionedElementAncestor.scrollLeft;\n    moveY += positionedElementAncestor.scrollTop;\n    // (https://github.com/ckeditor/ckeditor5-utils/issues/139)\n    // If there's some positioned ancestor of the panel, then its `Rect` includes its CSS `borderWidth`\n    // while `position: absolute` positioning does not consider it.\n    // E.g. `{ position: absolute, top: 0, left: 0 }` means upper left corner of the element,\n    // not upper-left corner of its border.\n    moveX -= ancestorBorderWidths.left;\n    moveY -= ancestorBorderWidths.top;\n    rect.moveBy(moveX, moveY);\n}\n\n/**\n * A helper class which instances allow performing custom actions when native DOM elements are resized.\n *\n * ```ts\n * const editableElement = editor.editing.view.getDomRoot();\n *\n * const observer = new ResizeObserver( editableElement, entry => {\n * \tconsole.log( 'The editable element has been resized in DOM.' );\n * \tconsole.log( entry.target ); // -> editableElement\n * \tconsole.log( entry.contentRect.width ); // -> e.g. '423px'\n * } );\n * ```\n *\n * It uses the [native DOM resize observer](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)\n * under the hood.\n */ class ResizeObserver {\n    /**\n\t * The element observed by this observer.\n\t */ _element;\n    /**\n\t * The callback executed each time {@link #_element} is resized.\n\t */ _callback;\n    /**\n\t * The single native observer instance shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n\t */ static _observerInstance = null;\n    /**\n\t * A mapping of native DOM elements and their callbacks shared across all\n\t * {@link module:utils/dom/resizeobserver~ResizeObserver} instances.\n\t */ static _elementCallbacks = null;\n    /**\n\t * Creates an instance of the `ResizeObserver` class.\n\t *\n\t * @param element A DOM element that is to be observed for resizing. Note that\n\t * the element must be visible (i.e. not detached from DOM) for the observer to work.\n\t * @param callback A function called when the observed element was resized. It passes\n\t * the [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)\n\t * object with information about the resize event.\n\t */ constructor(element, callback){\n        // **Note**: For the maximum performance, this class ensures only a single instance of the native\n        // observer is used no matter how many instances of this class were created.\n        if (!ResizeObserver._observerInstance) {\n            ResizeObserver._createObserver();\n        }\n        this._element = element;\n        this._callback = callback;\n        ResizeObserver._addElementCallback(element, callback);\n        ResizeObserver._observerInstance.observe(element);\n    }\n    /**\n\t * The element observed by this observer.\n\t */ get element() {\n        return this._element;\n    }\n    /**\n\t * Destroys the observer which disables the `callback` passed to the {@link #constructor}.\n\t */ destroy() {\n        ResizeObserver._deleteElementCallback(this._element, this._callback);\n    }\n    /**\n\t * Registers a new resize callback for the DOM element.\n\t */ static _addElementCallback(element, callback) {\n        if (!ResizeObserver._elementCallbacks) {\n            ResizeObserver._elementCallbacks = new Map();\n        }\n        let callbacks = ResizeObserver._elementCallbacks.get(element);\n        if (!callbacks) {\n            callbacks = new Set();\n            ResizeObserver._elementCallbacks.set(element, callbacks);\n        }\n        callbacks.add(callback);\n    }\n    /**\n\t * Removes a resize callback from the DOM element. If no callbacks are left\n\t * for the element, it removes the element from the native observer.\n\t */ static _deleteElementCallback(element, callback) {\n        const callbacks = ResizeObserver._getElementCallbacks(element);\n        // Remove the element callback. Check if exist first in case someone\n        // called destroy() twice.\n        if (callbacks) {\n            callbacks.delete(callback);\n            // If no callbacks left for the element, also remove the element.\n            if (!callbacks.size) {\n                ResizeObserver._elementCallbacks.delete(element);\n                ResizeObserver._observerInstance.unobserve(element);\n            }\n        }\n        if (ResizeObserver._elementCallbacks && !ResizeObserver._elementCallbacks.size) {\n            ResizeObserver._observerInstance = null;\n            ResizeObserver._elementCallbacks = null;\n        }\n    }\n    /**\n\t * Returns are registered resize callbacks for the DOM element.\n\t */ static _getElementCallbacks(element) {\n        if (!ResizeObserver._elementCallbacks) {\n            return null;\n        }\n        return ResizeObserver._elementCallbacks.get(element);\n    }\n    /**\n\t * Creates the single native observer shared across all `ResizeObserver` instances.\n\t */ static _createObserver() {\n        ResizeObserver._observerInstance = new global.window.ResizeObserver((entries)=>{\n            for (const entry of entries){\n                const callbacks = ResizeObserver._getElementCallbacks(entry.target);\n                if (callbacks) {\n                    for (const callback of callbacks){\n                        callback(entry);\n                    }\n                }\n            }\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/setdatainelement\n */ /* globals HTMLTextAreaElement */ /**\n * Sets data in a given element.\n *\n * @param el The element in which the data will be set.\n * @param data The data string.\n */ function setDataInElement(el, data) {\n    if (el instanceof HTMLTextAreaElement) {\n        el.value = data;\n    }\n    el.innerHTML = data;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/tounit\n */ /**\n * Returns a helper function, which adds a desired trailing\n * `unit` to the passed value.\n *\n * @param unit An unit like \"px\" or \"em\".\n */ function toUnit(unit) {\n    return (value)=>value + unit;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/indexof\n */ /**\n * Returns index of the node in the parent element.\n *\n * @param node Node which index is tested.\n * @returns Index of the node in the parent element. Returns 0 if node has no parent.\n */ function indexOf(node) {\n    let index = 0;\n    while(node.previousSibling){\n        node = node.previousSibling;\n        index++;\n    }\n    return index;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/insertat\n */ /**\n * Inserts node to the parent at given index.\n *\n * @param parentElement Parent element.\n * @param index Insertions index.\n * @param nodeToInsert Node to insert.\n */ function insertAt(parentElement, index, nodeToInsert) {\n    parentElement.insertBefore(nodeToInsert, parentElement.childNodes[index] || null);\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /* globals Node */ /**\n * @module utils/dom/iscomment\n */ /**\n * Checks whether the object is a native DOM Comment node.\n */ function isComment(obj) {\n    return obj && obj.nodeType === Node.COMMENT_NODE;\n}\n\n/**\n * Checks if the given attribute name is valid in terms of HTML.\n *\n * @param name Attribute name.\n */ function isValidAttributeName(name) {\n    try {\n        global.document.createAttribute(name);\n    } catch (error) {\n        return false;\n    }\n    return true;\n}\n\n/**\n * Checks whether the element is visible to the user in DOM:\n *\n * * connected to the root of the document,\n * * has no `display: none`,\n * * has no ancestors with `display: none`.\n *\n * **Note**: This helper does not check whether the element is hidden by cropping, overflow, etc..\n * To check that, use {@link module:utils/dom/rect~Rect} instead.\n */ function isVisible(element) {\n    if (!element) {\n        return false;\n    }\n    if (isText(element)) {\n        return isVisible(element.parentElement);\n    }\n    if (element.getClientRects) {\n        return !!element.getClientRects().length;\n    }\n    return false;\n}\n\n// @if CK_DEBUG_POSITION // const {\n// @if CK_DEBUG_POSITION // \tdefault: RectDrawer,\n// @if CK_DEBUG_POSITION // \tdiagonalStylesBlack,\n// @if CK_DEBUG_POSITION // \tdiagonalStylesGreen,\n// @if CK_DEBUG_POSITION // \tdiagonalStylesRed\n// @if CK_DEBUG_POSITION // } = require( '@ckeditor/ckeditor5-utils/tests/_utils/rectdrawer' );\n// @if CK_DEBUG_POSITION // const TARGET_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px', outlineStyle: 'dashed', outlineColor: 'blue', outlineOffset: '2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const VISIBLE_TARGET_RECT_STYLE = {\n// @if CK_DEBUG_POSITION //\t\t...diagonalStylesBlack,\n// @if CK_DEBUG_POSITION //\t\topacity: '1',\n// @if CK_DEBUG_POSITION //\t\tbackgroundColor: '#00000033',\n// @if CK_DEBUG_POSITION //\t\toutlineWidth: '2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const VIEWPORT_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px',\n// @if CK_DEBUG_POSITION // \toutlineOffset: '-2px',\n// @if CK_DEBUG_POSITION // \toutlineStyle: 'solid',\n// @if CK_DEBUG_POSITION // \toutlineColor: 'red'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const VISIBLE_LIMITER_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \t...diagonalStylesGreen,\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px',\n// @if CK_DEBUG_POSITION // \toutlineOffset: '-2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const ELEMENT_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \toutlineWidth: '2px', outlineColor: 'orange', outlineOffset: '-2px'\n// @if CK_DEBUG_POSITION // };\n// @if CK_DEBUG_POSITION // const CHOSEN_POSITION_RECT_STYLE = {\n// @if CK_DEBUG_POSITION // \topacity: .5, outlineColor: 'magenta', backgroundColor: 'magenta'\n// @if CK_DEBUG_POSITION // };\n/**\n * Calculates the `position: absolute` coordinates of a given element so it can be positioned with respect to the\n * target in the visually most efficient way, taking various restrictions like viewport or limiter geometry\n * into consideration.\n *\n * **Note**: If there are no position coordinates found that meet the requirements (arguments of this helper),\n * `null` is returned.\n *\n * ```ts\n * // The element which is to be positioned.\n * const element = document.body.querySelector( '#toolbar' );\n *\n * // A target to which the element is positioned relatively.\n * const target = document.body.querySelector( '#container' );\n *\n * // Finding the optimal coordinates for the positioning.\n * const { left, top, name } = getOptimalPosition( {\n * \telement: element,\n * \ttarget: target,\n *\n * \t// The algorithm will chose among these positions to meet the requirements such\n * \t// as \"limiter\" element or \"fitInViewport\", set below. The positions are considered\n * \t// in the order of the array.\n * \tpositions: [\n * \t\t//\n * \t \t//\t[ Target ]\n * \t\t//\t+-----------------+\n * \t\t//\t|     Element     |\n * \t\t//\t+-----------------+\n * \t\t//\n * \t\ttargetRect => ( {\n * \t\t\ttop: targetRect.bottom,\n * \t\t\tleft: targetRect.left,\n * \t\t\tname: 'mySouthEastPosition'\n * \t\t} ),\n *\n * \t\t//\n * \t\t//\t+-----------------+\n * \t\t//\t|     Element     |\n * \t\t//\t+-----------------+\n * \t\t//\t[ Target ]\n * \t\t//\n * \t\t( targetRect, elementRect ) => ( {\n * \t\t\ttop: targetRect.top - elementRect.height,\n * \t\t\tleft: targetRect.left,\n * \t\t\tname: 'myNorthEastPosition'\n * \t\t} )\n * \t],\n *\n * \t// Find a position such guarantees the element remains within visible boundaries of <body>.\n * \tlimiter: document.body,\n *\n * \t// Find a position such guarantees the element remains within visible boundaries of the browser viewport.\n * \tfitInViewport: true\n * } );\n *\n * // The best position which fits into document.body and the viewport. May be useful\n * // to set proper class on the `element`.\n * console.log( name ); // -> \"myNorthEastPosition\"\n *\n * // Using the absolute coordinates which has been found to position the element\n * // as in the diagram depicting the \"myNorthEastPosition\" position.\n * element.style.top = top;\n * element.style.left = left;\n * ```\n *\n * @param options The input data and configuration of the helper.\n */ function getOptimalPosition({ element, target, positions, limiter, fitInViewport, viewportOffsetConfig }) {\n    // If the {@link module:utils/dom/position~Options#target} is a function, use what it returns.\n    // https://github.com/ckeditor/ckeditor5-utils/issues/157\n    if (isFunction(target)) {\n        target = target();\n    }\n    // If the {@link module:utils/dom/position~Options#limiter} is a function, use what it returns.\n    // https://github.com/ckeditor/ckeditor5-ui/issues/260\n    if (isFunction(limiter)) {\n        limiter = limiter();\n    }\n    const positionedElementAncestor = getPositionedAncestor(element);\n    const constrainedViewportRect = getConstrainedViewportRect(viewportOffsetConfig);\n    const elementRect = new Rect(element);\n    const visibleTargetRect = getVisibleViewportIntersectionRect(target, constrainedViewportRect);\n    let bestPosition;\n    // @if CK_DEBUG_POSITION // const targetRect = new Rect( target );\n    // @if CK_DEBUG_POSITION // RectDrawer.clear();\n    // @if CK_DEBUG_POSITION // RectDrawer.draw( targetRect, TARGET_RECT_STYLE, 'Target' );\n    // @if CK_DEBUG_POSITION // if ( constrainedViewportRect ) {\n    // @if CK_DEBUG_POSITION //\t\tRectDrawer.draw( constrainedViewportRect, VIEWPORT_RECT_STYLE, 'Viewport' );\n    // @if CK_DEBUG_POSITION // }\n    // If the target got cropped by ancestors or went off the screen, positioning does not make any sense.\n    if (!visibleTargetRect || !constrainedViewportRect.getIntersection(visibleTargetRect)) {\n        return null;\n    }\n    // @if CK_DEBUG_POSITION //\tRectDrawer.draw( visibleTargetRect, VISIBLE_TARGET_RECT_STYLE, 'VisTgt' );\n    const positionOptions = {\n        targetRect: visibleTargetRect,\n        elementRect,\n        positionedElementAncestor,\n        viewportRect: constrainedViewportRect\n    };\n    // If there are no limits, just grab the very first position and be done with that drama.\n    if (!limiter && !fitInViewport) {\n        bestPosition = new PositionObject(positions[0], positionOptions);\n    } else {\n        if (limiter) {\n            const visibleLimiterRect = getVisibleViewportIntersectionRect(limiter, constrainedViewportRect);\n            if (visibleLimiterRect) {\n                positionOptions.limiterRect = visibleLimiterRect;\n            // @if CK_DEBUG_POSITION // RectDrawer.draw( visibleLimiterRect, VISIBLE_LIMITER_RECT_STYLE, 'VisLim' );\n            }\n        }\n        // If there's no best position found, i.e. when all intersections have no area because\n        // rects have no width or height, then just return `null`\n        bestPosition = getBestPosition(positions, positionOptions);\n    }\n    return bestPosition;\n}\n/**\n * Returns intersection of visible source `Rect` with Viewport `Rect`. In case when source `Rect` is not visible\n * or there is no intersection between source `Rect` and Viewport `Rect`, `null` will be returned.\n */ function getVisibleViewportIntersectionRect(source, viewportRect) {\n    const visibleSourceRect = new Rect(source).getVisible();\n    if (!visibleSourceRect) {\n        return null;\n    }\n    return visibleSourceRect.getIntersection(viewportRect);\n}\n/**\n * Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n */ function getConstrainedViewportRect(viewportOffsetConfig) {\n    viewportOffsetConfig = Object.assign({\n        top: 0,\n        bottom: 0,\n        left: 0,\n        right: 0\n    }, viewportOffsetConfig);\n    const viewportRect = new Rect(global.window);\n    viewportRect.top += viewportOffsetConfig.top;\n    viewportRect.height -= viewportOffsetConfig.top;\n    viewportRect.bottom -= viewportOffsetConfig.bottom;\n    viewportRect.height -= viewportOffsetConfig.bottom;\n    return viewportRect;\n}\n/**\n * For a given array of positioning functions, returns such that provides the best\n * fit of the `elementRect` into the `limiterRect` and `viewportRect`.\n */ function getBestPosition(positions, options) {\n    const { elementRect } = options;\n    // This is when element is fully visible.\n    const elementRectArea = elementRect.getArea();\n    const positionInstances = positions.map((positioningFunction)=>new PositionObject(positioningFunction, options))// Some positioning functions may return `null` if they don't want to participate.\n    .filter((position)=>!!position.name);\n    let maxFitFactor = 0;\n    let bestPosition = null;\n    for (const position of positionInstances){\n        const { limiterIntersectionArea, viewportIntersectionArea } = position;\n        // If a such position is found that element is fully contained by the limiter then, obviously,\n        // there will be no better one, so finishing.\n        if (limiterIntersectionArea === elementRectArea) {\n            // @if CK_DEBUG_POSITION //\tRectDrawer.draw( position._rect, CHOSEN_POSITION_RECT_STYLE, [\n            // @if CK_DEBUG_POSITION //\t\tposition.name,\n            // @if CK_DEBUG_POSITION //\t\t'100% fit',\n            // @if CK_DEBUG_POSITION //\t].join( '\\n' ) );\n            return position;\n        }\n        // To maximize both viewport and limiter intersection areas we use distance on _viewportIntersectionArea\n        // and _limiterIntersectionArea plane (without sqrt because we are looking for max value).\n        const fitFactor = viewportIntersectionArea ** 2 + limiterIntersectionArea ** 2;\n        // @if CK_DEBUG_POSITION //\tRectDrawer.draw( position._rect, { opacity: .4 }, [\n        // @if CK_DEBUG_POSITION //\t\tposition.name,\n        // @if CK_DEBUG_POSITION //\t\t'Vi=' +  Math.round( viewportIntersectionArea ),\n        // @if CK_DEBUG_POSITION //\t\t'Li=' + Math.round( limiterIntersectionArea )\n        // @if CK_DEBUG_POSITION //\t].join( '\\n' ) );\n        if (fitFactor > maxFitFactor) {\n            maxFitFactor = fitFactor;\n            bestPosition = position;\n        }\n    }\n    // @if CK_DEBUG_POSITION // if ( bestPosition ) {\n    // @if CK_DEBUG_POSITION // \tRectDrawer.draw( bestPosition._rect, CHOSEN_POSITION_RECT_STYLE );\n    // @if CK_DEBUG_POSITION // }\n    return bestPosition;\n}\n/**\n * A position class which instances are created and used by the {@link module:utils/dom/position~getOptimalPosition} helper.\n *\n * {@link module:utils/dom/position~Position#top} and {@link module:utils/dom/position~Position#left} properties of the position instance\n * translate directly to the `top` and `left` properties in CSS \"`position: absolute` coordinate system\". If set on the positioned element\n * in DOM, they will make it display it in the right place in the viewport.\n */ class PositionObject {\n    name;\n    config;\n    _positioningFunctionCoordinates;\n    _options;\n    _cachedRect;\n    _cachedAbsoluteRect;\n    /**\n\t * Creates an instance of the {@link module:utils/dom/position~PositionObject} class.\n\t *\n\t * @param positioningFunction function The function that defines the expected\n\t * coordinates the positioned element should move to.\n\t * @param options options object.\n\t * @param options.elementRect The positioned element rect.\n\t * @param options.targetRect The target element rect.\n\t * @param options.viewportRect The viewport rect.\n\t * @param options.limiterRect The limiter rect.\n\t * @param options.positionedElementAncestor Nearest element ancestor element which CSS position is not \"static\".\n\t */ constructor(positioningFunction, options){\n        const positioningFunctionOutput = positioningFunction(options.targetRect, options.elementRect, options.viewportRect, options.limiterRect);\n        // Nameless position for a function that didn't participate.\n        if (!positioningFunctionOutput) {\n            return;\n        }\n        const { left, top, name, config } = positioningFunctionOutput;\n        this.name = name;\n        this.config = config;\n        this._positioningFunctionCoordinates = {\n            left,\n            top\n        };\n        this._options = options;\n    }\n    /**\n\t * The left value in pixels in the CSS `position: absolute` coordinate system.\n\t * Set it on the positioned element in DOM to move it to the position.\n\t */ get left() {\n        return this._absoluteRect.left;\n    }\n    /**\n\t * The top value in pixels in the CSS `position: absolute` coordinate system.\n\t * Set it on the positioned element in DOM to move it to the position.\n\t */ get top() {\n        return this._absoluteRect.top;\n    }\n    /**\n\t * An intersection area between positioned element and limiter within viewport constraints.\n\t */ get limiterIntersectionArea() {\n        const limiterRect = this._options.limiterRect;\n        if (limiterRect) {\n            return limiterRect.getIntersectionArea(this._rect);\n        }\n        return 0;\n    }\n    /**\n\t * An intersection area between positioned element and viewport.\n\t */ get viewportIntersectionArea() {\n        const viewportRect = this._options.viewportRect;\n        return viewportRect.getIntersectionArea(this._rect);\n    }\n    /**\n\t * An already positioned element rect. A clone of the element rect passed to the constructor\n\t * but placed in the viewport according to the positioning function.\n\t */ get _rect() {\n        if (this._cachedRect) {\n            return this._cachedRect;\n        }\n        this._cachedRect = this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left, this._positioningFunctionCoordinates.top);\n        return this._cachedRect;\n    }\n    /**\n\t * An already absolutely positioned element rect. See ({@link #_rect}).\n\t */ get _absoluteRect() {\n        if (this._cachedAbsoluteRect) {\n            return this._cachedAbsoluteRect;\n        }\n        this._cachedAbsoluteRect = this._rect.toAbsoluteRect();\n        return this._cachedAbsoluteRect;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/dom/remove\n */ /**\n * Removes given node from parent.\n *\n * @param node Node to remove.\n */ function remove(node) {\n    const parent = node.parentNode;\n    if (parent) {\n        parent.removeChild(node);\n    }\n}\n\n/**\n * Makes any page `HTMLElement` or `Range` (`target`) visible inside the browser viewport.\n * This helper will scroll all `target` ancestors and the web browser viewport to reveal the target to\n * the user. If the `target` is already visible, nothing will happen.\n *\n * @param options Additional configuration of the scrolling behavior.\n * @param options.target A target, which supposed to become visible to the user.\n * @param options.viewportOffset An offset from the edge of the viewport (in pixels)\n * the `target` will be moved by if the viewport is scrolled. It enhances the user experience\n * by keeping the `target` some distance from the edge of the viewport and thus making it easier to\n * read or edit by the user.\n * @param options.ancestorOffset An offset from the boundary of scrollable ancestors (if any)\n * the `target` will be moved by if the viewport is scrolled. It enhances the user experience\n * by keeping the `target` some distance from the edge of the ancestors and thus making it easier to\n * read or edit by the user.\n * @param options.alignToTop When set `true`, the helper will make sure the `target` is scrolled up\n * to the top boundary of the viewport and/or scrollable ancestors if scrolled up. When not set\n * (default), the `target` will be revealed by scrolling as little as possible. This option will\n * not affect `targets` that must be scrolled down because they will appear at the top of the boundary\n * anyway.\n *\n * ```\n *                                             scrollViewportToShowTarget() with            scrollViewportToShowTarget() with\n *          Initial state                        alignToTop unset (default)                        alignToTop = true\n *\n * ┌────────────────────────────────┬─┐       ┌────────────────────────────────┬─┐        ┌────────────────────────────────┬─┐\n * │                                │▲│       │                                │▲│        │   [ Target to be revealed ]    │▲│\n * │                                │ │       │                                │ │        │                                │ │\n * │                                │█│       │                                │ │        │                                │ │\n * │                                │█│       │                                │ │        │                                │ │\n * │                                │ │       │                                │█│        │                                │ │\n * │                                │ │       │                                │█│        │                                │█│\n * │                                │ │       │                                │ │        │                                │█│\n * │                                │▼│       │   [ Target to be revealed ]    │▼│        │                                │▼│\n * └────────────────────────────────┴─┘       └────────────────────────────────┴─┘        └────────────────────────────────┴─┘\n *\n *\n *     [ Target to be revealed ]\n *```\n *\n * @param options.forceScroll When set `true`, the `target` will be aligned to the top of the viewport\n * and scrollable ancestors whether it is already visible or not. This option will only work when `alignToTop`\n * is `true`\n */ function scrollViewportToShowTarget({ target, viewportOffset = 0, ancestorOffset = 0, alignToTop, forceScroll }) {\n    const targetWindow = getWindow(target);\n    let currentWindow = targetWindow;\n    let currentFrame = null;\n    viewportOffset = normalizeViewportOffset(viewportOffset);\n    // Iterate over all windows, starting from target's parent window up to window#top.\n    while(currentWindow){\n        let firstAncestorToScroll;\n        // Let's scroll target's ancestors first to reveal it. Then, once the ancestor scrolls\n        // settled down, the algorithm can eventually scroll the viewport of the current window.\n        //\n        // Note: If the current window is target's **original** window (e.g. the first one),\n        // start scrolling the closest parent of the target. If not, scroll the closest parent\n        // of an iframe that resides in the current window.\n        if (currentWindow == targetWindow) {\n            firstAncestorToScroll = getParentElement(target);\n        } else {\n            firstAncestorToScroll = getParentElement(currentFrame);\n        }\n        // Scroll the target's ancestors first. Once done, scrolling the viewport is easy.\n        scrollAncestorsToShowRect({\n            parent: firstAncestorToScroll,\n            getRect: ()=>{\n                // Note: If the target does not belong to the current window **directly**,\n                // i.e. it resides in an iframe belonging to the window, obtain the target's rect\n                // in the coordinates of the current window. By default, a Rect returns geometry\n                // relative to the current window's viewport. To make it work in a parent window,\n                // it must be shifted.\n                return getRectRelativeToWindow(target, currentWindow);\n            },\n            alignToTop,\n            ancestorOffset,\n            forceScroll\n        });\n        // Obtain the rect of the target after it has been scrolled within its ancestors.\n        // It's time to scroll the viewport.\n        const targetRect = getRectRelativeToWindow(target, currentWindow);\n        scrollWindowToShowRect({\n            window: currentWindow,\n            rect: targetRect,\n            viewportOffset,\n            alignToTop,\n            forceScroll\n        });\n        if (currentWindow.parent != currentWindow) {\n            // Keep the reference to the <iframe> element the \"previous current window\" was\n            // rendered within. It will be useful to re–calculate the rect of the target\n            // in the parent window's relative geometry. The target's rect must be shifted\n            // by it's iframe's position.\n            currentFrame = currentWindow.frameElement;\n            currentWindow = currentWindow.parent;\n            // If the current window has some parent but frameElement is inaccessible, then they have\n            // different domains/ports and, due to security reasons, accessing and scrolling\n            // the parent window won't be possible.\n            // See https://github.com/ckeditor/ckeditor5/issues/930.\n            if (!currentFrame) {\n                return;\n            }\n        } else {\n            currentWindow = null;\n        }\n    }\n}\n/**\n * Makes any page `HTMLElement` or `Range` (target) visible within its scrollable ancestors,\n * e.g. if they have `overflow: scroll` CSS style.\n *\n * @param target A target, which supposed to become visible to the user.\n * @param ancestorOffset An offset between the target and the boundary of scrollable ancestors\n * to be maintained while scrolling.\n * @param limiterElement The outermost ancestor that should be scrolled. If specified, it can prevent\n * scrolling the whole page.\n */ function scrollAncestorsToShowTarget(target, ancestorOffset, limiterElement) {\n    const targetParent = getParentElement(target);\n    scrollAncestorsToShowRect({\n        parent: targetParent,\n        getRect: ()=>new Rect(target),\n        ancestorOffset,\n        limiterElement\n    });\n}\n/**\n * Makes a given rect visible within its parent window.\n *\n * Note: Avoid the situation where the caret is still in the viewport, but totally\n * at the edge of it. In such situation, if it moved beyond the viewport in the next\n * action e.g. after paste, the scrolling would move it to the viewportOffset level\n * and it all would look like the caret visually moved up/down:\n *\n * 1.\n * ```\n * | foo[]\n * |                                    <--- N px of space below the caret\n * +---------------------------------...\n * ```\n *\n * 2. *paste*\n * 3.\n * ```\n * |\n * |\n * +-foo-----------------------------...\n *   bar[]                              <--- caret below viewport, scrolling...\n * ```\n *\n * 4. *scrolling*\n * 5.\n * ```\n * |\n * | foo\n * | bar[]                              <--- caret precisely at the edge\n * +---------------------------------...\n * ```\n *\n * To prevent this, this method checks the rects moved by the viewportOffset to cover\n * the upper/lower edge of the viewport. It makes sure if the action repeats, there's\n * no twitching – it's a purely visual improvement:\n *\n * 5. (after fix)\n * ```\n * |\n * | foo\n * | bar[]\n * |                                    <--- N px of space below the caret\n * +---------------------------------...\n * ```\n *\n * @param options Additional configuration of the scrolling behavior.\n * @param options.window A window which is scrolled to reveal the rect.\n * @param options.rect A rect which is to be revealed.\n * @param options.viewportOffset An offset from the edge of the viewport (in pixels) the `rect` will be\n * moved by if the viewport is scrolled.\n * @param options.alignToTop When set `true`, the helper will make sure the `rect` is scrolled up\n * to the top boundary of the viewport if scrolled up. When not set (default), the `rect` will be\n * revealed by scrolling as little as possible. This option will not affect rects that must be scrolled\n * down because they will appear at the top of the boundary anyway.\n * @param options.forceScroll When set `true`, the `rect` will be aligned to the top of the viewport\n * whether it is already visible or not. This option will only work when `alignToTop` is `true`\n */ function scrollWindowToShowRect({ window, rect, alignToTop, forceScroll, viewportOffset }) {\n    const targetShiftedDownRect = rect.clone().moveBy(0, viewportOffset.bottom);\n    const targetShiftedUpRect = rect.clone().moveBy(0, -viewportOffset.top);\n    const viewportRect = new Rect(window).excludeScrollbarsAndBorders();\n    const rects = [\n        targetShiftedUpRect,\n        targetShiftedDownRect\n    ];\n    const forceScrollToTop = alignToTop && forceScroll;\n    const allRectsFitInViewport = rects.every((rect)=>viewportRect.contains(rect));\n    let { scrollX, scrollY } = window;\n    const initialScrollX = scrollX;\n    const initialScrollY = scrollY;\n    if (forceScrollToTop) {\n        scrollY -= viewportRect.top - rect.top + viewportOffset.top;\n    } else if (!allRectsFitInViewport) {\n        if (isAbove(targetShiftedUpRect, viewportRect)) {\n            scrollY -= viewportRect.top - rect.top + viewportOffset.top;\n        } else if (isBelow(targetShiftedDownRect, viewportRect)) {\n            if (alignToTop) {\n                scrollY += rect.top - viewportRect.top - viewportOffset.top;\n            } else {\n                scrollY += rect.bottom - viewportRect.bottom + viewportOffset.bottom;\n            }\n        }\n    }\n    if (!allRectsFitInViewport) {\n        // TODO: Web browsers scroll natively to place the target in the middle\n        // of the viewport. It's not a very popular case, though.\n        if (isLeftOf(rect, viewportRect)) {\n            scrollX -= viewportRect.left - rect.left + viewportOffset.left;\n        } else if (isRightOf(rect, viewportRect)) {\n            scrollX += rect.right - viewportRect.right + viewportOffset.right;\n        }\n    }\n    if (scrollX != initialScrollX || scrollY !== initialScrollY) {\n        window.scrollTo(scrollX, scrollY);\n    }\n}\n/**\n * Recursively scrolls element ancestors to visually reveal a rect.\n *\n * @param options Additional configuration of the scrolling behavior.\n * @param options.parent The first parent ancestor to start scrolling.\n * @param options.getRect A function which returns the Rect, which is to be revealed.\n * @param options.ancestorOffset An offset from the boundary of scrollable ancestors (if any)\n * the `Rect` instance will be moved by if the viewport is scrolled.\n * @param options.alignToTop When set `true`, the helper will make sure the `Rect` instance is scrolled up\n * to the top boundary of the scrollable ancestors if scrolled up. When not set (default), the `rect`\n * will be revealed by scrolling as little as possible. This option will not affect rects that must be\n * scrolled down because they will appear at the top of the boundary\n * anyway.\n * @param options.forceScroll When set `true`, the `rect` will be aligned to the top of scrollable ancestors\n * whether it is already visible or not. This option will only work when `alignToTop` is `true`\n * @param options.limiterElement The outermost ancestor that should be scrolled. Defaults to the `<body>` element.\n */ function scrollAncestorsToShowRect({ parent, getRect, alignToTop, forceScroll, ancestorOffset = 0, limiterElement }) {\n    const parentWindow = getWindow(parent);\n    const forceScrollToTop = alignToTop && forceScroll;\n    let parentRect, targetRect, targetFitsInTarget;\n    const limiter = limiterElement || parentWindow.document.body;\n    while(parent != limiter){\n        targetRect = getRect();\n        parentRect = new Rect(parent).excludeScrollbarsAndBorders();\n        targetFitsInTarget = parentRect.contains(targetRect);\n        if (forceScrollToTop) {\n            parent.scrollTop -= parentRect.top - targetRect.top + ancestorOffset;\n        } else if (!targetFitsInTarget) {\n            if (isAbove(targetRect, parentRect)) {\n                parent.scrollTop -= parentRect.top - targetRect.top + ancestorOffset;\n            } else if (isBelow(targetRect, parentRect)) {\n                if (alignToTop) {\n                    parent.scrollTop += targetRect.top - parentRect.top - ancestorOffset;\n                } else {\n                    parent.scrollTop += targetRect.bottom - parentRect.bottom + ancestorOffset;\n                }\n            }\n        }\n        if (!targetFitsInTarget) {\n            if (isLeftOf(targetRect, parentRect)) {\n                parent.scrollLeft -= parentRect.left - targetRect.left + ancestorOffset;\n            } else if (isRightOf(targetRect, parentRect)) {\n                parent.scrollLeft += targetRect.right - parentRect.right + ancestorOffset;\n            }\n        }\n        parent = parent.parentNode;\n    }\n}\n/**\n * Determines if a given `Rect` extends beyond the bottom edge of the second `Rect`.\n */ function isBelow(firstRect, secondRect) {\n    return firstRect.bottom > secondRect.bottom;\n}\n/**\n * Determines if a given `Rect` extends beyond the top edge of the second `Rect`.\n */ function isAbove(firstRect, secondRect) {\n    return firstRect.top < secondRect.top;\n}\n/**\n * Determines if a given `Rect` extends beyond the left edge of the second `Rect`.\n */ function isLeftOf(firstRect, secondRect) {\n    return firstRect.left < secondRect.left;\n}\n/**\n * Determines if a given `Rect` extends beyond the right edge of the second `Rect`.\n */ function isRightOf(firstRect, secondRect) {\n    return firstRect.right > secondRect.right;\n}\n/**\n * Returns the closest window of an element or range.\n */ function getWindow(elementOrRange) {\n    if (isRange(elementOrRange)) {\n        return elementOrRange.startContainer.ownerDocument.defaultView;\n    } else {\n        return elementOrRange.ownerDocument.defaultView;\n    }\n}\n/**\n * Returns the closest parent of an element or DOM range.\n */ function getParentElement(elementOrRange) {\n    if (isRange(elementOrRange)) {\n        let parent = elementOrRange.commonAncestorContainer;\n        // If a Range is attached to the Text, use the closest element ancestor.\n        if (isText(parent)) {\n            parent = parent.parentNode;\n        }\n        return parent;\n    } else {\n        return elementOrRange.parentNode;\n    }\n}\n/**\n * Returns the rect of an element or range residing in an iframe.\n * The result rect is relative to the geometry of the passed window instance.\n *\n * @param target Element or range which rect should be returned.\n * @param relativeWindow A window the rect should be relative to.\n */ function getRectRelativeToWindow(target, relativeWindow) {\n    const targetWindow = getWindow(target);\n    const rect = new Rect(target);\n    if (targetWindow === relativeWindow) {\n        return rect;\n    } else {\n        let currentWindow = targetWindow;\n        while(currentWindow != relativeWindow){\n            const frame = currentWindow.frameElement;\n            const frameRect = new Rect(frame).excludeScrollbarsAndBorders();\n            rect.moveBy(frameRect.left, frameRect.top);\n            currentWindow = currentWindow.parent;\n        }\n    }\n    return rect;\n}\n/**\n * A helper that explodes the `viewportOffset` configuration if defined as a plain number into an object\n * with `top`, `bottom`, `left`, and `right` properties.\n *\n * If an object value is passed, this helper will pass it through.\n *\n * @param viewportOffset Viewport offset to be normalized.\n */ function normalizeViewportOffset(viewportOffset) {\n    if (typeof viewportOffset === 'number') {\n        return {\n            top: viewportOffset,\n            bottom: viewportOffset,\n            left: viewportOffset,\n            right: viewportOffset\n        };\n    }\n    return viewportOffset;\n}\n\nconst modifiersToGlyphsMac = {\n    ctrl: '⌃',\n    cmd: '⌘',\n    alt: '⌥',\n    shift: '⇧'\n};\nconst modifiersToGlyphsNonMac = {\n    ctrl: 'Ctrl+',\n    alt: 'Alt+',\n    shift: 'Shift+'\n};\nconst keyCodesToGlyphs = {\n    37: '←',\n    38: '↑',\n    39: '→',\n    40: '↓',\n    9: '⇥',\n    33: 'Page Up',\n    34: 'Page Down'\n};\n/**\n * An object with `keyName => keyCode` pairs for a set of known keys.\n *\n * Contains:\n *\n * * `a-z`,\n * * `0-9`,\n * * `f1-f12`,\n * * `` ` ``, `-`, `=`, `[`, `]`, `;`, `'`, `,`, `.`, `/`, `\\`,\n * * `arrow(left|up|right|bottom)`,\n * * `backspace`, `delete`, `enter`, `esc`, `tab`,\n * * `ctrl`, `cmd`, `shift`, `alt`.\n */ const keyCodes = /* #__PURE__ */ generateKnownKeyCodes();\nconst keyCodeNames = /* #__PURE__ */ Object.fromEntries(/* #__PURE__ */ Object.entries(keyCodes).map(([name, code])=>{\n    let prettyKeyName;\n    if (code in keyCodesToGlyphs) {\n        prettyKeyName = keyCodesToGlyphs[code];\n    } else {\n        prettyKeyName = name.charAt(0).toUpperCase() + name.slice(1);\n    }\n    return [\n        code,\n        prettyKeyName\n    ];\n}));\n/**\n * Converts a key name or {@link module:utils/keyboard~KeystrokeInfo keystroke info} into a key code.\n *\n * Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.\n *\n * @param key A key name (see {@link module:utils/keyboard#keyCodes}) or a keystroke data object.\n * @returns Key or keystroke code.\n */ function getCode(key) {\n    let keyCode;\n    if (typeof key == 'string') {\n        keyCode = keyCodes[key.toLowerCase()];\n        if (!keyCode) {\n            /**\n\t\t\t * Unknown key name. Only key names included in the {@link module:utils/keyboard#keyCodes} can be used.\n\t\t\t *\n\t\t\t * @error keyboard-unknown-key\n\t\t\t * @param {String} key\n\t\t\t */ throw new CKEditorError('keyboard-unknown-key', null, {\n                key\n            });\n        }\n    } else {\n        keyCode = key.keyCode + (key.altKey ? keyCodes.alt : 0) + (key.ctrlKey ? keyCodes.ctrl : 0) + (key.shiftKey ? keyCodes.shift : 0) + (key.metaKey ? keyCodes.cmd : 0);\n    }\n    return keyCode;\n}\n/**\n * Parses the keystroke and returns a keystroke code that will match the code returned by\n * {@link module:utils/keyboard~getCode} for the corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.\n *\n * The keystroke can be passed in two formats:\n *\n * * as a single string – e.g. `ctrl + A`,\n * * as an array of {@link module:utils/keyboard~keyCodes known key names} and key codes – e.g.:\n *   * `[ 'ctrl', 32 ]` (ctrl + space),\n *   * `[ 'ctrl', 'a' ]` (ctrl + A).\n *\n * Note: Key names are matched with {@link module:utils/keyboard#keyCodes} in a case-insensitive way.\n *\n * Note: Only keystrokes with a single non-modifier key are supported (e.g. `ctrl+A` is OK, but `ctrl+A+B` is not).\n *\n * Note: On macOS, keystroke handling is translating the `Ctrl` key to the `Cmd` key and handling only that keystroke.\n * For example, a registered keystroke `Ctrl+A` will be translated to `Cmd+A` on macOS. To disable the translation of some keystroke,\n * use the forced modifier: `Ctrl!+A` (note the exclamation mark).\n *\n * @param keystroke The keystroke definition.\n * @returns Keystroke code.\n */ function parseKeystroke(keystroke) {\n    if (typeof keystroke == 'string') {\n        keystroke = splitKeystrokeText(keystroke);\n    }\n    return keystroke.map((key)=>typeof key == 'string' ? getEnvKeyCode(key) : key).reduce((key, sum)=>sum + key, 0);\n}\n/**\n * Translates any keystroke string text like `\"Ctrl+A\"` to an\n * environment–specific keystroke, i.e. `\"⌘A\"` on macOS.\n *\n * @param keystroke The keystroke text.\n * @returns The keystroke text specific for the environment.\n */ function getEnvKeystrokeText(keystroke) {\n    let keystrokeCode = parseKeystroke(keystroke);\n    const modifiersToGlyphs = Object.entries(env.isMac || env.isiOS ? modifiersToGlyphsMac : modifiersToGlyphsNonMac);\n    const modifiers = modifiersToGlyphs.reduce((modifiers, [name, glyph])=>{\n        // Modifier keys are stored as a bit mask so extract those from the keystroke code.\n        if ((keystrokeCode & keyCodes[name]) != 0) {\n            keystrokeCode &= ~keyCodes[name];\n            modifiers += glyph;\n        }\n        return modifiers;\n    }, '');\n    return modifiers + (keystrokeCode ? keyCodeNames[keystrokeCode] : '');\n}\n/**\n * Returns `true` if the provided key code represents one of the arrow keys.\n *\n * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n */ function isArrowKeyCode(keyCode) {\n    return keyCode == keyCodes.arrowright || keyCode == keyCodes.arrowleft || keyCode == keyCodes.arrowup || keyCode == keyCodes.arrowdown;\n}\n/**\n * Returns the direction in which the {@link module:engine/model/documentselection~DocumentSelection selection}\n * will move when the provided arrow key code is pressed considering the language direction of the editor content.\n *\n * For instance, in right–to–left (RTL) content languages, pressing the left arrow means moving the selection right (forward)\n * in the model structure. Similarly, pressing the right arrow moves the selection left (backward).\n *\n * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n * @param contentLanguageDirection The content language direction, corresponding to\n * {@link module:utils/locale~Locale#contentLanguageDirection}.\n * @returns Localized arrow direction or `undefined` for non-arrow key codes.\n */ function getLocalizedArrowKeyCodeDirection(keyCode, contentLanguageDirection) {\n    const isLtrContent = contentLanguageDirection === 'ltr';\n    switch(keyCode){\n        case keyCodes.arrowleft:\n            return isLtrContent ? 'left' : 'right';\n        case keyCodes.arrowright:\n            return isLtrContent ? 'right' : 'left';\n        case keyCodes.arrowup:\n            return 'up';\n        case keyCodes.arrowdown:\n            return 'down';\n    }\n}\n/**\n * Converts a key name to the key code with mapping based on the env.\n *\n * See: {@link module:utils/keyboard~getCode}.\n *\n * @param key The key name (see {@link module:utils/keyboard#keyCodes}).\n * @returns Key code.\n */ function getEnvKeyCode(key) {\n    // Don't remap modifier key for forced modifiers.\n    if (key.endsWith('!')) {\n        return getCode(key.slice(0, -1));\n    }\n    const code = getCode(key);\n    return (env.isMac || env.isiOS) && code == keyCodes.ctrl ? keyCodes.cmd : code;\n}\n/**\n * Determines if the provided key code moves the {@link module:engine/model/documentselection~DocumentSelection selection}\n * forward or backward considering the language direction of the editor content.\n *\n * For instance, in right–to–left (RTL) languages, pressing the left arrow means moving forward\n * in the model structure. Similarly, pressing the right arrow moves the selection backward.\n *\n * @param keyCode A key code as in {@link module:utils/keyboard~KeystrokeInfo#keyCode}.\n * @param contentLanguageDirection The content language direction, corresponding to\n * {@link module:utils/locale~Locale#contentLanguageDirection}.\n */ function isForwardArrowKeyCode(keyCode, contentLanguageDirection) {\n    const localizedKeyCodeDirection = getLocalizedArrowKeyCodeDirection(keyCode, contentLanguageDirection);\n    return localizedKeyCodeDirection === 'down' || localizedKeyCodeDirection === 'right';\n}\nfunction generateKnownKeyCodes() {\n    const keyCodes = {\n        pageup: 33,\n        pagedown: 34,\n        arrowleft: 37,\n        arrowup: 38,\n        arrowright: 39,\n        arrowdown: 40,\n        backspace: 8,\n        delete: 46,\n        enter: 13,\n        space: 32,\n        esc: 27,\n        tab: 9,\n        // The idea about these numbers is that they do not collide with any real key codes, so we can use them\n        // like bit masks.\n        ctrl: 0x110000,\n        shift: 0x220000,\n        alt: 0x440000,\n        cmd: 0x880000\n    };\n    // a-z\n    for(let code = 65; code <= 90; code++){\n        const letter = String.fromCharCode(code);\n        keyCodes[letter.toLowerCase()] = code;\n    }\n    // 0-9\n    for(let code = 48; code <= 57; code++){\n        keyCodes[code - 48] = code;\n    }\n    // F1-F12\n    for(let code = 112; code <= 123; code++){\n        keyCodes['f' + (code - 111)] = code;\n    }\n    // other characters\n    Object.assign(keyCodes, {\n        '\\'': 222,\n        ',': 108,\n        '-': 109,\n        '.': 110,\n        '/': 111,\n        ';': 186,\n        '=': 187,\n        '[': 219,\n        '\\\\': 220,\n        ']': 221,\n        '`': 223\n    });\n    return keyCodes;\n}\nfunction splitKeystrokeText(keystroke) {\n    return keystroke.split('+').map((key)=>key.trim());\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/language\n */ /**\n * String representing a language direction.\n */ const RTL_LANGUAGE_CODES = [\n    'ar',\n    'ara',\n    'dv',\n    'div',\n    'fa',\n    'per',\n    'fas',\n    'he',\n    'heb',\n    'ku',\n    'kur',\n    'ug',\n    'uig' // Uighur, Uyghur\n];\n/**\n * Helps determine whether a language text direction is LTR or RTL.\n *\n * @param languageCode The ISO 639-1 or ISO 639-2 language code.\n */ function getLanguageDirection(languageCode) {\n    return RTL_LANGUAGE_CODES.includes(languageCode) ? 'rtl' : 'ltr';\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/toarray\n */ /**\n * Transforms any value to an array. If the provided value is already an array, it is returned unchanged.\n *\n * @label MUTABLE\n * @param data The value to transform to an array.\n * @returns An array created from data.\n */ function toArray(data) {\n    return Array.isArray(data) ? data : [\n        data\n    ];\n}\n\n/* istanbul ignore else -- @preserve */ if (!global.window.CKEDITOR_TRANSLATIONS) {\n    global.window.CKEDITOR_TRANSLATIONS = {};\n}\n/**\n * **Note:** This method is internal, use {@link module:utils/locale~Locale#t the `t()` function} instead to translate\n * the editor UI parts.\n *\n * This function is responsible for translating messages to the specified language. It uses translations added perviously\n * by {@link module:utils/translation-service~add} (a translations dictionary and the `getPluralForm()` function\n * to provide accurate translations of plural forms).\n *\n * When no translation is defined in the dictionary or the dictionary does not exist, this function returns\n * the original message string or the message plural depending on the number of elements.\n *\n * ```ts\n * translate( 'pl', { string: 'Cancel' } ); // 'Cancel'\n * ```\n *\n * The third optional argument is the number of elements, based on which the single form or one of the plural forms\n * should be picked when the message is supposed to support various plural forms.\n *\n * ```ts\n * translate( 'en', { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space'\n * translate( 'en', { string: 'Add a space', plural: 'Add %0 spaces' }, 3 ); // 'Add %0 spaces'\n * ```\n *\n * The message should provide an ID using the `id` property when the message strings are not unique and their\n * translations should be different.\n *\n * ```ts\n * translate( 'en', { string: 'image', id: 'ADD_IMAGE' } );\n * translate( 'en', { string: 'image', id: 'AN_IMAGE' } );\n * ```\n *\n * @internal\n * @param language Target language.\n * @param message A message that will be translated.\n * @param quantity The number of elements for which a plural form should be picked from the target language dictionary.\n * @param translations Translations passed in editor config, if not provided use the global `window.CKEDITOR_TRANSLATIONS`.\n * @returns Translated sentence.\n */ function _translate(language, message, quantity = 1, translations) {\n    if (typeof quantity !== 'number') {\n        /**\n\t\t * An incorrect value was passed to the translation function. This was probably caused\n\t\t * by an incorrect message interpolation of a plural form. Note that for messages supporting plural forms\n\t\t * the second argument of the `t()` function should always be a number or an array with a number as the first element.\n\t\t *\n\t\t * @error translation-service-quantity-not-a-number\n\t\t */ throw new CKEditorError('translation-service-quantity-not-a-number', null, {\n            quantity\n        });\n    }\n    const normalizedTranslations = translations || global.window.CKEDITOR_TRANSLATIONS;\n    const numberOfLanguages = getNumberOfLanguages(normalizedTranslations);\n    if (numberOfLanguages === 1) {\n        // Override the language to the only supported one.\n        // This can't be done in the `Locale` class, because the translations comes after the `Locale` class initialization.\n        language = Object.keys(normalizedTranslations)[0];\n    }\n    const messageId = message.id || message.string;\n    if (numberOfLanguages === 0 || !hasTranslation(language, messageId, normalizedTranslations)) {\n        if (quantity !== 1) {\n            // Return the default plural form that was passed in the `message.plural` parameter.\n            return message.plural;\n        }\n        return message.string;\n    }\n    const dictionary = normalizedTranslations[language].dictionary;\n    const getPluralForm = normalizedTranslations[language].getPluralForm || ((n)=>n === 1 ? 0 : 1);\n    const translation = dictionary[messageId];\n    if (typeof translation === 'string') {\n        return translation;\n    }\n    const pluralFormIndex = Number(getPluralForm(quantity));\n    // Note: The `translate` function is not responsible for replacing `%0, %1, ...` with values.\n    return translation[pluralFormIndex];\n}\n/**\n * If array then merge objects which are inside otherwise return given object.\n *\n * @internal\n * @param translations Translations passed in editor config.\n */ function _unifyTranslations(translations) {\n    return Array.isArray(translations) ? translations.reduce((acc, translation)=>merge(acc, translation)) : translations;\n}\n/**\n * Checks whether the dictionary exists and translation in that dictionary exists.\n */ function hasTranslation(language, messageId, translations) {\n    return !!translations[language] && !!translations[language].dictionary[messageId];\n}\nfunction getNumberOfLanguages(translations) {\n    return Object.keys(translations).length;\n}\n\n/**\n * Represents the localization services.\n */ class Locale {\n    /**\n\t * The editor UI language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t *\n\t * If the {@link #contentLanguage content language} was not specified in the `Locale` constructor,\n\t * it also defines the language of the content.\n\t */ uiLanguage;\n    /**\n\t * Text direction of the {@link #uiLanguage editor UI language}. Either `'ltr'` or `'rtl'`.\n\t */ uiLanguageDirection;\n    /**\n\t * The editor content language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t *\n\t * Usually the same as the {@link #uiLanguage editor language}, it can be customized by passing an optional\n\t * argument to the `Locale` constructor.\n\t */ contentLanguage;\n    /**\n\t * Text direction of the {@link #contentLanguage editor content language}.\n\t *\n\t * If the content language was passed directly to the `Locale` constructor, this property represents the\n\t * direction of that language.\n\t *\n\t * If the {@link #contentLanguage editor content language} was derived from the {@link #uiLanguage editor language},\n\t * the content language direction is the same as the {@link #uiLanguageDirection UI language direction}.\n\t *\n\t * The value is either `'ltr'` or `'rtl'`.\n\t */ contentLanguageDirection;\n    /**\n\t * Translates the given message to the {@link #uiLanguage}. This method is also available in\n\t * {@link module:core/editor/editor~Editor#t `Editor`} and {@link module:ui/view~View#t `View`}.\n\t *\n\t * This method's context is statically bound to the `Locale` instance and **should always be called as a function**:\n\t *\n\t * ```ts\n\t * const t = locale.t;\n\t * t( 'Label' );\n\t * ```\n\t *\n\t * The message can be either a string or an object implementing the {@link module:utils/translation-service~Message} interface.\n\t *\n\t * The message may contain placeholders (`%<index>`) for value(s) that are passed as a `values` parameter.\n\t * For an array of values, the `%<index>` will be changed to an element of that array at the given index.\n\t * For a single value passed as the second argument, only the `%0` placeholders will be changed to the provided value.\n\t *\n\t * ```ts\n\t * t( 'Created file \"%0\" in %1ms.', [ fileName, timeTaken ] );\n\t * t( 'Created file \"%0\", fileName );\n\t * ```\n\t *\n\t * The message supports plural forms. To specify the plural form, use the `plural` property. Singular or plural form\n\t * will be chosen depending on the first value from the passed `values`. The value of the `plural` property is used\n\t * as a default plural translation when the translation for the target language is missing.\n\t *\n\t * ```ts\n\t * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space' for the English language.\n\t * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Add 5 spaces' for the English language.\n\t * t( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Add 2 spaces' for the English language.\n\t *\n\t * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Dodaj spację' for the Polish language.\n\t * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Dodaj 5 spacji' for the Polish language.\n\t * t( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Dodaj 2 spacje' for the Polish language.\n\t * ```\n\t *\n\t *  * The message should provide an ID using the `id` property when the message strings are not unique and their\n\t * translations should be different.\n\t *\n\t * ```ts\n\t * translate( 'en', { string: 'image', id: 'ADD_IMAGE' } );\n\t * translate( 'en', { string: 'image', id: 'AN_IMAGE' } );\n\t * ```\n\t */ t;\n    /**\n\t * Object that contains translations.\n\t */ translations;\n    /**\n\t * Creates a new instance of the locale class. Learn more about\n\t * {@glink getting-started/setup/ui-language configuring the language of the editor}.\n\t *\n\t * @param options Locale configuration.\n\t * @param options.uiLanguage The editor UI language code in the\n\t * [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. See {@link #uiLanguage}.\n\t * @param options.contentLanguage The editor content language code in the\n\t * [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. If not specified, the same as `options.language`.\n\t * See {@link #contentLanguage}.\n\t * @param translations Translations passed as a editor config parameter.\n\t */ constructor({ uiLanguage = 'en', contentLanguage, translations } = {}){\n        this.uiLanguage = uiLanguage;\n        this.contentLanguage = contentLanguage || this.uiLanguage;\n        this.uiLanguageDirection = getLanguageDirection(this.uiLanguage);\n        this.contentLanguageDirection = getLanguageDirection(this.contentLanguage);\n        this.translations = _unifyTranslations(translations);\n        this.t = (message, values)=>this._t(message, values);\n    }\n    /**\n\t * The editor UI language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.\n\t *\n\t * **Note**: This property was deprecated. Please use {@link #uiLanguage} and {@link #contentLanguage}\n\t * properties instead.\n\t *\n\t * @deprecated\n\t */ get language() {\n        /**\n\t\t * The {@link module:utils/locale~Locale#language `Locale#language`} property was deprecated and will\n\t\t * be removed in the near future. Please use the {@link module:utils/locale~Locale#uiLanguage `Locale#uiLanguage`} and\n\t\t * {@link module:utils/locale~Locale#contentLanguage `Locale#contentLanguage`} properties instead.\n\t\t *\n\t\t * @error locale-deprecated-language-property\n\t\t */ console.warn('locale-deprecated-language-property: ' + 'The Locale#language property has been deprecated and will be removed in the near future. ' + 'Please use #uiLanguage and #contentLanguage properties instead.');\n        return this.uiLanguage;\n    }\n    /**\n\t * An unbound version of the {@link #t} method.\n\t */ _t(message, values = []) {\n        values = toArray(values);\n        if (typeof message === 'string') {\n            message = {\n                string: message\n            };\n        }\n        const hasPluralForm = !!message.plural;\n        const quantity = hasPluralForm ? values[0] : 1;\n        const translatedString = _translate(this.uiLanguage, message, quantity, this.translations);\n        return interpolateString(translatedString, values);\n    }\n}\n/**\n * Fills the `%0, %1, ...` string placeholders with values.\n */ function interpolateString(string, values) {\n    return string.replace(/%(\\d+)/g, (match, index)=>{\n        return index < values.length ? values[index] : match;\n    });\n}\n\n/**\n * Collections are ordered sets of objects. Items in the collection can be retrieved by their indexes\n * in the collection (like in an array) or by their ids.\n *\n * If an object without an `id` property is being added to the collection, the `id` property will be generated\n * automatically. Note that the automatically generated id is unique only within this single collection instance.\n *\n * By default an item in the collection is identified by its `id` property. The name of the identifier can be\n * configured through the constructor of the collection.\n *\n * @typeParam T The type of the collection element.\n */ class Collection extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * The internal list of items in the collection.\n\t */ _items;\n    /**\n\t * The internal map of items in the collection.\n\t */ _itemMap;\n    /**\n\t * The name of the property which is considered to identify an item.\n\t */ _idProperty;\n    /**\n\t * A collection instance this collection is bound to as a result\n\t * of calling {@link #bindTo} method.\n\t */ _bindToCollection;\n    /**\n\t * A helper mapping external items of a bound collection ({@link #bindTo})\n\t * and actual items of this collection. It provides information\n\t * necessary to properly remove items bound to another collection.\n\t *\n\t * See {@link #_bindToInternalToExternalMap}.\n\t */ _bindToExternalToInternalMap;\n    /**\n\t * A helper mapping items of this collection to external items of a bound collection\n\t * ({@link #bindTo}). It provides information necessary to manage the bindings, e.g.\n\t * to avoid loops in two–way bindings.\n\t *\n\t * See {@link #_bindToExternalToInternalMap}.\n\t */ _bindToInternalToExternalMap;\n    /**\n\t * Stores indexes of skipped items from bound external collection.\n\t */ _skippedIndexesFromExternal;\n    constructor(initialItemsOrOptions = {}, options = {}){\n        super();\n        const hasInitialItems = isIterable(initialItemsOrOptions);\n        if (!hasInitialItems) {\n            options = initialItemsOrOptions;\n        }\n        this._items = [];\n        this._itemMap = new Map();\n        this._idProperty = options.idProperty || 'id';\n        this._bindToExternalToInternalMap = new WeakMap();\n        this._bindToInternalToExternalMap = new WeakMap();\n        this._skippedIndexesFromExternal = [];\n        // Set the initial content of the collection (if provided in the constructor).\n        if (hasInitialItems) {\n            for (const item of initialItemsOrOptions){\n                this._items.push(item);\n                this._itemMap.set(this._getItemIdBeforeAdding(item), item);\n            }\n        }\n    }\n    /**\n\t * The number of items available in the collection.\n\t */ get length() {\n        return this._items.length;\n    }\n    /**\n\t * Returns the first item from the collection or null when collection is empty.\n\t */ get first() {\n        return this._items[0] || null;\n    }\n    /**\n\t * Returns the last item from the collection or null when collection is empty.\n\t */ get last() {\n        return this._items[this.length - 1] || null;\n    }\n    /**\n\t * Adds an item into the collection.\n\t *\n\t * If the item does not have an id, then it will be automatically generated and set on the item.\n\t *\n\t * @param item\n\t * @param index The position of the item in the collection. The item\n\t * is pushed to the collection when `index` not specified.\n\t * @fires add\n\t * @fires change\n\t */ add(item, index) {\n        return this.addMany([\n            item\n        ], index);\n    }\n    /**\n\t * Adds multiple items into the collection.\n\t *\n\t * Any item not containing an id will get an automatically generated one.\n\t *\n\t * @param items\n\t * @param index The position of the insertion. Items will be appended if no `index` is specified.\n\t * @fires add\n\t * @fires change\n\t */ addMany(items, index) {\n        if (index === undefined) {\n            index = this._items.length;\n        } else if (index > this._items.length || index < 0) {\n            /**\n\t\t\t * The `index` passed to {@link module:utils/collection~Collection#addMany `Collection#addMany()`}\n\t\t\t * is invalid. It must be a number between 0 and the collection's length.\n\t\t\t *\n\t\t\t * @error collection-add-item-invalid-index\n\t\t\t */ throw new CKEditorError('collection-add-item-invalid-index', this);\n        }\n        let offset = 0;\n        for (const item of items){\n            const itemId = this._getItemIdBeforeAdding(item);\n            const currentItemIndex = index + offset;\n            this._items.splice(currentItemIndex, 0, item);\n            this._itemMap.set(itemId, item);\n            this.fire('add', item, currentItemIndex);\n            offset++;\n        }\n        this.fire('change', {\n            added: items,\n            removed: [],\n            index\n        });\n        return this;\n    }\n    /**\n\t * Gets an item by its ID or index.\n\t *\n\t * @param idOrIndex The item ID or index in the collection.\n\t * @returns The requested item or `null` if such item does not exist.\n\t */ get(idOrIndex) {\n        let item;\n        if (typeof idOrIndex == 'string') {\n            item = this._itemMap.get(idOrIndex);\n        } else if (typeof idOrIndex == 'number') {\n            item = this._items[idOrIndex];\n        } else {\n            /**\n\t\t\t * An index or ID must be given.\n\t\t\t *\n\t\t\t * @error collection-get-invalid-arg\n\t\t\t */ throw new CKEditorError('collection-get-invalid-arg', this);\n        }\n        return item || null;\n    }\n    /**\n\t * Returns a Boolean indicating whether the collection contains an item.\n\t *\n\t * @param itemOrId The item or its ID in the collection.\n\t * @returns `true` if the collection contains the item, `false` otherwise.\n\t */ has(itemOrId) {\n        if (typeof itemOrId == 'string') {\n            return this._itemMap.has(itemOrId);\n        } else {\n            const idProperty = this._idProperty;\n            const id = itemOrId[idProperty];\n            return id && this._itemMap.has(id);\n        }\n    }\n    /**\n\t * Gets an index of an item in the collection.\n\t * When an item is not defined in the collection, the index will equal -1.\n\t *\n\t * @param itemOrId The item or its ID in the collection.\n\t * @returns The index of a given item.\n\t */ getIndex(itemOrId) {\n        let item;\n        if (typeof itemOrId == 'string') {\n            item = this._itemMap.get(itemOrId);\n        } else {\n            item = itemOrId;\n        }\n        return item ? this._items.indexOf(item) : -1;\n    }\n    /**\n\t * Removes an item from the collection.\n\t *\n\t * @param subject The item to remove, its ID or index in the collection.\n\t * @returns The removed item.\n\t * @fires remove\n\t * @fires change\n\t */ remove(subject) {\n        const [item, index] = this._remove(subject);\n        this.fire('change', {\n            added: [],\n            removed: [\n                item\n            ],\n            index\n        });\n        return item;\n    }\n    /**\n\t * Executes the callback for each item in the collection and composes an array or values returned by this callback.\n\t *\n\t * @typeParam U The result type of the callback.\n\t * @param callback\n\t * @param ctx Context in which the `callback` will be called.\n\t * @returns The result of mapping.\n\t */ map(callback, ctx) {\n        return this._items.map(callback, ctx);\n    }\n    /**\n\t * Performs the specified action for each item in the collection.\n\t *\n\t * @param ctx Context in which the `callback` will be called.\n\t */ forEach(callback, ctx) {\n        this._items.forEach(callback, ctx);\n    }\n    /**\n\t * Finds the first item in the collection for which the `callback` returns a true value.\n\t *\n\t * @param callback\n\t * @param ctx Context in which the `callback` will be called.\n\t * @returns The item for which `callback` returned a true value.\n\t */ find(callback, ctx) {\n        return this._items.find(callback, ctx);\n    }\n    /**\n\t * Returns an array with items for which the `callback` returned a true value.\n\t *\n\t * @param callback\n\t * @param ctx Context in which the `callback` will be called.\n\t * @returns The array with matching items.\n\t */ filter(callback, ctx) {\n        return this._items.filter(callback, ctx);\n    }\n    /**\n\t * Removes all items from the collection and destroys the binding created using\n\t * {@link #bindTo}.\n\t *\n\t * @fires remove\n\t * @fires change\n\t */ clear() {\n        if (this._bindToCollection) {\n            this.stopListening(this._bindToCollection);\n            this._bindToCollection = null;\n        }\n        const removedItems = Array.from(this._items);\n        while(this.length){\n            this._remove(0);\n        }\n        this.fire('change', {\n            added: [],\n            removed: removedItems,\n            index: 0\n        });\n    }\n    /**\n\t * Binds and synchronizes the collection with another one.\n\t *\n\t * The binding can be a simple factory:\n\t *\n\t * ```ts\n\t * class FactoryClass {\n\t * \tpublic label: string;\n\t *\n\t * \tconstructor( data: { label: string } ) {\n\t * \t\tthis.label = data.label;\n\t * \t}\n\t * }\n\t *\n\t * const source = new Collection<{ label: string }>( { idProperty: 'label' } );\n\t * const target = new Collection<FactoryClass>();\n\t *\n\t * target.bindTo( source ).as( FactoryClass );\n\t *\n\t * source.add( { label: 'foo' } );\n\t * source.add( { label: 'bar' } );\n\t *\n\t * console.log( target.length ); // 2\n\t * console.log( target.get( 1 ).label ); // 'bar'\n\t *\n\t * source.remove( 0 );\n\t * console.log( target.length ); // 1\n\t * console.log( target.get( 0 ).label ); // 'bar'\n\t * ```\n\t *\n\t * or the factory driven by a custom callback:\n\t *\n\t * ```ts\n\t * class FooClass {\n\t * \tpublic label: string;\n\t *\n\t * \tconstructor( data: { label: string } ) {\n\t * \t\tthis.label = data.label;\n\t * \t}\n\t * }\n\t *\n\t * class BarClass {\n\t * \tpublic label: string;\n\t *\n\t * \tconstructor( data: { label: string } ) {\n\t * \t\tthis.label = data.label;\n\t * \t}\n\t * }\n\t *\n\t * const source = new Collection<{ label: string }>( { idProperty: 'label' } );\n\t * const target = new Collection<FooClass | BarClass>();\n\t *\n\t * target.bindTo( source ).using( ( item ) => {\n\t * \tif ( item.label == 'foo' ) {\n\t * \t\treturn new FooClass( item );\n\t * \t} else {\n\t * \t\treturn new BarClass( item );\n\t * \t}\n\t * } );\n\t *\n\t * source.add( { label: 'foo' } );\n\t * source.add( { label: 'bar' } );\n\t *\n\t * console.log( target.length ); // 2\n\t * console.log( target.get( 0 ) instanceof FooClass ); // true\n\t * console.log( target.get( 1 ) instanceof BarClass ); // true\n\t * ```\n\t *\n\t * or the factory out of property name:\n\t *\n\t * ```ts\n\t * const source = new Collection<{ nested: { value: string } }>();\n\t * const target = new Collection<{ value: string }>();\n\t *\n\t * target.bindTo( source ).using( 'nested' );\n\t *\n\t * source.add( { nested: { value: 'foo' } } );\n\t * source.add( { nested: { value: 'bar' } } );\n\t *\n\t * console.log( target.length ); // 2\n\t * console.log( target.get( 0 ).value ); // 'foo'\n\t * console.log( target.get( 1 ).value ); // 'bar'\n\t * ```\n\t *\n\t * It's possible to skip specified items by returning null value:\n\t *\n\t * ```ts\n\t * const source = new Collection<{ hidden: boolean }>();\n\t * const target = new Collection<{ hidden: boolean }>();\n\t *\n\t * target.bindTo( source ).using( item => {\n\t * \tif ( item.hidden ) {\n\t * \t\treturn null;\n\t * \t}\n\t *\n\t * \treturn item;\n\t * } );\n\t *\n\t * source.add( { hidden: true } );\n\t * source.add( { hidden: false } );\n\t *\n\t * console.log( source.length ); // 2\n\t * console.log( target.length ); // 1\n\t * ```\n\t *\n\t * **Note**: {@link #clear} can be used to break the binding.\n\t *\n\t * @typeParam S The type of `externalCollection` element.\n\t * @param externalCollection A collection to be bound.\n\t * @returns The binding chain object.\n\t */ bindTo(externalCollection) {\n        if (this._bindToCollection) {\n            /**\n\t\t\t * The collection cannot be bound more than once.\n\t\t\t *\n\t\t\t * @error collection-bind-to-rebind\n\t\t\t */ throw new CKEditorError('collection-bind-to-rebind', this);\n        }\n        this._bindToCollection = externalCollection;\n        return {\n            as: (Class)=>{\n                this._setUpBindToBinding((item)=>new Class(item));\n            },\n            using: (callbackOrProperty)=>{\n                if (typeof callbackOrProperty == 'function') {\n                    this._setUpBindToBinding(callbackOrProperty);\n                } else {\n                    this._setUpBindToBinding((item)=>item[callbackOrProperty]);\n                }\n            }\n        };\n    }\n    /**\n\t * Finalizes and activates a binding initiated by {@link #bindTo}.\n\t *\n\t * @param factory A function which produces collection items.\n\t */ _setUpBindToBinding(factory) {\n        const externalCollection = this._bindToCollection;\n        // Adds the item to the collection once a change has been done to the external collection.\n        const addItem = (evt, externalItem, index)=>{\n            const isExternalBoundToThis = externalCollection._bindToCollection == this;\n            const externalItemBound = externalCollection._bindToInternalToExternalMap.get(externalItem);\n            // If an external collection is bound to this collection, which makes it a 2–way binding,\n            // and the particular external collection item is already bound, don't add it here.\n            // The external item has been created **out of this collection's item** and (re)adding it will\n            // cause a loop.\n            if (isExternalBoundToThis && externalItemBound) {\n                this._bindToExternalToInternalMap.set(externalItem, externalItemBound);\n                this._bindToInternalToExternalMap.set(externalItemBound, externalItem);\n            } else {\n                const item = factory(externalItem);\n                // When there is no item we need to remember skipped index first and then we can skip this item.\n                if (!item) {\n                    this._skippedIndexesFromExternal.push(index);\n                    return;\n                }\n                // Lets try to put item at the same index as index in external collection\n                // but when there are a skipped items in one or both collections we need to recalculate this index.\n                let finalIndex = index;\n                // When we try to insert item after some skipped items from external collection we need\n                // to include this skipped items and decrease index.\n                //\n                // For the following example:\n                // external -> [ 'A', 'B - skipped for internal', 'C - skipped for internal' ]\n                // internal -> [ A ]\n                //\n                // Another item is been added at the end of external collection:\n                // external.add( 'D' )\n                // external -> [ 'A', 'B - skipped for internal', 'C - skipped for internal', 'D' ]\n                //\n                // We can't just add 'D' to internal at the same index as index in external because\n                // this will produce empty indexes what is invalid:\n                // internal -> [ 'A', empty, empty, 'D' ]\n                //\n                // So we need to include skipped items and decrease index\n                // internal -> [ 'A', 'D' ]\n                for (const skipped of this._skippedIndexesFromExternal){\n                    if (index > skipped) {\n                        finalIndex--;\n                    }\n                }\n                // We need to take into consideration that external collection could skip some items from\n                // internal collection.\n                //\n                // For the following example:\n                // internal -> [ 'A', 'B - skipped for external', 'C - skipped for external' ]\n                // external -> [ A ]\n                //\n                // Another item is been added at the end of external collection:\n                // external.add( 'D' )\n                // external -> [ 'A', 'D' ]\n                //\n                // We need to include skipped items and place new item after them:\n                // internal -> [ 'A', 'B - skipped for external', 'C - skipped for external', 'D' ]\n                for (const skipped of externalCollection._skippedIndexesFromExternal){\n                    if (finalIndex >= skipped) {\n                        finalIndex++;\n                    }\n                }\n                this._bindToExternalToInternalMap.set(externalItem, item);\n                this._bindToInternalToExternalMap.set(item, externalItem);\n                this.add(item, finalIndex);\n                // After adding new element to internal collection we need update indexes\n                // of skipped items in external collection.\n                for(let i = 0; i < externalCollection._skippedIndexesFromExternal.length; i++){\n                    if (finalIndex <= externalCollection._skippedIndexesFromExternal[i]) {\n                        externalCollection._skippedIndexesFromExternal[i]++;\n                    }\n                }\n            }\n        };\n        // Load the initial content of the collection.\n        for (const externalItem of externalCollection){\n            addItem(null, externalItem, externalCollection.getIndex(externalItem));\n        }\n        // Synchronize the with collection as new items are added.\n        this.listenTo(externalCollection, 'add', addItem);\n        // Synchronize the with collection as new items are removed.\n        this.listenTo(externalCollection, 'remove', (evt, externalItem, index)=>{\n            const item = this._bindToExternalToInternalMap.get(externalItem);\n            if (item) {\n                this.remove(item);\n            }\n            // After removing element from external collection we need update/remove indexes\n            // of skipped items in internal collection.\n            this._skippedIndexesFromExternal = this._skippedIndexesFromExternal.reduce((result, skipped)=>{\n                if (index < skipped) {\n                    result.push(skipped - 1);\n                }\n                if (index > skipped) {\n                    result.push(skipped);\n                }\n                return result;\n            }, []);\n        });\n    }\n    /**\n\t * Returns an unique id property for a given `item`.\n\t *\n\t * The method will generate new id and assign it to the `item` if it doesn't have any.\n\t *\n\t * @param item Item to be added.\n\t */ _getItemIdBeforeAdding(item) {\n        const idProperty = this._idProperty;\n        let itemId;\n        if (idProperty in item) {\n            itemId = item[idProperty];\n            if (typeof itemId != 'string') {\n                /**\n\t\t\t\t * This item's ID should be a string.\n\t\t\t\t *\n\t\t\t\t * @error collection-add-invalid-id\n\t\t\t\t */ throw new CKEditorError('collection-add-invalid-id', this);\n            }\n            if (this.get(itemId)) {\n                /**\n\t\t\t\t * This item already exists in the collection.\n\t\t\t\t *\n\t\t\t\t * @error collection-add-item-already-exists\n\t\t\t\t */ throw new CKEditorError('collection-add-item-already-exists', this);\n            }\n        } else {\n            item[idProperty] = itemId = uid();\n        }\n        return itemId;\n    }\n    /**\n\t * Core {@link #remove} method implementation shared in other functions.\n\t *\n\t * In contrast this method **does not** fire the {@link #event:change} event.\n\t *\n\t * @param subject The item to remove, its id or index in the collection.\n\t * @returns Returns an array with the removed item and its index.\n\t * @fires remove\n\t */ _remove(subject) {\n        let index, id, item;\n        let itemDoesNotExist = false;\n        const idProperty = this._idProperty;\n        if (typeof subject == 'string') {\n            id = subject;\n            item = this._itemMap.get(id);\n            itemDoesNotExist = !item;\n            if (item) {\n                index = this._items.indexOf(item);\n            }\n        } else if (typeof subject == 'number') {\n            index = subject;\n            item = this._items[index];\n            itemDoesNotExist = !item;\n            if (item) {\n                id = item[idProperty];\n            }\n        } else {\n            item = subject;\n            id = item[idProperty];\n            index = this._items.indexOf(item);\n            itemDoesNotExist = index == -1 || !this._itemMap.get(id);\n        }\n        if (itemDoesNotExist) {\n            /**\n\t\t\t * Item not found.\n\t\t\t *\n\t\t\t * @error collection-remove-404\n\t\t\t */ throw new CKEditorError('collection-remove-404', this);\n        }\n        this._items.splice(index, 1);\n        this._itemMap.delete(id);\n        const externalItem = this._bindToInternalToExternalMap.get(item);\n        this._bindToInternalToExternalMap.delete(item);\n        this._bindToExternalToInternalMap.delete(externalItem);\n        this.fire('remove', item, index);\n        return [\n            item,\n            index\n        ];\n    }\n    /**\n\t * Iterable interface.\n\t */ [Symbol.iterator]() {\n        return this._items[Symbol.iterator]();\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/first\n */ /**\n * Returns first item of the given `iterator`.\n */ function first(iterator) {\n    const iteratorItem = iterator.next();\n    if (iteratorItem.done) {\n        return null;\n    }\n    return iteratorItem.value;\n}\n\n/**\n * Allows observing a group of `Element`s whether at least one of them is focused.\n *\n * Used by the {@link module:core/editor/editor~Editor} in order to track whether the focus is still within the application,\n * or were used outside of its UI.\n *\n * **Note** `focus` and `blur` listeners use event capturing, so it is only needed to register wrapper `Element`\n * which contain other `focusable` elements. But note that this wrapper element has to be focusable too\n * (have e.g. `tabindex=\"-1\"`).\n *\n * Check out the {@glink framework/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\"} guide to learn more.\n */ class FocusTracker extends /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin()) {\n    /**\n\t * List of registered elements.\n\t *\n\t * @internal\n\t */ _elements = new Set();\n    /**\n\t * Event loop timeout.\n\t */ _nextEventLoopTimeout = null;\n    constructor(){\n        super();\n        this.set('isFocused', false);\n        this.set('focusedElement', null);\n    }\n    /**\n\t * List of registered elements.\n\t */ get elements() {\n        return Array.from(this._elements.values());\n    }\n    /**\n\t * Starts tracking the specified element.\n\t */ add(element) {\n        if (this._elements.has(element)) {\n            /**\n\t\t\t * This element is already tracked by {@link module:utils/focustracker~FocusTracker}.\n\t\t\t *\n\t\t\t * @error focustracker-add-element-already-exist\n\t\t\t */ throw new CKEditorError('focustracker-add-element-already-exist', this);\n        }\n        this.listenTo(element, 'focus', ()=>this._focus(element), {\n            useCapture: true\n        });\n        this.listenTo(element, 'blur', ()=>this._blur(), {\n            useCapture: true\n        });\n        this._elements.add(element);\n    }\n    /**\n\t * Stops tracking the specified element and stops listening on this element.\n\t */ remove(element) {\n        if (element === this.focusedElement) {\n            this._blur();\n        }\n        if (this._elements.has(element)) {\n            this.stopListening(element);\n            this._elements.delete(element);\n        }\n    }\n    /**\n\t * Destroys the focus tracker by:\n\t * - Disabling all event listeners attached to tracked elements.\n\t * - Removing all tracked elements that were previously added.\n\t */ destroy() {\n        this.stopListening();\n    }\n    /**\n\t * Stores currently focused element and set {@link #isFocused} as `true`.\n\t */ _focus(element) {\n        clearTimeout(this._nextEventLoopTimeout);\n        this.focusedElement = element;\n        this.isFocused = true;\n    }\n    /**\n\t * Clears currently focused element and set {@link #isFocused} as `false`.\n\t * This method uses `setTimeout` to change order of fires `blur` and `focus` events.\n\t */ _blur() {\n        clearTimeout(this._nextEventLoopTimeout);\n        this._nextEventLoopTimeout = setTimeout(()=>{\n            this.focusedElement = null;\n            this.isFocused = false;\n        }, 0);\n    }\n}\n\n/**\n * Keystroke handler allows registering callbacks for given keystrokes.\n *\n * The most frequent use of this class is through the {@link module:core/editor/editor~Editor#keystrokes `editor.keystrokes`}\n * property. It allows listening to keystrokes executed in the editing view:\n *\n * ```ts\n * editor.keystrokes.set( 'Ctrl+A', ( keyEvtData, cancel ) => {\n * \tconsole.log( 'Ctrl+A has been pressed' );\n * \tcancel();\n * } );\n * ```\n *\n * However, this utility class can be used in various part of the UI. For instance, a certain {@link module:ui/view~View}\n * can use it like this:\n *\n * ```ts\n * class MyView extends View {\n * \tconstructor() {\n * \t\tthis.keystrokes = new KeystrokeHandler();\n *\n * \t\tthis.keystrokes.set( 'tab', handleTabKey );\n * \t}\n *\n * \trender() {\n * \t\tsuper.render();\n *\n * \t\tthis.keystrokes.listenTo( this.element );\n * \t}\n * }\n * ```\n *\n * That keystroke handler will listen to `keydown` events fired in this view's main element.\n *\n */ class KeystrokeHandler {\n    /**\n\t * Listener used to listen to events for easier keystroke handler destruction.\n\t */ _listener;\n    /**\n\t * Creates an instance of the keystroke handler.\n\t */ constructor(){\n        this._listener = new (DomEmitterMixin())();\n    }\n    /**\n\t * Starts listening for `keydown` events from a given emitter.\n\t */ listenTo(emitter) {\n        // The #_listener works here as a kind of dispatcher. It groups the events coming from the same\n        // keystroke so the listeners can be attached to them with different priorities.\n        //\n        // E.g. all the keystrokes with the `keyCode` of 42 coming from the `emitter` are propagated\n        // as a `_keydown:42` event by the `_listener`. If there's a callback created by the `set`\n        // method for this 42 keystroke, it listens to the `_listener#_keydown:42` event only and interacts\n        // only with other listeners of this particular event, thus making it possible to prioritize\n        // the listeners and safely cancel execution, when needed. Instead of duplicating the Emitter logic,\n        // the KeystrokeHandler re–uses it to do its job.\n        this._listener.listenTo(emitter, 'keydown', (evt, keyEvtData)=>{\n            this._listener.fire('_keydown:' + getCode(keyEvtData), keyEvtData);\n        });\n    }\n    /**\n\t * Registers a handler for the specified keystroke.\n\t *\n\t * @param keystroke Keystroke defined in a format accepted by\n\t * the {@link module:utils/keyboard~parseKeystroke} function.\n\t * @param callback A function called with the\n\t * {@link module:engine/view/observer/keyobserver~KeyEventData key event data} object and\n\t * a helper function to call both `preventDefault()` and `stopPropagation()` on the underlying event.\n\t * @param options Additional options.\n\t */ set(keystroke, callback, options = {}) {\n        const keyCode = parseKeystroke(keystroke);\n        const priority = options.priority;\n        // Execute the passed callback on KeystrokeHandler#_keydown.\n        // TODO: https://github.com/ckeditor/ckeditor5-utils/issues/144\n        this._listener.listenTo(this._listener, '_keydown:' + keyCode, (evt, keyEvtData)=>{\n            if (options.filter && !options.filter(keyEvtData)) {\n                return;\n            }\n            callback(keyEvtData, ()=>{\n                // Stop the event in the DOM: no listener in the web page\n                // will be triggered by this event.\n                keyEvtData.preventDefault();\n                keyEvtData.stopPropagation();\n                // Stop the event in the KeystrokeHandler: no more callbacks\n                // will be executed for this keystroke.\n                evt.stop();\n            });\n            // Mark this keystroke as handled by the callback. See: #press.\n            evt.return = true;\n        }, {\n            priority\n        });\n    }\n    /**\n\t * Triggers a keystroke handler for a specified key combination, if such a keystroke was {@link #set defined}.\n\t *\n\t * @param keyEvtData Key event data.\n\t * @returns Whether the keystroke was handled.\n\t */ press(keyEvtData) {\n        return !!this._listener.fire('_keydown:' + getCode(keyEvtData), keyEvtData);\n    }\n    /**\n\t * Stops listening to `keydown` events from the given emitter.\n\t */ stopListening(emitter) {\n        this._listener.stopListening(emitter);\n    }\n    /**\n\t * Destroys the keystroke handler.\n\t */ destroy() {\n        this.stopListening();\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/objecttomap\n */ /**\n * Transforms object to map.\n *\n * ```ts\n * const map = objectToMap( { 'foo': 1, 'bar': 2 } );\n * map.get( 'foo' ); // 1\n * ```\n *\n * **Note**: For mixed data (`Object` or `Iterable`) there's a dedicated {@link module:utils/tomap~toMap} function.\n *\n * @param obj Object to transform.\n * @returns Map created from object.\n */ function objectToMap(obj) {\n    const map = new Map();\n    for(const key in obj){\n        map.set(key, obj[key]);\n    }\n    return map;\n}\n\n/**\n * Transforms object or iterable to map. Iterable needs to be in the format acceptable by the `Map` constructor.\n *\n * ```ts\n * map = toMap( { 'foo': 1, 'bar': 2 } );\n * map = toMap( [ [ 'foo', 1 ], [ 'bar', 2 ] ] );\n * map = toMap( anotherMap );\n * ```\n *\n * @param data Object or iterable to transform.\n * @returns Map created from data.\n */ function toMap(data) {\n    if (isIterable(data)) {\n        return new Map(data);\n    } else {\n        return objectToMap(data);\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/wait\n */ /**\n * Returns a promise that is resolved after the specified time.\n *\n * @param timeout The time in milliseconds to wait.\n * @param options.signal A signal to abort the waiting.\n */ function wait(timeout, options = {}) {\n    return new Promise((resolve, reject)=>{\n        const signal = options.signal || new AbortController().signal;\n        signal.throwIfAborted();\n        const timer = setTimeout(timeoutHandler, timeout);\n        signal.addEventListener('abort', abortHandler, {\n            once: true\n        });\n        function timeoutHandler() {\n            signal.removeEventListener('abort', abortHandler);\n            resolve();\n        }\n        function abortHandler() {\n            clearTimeout(timer);\n            reject(signal.reason);\n        }\n    });\n}\n\n/**\n * Tries calling the given callback until it sucessfully resolves.\n *\n * If the callback fails `maxRetries` times, the returned promise is rejected with the last error.\n *\n * @typeParam TResult The result of a successful callback invocation.\n * @param callback The function to call until it succeeds.\n * @param options.maxRetries Maximum number of retries.\n * @param options.retryDelay The time in milliseconds between attempts. By default it implements exponential back-off policy.\n * @param options.signal The signal to abort further retries. The callback itself is not aborted automatically.\n */ async function retry(callback, options = {}) {\n    const { maxAttempts = 4, retryDelay = exponentialDelay(), signal = new AbortController().signal } = options;\n    signal.throwIfAborted();\n    for(let attempt = 0;; attempt++){\n        try {\n            return await callback();\n        } catch (err) {\n            const isLast = attempt + 1 >= maxAttempts;\n            if (isLast) {\n                throw err;\n            }\n        }\n        await wait(retryDelay(attempt), {\n            signal\n        });\n    }\n}\n/**\n * Creates a function that calculates exponential back-off delay. Pass it as `options.retryDelay` to {@link ~retry}.\n *\n * @param options.delay Base delay between invocations. Defaults to 1s.\n * @param options.factor How much to increase the delay. Defaults to 2x.\n * @param options.maxDelay Maximum timeout. Even if higher timeout is calculated, it cannot get higher than this value. Default to 10s.\n * @returns The function calculating the delay.\n */ function exponentialDelay(options = {}) {\n    const { delay = 1000, factor = 2, maxDelay = 10000 } = options;\n    return (attempt)=>Math.min(factor ** attempt * delay, maxDelay);\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/splicearray\n */ const BIG_CHUNK_SIZE = 10000;\n/**\n * Splices one array into another. To be used instead of `Array.prototype.splice` as the latter may\n * throw \"Maximum call stack size exceeded\" when passed huge number of items to insert.\n *\n * Note: in contrary to Array.splice, this function does not modify the original `target`.\n *\n * ```ts\n * spliceArray( [ 1, 2 ], [ 3, 4 ], 0, 0 );\t// [ 3, 4, 1, 2 ]\n * spliceArray( [ 1, 2 ], [ 3, 4 ], 1, 1 );\t// [ 1, 3, 4 ]\n * spliceArray( [ 1, 2 ], [ 3, 4 ], 1, 0 );\t// [ 1, 3, 4, 2 ]\n * spliceArray( [ 1, 2 ], [ 3, 4 ], 2, 0 );\t// [ 1, 2, 3, 4 ]\n * spliceArray( [ 1, 2 ], [],       0, 1 );\t// [ 2 ]\n * ```\n *\n * @param target Array to be spliced.\n * @param source Array of elements to be inserted to target.\n * @param start Index at which nodes should be inserted/removed.\n * @param count Number of items.\n *\n * @returns New spliced array.\n */ function spliceArray(target, source, start, count) {\n    // In case of performance problems, see: https://github.com/ckeditor/ckeditor5/pull/12429/files#r965850568\n    if (Math.max(source.length, target.length) > BIG_CHUNK_SIZE) {\n        return target.slice(0, start).concat(source).concat(target.slice(start + count, target.length));\n    } else {\n        const newTarget = Array.from(target);\n        newTarget.splice(start, count, ...source);\n        return newTarget;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module utils/delay\n */ /* globals setTimeout, clearTimeout */ /**\n * Returns a function wrapper that will trigger a function after a specified wait time.\n * The timeout can be canceled by calling the cancel function on the returned wrapped function.\n *\n * @param func The function to wrap.\n * @param wait The timeout in ms.\n */ function delay(func, wait) {\n    let timer;\n    function delayed(...args) {\n        delayed.cancel();\n        timer = setTimeout(()=>func(...args), wait);\n    }\n    delayed.cancel = ()=>{\n        clearTimeout(timer);\n    };\n    return delayed;\n}\n\n/**\n * Checks whether the given string contains information that allows you to verify the license status.\n *\n * @param token The string to check.\n * @returns String that represents the state of given `token` parameter.\n */ function verifyLicense(token) {\n    // This function implements naive and partial license key check mechanism,\n    // used only to decide whether to show or hide the \"Powered by CKEditor\" logo.\n    //\n    // You can read the reasoning behind showing the logo to unlicensed (GPL) users\n    // in this thread: https://github.com/ckeditor/ckeditor5/issues/14082.\n    //\n    // We firmly believe in the values behind creating open-source software, even when that\n    // means keeping the license verification logic open for everyone to see.\n    //\n    // Please keep this code intact. Thank you for your understanding.\n    function oldTokenCheck(token) {\n        if (token.length >= 40 && token.length <= 255) {\n            return 'VALID';\n        } else {\n            return 'INVALID';\n        }\n    }\n    // TODO: issue ci#3175\n    if (!token) {\n        return 'INVALID';\n    }\n    let decryptedData = '';\n    try {\n        decryptedData = atob(token);\n    } catch (e) {\n        return 'INVALID';\n    }\n    const splittedDecryptedData = decryptedData.split('-');\n    const firstElement = splittedDecryptedData[0];\n    const secondElement = splittedDecryptedData[1];\n    if (!secondElement) {\n        return oldTokenCheck(token);\n    }\n    try {\n        atob(secondElement);\n    } catch (e) {\n        try {\n            atob(firstElement);\n            if (!atob(firstElement).length) {\n                return oldTokenCheck(token);\n            }\n        } catch (e) {\n            return oldTokenCheck(token);\n        }\n    }\n    if (firstElement.length < 40 || firstElement.length > 255) {\n        return 'INVALID';\n    }\n    let decryptedSecondElement = '';\n    try {\n        atob(firstElement);\n        decryptedSecondElement = atob(secondElement);\n    } catch (e) {\n        return 'INVALID';\n    }\n    if (decryptedSecondElement.length !== 8) {\n        return 'INVALID';\n    }\n    const year = Number(decryptedSecondElement.substring(0, 4));\n    const monthIndex = Number(decryptedSecondElement.substring(4, 6)) - 1;\n    const day = Number(decryptedSecondElement.substring(6, 8));\n    const date = new Date(year, monthIndex, day);\n    if (date < releaseDate || isNaN(Number(date))) {\n        return 'INVALID';\n    }\n    return 'VALID';\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * Set of utils to handle unicode characters.\n *\n * @module utils/unicode\n */ /**\n * Checks whether given `character` is a combining mark.\n *\n * @param character Character to check.\n */ function isCombiningMark(character) {\n    // eslint-disable-next-line no-misleading-character-class\n    return !!character && character.length == 1 && /[\\u0300-\\u036f\\u1ab0-\\u1aff\\u1dc0-\\u1dff\\u20d0-\\u20ff\\ufe20-\\ufe2f]/.test(character);\n}\n/**\n * Checks whether given `character` is a high half of surrogate pair.\n *\n * Using UTF-16 terminology, a surrogate pair denotes UTF-16 character using two UTF-8 characters. The surrogate pair\n * consist of high surrogate pair character followed by low surrogate pair character.\n *\n * @param character Character to check.\n */ function isHighSurrogateHalf(character) {\n    return !!character && character.length == 1 && /[\\ud800-\\udbff]/.test(character);\n}\n/**\n * Checks whether given `character` is a low half of surrogate pair.\n *\n * Using UTF-16 terminology, a surrogate pair denotes UTF-16 character using two UTF-8 characters. The surrogate pair\n * consist of high surrogate pair character followed by low surrogate pair character.\n *\n * @param character Character to check.\n */ function isLowSurrogateHalf(character) {\n    return !!character && character.length == 1 && /[\\udc00-\\udfff]/.test(character);\n}\n/**\n * Checks whether given offset in a string is inside a surrogate pair (between two surrogate halves).\n *\n * @param string String to check.\n * @param offset Offset to check.\n */ function isInsideSurrogatePair(string, offset) {\n    return isHighSurrogateHalf(string.charAt(offset - 1)) && isLowSurrogateHalf(string.charAt(offset));\n}\n/**\n * Checks whether given offset in a string is between base character and combining mark or between two combining marks.\n *\n * @param string String to check.\n * @param offset Offset to check.\n */ function isInsideCombinedSymbol(string, offset) {\n    return isCombiningMark(string.charAt(offset));\n}\nconst EMOJI_PATTERN = /* #__PURE__ */ buildEmojiRegexp();\n/**\n * Checks whether given offset in a string is inside multi-character emoji sequence.\n *\n * @param string String to check.\n * @param offset Offset to check.\n */ function isInsideEmojiSequence(string, offset) {\n    const matches = String(string).matchAll(EMOJI_PATTERN);\n    return Array.from(matches).some((match)=>match.index < offset && offset < match.index + match[0].length);\n}\nfunction buildEmojiRegexp() {\n    const parts = [\n        // Emoji Tag Sequence (ETS)\n        /\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}/u,\n        // Emoji Keycap Sequence\n        /\\p{Emoji}\\u{FE0F}?\\u{20E3}/u,\n        // Emoji Presentation Sequence\n        /\\p{Emoji}\\u{FE0F}/u,\n        // Single-Character Emoji / Emoji Modifier Sequence\n        /(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*/u\n    ];\n    const flagSequence = /\\p{Regional_Indicator}{2}/u.source;\n    const emoji = '(?:' + parts.map((part)=>part.source).join('|') + ')';\n    const sequence = `${flagSequence}|${emoji}(?:\\u{200D}${emoji})*`;\n    return new RegExp(sequence, 'ug');\n}\n\nexport { CKEditorError, Collection, Config, DomEmitterMixin, ElementReplacer, EmitterMixin, EventInfo, FocusTracker, KeystrokeHandler, Locale, ObservableMixin, Rect, ResizeObserver, abortableDebounce, compareArrays, count, createElement, delay, diff, diffToChanges, env, exponentialDelay, fastDiff, findClosestScrollableAncestor, first, getAncestors, getBorderWidths, getCode, getDataFromElement, getEnvKeystrokeText, getLanguageDirection, getLocalizedArrowKeyCodeDirection, getOptimalPosition, getRangeFromMouseEvent, global, indexOf, insertAt, insertToPriorityArray, isArrowKeyCode, isCombiningMark, isComment, isForwardArrowKeyCode, isHighSurrogateHalf, isInsideCombinedSymbol, isInsideEmojiSequence, isInsideSurrogatePair, isIterable, isLowSurrogateHalf, isNode, isRange, isText, isValidAttributeName, isVisible, keyCodes, logError, logWarning, mix, parseKeystroke, priorities, releaseDate, remove, retry, scrollAncestorsToShowTarget, scrollViewportToShowTarget, setDataInElement, spliceArray, toArray, toMap, toUnit, uid, verifyLicense, version, wait };\n//# sourceMappingURL=index.js.map\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n  return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\nexport default isKey;\n","import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n","import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n  var result = [];\n  if (string.charCodeAt(0) === 46 /* . */) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, subString) {\n    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\nexport default stringToPath;\n","import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n  var result = memoize(func, function(key) {\n    if (cache.size === MAX_MEMOIZE_SIZE) {\n      cache.clear();\n    }\n    return key;\n  });\n\n  var cache = result.cache;\n  return result;\n}\n\nexport default memoizeCapped;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isArray(value)) {\n    // Recursively convert values (susceptible to call stack limits).\n    return arrayMap(value, baseToString) + '';\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\nexport default arrayMap;\n","import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n  if (isArray(value)) {\n    return value;\n  }\n  return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n","import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = castPath(path, object);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n  var index = -1,\n      length = array.length;\n\n  if (start < 0) {\n    start = -start > length ? 0 : (length + start);\n  }\n  end = end > length ? length : end;\n  if (end < 0) {\n    end += length;\n  }\n  length = start > end ? 0 : ((end - start) >>> 0);\n  start >>>= 0;\n\n  var result = Array(length);\n  while (++index < length) {\n    result[index] = array[index + start];\n  }\n  return result;\n}\n\nexport default baseSlice;\n","import castPath from './_castPath.js';\nimport last from './last.js';\nimport parent from './_parent.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n  path = castPath(path, object);\n  object = parent(object, path);\n  return object == null || delete object[toKey(last(path))];\n}\n\nexport default baseUnset;\n","import baseGet from './_baseGet.js';\nimport baseSlice from './_baseSlice.js';\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n  return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nexport default parent;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n","import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n","import baseSet from './_baseSet.js';\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n  return object == null ? object : baseSet(object, path, value);\n}\n\nexport default set;\n","import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n  if (!isObject(object)) {\n    return object;\n  }\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      lastIndex = length - 1,\n      nested = object;\n\n  while (nested != null && ++index < length) {\n    var key = toKey(path[index]),\n        newValue = value;\n\n    if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n      return object;\n    }\n\n    if (index != lastIndex) {\n      var objValue = nested[key];\n      newValue = customizer ? customizer(objValue, key, nested) : undefined;\n      if (newValue === undefined) {\n        newValue = isObject(objValue)\n          ? objValue\n          : (isIndex(path[index + 1]) ? [] : {});\n      }\n    }\n    assignValue(nested, key, newValue);\n    nested = nested[key];\n  }\n  return object;\n}\n\nexport default baseSet;\n","import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * function Bar() {\n *   this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\nvar assignIn = createAssigner(function(object, source) {\n  copyObject(source, keysIn(source), object);\n});\n\nexport default assignIn;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        timeWaiting = wait - timeSinceLastCall;\n\n    return maxing\n      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n      : timeWaiting;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        clearTimeout(timerId);\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\nexport default debounce;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport default arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nexport default cacheHas;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Check that cyclic values are equal.\n  var arrStacked = stack.get(array);\n  var othStacked = stack.get(other);\n  if (arrStacked && othStacked) {\n    return arrStacked == other && othStacked == array;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!cacheHas(seen, othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n              return seen.push(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, bitmask, customizer, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\nexport default equalArrays;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      objProps = getAllKeys(object),\n      objLength = objProps.length,\n      othProps = getAllKeys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Check that cyclic values are equal.\n  var objStacked = stack.get(object);\n  var othStacked = stack.get(other);\n  if (objStacked && othStacked) {\n    return objStacked == other && othStacked == object;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = objIsArr ? arrayTag : getTag(object),\n      othTag = othIsArr ? arrayTag : getTag(other);\n\n  objTag = objTag == argsTag ? objectTag : objTag;\n  othTag = othTag == argsTag ? objectTag : othTag;\n\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && isBuffer(object)) {\n    if (!isBuffer(other)) {\n      return false;\n    }\n    objIsArr = true;\n    objIsObj = false;\n  }\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n  }\n  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Unordered comparison\n *  2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n    CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nexport default cloneDeep;\n","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n  return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { logWarning, EmitterMixin, CKEditorError, compareArrays, toArray, toMap, isIterable, ObservableMixin, count, EventInfo, Collection, keyCodes, isText, env, remove as remove$1, insertAt, diff, fastDiff, isNode, isComment, indexOf, global, isValidAttributeName, first, getAncestors, DomEmitterMixin, getCode, isArrowKeyCode, scrollViewportToShowTarget, spliceArray, uid, priorities, isInsideSurrogatePair, isInsideCombinedSymbol, isInsideEmojiSequence } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { clone, isPlainObject, isObject, unset, get, merge, set, extend, debounce, isEqualWith, cloneDeep, isEqual } from 'lodash-es';\n\n// Each document stores information about its placeholder elements and check functions.\nconst documentPlaceholders = new WeakMap();\nlet hasDisplayedPlaceholderDeprecationWarning = false;\n/**\n * A helper that enables a placeholder on the provided view element (also updates its visibility).\n * The placeholder is a CSS pseudo–element (with a text content) attached to the element.\n *\n * To change the placeholder text, change value of the `placeholder` property in the provided `element`.\n *\n * To disable the placeholder, use {@link module:engine/view/placeholder~disablePlaceholder `disablePlaceholder()`} helper.\n *\n * @param options Configuration options of the placeholder.\n * @param options.view Editing view instance.\n * @param options.element Element that will gain a placeholder. See `options.isDirectHost` to learn more.\n * @param options.isDirectHost If set `false`, the placeholder will not be enabled directly\n * in the passed `element` but in one of its children (selected automatically, i.e. a first empty child element).\n * Useful when attaching placeholders to elements that can host other elements (not just text), for instance,\n * editable root elements.\n * @param options.text Placeholder text. It's **deprecated** and will be removed soon. Use\n * {@link module:engine/view/placeholder~PlaceholderableElement#placeholder `options.element.placeholder`} instead.\n * @param options.keepOnFocus If set `true`, the placeholder stay visible when the host element is focused.\n */ function enablePlaceholder({ view, element, text, isDirectHost = true, keepOnFocus = false }) {\n    const doc = view.document;\n    // Use a single a single post fixer per—document to update all placeholders.\n    if (!documentPlaceholders.has(doc)) {\n        documentPlaceholders.set(doc, new Map());\n        // If a post-fixer callback makes a change, it should return `true` so other post–fixers\n        // can re–evaluate the document again.\n        doc.registerPostFixer((writer)=>updateDocumentPlaceholders(doc, writer));\n        // Update placeholders on isComposing state change since rendering is disabled while in composition mode.\n        doc.on('change:isComposing', ()=>{\n            view.change((writer)=>updateDocumentPlaceholders(doc, writer));\n        }, {\n            priority: 'high'\n        });\n    }\n    if (element.is('editableElement')) {\n        element.on('change:placeholder', (evtInfo, evt, text)=>{\n            setPlaceholder(text);\n        });\n    }\n    if (element.placeholder) {\n        setPlaceholder(element.placeholder);\n    } else if (text) {\n        setPlaceholder(text);\n    }\n    if (text) {\n        showPlaceholderTextDeprecationWarning();\n    }\n    function setPlaceholder(text) {\n        // Store information about the element placeholder under its document.\n        documentPlaceholders.get(doc).set(element, {\n            text,\n            isDirectHost,\n            keepOnFocus,\n            hostElement: isDirectHost ? element : null\n        });\n        // Update the placeholders right away.\n        view.change((writer)=>updateDocumentPlaceholders(doc, writer));\n    }\n}\n/**\n * Disables the placeholder functionality from a given element.\n *\n * See {@link module:engine/view/placeholder~enablePlaceholder `enablePlaceholder()`} to learn more.\n */ function disablePlaceholder(view, element) {\n    const doc = element.document;\n    if (!documentPlaceholders.has(doc)) {\n        return;\n    }\n    view.change((writer)=>{\n        const placeholders = documentPlaceholders.get(doc);\n        const config = placeholders.get(element);\n        writer.removeAttribute('data-placeholder', config.hostElement);\n        hidePlaceholder(writer, config.hostElement);\n        placeholders.delete(element);\n    });\n}\n/**\n * Shows a placeholder in the provided element by changing related attributes and CSS classes.\n *\n * **Note**: This helper will not update the placeholder visibility nor manage the\n * it in any way in the future. What it does is a one–time state change of an element. Use\n * {@link module:engine/view/placeholder~enablePlaceholder `enablePlaceholder()`} and\n * {@link module:engine/view/placeholder~disablePlaceholder `disablePlaceholder()`} for full\n * placeholder functionality.\n *\n * **Note**: This helper will blindly show the placeholder directly in the root editable element if\n * one is passed, which could result in a visual clash if the editable element has some children\n * (for instance, an empty paragraph). Use {@link module:engine/view/placeholder~enablePlaceholder `enablePlaceholder()`}\n * in that case or make sure the correct element is passed to the helper.\n *\n * @returns `true`, if any changes were made to the `element`.\n */ function showPlaceholder(writer, element) {\n    if (!element.hasClass('ck-placeholder')) {\n        writer.addClass('ck-placeholder', element);\n        return true;\n    }\n    return false;\n}\n/**\n * Hides a placeholder in the element by changing related attributes and CSS classes.\n *\n * **Note**: This helper will not update the placeholder visibility nor manage the\n * it in any way in the future. What it does is a one–time state change of an element. Use\n * {@link module:engine/view/placeholder~enablePlaceholder `enablePlaceholder()`} and\n * {@link module:engine/view/placeholder~disablePlaceholder `disablePlaceholder()`} for full\n * placeholder functionality.\n *\n * @returns `true`, if any changes were made to the `element`.\n */ function hidePlaceholder(writer, element) {\n    if (element.hasClass('ck-placeholder')) {\n        writer.removeClass('ck-placeholder', element);\n        return true;\n    }\n    return false;\n}\n/**\n * Checks if a placeholder should be displayed in the element.\n *\n * **Note**: This helper will blindly check the possibility of showing a placeholder directly in the\n * root editable element if one is passed, which may not be the expected result. If an element can\n * host other elements (not just text), most likely one of its children should be checked instead\n * because it will be the final host for the placeholder. Use\n * {@link module:engine/view/placeholder~enablePlaceholder `enablePlaceholder()`} in that case or make\n * sure the correct element is passed to the helper.\n *\n * @param element Element that holds the placeholder.\n * @param keepOnFocus Focusing the element will keep the placeholder visible.\n */ function needsPlaceholder(element, keepOnFocus) {\n    if (!element.isAttached()) {\n        return false;\n    }\n    // Anything but uiElement(s) counts as content.\n    const hasContent = Array.from(element.getChildren()).some((element)=>!element.is('uiElement'));\n    if (hasContent) {\n        return false;\n    }\n    const doc = element.document;\n    const viewSelection = doc.selection;\n    const selectionAnchor = viewSelection.anchor;\n    if (doc.isComposing && selectionAnchor && selectionAnchor.parent === element) {\n        return false;\n    }\n    // Skip the focus check and make the placeholder visible already regardless of document focus state.\n    if (keepOnFocus) {\n        return true;\n    }\n    // If the document is blurred.\n    if (!doc.isFocused) {\n        return true;\n    }\n    // If document is focused and the element is empty but the selection is not anchored inside it.\n    return !!selectionAnchor && selectionAnchor.parent !== element;\n}\n/**\n * Updates all placeholders associated with a document in a post–fixer callback.\n *\n * @returns True if any changes were made to the view document.\n */ function updateDocumentPlaceholders(doc, writer) {\n    const placeholders = documentPlaceholders.get(doc);\n    const directHostElements = [];\n    let wasViewModified = false;\n    // First set placeholders on the direct hosts.\n    for (const [element, config] of placeholders){\n        if (config.isDirectHost) {\n            directHostElements.push(element);\n            if (updatePlaceholder(writer, element, config)) {\n                wasViewModified = true;\n            }\n        }\n    }\n    // Then set placeholders on the indirect hosts but only on those that does not already have an direct host placeholder.\n    for (const [element, config] of placeholders){\n        if (config.isDirectHost) {\n            continue;\n        }\n        const hostElement = getChildPlaceholderHostSubstitute(element);\n        // When not a direct host, it could happen that there is no child element\n        // capable of displaying a placeholder.\n        if (!hostElement) {\n            continue;\n        }\n        // Don't override placeholder if the host element already has some direct placeholder.\n        if (directHostElements.includes(hostElement)) {\n            continue;\n        }\n        // Update the host element (used for setting and removing the placeholder).\n        config.hostElement = hostElement;\n        if (updatePlaceholder(writer, element, config)) {\n            wasViewModified = true;\n        }\n    }\n    return wasViewModified;\n}\n/**\n * Updates a single placeholder in a post–fixer callback.\n *\n * @returns True if any changes were made to the view document.\n */ function updatePlaceholder(writer, element, config) {\n    const { text, isDirectHost, hostElement } = config;\n    let wasViewModified = false;\n    // This may be necessary when updating the placeholder text to something else.\n    if (hostElement.getAttribute('data-placeholder') !== text) {\n        writer.setAttribute('data-placeholder', text, hostElement);\n        wasViewModified = true;\n    }\n    // If the host element is not a direct host then placeholder is needed only when there is only one element.\n    const isOnlyChild = isDirectHost || element.childCount == 1;\n    if (isOnlyChild && needsPlaceholder(hostElement, config.keepOnFocus)) {\n        if (showPlaceholder(writer, hostElement)) {\n            wasViewModified = true;\n        }\n    } else if (hidePlaceholder(writer, hostElement)) {\n        wasViewModified = true;\n    }\n    return wasViewModified;\n}\n/**\n * Gets a child element capable of displaying a placeholder if a parent element can host more\n * than just text (for instance, when it is a root editable element). The child element\n * can then be used in other placeholder helpers as a substitute of its parent.\n */ function getChildPlaceholderHostSubstitute(parent) {\n    if (parent.childCount) {\n        const firstChild = parent.getChild(0);\n        if (firstChild.is('element') && !firstChild.is('uiElement') && !firstChild.is('attributeElement')) {\n            return firstChild;\n        }\n    }\n    return null;\n}\n/**\n * Displays a deprecation warning message in the console, but only once per page load.\n */ function showPlaceholderTextDeprecationWarning() {\n    if (!hasDisplayedPlaceholderDeprecationWarning) {\n        /**\n\t\t * The \"text\" option in the {@link module:engine/view/placeholder~enablePlaceholder `enablePlaceholder()`}\n\t\t * function is deprecated and will be removed soon.\n\t\t *\n\t\t * See the {@glink updating/guides/update-to-39#view-element-placeholder Migration to v39} guide for\n\t\t * more information on how to apply this change.\n\t\t *\n\t\t * @error enableplaceholder-deprecated-text-option\n\t\t */ logWarning('enableplaceholder-deprecated-text-option');\n    }\n    hasDisplayedPlaceholderDeprecationWarning = true;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module engine/view/typecheckable\n */ let TypeCheckable$1 = class TypeCheckable {\n    /* istanbul ignore next -- @preserve */ is() {\n        // There are a lot of overloads above.\n        // Overriding method in derived classes remove them and only `is( type: string ): boolean` is visible which we don't want.\n        // One option would be to copy them all to all classes, but that's ugly.\n        // It's best when TypeScript compiler doesn't see those overloads, except the one in the top base class.\n        // To overload a method, but not let the compiler see it, do after class definition:\n        // `MyClass.prototype.is = function( type: string ) {...}`\n        throw new Error('is() method is abstract');\n    }\n};\n\n/**\n * Abstract view node class.\n *\n * This is an abstract class. Its constructor should not be used directly.\n * Use the {@link module:engine/view/downcastwriter~DowncastWriter} or {@link module:engine/view/upcastwriter~UpcastWriter}\n * to create new instances of view nodes.\n */ let Node$2 = class Node extends /* #__PURE__ */ EmitterMixin(TypeCheckable$1) {\n    /**\n\t * The document instance to which this node belongs.\n\t */ document;\n    /**\n\t * Parent element. Null by default. Set by {@link module:engine/view/element~Element#_insertChild}.\n\t */ parent;\n    /**\n\t * Creates a tree view node.\n\t *\n\t * @param document The document instance to which this node belongs.\n\t */ constructor(document){\n        super();\n        this.document = document;\n        this.parent = null;\n    }\n    /**\n\t * Index of the node in the parent element or null if the node has no parent.\n\t *\n\t * Accessing this property throws an error if this node's parent element does not contain it.\n\t * This means that view tree got broken.\n\t */ get index() {\n        let pos;\n        if (!this.parent) {\n            return null;\n        }\n        // No parent or child doesn't exist in parent's children.\n        if ((pos = this.parent.getChildIndex(this)) == -1) {\n            /**\n\t\t\t * The node's parent does not contain this node. It means that the document tree is corrupted.\n\t\t\t *\n\t\t\t * @error view-node-not-found-in-parent\n\t\t\t */ throw new CKEditorError('view-node-not-found-in-parent', this);\n        }\n        return pos;\n    }\n    /**\n\t * Node's next sibling, or `null` if it is the last child.\n\t */ get nextSibling() {\n        const index = this.index;\n        return index !== null && this.parent.getChild(index + 1) || null;\n    }\n    /**\n\t * Node's previous sibling, or `null` if it is the first child.\n\t */ get previousSibling() {\n        const index = this.index;\n        return index !== null && this.parent.getChild(index - 1) || null;\n    }\n    /**\n\t * Top-most ancestor of the node. If the node has no parent it is the root itself.\n\t */ get root() {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n        let root = this;\n        while(root.parent){\n            root = root.parent;\n        }\n        return root;\n    }\n    /**\n\t * Returns true if the node is in a tree rooted in the document (is a descendant of one of its roots).\n\t */ isAttached() {\n        return this.root.is('rootElement');\n    }\n    /**\n\t * Gets a path to the node. The path is an array containing indices of consecutive ancestors of this node,\n\t * beginning from {@link module:engine/view/node~Node#root root}, down to this node's index.\n\t *\n\t * ```ts\n\t * const abc = downcastWriter.createText( 'abc' );\n\t * const foo = downcastWriter.createText( 'foo' );\n\t * const h1 = downcastWriter.createElement( 'h1', null, downcastWriter.createText( 'header' ) );\n\t * const p = downcastWriter.createElement( 'p', null, [ abc, foo ] );\n\t * const div = downcastWriter.createElement( 'div', null, [ h1, p ] );\n\t * foo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t * h1.getPath(); // Returns [ 0 ].\n\t * div.getPath(); // Returns [].\n\t * ```\n\t *\n\t * @returns The path.\n\t */ getPath() {\n        const path = [];\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n        let node = this;\n        while(node.parent){\n            path.unshift(node.index);\n            node = node.parent;\n        }\n        return path;\n    }\n    /**\n\t * Returns ancestors array of this node.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this node will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from node's parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */ getAncestors(options = {}) {\n        const ancestors = [];\n        let parent = options.includeSelf ? this : this.parent;\n        while(parent){\n            ancestors[options.parentFirst ? 'push' : 'unshift'](parent);\n            parent = parent.parent;\n        }\n        return ancestors;\n    }\n    /**\n\t * Returns a {@link module:engine/view/element~Element} or {@link module:engine/view/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both nodes.\n\t *\n\t * @param node The second node.\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` both nodes will be considered \"ancestors\" too.\n\t * Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t */ getCommonAncestor(node, options = {}) {\n        const ancestorsA = this.getAncestors(options);\n        const ancestorsB = node.getAncestors(options);\n        let i = 0;\n        while(ancestorsA[i] == ancestorsB[i] && ancestorsA[i]){\n            i++;\n        }\n        return i === 0 ? null : ancestorsA[i - 1];\n    }\n    /**\n\t * Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/view/documentfragment~DocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */ isBefore(node) {\n        // Given node is not before this node if they are same.\n        if (this == node) {\n            return false;\n        }\n        // Return `false` if it is impossible to compare nodes.\n        if (this.root !== node.root) {\n            return false;\n        }\n        const thisPath = this.getPath();\n        const nodePath = node.getPath();\n        const result = compareArrays(thisPath, nodePath);\n        switch(result){\n            case 'prefix':\n                return true;\n            case 'extension':\n                return false;\n            default:\n                return thisPath[result] < nodePath[result];\n        }\n    }\n    /**\n\t * Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/view/documentfragment~DocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */ isAfter(node) {\n        // Given node is not before this node if they are same.\n        if (this == node) {\n            return false;\n        }\n        // Return `false` if it is impossible to compare nodes.\n        if (this.root !== node.root) {\n            return false;\n        }\n        // In other cases, just check if the `node` is before, and return the opposite.\n        return !this.isBefore(node);\n    }\n    /**\n\t * Removes node from parent.\n\t *\n\t * @internal\n\t */ _remove() {\n        this.parent._removeChildren(this.index);\n    }\n    /**\n\t * @internal\n\t * @param type Type of the change.\n\t * @param node Changed node.\n\t * @fires change\n\t */ _fireChange(type, node) {\n        this.fire(`change:${type}`, node);\n        if (this.parent) {\n            this.parent._fireChange(type, node);\n        }\n    }\n    /**\n\t * Custom toJSON method to solve child-parent circular dependencies.\n\t *\n\t * @returns Clone of this object with the parent property removed.\n\t */ toJSON() {\n        const json = clone(this);\n        // Due to circular references we need to remove parent reference.\n        delete json.parent;\n        return json;\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nNode$2.prototype.is = function(type) {\n    return type === 'node' || type === 'view:node';\n};\n\n/**\n * Tree view text node.\n *\n * The constructor of this class should not be used directly. To create a new text node instance\n * use the {@link module:engine/view/downcastwriter~DowncastWriter#createText `DowncastWriter#createText()`}\n * method when working on data downcasted from the model or the\n * {@link module:engine/view/upcastwriter~UpcastWriter#createText `UpcastWriter#createText()`}\n * method when working on non-semantic views.\n */ let Text$1 = class Text extends Node$2 {\n    /**\n\t * The text content.\n\t *\n\t * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.\n\t */ _textData;\n    /**\n\t * Creates a tree view text node.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createText\n\t * @internal\n\t * @param document The document instance to which this text node belongs.\n\t * @param data The text's data.\n\t */ constructor(document, data){\n        super(document);\n        this._textData = data;\n    }\n    /**\n\t * The text content.\n\t */ get data() {\n        return this._textData;\n    }\n    /**\n\t * The `_data` property is controlled by a getter and a setter.\n\t *\n\t * The getter is required when using the addition assignment operator on protected property:\n\t *\n\t * ```ts\n\t * const foo = downcastWriter.createText( 'foo' );\n\t * const bar = downcastWriter.createText( 'bar' );\n\t *\n\t * foo._data += bar.data;   // executes: `foo._data = foo._data + bar.data`\n\t * console.log( foo.data ); // prints: 'foobar'\n\t * ```\n\t *\n\t * If the protected getter didn't exist, `foo._data` will return `undefined` and result of the merge will be invalid.\n\t *\n\t * The setter sets data and fires the {@link module:engine/view/node~Node#event:change:text change event}.\n\t *\n\t * @internal\n\t */ get _data() {\n        return this.data;\n    }\n    set _data(data) {\n        this._fireChange('text', this);\n        this._textData = data;\n    }\n    /**\n\t * Checks if this text node is similar to other text node.\n\t * Both nodes should have the same data to be considered as similar.\n\t *\n\t * @param otherNode Node to check if it is same as this node.\n\t */ isSimilar(otherNode) {\n        if (!(otherNode instanceof Text)) {\n            return false;\n        }\n        return this === otherNode || this.data === otherNode.data;\n    }\n    /**\n\t * Clones this node.\n\t *\n\t * @internal\n\t * @returns Text node that is a clone of this node.\n\t */ _clone() {\n        return new Text(this.document, this.data);\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nText$1.prototype.is = function(type) {\n    return type === '$text' || type === 'view:$text' || // This are legacy values kept for backward compatibility.\n    type === 'text' || type === 'view:text' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n    type === 'node' || type === 'view:node';\n};\n\n/**\n * TextProxy is a wrapper for substring of {@link module:engine/view/text~Text}. Instance of this class is created by\n * {@link module:engine/view/treewalker~TreeWalker} when only a part of {@link module:engine/view/text~Text} needs to be returned.\n *\n * `TextProxy` has an API similar to {@link module:engine/view/text~Text Text} and allows to do most of the common tasks performed\n * on view nodes.\n *\n * **Note:** Some `TextProxy` instances may represent whole text node, not just a part of it.\n * See {@link module:engine/view/textproxy~TextProxy#isPartial}.\n *\n * **Note:** `TextProxy` is a readonly interface.\n *\n * **Note:** `TextProxy` instances are created on the fly basing on the current state of parent {@link module:engine/view/text~Text}.\n * Because of this it is highly unrecommended to store references to `TextProxy instances because they might get\n * invalidated due to operations on Document. Also TextProxy is not a {@link module:engine/view/node~Node} so it can not be\n * inserted as a child of {@link module:engine/view/element~Element}.\n *\n * `TextProxy` instances are created by {@link module:engine/view/treewalker~TreeWalker view tree walker}. You should not need to create\n * an instance of this class by your own.\n */ let TextProxy$1 = class TextProxy extends TypeCheckable$1 {\n    /**\n\t * Reference to the {@link module:engine/view/text~Text} element which TextProxy is a substring.\n\t */ textNode;\n    /**\n\t * Text data represented by this text proxy.\n\t */ data;\n    /**\n\t * Offset in the `textNode` where this `TextProxy` instance starts.\n\t */ offsetInText;\n    /**\n\t * Creates a text proxy.\n\t *\n\t * @internal\n\t * @param textNode Text node which part is represented by this text proxy.\n\t * @param offsetInText Offset in {@link module:engine/view/textproxy~TextProxy#textNode text node}\n\t * from which the text proxy starts.\n\t * @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t * @constructor\n\t */ constructor(textNode, offsetInText, length){\n        super();\n        this.textNode = textNode;\n        if (offsetInText < 0 || offsetInText > textNode.data.length) {\n            /**\n\t\t\t * Given offsetInText value is incorrect.\n\t\t\t *\n\t\t\t * @error view-textproxy-wrong-offsetintext\n\t\t\t */ throw new CKEditorError('view-textproxy-wrong-offsetintext', this);\n        }\n        if (length < 0 || offsetInText + length > textNode.data.length) {\n            /**\n\t\t\t * Given length value is incorrect.\n\t\t\t *\n\t\t\t * @error view-textproxy-wrong-length\n\t\t\t */ throw new CKEditorError('view-textproxy-wrong-length', this);\n        }\n        this.data = textNode.data.substring(offsetInText, offsetInText + length);\n        this.offsetInText = offsetInText;\n    }\n    /**\n\t * Offset size of this node.\n\t */ get offsetSize() {\n        return this.data.length;\n    }\n    /**\n\t * Flag indicating whether `TextProxy` instance covers only part of the original {@link module:engine/view/text~Text text node}\n\t * (`true`) or the whole text node (`false`).\n\t *\n\t * This is `false` when text proxy starts at the very beginning of {@link module:engine/view/textproxy~TextProxy#textNode textNode}\n\t * ({@link module:engine/view/textproxy~TextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t * text node size.\n\t */ get isPartial() {\n        return this.data.length !== this.textNode.data.length;\n    }\n    /**\n\t * Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t */ get parent() {\n        return this.textNode.parent;\n    }\n    /**\n\t * Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t */ get root() {\n        return this.textNode.root;\n    }\n    /**\n\t * {@link module:engine/view/document~Document View document} that owns this text proxy, or `null` if the text proxy is inside\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment}.\n\t */ get document() {\n        return this.textNode.document;\n    }\n    /**\n\t * Returns ancestors array of this text proxy.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true`, textNode will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from text proxy parent to\n\t * root element, otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */ getAncestors(options = {}) {\n        const ancestors = [];\n        let parent = options.includeSelf ? this.textNode : this.parent;\n        while(parent !== null){\n            ancestors[options.parentFirst ? 'push' : 'unshift'](parent);\n            parent = parent.parent;\n        }\n        return ancestors;\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nTextProxy$1.prototype.is = function(type) {\n    return type === '$textProxy' || type === 'view:$textProxy' || // This are legacy values kept for backward compatibility.\n    type === 'textProxy' || type === 'view:textProxy';\n};\n\n/**\n * View matcher class.\n * Instance of this class can be used to find {@link module:engine/view/element~Element elements} that match given pattern.\n */ class Matcher {\n    _patterns = [];\n    /**\n\t * Creates new instance of Matcher.\n\t *\n\t * @param pattern Match patterns. See {@link module:engine/view/matcher~Matcher#add add method} for more information.\n\t */ constructor(...pattern){\n        this.add(...pattern);\n    }\n    /**\n\t * Adds pattern or patterns to matcher instance.\n\t *\n\t * ```ts\n\t * // String.\n\t * matcher.add( 'div' );\n\t *\n\t * // Regular expression.\n\t * matcher.add( /^\\w/ );\n\t *\n\t * // Single class.\n\t * matcher.add( {\n\t * \tclasses: 'foobar'\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/view/matcher~MatcherPattern} for more examples.\n\t *\n\t * Multiple patterns can be added in one call:\n\t *\n\t * ```ts\n\t * matcher.add( 'div', { classes: 'foobar' } );\n\t * ```\n\t *\n\t * @param pattern Object describing pattern details. If string or regular expression\n\t * is provided it will be used to match element's name. Pattern can be also provided in a form\n\t * of a function - then this function will be called with each {@link module:engine/view/element~Element element} as a parameter.\n\t * Function's return value will be stored under `match` key of the object returned from\n\t * {@link module:engine/view/matcher~Matcher#match match} or {@link module:engine/view/matcher~Matcher#matchAll matchAll} methods.\n\t */ add(...pattern) {\n        for (let item of pattern){\n            // String or RegExp pattern is used as element's name.\n            if (typeof item == 'string' || item instanceof RegExp) {\n                item = {\n                    name: item\n                };\n            }\n            this._patterns.push(item);\n        }\n    }\n    /**\n\t * Matches elements for currently stored patterns. Returns match information about first found\n\t * {@link module:engine/view/element~Element element}, otherwise returns `null`.\n\t *\n\t * Example of returned object:\n\t *\n\t * ```ts\n\t * {\n\t * \telement: <instance of found element>,\n\t * \tpattern: <pattern used to match found element>,\n\t * \tmatch: {\n\t * \t\tname: true,\n\t * \t\tattributes: [ 'title', 'href' ],\n\t * \t\tclasses: [ 'foo' ],\n\t * \t\tstyles: [ 'color', 'position' ]\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * @see module:engine/view/matcher~Matcher#add\n\t * @see module:engine/view/matcher~Matcher#matchAll\n\t * @param element View element to match against stored patterns.\n\t */ match(...element) {\n        for (const singleElement of element){\n            for (const pattern of this._patterns){\n                const match = isElementMatching(singleElement, pattern);\n                if (match) {\n                    return {\n                        element: singleElement,\n                        pattern,\n                        match\n                    };\n                }\n            }\n        }\n        return null;\n    }\n    /**\n\t * Matches elements for currently stored patterns. Returns array of match information with all found\n\t * {@link module:engine/view/element~Element elements}. If no element is found - returns `null`.\n\t *\n\t * @see module:engine/view/matcher~Matcher#add\n\t * @see module:engine/view/matcher~Matcher#match\n\t * @param element View element to match against stored patterns.\n\t * @returns Array with match information about found elements or `null`. For more information\n\t * see {@link module:engine/view/matcher~Matcher#match match method} description.\n\t */ matchAll(...element) {\n        const results = [];\n        for (const singleElement of element){\n            for (const pattern of this._patterns){\n                const match = isElementMatching(singleElement, pattern);\n                if (match) {\n                    results.push({\n                        element: singleElement,\n                        pattern,\n                        match\n                    });\n                }\n            }\n        }\n        return results.length > 0 ? results : null;\n    }\n    /**\n\t * Returns the name of the element to match if there is exactly one pattern added to the matcher instance\n\t * and it matches element name defined by `string` (not `RegExp`). Otherwise, returns `null`.\n\t *\n\t * @returns Element name trying to match.\n\t */ getElementName() {\n        if (this._patterns.length !== 1) {\n            return null;\n        }\n        const pattern = this._patterns[0];\n        const name = pattern.name;\n        return typeof pattern != 'function' && name && !(name instanceof RegExp) ? name : null;\n    }\n}\n/**\n * Returns match information if {@link module:engine/view/element~Element element} is matching provided pattern.\n * If element cannot be matched to provided pattern - returns `null`.\n *\n * @returns Returns object with match information or null if element is not matching.\n */ function isElementMatching(element, pattern) {\n    // If pattern is provided as function - return result of that function;\n    if (typeof pattern == 'function') {\n        return pattern(element);\n    }\n    const match = {};\n    // Check element's name.\n    if (pattern.name) {\n        match.name = matchName(pattern.name, element.name);\n        if (!match.name) {\n            return null;\n        }\n    }\n    // Check element's attributes.\n    if (pattern.attributes) {\n        match.attributes = matchAttributes(pattern.attributes, element);\n        if (!match.attributes) {\n            return null;\n        }\n    }\n    // Check element's classes.\n    if (pattern.classes) {\n        match.classes = matchClasses(pattern.classes, element);\n        if (!match.classes) {\n            return null;\n        }\n    }\n    // Check element's styles.\n    if (pattern.styles) {\n        match.styles = matchStyles(pattern.styles, element);\n        if (!match.styles) {\n            return null;\n        }\n    }\n    return match;\n}\n/**\n * Checks if name can be matched by provided pattern.\n *\n * @returns Returns `true` if name can be matched, `false` otherwise.\n */ function matchName(pattern, name) {\n    // If pattern is provided as RegExp - test against this regexp.\n    if (pattern instanceof RegExp) {\n        return !!name.match(pattern);\n    }\n    return pattern === name;\n}\n/**\n * Checks if an array of key/value pairs can be matched against provided patterns.\n *\n * Patterns can be provided in a following ways:\n * - a boolean value matches any attribute with any value (or no value):\n *\n * ```ts\n * pattern: true\n * ```\n *\n * - a RegExp expression or object matches any attribute name:\n *\n * ```ts\n * pattern: /h[1-6]/\n * ```\n *\n * - an object matches any attribute that has the same name as the object item's key, where object item's value is:\n * \t- equal to `true`, which matches any attribute value:\n *\n * ```ts\n * pattern: {\n * \trequired: true\n * }\n * ```\n *\n * \t- a string that is equal to attribute value:\n *\n * ```ts\n * pattern: {\n * \trel: 'nofollow'\n * }\n * ```\n *\n * \t- a regular expression that matches attribute value,\n *\n * ```ts\n * pattern: {\n * \tsrc: /^https/\n * }\n * ```\n *\n * - an array with items, where the item is:\n * \t- a string that is equal to attribute value:\n *\n * ```ts\n * pattern: [ 'data-property-1', 'data-property-2' ],\n * ```\n *\n * \t- an object with `key` and `value` property, where `key` is a regular expression matching attribute name and\n * \t\t`value` is either regular expression matching attribute value or a string equal to attribute value:\n *\n * ```ts\n * pattern: [\n * \t{ key: /^data-property-/, value: true },\n * \t// or:\n * \t{ key: /^data-property-/, value: 'foobar' },\n * \t// or:\n * \t{ key: /^data-property-/, value: /^foo/ }\n * ]\n * ```\n *\n * @param patterns Object with information about attributes to match.\n * @param keys Attribute, style or class keys.\n * @param valueGetter A function providing value for a given item key.\n * @returns Returns array with matched attribute names or `null` if no attributes were matched.\n */ function matchPatterns(patterns, keys, valueGetter) {\n    const normalizedPatterns = normalizePatterns(patterns);\n    const normalizedItems = Array.from(keys);\n    const match = [];\n    normalizedPatterns.forEach(([patternKey, patternValue])=>{\n        normalizedItems.forEach((itemKey)=>{\n            if (isKeyMatched(patternKey, itemKey) && isValueMatched(patternValue, itemKey, valueGetter)) {\n                match.push(itemKey);\n            }\n        });\n    });\n    // Return matches only if there are at least as many of them as there are patterns.\n    // The RegExp pattern can match more than one item.\n    if (!normalizedPatterns.length || match.length < normalizedPatterns.length) {\n        return undefined;\n    }\n    return match;\n}\n/**\n * Bring all the possible pattern forms to an array of arrays where first item is a key and second is a value.\n *\n * Examples:\n *\n * Boolean pattern value:\n *\n * ```ts\n * true\n * ```\n *\n * to\n *\n * ```ts\n * [ [ true, true ] ]\n * ```\n *\n * Textual pattern value:\n *\n * ```ts\n * 'attribute-name-or-class-or-style'\n * ```\n *\n * to\n *\n * ```ts\n * [ [ 'attribute-name-or-class-or-style', true ] ]\n * ```\n *\n * Regular expression:\n *\n * ```ts\n * /^data-.*$/\n * ```\n *\n * to\n *\n * ```ts\n * [ [ /^data-.*$/, true ] ]\n * ```\n *\n * Objects (plain or with `key` and `value` specified explicitly):\n *\n * ```ts\n * {\n * \tsrc: /^https:.*$/\n * }\n * ```\n *\n * or\n *\n * ```ts\n * [ {\n * \tkey: 'src',\n * \tvalue: /^https:.*$/\n * } ]\n * ```\n *\n * to:\n *\n * ```ts\n * [ [ 'src', /^https:.*$/ ] ]\n * ```\n *\n * @returns Returns an array of objects or null if provided patterns were not in an expected form.\n */ function normalizePatterns(patterns) {\n    if (Array.isArray(patterns)) {\n        return patterns.map((pattern)=>{\n            if (isPlainObject(pattern)) {\n                if (pattern.key === undefined || pattern.value === undefined) {\n                    // Documented at the end of matcher.js.\n                    logWarning('matcher-pattern-missing-key-or-value', pattern);\n                }\n                return [\n                    pattern.key,\n                    pattern.value\n                ];\n            }\n            // Assume the pattern is either String or RegExp.\n            return [\n                pattern,\n                true\n            ];\n        });\n    }\n    if (isPlainObject(patterns)) {\n        return Object.entries(patterns);\n    }\n    // Other cases (true, string or regexp).\n    return [\n        [\n            patterns,\n            true\n        ]\n    ];\n}\n/**\n * @param patternKey A pattern representing a key we want to match.\n * @param itemKey An actual item key (e.g. `'src'`, `'background-color'`, `'ck-widget'`) we're testing against pattern.\n */ function isKeyMatched(patternKey, itemKey) {\n    return patternKey === true || patternKey === itemKey || patternKey instanceof RegExp && itemKey.match(patternKey);\n}\n/**\n * @param patternValue A pattern representing a value we want to match.\n * @param itemKey An item key, e.g. `background`, `href`, 'rel', etc.\n * @param valueGetter A function used to provide a value for a given `itemKey`.\n */ function isValueMatched(patternValue, itemKey, valueGetter) {\n    if (patternValue === true) {\n        return true;\n    }\n    const itemValue = valueGetter(itemKey);\n    // For now, the reducers are not returning the full tree of properties.\n    // Casting to string preserves the old behavior until the root cause is fixed.\n    // More can be found in https://github.com/ckeditor/ckeditor5/issues/10399.\n    return patternValue === itemValue || patternValue instanceof RegExp && !!String(itemValue).match(patternValue);\n}\n/**\n * Checks if attributes of provided element can be matched against provided patterns.\n *\n * @param patterns Object with information about attributes to match. Each key of the object will be\n * used as attribute name. Value of each key can be a string or regular expression to match against attribute value.\n * @param  element Element which attributes will be tested.\n * @returns Returns array with matched attribute names or `null` if no attributes were matched.\n */ function matchAttributes(patterns, element) {\n    const attributeKeys = new Set(element.getAttributeKeys());\n    // `style` and `class` attribute keys are deprecated. Only allow them in object pattern\n    // for backward compatibility.\n    if (isPlainObject(patterns)) {\n        if (patterns.style !== undefined) {\n            // Documented at the end of matcher.js.\n            logWarning('matcher-pattern-deprecated-attributes-style-key', patterns);\n        }\n        if (patterns.class !== undefined) {\n            // Documented at the end of matcher.js.\n            logWarning('matcher-pattern-deprecated-attributes-class-key', patterns);\n        }\n    } else {\n        attributeKeys.delete('style');\n        attributeKeys.delete('class');\n    }\n    return matchPatterns(patterns, attributeKeys, (key)=>element.getAttribute(key));\n}\n/**\n * Checks if classes of provided element can be matched against provided patterns.\n *\n * @param patterns Array of strings or regular expressions to match against element's classes.\n * @param element Element which classes will be tested.\n * @returns Returns array with matched class names or `null` if no classes were matched.\n */ function matchClasses(patterns, element) {\n    // We don't need `getter` here because patterns for classes are always normalized to `[ className, true ]`.\n    return matchPatterns(patterns, element.getClassNames(), /* istanbul ignore next -- @preserve */ ()=>{});\n}\n/**\n * Checks if styles of provided element can be matched against provided patterns.\n *\n * @param patterns Object with information about styles to match. Each key of the object will be\n * used as style name. Value of each key can be a string or regular expression to match against style value.\n * @param element Element which styles will be tested.\n * @returns Returns array with matched style names or `null` if no styles were matched.\n */ function matchStyles(patterns, element) {\n    return matchPatterns(patterns, element.getStyleNames(true), (key)=>element.getStyle(key));\n}\n /**\n * The key-value matcher pattern is missing key or value. Both must be present.\n * Refer the documentation: {@link module:engine/view/matcher~MatcherPattern}.\n *\n * @param pattern Pattern with missing properties.\n * @error matcher-pattern-missing-key-or-value\n */  /**\n * The key-value matcher pattern for `attributes` option is using deprecated `style` key.\n *\n * Use `styles` matcher pattern option instead:\n *\n * ```ts\n * // Instead of:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2',\n * \t\tstyle: /^border.*$/\n * \t}\n * }\n *\n * // Use:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2'\n * \t},\n * \tstyles: /^border.*$/\n * }\n * ```\n *\n * Refer to the {@glink updating/guides/update-to-29##update-to-ckeditor-5-v2910 Migration to v29.1.0} guide\n * and {@link module:engine/view/matcher~MatcherPattern} documentation.\n *\n * @param pattern Pattern with missing properties.\n * @error matcher-pattern-deprecated-attributes-style-key\n */  /**\n * The key-value matcher pattern for `attributes` option is using deprecated `class` key.\n *\n * Use `classes` matcher pattern option instead:\n *\n * ```ts\n * // Instead of:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2',\n * \t\tclass: 'foobar'\n * \t}\n * }\n *\n * // Use:\n * const pattern = {\n * \tattributes: {\n * \t\tkey1: 'value1',\n * \t\tkey2: 'value2'\n * \t},\n * \tclasses: 'foobar'\n * }\n * ```\n *\n * Refer to the {@glink updating/guides/update-to-29##update-to-ckeditor-5-v2910 Migration to v29.1.0} guide\n * and the {@link module:engine/view/matcher~MatcherPattern} documentation.\n *\n * @param pattern Pattern with missing properties.\n * @error matcher-pattern-deprecated-attributes-class-key\n */\n\n/**\n * Styles map. Allows handling (adding, removing, retrieving) a set of style rules (usually, of an element).\n */ class StylesMap {\n    /**\n\t * Keeps an internal representation of styles map. Normalized styles are kept as object tree to allow unified modification and\n\t * value access model using lodash's get, set, unset, etc methods.\n\t *\n\t * When no style processor rules are defined it acts as simple key-value storage.\n\t */ _styles;\n    /**\n\t * An instance of the {@link module:engine/view/stylesmap~StylesProcessor}.\n\t */ _styleProcessor;\n    /**\n\t * Creates Styles instance.\n\t */ constructor(styleProcessor){\n        this._styles = {};\n        this._styleProcessor = styleProcessor;\n    }\n    /**\n\t * Returns true if style map has no styles set.\n\t */ get isEmpty() {\n        const entries = Object.entries(this._styles);\n        return !entries.length;\n    }\n    /**\n\t * Number of styles defined.\n\t */ get size() {\n        if (this.isEmpty) {\n            return 0;\n        }\n        return this.getStyleNames().length;\n    }\n    /**\n\t * Set styles map to a new value.\n\t *\n\t * ```ts\n\t * styles.setTo( 'border:1px solid blue;margin-top:1px;' );\n\t * ```\n\t */ setTo(inlineStyle) {\n        this.clear();\n        const parsedStyles = parseInlineStyles(inlineStyle);\n        for (const [key, value] of parsedStyles){\n            this._styleProcessor.toNormalizedForm(key, value, this._styles);\n        }\n    }\n    /**\n\t * Checks if a given style is set.\n\t *\n\t * ```ts\n\t * styles.setTo( 'margin-left:1px;' );\n\t *\n\t * styles.has( 'margin-left' );    // -> true\n\t * styles.has( 'padding' );        // -> false\n\t * ```\n\t *\n\t * **Note**: This check supports normalized style names.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t * styles.setTo( 'margin:2px;' );\n\t *\n\t * styles.has( 'margin' );         // -> true\n\t * styles.has( 'margin-top' );     // -> true\n\t * styles.has( 'margin-left' );    // -> true\n\t *\n\t * styles.remove( 'margin-top' );\n\t *\n\t * styles.has( 'margin' );         // -> false\n\t * styles.has( 'margin-top' );     // -> false\n\t * styles.has( 'margin-left' );    // -> true\n\t * ```\n\t *\n\t * @param name Style name.\n\t */ has(name) {\n        if (this.isEmpty) {\n            return false;\n        }\n        const styles = this._styleProcessor.getReducedForm(name, this._styles);\n        const propertyDescriptor = styles.find(([property])=>property === name);\n        // Only return a value if it is set;\n        return Array.isArray(propertyDescriptor);\n    }\n    set(nameOrObject, valueOrObject) {\n        if (isObject(nameOrObject)) {\n            for (const [key, value] of Object.entries(nameOrObject)){\n                this._styleProcessor.toNormalizedForm(key, value, this._styles);\n            }\n        } else {\n            this._styleProcessor.toNormalizedForm(nameOrObject, valueOrObject, this._styles);\n        }\n    }\n    /**\n\t * Removes given style.\n\t *\n\t * ```ts\n\t * styles.setTo( 'background:#f00;margin-right:2px;' );\n\t *\n\t * styles.remove( 'background' );\n\t *\n\t * styles.toString();   // -> 'margin-right:2px;'\n\t * ```\n\t *\n\t * ***Note**:* This method uses {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules\n\t * enabled style processor rules} to normalize passed values.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t * styles.setTo( 'margin:1px' );\n\t *\n\t * styles.remove( 'margin-top' );\n\t * styles.remove( 'margin-right' );\n\t *\n\t * styles.toString(); // -> 'margin-bottom:1px;margin-left:1px;'\n\t * ```\n\t *\n\t * @param name Style name.\n\t */ remove(name) {\n        const path = toPath(name);\n        unset(this._styles, path);\n        delete this._styles[name];\n        this._cleanEmptyObjectsOnPath(path);\n    }\n    /**\n\t * Returns a normalized style object or a single value.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px 2px 3em;' );\n\t *\n\t * styles.getNormalized( 'margin' );\n\t * // will log:\n\t * // {\n\t * //     top: '1px',\n\t * //     right: '2px',\n\t * //     bottom: '3em',\n\t * //     left: '2px'     // normalized value from margin shorthand\n\t * // }\n\t *\n\t * styles.getNormalized( 'margin-left' ); // -> '2px'\n\t * ```\n\t *\n\t * **Note**: This method will only return normalized styles if a style processor was defined.\n\t *\n\t * @param name Style name.\n\t */ getNormalized(name) {\n        return this._styleProcessor.getNormalized(name, this._styles);\n    }\n    /**\n\t * Returns a normalized style string. Styles are sorted by name.\n\t *\n\t * ```ts\n\t * styles.set( 'margin' , '1px' );\n\t * styles.set( 'background', '#f00' );\n\t *\n\t * styles.toString(); // -> 'background:#f00;margin:1px;'\n\t * ```\n\t *\n\t * **Note**: This method supports normalized styles if defined.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t * styles.set( 'margin' , '1px' );\n\t * styles.set( 'background', '#f00' );\n\t * styles.remove( 'margin-top' );\n\t * styles.remove( 'margin-right' );\n\t *\n\t * styles.toString(); // -> 'background:#f00;margin-bottom:1px;margin-left:1px;'\n\t * ```\n\t */ toString() {\n        if (this.isEmpty) {\n            return '';\n        }\n        return this.getStylesEntries().map((arr)=>arr.join(':')).sort().join(';') + ';';\n    }\n    /**\n\t * Returns property as a value string or undefined if property is not set.\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t * styles.set( 'margin-bottom', '3em' );\n\t *\n\t * styles.getAsString( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t * ```\n\t *\n\t * Note, however, that all sub-values must be set for the longhand property name to return a value:\n\t *\n\t * ```ts\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t * styles.remove( 'margin-bottom' );\n\t *\n\t * styles.getAsString( 'margin' ); // -> undefined\n\t * ```\n\t *\n\t * In the above scenario, it is not possible to return a `margin` value, so `undefined` is returned.\n\t * Instead, you should use:\n\t *\n\t * ```ts\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t * styles.remove( 'margin-bottom' );\n\t *\n\t * for ( const styleName of styles.getStyleNames() ) {\n\t * \tconsole.log( styleName, styles.getAsString( styleName ) );\n\t * }\n\t * // 'margin-top', '1px'\n\t * // 'margin-right', '1px'\n\t * // 'margin-left', '1px'\n\t * ```\n\t *\n\t * In general, it is recommend to iterate over style names like in the example above. This way, you will always get all\n\t * the currently set style values. So, if all the 4 margin values would be set\n\t * the for-of loop above would yield only `'margin'`, `'1px'`:\n\t *\n\t * ```ts\n\t * const styles = new Styles();\n\t * styles.setTo( 'margin:1px;' );\n\t *\n\t * for ( const styleName of styles.getStyleNames() ) {\n\t * \tconsole.log( styleName, styles.getAsString( styleName ) );\n\t * }\n\t * // 'margin', '1px'\n\t * ```\n\t *\n\t * **Note**: To get a normalized version of a longhand property use the {@link #getNormalized `#getNormalized()`} method.\n\t */ getAsString(propertyName) {\n        if (this.isEmpty) {\n            return;\n        }\n        if (this._styles[propertyName] && !isObject(this._styles[propertyName])) {\n            // Try return styles set directly - values that are not parsed.\n            return this._styles[propertyName];\n        }\n        const styles = this._styleProcessor.getReducedForm(propertyName, this._styles);\n        const propertyDescriptor = styles.find(([property])=>property === propertyName);\n        // Only return a value if it is set;\n        if (Array.isArray(propertyDescriptor)) {\n            return propertyDescriptor[1];\n        }\n    }\n    /**\n\t * Returns all style properties names as they would appear when using {@link #toString `#toString()`}.\n\t *\n\t * When `expand` is set to true and there's a shorthand style property set, it will also return all equivalent styles:\n\t *\n\t * ```ts\n\t * stylesMap.setTo( 'margin: 1em' )\n\t * ```\n\t *\n\t * will be expanded to:\n\t *\n\t * ```ts\n\t * [ 'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ]\n\t * ```\n\t *\n\t * @param expand Expand shorthand style properties and all return equivalent style representations.\n\t */ getStyleNames(expand = false) {\n        if (this.isEmpty) {\n            return [];\n        }\n        if (expand) {\n            return this._styleProcessor.getStyleNames(this._styles);\n        }\n        const entries = this.getStylesEntries();\n        return entries.map(([key])=>key);\n    }\n    /**\n\t * Removes all styles.\n\t */ clear() {\n        this._styles = {};\n    }\n    /**\n\t * Returns normalized styles entries for further processing.\n\t */ getStylesEntries() {\n        const parsed = [];\n        const keys = Object.keys(this._styles);\n        for (const key of keys){\n            parsed.push(...this._styleProcessor.getReducedForm(key, this._styles));\n        }\n        return parsed;\n    }\n    /**\n\t * Removes empty objects upon removing an entry from internal object.\n\t */ _cleanEmptyObjectsOnPath(path) {\n        const pathParts = path.split('.');\n        const isChildPath = pathParts.length > 1;\n        if (!isChildPath) {\n            return;\n        }\n        const parentPath = pathParts.splice(0, pathParts.length - 1).join('.');\n        const parentObject = get(this._styles, parentPath);\n        if (!parentObject) {\n            return;\n        }\n        const isParentEmpty = !Object.keys(parentObject).length;\n        if (isParentEmpty) {\n            this.remove(parentPath);\n        }\n    }\n}\n/**\n * Style processor is responsible for writing and reading a normalized styles object.\n */ class StylesProcessor {\n    _normalizers;\n    _extractors;\n    _reducers;\n    _consumables;\n    /**\n\t * Creates StylesProcessor instance.\n\t *\n\t * @internal\n\t */ constructor(){\n        this._normalizers = new Map();\n        this._extractors = new Map();\n        this._reducers = new Map();\n        this._consumables = new Map();\n    }\n    /**\n\t * Parse style string value to a normalized object and appends it to styles object.\n\t *\n\t * ```ts\n\t * const styles = {};\n\t *\n\t * stylesProcessor.toNormalizedForm( 'margin', '1px', styles );\n\t *\n\t * // styles will consist: { margin: { top: '1px', right: '1px', bottom: '1px', left: '1px; } }\n\t * ```\n\t *\n\t * **Note**: To define normalizer callbacks use {@link #setNormalizer}.\n\t *\n\t * @param name Name of style property.\n\t * @param propertyValue Value of style property.\n\t * @param styles Object holding normalized styles.\n\t */ toNormalizedForm(name, propertyValue, styles) {\n        if (isObject(propertyValue)) {\n            appendStyleValue(styles, toPath(name), propertyValue);\n            return;\n        }\n        if (this._normalizers.has(name)) {\n            const normalizer = this._normalizers.get(name);\n            const { path, value } = normalizer(propertyValue);\n            appendStyleValue(styles, path, value);\n        } else {\n            appendStyleValue(styles, name, propertyValue);\n        }\n    }\n    /**\n\t * Returns a normalized version of a style property.\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tmargin: { top: '1px', right: '1px', bottom: '1px', left: '1px; },\n\t * \tbackground: { color: '#f00' }\n\t * };\n\t *\n\t * stylesProcessor.getNormalized( 'background' );\n\t * // will return: { color: '#f00' }\n\t *\n\t * stylesProcessor.getNormalized( 'margin-top' );\n\t * // will return: '1px'\n\t * ```\n\t *\n\t * **Note**: In some cases extracting single value requires defining an extractor callback {@link #setExtractor}.\n\t *\n\t * @param name Name of style property.\n\t * @param styles Object holding normalized styles.\n\t */ getNormalized(name, styles) {\n        if (!name) {\n            return merge({}, styles);\n        }\n        // Might be empty string.\n        if (styles[name] !== undefined) {\n            return styles[name];\n        }\n        if (this._extractors.has(name)) {\n            const extractor = this._extractors.get(name);\n            if (typeof extractor === 'string') {\n                return get(styles, extractor);\n            }\n            const value = extractor(name, styles);\n            if (value) {\n                return value;\n            }\n        }\n        return get(styles, toPath(name));\n    }\n    /**\n\t * Returns a reduced form of style property form normalized object.\n\t *\n\t * For default margin reducer, the below code:\n\t *\n\t * ```ts\n\t * stylesProcessor.getReducedForm( 'margin', {\n\t * \tmargin: { top: '1px', right: '1px', bottom: '2px', left: '1px; }\n\t * } );\n\t * ```\n\t *\n\t * will return:\n\t *\n\t * ```ts\n\t * [\n\t * \t[ 'margin', '1px 1px 2px' ]\n\t * ]\n\t * ```\n\t *\n\t * because it might be represented as a shorthand 'margin' value. However if one of margin long hand values is missing it should return:\n\t *\n\t * ```ts\n\t * [\n\t * \t[ 'margin-top', '1px' ],\n\t * \t[ 'margin-right', '1px' ],\n\t * \t[ 'margin-bottom', '2px' ]\n\t * \t// the 'left' value is missing - cannot use 'margin' shorthand.\n\t * ]\n\t * ```\n\t *\n\t * **Note**: To define reducer callbacks use {@link #setReducer}.\n\t *\n\t * @param name Name of style property.\n\t */ getReducedForm(name, styles) {\n        const normalizedValue = this.getNormalized(name, styles);\n        // Might be empty string.\n        if (normalizedValue === undefined) {\n            return [];\n        }\n        if (this._reducers.has(name)) {\n            const reducer = this._reducers.get(name);\n            return reducer(normalizedValue);\n        }\n        return [\n            [\n                name,\n                normalizedValue\n            ]\n        ];\n    }\n    /**\n\t * Return all style properties. Also expand shorthand properties (e.g. `margin`, `background`) if respective extractor is available.\n\t *\n\t * @param styles Object holding normalized styles.\n\t */ getStyleNames(styles) {\n        // Find all extractable styles that have a value.\n        const expandedStyleNames = Array.from(this._consumables.keys()).filter((name)=>{\n            const style = this.getNormalized(name, styles);\n            if (style && typeof style == 'object') {\n                return Object.keys(style).length;\n            }\n            return style;\n        });\n        // For simple styles (for example `color`) we don't have a map of those styles\n        // but they are 1 to 1 with normalized object keys.\n        const styleNamesKeysSet = new Set([\n            ...expandedStyleNames,\n            ...Object.keys(styles)\n        ]);\n        return Array.from(styleNamesKeysSet);\n    }\n    /**\n\t * Returns related style names.\n\t *\n\t * ```ts\n\t * stylesProcessor.getRelatedStyles( 'margin' );\n\t * // will return: [ 'margin-top', 'margin-right', 'margin-bottom', 'margin-left' ];\n\t *\n\t * stylesProcessor.getRelatedStyles( 'margin-top' );\n\t * // will return: [ 'margin' ];\n\t * ```\n\t *\n\t * **Note**: To define new style relations load an existing style processor or use\n\t * {@link module:engine/view/stylesmap~StylesProcessor#setStyleRelation `StylesProcessor.setStyleRelation()`}.\n\t */ getRelatedStyles(name) {\n        return this._consumables.get(name) || [];\n    }\n    /**\n\t * Adds a normalizer method for a style property.\n\t *\n\t * A normalizer returns describing how the value should be normalized.\n\t *\n\t * For instance 'margin' style is a shorthand for four margin values:\n\t *\n\t * - 'margin-top'\n\t * - 'margin-right'\n\t * - 'margin-bottom'\n\t * - 'margin-left'\n\t *\n\t * and can be written in various ways if some values are equal to others. For instance `'margin: 1px 2em;'` is a shorthand for\n\t * `'margin-top: 1px;margin-right: 2em;margin-bottom: 1px;margin-left: 2em'`.\n\t *\n\t * A normalizer should parse various margin notations as a single object:\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tmargin: {\n\t * \t\ttop: '1px',\n\t * \t\tright: '2em',\n\t * \t\tbottom: '1px',\n\t * \t\tleft: '2em'\n\t * \t}\n\t * };\n\t * ```\n\t *\n\t * Thus a normalizer for 'margin' style should return an object defining style path and value to store:\n\t *\n\t * ```ts\n\t * const returnValue = {\n\t * \tpath: 'margin',\n\t * \tvalue: {\n\t * \t\ttop: '1px',\n\t * \t\tright: '2em',\n\t * \t\tbottom: '1px',\n\t * \t\tleft: '2em'\n\t * \t}\n\t * };\n\t * ```\n\t *\n\t * Additionally to fully support all margin notations there should be also defined 4 normalizers for longhand margin notations. Below\n\t * is an example for 'margin-top' style property normalizer:\n\t *\n\t * ```ts\n\t * stylesProcessor.setNormalizer( 'margin-top', valueString => {\n\t * \treturn {\n\t * \t\tpath: 'margin.top',\n\t * \t\tvalue: valueString\n\t * \t}\n\t * } );\n\t * ```\n\t */ setNormalizer(name, callback) {\n        this._normalizers.set(name, callback);\n    }\n    /**\n\t * Adds a extractor callback for a style property.\n\t *\n\t * Most normalized style values are stored as one level objects. It is assumed that `'margin-top'` style will be stored as:\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tmargin: {\n\t * \t\ttop: 'value'\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * However, some styles can have conflicting notations and thus it might be harder to extract a style value from shorthand. For instance\n\t * the 'border-top-style' can be defined using `'border-top:solid'`, `'border-style:solid none none none'` or by `'border:solid'`\n\t * shorthands. The default border styles processors stores styles as:\n\t *\n\t * ```ts\n\t * const styles = {\n\t * \tborder: {\n\t * \t\tstyle: {\n\t * \t\t\ttop: 'solid'\n\t * \t\t}\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * as it is better to modify border style independently from other values. On the other part the output of the border might be\n\t * desired as `border-top`, `border-left`, etc notation.\n\t *\n\t * In the above example an extractor should return a side border value that combines style, color and width:\n\t *\n\t * ```ts\n\t * styleProcessor.setExtractor( 'border-top', styles => {\n\t * \treturn {\n\t * \t\tcolor: styles.border.color.top,\n\t * \t\tstyle: styles.border.style.top,\n\t * \t\twidth: styles.border.width.top\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * @param callbackOrPath Callback that return a requested value or path string for single values.\n\t */ setExtractor(name, callbackOrPath) {\n        this._extractors.set(name, callbackOrPath);\n    }\n    /**\n\t * Adds a reducer callback for a style property.\n\t *\n\t * Reducer returns a minimal notation for given style name. For longhand properties it is not required to write a reducer as\n\t * by default the direct value from style path is taken.\n\t *\n\t * For shorthand styles a reducer should return minimal style notation either by returning single name-value tuple or multiple tuples\n\t * if a shorthand cannot be used. For instance for a margin shorthand a reducer might return:\n\t *\n\t * ```ts\n\t * const marginShortHandTuple = [\n\t * \t[ 'margin', '1px 1px 2px' ]\n\t * ];\n\t * ```\n\t *\n\t * or a longhand tuples for defined values:\n\t *\n\t * ```ts\n\t * // Considering margin.bottom and margin.left are undefined.\n\t * const marginLonghandsTuples = [\n\t * \t[ 'margin-top', '1px' ],\n\t * \t[ 'margin-right', '1px' ]\n\t * ];\n\t * ```\n\t *\n\t * A reducer obtains a normalized style value:\n\t *\n\t * ```ts\n\t * // Simplified reducer that always outputs 4 values which are always present:\n\t * stylesProcessor.setReducer( 'margin', margin => {\n\t * \treturn [\n\t * \t\t[ 'margin', `${ margin.top } ${ margin.right } ${ margin.bottom } ${ margin.left }` ]\n\t * \t]\n\t * } );\n\t * ```\n\t */ setReducer(name, callback) {\n        this._reducers.set(name, callback);\n    }\n    /**\n\t * Defines a style shorthand relation to other style notations.\n\t *\n\t * ```ts\n\t * stylesProcessor.setStyleRelation( 'margin', [\n\t * \t'margin-top',\n\t * \t'margin-right',\n\t * \t'margin-bottom',\n\t * \t'margin-left'\n\t * ] );\n\t * ```\n\t *\n\t * This enables expanding of style names for shorthands. For instance, if defined,\n\t * {@link module:engine/conversion/viewconsumable~ViewConsumable view consumable} items are automatically created\n\t * for long-hand margin style notation alongside the `'margin'` item.\n\t *\n\t * This means that when an element being converted has a style `margin`, a converter for `margin-left` will work just\n\t * fine since the view consumable will contain a consumable `margin-left` item (thanks to the relation) and\n\t * `element.getStyle( 'margin-left' )` will work as well assuming that the style processor was correctly configured.\n\t * However, once `margin-left` is consumed, `margin` will not be consumable anymore.\n\t */ setStyleRelation(shorthandName, styleNames) {\n        this._mapStyleNames(shorthandName, styleNames);\n        for (const alsoName of styleNames){\n            this._mapStyleNames(alsoName, [\n                shorthandName\n            ]);\n        }\n    }\n    /**\n\t * Set two-way binding of style names.\n\t */ _mapStyleNames(name, styleNames) {\n        if (!this._consumables.has(name)) {\n            this._consumables.set(name, []);\n        }\n        this._consumables.get(name).push(...styleNames);\n    }\n}\n/**\n * Parses inline styles and puts property - value pairs into styles map.\n *\n * @param stylesString Styles to parse.\n * @returns Map of parsed properties and values.\n */ function parseInlineStyles(stylesString) {\n    // `null` if no quote was found in input string or last found quote was a closing quote. See below.\n    let quoteType = null;\n    let propertyNameStart = 0;\n    let propertyValueStart = 0;\n    let propertyName = null;\n    const stylesMap = new Map();\n    // Do not set anything if input string is empty.\n    if (stylesString === '') {\n        return stylesMap;\n    }\n    // Fix inline styles that do not end with `;` so they are compatible with algorithm below.\n    if (stylesString.charAt(stylesString.length - 1) != ';') {\n        stylesString = stylesString + ';';\n    }\n    // Seek the whole string for \"special characters\".\n    for(let i = 0; i < stylesString.length; i++){\n        const char = stylesString.charAt(i);\n        if (quoteType === null) {\n            // No quote found yet or last found quote was a closing quote.\n            switch(char){\n                case ':':\n                    // Most of time colon means that property name just ended.\n                    // Sometimes however `:` is found inside property value (for example in background image url).\n                    if (!propertyName) {\n                        // Treat this as end of property only if property name is not already saved.\n                        // Save property name.\n                        propertyName = stylesString.substr(propertyNameStart, i - propertyNameStart);\n                        // Save this point as the start of property value.\n                        propertyValueStart = i + 1;\n                    }\n                    break;\n                case '\"':\n                case '\\'':\n                    // Opening quote found (this is an opening quote, because `quoteType` is `null`).\n                    quoteType = char;\n                    break;\n                case ';':\n                    {\n                        // Property value just ended.\n                        // Use previously stored property value start to obtain property value.\n                        const propertyValue = stylesString.substr(propertyValueStart, i - propertyValueStart);\n                        if (propertyName) {\n                            // Save parsed part.\n                            stylesMap.set(propertyName.trim(), propertyValue.trim());\n                        }\n                        propertyName = null;\n                        // Save this point as property name start. Property name starts immediately after previous property value ends.\n                        propertyNameStart = i + 1;\n                        break;\n                    }\n            }\n        } else if (char === quoteType) {\n            // If a quote char is found and it is a closing quote, mark this fact by `null`-ing `quoteType`.\n            quoteType = null;\n        }\n    }\n    return stylesMap;\n}\n/**\n * Return lodash compatible path from style name.\n */ function toPath(name) {\n    return name.replace('-', '.');\n}\n/**\n * Appends style definition to the styles object.\n */ function appendStyleValue(stylesObject, nameOrPath, valueOrObject) {\n    let valueToSet = valueOrObject;\n    if (isObject(valueOrObject)) {\n        valueToSet = merge({}, get(stylesObject, nameOrPath), valueOrObject);\n    }\n    set(stylesObject, nameOrPath, valueToSet);\n}\n\n// @if CK_DEBUG_ENGINE // const { convertMapToTags } = require( '../dev-utils/utils' );\n/**\n * View element.\n *\n * The editing engine does not define a fixed semantics of its elements (it is \"DTD-free\").\n * This is why the type of the {@link module:engine/view/element~Element} need to\n * be defined by the feature developer. When creating an element you should use one of the following methods:\n *\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement `downcastWriter#createContainerElement()`}\n * in order to create a {@link module:engine/view/containerelement~ContainerElement},\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement `downcastWriter#createAttributeElement()`}\n * in order to create a {@link module:engine/view/attributeelement~AttributeElement},\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`}\n * in order to create a {@link module:engine/view/emptyelement~EmptyElement}.\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `downcastWriter#createUIElement()`}\n * in order to create a {@link module:engine/view/uielement~UIElement}.\n * * {@link module:engine/view/downcastwriter~DowncastWriter#createEditableElement `downcastWriter#createEditableElement()`}\n * in order to create a {@link module:engine/view/editableelement~EditableElement}.\n *\n * Note that for view elements which are not created from the model, like elements from mutations, paste or\n * {@link module:engine/controller/datacontroller~DataController#set data.set} it is not possible to define the type of the element.\n * In such cases the {@link module:engine/view/upcastwriter~UpcastWriter#createElement `UpcastWriter#createElement()`} method\n * should be used to create generic view elements.\n */ let Element$1 = class Element extends Node$2 {\n    /**\n\t * Name of the element.\n\t */ name;\n    /**\n\t * A list of attribute names that should be rendered in the editing pipeline even though filtering mechanisms\n\t * implemented in the {@link module:engine/view/domconverter~DomConverter} (for instance,\n\t * {@link module:engine/view/domconverter~DomConverter#shouldRenderAttribute}) would filter them out.\n\t *\n\t * These attributes can be specified as an option when the element is created by\n\t * the {@link module:engine/view/downcastwriter~DowncastWriter}. To check whether an unsafe an attribute should\n\t * be permitted, use the {@link #shouldRenderUnsafeAttribute} method.\n\t *\n\t * @internal\n\t */ _unsafeAttributesToRender = [];\n    /**\n\t * Map of attributes, where attributes names are keys and attributes values are values.\n\t */ _attrs;\n    /**\n\t * Array of child nodes.\n\t */ _children;\n    /**\n\t * Set of classes associated with element instance.\n\t */ _classes;\n    /**\n\t * Normalized styles.\n\t */ _styles;\n    /**\n\t * Map of custom properties.\n\t * Custom properties can be added to element instance, will be cloned but not rendered into DOM.\n\t */ _customProperties = new Map();\n    /**\n\t * Creates a view element.\n\t *\n\t * Attributes can be passed in various formats:\n\t *\n\t * ```ts\n\t * new Element( viewDocument, 'div', { class: 'editor', contentEditable: 'true' } ); // object\n\t * new Element( viewDocument, 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t * new Element( viewDocument, 'div', mapOfAttributes ); // map\n\t * ```\n\t *\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */ constructor(document, name, attrs, children){\n        super(document);\n        this.name = name;\n        this._attrs = parseAttributes(attrs);\n        this._children = [];\n        if (children) {\n            this._insertChild(0, children);\n        }\n        this._classes = new Set();\n        if (this._attrs.has('class')) {\n            // Remove class attribute and handle it by class set.\n            const classString = this._attrs.get('class');\n            parseClasses(this._classes, classString);\n            this._attrs.delete('class');\n        }\n        this._styles = new StylesMap(this.document.stylesProcessor);\n        if (this._attrs.has('style')) {\n            // Remove style attribute and handle it by styles map.\n            this._styles.setTo(this._attrs.get('style'));\n            this._attrs.delete('style');\n        }\n    }\n    /**\n\t * Number of element's children.\n\t */ get childCount() {\n        return this._children.length;\n    }\n    /**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t */ get isEmpty() {\n        return this._children.length === 0;\n    }\n    /**\n\t * Gets child at the given index.\n\t *\n\t * @param index Index of child.\n\t * @returns Child node.\n\t */ getChild(index) {\n        return this._children[index];\n    }\n    /**\n\t * Gets index of the given child node. Returns `-1` if child node is not found.\n\t *\n\t * @param node Child node.\n\t * @returns Index of the child node.\n\t */ getChildIndex(node) {\n        return this._children.indexOf(node);\n    }\n    /**\n\t * Gets child nodes iterator.\n\t *\n\t * @returns Child nodes iterator.\n\t */ getChildren() {\n        return this._children[Symbol.iterator]();\n    }\n    /**\n\t * Returns an iterator that contains the keys for attributes. Order of inserting attributes is not preserved.\n\t *\n\t * @returns Keys for attributes.\n\t */ *getAttributeKeys() {\n        if (this._classes.size > 0) {\n            yield 'class';\n        }\n        if (!this._styles.isEmpty) {\n            yield 'style';\n        }\n        yield* this._attrs.keys();\n    }\n    /**\n\t * Returns iterator that iterates over this element's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */ *getAttributes() {\n        yield* this._attrs.entries();\n        if (this._classes.size > 0) {\n            yield [\n                'class',\n                this.getAttribute('class')\n            ];\n        }\n        if (!this._styles.isEmpty) {\n            yield [\n                'style',\n                this.getAttribute('style')\n            ];\n        }\n    }\n    /**\n\t * Gets attribute by key. If attribute is not present - returns undefined.\n\t *\n\t * @param key Attribute key.\n\t * @returns Attribute value.\n\t */ getAttribute(key) {\n        if (key == 'class') {\n            if (this._classes.size > 0) {\n                return [\n                    ...this._classes\n                ].join(' ');\n            }\n            return undefined;\n        }\n        if (key == 'style') {\n            const inlineStyle = this._styles.toString();\n            return inlineStyle == '' ? undefined : inlineStyle;\n        }\n        return this._attrs.get(key);\n    }\n    /**\n\t * Returns a boolean indicating whether an attribute with the specified key exists in the element.\n\t *\n\t * @param key Attribute key.\n\t * @returns `true` if attribute with the specified key exists in the element, `false` otherwise.\n\t */ hasAttribute(key) {\n        if (key == 'class') {\n            return this._classes.size > 0;\n        }\n        if (key == 'style') {\n            return !this._styles.isEmpty;\n        }\n        return this._attrs.has(key);\n    }\n    /**\n\t * Checks if this element is similar to other element.\n\t * Both elements should have the same name and attributes to be considered as similar. Two similar elements\n\t * can contain different set of children nodes.\n\t */ isSimilar(otherElement) {\n        if (!(otherElement instanceof Element)) {\n            return false;\n        }\n        // If exactly the same Element is provided - return true immediately.\n        if (this === otherElement) {\n            return true;\n        }\n        // Check element name.\n        if (this.name != otherElement.name) {\n            return false;\n        }\n        // Check number of attributes, classes and styles.\n        if (this._attrs.size !== otherElement._attrs.size || this._classes.size !== otherElement._classes.size || this._styles.size !== otherElement._styles.size) {\n            return false;\n        }\n        // Check if attributes are the same.\n        for (const [key, value] of this._attrs){\n            if (!otherElement._attrs.has(key) || otherElement._attrs.get(key) !== value) {\n                return false;\n            }\n        }\n        // Check if classes are the same.\n        for (const className of this._classes){\n            if (!otherElement._classes.has(className)) {\n                return false;\n            }\n        }\n        // Check if styles are the same.\n        for (const property of this._styles.getStyleNames()){\n            if (!otherElement._styles.has(property) || otherElement._styles.getAsString(property) !== this._styles.getAsString(property)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Returns true if class is present.\n\t * If more then one class is provided - returns true only when all classes are present.\n\t *\n\t * ```ts\n\t * element.hasClass( 'foo' ); // Returns true if 'foo' class is present.\n\t * element.hasClass( 'foo', 'bar' ); // Returns true if 'foo' and 'bar' classes are both present.\n\t * ```\n\t */ hasClass(...className) {\n        for (const name of className){\n            if (!this._classes.has(name)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Returns iterator that contains all class names.\n\t */ getClassNames() {\n        return this._classes.keys();\n    }\n    /**\n\t * Returns style value for the given property mae.\n\t * If the style does not exist `undefined` is returned.\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#getAsString `StylesMap#getAsString()`} for details.\n\t *\n\t * For an element with style set to `'margin:1px'`:\n\t *\n\t * ```ts\n\t * // Enable 'margin' shorthand processing:\n\t * editor.data.addStyleProcessorRules( addMarginRules );\n\t *\n\t * const element = view.change( writer => {\n\t * \tconst element = writer.createElement();\n\t * \twriter.setStyle( 'margin', '1px' );\n\t * \twriter.setStyle( 'margin-bottom', '3em' );\n\t *\n\t * \treturn element;\n\t * } );\n\t *\n\t * element.getStyle( 'margin' ); // -> 'margin: 1px 1px 3em;'\n\t * ```\n\t */ getStyle(property) {\n        return this._styles.getAsString(property);\n    }\n    /**\n\t * Returns a normalized style object or single style value.\n\t *\n\t * For an element with style set to: margin:1px 2px 3em;\n\t *\n\t * ```ts\n\t * element.getNormalizedStyle( 'margin' ) );\n\t * ```\n\t *\n\t * will return:\n\t *\n\t * ```ts\n\t * {\n\t * \ttop: '1px',\n\t * \tright: '2px',\n\t * \tbottom: '3em',\n\t * \tleft: '2px'    // a normalized value from margin shorthand\n\t * }\n\t * ```\n\t *\n\t * and reading for single style value:\n\t *\n\t * ```ts\n\t * styles.getNormalizedStyle( 'margin-left' );\n\t * ```\n\t *\n\t * Will return a `2px` string.\n\t *\n\t * **Note**: This method will return normalized values only if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#getNormalized `StylesMap#getNormalized()`} for details.\n\t *\n\t * @param property Name of CSS property\n\t */ getNormalizedStyle(property) {\n        return this._styles.getNormalized(property);\n    }\n    /**\n\t * Returns iterator that contains all style names.\n\t *\n\t * @param expand Expand shorthand style properties and return all equivalent style representations.\n\t */ getStyleNames(expand) {\n        return this._styles.getStyleNames(expand);\n    }\n    /**\n\t * Returns true if style keys are present.\n\t * If more then one style property is provided - returns true only when all properties are present.\n\t *\n\t * ```ts\n\t * element.hasStyle( 'color' ); // Returns true if 'border-top' style is present.\n\t * element.hasStyle( 'color', 'border-top' ); // Returns true if 'color' and 'border-top' styles are both present.\n\t * ```\n\t */ hasStyle(...property) {\n        for (const name of property){\n            if (!this._styles.has(name)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Returns ancestor element that match specified pattern.\n\t * Provided patterns should be compatible with {@link module:engine/view/matcher~Matcher Matcher} as it is used internally.\n\t *\n\t * @see module:engine/view/matcher~Matcher\n\t * @param patterns Patterns used to match correct ancestor. See {@link module:engine/view/matcher~Matcher}.\n\t * @returns Found element or `null` if no matching ancestor was found.\n\t */ findAncestor(...patterns) {\n        const matcher = new Matcher(...patterns);\n        let parent = this.parent;\n        while(parent && !parent.is('documentFragment')){\n            if (matcher.match(parent)) {\n                return parent;\n            }\n            parent = parent.parent;\n        }\n        return null;\n    }\n    /**\n\t * Returns the custom property value for the given key.\n\t */ getCustomProperty(key) {\n        return this._customProperties.get(key);\n    }\n    /**\n\t * Returns an iterator which iterates over this element's custom properties.\n\t * Iterator provides `[ key, value ]` pairs for each stored property.\n\t */ *getCustomProperties() {\n        yield* this._customProperties.entries();\n    }\n    /**\n\t * Returns identity string based on element's name, styles, classes and other attributes.\n\t * Two elements that {@link #isSimilar are similar} will have same identity string.\n\t * It has the following format:\n\t *\n\t * ```ts\n\t * 'name class=\"class1,class2\" style=\"style1:value1;style2:value2\" attr1=\"val1\" attr2=\"val2\"'\n\t * ```\n \t *\n\t * For example:\n\t *\n\t * ```ts\n\t * const element = writer.createContainerElement( 'foo', {\n\t * \tbanana: '10',\n\t * \tapple: '20',\n\t * \tstyle: 'color: red; border-color: white;',\n\t * \tclass: 'baz'\n\t * } );\n\t *\n\t * // returns 'foo class=\"baz\" style=\"border-color:white;color:red\" apple=\"20\" banana=\"10\"'\n\t * element.getIdentity();\n\t * ```\n\t *\n\t * **Note**: Classes, styles and other attributes are sorted alphabetically.\n\t */ getIdentity() {\n        const classes = Array.from(this._classes).sort().join(',');\n        const styles = this._styles.toString();\n        const attributes = Array.from(this._attrs).map((i)=>`${i[0]}=\"${i[1]}\"`).sort().join(' ');\n        return this.name + (classes == '' ? '' : ` class=\"${classes}\"`) + (!styles ? '' : ` style=\"${styles}\"`) + (attributes == '' ? '' : ` ${attributes}`);\n    }\n    /**\n\t * Decides whether an unsafe attribute is whitelisted and should be rendered in the editing pipeline even though filtering mechanisms\n\t * like {@link module:engine/view/domconverter~DomConverter#shouldRenderAttribute} say it should not.\n\t *\n\t * Unsafe attribute names can be specified when creating an element via {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t *\n\t * @param attributeName The name of the attribute to be checked.\n\t */ shouldRenderUnsafeAttribute(attributeName) {\n        return this._unsafeAttributesToRender.includes(attributeName);\n    }\n    /**\n\t * Clones provided element.\n\t *\n\t * @internal\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns Clone of this element.\n\t */ _clone(deep = false) {\n        const childrenClone = [];\n        if (deep) {\n            for (const child of this.getChildren()){\n                childrenClone.push(child._clone(deep));\n            }\n        }\n        // ContainerElement and AttributeElement should be also cloned properly.\n        const cloned = new this.constructor(this.document, this.name, this._attrs, childrenClone);\n        // Classes and styles are cloned separately - this solution is faster than adding them back to attributes and\n        // parse once again in constructor.\n        cloned._classes = new Set(this._classes);\n        cloned._styles.set(this._styles.getNormalized());\n        // Clone custom properties.\n        cloned._customProperties = new Map(this._customProperties);\n        // Clone filler offset method.\n        // We can't define this method in a prototype because it's behavior which\n        // is changed by e.g. toWidget() function from ckeditor5-widget. Perhaps this should be one of custom props.\n        cloned.getFillerOffset = this.getFillerOffset;\n        // Clone unsafe attributes list.\n        cloned._unsafeAttributesToRender = this._unsafeAttributesToRender;\n        return cloned;\n    }\n    /**\n\t * {@link module:engine/view/element~Element#_insertChild Insert} a child node or a list of child nodes at the end of this node\n\t * and sets the parent of these nodes to this element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#insert\n\t * @internal\n\t * @param items Items to be inserted.\n\t * @fires change\n\t * @returns Number of appended nodes.\n\t */ _appendChild(items) {\n        return this._insertChild(this.childCount, items);\n    }\n    /**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this element.\n\t *\n\t * @internal\n\t * @see module:engine/view/downcastwriter~DowncastWriter#insert\n\t * @param index Position where nodes should be inserted.\n\t * @param items Items to be inserted.\n\t * @fires change\n\t * @returns Number of inserted nodes.\n\t */ _insertChild(index, items) {\n        this._fireChange('children', this);\n        let count = 0;\n        const nodes = normalize$3(this.document, items);\n        for (const node of nodes){\n            // If node that is being added to this element is already inside another element, first remove it from the old parent.\n            if (node.parent !== null) {\n                node._remove();\n            }\n            node.parent = this;\n            node.document = this.document;\n            this._children.splice(index, 0, node);\n            index++;\n            count++;\n        }\n        return count;\n    }\n    /**\n\t * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#remove\n\t * @internal\n\t * @param index Number of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @fires change\n\t * @returns The array of removed nodes.\n\t */ _removeChildren(index, howMany = 1) {\n        this._fireChange('children', this);\n        for(let i = index; i < index + howMany; i++){\n            this._children[i].parent = null;\n        }\n        return this._children.splice(index, howMany);\n    }\n    /**\n\t * Adds or overwrite attribute with a specified key and value.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#setAttribute\n\t * @internal\n\t * @param key Attribute key.\n\t * @param value Attribute value.\n\t * @fires change\n\t */ _setAttribute(key, value) {\n        const stringValue = String(value);\n        this._fireChange('attributes', this);\n        if (key == 'class') {\n            parseClasses(this._classes, stringValue);\n        } else if (key == 'style') {\n            this._styles.setTo(stringValue);\n        } else {\n            this._attrs.set(key, stringValue);\n        }\n    }\n    /**\n\t * Removes attribute from the element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeAttribute\n\t * @internal\n\t * @param key Attribute key.\n\t * @returns Returns true if an attribute existed and has been removed.\n\t * @fires change\n\t */ _removeAttribute(key) {\n        this._fireChange('attributes', this);\n        // Remove class attribute.\n        if (key == 'class') {\n            if (this._classes.size > 0) {\n                this._classes.clear();\n                return true;\n            }\n            return false;\n        }\n        // Remove style attribute.\n        if (key == 'style') {\n            if (!this._styles.isEmpty) {\n                this._styles.clear();\n                return true;\n            }\n            return false;\n        }\n        // Remove other attributes.\n        return this._attrs.delete(key);\n    }\n    /**\n\t * Adds specified class.\n\t *\n\t * ```ts\n\t * element._addClass( 'foo' ); // Adds 'foo' class.\n\t * element._addClass( [ 'foo', 'bar' ] ); // Adds 'foo' and 'bar' classes.\n\t * ```\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#addClass\n\t * @internal\n\t * @fires change\n\t */ _addClass(className) {\n        this._fireChange('attributes', this);\n        for (const name of toArray(className)){\n            this._classes.add(name);\n        }\n    }\n    /**\n\t * Removes specified class.\n\t *\n\t * ```ts\n\t * element._removeClass( 'foo' );  // Removes 'foo' class.\n\t * element._removeClass( [ 'foo', 'bar' ] ); // Removes both 'foo' and 'bar' classes.\n\t * ```\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeClass\n\t * @internal\n\t * @fires change\n\t */ _removeClass(className) {\n        this._fireChange('attributes', this);\n        for (const name of toArray(className)){\n            this._classes.delete(name);\n        }\n    }\n    _setStyle(property, value) {\n        this._fireChange('attributes', this);\n        if (typeof property != 'string') {\n            this._styles.set(property);\n        } else {\n            this._styles.set(property, value);\n        }\n    }\n    /**\n\t * Removes specified style.\n\t *\n\t * ```ts\n\t * element._removeStyle( 'color' );  // Removes 'color' style.\n\t * element._removeStyle( [ 'color', 'border-top' ] ); // Removes both 'color' and 'border-top' styles.\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeStyle\n\t * @internal\n\t * @fires change\n\t */ _removeStyle(property) {\n        this._fireChange('attributes', this);\n        for (const name of toArray(property)){\n            this._styles.remove(name);\n        }\n    }\n    /**\n\t * Sets a custom property. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#setCustomProperty\n\t * @internal\n\t */ _setCustomProperty(key, value) {\n        this._customProperties.set(key, value);\n    }\n    /**\n\t * Removes the custom property stored under the given key.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeCustomProperty\n\t * @internal\n\t * @returns Returns true if property was removed.\n\t */ _removeCustomProperty(key) {\n        return this._customProperties.delete(key);\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nElement$1.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'element' || type === 'view:element' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'element' || type === 'view:element');\n    }\n};\n/**\n * Parses attributes provided to the element constructor before they are applied to an element. If attributes are passed\n * as an object (instead of `Iterable`), the object is transformed to the map. Attributes with `null` value are removed.\n * Attributes with non-`String` value are converted to `String`.\n *\n * @param attrs Attributes to parse.\n * @returns Parsed attributes.\n */ function parseAttributes(attrs) {\n    const attrsMap = toMap(attrs);\n    for (const [key, value] of attrsMap){\n        if (value === null) {\n            attrsMap.delete(key);\n        } else if (typeof value != 'string') {\n            attrsMap.set(key, String(value));\n        }\n    }\n    return attrsMap;\n}\n/**\n * Parses class attribute and puts all classes into classes set.\n * Classes set s cleared before insertion.\n *\n * @param classesSet Set to insert parsed classes.\n * @param classesString String with classes to parse.\n */ function parseClasses(classesSet, classesString) {\n    const classArray = classesString.split(/\\s+/);\n    classesSet.clear();\n    classArray.forEach((name)=>classesSet.add(name));\n}\n/**\n * Converts strings to Text and non-iterables to arrays.\n */ function normalize$3(document, nodes) {\n    // Separate condition because string is iterable.\n    if (typeof nodes == 'string') {\n        return [\n            new Text$1(document, nodes)\n        ];\n    }\n    if (!isIterable(nodes)) {\n        nodes = [\n            nodes\n        ];\n    }\n    // Array.from to enable .map() on non-arrays.\n    return Array.from(nodes).map((node)=>{\n        if (typeof node == 'string') {\n            return new Text$1(document, node);\n        }\n        if (node instanceof TextProxy$1) {\n            return new Text$1(document, node.data);\n        }\n        return node;\n    });\n}\n\n/**\n * Containers are elements which define document structure. They define boundaries for\n * {@link module:engine/view/attributeelement~AttributeElement attributes}. They are mostly used for block elements like `<p>` or `<div>`.\n *\n * Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n * types (container element, {@link module:engine/view/attributeelement~AttributeElement attribute element},\n * {@link module:engine/view/emptyelement~EmptyElement empty element}, etc) when developing a feature.\n *\n * The container element should be your default choice when writing a converter, unless:\n *\n * * this element represents a model text attribute (then use {@link module:engine/view/attributeelement~AttributeElement}),\n * * this is an empty element like `<img>` (then use {@link module:engine/view/emptyelement~EmptyElement}),\n * * this is a root element,\n * * this is a nested editable element (then use  {@link module:engine/view/editableelement~EditableElement}).\n *\n * To create a new container element instance use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement `DowncastWriter#createContainerElement()`}\n * method.\n */ class ContainerElement extends Element$1 {\n    /**\n\t * Creates a container element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createContainerElement\n\t * @see module:engine/view/element~Element\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */ constructor(document, name, attrs, children){\n        super(document, name, attrs, children);\n        this.getFillerOffset = getFillerOffset$4;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nContainerElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'containerElement' || type === 'view:containerElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'element' || type === 'view:element');\n    }\n};\n/**\n * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n *\n * @returns Block filler offset or `null` if block filler is not needed.\n */ function getFillerOffset$4() {\n    const children = [\n        ...this.getChildren()\n    ];\n    const lastChild = children[this.childCount - 1];\n    // Block filler is required after a `<br>` if it's the last element in its container. See #1422.\n    if (lastChild && lastChild.is('element', 'br')) {\n        return this.childCount;\n    }\n    for (const child of children){\n        // If there's any non-UI element – don't render the bogus.\n        if (!child.is('uiElement')) {\n            return null;\n        }\n    }\n    // If there are only UI elements – render the bogus at the end of the element.\n    return this.childCount;\n}\n\n/**\n * Editable element which can be a {@link module:engine/view/rooteditableelement~RootEditableElement root}\n * or nested editable area in the editor.\n *\n * Editable is automatically read-only when its {@link module:engine/view/document~Document Document} is read-only.\n *\n * The constructor of this class shouldn't be used directly. To create new `EditableElement` use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createEditableElement `downcastWriter#createEditableElement()`} method.\n */ class EditableElement extends /* #__PURE__ */ ObservableMixin(ContainerElement) {\n    /**\n\t * Creates an editable element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createEditableElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */ constructor(document, name, attributes, children){\n        super(document, name, attributes, children);\n        this.set('isReadOnly', false);\n        this.set('isFocused', false);\n        this.set('placeholder', undefined);\n        this.bind('isReadOnly').to(document);\n        this.bind('isFocused').to(document, 'isFocused', (isFocused)=>isFocused && document.selection.editableElement == this);\n        // Update focus state based on selection changes.\n        this.listenTo(document.selection, 'change', ()=>{\n            this.isFocused = document.isFocused && document.selection.editableElement == this;\n        });\n    }\n    destroy() {\n        this.stopListening();\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nEditableElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'editableElement' || type === 'view:editableElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element');\n    }\n};\n\nconst rootNameSymbol = Symbol('rootName');\n/**\n * Class representing a single root in the data view. A root can be either {@link ~RootEditableElement#isReadOnly editable or read-only},\n * but in both cases it is called \"an editable\". Roots can contain other {@link module:engine/view/editableelement~EditableElement\n * editable elements} making them \"nested editables\".\n */ class RootEditableElement extends EditableElement {\n    /**\n\t * Creates root editable element.\n\t *\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t */ constructor(document, name){\n        super(document, name);\n        this.rootName = 'main';\n    }\n    /**\n\t * Name of this root inside {@link module:engine/view/document~Document} that is an owner of this root. If no\n\t * other name is set, `main` name is used.\n\t *\n\t * @readonly\n\t */ get rootName() {\n        return this.getCustomProperty(rootNameSymbol);\n    }\n    set rootName(rootName) {\n        this._setCustomProperty(rootNameSymbol, rootName);\n    }\n    /**\n\t * Overrides old element name and sets new one.\n\t * This is needed because view roots are created before they are attached to the DOM.\n\t * The name of the root element is temporary at this stage. It has to be changed when the\n\t * view root element is attached to the DOM element.\n\t *\n\t * @internal\n\t * @param name The new name of element.\n\t */ set _name(name) {\n        this.name = name;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nRootEditableElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'editableElement' || type === 'view:editableElement' || type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'rootElement' || type === 'view:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'editableElement' || type === 'view:editableElement' || type === 'containerElement' || type === 'view:containerElement' || type === 'element' || type === 'view:element');\n    }\n};\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */ let TreeWalker$1 = class TreeWalker {\n    /**\n\t * Walking direction. Defaults `'forward'`.\n\t */ direction;\n    /**\n\t * Iterator boundaries.\n\t *\n\t * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t * on the start of boundary, then `{ done: true }` is returned.\n\t *\n\t * If boundaries are not defined they are set before first and after last child of the root node.\n\t */ boundaries;\n    /**\n\t * Flag indicating whether all characters from {@link module:engine/view/text~Text} should be returned as one\n\t * {@link module:engine/view/text~Text} or one by one as {@link module:engine/view/textproxy~TextProxy}.\n\t */ singleCharacters;\n    /**\n\t * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t * iterated node will not be returned along with `elementEnd` tag.\n\t */ shallow;\n    /**\n\t * Flag indicating whether iterator should ignore `elementEnd` tags. If set to `true`, walker will not\n\t * return a parent node of the start position. Each {@link module:engine/view/element~Element} will be returned once.\n\t * When set to `false` each element might be returned twice: for `'elementStart'` and `'elementEnd'`.\n\t */ ignoreElementEnd;\n    /**\n\t * Iterator position. If start position is not defined then position depends on {@link #direction}. If direction is\n\t * `'forward'` position starts form the beginning, when direction is `'backward'` position starts from the end.\n\t */ _position;\n    /**\n\t * Start boundary parent.\n\t */ _boundaryStartParent;\n    /**\n\t * End boundary parent.\n\t */ _boundaryEndParent;\n    /**\n\t * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t *\n\t * @param options Object with configuration.\n\t */ constructor(options = {}){\n        if (!options.boundaries && !options.startPosition) {\n            /**\n\t\t\t * Neither boundaries nor starting position have been defined.\n\t\t\t *\n\t\t\t * @error view-tree-walker-no-start-position\n\t\t\t */ throw new CKEditorError('view-tree-walker-no-start-position', null);\n        }\n        if (options.direction && options.direction != 'forward' && options.direction != 'backward') {\n            /**\n\t\t\t * Only `backward` and `forward` direction allowed.\n\t\t\t *\n\t\t\t * @error view-tree-walker-unknown-direction\n\t\t\t */ throw new CKEditorError('view-tree-walker-unknown-direction', options.startPosition, {\n                direction: options.direction\n            });\n        }\n        this.boundaries = options.boundaries || null;\n        if (options.startPosition) {\n            this._position = Position$1._createAt(options.startPosition);\n        } else {\n            this._position = Position$1._createAt(options.boundaries[options.direction == 'backward' ? 'end' : 'start']);\n        }\n        this.direction = options.direction || 'forward';\n        this.singleCharacters = !!options.singleCharacters;\n        this.shallow = !!options.shallow;\n        this.ignoreElementEnd = !!options.ignoreElementEnd;\n        this._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n        this._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n    }\n    /**\n\t * Iterable interface.\n\t */ [Symbol.iterator]() {\n        return this;\n    }\n    /**\n\t * Iterator position. If start position is not defined then position depends on {@link #direction}. If direction is\n\t * `'forward'` position starts form the beginning, when direction is `'backward'` position starts from the end.\n\t */ get position() {\n        return this._position;\n    }\n    /**\n\t * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * walker.skip( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t * walker.skip( value => true ); // Move the position to the end: <p>{}foo</p> -> <p>foo</p>[]\n\t * walker.skip( value => false ); // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/view/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t */ skip(skip) {\n        let nextResult;\n        let prevPosition;\n        do {\n            prevPosition = this.position;\n            nextResult = this.next();\n        }while (!nextResult.done && skip(nextResult.value))\n        if (!nextResult.done) {\n            this._position = prevPosition;\n        }\n    }\n    /**\n\t * Gets the next tree walker's value.\n\t *\n\t * @returns Object implementing iterator interface, returning\n\t * information about taken step.\n\t */ next() {\n        if (this.direction == 'forward') {\n            return this._next();\n        } else {\n            return this._previous();\n        }\n    }\n    /**\n\t * Makes a step forward in view. Moves the {@link #position} to the next position and returns the encountered value.\n\t */ _next() {\n        let position = this.position.clone();\n        const previousPosition = this.position;\n        const parent = position.parent;\n        // We are at the end of the root.\n        if (parent.parent === null && position.offset === parent.childCount) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // We reached the walker boundary.\n        if (parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // Get node just after current position.\n        let node;\n        // Text is a specific parent because it contains string instead of child nodes.\n        if (parent instanceof Text$1) {\n            if (position.isAtEnd) {\n                // Prevent returning \"elementEnd\" for Text node. Skip that value and return the next walker step.\n                this._position = Position$1._createAfter(parent);\n                return this._next();\n            }\n            node = parent.data[position.offset];\n        } else {\n            node = parent.getChild(position.offset);\n        }\n        if (node instanceof Element$1) {\n            if (!this.shallow) {\n                position = new Position$1(node, 0);\n            } else {\n                // We are past the walker boundaries.\n                if (this.boundaries && this.boundaries.end.isBefore(position)) {\n                    return {\n                        done: true,\n                        value: undefined\n                    };\n                }\n                position.offset++;\n            }\n            this._position = position;\n            return this._formatReturnValue('elementStart', node, previousPosition, position, 1);\n        }\n        if (node instanceof Text$1) {\n            if (this.singleCharacters) {\n                position = new Position$1(node, 0);\n                this._position = position;\n                return this._next();\n            }\n            let charactersCount = node.data.length;\n            let item;\n            // If text stick out of walker range, we need to cut it and wrap in TextProxy.\n            if (node == this._boundaryEndParent) {\n                charactersCount = this.boundaries.end.offset;\n                item = new TextProxy$1(node, 0, charactersCount);\n                position = Position$1._createAfter(item);\n            } else {\n                item = new TextProxy$1(node, 0, node.data.length);\n                // If not just keep moving forward.\n                position.offset++;\n            }\n            this._position = position;\n            return this._formatReturnValue('text', item, previousPosition, position, charactersCount);\n        }\n        if (typeof node == 'string') {\n            let textLength;\n            if (this.singleCharacters) {\n                textLength = 1;\n            } else {\n                // Check if text stick out of walker range.\n                const endOffset = parent === this._boundaryEndParent ? this.boundaries.end.offset : parent.data.length;\n                textLength = endOffset - position.offset;\n            }\n            const textProxy = new TextProxy$1(parent, position.offset, textLength);\n            position.offset += textLength;\n            this._position = position;\n            return this._formatReturnValue('text', textProxy, previousPosition, position, textLength);\n        }\n        // `node` is not set, we reached the end of current `parent`.\n        position = Position$1._createAfter(parent);\n        this._position = position;\n        if (this.ignoreElementEnd) {\n            return this._next();\n        }\n        return this._formatReturnValue('elementEnd', parent, previousPosition, position);\n    }\n    /**\n\t * Makes a step backward in view. Moves the {@link #position} to the previous position and returns the encountered value.\n\t */ _previous() {\n        let position = this.position.clone();\n        const previousPosition = this.position;\n        const parent = position.parent;\n        // We are at the beginning of the root.\n        if (parent.parent === null && position.offset === 0) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // We reached the walker boundary.\n        if (parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // Get node just before current position.\n        let node;\n        // Text {@link module:engine/view/text~Text} element is a specific parent because contains string instead of child nodes.\n        if (parent instanceof Text$1) {\n            if (position.isAtStart) {\n                // Prevent returning \"elementStart\" for Text node. Skip that value and return the next walker step.\n                this._position = Position$1._createBefore(parent);\n                return this._previous();\n            }\n            node = parent.data[position.offset - 1];\n        } else {\n            node = parent.getChild(position.offset - 1);\n        }\n        if (node instanceof Element$1) {\n            if (this.shallow) {\n                position.offset--;\n                this._position = position;\n                return this._formatReturnValue('elementStart', node, previousPosition, position, 1);\n            }\n            position = new Position$1(node, node.childCount);\n            this._position = position;\n            if (this.ignoreElementEnd) {\n                return this._previous();\n            }\n            return this._formatReturnValue('elementEnd', node, previousPosition, position);\n        }\n        if (node instanceof Text$1) {\n            if (this.singleCharacters) {\n                position = new Position$1(node, node.data.length);\n                this._position = position;\n                return this._previous();\n            }\n            let charactersCount = node.data.length;\n            let item;\n            // If text stick out of walker range, we need to cut it and wrap in TextProxy.\n            if (node == this._boundaryStartParent) {\n                const offset = this.boundaries.start.offset;\n                item = new TextProxy$1(node, offset, node.data.length - offset);\n                charactersCount = item.data.length;\n                position = Position$1._createBefore(item);\n            } else {\n                item = new TextProxy$1(node, 0, node.data.length);\n                // If not just keep moving backward.\n                position.offset--;\n            }\n            this._position = position;\n            return this._formatReturnValue('text', item, previousPosition, position, charactersCount);\n        }\n        if (typeof node == 'string') {\n            let textLength;\n            if (!this.singleCharacters) {\n                // Check if text stick out of walker range.\n                const startOffset = parent === this._boundaryStartParent ? this.boundaries.start.offset : 0;\n                textLength = position.offset - startOffset;\n            } else {\n                textLength = 1;\n            }\n            position.offset -= textLength;\n            const textProxy = new TextProxy$1(parent, position.offset, textLength);\n            this._position = position;\n            return this._formatReturnValue('text', textProxy, previousPosition, position, textLength);\n        }\n        // `node` is not set, we reached the beginning of current `parent`.\n        position = Position$1._createBefore(parent);\n        this._position = position;\n        return this._formatReturnValue('elementStart', parent, previousPosition, position, 1);\n    }\n    /**\n\t * Format returned data and adjust `previousPosition` and `nextPosition` if reach the bound of the {@link module:engine/view/text~Text}.\n\t *\n\t * @param type Type of step.\n\t * @param item Item between old and new position.\n\t * @param previousPosition Previous position of iterator.\n\t * @param nextPosition Next position of iterator.\n\t * @param length Length of the item.\n\t */ _formatReturnValue(type, item, previousPosition, nextPosition, length) {\n        // Text is a specific parent, because contains string instead of children.\n        // Walker doesn't enter to the Text except situations when walker is iterating over every single character,\n        // or the bound starts/ends inside the Text. So when the position is at the beginning or at the end of the Text\n        // we move it just before or just after Text.\n        if (item instanceof TextProxy$1) {\n            // Position is at the end of Text.\n            if (item.offsetInText + item.data.length == item.textNode.data.length) {\n                if (this.direction == 'forward' && !(this.boundaries && this.boundaries.end.isEqual(this.position))) {\n                    nextPosition = Position$1._createAfter(item.textNode);\n                    // When we change nextPosition of returned value we need also update walker current position.\n                    this._position = nextPosition;\n                } else {\n                    previousPosition = Position$1._createAfter(item.textNode);\n                }\n            }\n            // Position is at the begining ot the text.\n            if (item.offsetInText === 0) {\n                if (this.direction == 'backward' && !(this.boundaries && this.boundaries.start.isEqual(this.position))) {\n                    nextPosition = Position$1._createBefore(item.textNode);\n                    // When we change nextPosition of returned value we need also update walker current position.\n                    this._position = nextPosition;\n                } else {\n                    previousPosition = Position$1._createBefore(item.textNode);\n                }\n            }\n        }\n        return {\n            done: false,\n            value: {\n                type,\n                item,\n                previousPosition,\n                nextPosition,\n                length\n            }\n        };\n    }\n};\n\n/**\n * Position in the view tree. Position is represented by its parent node and an offset in this parent.\n *\n * In order to create a new position instance use the `createPosition*()` factory methods available in:\n *\n * * {@link module:engine/view/view~View}\n * * {@link module:engine/view/downcastwriter~DowncastWriter}\n * * {@link module:engine/view/upcastwriter~UpcastWriter}\n */ let Position$1 = class Position extends TypeCheckable$1 {\n    /**\n\t * Position parent.\n\t */ parent;\n    /**\n\t * Position offset.\n\t */ offset;\n    /**\n\t * Creates a position.\n\t *\n\t * @param parent Position parent.\n\t * @param offset Position offset.\n\t */ constructor(parent, offset){\n        super();\n        this.parent = parent;\n        this.offset = offset;\n    }\n    /**\n\t * Node directly after the position. Equals `null` when there is no node after position or position is located\n\t * inside text node.\n\t */ get nodeAfter() {\n        if (this.parent.is('$text')) {\n            return null;\n        }\n        return this.parent.getChild(this.offset) || null;\n    }\n    /**\n\t * Node directly before the position. Equals `null` when there is no node before position or position is located\n\t * inside text node.\n\t */ get nodeBefore() {\n        if (this.parent.is('$text')) {\n            return null;\n        }\n        return this.parent.getChild(this.offset - 1) || null;\n    }\n    /**\n\t * Is `true` if position is at the beginning of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n\t */ get isAtStart() {\n        return this.offset === 0;\n    }\n    /**\n\t * Is `true` if position is at the end of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n\t */ get isAtEnd() {\n        const endOffset = this.parent.is('$text') ? this.parent.data.length : this.parent.childCount;\n        return this.offset === endOffset;\n    }\n    /**\n\t * Position's root, that is the root of the position's parent element.\n\t */ get root() {\n        return this.parent.root;\n    }\n    /**\n\t * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this position, or `null` if\n\t * position is not inside an editable element.\n\t */ get editableElement() {\n        let editable = this.parent;\n        while(!(editable instanceof EditableElement)){\n            if (editable.parent) {\n                editable = editable.parent;\n            } else {\n                return null;\n            }\n        }\n        return editable;\n    }\n    /**\n\t * Returns a new instance of Position with offset incremented by `shift` value.\n\t *\n\t * @param shift How position offset should get changed. Accepts negative values.\n\t * @returns Shifted position.\n\t */ getShiftedBy(shift) {\n        const shifted = Position._createAt(this);\n        const offset = shifted.offset + shift;\n        shifted.offset = offset < 0 ? 0 : offset;\n        return shifted;\n    }\n    /**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/view/treewalker~TreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * getLastMatchingPosition( value => value.type == 'text' ); // <p>{}foo</p> -> <p>foo[]</p>\n\t * getLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } ); // <p>foo[]</p> -> <p>{}foo</p>\n\t * getLastMatchingPosition( value => false ); // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/view/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t * @returns The position after the last item which matches the `skip` callback test.\n\t */ getLastMatchingPosition(skip, options = {}) {\n        options.startPosition = this;\n        const treeWalker = new TreeWalker$1(options);\n        treeWalker.skip(skip);\n        return treeWalker.position;\n    }\n    /**\n\t * Returns ancestors array of this position, that is this position's parent and it's ancestors.\n\t *\n\t * @returns Array with ancestors.\n\t */ getAncestors() {\n        if (this.parent.is('documentFragment')) {\n            return [\n                this.parent\n            ];\n        } else {\n            return this.parent.getAncestors({\n                includeSelf: true\n            });\n        }\n    }\n    /**\n\t * Returns a {@link module:engine/view/node~Node} or {@link module:engine/view/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both positions.\n\t */ getCommonAncestor(position) {\n        const ancestorsA = this.getAncestors();\n        const ancestorsB = position.getAncestors();\n        let i = 0;\n        while(ancestorsA[i] == ancestorsB[i] && ancestorsA[i]){\n            i++;\n        }\n        return i === 0 ? null : ancestorsA[i - 1];\n    }\n    /**\n\t * Checks whether this position equals given position.\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if positions are same.\n\t */ isEqual(otherPosition) {\n        return this.parent == otherPosition.parent && this.offset == otherPosition.offset;\n    }\n    /**\n\t * Checks whether this position is located before given position. When method returns `false` it does not mean that\n\t * this position is after give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~Position#isAfter\n\t * @see module:engine/view/position~Position#compareWith\n\t * @param otherPosition Position to compare with.\n\t * @returns Returns `true` if this position is before given position.\n\t */ isBefore(otherPosition) {\n        return this.compareWith(otherPosition) == 'before';\n    }\n    /**\n\t * Checks whether this position is located after given position. When method returns `false` it does not mean that\n\t * this position is before give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~Position#isBefore\n\t * @see module:engine/view/position~Position#compareWith\n\t * @param otherPosition Position to compare with.\n\t * @returns Returns `true` if this position is after given position.\n\t */ isAfter(otherPosition) {\n        return this.compareWith(otherPosition) == 'after';\n    }\n    /**\n\t * Checks whether this position is before, after or in same position that other position. Two positions may be also\n\t * different when they are located in separate roots.\n\t *\n\t * @param otherPosition Position to compare with.\n\t */ compareWith(otherPosition) {\n        if (this.root !== otherPosition.root) {\n            return 'different';\n        }\n        if (this.isEqual(otherPosition)) {\n            return 'same';\n        }\n        // Get path from root to position's parent element.\n        const thisPath = this.parent.is('node') ? this.parent.getPath() : [];\n        const otherPath = otherPosition.parent.is('node') ? otherPosition.parent.getPath() : [];\n        // Add the positions' offsets to the parents offsets.\n        thisPath.push(this.offset);\n        otherPath.push(otherPosition.offset);\n        // Compare both path arrays to find common ancestor.\n        const result = compareArrays(thisPath, otherPath);\n        switch(result){\n            case 'prefix':\n                return 'before';\n            case 'extension':\n                return 'after';\n            default:\n                // Cast to number to avoid having 'same' as a type of `result`.\n                return thisPath[result] < otherPath[result] ? 'before' : 'after';\n        }\n    }\n    /**\n\t * Creates a {@link module:engine/view/treewalker~TreeWalker TreeWalker} instance with this positions as a start position.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}\n\t */ getWalker(options = {}) {\n        options.startPosition = this;\n        return new TreeWalker$1(options);\n    }\n    /**\n\t * Clones this position.\n\t */ clone() {\n        return new Position(this.parent, this.offset);\n    }\n    /**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link module:engine/view/position~Position._createBefore},\n\t * * {@link module:engine/view/position~Position._createAfter}.\n\t *\n\t * @internal\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~Item view item}.\n\t */ static _createAt(itemOrPosition, offset) {\n        if (itemOrPosition instanceof Position) {\n            return new this(itemOrPosition.parent, itemOrPosition.offset);\n        } else {\n            const node = itemOrPosition;\n            if (offset == 'end') {\n                offset = node.is('$text') ? node.data.length : node.childCount;\n            } else if (offset == 'before') {\n                return this._createBefore(node);\n            } else if (offset == 'after') {\n                return this._createAfter(node);\n            } else if (offset !== 0 && !offset) {\n                /**\n\t\t\t\t * {@link module:engine/view/view~View#createPositionAt `View#createPositionAt()`}\n\t\t\t\t * requires the offset to be specified when the first parameter is a view item.\n\t\t\t\t *\n\t\t\t\t * @error view-createpositionat-offset-required\n\t\t\t\t */ throw new CKEditorError('view-createpositionat-offset-required', node);\n            }\n            return new Position(node, offset);\n        }\n    }\n    /**\n\t * Creates a new position after given view item.\n\t *\n\t * @internal\n\t * @param item View item after which the position should be located.\n\t */ static _createAfter(item) {\n        // TextProxy is not a instance of Node so we need do handle it in specific way.\n        if (item.is('$textProxy')) {\n            return new Position(item.textNode, item.offsetInText + item.data.length);\n        }\n        if (!item.parent) {\n            /**\n\t\t\t * You can not make a position after a root.\n\t\t\t *\n\t\t\t * @error view-position-after-root\n\t\t\t * @param {module:engine/view/node~Node} root\n\t\t\t */ throw new CKEditorError('view-position-after-root', item, {\n                root: item\n            });\n        }\n        return new Position(item.parent, item.index + 1);\n    }\n    /**\n\t * Creates a new position before given view item.\n\t *\n\t * @internal\n\t * @param item View item before which the position should be located.\n\t */ static _createBefore(item) {\n        // TextProxy is not a instance of Node so we need do handle it in specific way.\n        if (item.is('$textProxy')) {\n            return new Position(item.textNode, item.offsetInText);\n        }\n        if (!item.parent) {\n            /**\n\t\t\t * You cannot make a position before a root.\n\t\t\t *\n\t\t\t * @error view-position-before-root\n\t\t\t * @param {module:engine/view/node~Node} root\n\t\t\t */ throw new CKEditorError('view-position-before-root', item, {\n                root: item\n            });\n        }\n        return new Position(item.parent, item.index);\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nPosition$1.prototype.is = function(type) {\n    return type === 'position' || type === 'view:position';\n};\n\n/**\n * Range in the view tree. A range is represented by its start and end {@link module:engine/view/position~Position positions}.\n *\n * In order to create a new position instance use the `createPosition*()` factory methods available in:\n *\n * * {@link module:engine/view/view~View}\n * * {@link module:engine/view/downcastwriter~DowncastWriter}\n * * {@link module:engine/view/upcastwriter~UpcastWriter}\n */ let Range$1 = class Range extends TypeCheckable$1 {\n    /**\n\t * Start position.\n\t */ start;\n    /**\n\t * End position.\n\t */ end;\n    /**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** Constructor creates it's own {@link module:engine/view/position~Position} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at the `start` position.\n\t */ constructor(start, end = null){\n        super();\n        this.start = start.clone();\n        this.end = end ? end.clone() : start.clone();\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link module:engine/view/item~Item view items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/view/position~Position positions},\n\t * grouped as {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * This iterator uses {@link module:engine/view/treewalker~TreeWalker TreeWalker} with `boundaries` set to this range and\n\t * `ignoreElementEnd` option\n\t * set to `true`.\n\t */ *[Symbol.iterator]() {\n        yield* new TreeWalker$1({\n            boundaries: this,\n            ignoreElementEnd: true\n        });\n    }\n    /**\n\t * Returns whether the range is collapsed, that is it start and end positions are equal.\n\t */ get isCollapsed() {\n        return this.start.isEqual(this.end);\n    }\n    /**\n\t * Returns whether this range is flat, that is if {@link module:engine/view/range~Range#start start} position and\n\t * {@link module:engine/view/range~Range#end end} position are in the same {@link module:engine/view/position~Position#parent parent}.\n\t */ get isFlat() {\n        return this.start.parent === this.end.parent;\n    }\n    /**\n\t * Range root element.\n\t */ get root() {\n        return this.start.root;\n    }\n    /**\n\t * Creates a maximal range that has the same content as this range but is expanded in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t * ```html\n\t * <p>Foo</p><p><b>{Bar}</b></p> -> <p>Foo</p>[<p><b>Bar</b>]</p>\n\t * <p><b>foo</b>{bar}<span></span></p> -> <p><b>foo[</b>bar<span></span>]</p>\n\t * ```\n\t *\n\t * Note that in the sample above:\n\t *\n\t * - `<p>` have type of {@link module:engine/view/containerelement~ContainerElement},\n\t * - `<b>` have type of {@link module:engine/view/attributeelement~AttributeElement},\n\t * - `<span>` have type of {@link module:engine/view/uielement~UIElement}.\n\t *\n\t * @returns Enlarged range.\n\t */ getEnlarged() {\n        let start = this.start.getLastMatchingPosition(enlargeTrimSkip, {\n            direction: 'backward'\n        });\n        let end = this.end.getLastMatchingPosition(enlargeTrimSkip);\n        // Fix positions, in case if they are in Text node.\n        if (start.parent.is('$text') && start.isAtStart) {\n            start = Position$1._createBefore(start.parent);\n        }\n        if (end.parent.is('$text') && end.isAtEnd) {\n            end = Position$1._createAfter(end.parent);\n        }\n        return new Range(start, end);\n    }\n    /**\n\t * Creates a minimum range that has the same content as this range but is trimmed in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t * ```html\n\t * <p>Foo</p>[<p><b>Bar</b>]</p> -> <p>Foo</p><p><b>{Bar}</b></p>\n\t * <p><b>foo[</b>bar<span></span>]</p> -> <p><b>foo</b>{bar}<span></span></p>\n\t * ```\n\t *\n\t * Note that in the sample above:\n\t *\n\t * - `<p>` have type of {@link module:engine/view/containerelement~ContainerElement},\n\t * - `<b>` have type of {@link module:engine/view/attributeelement~AttributeElement},\n\t * - `<span>` have type of {@link module:engine/view/uielement~UIElement}.\n\t *\n\t * @returns Shrunk range.\n\t */ getTrimmed() {\n        let start = this.start.getLastMatchingPosition(enlargeTrimSkip);\n        if (start.isAfter(this.end) || start.isEqual(this.end)) {\n            return new Range(start, start);\n        }\n        let end = this.end.getLastMatchingPosition(enlargeTrimSkip, {\n            direction: 'backward'\n        });\n        const nodeAfterStart = start.nodeAfter;\n        const nodeBeforeEnd = end.nodeBefore;\n        // Because TreeWalker prefers positions next to text node, we need to move them manually into these text nodes.\n        if (nodeAfterStart && nodeAfterStart.is('$text')) {\n            start = new Position$1(nodeAfterStart, 0);\n        }\n        if (nodeBeforeEnd && nodeBeforeEnd.is('$text')) {\n            end = new Position$1(nodeBeforeEnd, nodeBeforeEnd.data.length);\n        }\n        return new Range(start, end);\n    }\n    /**\n\t * Two ranges are equal if their start and end positions are equal.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns `true` if ranges are equal, `false` otherwise\n\t */ isEqual(otherRange) {\n        return this == otherRange || this.start.isEqual(otherRange.start) && this.end.isEqual(otherRange.end);\n    }\n    /**\n\t * Checks whether this range contains given {@link module:engine/view/position~Position position}.\n\t *\n\t * @param position Position to check.\n\t * @returns `true` if given {@link module:engine/view/position~Position position} is contained in this range, `false` otherwise.\n\t */ containsPosition(position) {\n        return position.isAfter(this.start) && position.isBefore(this.end);\n    }\n    /**\n\t * Checks whether this range contains given {@link module:engine/view/range~Range range}.\n\t *\n\t * @param otherRange Range to check.\n\t * @param loose Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t * start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t * even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t * @returns `true` if given {@link module:engine/view/range~Range range} boundaries are contained by this range, `false`\n\t * otherwise.\n\t */ containsRange(otherRange, loose = false) {\n        if (otherRange.isCollapsed) {\n            loose = false;\n        }\n        const containsStart = this.containsPosition(otherRange.start) || loose && this.start.isEqual(otherRange.start);\n        const containsEnd = this.containsPosition(otherRange.end) || loose && this.end.isEqual(otherRange.end);\n        return containsStart && containsEnd;\n    }\n    /**\n\t * Computes which part(s) of this {@link module:engine/view/range~Range range} is not a part of given\n\t * {@link module:engine/view/range~Range range}.\n\t * Returned array contains zero, one or two {@link module:engine/view/range~Range ranges}.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let foo = downcastWriter.createText( 'foo' );\n\t * let img = downcastWriter.createContainerElement( 'img' );\n\t * let bar = downcastWriter.createText( 'bar' );\n\t * let p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t * let range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t * let otherRange = view.createRange( // \"oo\", img, \"ba\" are in range.\n\t * \tview.createPositionAt( foo, 1 ),\n\t * \tview.createPositionAt( bar, 2 )\n\t * );\n\t * let transformed = range.getDifference( otherRange );\n\t * // transformed array has no ranges because `otherRange` contains `range`\n\t *\n\t * otherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has one range: from ( p, 2 ) to ( bar, 1 )\n\t *\n\t * otherRange = view.createRange( view.createPositionAt( p, 1 ), view.createPositionAt( p, 2 ) ); // img is in range.\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has two ranges: from ( foo, 1 ) to ( p, 1 ) and from ( p, 2 ) to ( bar, 1 )\n\t * ```\n\t *\n\t * @param otherRange Range to differentiate against.\n\t * @returns The difference between ranges.\n\t */ getDifference(otherRange) {\n        const ranges = [];\n        if (this.isIntersecting(otherRange)) {\n            // Ranges intersect.\n            if (this.containsPosition(otherRange.start)) {\n                // Given range start is inside this range. This means that we have to\n                // add shrunken range - from the start to the middle of this range.\n                ranges.push(new Range(this.start, otherRange.start));\n            }\n            if (this.containsPosition(otherRange.end)) {\n                // Given range end is inside this range. This means that we have to\n                // add shrunken range - from the middle of this range to the end.\n                ranges.push(new Range(otherRange.end, this.end));\n            }\n        } else {\n            // Ranges do not intersect, return the original range.\n            ranges.push(this.clone());\n        }\n        return ranges;\n    }\n    /**\n\t * Returns an intersection of this {@link module:engine/view/range~Range range} and given {@link module:engine/view/range~Range range}.\n\t * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let foo = downcastWriter.createText( 'foo' );\n\t * let img = downcastWriter.createContainerElement( 'img' );\n\t * let bar = downcastWriter.createText( 'bar' );\n\t * let p = downcastWriter.createContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t * let range = view.createRange( view.createPositionAt( foo, 2 ), view.createPositionAt( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t * let otherRange = view.createRange( view.createPositionAt( foo, 1 ), view.createPositionAt( p, 2 ); // \"oo\", img are in range.\n\t * let transformed = range.getIntersection( otherRange ); // range from ( foo, 1 ) to ( p, 2 ).\n\t *\n\t * otherRange = view.createRange( view.createPositionAt( bar, 1 ), view.createPositionAt( bar, 3 ); \"ar\" is in range.\n\t * transformed = range.getIntersection( otherRange ); // null - no common part.\n\t * ```\n\t *\n\t * @param otherRange Range to check for intersection.\n\t * @returns A common part of given ranges or `null` if ranges have no common part.\n\t */ getIntersection(otherRange) {\n        if (this.isIntersecting(otherRange)) {\n            // Ranges intersect, so a common range will be returned.\n            // At most, it will be same as this range.\n            let commonRangeStart = this.start;\n            let commonRangeEnd = this.end;\n            if (this.containsPosition(otherRange.start)) {\n                // Given range start is inside this range. This means thaNt we have to\n                // shrink common range to the given range start.\n                commonRangeStart = otherRange.start;\n            }\n            if (this.containsPosition(otherRange.end)) {\n                // Given range end is inside this range. This means that we have to\n                // shrink common range to the given range end.\n                commonRangeEnd = otherRange.end;\n            }\n            return new Range(commonRangeStart, commonRangeEnd);\n        }\n        // Ranges do not intersect, so they do not have common part.\n        return null;\n    }\n    /**\n\t * Creates a {@link module:engine/view/treewalker~TreeWalker TreeWalker} instance with this range as a boundary.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t */ getWalker(options = {}) {\n        options.boundaries = this;\n        return new TreeWalker$1(options);\n    }\n    /**\n\t * Returns a {@link module:engine/view/node~Node} or {@link module:engine/view/documentfragment~DocumentFragment}\n\t * which is a common ancestor of range's both ends (in which the entire range is contained).\n\t */ getCommonAncestor() {\n        return this.start.getCommonAncestor(this.end);\n    }\n    /**\n\t * Returns an {@link module:engine/view/element~Element Element} contained by the range.\n\t * The element will be returned when it is the **only** node within the range and **fully–contained**\n\t * at the same time.\n\t */ getContainedElement() {\n        if (this.isCollapsed) {\n            return null;\n        }\n        let nodeAfterStart = this.start.nodeAfter;\n        let nodeBeforeEnd = this.end.nodeBefore;\n        // Handle the situation when the range position is at the beginning / at the end of a text node.\n        // In such situation `.nodeAfter` and `.nodeBefore` are `null` but the range still might be spanning\n        // over one element.\n        //\n        // <p>Foo{<span class=\"widget\"></span>}bar</p> vs <p>Foo[<span class=\"widget\"></span>]bar</p>\n        //\n        // These are basically the same range, only the difference is if the range position is at\n        // at the end/at the beginning of a text node or just before/just after the text node.\n        //\n        if (this.start.parent.is('$text') && this.start.isAtEnd && this.start.parent.nextSibling) {\n            nodeAfterStart = this.start.parent.nextSibling;\n        }\n        if (this.end.parent.is('$text') && this.end.isAtStart && this.end.parent.previousSibling) {\n            nodeBeforeEnd = this.end.parent.previousSibling;\n        }\n        if (nodeAfterStart && nodeAfterStart.is('element') && nodeAfterStart === nodeBeforeEnd) {\n            return nodeAfterStart;\n        }\n        return null;\n    }\n    /**\n\t * Clones this range.\n\t */ clone() {\n        return new Range(this.start, this.end);\n    }\n    /**\n\t * Returns an iterator that iterates over all {@link module:engine/view/item~Item view items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n\t * set to `true`. However it returns only {@link module:engine/view/item~Item items},\n\t * not {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t */ *getItems(options = {}) {\n        options.boundaries = this;\n        options.ignoreElementEnd = true;\n        const treeWalker = new TreeWalker$1(options);\n        for (const value of treeWalker){\n            yield value.item;\n        }\n    }\n    /**\n\t * Returns an iterator that iterates over all {@link module:engine/view/position~Position positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/view/position~Position positions}, not {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t */ *getPositions(options = {}) {\n        options.boundaries = this;\n        const treeWalker = new TreeWalker$1(options);\n        yield treeWalker.position;\n        for (const value of treeWalker){\n            yield value.nextPosition;\n        }\n    }\n    /**\n\t * Checks and returns whether this range intersects with the given range.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns True if ranges intersect.\n\t */ isIntersecting(otherRange) {\n        return this.start.isBefore(otherRange.end) && this.end.isAfter(otherRange.start);\n    }\n    /**\n\t * Creates a range from the given parents and offsets.\n\t *\n\t * @internal\n\t * @param startElement Start position parent element.\n\t * @param startOffset Start position offset.\n\t * @param endElement End position parent element.\n\t * @param endOffset End position offset.\n\t * @returns Created range.\n\t */ static _createFromParentsAndOffsets(startElement, startOffset, endElement, endOffset) {\n        return new this(new Position$1(startElement, startOffset), new Position$1(endElement, endOffset));\n    }\n    /**\n\t * Creates a new range, spreading from specified {@link module:engine/view/position~Position position} to a position moved by\n\t * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t *\n\t * @internal\n\t * @param position Beginning of the range.\n\t * @param shift How long the range should be.\n\t */ static _createFromPositionAndShift(position, shift) {\n        const start = position;\n        const end = position.getShiftedBy(shift);\n        return shift > 0 ? new this(start, end) : new this(end, start);\n    }\n    /**\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @internal\n\t * @param element Element which is a parent for the range.\n\t */ static _createIn(element) {\n        return this._createFromParentsAndOffsets(element, 0, element, element.childCount);\n    }\n    /**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t *\n\t * @internal\n\t */ static _createOn(item) {\n        const size = item.is('$textProxy') ? item.offsetSize : 1;\n        return this._createFromPositionAndShift(Position$1._createBefore(item), size);\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nRange$1.prototype.is = function(type) {\n    return type === 'range' || type === 'view:range';\n};\n/**\n * Function used by getEnlarged and getTrimmed methods.\n */ function enlargeTrimSkip(value) {\n    if (value.item.is('attributeElement') || value.item.is('uiElement')) {\n        return true;\n    }\n    return false;\n}\n\n/**\n * Class representing an arbirtary selection in the view.\n * See also {@link module:engine/view/documentselection~DocumentSelection}.\n *\n * New selection instances can be created via the constructor or one these methods:\n *\n * * {@link module:engine/view/view~View#createSelection `View#createSelection()`},\n * * {@link module:engine/view/upcastwriter~UpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n *\n * A selection can consist of {@link module:engine/view/range~Range ranges} that can be set by using\n * the {@link module:engine/view/selection~Selection#setTo `Selection#setTo()`} method.\n */ let Selection$1 = class Selection extends /* #__PURE__ */ EmitterMixin(TypeCheckable$1) {\n    /**\n\t * Stores all ranges that are selected.\n\t */ _ranges;\n    /**\n\t * Specifies whether the last added range was added as a backward or forward range.\n\t */ _lastRangeBackward;\n    /**\n\t * Specifies whether selection instance is fake.\n\t */ _isFake;\n    /**\n\t * Fake selection's label.\n\t */ _fakeSelectionLabel;\n    /**\n\t * Creates new selection instance.\n\t *\n\t * **Note**: The selection constructor is available as a factory method:\n\t *\n\t * * {@link module:engine/view/view~View#createSelection `View#createSelection()`},\n\t * * {@link module:engine/view/upcastwriter~UpcastWriter#createSelection `UpcastWriter#createSelection()`}.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = writer.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = writer.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * const selection = writer.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = writer.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the document selection.\n\t * const selection = writer.createSelection( editor.editing.view.document.selection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * const selection = writer.createSelection( position );\n\t *\n\t * // Creates collapsed selection at the position of given item and offset.\n\t * const paragraph = writer.createContainerElement( 'paragraph' );\n\t * const selection = writer.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/view/element~Element element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = writer.createSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection`'s constructor allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * const selection = writer.createSelection( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * @internal\n\t */ constructor(...args){\n        super();\n        this._ranges = [];\n        this._lastRangeBackward = false;\n        this._isFake = false;\n        this._fakeSelectionLabel = '';\n        if (args.length) {\n            this.setTo(...args);\n        }\n    }\n    /**\n\t * Returns true if selection instance is marked as `fake`.\n\t *\n\t * @see #setTo\n\t */ get isFake() {\n        return this._isFake;\n    }\n    /**\n\t * Returns fake selection label.\n\t *\n\t * @see #setTo\n\t */ get fakeSelectionLabel() {\n        return this._fakeSelectionLabel;\n    }\n    /**\n\t * Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t * {@link #focus focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t * It may be a bit unintuitive when there are multiple ranges in selection.\n\t *\n\t * @see #focus\n\t */ get anchor() {\n        if (!this._ranges.length) {\n            return null;\n        }\n        const range = this._ranges[this._ranges.length - 1];\n        const anchor = this._lastRangeBackward ? range.end : range.start;\n        return anchor.clone();\n    }\n    /**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * @see #anchor\n\t */ get focus() {\n        if (!this._ranges.length) {\n            return null;\n        }\n        const range = this._ranges[this._ranges.length - 1];\n        const focus = this._lastRangeBackward ? range.start : range.end;\n        return focus.clone();\n    }\n    /**\n\t * Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t */ get isCollapsed() {\n        return this.rangeCount === 1 && this._ranges[0].isCollapsed;\n    }\n    /**\n\t * Returns number of ranges in selection.\n\t */ get rangeCount() {\n        return this._ranges.length;\n    }\n    /**\n\t * Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t */ get isBackward() {\n        return !this.isCollapsed && this._lastRangeBackward;\n    }\n    /**\n\t * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this selection, or `null`\n\t * if the selection is not inside an editable element.\n\t */ get editableElement() {\n        if (this.anchor) {\n            return this.anchor.editableElement;\n        }\n        return null;\n    }\n    /**\n\t * Returns an iterable that contains copies of all ranges added to the selection.\n\t */ *getRanges() {\n        for (const range of this._ranges){\n            yield range.clone();\n        }\n    }\n    /**\n\t * Returns copy of the first range in the selection. First range is the one which\n\t * {@link module:engine/view/range~Range#start start} position {@link module:engine/view/position~Position#isBefore is before} start\n\t * position of all other ranges (not to confuse with the first range added to the selection).\n\t * Returns `null` if no ranges are added to selection.\n\t */ getFirstRange() {\n        let first = null;\n        for (const range of this._ranges){\n            if (!first || range.start.isBefore(first.start)) {\n                first = range;\n            }\n        }\n        return first ? first.clone() : null;\n    }\n    /**\n\t * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~Range#end end}\n\t * position {@link module:engine/view/position~Position#isAfter is after} end position of all other ranges (not to confuse\n\t * with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t */ getLastRange() {\n        let last = null;\n        for (const range of this._ranges){\n            if (!last || range.end.isAfter(last.end)) {\n                last = range;\n            }\n        }\n        return last ? last.clone() : null;\n    }\n    /**\n\t * Returns copy of the first position in the selection. First position is the position that\n\t * {@link module:engine/view/position~Position#isBefore is before} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */ getFirstPosition() {\n        const firstRange = this.getFirstRange();\n        return firstRange ? firstRange.start.clone() : null;\n    }\n    /**\n\t * Returns copy of the last position in the selection. Last position is the position that\n\t * {@link module:engine/view/position~Position#isAfter is after} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */ getLastPosition() {\n        const lastRange = this.getLastRange();\n        return lastRange ? lastRange.end.clone() : null;\n    }\n    /**\n\t * Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t * same number of ranges and all ranges from one selection equal to a range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are equal, `false` otherwise.\n\t */ isEqual(otherSelection) {\n        if (this.isFake != otherSelection.isFake) {\n            return false;\n        }\n        if (this.isFake && this.fakeSelectionLabel != otherSelection.fakeSelectionLabel) {\n            return false;\n        }\n        if (this.rangeCount != otherSelection.rangeCount) {\n            return false;\n        } else if (this.rangeCount === 0) {\n            return true;\n        }\n        if (!this.anchor.isEqual(otherSelection.anchor) || !this.focus.isEqual(otherSelection.focus)) {\n            return false;\n        }\n        for (const thisRange of this._ranges){\n            let found = false;\n            for (const otherRange of otherSelection._ranges){\n                if (thisRange.isEqual(otherRange)) {\n                    found = true;\n                    break;\n                }\n            }\n            if (!found) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t * number of ranges, and all {@link module:engine/view/range~Range#getTrimmed trimmed} ranges from one selection are\n\t * equal to any trimmed range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are similar, `false` otherwise.\n\t */ isSimilar(otherSelection) {\n        if (this.isBackward != otherSelection.isBackward) {\n            return false;\n        }\n        const numOfRangesA = count(this.getRanges());\n        const numOfRangesB = count(otherSelection.getRanges());\n        // If selections have different number of ranges, they cannot be similar.\n        if (numOfRangesA != numOfRangesB) {\n            return false;\n        }\n        // If both selections have no ranges, they are similar.\n        if (numOfRangesA == 0) {\n            return true;\n        }\n        // Check if each range in one selection has a similar range in other selection.\n        for (let rangeA of this.getRanges()){\n            rangeA = rangeA.getTrimmed();\n            let found = false;\n            for (let rangeB of otherSelection.getRanges()){\n                rangeB = rangeB.getTrimmed();\n                if (rangeA.start.isEqual(rangeB.start) && rangeA.end.isEqual(rangeB.end)) {\n                    found = true;\n                    break;\n                }\n            }\n            // For `rangeA`, neither range in `otherSelection` was similar. So selections are not similar.\n            if (!found) {\n                return false;\n            }\n        }\n        // There were no ranges that weren't matched. Selections are similar.\n        return true;\n    }\n    /**\n\t * Returns the selected element. {@link module:engine/view/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */ getSelectedElement() {\n        if (this.rangeCount !== 1) {\n            return null;\n        }\n        return this.getFirstRange().getContainedElement();\n    }\n    /**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/view/selection~Selectable selectable}.\n\t *\n\t * ```ts\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * selection.setTo( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * selection.setTo( range );\n\t *\n\t * // Sets selection to the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * selection.setTo( otherSelection );\n\t *\n\t * // Sets selection to contents of DocumentSelection.\n\t * selection.setTo( editor.editing.view.document.selection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPositionAt( root, path );\n\t * selection.setTo( position );\n\t *\n\t * // Sets collapsed selection at the position of given item and offset.\n\t * selection.setTo( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'on' );\n\t *\n\t * // Clears selection. Removes all ranges.\n\t * selection.setTo( null );\n\t * ```\n\t *\n\t * `Selection#setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * selection.setTo( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * selection.setTo( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * @fires change\n\t */ setTo(...args) {\n        let [selectable, placeOrOffset, options] = args;\n        if (typeof placeOrOffset == 'object') {\n            options = placeOrOffset;\n            placeOrOffset = undefined;\n        }\n        if (selectable === null) {\n            this._setRanges([]);\n            this._setFakeOptions(options);\n        } else if (selectable instanceof Selection || selectable instanceof DocumentSelection$1) {\n            this._setRanges(selectable.getRanges(), selectable.isBackward);\n            this._setFakeOptions({\n                fake: selectable.isFake,\n                label: selectable.fakeSelectionLabel\n            });\n        } else if (selectable instanceof Range$1) {\n            this._setRanges([\n                selectable\n            ], options && options.backward);\n            this._setFakeOptions(options);\n        } else if (selectable instanceof Position$1) {\n            this._setRanges([\n                new Range$1(selectable)\n            ]);\n            this._setFakeOptions(options);\n        } else if (selectable instanceof Node$2) {\n            const backward = !!options && !!options.backward;\n            let range;\n            if (placeOrOffset === undefined) {\n                /**\n\t\t\t\t * selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t\t *\n\t\t\t\t * @error view-selection-setto-required-second-parameter\n\t\t\t\t */ throw new CKEditorError('view-selection-setto-required-second-parameter', this);\n            } else if (placeOrOffset == 'in') {\n                range = Range$1._createIn(selectable);\n            } else if (placeOrOffset == 'on') {\n                range = Range$1._createOn(selectable);\n            } else {\n                range = new Range$1(Position$1._createAt(selectable, placeOrOffset));\n            }\n            this._setRanges([\n                range\n            ], backward);\n            this._setFakeOptions(options);\n        } else if (isIterable(selectable)) {\n            // We assume that the selectable is an iterable of ranges.\n            // Array.from() is used to prevent setting ranges to the old iterable\n            this._setRanges(selectable, options && options.backward);\n            this._setFakeOptions(options);\n        } else {\n            /**\n\t\t\t * Cannot set selection to given place.\n\t\t\t *\n\t\t\t * @error view-selection-setto-not-selectable\n\t\t\t */ throw new CKEditorError('view-selection-setto-not-selectable', this);\n        }\n        this.fire('change');\n    }\n    /**\n\t * Moves {@link #focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @fires change\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~Item view item}.\n\t */ setFocus(itemOrPosition, offset) {\n        if (this.anchor === null) {\n            /**\n\t\t\t * Cannot set selection focus if there are no ranges in selection.\n\t\t\t *\n\t\t\t * @error view-selection-setfocus-no-ranges\n\t\t\t */ throw new CKEditorError('view-selection-setfocus-no-ranges', this);\n        }\n        const newFocus = Position$1._createAt(itemOrPosition, offset);\n        if (newFocus.compareWith(this.focus) == 'same') {\n            return;\n        }\n        const anchor = this.anchor;\n        this._ranges.pop();\n        if (newFocus.compareWith(anchor) == 'before') {\n            this._addRange(new Range$1(newFocus, anchor), true);\n        } else {\n            this._addRange(new Range$1(anchor, newFocus));\n        }\n        this.fire('change');\n    }\n    /**\n\t * Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t * is treated like the last added range and is used to set {@link #anchor anchor} and {@link #focus focus}.\n\t * Accepts a flag describing in which way the selection is made.\n\t *\n\t * @param newRanges Iterable object of ranges to set.\n\t * @param isLastBackward Flag describing if last added range was selected forward - from start to end\n\t * (`false`) or backward - from end to start (`true`). Defaults to `false`.\n\t */ _setRanges(newRanges, isLastBackward = false) {\n        // New ranges should be copied to prevent removing them by setting them to `[]` first.\n        // Only applies to situations when selection is set to the same selection or same selection's ranges.\n        newRanges = Array.from(newRanges);\n        this._ranges = [];\n        for (const range of newRanges){\n            this._addRange(range);\n        }\n        this._lastRangeBackward = !!isLastBackward;\n    }\n    /**\n\t * Sets this selection instance to be marked as `fake`. A fake selection does not render as browser native selection\n\t * over selected elements and is hidden to the user. This way, no native selection UI artifacts are displayed to\n\t * the user and selection over elements can be represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM (and be\n\t * properly handled by screen readers).\n\t */ _setFakeOptions(options = {}) {\n        this._isFake = !!options.fake;\n        this._fakeSelectionLabel = options.fake ? options.label || '' : '';\n    }\n    /**\n\t * Adds a range to the selection. Added range is copied. This means that passed range is not saved in the\n\t * selection instance and you can safely operate on it.\n\t *\n\t * Accepts a flag describing in which way the selection is made - passed range might be selected from\n\t * {@link module:engine/view/range~Range#start start} to {@link module:engine/view/range~Range#end end}\n\t * or from {@link module:engine/view/range~Range#end end} to {@link module:engine/view/range~Range#start start}.\n\t * The flag is used to set {@link #anchor anchor} and {@link #focus focus} properties.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t * with ranges already stored in Selection instance.\n\t */ _addRange(range, isBackward = false) {\n        if (!(range instanceof Range$1)) {\n            /**\n\t\t\t * Selection range set to an object that is not an instance of {@link module:engine/view/range~Range}.\n\t\t\t *\n\t\t\t * @error view-selection-add-range-not-range\n\t\t\t */ throw new CKEditorError('view-selection-add-range-not-range', this);\n        }\n        this._pushRange(range);\n        this._lastRangeBackward = !!isBackward;\n    }\n    /**\n\t * Adds range to selection - creates copy of given range so it can be safely used and modified.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects\n\t * with ranges already stored in selection instance.\n\t */ _pushRange(range) {\n        for (const storedRange of this._ranges){\n            if (range.isIntersecting(storedRange)) {\n                /**\n\t\t\t\t * Trying to add a range that intersects with another range from selection.\n\t\t\t\t *\n\t\t\t\t * @error view-selection-range-intersects\n\t\t\t\t * @param {module:engine/view/range~Range} addedRange Range that was added to the selection.\n\t\t\t\t * @param {module:engine/view/range~Range} intersectingRange Range from selection that intersects with `addedRange`.\n\t\t\t\t */ throw new CKEditorError('view-selection-range-intersects', this, {\n                    addedRange: range,\n                    intersectingRange: storedRange\n                });\n            }\n        }\n        this._ranges.push(new Range$1(range.start, range.end));\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nSelection$1.prototype.is = function(type) {\n    return type === 'selection' || type === 'view:selection';\n};\n\n/**\n * Class representing the document selection in the view.\n *\n * Its instance is available in {@link module:engine/view/document~Document#selection `Document#selection`}.\n *\n * It is similar to {@link module:engine/view/selection~Selection} but\n * it has a read-only API and can be modified only by the writer available in\n * the {@link module:engine/view/view~View#change `View#change()`} block\n * (so via {@link module:engine/view/downcastwriter~DowncastWriter#setSelection `DowncastWriter#setSelection()`}).\n */ let DocumentSelection$1 = class DocumentSelection extends /* #__PURE__ */ EmitterMixin(TypeCheckable$1) {\n    /**\n\t * Selection is used internally (`DocumentSelection` is a proxy to that selection).\n\t */ _selection;\n    constructor(...args){\n        super();\n        this._selection = new Selection$1();\n        // Delegate change event to be fired on DocumentSelection instance.\n        this._selection.delegate('change').to(this);\n        // Set selection data.\n        if (args.length) {\n            this._selection.setTo(...args);\n        }\n    }\n    /**\n\t * Returns true if selection instance is marked as `fake`.\n\t *\n\t * @see #_setTo\n\t */ get isFake() {\n        return this._selection.isFake;\n    }\n    /**\n\t * Returns fake selection label.\n\t *\n\t * @see #_setTo\n\t */ get fakeSelectionLabel() {\n        return this._selection.fakeSelectionLabel;\n    }\n    /**\n\t * Selection anchor. Anchor may be described as a position where the selection starts. Together with\n\t * {@link #focus focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.\n\t * It may be a bit unintuitive when there are multiple ranges in selection.\n\t *\n\t * @see #focus\n\t */ get anchor() {\n        return this._selection.anchor;\n    }\n    /**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * @see #anchor\n\t */ get focus() {\n        return this._selection.focus;\n    }\n    /**\n\t * Returns whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t */ get isCollapsed() {\n        return this._selection.isCollapsed;\n    }\n    /**\n\t * Returns number of ranges in selection.\n\t */ get rangeCount() {\n        return this._selection.rangeCount;\n    }\n    /**\n\t * Specifies whether the {@link #focus} precedes {@link #anchor}.\n\t */ get isBackward() {\n        return this._selection.isBackward;\n    }\n    /**\n\t * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this selection, or `null`\n\t * if the selection is not inside an editable element.\n\t */ get editableElement() {\n        return this._selection.editableElement;\n    }\n    /**\n\t * Used for the compatibility with the {@link module:engine/view/selection~Selection#isEqual} method.\n\t *\n\t * @internal\n\t */ get _ranges() {\n        return this._selection._ranges;\n    }\n    /**\n\t * Returns an iterable that contains copies of all ranges added to the selection.\n\t */ *getRanges() {\n        yield* this._selection.getRanges();\n    }\n    /**\n\t * Returns copy of the first range in the selection. First range is the one which\n\t * {@link module:engine/view/range~Range#start start} position {@link module:engine/view/position~Position#isBefore is before} start\n\t * position of all other ranges (not to confuse with the first range added to the selection).\n\t * Returns `null` if no ranges are added to selection.\n\t */ getFirstRange() {\n        return this._selection.getFirstRange();\n    }\n    /**\n\t * Returns copy of the last range in the selection. Last range is the one which {@link module:engine/view/range~Range#end end}\n\t * position {@link module:engine/view/position~Position#isAfter is after} end position of all other ranges (not to confuse\n\t * with the last range added to the selection). Returns `null` if no ranges are added to selection.\n\t */ getLastRange() {\n        return this._selection.getLastRange();\n    }\n    /**\n\t * Returns copy of the first position in the selection. First position is the position that\n\t * {@link module:engine/view/position~Position#isBefore is before} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */ getFirstPosition() {\n        return this._selection.getFirstPosition();\n    }\n    /**\n\t * Returns copy of the last position in the selection. Last position is the position that\n\t * {@link module:engine/view/position~Position#isAfter is after} any other position in the selection ranges.\n\t * Returns `null` if no ranges are added to selection.\n\t */ getLastPosition() {\n        return this._selection.getLastPosition();\n    }\n    /**\n\t * Returns the selected element. {@link module:engine/view/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */ getSelectedElement() {\n        return this._selection.getSelectedElement();\n    }\n    /**\n\t * Checks whether, this selection is equal to given selection. Selections are equal if they have same directions,\n\t * same number of ranges and all ranges from one selection equal to a range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are equal, `false` otherwise.\n\t */ isEqual(otherSelection) {\n        return this._selection.isEqual(otherSelection);\n    }\n    /**\n\t * Checks whether this selection is similar to given selection. Selections are similar if they have same directions, same\n\t * number of ranges, and all {@link module:engine/view/range~Range#getTrimmed trimmed} ranges from one selection are\n\t * equal to any trimmed range from other selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are similar, `false` otherwise.\n\t */ isSimilar(otherSelection) {\n        return this._selection.isSimilar(otherSelection);\n    }\n    /**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/view/selection~Selectable selectable}.\n\t *\n\t * ```ts\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * documentSelection._setTo( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( start2, end2 ) ];\n\t * documentSelection._setTo( range );\n\t *\n\t * // Sets selection to the other selection.\n\t * const otherSelection = writer.createSelection();\n\t * documentSelection._setTo( otherSelection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPositionAt( root, offset );\n\t * documentSelection._setTo( position );\n\t *\n\t * // Sets collapsed selection at the position of given item and offset.\n\t * documentSelection._setTo( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * documentSelection._setTo( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on an {@link module:engine/view/item~Item item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * documentSelection._setTo( paragraph, 'on' );\n\t *\n\t * // Clears selection. Removes all ranges.\n\t * documentSelection._setTo( null );\n\t * ```\n\t *\n\t * `Selection#_setTo()` method allow passing additional options (`backward`, `fake` and `label`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets selection as backward.\n\t * documentSelection._setTo( range, { backward: true } );\n\t * ```\n\t *\n\t * Fake selection does not render as browser native selection over selected elements and is hidden to the user.\n\t * This way, no native selection UI artifacts are displayed to the user and selection over elements can be\n\t * represented in other way, for example by applying proper CSS class.\n\t *\n\t * Additionally fake's selection label can be provided. It will be used to des cribe fake selection in DOM\n\t * (and be  properly handled by screen readers).\n\t *\n\t * ```ts\n\t * // Creates fake selection with label.\n\t * documentSelection._setTo( range, { fake: true, label: 'foo' } );\n\t * ```\n\t *\n\t * @internal\n\t * @fires change\n\t */ _setTo(...args) {\n        this._selection.setTo(...args);\n    }\n    /**\n\t * Moves {@link #focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @internal\n\t * @fires change\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~Item view item}.\n\t */ _setFocus(itemOrPosition, offset) {\n        this._selection.setFocus(itemOrPosition, offset);\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nDocumentSelection$1.prototype.is = function(type) {\n    return type === 'selection' || type == 'documentSelection' || type == 'view:selection' || type == 'view:documentSelection';\n};\n\n/**\n * The event object passed to bubbling event callbacks. It is used to provide information about the event as well as a tool to\n * manipulate it.\n */ class BubblingEventInfo extends EventInfo {\n    /**\n\t * The view range that the bubbling should start from.\n\t */ startRange;\n    /**\n\t * The current event phase.\n\t */ _eventPhase;\n    /**\n\t * The current bubbling target.\n\t */ _currentTarget;\n    /**\n\t * @param source The emitter.\n\t * @param name The event name.\n\t * @param startRange The view range that the bubbling should start from.\n\t */ constructor(source, name, startRange){\n        super(source, name);\n        this.startRange = startRange;\n        this._eventPhase = 'none';\n        this._currentTarget = null;\n    }\n    /**\n\t * The current event phase.\n\t */ get eventPhase() {\n        return this._eventPhase;\n    }\n    /**\n\t * The current bubbling target.\n\t */ get currentTarget() {\n        return this._currentTarget;\n    }\n}\n\nconst contextsSymbol = Symbol('bubbling contexts');\n/**\n * Bubbling emitter mixin for the view document as described in the {@link ~BubblingEmitter} interface.\n *\n * This function creates a class that inherits from the provided `base` and implements `Emitter` interface.\n * The base class must implement {@link module:utils/emittermixin~Emitter} interface.\n *\n * ```ts\n * class BaseClass extends EmitterMixin() {\n * \t// ...\n * }\n *\n * class MyClass extends BubblingEmitterMixin( BaseClass ) {\n * \t// This class derives from `BaseClass` and implements the `BubblingEmitter` interface.\n * }\n * ```\n */ function BubblingEmitterMixin(base) {\n    class Mixin extends base {\n        fire(eventOrInfo, ...eventArgs) {\n            try {\n                const eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo(this, eventOrInfo);\n                const eventContexts = getBubblingContexts(this);\n                if (!eventContexts.size) {\n                    return;\n                }\n                updateEventInfo(eventInfo, 'capturing', this);\n                // The capture phase of the event.\n                if (fireListenerFor(eventContexts, '$capture', eventInfo, ...eventArgs)) {\n                    return eventInfo.return;\n                }\n                const startRange = eventInfo.startRange || this.selection.getFirstRange();\n                const selectedElement = startRange ? startRange.getContainedElement() : null;\n                const isCustomContext = selectedElement ? Boolean(getCustomContext(eventContexts, selectedElement)) : false;\n                let node = selectedElement || getDeeperRangeParent(startRange);\n                updateEventInfo(eventInfo, 'atTarget', node);\n                // For the not yet bubbling event trigger for $text node if selection can be there and it's not a custom context selected.\n                if (!isCustomContext) {\n                    if (fireListenerFor(eventContexts, '$text', eventInfo, ...eventArgs)) {\n                        return eventInfo.return;\n                    }\n                    updateEventInfo(eventInfo, 'bubbling', node);\n                }\n                while(node){\n                    // Root node handling.\n                    if (node.is('rootElement')) {\n                        if (fireListenerFor(eventContexts, '$root', eventInfo, ...eventArgs)) {\n                            return eventInfo.return;\n                        }\n                    } else if (node.is('element')) {\n                        if (fireListenerFor(eventContexts, node.name, eventInfo, ...eventArgs)) {\n                            return eventInfo.return;\n                        }\n                    }\n                    // Check custom contexts (i.e., a widget).\n                    if (fireListenerFor(eventContexts, node, eventInfo, ...eventArgs)) {\n                        return eventInfo.return;\n                    }\n                    node = node.parent;\n                    updateEventInfo(eventInfo, 'bubbling', node);\n                }\n                updateEventInfo(eventInfo, 'bubbling', this);\n                // Document context.\n                fireListenerFor(eventContexts, '$document', eventInfo, ...eventArgs);\n                return eventInfo.return;\n            } catch (err) {\n                // @if CK_DEBUG // throw err;\n                /* istanbul ignore next -- @preserve */ CKEditorError.rethrowUnexpectedError(err, this);\n            }\n        }\n        _addEventListener(event, callback, options) {\n            const contexts = toArray(options.context || '$document');\n            const eventContexts = getBubblingContexts(this);\n            for (const context of contexts){\n                let emitter = eventContexts.get(context);\n                if (!emitter) {\n                    emitter = new (EmitterMixin())();\n                    eventContexts.set(context, emitter);\n                }\n                this.listenTo(emitter, event, callback, options);\n            }\n        }\n        _removeEventListener(event, callback) {\n            const eventContexts = getBubblingContexts(this);\n            for (const emitter of eventContexts.values()){\n                this.stopListening(emitter, event, callback);\n            }\n        }\n    }\n    return Mixin;\n}\n// Backward compatibility with `mix`.\n{\n    const mixin = BubblingEmitterMixin(Object);\n    [\n        'fire',\n        '_addEventListener',\n        '_removeEventListener'\n    ].forEach((key)=>{\n        BubblingEmitterMixin[key] = mixin.prototype[key];\n    });\n}/**\n * Update the event info bubbling fields.\n *\n * @param eventInfo The event info object to update.\n * @param eventPhase The current event phase.\n * @param currentTarget The current bubbling target.\n */ function updateEventInfo(eventInfo, eventPhase, currentTarget) {\n    if (eventInfo instanceof BubblingEventInfo) {\n        eventInfo._eventPhase = eventPhase;\n        eventInfo._currentTarget = currentTarget;\n    }\n}\n/**\n * Fires the listener for the specified context. Returns `true` if event was stopped.\n *\n * @param eventInfo The `EventInfo` object.\n * @param eventArgs Additional arguments to be passed to the callbacks.\n * @returns True if event stop was called.\n */ function fireListenerFor(eventContexts, context, eventInfo, ...eventArgs) {\n    const emitter = typeof context == 'string' ? eventContexts.get(context) : getCustomContext(eventContexts, context);\n    if (!emitter) {\n        return false;\n    }\n    emitter.fire(eventInfo, ...eventArgs);\n    return eventInfo.stop.called;\n}\n/**\n * Returns an emitter for a specified view node.\n */ function getCustomContext(eventContexts, node) {\n    for (const [context, emitter] of eventContexts){\n        if (typeof context == 'function' && context(node)) {\n            return emitter;\n        }\n    }\n    return null;\n}\n/**\n * Returns bubbling contexts map for the source (emitter).\n */ function getBubblingContexts(source) {\n    if (!source[contextsSymbol]) {\n        source[contextsSymbol] = new Map();\n    }\n    return source[contextsSymbol];\n}\n/**\n * Returns the deeper parent element for the range.\n */ function getDeeperRangeParent(range) {\n    if (!range) {\n        return null;\n    }\n    const startParent = range.start.parent;\n    const endParent = range.end.parent;\n    const startPath = startParent.getPath();\n    const endPath = endParent.getPath();\n    return startPath.length > endPath.length ? startParent : endParent;\n}\n\n// @if CK_DEBUG_ENGINE // const { logDocument } = require( '../dev-utils/utils' );\n/**\n * Document class creates an abstract layer over the content editable area, contains a tree of view elements and\n * {@link module:engine/view/documentselection~DocumentSelection view selection} associated with this document.\n */ let Document$1 = class Document extends /* #__PURE__ */ BubblingEmitterMixin(/* #__PURE__ */ ObservableMixin()) {\n    /**\n\t * Selection done on this document.\n\t */ selection;\n    /**\n\t * Roots of the view tree. Collection of the {@link module:engine/view/element~Element view elements}.\n\t *\n\t * View roots are created as a result of binding between {@link module:engine/view/document~Document#roots} and\n\t * {@link module:engine/model/document~Document#roots} and this is handled by\n\t * {@link module:engine/controller/editingcontroller~EditingController}, so to create view root we need to create\n\t * model root using {@link module:engine/model/document~Document#createRoot}.\n\t */ roots;\n    /**\n\t * The styles processor instance used by this document when normalizing styles.\n\t */ stylesProcessor;\n    /**\n\t * Post-fixer callbacks registered to the view document.\n\t */ _postFixers = new Set();\n    /**\n\t * Creates a Document instance.\n\t *\n\t * @param stylesProcessor The styles processor instance.\n\t */ constructor(stylesProcessor){\n        super();\n        this.selection = new DocumentSelection$1();\n        this.roots = new Collection({\n            idProperty: 'rootName'\n        });\n        this.stylesProcessor = stylesProcessor;\n        this.set('isReadOnly', false);\n        this.set('isFocused', false);\n        this.set('isSelecting', false);\n        this.set('isComposing', false);\n    }\n    /**\n\t * Gets a {@link module:engine/view/document~Document#roots view root element} with the specified name. If the name is not\n\t * specific \"main\" root is returned.\n\t *\n\t * @param name Name of the root.\n\t * @returns The view root element with the specified name or null when there is no root of given name.\n\t */ getRoot(name = 'main') {\n        return this.roots.get(name);\n    }\n    /**\n\t * Allows registering post-fixer callbacks. A post-fixers mechanism allows to update the view tree just before it is rendered\n\t * to the DOM.\n\t *\n\t * Post-fixers are executed right after all changes from the outermost change block were applied but\n\t * before the {@link module:engine/view/view~View#event:render render event} is fired. If a post-fixer callback made\n\t * a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should\n\t * not be fixed in the new document tree state.\n\t *\n\t * View post-fixers are useful when you want to apply some fixes whenever the view structure changes. Keep in mind that\n\t * changes executed in a view post-fixer should not break model-view mapping.\n\t *\n\t * The types of changes which should be safe:\n\t *\n\t * * adding or removing attribute from elements,\n\t * * changes inside of {@link module:engine/view/uielement~UIElement UI elements},\n\t * * {@link module:engine/controller/editingcontroller~EditingController#reconvertItem marking some of the model elements to be\n\t * re-converted}.\n\t *\n\t * Try to avoid changes which touch view structure:\n\t *\n\t * * you should not add or remove nor wrap or unwrap any view elements,\n\t * * you should not change the editor data model in a view post-fixer.\n\t *\n\t * As a parameter, a post-fixer callback receives a {@link module:engine/view/downcastwriter~DowncastWriter downcast writer}.\n\t *\n\t * Typically, a post-fixer will look like this:\n\t *\n\t * ```ts\n\t * editor.editing.view.document.registerPostFixer( writer => {\n\t * \tif ( checkSomeCondition() ) {\n\t * \t\twriter.doSomething();\n\t *\n\t * \t\t// Let other post-fixers know that something changed.\n\t * \t\treturn true;\n\t * \t}\n\t *\n\t * \treturn false;\n\t * } );\n\t * ```\n\t *\n\t * Note that nothing happens right after you register a post-fixer (e.g. execute such a code in the console).\n\t * That is because adding a post-fixer does not execute it.\n\t * The post-fixer will be executed as soon as any change in the document needs to cause its rendering.\n\t * If you want to re-render the editor's view after registering the post-fixer then you should do it manually by calling\n\t * {@link module:engine/view/view~View#forceRender `view.forceRender()`}.\n\t *\n\t * If you need to register a callback which is executed when DOM elements are already updated,\n\t * use {@link module:engine/view/view~View#event:render render event}.\n\t */ registerPostFixer(postFixer) {\n        this._postFixers.add(postFixer);\n    }\n    /**\n\t * Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t */ destroy() {\n        this.roots.forEach((root)=>root.destroy());\n        this.stopListening();\n    }\n    /**\n\t * Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.\n\t *\n\t * @internal\n\t */ _callPostFixers(writer) {\n        let wasFixed = false;\n        do {\n            for (const callback of this._postFixers){\n                wasFixed = callback(writer);\n                if (wasFixed) {\n                    break;\n                }\n            }\n        }while (wasFixed)\n    }\n};\n\n// Default attribute priority.\nconst DEFAULT_PRIORITY = 10;\n/**\n * Attribute elements are used to represent formatting elements in the view (think – `<b>`, `<span style=\"font-size: 2em\">`, etc.).\n * Most often they are created when downcasting model text attributes.\n *\n * Editing engine does not define a fixed HTML DTD. This is why a feature developer needs to choose between various\n * types (container element, {@link module:engine/view/attributeelement~AttributeElement attribute element},\n * {@link module:engine/view/emptyelement~EmptyElement empty element}, etc) when developing a feature.\n *\n * To create a new attribute element instance use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement `DowncastWriter#createAttributeElement()`} method.\n */ class AttributeElement extends Element$1 {\n    static DEFAULT_PRIORITY = DEFAULT_PRIORITY;\n    /**\n\t * Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t *\n\t * @internal\n\t * @readonly\n\t */ _priority = DEFAULT_PRIORITY;\n    /**\n\t * Element identifier. If set, it is used by {@link module:engine/view/element~Element#isSimilar},\n\t * and then two elements are considered similar if, and only if they have the same `_id`.\n\t *\n\t * @internal\n\t * @readonly\n\t */ _id = null;\n    /**\n\t * Keeps all the attribute elements that have the same {@link module:engine/view/attributeelement~AttributeElement#id ids}\n\t * and still exist in the view tree.\n\t *\n\t * This property is managed by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t */ _clonesGroup = null;\n    /**\n\t * Creates an attribute element.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createAttributeElement\n\t * @see module:engine/view/element~Element\n\t * @protected\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */ constructor(document, name, attrs, children){\n        super(document, name, attrs, children);\n        this.getFillerOffset = getFillerOffset$3;\n    }\n    /**\n\t * Element priority. Decides in what order elements are wrapped by {@link module:engine/view/downcastwriter~DowncastWriter}.\n\t */ get priority() {\n        return this._priority;\n    }\n    /**\n\t * Element identifier. If set, it is used by {@link module:engine/view/element~Element#isSimilar},\n\t * and then two elements are considered similar if, and only if they have the same `id`.\n\t */ get id() {\n        return this._id;\n    }\n    /**\n\t * Returns all {@link module:engine/view/attributeelement~AttributeElement attribute elements} that has the\n\t * same {@link module:engine/view/attributeelement~AttributeElement#id id} and are in the view tree (were not removed).\n\t *\n\t * Note: If this element has been removed from the tree, returned set will not include it.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError attribute-element-get-elements-with-same-id-no-id}\n\t * if this element has no `id`.\n\t *\n\t * @returns Set containing all the attribute elements\n\t * with the same `id` that were added and not removed from the view tree.\n\t */ getElementsWithSameId() {\n        if (this.id === null) {\n            /**\n\t\t\t * Cannot get elements with the same id for an attribute element without id.\n\t\t\t *\n\t\t\t * @error attribute-element-get-elements-with-same-id-no-id\n\t\t\t */ throw new CKEditorError('attribute-element-get-elements-with-same-id-no-id', this);\n        }\n        return new Set(this._clonesGroup);\n    }\n    /**\n\t * Checks if this element is similar to other element.\n\t *\n\t * If none of elements has set {@link module:engine/view/attributeelement~AttributeElement#id}, then both elements\n\t * should have the same name, attributes and priority to be considered as similar. Two similar elements can contain\n\t * different set of children nodes.\n\t *\n\t * If at least one element has {@link module:engine/view/attributeelement~AttributeElement#id} set, then both\n\t * elements have to have the same {@link module:engine/view/attributeelement~AttributeElement#id} value to be\n\t * considered similar.\n\t *\n\t * Similarity is important for {@link module:engine/view/downcastwriter~DowncastWriter}. For example:\n\t *\n\t * * two following similar elements can be merged together into one, longer element,\n\t * * {@link module:engine/view/downcastwriter~DowncastWriter#unwrap} checks similarity of passed element and processed element to\n\t * decide whether processed element should be unwrapped,\n\t * * etc.\n\t */ isSimilar(otherElement) {\n        // If any element has an `id` set, just compare the ids.\n        if (this.id !== null || otherElement.id !== null) {\n            return this.id === otherElement.id;\n        }\n        return super.isSimilar(otherElement) && this.priority == otherElement.priority;\n    }\n    /**\n\t * Clones provided element with priority.\n\t *\n\t * @internal\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns Clone of this element.\n\t */ _clone(deep = false) {\n        const cloned = super._clone(deep);\n        // Clone priority too.\n        cloned._priority = this._priority;\n        // And id too.\n        cloned._id = this._id;\n        return cloned;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nAttributeElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'attributeElement' || type === 'view:attributeElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'element' || type === 'view:element');\n    }\n};\n/**\n * Returns block {@link module:engine/view/filler~Filler filler} offset or `null` if block filler is not needed.\n *\n * @returns Block filler offset or `null` if block filler is not needed.\n */ function getFillerOffset$3() {\n    // <b>foo</b> does not need filler.\n    if (nonUiChildrenCount(this)) {\n        return null;\n    }\n    let element = this.parent;\n    // <p><b></b></p> needs filler -> <p><b><br></b></p>\n    while(element && element.is('attributeElement')){\n        if (nonUiChildrenCount(element) > 1) {\n            return null;\n        }\n        element = element.parent;\n    }\n    if (!element || nonUiChildrenCount(element) > 1) {\n        return null;\n    }\n    // Render block filler at the end of element (after all ui elements).\n    return this.childCount;\n}\n/**\n * Returns total count of children that are not {@link module:engine/view/uielement~UIElement UIElements}.\n */ function nonUiChildrenCount(element) {\n    return Array.from(element.getChildren()).filter((element)=>!element.is('uiElement')).length;\n}\n\n/**\n * Empty element class. It is used to represent elements that cannot contain any child nodes (for example `<img>` elements).\n *\n * To create a new empty element use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement `downcastWriter#createEmptyElement()`} method.\n */ class EmptyElement extends Element$1 {\n    /**\n\t * Creates new instance of EmptyElement.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` when third parameter is passed,\n\t * to inform that usage of EmptyElement is incorrect (adding child nodes to EmptyElement is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createEmptyElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */ constructor(document, name, attributes, children){\n        super(document, name, attributes, children);\n        this.getFillerOffset = getFillerOffset$2;\n    }\n    /**\n\t * Overrides {@link module:engine/view/element~Element#_insertChild} method.\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-emptyelement-cannot-add` to prevent\n\t * adding any child nodes to EmptyElement.\n\t *\n\t * @internal\n\t */ _insertChild(index, items) {\n        if (items && (items instanceof Node$2 || Array.from(items).length > 0)) {\n            /**\n\t\t\t * Cannot add children to {@link module:engine/view/emptyelement~EmptyElement}.\n\t\t\t *\n\t\t\t * @error view-emptyelement-cannot-add\n\t\t\t */ throw new CKEditorError('view-emptyelement-cannot-add', [\n                this,\n                items\n            ]);\n        }\n        return 0;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nEmptyElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'emptyElement' || type === 'view:emptyElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'emptyElement' || type === 'view:emptyElement' || type === 'element' || type === 'view:element');\n    }\n};\n/**\n * Returns `null` because block filler is not needed for EmptyElements.\n */ function getFillerOffset$2() {\n    return null;\n}\n\n/**\n * UI element class. It should be used to represent editing UI which needs to be injected into the editing view\n * If possible, you should keep your UI outside the editing view. However, if that is not possible,\n * UI elements can be used.\n *\n * How a UI element is rendered is in your control (you pass a callback to\n * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `downcastWriter#createUIElement()`}).\n * The editor will ignore your UI element – the selection cannot be placed in it, it is skipped (invisible) when\n * the user modifies the selection by using arrow keys and the editor does not listen to any mutations which\n * happen inside your UI elements.\n *\n * The limitation is that you cannot convert a model element to a UI element. UI elements need to be\n * created for {@link module:engine/model/markercollection~Marker markers} or as additinal elements\n * inside normal {@link module:engine/view/containerelement~ContainerElement container elements}.\n *\n * To create a new UI element use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `downcastWriter#createUIElement()`} method.\n */ class UIElement extends Element$1 {\n    /**\n\t * Creates new instance of UIElement.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` when third parameter is passed,\n\t * to inform that usage of UIElement is incorrect (adding child nodes to UIElement is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createUIElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */ constructor(document, name, attrs, children){\n        super(document, name, attrs, children);\n        this.getFillerOffset = getFillerOffset$1;\n    }\n    /**\n\t * Overrides {@link module:engine/view/element~Element#_insertChild} method.\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-uielement-cannot-add` to prevent adding any child nodes\n\t * to UIElement.\n\t *\n\t * @internal\n\t */ _insertChild(index, items) {\n        if (items && (items instanceof Node$2 || Array.from(items).length > 0)) {\n            /**\n\t\t\t * Cannot add children to {@link module:engine/view/uielement~UIElement}.\n\t\t\t *\n\t\t\t * @error view-uielement-cannot-add\n\t\t\t */ throw new CKEditorError('view-uielement-cannot-add', [\n                this,\n                items\n            ]);\n        }\n        return 0;\n    }\n    /**\n\t * Renders this {@link module:engine/view/uielement~UIElement} to DOM. This method is called by\n\t * {@link module:engine/view/domconverter~DomConverter}.\n\t * Do not use inheritance to create custom rendering method, replace `render()` method instead:\n\t *\n\t * ```ts\n\t * const myUIElement = downcastWriter.createUIElement( 'span' );\n\t * myUIElement.render = function( domDocument, domConverter ) {\n\t * \tconst domElement = this.toDomElement( domDocument );\n\t *\n\t * \tdomConverter.setContentOf( domElement, '<b>this is ui element</b>' );\n\t *\n\t * \treturn domElement;\n\t * };\n\t * ```\n\t *\n\t * If changes in your UI element should trigger some editor UI update you should call\n\t * the {@link module:ui/editorui/editorui~EditorUI#update `editor.ui.update()`} method\n\t * after rendering your UI element.\n\t *\n\t * @param domConverter Instance of the DomConverter used to optimize the output.\n\t */ render(domDocument, domConverter// eslint-disable-line @typescript-eslint/no-unused-vars\n    ) {\n        // Provide basic, default output.\n        return this.toDomElement(domDocument);\n    }\n    /**\n\t * Creates DOM element based on this view UIElement.\n\t * Note that each time this method is called new DOM element is created.\n\t */ toDomElement(domDocument) {\n        const domElement = domDocument.createElement(this.name);\n        for (const key of this.getAttributeKeys()){\n            domElement.setAttribute(key, this.getAttribute(key));\n        }\n        return domElement;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nUIElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'uiElement' || type === 'view:uiElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'uiElement' || type === 'view:uiElement' || type === 'element' || type === 'view:element');\n    }\n};\n/**\n * This function injects UI element handling to the given {@link module:engine/view/document~Document document}.\n *\n * A callback is added to {@link module:engine/view/document~Document#event:keydown document keydown event}.\n * The callback handles the situation when right arrow key is pressed and selection is collapsed before a UI element.\n * Without this handler, it would be impossible to \"jump over\" UI element using right arrow key.\n *\n * @param view View controller to which the quirks handling will be injected.\n */ function injectUiElementHandling(view) {\n    view.document.on('arrowKey', (evt, data)=>jumpOverUiElement(evt, data, view.domConverter), {\n        priority: 'low'\n    });\n}\n/**\n * Returns `null` because block filler is not needed for UIElements.\n */ function getFillerOffset$1() {\n    return null;\n}\n/**\n * Selection cannot be placed in a `UIElement`. Whenever it is placed there, it is moved before it. This\n * causes a situation when it is impossible to jump over `UIElement` using right arrow key, because the selection\n * ends up in ui element (in DOM) and is moved back to the left. This handler fixes this situation.\n */ function jumpOverUiElement(evt, data, domConverter) {\n    if (data.keyCode == keyCodes.arrowright) {\n        const domSelection = data.domTarget.ownerDocument.defaultView.getSelection();\n        const domSelectionCollapsed = domSelection.rangeCount == 1 && domSelection.getRangeAt(0).collapsed;\n        // Jump over UI element if selection is collapsed or shift key is pressed. These are the cases when selection would extend.\n        if (domSelectionCollapsed || data.shiftKey) {\n            const domParent = domSelection.focusNode;\n            const domOffset = domSelection.focusOffset;\n            const viewPosition = domConverter.domPositionToView(domParent, domOffset);\n            // In case if dom element is not converted to view or is not mapped or something. Happens for example in some tests.\n            if (viewPosition === null) {\n                return;\n            }\n            // Skip all following ui elements.\n            let jumpedOverAnyUiElement = false;\n            const nextViewPosition = viewPosition.getLastMatchingPosition((value)=>{\n                if (value.item.is('uiElement')) {\n                    // Remember that there was at least one ui element.\n                    jumpedOverAnyUiElement = true;\n                }\n                // Jump over ui elements, jump over empty attribute elements, move up from inside of attribute element.\n                if (value.item.is('uiElement') || value.item.is('attributeElement')) {\n                    return true;\n                }\n                // Don't jump over text or don't get out of container element.\n                return false;\n            });\n            // If anything has been skipped, fix position.\n            // This `if` could be possibly omitted but maybe it is better not to mess with DOM selection if not needed.\n            if (jumpedOverAnyUiElement) {\n                const newDomPosition = domConverter.viewPositionToDom(nextViewPosition);\n                if (domSelectionCollapsed) {\n                    // Selection was collapsed, so collapse it at further position.\n                    domSelection.collapse(newDomPosition.parent, newDomPosition.offset);\n                } else {\n                    // Selection was not collapse, so extend it instead of collapsing.\n                    domSelection.extend(newDomPosition.parent, newDomPosition.offset);\n                }\n            }\n        }\n    }\n}\n\n/**\n * The raw element class.\n *\n * The raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n * even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n * in the editor content without, for instance, worrying about compatibility with other editor features.\n * Raw elements are a perfect tool for integration with external frameworks and data sources.\n *\n * Unlike {@link module:engine/view/uielement~UIElement UI elements}, raw elements act like real editor\n * content (similar to {@link module:engine/view/containerelement~ContainerElement} or\n * {@link module:engine/view/emptyelement~EmptyElement}), they are considered by the editor selection and\n * {@link module:widget/utils~toWidget they can work as widgets}.\n *\n * To create a new raw element, use the\n * {@link module:engine/view/downcastwriter~DowncastWriter#createRawElement `downcastWriter#createRawElement()`} method.\n */ class RawElement extends Element$1 {\n    /**\n\t * Creates a new instance of a raw element.\n\t *\n\t * Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} when the `children`\n\t * parameter is passed to inform that the usage of `RawElement` is incorrect (adding child nodes to `RawElement` is forbidden).\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#createRawElement\n\t * @internal\n\t * @param document The document instance to which this element belongs.\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t */ constructor(document, name, attrs, children){\n        super(document, name, attrs, children);\n        // Returns `null` because filler is not needed for raw elements.\n        this.getFillerOffset = getFillerOffset;\n    }\n    /**\n\t * Overrides the {@link module:engine/view/element~Element#_insertChild} method.\n\t * Throws the `view-rawelement-cannot-add` {@link module:utils/ckeditorerror~CKEditorError CKEditorError} to prevent\n\t * adding any child nodes to a raw element.\n\t *\n\t * @internal\n\t */ _insertChild(index, items) {\n        if (items && (items instanceof Node$2 || Array.from(items).length > 0)) {\n            /**\n\t\t\t * Cannot add children to a {@link module:engine/view/rawelement~RawElement} instance.\n\t\t\t *\n\t\t\t * @error view-rawelement-cannot-add\n\t\t\t */ throw new CKEditorError('view-rawelement-cannot-add', [\n                this,\n                items\n            ]);\n        }\n        return 0;\n    }\n    /**\n\t * This allows rendering the children of a {@link module:engine/view/rawelement~RawElement} on the DOM level.\n\t * This method is called by the {@link module:engine/view/domconverter~DomConverter} with the raw DOM element\n\t * passed as an argument, leaving the number and shape of the children up to the integrator.\n\t *\n\t * This method **must be defined** for the raw element to work:\n\t *\n\t * ```ts\n\t * const myRawElement = downcastWriter.createRawElement( 'div' );\n\t *\n\t * myRawElement.render = function( domElement, domConverter ) {\n\t * \tdomConverter.setContentOf( domElement, '<b>This is the raw content of myRawElement.</b>' );\n\t * };\n\t * ```\n\t *\n\t * @param domElement The native DOM element representing the raw view element.\n\t * @param domConverter Instance of the DomConverter used to optimize the output.\n\t */ render(domElement, domConverter) {}\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nRawElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'rawElement' || type === 'view:rawElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === this.name || type === 'view:' + this.name || type === 'element' || type === 'view:element' || type === 'node' || type === 'view:node';\n    } else {\n        return name === this.name && (type === 'rawElement' || type === 'view:rawElement' || type === 'element' || type === 'view:element');\n    }\n};\n/**\n * Returns `null` because block filler is not needed for raw elements.\n */ function getFillerOffset() {\n    return null;\n}\n\n/**\n * Document fragment.\n *\n * To create a new document fragment instance use the\n * {@link module:engine/view/upcastwriter~UpcastWriter#createDocumentFragment `UpcastWriter#createDocumentFragment()`}\n * method.\n */ let DocumentFragment$1 = class DocumentFragment extends /* #__PURE__ */ EmitterMixin(TypeCheckable$1) {\n    /**\n\t * The document to which this document fragment belongs.\n\t */ document;\n    /**\n\t * Array of child nodes.\n\t */ _children = [];\n    /**\n\t * Map of custom properties.\n\t * Custom properties can be added to document fragment instance.\n\t */ _customProperties = new Map();\n    /**\n\t * Creates new DocumentFragment instance.\n\t *\n\t * @internal\n\t * @param document The document to which this document fragment belongs.\n\t * @param children A list of nodes to be inserted into the created document fragment.\n\t */ constructor(document, children){\n        super();\n        this.document = document;\n        if (children) {\n            this._insertChild(0, children);\n        }\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * Iterates over nodes added to this document fragment.\n\t */ [Symbol.iterator]() {\n        return this._children[Symbol.iterator]();\n    }\n    /**\n\t * Number of child nodes in this document fragment.\n\t */ get childCount() {\n        return this._children.length;\n    }\n    /**\n\t * Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t */ get isEmpty() {\n        return this.childCount === 0;\n    }\n    /**\n\t * Artificial root of `DocumentFragment`. Returns itself. Added for compatibility reasons.\n\t */ get root() {\n        return this;\n    }\n    /**\n\t * Artificial parent of `DocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t */ get parent() {\n        return null;\n    }\n    /**\n\t * Artificial element name. Returns `undefined`. Added for compatibility reasons.\n\t */ get name() {\n        return undefined;\n    }\n    /**\n\t * Artificial element getFillerOffset. Returns `undefined`. Added for compatibility reasons.\n\t */ get getFillerOffset() {\n        return undefined;\n    }\n    /**\n\t * Returns the custom property value for the given key.\n\t */ getCustomProperty(key) {\n        return this._customProperties.get(key);\n    }\n    /**\n\t * Returns an iterator which iterates over this document fragment's custom properties.\n\t * Iterator provides `[ key, value ]` pairs for each stored property.\n\t */ *getCustomProperties() {\n        yield* this._customProperties.entries();\n    }\n    /**\n\t * {@link module:engine/view/documentfragment~DocumentFragment#_insertChild Insert} a child node or a list of child nodes at the end\n\t * and sets the parent of these nodes to this fragment.\n\t *\n\t * @internal\n\t * @param items Items to be inserted.\n\t * @returns Number of appended nodes.\n\t */ _appendChild(items) {\n        return this._insertChild(this.childCount, items);\n    }\n    /**\n\t * Gets child at the given index.\n\t *\n\t * @param index Index of child.\n\t * @returns Child node.\n\t */ getChild(index) {\n        return this._children[index];\n    }\n    /**\n\t * Gets index of the given child node. Returns `-1` if child node is not found.\n\t *\n\t * @param node Child node.\n\t * @returns Index of the child node.\n\t */ getChildIndex(node) {\n        return this._children.indexOf(node);\n    }\n    /**\n\t * Gets child nodes iterator.\n\t *\n\t * @returns Child nodes iterator.\n\t */ getChildren() {\n        return this._children[Symbol.iterator]();\n    }\n    /**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this fragment.\n\t *\n\t * @internal\n\t * @param index Position where nodes should be inserted.\n\t * @param items Items to be inserted.\n\t * @returns Number of inserted nodes.\n\t */ _insertChild(index, items) {\n        this._fireChange('children', this);\n        let count = 0;\n        const nodes = normalize$2(this.document, items);\n        for (const node of nodes){\n            // If node that is being added to this element is already inside another element, first remove it from the old parent.\n            if (node.parent !== null) {\n                node._remove();\n            }\n            node.parent = this;\n            this._children.splice(index, 0, node);\n            index++;\n            count++;\n        }\n        return count;\n    }\n    /**\n\t * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @internal\n\t * @param index Number of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns The array of removed nodes.\n\t */ _removeChildren(index, howMany = 1) {\n        this._fireChange('children', this);\n        for(let i = index; i < index + howMany; i++){\n            this._children[i].parent = null;\n        }\n        return this._children.splice(index, howMany);\n    }\n    /**\n\t * Fires `change` event with given type of the change.\n\t *\n\t * @internal\n\t * @param type Type of the change.\n\t * @param node Changed node.\n\t */ _fireChange(type, node) {\n        this.fire('change:' + type, node);\n    }\n    /**\n\t * Sets a custom property. They can be used to add special data to elements.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#setCustomProperty\n\t * @internal\n\t */ _setCustomProperty(key, value) {\n        this._customProperties.set(key, value);\n    }\n    /**\n\t * Removes the custom property stored under the given key.\n\t *\n\t * @see module:engine/view/downcastwriter~DowncastWriter#removeCustomProperty\n\t * @internal\n\t * @returns Returns true if property was removed.\n\t */ _removeCustomProperty(key) {\n        return this._customProperties.delete(key);\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nDocumentFragment$1.prototype.is = function(type) {\n    return type === 'documentFragment' || type === 'view:documentFragment';\n};\n/**\n * Converts strings to Text and non-iterables to arrays.\n */ function normalize$2(document, nodes) {\n    // Separate condition because string is iterable.\n    if (typeof nodes == 'string') {\n        return [\n            new Text$1(document, nodes)\n        ];\n    }\n    if (!isIterable(nodes)) {\n        nodes = [\n            nodes\n        ];\n    }\n    // Array.from to enable .map() on non-arrays.\n    return Array.from(nodes).map((node)=>{\n        if (typeof node == 'string') {\n            return new Text$1(document, node);\n        }\n        if (node instanceof TextProxy$1) {\n            return new Text$1(document, node.data);\n        }\n        return node;\n    });\n}\n\n/**\n * View downcast writer.\n *\n * It provides a set of methods used to manipulate view nodes.\n *\n * Do not create an instance of this writer manually. To modify a view structure, use\n * the {@link module:engine/view/view~View#change `View#change()`} block.\n *\n * The `DowncastWriter` is designed to work with semantic views which are the views that were/are being downcasted from the model.\n * To work with ordinary views (e.g. parsed from a pasted content) use the\n * {@link module:engine/view/upcastwriter~UpcastWriter upcast writer}.\n *\n * Read more about changing the view in the {@glink framework/architecture/editing-engine#changing-the-view Changing the view}\n * section of the {@glink framework/architecture/editing-engine Editing engine architecture} guide.\n */ class DowncastWriter {\n    /**\n\t * The view document instance in which this writer operates.\n\t */ document;\n    /**\n\t * Holds references to the attribute groups that share the same {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t * The keys are `id`s, the values are `Set`s holding {@link module:engine/view/attributeelement~AttributeElement}s.\n\t */ _cloneGroups = new Map();\n    /**\n\t * The slot factory used by the `elementToStructure` downcast helper.\n\t */ _slotFactory = null;\n    /**\n\t * @param document The view document instance.\n\t */ constructor(document){\n        this.document = document;\n    }\n    setSelection(...args) {\n        this.document.selection._setTo(...args);\n    }\n    /**\n\t * Moves {@link module:engine/view/documentselection~DocumentSelection#focus selection's focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as {@link module:engine/view/view~View#createPositionAt view.createPositionAt()}\n\t * parameters.\n\t *\n\t * @param Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~Item view item}.\n\t */ setSelectionFocus(itemOrPosition, offset) {\n        this.document.selection._setFocus(itemOrPosition, offset);\n    }\n    /**\n\t * Creates a new {@link module:engine/view/documentfragment~DocumentFragment} instance.\n\t *\n\t * @param children A list of nodes to be inserted into the created document fragment.\n\t * @returns The created document fragment.\n\t */ createDocumentFragment(children) {\n        return new DocumentFragment$1(this.document, children);\n    }\n    /**\n\t * Creates a new {@link module:engine/view/text~Text text node}.\n\t *\n\t * ```ts\n\t * writer.createText( 'foo' );\n\t * ```\n\t *\n\t * @param data The text's data.\n\t * @returns The created text node.\n\t */ createText(data) {\n        return new Text$1(this.document, data);\n    }\n    /**\n\t * Creates a new {@link module:engine/view/attributeelement~AttributeElement}.\n\t *\n\t * ```ts\n\t * writer.createAttributeElement( 'strong' );\n\t * writer.createAttributeElement( 'a', { href: 'foo.bar' } );\n\t *\n\t * // Make `<a>` element contain other attributes element so the `<a>` element is not broken.\n\t * writer.createAttributeElement( 'a', { href: 'foo.bar' }, { priority: 5 } );\n\t *\n\t * // Set `id` of a marker element so it is not joined or merged with \"normal\" elements.\n\t * writer.createAttributeElement( 'span', { class: 'my-marker' }, { id: 'marker:my' } );\n\t * ```\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Element's attributes.\n\t * @param options Element's options.\n\t * @param options.priority Element's {@link module:engine/view/attributeelement~AttributeElement#priority priority}.\n\t * @param options.id Element's {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */ createAttributeElement(name, attributes, options = {}) {\n        const attributeElement = new AttributeElement(this.document, name, attributes);\n        if (typeof options.priority === 'number') {\n            attributeElement._priority = options.priority;\n        }\n        if (options.id) {\n            attributeElement._id = options.id;\n        }\n        if (options.renderUnsafeAttributes) {\n            attributeElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n        }\n        return attributeElement;\n    }\n    createContainerElement(name, attributes, childrenOrOptions = {}, options = {}) {\n        let children = null;\n        if (isPlainObject(childrenOrOptions)) {\n            options = childrenOrOptions;\n        } else {\n            children = childrenOrOptions;\n        }\n        const containerElement = new ContainerElement(this.document, name, attributes, children);\n        if (options.renderUnsafeAttributes) {\n            containerElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n        }\n        return containerElement;\n    }\n    /**\n\t * Creates a new {@link module:engine/view/editableelement~EditableElement}.\n\t *\n\t * ```ts\n\t * writer.createEditableElement( 'div' );\n\t * writer.createEditableElement( 'div', { id: 'foo-1234' } );\n\t * ```\n\t *\n\t * Note: The editable element is to be used in the editing pipeline. Usually, together with\n\t * {@link module:widget/utils~toWidgetEditable `toWidgetEditable()`}.\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */ createEditableElement(name, attributes, options = {}) {\n        const editableElement = new EditableElement(this.document, name, attributes);\n        if (options.renderUnsafeAttributes) {\n            editableElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n        }\n        return editableElement;\n    }\n    /**\n\t * Creates a new {@link module:engine/view/emptyelement~EmptyElement}.\n\t *\n\t * ```ts\n\t * writer.createEmptyElement( 'img' );\n\t * writer.createEmptyElement( 'img', { id: 'foo-1234' } );\n\t * ```\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns Created element.\n\t */ createEmptyElement(name, attributes, options = {}) {\n        const emptyElement = new EmptyElement(this.document, name, attributes);\n        if (options.renderUnsafeAttributes) {\n            emptyElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n        }\n        return emptyElement;\n    }\n    /**\n\t * Creates a new {@link module:engine/view/uielement~UIElement}.\n\t *\n\t * ```ts\n\t * writer.createUIElement( 'span' );\n\t * writer.createUIElement( 'span', { id: 'foo-1234' } );\n\t * ```\n\t *\n\t * A custom render function can be provided as the third parameter:\n\t *\n\t * ```ts\n\t * writer.createUIElement( 'span', null, function( domDocument ) {\n\t * \tconst domElement = this.toDomElement( domDocument );\n\t * \tdomElement.innerHTML = '<b>this is ui element</b>';\n\t *\n\t * \treturn domElement;\n\t * } );\n\t * ```\n\t *\n\t * Unlike {@link #createRawElement raw elements}, UI elements are by no means editor content, for instance,\n\t * they are ignored by the editor selection system.\n\t *\n\t * You should not use UI elements as data containers. Check out {@link #createRawElement} instead.\n\t *\n\t * @param name The name of the element.\n\t * @param attributes Element attributes.\n\t * @param renderFunction A custom render function.\n\t * @returns The created element.\n\t */ createUIElement(name, attributes, renderFunction) {\n        const uiElement = new UIElement(this.document, name, attributes);\n        if (renderFunction) {\n            uiElement.render = renderFunction;\n        }\n        return uiElement;\n    }\n    /**\n\t * Creates a new {@link module:engine/view/rawelement~RawElement}.\n\t *\n\t * ```ts\n\t * writer.createRawElement( 'span', { id: 'foo-1234' }, function( domElement ) {\n\t * \tdomElement.innerHTML = '<b>This is the raw content of the raw element.</b>';\n\t * } );\n\t * ```\n\t *\n\t * Raw elements work as data containers (\"wrappers\", \"sandboxes\") but their children are not managed or\n\t * even recognized by the editor. This encapsulation allows integrations to maintain custom DOM structures\n\t * in the editor content without, for instance, worrying about compatibility with other editor features.\n\t * Raw elements are a perfect tool for integration with external frameworks and data sources.\n\t *\n\t * Unlike {@link #createUIElement UI elements}, raw elements act like \"real\" editor content (similar to\n\t * {@link module:engine/view/containerelement~ContainerElement} or {@link module:engine/view/emptyelement~EmptyElement}),\n\t * and they are considered by the editor selection.\n\t *\n\t * You should not use raw elements to render the UI in the editor content. Check out {@link #createUIElement `#createUIElement()`}\n\t * instead.\n\t *\n\t * @param name The name of the element.\n\t * @param attributes Element attributes.\n\t * @param renderFunction A custom render function.\n\t * @param options Element's options.\n\t * @param options.renderUnsafeAttributes A list of attribute names that should be rendered in the editing\n\t * pipeline even though they would normally be filtered out by unsafe attribute detection mechanisms.\n\t * @returns The created element.\n\t */ createRawElement(name, attributes, renderFunction, options = {}) {\n        const rawElement = new RawElement(this.document, name, attributes);\n        if (renderFunction) {\n            rawElement.render = renderFunction;\n        }\n        if (options.renderUnsafeAttributes) {\n            rawElement._unsafeAttributesToRender.push(...options.renderUnsafeAttributes);\n        }\n        return rawElement;\n    }\n    /**\n\t * Adds or overwrites the element's attribute with a specified key and value.\n\t *\n\t * ```ts\n\t * writer.setAttribute( 'href', 'http://ckeditor.com', linkElement );\n\t * ```\n\t *\n\t * @param key The attribute key.\n\t * @param value The attribute value.\n\t */ setAttribute(key, value, element) {\n        element._setAttribute(key, value);\n    }\n    /**\n\t * Removes attribute from the element.\n\t *\n\t * ```ts\n\t * writer.removeAttribute( 'href', linkElement );\n\t * ```\n\t *\n\t * @param key Attribute key.\n\t */ removeAttribute(key, element) {\n        element._removeAttribute(key);\n    }\n    /**\n\t * Adds specified class to the element.\n\t *\n\t * ```ts\n\t * writer.addClass( 'foo', linkElement );\n\t * writer.addClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t */ addClass(className, element) {\n        element._addClass(className);\n    }\n    /**\n\t * Removes specified class from the element.\n\t *\n\t * ```ts\n\t * writer.removeClass( 'foo', linkElement );\n\t * writer.removeClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t */ removeClass(className, element) {\n        element._removeClass(className);\n    }\n    setStyle(property, value, element) {\n        if (isPlainObject(property) && element === undefined) {\n            value._setStyle(property);\n        } else {\n            element._setStyle(property, value);\n        }\n    }\n    /**\n\t * Removes specified style from the element.\n\t *\n\t * ```ts\n\t * writer.removeStyle( 'color', element ); // Removes 'color' style.\n\t * writer.removeStyle( [ 'color', 'border-top' ], element ); // Removes both 'color' and 'border-top' styles.\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t */ removeStyle(property, element) {\n        element._removeStyle(property);\n    }\n    /**\n\t * Sets a custom property on element. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t */ setCustomProperty(key, value, element) {\n        element._setCustomProperty(key, value);\n    }\n    /**\n\t * Removes a custom property stored under the given key.\n\t *\n\t * @returns Returns true if property was removed.\n\t */ removeCustomProperty(key, element) {\n        return element._removeCustomProperty(key);\n    }\n    /**\n\t * Breaks attribute elements at the provided position or at the boundaries of a provided range. It breaks attribute elements\n\t * up to their first ancestor that is a container element.\n\t *\n\t * In following examples `<p>` is a container, `<b>` and `<u>` are attribute elements:\n\t *\n\t * ```html\n\t * <p>foo<b><u>bar{}</u></b></p> -> <p>foo<b><u>bar</u></b>[]</p>\n\t * <p>foo<b><u>{}bar</u></b></p> -> <p>foo{}<b><u>bar</u></b></p>\n\t * <p>foo<b><u>b{}ar</u></b></p> -> <p>foo<b><u>b</u></b>[]<b><u>ar</u></b></p>\n\t * <p><b>fo{o</b><u>ba}r</u></p> -> <p><b>fo</b><b>o</b><u>ba</u><u>r</u></b></p>\n\t * ```\n\t *\n\t * **Note:** {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n\t *\n\t * **Note:** The difference between {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes breakAttributes()} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} that are ancestors of a given `position`,\n\t * up to the first encountered {@link module:engine/view/containerelement~ContainerElement container element}.\n\t * `breakContainer()` assumes that a given `position` is directly in the container element and breaks that container element.\n\t *\n\t * Throws the `view-writer-invalid-range-container` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when the {@link module:engine/view/range~Range#start start}\n\t * and {@link module:engine/view/range~Range#end end} positions of a passed range are not placed inside same parent container.\n\t *\n\t * Throws the `view-writer-cannot-break-empty-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when trying to break attributes inside an {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n\t *\n\t * Throws the `view-writer-cannot-break-ui-element` {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * when trying to break attributes inside a {@link module:engine/view/uielement~UIElement UIElement}.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#breakContainer\n\t * @param positionOrRange The position where to break attribute elements.\n\t * @returns The new position or range, after breaking the attribute elements.\n\t */ breakAttributes(positionOrRange) {\n        if (positionOrRange instanceof Position$1) {\n            return this._breakAttributes(positionOrRange);\n        } else {\n            return this._breakAttributesRange(positionOrRange);\n        }\n    }\n    /**\n\t * Breaks a {@link module:engine/view/containerelement~ContainerElement container view element} into two, at the given position.\n\t * The position has to be directly inside the container element and cannot be in the root. It does not break the conrainer view element\n\t * if the position is at the beginning or at the end of its parent element.\n\t *\n\t * ```html\n\t * <p>foo^bar</p> -> <p>foo</p><p>bar</p>\n\t * <div><p>foo</p>^<p>bar</p></div> -> <div><p>foo</p></div><div><p>bar</p></div>\n\t * <p>^foobar</p> -> ^<p>foobar</p>\n\t * <p>foobar^</p> -> <p>foobar</p>^\n\t * ```\n\t *\n\t * **Note:** The difference between {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes breakAttributes()} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakContainer breakContainer()} is that `breakAttributes()` breaks all\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} that are ancestors of a given `position`,\n\t * up to the first encountered {@link module:engine/view/containerelement~ContainerElement container element}.\n\t * `breakContainer()` assumes that the given `position` is directly in the container element and breaks that container element.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#breakAttributes\n\t * @param position The position where to break the element.\n\t * @returns The position between broken elements. If an element has not been broken,\n\t * the returned position is placed either before or after it.\n\t */ breakContainer(position) {\n        const element = position.parent;\n        if (!element.is('containerElement')) {\n            /**\n\t\t\t * Trying to break an element which is not a container element.\n\t\t\t *\n\t\t\t * @error view-writer-break-non-container-element\n\t\t\t */ throw new CKEditorError('view-writer-break-non-container-element', this.document);\n        }\n        if (!element.parent) {\n            /**\n\t\t\t * Trying to break root element.\n\t\t\t *\n\t\t\t * @error view-writer-break-root\n\t\t\t */ throw new CKEditorError('view-writer-break-root', this.document);\n        }\n        if (position.isAtStart) {\n            return Position$1._createBefore(element);\n        } else if (!position.isAtEnd) {\n            const newElement = element._clone(false);\n            this.insert(Position$1._createAfter(element), newElement);\n            const sourceRange = new Range$1(position, Position$1._createAt(element, 'end'));\n            const targetPosition = new Position$1(newElement, 0);\n            this.move(sourceRange, targetPosition);\n        }\n        return Position$1._createAfter(element);\n    }\n    /**\n\t * Merges {@link module:engine/view/attributeelement~AttributeElement attribute elements}. It also merges text nodes if needed.\n\t * Only {@link module:engine/view/attributeelement~AttributeElement#isSimilar similar} attribute elements can be merged.\n\t *\n\t * In following examples `<p>` is a container and `<b>` is an attribute element:\n\t *\n\t * ```html\n\t * <p>foo[]bar</p> -> <p>foo{}bar</p>\n\t * <p><b>foo</b>[]<b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t * <p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p> -> <p><b foo=\"bar\">a</b>[]<b foo=\"baz\">b</b></p>\n\t * ```\n\t *\n\t * It will also take care about empty attributes when merging:\n\t *\n\t * ```html\n\t * <p><b>[]</b></p> -> <p>[]</p>\n\t * <p><b>foo</b><i>[]</i><b>bar</b></p> -> <p><b>foo{}bar</b></p>\n\t * ```\n\t *\n\t * **Note:** Difference between {@link module:engine/view/downcastwriter~DowncastWriter#mergeAttributes mergeAttributes} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} or {@link module:engine/view/text~Text text nodes}\n\t * while `mergeContainer` merges two {@link module:engine/view/containerelement~ContainerElement container elements}.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#mergeContainers\n\t * @param position Merge position.\n\t * @returns Position after merge.\n\t */ mergeAttributes(position) {\n        const positionOffset = position.offset;\n        const positionParent = position.parent;\n        // When inside text node - nothing to merge.\n        if (positionParent.is('$text')) {\n            return position;\n        }\n        // When inside empty attribute - remove it.\n        if (positionParent.is('attributeElement') && positionParent.childCount === 0) {\n            const parent = positionParent.parent;\n            const offset = positionParent.index;\n            positionParent._remove();\n            this._removeFromClonedElementsGroup(positionParent);\n            return this.mergeAttributes(new Position$1(parent, offset));\n        }\n        const nodeBefore = positionParent.getChild(positionOffset - 1);\n        const nodeAfter = positionParent.getChild(positionOffset);\n        // Position should be placed between two nodes.\n        if (!nodeBefore || !nodeAfter) {\n            return position;\n        }\n        // When position is between two text nodes.\n        if (nodeBefore.is('$text') && nodeAfter.is('$text')) {\n            return mergeTextNodes(nodeBefore, nodeAfter);\n        } else if (nodeBefore.is('attributeElement') && nodeAfter.is('attributeElement') && nodeBefore.isSimilar(nodeAfter)) {\n            // Move all children nodes from node placed after selection and remove that node.\n            const count = nodeBefore.childCount;\n            nodeBefore._appendChild(nodeAfter.getChildren());\n            nodeAfter._remove();\n            this._removeFromClonedElementsGroup(nodeAfter);\n            // New position is located inside the first node, before new nodes.\n            // Call this method recursively to merge again if needed.\n            return this.mergeAttributes(new Position$1(nodeBefore, count));\n        }\n        return position;\n    }\n    /**\n\t * Merges two {@link module:engine/view/containerelement~ContainerElement container elements} that are before and after given position.\n\t * Precisely, the element after the position is removed and it's contents are moved to element before the position.\n\t *\n\t * ```html\n\t * <p>foo</p>^<p>bar</p> -> <p>foo^bar</p>\n\t * <div>foo</div>^<p>bar</p> -> <div>foo^bar</div>\n\t * ```\n\t *\n\t * **Note:** Difference between {@link module:engine/view/downcastwriter~DowncastWriter#mergeAttributes mergeAttributes} and\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#mergeContainers mergeContainers} is that `mergeAttributes` merges two\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute elements} or {@link module:engine/view/text~Text text nodes}\n\t * while `mergeContainer` merges two {@link module:engine/view/containerelement~ContainerElement container elements}.\n\t *\n\t * @see module:engine/view/attributeelement~AttributeElement\n\t * @see module:engine/view/containerelement~ContainerElement\n\t * @see module:engine/view/downcastwriter~DowncastWriter#mergeAttributes\n\t * @param position Merge position.\n\t * @returns Position after merge.\n\t */ mergeContainers(position) {\n        const prev = position.nodeBefore;\n        const next = position.nodeAfter;\n        if (!prev || !next || !prev.is('containerElement') || !next.is('containerElement')) {\n            /**\n\t\t\t * Element before and after given position cannot be merged.\n\t\t\t *\n\t\t\t * @error view-writer-merge-containers-invalid-position\n\t\t\t */ throw new CKEditorError('view-writer-merge-containers-invalid-position', this.document);\n        }\n        const lastChild = prev.getChild(prev.childCount - 1);\n        const newPosition = lastChild instanceof Text$1 ? Position$1._createAt(lastChild, 'end') : Position$1._createAt(prev, 'end');\n        this.move(Range$1._createIn(next), Position$1._createAt(prev, 'end'));\n        this.remove(Range$1._createOn(next));\n        return newPosition;\n    }\n    /**\n\t * Inserts a node or nodes at specified position. Takes care about breaking attributes before insertion\n\t * and merging them afterwards.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n\t * contains instances that are not {@link module:engine/view/text~Text Texts},\n\t * {@link module:engine/view/attributeelement~AttributeElement AttributeElements},\n\t * {@link module:engine/view/containerelement~ContainerElement ContainerElements},\n\t * {@link module:engine/view/emptyelement~EmptyElement EmptyElements},\n\t * {@link module:engine/view/rawelement~RawElement RawElements} or\n\t * {@link module:engine/view/uielement~UIElement UIElements}.\n\t *\n\t * @param position Insertion position.\n\t * @param nodes Node or nodes to insert.\n\t * @returns Range around inserted nodes.\n\t */ insert(position, nodes) {\n        nodes = isIterable(nodes) ? [\n            ...nodes\n        ] : [\n            nodes\n        ];\n        // Check if nodes to insert are instances of AttributeElements, ContainerElements, EmptyElements, UIElements or Text.\n        validateNodesToInsert(nodes, this.document);\n        // Group nodes in batches of nodes that require or do not require breaking an AttributeElements.\n        const nodeGroups = nodes.reduce((groups, node)=>{\n            const lastGroup = groups[groups.length - 1];\n            // Break attributes on nodes that do exist in the model tree so they can have attributes, other elements\n            // can't have an attribute in model and won't get wrapped with an AttributeElement while down-casted.\n            const breakAttributes = !node.is('uiElement');\n            if (!lastGroup || lastGroup.breakAttributes != breakAttributes) {\n                groups.push({\n                    breakAttributes,\n                    nodes: [\n                        node\n                    ]\n                });\n            } else {\n                lastGroup.nodes.push(node);\n            }\n            return groups;\n        }, []);\n        // Insert nodes in batches.\n        let start = null;\n        let end = position;\n        for (const { nodes, breakAttributes } of nodeGroups){\n            const range = this._insertNodes(end, nodes, breakAttributes);\n            if (!start) {\n                start = range.start;\n            }\n            end = range.end;\n        }\n        // When no nodes were inserted - return collapsed range.\n        if (!start) {\n            return new Range$1(position);\n        }\n        return new Range$1(start, end);\n    }\n    /**\n\t * Removes provided range from the container.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t *\n\t * @param rangeOrItem Range to remove from container\n\t * or an {@link module:engine/view/item~Item item} to remove. If range is provided, after removing, it will be updated\n\t * to a collapsed range showing the new position.\n\t * @returns Document fragment containing removed nodes.\n\t */ remove(rangeOrItem) {\n        const range = rangeOrItem instanceof Range$1 ? rangeOrItem : Range$1._createOn(rangeOrItem);\n        validateRangeContainer(range, this.document);\n        // If range is collapsed - nothing to remove.\n        if (range.isCollapsed) {\n            return new DocumentFragment$1(this.document);\n        }\n        // Break attributes at range start and end.\n        const { start: breakStart, end: breakEnd } = this._breakAttributesRange(range, true);\n        const parentContainer = breakStart.parent;\n        const count = breakEnd.offset - breakStart.offset;\n        // Remove nodes in range.\n        const removed = parentContainer._removeChildren(breakStart.offset, count);\n        for (const node of removed){\n            this._removeFromClonedElementsGroup(node);\n        }\n        // Merge after removing.\n        const mergePosition = this.mergeAttributes(breakStart);\n        range.start = mergePosition;\n        range.end = mergePosition.clone();\n        // Return removed nodes.\n        return new DocumentFragment$1(this.document, removed);\n    }\n    /**\n\t * Removes matching elements from given range.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t *\n\t * @param range Range to clear.\n\t * @param element Element to remove.\n\t */ clear(range, element) {\n        validateRangeContainer(range, this.document);\n        // Create walker on given range.\n        // We walk backward because when we remove element during walk it modifies range end position.\n        const walker = range.getWalker({\n            direction: 'backward',\n            ignoreElementEnd: true\n        });\n        // Let's walk.\n        for (const current of walker){\n            const item = current.item;\n            let rangeToRemove;\n            // When current item matches to the given element.\n            if (item.is('element') && element.isSimilar(item)) {\n                // Create range on this element.\n                rangeToRemove = Range$1._createOn(item);\n            // When range starts inside Text or TextProxy element.\n            } else if (!current.nextPosition.isAfter(range.start) && item.is('$textProxy')) {\n                // We need to check if parent of this text matches to given element.\n                const parentElement = item.getAncestors().find((ancestor)=>{\n                    return ancestor.is('element') && element.isSimilar(ancestor);\n                });\n                // If it is then create range inside this element.\n                if (parentElement) {\n                    rangeToRemove = Range$1._createIn(parentElement);\n                }\n            }\n            // If we have found element to remove.\n            if (rangeToRemove) {\n                // We need to check if element range stick out of the given range and truncate if it is.\n                if (rangeToRemove.end.isAfter(range.end)) {\n                    rangeToRemove.end = range.end;\n                }\n                if (rangeToRemove.start.isBefore(range.start)) {\n                    rangeToRemove.start = range.start;\n                }\n                // At the end we remove range with found element.\n                this.remove(rangeToRemove);\n            }\n        }\n    }\n    /**\n\t * Moves nodes from provided range to target position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t *\n\t * @param sourceRange Range containing nodes to move.\n\t * @param targetPosition Position to insert.\n\t * @returns Range in target container. Inserted nodes are placed between\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions.\n\t */ move(sourceRange, targetPosition) {\n        let nodes;\n        if (targetPosition.isAfter(sourceRange.end)) {\n            targetPosition = this._breakAttributes(targetPosition, true);\n            const parent = targetPosition.parent;\n            const countBefore = parent.childCount;\n            sourceRange = this._breakAttributesRange(sourceRange, true);\n            nodes = this.remove(sourceRange);\n            targetPosition.offset += parent.childCount - countBefore;\n        } else {\n            nodes = this.remove(sourceRange);\n        }\n        return this.insert(targetPosition, nodes);\n    }\n    /**\n\t * Wraps elements within range with provided {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t * If a collapsed range is provided, it will be wrapped only if it is equal to view selection.\n\t *\n\t * If a collapsed range was passed and is same as selection, the selection\n\t * will be moved to the inside of the wrapped attribute element.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-invalid-range-container`\n\t * when {@link module:engine/view/range~Range#start}\n\t * and {@link module:engine/view/range~Range#end} positions are not placed inside same parent container.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-nonselection-collapsed-range` when passed range\n\t * is collapsed and different than view selection.\n\t *\n\t * @param range Range to wrap.\n\t * @param attribute Attribute element to use as wrapper.\n\t * @returns range Range after wrapping, spanning over wrapping attribute element.\n\t */ wrap(range, attribute) {\n        if (!(attribute instanceof AttributeElement)) {\n            throw new CKEditorError('view-writer-wrap-invalid-attribute', this.document);\n        }\n        validateRangeContainer(range, this.document);\n        if (!range.isCollapsed) {\n            // Non-collapsed range. Wrap it with the attribute element.\n            return this._wrapRange(range, attribute);\n        } else {\n            // Collapsed range. Wrap position.\n            let position = range.start;\n            if (position.parent.is('element') && !_hasNonUiChildren(position.parent)) {\n                position = position.getLastMatchingPosition((value)=>value.item.is('uiElement'));\n            }\n            position = this._wrapPosition(position, attribute);\n            const viewSelection = this.document.selection;\n            // If wrapping position is equal to view selection, move view selection inside wrapping attribute element.\n            if (viewSelection.isCollapsed && viewSelection.getFirstPosition().isEqual(range.start)) {\n                this.setSelection(position);\n            }\n            return new Range$1(position);\n        }\n    }\n    /**\n\t * Unwraps nodes within provided range from attribute element.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n\t * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n\t * same parent container.\n\t */ unwrap(range, attribute) {\n        if (!(attribute instanceof AttributeElement)) {\n            /**\n\t\t\t * The `attribute` passed to {@link module:engine/view/downcastwriter~DowncastWriter#unwrap `DowncastWriter#unwrap()`}\n\t\t\t * must be an instance of {@link module:engine/view/attributeelement~AttributeElement `AttributeElement`}.\n\t\t\t *\n\t\t\t * @error view-writer-unwrap-invalid-attribute\n\t\t\t */ throw new CKEditorError('view-writer-unwrap-invalid-attribute', this.document);\n        }\n        validateRangeContainer(range, this.document);\n        // If range is collapsed - nothing to unwrap.\n        if (range.isCollapsed) {\n            return range;\n        }\n        // Break attributes at range start and end.\n        const { start: breakStart, end: breakEnd } = this._breakAttributesRange(range, true);\n        const parentContainer = breakStart.parent;\n        // Unwrap children located between break points.\n        const newRange = this._unwrapChildren(parentContainer, breakStart.offset, breakEnd.offset, attribute);\n        // Merge attributes at the both ends and return a new range.\n        const start = this.mergeAttributes(newRange.start);\n        // If start position was merged - move end position back.\n        if (!start.isEqual(newRange.start)) {\n            newRange.end.offset--;\n        }\n        const end = this.mergeAttributes(newRange.end);\n        return new Range$1(start, end);\n    }\n    /**\n\t * Renames element by creating a copy of renamed element but with changed name and then moving contents of the\n\t * old element to the new one. Keep in mind that this will invalidate all {@link module:engine/view/position~Position positions} which\n\t * has renamed element as {@link module:engine/view/position~Position#parent a parent}.\n\t *\n\t * New element has to be created because `Element#tagName` property in DOM is readonly.\n\t *\n\t * Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n\t *\n\t * @param newName New name for element.\n\t * @param viewElement Element to be renamed.\n\t * @returns Element created due to rename.\n\t */ rename(newName, viewElement) {\n        const newElement = new ContainerElement(this.document, newName, viewElement.getAttributes());\n        this.insert(Position$1._createAfter(viewElement), newElement);\n        this.move(Range$1._createIn(viewElement), Position$1._createAt(newElement, 0));\n        this.remove(Range$1._createOn(viewElement));\n        return newElement;\n    }\n    /**\n\t * Cleans up memory by removing obsolete cloned elements group from the writer.\n\t *\n\t * Should be used whenever all {@link module:engine/view/attributeelement~AttributeElement attribute elements}\n\t * with the same {@link module:engine/view/attributeelement~AttributeElement#id id} are going to be removed from the view and\n\t * the group will no longer be needed.\n\t *\n\t * Cloned elements group are not removed automatically in case if the group is still needed after all its elements\n\t * were removed from the view.\n\t *\n\t * Keep in mind that group names are equal to the `id` property of the attribute element.\n\t *\n\t * @param groupName Name of the group to clear.\n\t */ clearClonedElementsGroup(groupName) {\n        this._cloneGroups.delete(groupName);\n    }\n    /**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/view/item~Item view item}.\n\t */ createPositionAt(itemOrPosition, offset) {\n        return Position$1._createAt(itemOrPosition, offset);\n    }\n    /**\n\t * Creates a new position after given view item.\n\t *\n\t * @param item View item after which the position should be located.\n\t */ createPositionAfter(item) {\n        return Position$1._createAfter(item);\n    }\n    /**\n\t * Creates a new position before given view item.\n\t *\n\t * @param item View item before which the position should be located.\n\t */ createPositionBefore(item) {\n        return Position$1._createBefore(item);\n    }\n    /**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates its own {@link module:engine/view/position~Position} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */ createRange(start, end) {\n        return new Range$1(start, end);\n    }\n    /**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t */ createRangeOn(item) {\n        return Range$1._createOn(item);\n    }\n    /**\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */ createRangeIn(element) {\n        return Range$1._createIn(element);\n    }\n    createSelection(...args) {\n        return new Selection$1(...args);\n    }\n    /**\n\t * Creates placeholders for child elements of the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `elementToStructure()`} conversion helper.\n\t *\n\t * ```ts\n\t * const viewSlot = conversionApi.writer.createSlot();\n\t * const viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t *\n\t * conversionApi.writer.insert( viewPosition, viewSlot );\n\t * ```\n\t *\n\t * It could be filtered down to a specific subset of children (only `<foo>` model elements in this case):\n\t *\n\t * ```ts\n\t * const viewSlot = conversionApi.writer.createSlot( node => node.is( 'element', 'foo' ) );\n\t * const viewPosition = conversionApi.writer.createPositionAt( viewElement, 0 );\n\t *\n\t * conversionApi.writer.insert( viewPosition, viewSlot );\n\t * ```\n\t *\n\t * While providing a filtered slot, make sure to provide slots for all child nodes. A single node can not be downcasted into\n\t * multiple slots.\n\t *\n\t * **Note**: You should not change the order of nodes. View elements should be in the same order as model nodes.\n\t *\n\t * @param modeOrFilter The filter for child nodes.\n\t * @returns The slot element to be placed in to the view structure while processing\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure `elementToStructure()`}.\n\t */ createSlot(modeOrFilter = 'children') {\n        if (!this._slotFactory) {\n            /**\n\t\t\t * The `createSlot()` method is only allowed inside the `elementToStructure` downcast helper callback.\n\t\t\t *\n\t\t\t * @error view-writer-invalid-create-slot-context\n\t\t\t */ throw new CKEditorError('view-writer-invalid-create-slot-context', this.document);\n        }\n        return this._slotFactory(this, modeOrFilter);\n    }\n    /**\n\t * Registers a slot factory.\n\t *\n\t * @internal\n\t * @param slotFactory The slot factory.\n\t */ _registerSlotFactory(slotFactory) {\n        this._slotFactory = slotFactory;\n    }\n    /**\n\t * Clears the registered slot factory.\n\t *\n\t * @internal\n\t */ _clearSlotFactory() {\n        this._slotFactory = null;\n    }\n    /**\n\t * Inserts a node or nodes at the specified position. Takes care of breaking attributes before insertion\n\t * and merging them afterwards if requested by the breakAttributes param.\n\t *\n\t * @param position Insertion position.\n\t * @param nodes Node or nodes to insert.\n\t * @param breakAttributes Whether attributes should be broken.\n\t * @returns Range around inserted nodes.\n\t */ _insertNodes(position, nodes, breakAttributes) {\n        let parentElement;\n        // Break attributes on nodes that do exist in the model tree so they can have attributes, other elements\n        // can't have an attribute in model and won't get wrapped with an AttributeElement while down-casted.\n        if (breakAttributes) {\n            parentElement = getParentContainer(position);\n        } else {\n            parentElement = position.parent.is('$text') ? position.parent.parent : position.parent;\n        }\n        if (!parentElement) {\n            /**\n\t\t\t * Position's parent container cannot be found.\n\t\t\t *\n\t\t\t * @error view-writer-invalid-position-container\n\t\t\t */ throw new CKEditorError('view-writer-invalid-position-container', this.document);\n        }\n        let insertionPosition;\n        if (breakAttributes) {\n            insertionPosition = this._breakAttributes(position, true);\n        } else {\n            insertionPosition = position.parent.is('$text') ? breakTextNode(position) : position;\n        }\n        const length = parentElement._insertChild(insertionPosition.offset, nodes);\n        for (const node of nodes){\n            this._addToClonedElementsGroup(node);\n        }\n        const endPosition = insertionPosition.getShiftedBy(length);\n        const start = this.mergeAttributes(insertionPosition);\n        // If start position was merged - move end position.\n        if (!start.isEqual(insertionPosition)) {\n            endPosition.offset--;\n        }\n        const end = this.mergeAttributes(endPosition);\n        return new Range$1(start, end);\n    }\n    /**\n\t * Wraps children with provided `wrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be wrapped.\n\t */ _wrapChildren(parent, startOffset, endOffset, wrapElement) {\n        let i = startOffset;\n        const wrapPositions = [];\n        while(i < endOffset){\n            const child = parent.getChild(i);\n            const isText = child.is('$text');\n            const isAttribute = child.is('attributeElement');\n            //\n            // (In all examples, assume that `wrapElement` is `<span class=\"foo\">` element.)\n            //\n            // Check if `wrapElement` can be joined with the wrapped element. One of requirements is having same name.\n            // If possible, join elements.\n            //\n            // <p><span class=\"bar\">abc</span></p>  -->  <p><span class=\"foo bar\">abc</span></p>\n            //\n            if (isAttribute && this._wrapAttributeElement(wrapElement, child)) {\n                wrapPositions.push(new Position$1(parent, i));\n            } else if (isText || !isAttribute || shouldABeOutsideB(wrapElement, child)) {\n                // Clone attribute.\n                const newAttribute = wrapElement._clone();\n                // Wrap current node with new attribute.\n                child._remove();\n                newAttribute._appendChild(child);\n                parent._insertChild(i, newAttribute);\n                this._addToClonedElementsGroup(newAttribute);\n                wrapPositions.push(new Position$1(parent, i));\n            } else /* if ( isAttribute ) */ {\n                this._wrapChildren(child, 0, child.childCount, wrapElement);\n            }\n            i++;\n        }\n        // Merge at each wrap.\n        let offsetChange = 0;\n        for (const position of wrapPositions){\n            position.offset -= offsetChange;\n            // Do not merge with elements outside selected children.\n            if (position.offset == startOffset) {\n                continue;\n            }\n            const newPosition = this.mergeAttributes(position);\n            // If nodes were merged - other merge offsets will change.\n            if (!newPosition.isEqual(position)) {\n                offsetChange++;\n                endOffset--;\n            }\n        }\n        return Range$1._createFromParentsAndOffsets(parent, startOffset, parent, endOffset);\n    }\n    /**\n\t * Unwraps children from provided `unwrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be unwrapped.\n\t */ _unwrapChildren(parent, startOffset, endOffset, unwrapElement) {\n        let i = startOffset;\n        const unwrapPositions = [];\n        // Iterate over each element between provided offsets inside parent.\n        // We don't use tree walker or range iterator because we will be removing and merging potentially multiple nodes,\n        // so it could get messy. It is safer to it manually in this case.\n        while(i < endOffset){\n            const child = parent.getChild(i);\n            // Skip all text nodes. There should be no container element's here either.\n            if (!child.is('attributeElement')) {\n                i++;\n                continue;\n            }\n            //\n            // (In all examples, assume that `unwrapElement` is `<span class=\"foo\">` element.)\n            //\n            // If the child is similar to the given attribute element, unwrap it - it will be completely removed.\n            //\n            // <p><span class=\"foo\">abc</span>xyz</p>  -->  <p>abcxyz</p>\n            //\n            if (child.isSimilar(unwrapElement)) {\n                const unwrapped = child.getChildren();\n                const count = child.childCount;\n                // Replace wrapper element with its children\n                child._remove();\n                parent._insertChild(i, unwrapped);\n                this._removeFromClonedElementsGroup(child);\n                // Save start and end position of moved items.\n                unwrapPositions.push(new Position$1(parent, i), new Position$1(parent, i + count));\n                // Skip elements that were unwrapped. Assuming there won't be another element to unwrap in child elements.\n                i += count;\n                endOffset += count - 1;\n                continue;\n            }\n            //\n            // If the child is not similar but is an attribute element, try partial unwrapping - remove the same attributes/styles/classes.\n            // Partial unwrapping will happen only if the elements have the same name.\n            //\n            // <p><span class=\"foo bar\">abc</span>xyz</p>  -->  <p><span class=\"bar\">abc</span>xyz</p>\n            // <p><i class=\"foo\">abc</i>xyz</p>            -->  <p><i class=\"foo\">abc</i>xyz</p>\n            //\n            if (this._unwrapAttributeElement(unwrapElement, child)) {\n                unwrapPositions.push(new Position$1(parent, i), new Position$1(parent, i + 1));\n                i++;\n                continue;\n            }\n            //\n            // If other nested attribute is found, look through it's children for elements to unwrap.\n            //\n            // <p><i><span class=\"foo\">abc</span></i><p>  -->  <p><i>abc</i><p>\n            //\n            this._unwrapChildren(child, 0, child.childCount, unwrapElement);\n            i++;\n        }\n        // Merge at each unwrap.\n        let offsetChange = 0;\n        for (const position of unwrapPositions){\n            position.offset -= offsetChange;\n            // Do not merge with elements outside selected children.\n            if (position.offset == startOffset || position.offset == endOffset) {\n                continue;\n            }\n            const newPosition = this.mergeAttributes(position);\n            // If nodes were merged - other merge offsets will change.\n            if (!newPosition.isEqual(position)) {\n                offsetChange++;\n                endOffset--;\n            }\n        }\n        return Range$1._createFromParentsAndOffsets(parent, startOffset, parent, endOffset);\n    }\n    /**\n\t * Helper function for `view.writer.wrap`. Wraps range with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @returns New range after wrapping, spanning over wrapping attribute element.\n\t */ _wrapRange(range, attribute) {\n        // Break attributes at range start and end.\n        const { start: breakStart, end: breakEnd } = this._breakAttributesRange(range, true);\n        const parentContainer = breakStart.parent;\n        // Wrap all children with attribute.\n        const newRange = this._wrapChildren(parentContainer, breakStart.offset, breakEnd.offset, attribute);\n        // Merge attributes at the both ends and return a new range.\n        const start = this.mergeAttributes(newRange.start);\n        // If start position was merged - move end position back.\n        if (!start.isEqual(newRange.start)) {\n            newRange.end.offset--;\n        }\n        const end = this.mergeAttributes(newRange.end);\n        return new Range$1(start, end);\n    }\n    /**\n\t * Helper function for {@link #wrap}. Wraps position with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @returns New position after wrapping.\n\t */ _wrapPosition(position, attribute) {\n        // Return same position when trying to wrap with attribute similar to position parent.\n        if (attribute.isSimilar(position.parent)) {\n            return movePositionToTextNode(position.clone());\n        }\n        // When position is inside text node - break it and place new position between two text nodes.\n        if (position.parent.is('$text')) {\n            position = breakTextNode(position);\n        }\n        // Create fake element that will represent position, and will not be merged with other attributes.\n        const fakeElement = this.createAttributeElement('_wrapPosition-fake-element');\n        fakeElement._priority = Number.POSITIVE_INFINITY;\n        fakeElement.isSimilar = ()=>false;\n        // Insert fake element in position location.\n        position.parent._insertChild(position.offset, fakeElement);\n        // Range around inserted fake attribute element.\n        const wrapRange = new Range$1(position, position.getShiftedBy(1));\n        // Wrap fake element with attribute (it will also merge if possible).\n        this.wrap(wrapRange, attribute);\n        // Remove fake element and place new position there.\n        const newPosition = new Position$1(fakeElement.parent, fakeElement.index);\n        fakeElement._remove();\n        // If position is placed between text nodes - merge them and return position inside.\n        const nodeBefore = newPosition.nodeBefore;\n        const nodeAfter = newPosition.nodeAfter;\n        if (nodeBefore instanceof Text$1 && nodeAfter instanceof Text$1) {\n            return mergeTextNodes(nodeBefore, nodeAfter);\n        }\n        // If position is next to text node - move position inside.\n        return movePositionToTextNode(newPosition);\n    }\n    /**\n\t * Wraps one {@link module:engine/view/attributeelement~AttributeElement AttributeElement} into another by\n\t * merging them if possible. When merging is possible - all attributes, styles and classes are moved from wrapper\n\t * element to element being wrapped.\n\t *\n\t * @param wrapper Wrapper AttributeElement.\n\t * @param toWrap AttributeElement to wrap using wrapper element.\n\t * @returns Returns `true` if elements are merged.\n\t */ _wrapAttributeElement(wrapper, toWrap) {\n        if (!canBeJoined(wrapper, toWrap)) {\n            return false;\n        }\n        // Can't merge if name or priority differs.\n        if (wrapper.name !== toWrap.name || wrapper.priority !== toWrap.priority) {\n            return false;\n        }\n        // Check if attributes can be merged.\n        for (const key of wrapper.getAttributeKeys()){\n            // Classes and styles should be checked separately.\n            if (key === 'class' || key === 'style') {\n                continue;\n            }\n            // If some attributes are different we cannot wrap.\n            if (toWrap.hasAttribute(key) && toWrap.getAttribute(key) !== wrapper.getAttribute(key)) {\n                return false;\n            }\n        }\n        // Check if styles can be merged.\n        for (const key of wrapper.getStyleNames()){\n            if (toWrap.hasStyle(key) && toWrap.getStyle(key) !== wrapper.getStyle(key)) {\n                return false;\n            }\n        }\n        // Move all attributes/classes/styles from wrapper to wrapped AttributeElement.\n        for (const key of wrapper.getAttributeKeys()){\n            // Classes and styles should be checked separately.\n            if (key === 'class' || key === 'style') {\n                continue;\n            }\n            // Move only these attributes that are not present - other are similar.\n            if (!toWrap.hasAttribute(key)) {\n                this.setAttribute(key, wrapper.getAttribute(key), toWrap);\n            }\n        }\n        for (const key of wrapper.getStyleNames()){\n            if (!toWrap.hasStyle(key)) {\n                this.setStyle(key, wrapper.getStyle(key), toWrap);\n            }\n        }\n        for (const key of wrapper.getClassNames()){\n            if (!toWrap.hasClass(key)) {\n                this.addClass(key, toWrap);\n            }\n        }\n        return true;\n    }\n    /**\n\t * Unwraps {@link module:engine/view/attributeelement~AttributeElement AttributeElement} from another by removing\n\t * corresponding attributes, classes and styles. All attributes, classes and styles from wrapper should be present\n\t * inside element being unwrapped.\n\t *\n\t * @param wrapper Wrapper AttributeElement.\n\t * @param toUnwrap AttributeElement to unwrap using wrapper element.\n\t * @returns Returns `true` if elements are unwrapped.\n\t **/ _unwrapAttributeElement(wrapper, toUnwrap) {\n        if (!canBeJoined(wrapper, toUnwrap)) {\n            return false;\n        }\n        // Can't unwrap if name or priority differs.\n        if (wrapper.name !== toUnwrap.name || wrapper.priority !== toUnwrap.priority) {\n            return false;\n        }\n        // Check if AttributeElement has all wrapper attributes.\n        for (const key of wrapper.getAttributeKeys()){\n            // Classes and styles should be checked separately.\n            if (key === 'class' || key === 'style') {\n                continue;\n            }\n            // If some attributes are missing or different we cannot unwrap.\n            if (!toUnwrap.hasAttribute(key) || toUnwrap.getAttribute(key) !== wrapper.getAttribute(key)) {\n                return false;\n            }\n        }\n        // Check if AttributeElement has all wrapper classes.\n        if (!toUnwrap.hasClass(...wrapper.getClassNames())) {\n            return false;\n        }\n        // Check if AttributeElement has all wrapper styles.\n        for (const key of wrapper.getStyleNames()){\n            // If some styles are missing or different we cannot unwrap.\n            if (!toUnwrap.hasStyle(key) || toUnwrap.getStyle(key) !== wrapper.getStyle(key)) {\n                return false;\n            }\n        }\n        // Remove all wrapper's attributes from unwrapped element.\n        for (const key of wrapper.getAttributeKeys()){\n            // Classes and styles should be checked separately.\n            if (key === 'class' || key === 'style') {\n                continue;\n            }\n            this.removeAttribute(key, toUnwrap);\n        }\n        // Remove all wrapper's classes from unwrapped element.\n        this.removeClass(Array.from(wrapper.getClassNames()), toUnwrap);\n        // Remove all wrapper's styles from unwrapped element.\n        this.removeStyle(Array.from(wrapper.getStyleNames()), toUnwrap);\n        return true;\n    }\n    /**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at the boundaries of given range.\n\t *\n\t * @param range Range which `start` and `end` positions will be used to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New range with located at break positions.\n\t */ _breakAttributesRange(range, forceSplitText = false) {\n        const rangeStart = range.start;\n        const rangeEnd = range.end;\n        validateRangeContainer(range, this.document);\n        // Break at the collapsed position. Return new collapsed range.\n        if (range.isCollapsed) {\n            const position = this._breakAttributes(range.start, forceSplitText);\n            return new Range$1(position, position);\n        }\n        const breakEnd = this._breakAttributes(rangeEnd, forceSplitText);\n        const count = breakEnd.parent.childCount;\n        const breakStart = this._breakAttributes(rangeStart, forceSplitText);\n        // Calculate new break end offset.\n        breakEnd.offset += breakEnd.parent.childCount - count;\n        return new Range$1(breakStart, breakEnd);\n    }\n    /**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at given position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n\t * is placed inside {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n\t * is placed inside {@link module:engine/view/uielement~UIElement UIElement}.\n\t *\n\t * @param position Position where to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New position after breaking the attributes.\n\t */ _breakAttributes(position, forceSplitText = false) {\n        const positionOffset = position.offset;\n        const positionParent = position.parent;\n        // If position is placed inside EmptyElement - throw an exception as we cannot break inside.\n        if (position.parent.is('emptyElement')) {\n            /**\n\t\t\t * Cannot break an `EmptyElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-empty-element\n\t\t\t */ throw new CKEditorError('view-writer-cannot-break-empty-element', this.document);\n        }\n        // If position is placed inside UIElement - throw an exception as we cannot break inside.\n        if (position.parent.is('uiElement')) {\n            /**\n\t\t\t * Cannot break a `UIElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-ui-element\n\t\t\t */ throw new CKEditorError('view-writer-cannot-break-ui-element', this.document);\n        }\n        // If position is placed inside RawElement - throw an exception as we cannot break inside.\n        if (position.parent.is('rawElement')) {\n            /**\n\t\t\t * Cannot break a `RawElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-raw-element\n\t\t\t */ throw new CKEditorError('view-writer-cannot-break-raw-element', this.document);\n        }\n        // There are no attributes to break and text nodes breaking is not forced.\n        if (!forceSplitText && positionParent.is('$text') && isContainerOrFragment(positionParent.parent)) {\n            return position.clone();\n        }\n        // Position's parent is container, so no attributes to break.\n        if (isContainerOrFragment(positionParent)) {\n            return position.clone();\n        }\n        // Break text and start again in new position.\n        if (positionParent.is('$text')) {\n            return this._breakAttributes(breakTextNode(position), forceSplitText);\n        }\n        const length = positionParent.childCount;\n        // <p>foo<b><u>bar{}</u></b></p>\n        // <p>foo<b><u>bar</u>[]</b></p>\n        // <p>foo<b><u>bar</u></b>[]</p>\n        if (positionOffset == length) {\n            const newPosition = new Position$1(positionParent.parent, positionParent.index + 1);\n            return this._breakAttributes(newPosition, forceSplitText);\n        } else {\n            // <p>foo<b><u>{}bar</u></b></p>\n            // <p>foo<b>[]<u>bar</u></b></p>\n            // <p>foo{}<b><u>bar</u></b></p>\n            if (positionOffset === 0) {\n                const newPosition = new Position$1(positionParent.parent, positionParent.index);\n                return this._breakAttributes(newPosition, forceSplitText);\n            } else {\n                const offsetAfter = positionParent.index + 1;\n                // Break element.\n                const clonedNode = positionParent._clone();\n                // Insert cloned node to position's parent node.\n                positionParent.parent._insertChild(offsetAfter, clonedNode);\n                this._addToClonedElementsGroup(clonedNode);\n                // Get nodes to move.\n                const count = positionParent.childCount - positionOffset;\n                const nodesToMove = positionParent._removeChildren(positionOffset, count);\n                // Move nodes to cloned node.\n                clonedNode._appendChild(nodesToMove);\n                // Create new position to work on.\n                const newPosition = new Position$1(positionParent.parent, offsetAfter);\n                return this._breakAttributes(newPosition, forceSplitText);\n            }\n        }\n    }\n    /**\n\t * Stores the information that an {@link module:engine/view/attributeelement~AttributeElement attribute element} was\n\t * added to the tree. Saves the reference to the group in the given element and updates the group, so other elements\n\t * from the group now keep a reference to the given attribute element.\n\t *\n\t * The clones group can be obtained using {@link module:engine/view/attributeelement~AttributeElement#getElementsWithSameId}.\n\t *\n\t * Does nothing if added element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @param element Attribute element to save.\n\t */ _addToClonedElementsGroup(element) {\n        // Add only if the element is in document tree.\n        if (!element.root.is('rootElement')) {\n            return;\n        }\n        // Traverse the element's children recursively to find other attribute elements that also might got inserted.\n        // The loop is at the beginning so we can make fast returns later in the code.\n        if (element.is('element')) {\n            for (const child of element.getChildren()){\n                this._addToClonedElementsGroup(child);\n            }\n        }\n        const id = element.id;\n        if (!id) {\n            return;\n        }\n        let group = this._cloneGroups.get(id);\n        if (!group) {\n            group = new Set();\n            this._cloneGroups.set(id, group);\n        }\n        group.add(element);\n        element._clonesGroup = group;\n    }\n    /**\n\t * Removes all the information about the given {@link module:engine/view/attributeelement~AttributeElement attribute element}\n\t * from its clones group.\n\t *\n\t * Keep in mind, that the element will still keep a reference to the group (but the group will not keep a reference to it).\n\t * This allows to reference the whole group even if the element was already removed from the tree.\n\t *\n\t * Does nothing if the element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @param element Attribute element to remove.\n\t */ _removeFromClonedElementsGroup(element) {\n        // Traverse the element's children recursively to find other attribute elements that also got removed.\n        // The loop is at the beginning so we can make fast returns later in the code.\n        if (element.is('element')) {\n            for (const child of element.getChildren()){\n                this._removeFromClonedElementsGroup(child);\n            }\n        }\n        const id = element.id;\n        if (!id) {\n            return;\n        }\n        const group = this._cloneGroups.get(id);\n        if (!group) {\n            return;\n        }\n        group.delete(element);\n    // Not removing group from element on purpose!\n    // If other parts of code have reference to this element, they will be able to get references to other elements from the group.\n    }\n}\n// Helper function for `view.writer.wrap`. Checks if given element has any children that are not ui elements.\nfunction _hasNonUiChildren(parent) {\n    return Array.from(parent.getChildren()).some((child)=>!child.is('uiElement'));\n}\n/**\n * The `attribute` passed to {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`}\n * must be an instance of {@link module:engine/view/attributeelement~AttributeElement `AttributeElement`}.\n *\n * @error view-writer-wrap-invalid-attribute\n */ /**\n * Returns first parent container of specified {@link module:engine/view/position~Position Position}.\n * Position's parent node is checked as first, then next parents are checked.\n * Note that {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n *\n * @param position Position used as a start point to locate parent container.\n * @returns Parent container element or `undefined` if container is not found.\n */ function getParentContainer(position) {\n    let parent = position.parent;\n    while(!isContainerOrFragment(parent)){\n        if (!parent) {\n            return undefined;\n        }\n        parent = parent.parent;\n    }\n    return parent;\n}\n/**\n * Checks if first {@link module:engine/view/attributeelement~AttributeElement AttributeElement} provided to the function\n * can be wrapped outside second element. It is done by comparing elements'\n * {@link module:engine/view/attributeelement~AttributeElement#priority priorities}, if both have same priority\n * {@link module:engine/view/element~Element#getIdentity identities} are compared.\n */ function shouldABeOutsideB(a, b) {\n    if (a.priority < b.priority) {\n        return true;\n    } else if (a.priority > b.priority) {\n        return false;\n    }\n    // When priorities are equal and names are different - use identities.\n    return a.getIdentity() < b.getIdentity();\n}\n/**\n * Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n * specified position.\n *\n * ```html\n * <p>foo[]</p>  ->  <p>foo{}</p>\n * <p>[]foo</p>  ->  <p>{}foo</p>\n * ```\n *\n * @returns Position located inside text node or same position if there is no text nodes\n * before or after position location.\n */ function movePositionToTextNode(position) {\n    const nodeBefore = position.nodeBefore;\n    if (nodeBefore && nodeBefore.is('$text')) {\n        return new Position$1(nodeBefore, nodeBefore.data.length);\n    }\n    const nodeAfter = position.nodeAfter;\n    if (nodeAfter && nodeAfter.is('$text')) {\n        return new Position$1(nodeAfter, 0);\n    }\n    return position;\n}\n/**\n * Breaks text node into two text nodes when possible.\n *\n * ```html\n * <p>foo{}bar</p> -> <p>foo[]bar</p>\n * <p>{}foobar</p> -> <p>[]foobar</p>\n * <p>foobar{}</p> -> <p>foobar[]</p>\n * ```\n *\n * @param position Position that need to be placed inside text node.\n * @returns New position after breaking text node.\n */ function breakTextNode(position) {\n    if (position.offset == position.parent.data.length) {\n        return new Position$1(position.parent.parent, position.parent.index + 1);\n    }\n    if (position.offset === 0) {\n        return new Position$1(position.parent.parent, position.parent.index);\n    }\n    // Get part of the text that need to be moved.\n    const textToMove = position.parent.data.slice(position.offset);\n    // Leave rest of the text in position's parent.\n    position.parent._data = position.parent.data.slice(0, position.offset);\n    // Insert new text node after position's parent text node.\n    position.parent.parent._insertChild(position.parent.index + 1, new Text$1(position.root.document, textToMove));\n    // Return new position between two newly created text nodes.\n    return new Position$1(position.parent.parent, position.parent.index + 1);\n}\n/**\n * Merges two text nodes into first node. Removes second node and returns merge position.\n *\n * @param t1 First text node to merge. Data from second text node will be moved at the end of this text node.\n * @param t2 Second text node to merge. This node will be removed after merging.\n * @returns Position after merging text nodes.\n */ function mergeTextNodes(t1, t2) {\n    // Merge text data into first text node and remove second one.\n    const nodeBeforeLength = t1.data.length;\n    t1._data += t2.data;\n    t2._remove();\n    return new Position$1(t1, nodeBeforeLength);\n}\nconst validNodesToInsert = [\n    Text$1,\n    AttributeElement,\n    ContainerElement,\n    EmptyElement,\n    RawElement,\n    UIElement\n];\n/**\n * Checks if provided nodes are valid to insert.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n * contains instances that are not supported ones (see error description for valid ones.\n */ function validateNodesToInsert(nodes, errorContext) {\n    for (const node of nodes){\n        if (!validNodesToInsert.some((validNode)=>node instanceof validNode)) {\n            /**\n\t\t\t * One of the nodes to be inserted is of an invalid type.\n\t\t\t *\n\t\t\t * Nodes to be inserted with {@link module:engine/view/downcastwriter~DowncastWriter#insert `DowncastWriter#insert()`} should be\n\t\t\t * of the following types:\n\t\t\t *\n\t\t\t * * {@link module:engine/view/attributeelement~AttributeElement AttributeElement},\n\t\t\t * * {@link module:engine/view/containerelement~ContainerElement ContainerElement},\n\t\t\t * * {@link module:engine/view/emptyelement~EmptyElement EmptyElement},\n\t\t\t * * {@link module:engine/view/uielement~UIElement UIElement},\n\t\t\t * * {@link module:engine/view/rawelement~RawElement RawElement},\n\t\t\t * * {@link module:engine/view/text~Text Text}.\n\t\t\t *\n\t\t\t * @error view-writer-insert-invalid-node-type\n\t\t\t */ throw new CKEditorError('view-writer-insert-invalid-node-type', errorContext);\n        }\n        if (!node.is('$text')) {\n            validateNodesToInsert(node.getChildren(), errorContext);\n        }\n    }\n}\n/**\n * Checks if node is ContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n *\n * @returns Returns `true` if node is instance of ContainerElement or DocumentFragment.\n */ function isContainerOrFragment(node) {\n    return node && (node.is('containerElement') || node.is('documentFragment'));\n}\n/**\n * Checks if {@link module:engine/view/range~Range#start range start} and {@link module:engine/view/range~Range#end range end} are placed\n * inside same {@link module:engine/view/containerelement~ContainerElement container element}.\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n */ function validateRangeContainer(range, errorContext) {\n    const startContainer = getParentContainer(range.start);\n    const endContainer = getParentContainer(range.end);\n    if (!startContainer || !endContainer || startContainer !== endContainer) {\n        /**\n\t\t * The container of the given range is invalid.\n\t\t *\n\t\t * This may happen if {@link module:engine/view/range~Range#start range start} and\n\t\t * {@link module:engine/view/range~Range#end range end} positions are not placed inside the same container element or\n\t\t * a parent container for these positions cannot be found.\n\t\t *\n\t\t * Methods like {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#remove()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#clean()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#unwrap()`} need to be called\n\t\t * on a range that has its start and end positions located in the same container element. Both positions can be\n\t\t * nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same.\n\t\t *\n\t\t * @error view-writer-invalid-range-container\n\t\t */ throw new CKEditorError('view-writer-invalid-range-container', errorContext);\n    }\n}\n/**\n * Checks if two attribute elements can be joined together. Elements can be joined together if, and only if\n * they do not have ids specified.\n */ function canBeJoined(a, b) {\n    return a.id === null && b.id === null;\n}\n\n/**\n * Set of utilities related to handling block and inline fillers.\n *\n * Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all\n * empty elements which should be selectable with elements or characters called \"fillers\". Unfortunately there is no one\n * universal filler, this is why two types are uses:\n *\n * * Block filler is an element which fill block elements, like `<p>`. CKEditor uses `<br>` as a block filler during the editing,\n * as browsers do natively. So instead of an empty `<p>` there will be `<p><br></p>`. The advantage of block filler is that\n * it is transparent for the selection, so when the caret is before the `<br>` and user presses right arrow he will be\n * moved to the next paragraph, not after the `<br>`. The disadvantage is that it breaks a block, so it can not be used\n * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `<br>` filler} can be replaced with any other\n * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or\n * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.\n *\n * * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty\n * `<b>` surrendered by text: `foo<b></b>bar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width\n * spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined\n * {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to\n * avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not\n * transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional\n * code is needed to handle the caret.\n *\n * Both inline and block fillers are handled by the {@link module:engine/view/renderer~Renderer renderer} and are not present in the\n * view.\n *\n * @module engine/view/filler\n */ /**\n * Non-breaking space filler creator. This function creates the `&nbsp;` text node.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n */ const NBSP_FILLER = (domDocument)=>domDocument.createTextNode('\\u00A0');\n/**\n * Marked non-breaking space filler creator. This function creates the `<span data-cke-filler=\"true\">&nbsp;</span>` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n */ const MARKED_NBSP_FILLER = (domDocument)=>{\n    const span = domDocument.createElement('span');\n    span.dataset.ckeFiller = 'true';\n    span.innerText = '\\u00A0';\n    return span;\n};\n/**\n * `<br>` filler creator. This function creates the `<br data-cke-filler=\"true\">` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n */ const BR_FILLER = (domDocument)=>{\n    const fillerBr = domDocument.createElement('br');\n    fillerBr.dataset.ckeFiller = 'true';\n    return fillerBr;\n};\n/**\n * Length of the {@link module:engine/view/filler~INLINE_FILLER INLINE_FILLER}.\n */ const INLINE_FILLER_LENGTH = 7;\n/**\n * Inline filler which is a sequence of the word joiners.\n */ const INLINE_FILLER = '\\u2060'.repeat(INLINE_FILLER_LENGTH);\n/**\n * Checks if the node is a text node which starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * startsWithFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * startsWithFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // true\n * startsWithFiller( document.createTextNode( 'foo' ) ); // false\n * startsWithFiller( document.createElement( 'p' ) ); // false\n * ```\n *\n * @param domNode DOM node.\n * @returns True if the text node starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */ function startsWithFiller(domNode) {\n    if (typeof domNode == 'string') {\n        return domNode.substr(0, INLINE_FILLER_LENGTH) === INLINE_FILLER;\n    }\n    return isText(domNode) && domNode.data.substr(0, INLINE_FILLER_LENGTH) === INLINE_FILLER;\n}\n/**\n * Checks if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * isInlineFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * isInlineFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // false\n * ```\n *\n * @param domText DOM text node.\n * @returns True if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */ function isInlineFiller(domText) {\n    return domText.data.length == INLINE_FILLER_LENGTH && startsWithFiller(domText);\n}\n/**\n * Get string data from the text node, removing an {@link module:engine/view/filler~INLINE_FILLER inline filler} from it,\n * if text node contains it.\n *\n * ```ts\n * getDataWithoutFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ) == 'foo' // true\n * getDataWithoutFiller( document.createTextNode( 'foo' ) ) == 'foo' // true\n * ```\n *\n * @param domText DOM text node, possible with inline filler.\n * @returns Data without filler.\n */ function getDataWithoutFiller(domText) {\n    const data = typeof domText == 'string' ? domText : domText.data;\n    if (startsWithFiller(domText)) {\n        return data.slice(INLINE_FILLER_LENGTH);\n    }\n    return data;\n}\n/**\n * Assign key observer which move cursor from the end of the inline filler to the beginning of it when\n * the left arrow is pressed, so the filler does not break navigation.\n *\n * @param view View controller instance we should inject quirks handling on.\n */ function injectQuirksHandling(view) {\n    view.document.on('arrowKey', jumpOverInlineFiller, {\n        priority: 'low'\n    });\n}\n/**\n * Move cursor from the end of the inline filler to the beginning of it when, so the filler does not break navigation.\n */ function jumpOverInlineFiller(evt, data) {\n    if (data.keyCode == keyCodes.arrowleft) {\n        const domSelection = data.domTarget.ownerDocument.defaultView.getSelection();\n        if (domSelection.rangeCount == 1 && domSelection.getRangeAt(0).collapsed) {\n            const domParent = domSelection.getRangeAt(0).startContainer;\n            const domOffset = domSelection.getRangeAt(0).startOffset;\n            if (startsWithFiller(domParent) && domOffset <= INLINE_FILLER_LENGTH) {\n                domSelection.collapse(domParent, 0);\n            }\n        }\n    }\n}\n\n/**\n * Renderer is responsible for updating the DOM structure and the DOM selection based on\n * the {@link module:engine/view/renderer~Renderer#markToSync information about updated view nodes}.\n * In other words, it renders the view to the DOM.\n *\n * Its main responsibility is to make only the necessary, minimal changes to the DOM. However, unlike in many\n * virtual DOM implementations, the primary reason for doing minimal changes is not the performance but ensuring\n * that native editing features such as text composition, autocompletion, spell checking, selection's x-index are\n * affected as little as possible.\n *\n * Renderer uses {@link module:engine/view/domconverter~DomConverter} to transform view nodes and positions\n * to and from the DOM.\n */ class Renderer extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * Set of DOM Documents instances.\n\t */ domDocuments = new Set();\n    /**\n\t * Converter instance.\n\t */ domConverter;\n    /**\n\t * Set of nodes which attributes changed and may need to be rendered.\n\t */ markedAttributes = new Set();\n    /**\n\t * Set of elements which child lists changed and may need to be rendered.\n\t */ markedChildren = new Set();\n    /**\n\t * Set of text nodes which text data changed and may need to be rendered.\n\t */ markedTexts = new Set();\n    /**\n\t * View selection. Renderer updates DOM selection based on the view selection.\n\t */ selection;\n    /**\n\t * The text node in which the inline filler was rendered.\n\t */ _inlineFiller = null;\n    /**\n\t * DOM element containing fake selection.\n\t */ _fakeSelectionContainer = null;\n    /**\n\t * Creates a renderer instance.\n\t *\n\t * @param domConverter Converter instance.\n\t * @param selection View selection.\n\t */ constructor(domConverter, selection){\n        super();\n        this.domConverter = domConverter;\n        this.selection = selection;\n        this.set('isFocused', false);\n        this.set('isSelecting', false);\n        this.set('isComposing', false);\n        // Rendering the selection and inline filler manipulation should be postponed in (non-Android) Blink until the user finishes\n        // creating the selection in DOM to avoid accidental selection collapsing\n        // (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n        // When the user stops selecting, all pending changes should be rendered ASAP, though.\n        if (env.isBlink && !env.isAndroid) {\n            this.on('change:isSelecting', ()=>{\n                if (!this.isSelecting) {\n                    this.render();\n                }\n            });\n        }\n    }\n    /**\n\t * Marks a view node to be updated in the DOM by {@link #render `render()`}.\n\t *\n\t * Note that only view nodes whose parents have corresponding DOM elements need to be marked to be synchronized.\n\t *\n\t * @see #markedAttributes\n\t * @see #markedChildren\n\t * @see #markedTexts\n\t *\n\t * @param type Type of the change.\n\t * @param node ViewNode to be marked.\n\t */ markToSync(type, node) {\n        if (type === 'text') {\n            if (this.domConverter.mapViewToDom(node.parent)) {\n                this.markedTexts.add(node);\n            }\n        } else {\n            // If the node has no DOM element it is not rendered yet,\n            // its children/attributes do not need to be marked to be sync.\n            if (!this.domConverter.mapViewToDom(node)) {\n                return;\n            }\n            if (type === 'attributes') {\n                this.markedAttributes.add(node);\n            } else if (type === 'children') {\n                this.markedChildren.add(node);\n            } else {\n                /**\n\t\t\t\t * Unknown type passed to Renderer.markToSync.\n\t\t\t\t *\n\t\t\t\t * @error view-renderer-unknown-type\n\t\t\t\t */ throw new CKEditorError('view-renderer-unknown-type', this);\n            }\n        }\n    }\n    /**\n\t * Renders all buffered changes ({@link #markedAttributes}, {@link #markedChildren} and {@link #markedTexts}) and\n\t * the current view selection (if needed) to the DOM by applying a minimal set of changes to it.\n\t *\n\t * Renderer tries not to break the text composition (e.g. IME) and x-index of the selection,\n\t * so it does as little as it is needed to update the DOM.\n\t *\n\t * Renderer also handles {@link module:engine/view/filler fillers}. Especially, it checks if the inline filler is needed\n\t * at the selection position and adds or removes it. To prevent breaking text composition inline filler will not be\n\t * removed as long as the selection is in the text node which needed it at first.\n\t */ render() {\n        // Ignore rendering while in the composition mode. Composition events are not cancellable and browser will modify the DOM tree.\n        // All marked elements, attributes, etc. will wait until next render after the composition ends.\n        // On Android composition events are immediately applied to the model, so we don't need to skip rendering,\n        // and we should not do it because the difference between view and DOM could lead to position mapping problems.\n        if (this.isComposing && !env.isAndroid) {\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Rendering aborted while isComposing.',\n            // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-style: italic'\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            return;\n        }\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Rendering',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: bold'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        let inlineFillerPosition = null;\n        const isInlineFillerRenderingPossible = env.isBlink && !env.isAndroid ? !this.isSelecting : true;\n        // Refresh mappings.\n        for (const element of this.markedChildren){\n            this._updateChildrenMappings(element);\n        }\n        // Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n        // DOM selection collapsing\n        // (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n        if (isInlineFillerRenderingPossible) {\n            // There was inline filler rendered in the DOM but it's not\n            // at the selection position any more, so we can remove it\n            // (cause even if it's needed, it must be placed in another location).\n            if (this._inlineFiller && !this._isSelectionInInlineFiller()) {\n                this._removeInlineFiller();\n            }\n            // If we've got the filler, let's try to guess its position in the view.\n            if (this._inlineFiller) {\n                inlineFillerPosition = this._getInlineFillerPosition();\n            } else if (this._needsInlineFillerAtSelection()) {\n                inlineFillerPosition = this.selection.getFirstPosition();\n                // Do not use `markToSync` so it will be added even if the parent is already added.\n                this.markedChildren.add(inlineFillerPosition.parent);\n            }\n        } else if (this._inlineFiller && this._inlineFiller.parentNode) {\n            // While the user is making selection, preserve the inline filler at its original position.\n            inlineFillerPosition = this.domConverter.domPositionToView(this._inlineFiller);\n            // While down-casting the document selection attributes, all existing empty\n            // attribute elements (for selection position) are removed from the view and DOM,\n            // so make sure that we were able to map filler position.\n            // https://github.com/ckeditor/ckeditor5/issues/12026\n            if (inlineFillerPosition && inlineFillerPosition.parent.is('$text')) {\n                // The inline filler position is expected to be before the text node.\n                inlineFillerPosition = Position$1._createBefore(inlineFillerPosition.parent);\n            }\n        }\n        for (const element of this.markedAttributes){\n            this._updateAttrs(element);\n        }\n        for (const element of this.markedChildren){\n            this._updateChildren(element, {\n                inlineFillerPosition\n            });\n        }\n        for (const node of this.markedTexts){\n            if (!this.markedChildren.has(node.parent) && this.domConverter.mapViewToDom(node.parent)) {\n                this._updateText(node, {\n                    inlineFillerPosition\n                });\n            }\n        }\n        // * Check whether the inline filler is required and where it really is in the DOM.\n        //   At this point in most cases it will be in the DOM, but there are exceptions.\n        //   For example, if the inline filler was deep in the created DOM structure, it will not be created.\n        //   Similarly, if it was removed at the beginning of this function and then neither text nor children were updated,\n        //   it will not be present. Fix those and similar scenarios.\n        // * Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n        //   DOM selection collapsing\n        //   (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n        if (isInlineFillerRenderingPossible) {\n            if (inlineFillerPosition) {\n                const fillerDomPosition = this.domConverter.viewPositionToDom(inlineFillerPosition);\n                const domDocument = fillerDomPosition.parent.ownerDocument;\n                if (!startsWithFiller(fillerDomPosition.parent)) {\n                    // Filler has not been created at filler position. Create it now.\n                    this._inlineFiller = addInlineFiller(domDocument, fillerDomPosition.parent, fillerDomPosition.offset);\n                } else {\n                    // Filler has been found, save it.\n                    this._inlineFiller = fillerDomPosition.parent;\n                }\n            } else {\n                // There is no filler needed.\n                this._inlineFiller = null;\n            }\n        }\n        // First focus the new editing host, then update the selection.\n        // Otherwise, FF may throw an error (https://github.com/ckeditor/ckeditor5/issues/721).\n        this._updateFocus();\n        this._updateSelection();\n        this.domConverter._clearTemporaryCustomProperties();\n        this.markedTexts.clear();\n        this.markedAttributes.clear();\n        this.markedChildren.clear();\n    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n    // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n    // @if CK_DEBUG_TYPING // }\n    }\n    /**\n\t * Updates mappings of view element's children.\n\t *\n\t * Children that were replaced in the view structure by similar elements (same tag name) are treated as 'replaced'.\n\t * This means that their mappings can be updated so the new view elements are mapped to the existing DOM elements.\n\t * Thanks to that these elements do not need to be re-rendered completely.\n\t *\n\t * @param viewElement The view element whose children mappings will be updated.\n\t */ _updateChildrenMappings(viewElement) {\n        const domElement = this.domConverter.mapViewToDom(viewElement);\n        if (!domElement) {\n            // If there is no `domElement` it means that it was already removed from DOM and there is no need to process it.\n            return;\n        }\n        // Removing nodes from the DOM as we iterate can cause `actualDomChildren`\n        // (which is a live-updating `NodeList`) to get out of sync with the\n        // indices that we compute as we iterate over `actions`.\n        // This would produce incorrect element mappings.\n        //\n        // Converting live list to an array to make the list static.\n        const actualDomChildren = Array.from(domElement.childNodes);\n        const expectedDomChildren = Array.from(this.domConverter.viewChildrenToDom(viewElement, {\n            withChildren: false\n        }));\n        const diff = this._diffNodeLists(actualDomChildren, expectedDomChildren);\n        const actions = this._findUpdateActions(diff, actualDomChildren, expectedDomChildren, areSimilarElements);\n        if (actions.indexOf('update') !== -1) {\n            const counter = {\n                equal: 0,\n                insert: 0,\n                delete: 0\n            };\n            for (const action of actions){\n                if (action === 'update') {\n                    const insertIndex = counter.equal + counter.insert;\n                    const deleteIndex = counter.equal + counter.delete;\n                    const viewChild = viewElement.getChild(insertIndex);\n                    // UIElement and RawElement are special cases. Their children are not stored in a view (#799)\n                    // so we cannot use them with replacing flow (since they use view children during rendering\n                    // which will always result in rendering empty elements).\n                    if (viewChild && !viewChild.is('uiElement') && !viewChild.is('rawElement')) {\n                        this._updateElementMappings(viewChild, actualDomChildren[deleteIndex]);\n                    }\n                    remove$1(expectedDomChildren[insertIndex]);\n                    counter.equal++;\n                } else {\n                    counter[action]++;\n                }\n            }\n        }\n    }\n    /**\n\t * Updates mappings of a given view element.\n\t *\n\t * @param viewElement The view element whose mappings will be updated.\n\t * @param domElement The DOM element representing the given view element.\n\t */ _updateElementMappings(viewElement, domElement) {\n        // Remap 'DomConverter' bindings.\n        this.domConverter.unbindDomElement(domElement);\n        this.domConverter.bindElements(domElement, viewElement);\n        // View element may have children which needs to be updated, but are not marked, mark them to update.\n        this.markedChildren.add(viewElement);\n        // Because we replace new view element mapping with the existing one, the corresponding DOM element\n        // will not be rerendered. The new view element may have different attributes than the previous one.\n        // Since its corresponding DOM element will not be rerendered, new attributes will not be added\n        // to the DOM, so we need to mark it here to make sure its attributes gets updated. See #1427 for more\n        // detailed case study.\n        // Also there are cases where replaced element is removed from the view structure and then has\n        // its attributes changed or removed. In such cases the element will not be present in `markedAttributes`\n        // and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.\n        // To prevent such situations we always mark reused element to have its attributes rerenderd (#1560).\n        this.markedAttributes.add(viewElement);\n    }\n    /**\n\t * Gets the position of the inline filler based on the current selection.\n\t * Here, we assume that we know that the filler is needed and\n\t * {@link #_isSelectionInInlineFiller is at the selection position}, and, since it is needed,\n\t * it is somewhere at the selection position.\n\t *\n\t * Note: The filler position cannot be restored based on the filler's DOM text node, because\n\t * when this method is called (before rendering), the bindings will often be broken. View-to-DOM\n\t * bindings are only dependable after rendering.\n\t */ _getInlineFillerPosition() {\n        const firstPos = this.selection.getFirstPosition();\n        if (firstPos.parent.is('$text')) {\n            return Position$1._createBefore(firstPos.parent);\n        } else {\n            return firstPos;\n        }\n    }\n    /**\n\t * Returns `true` if the selection has not left the inline filler's text node.\n\t * If it is `true`, it means that the filler had been added for a reason and the selection did not\n\t * leave the filler's text node. For example, the user can be in the middle of a composition so it should not be touched.\n\t *\n\t * @returns `true` if the inline filler and selection are in the same place.\n\t */ _isSelectionInInlineFiller() {\n        if (this.selection.rangeCount != 1 || !this.selection.isCollapsed) {\n            return false;\n        }\n        // Note, we can't check if selection's position equals position of the\n        // this._inlineFiller node, because of #663. We may not be able to calculate\n        // the filler's position in the view at this stage.\n        // Instead, we check it the other way – whether selection is anchored in\n        // that text node or next to it.\n        // Possible options are:\n        // \"FILLER{}\"\n        // \"FILLERadded-text{}\"\n        const selectionPosition = this.selection.getFirstPosition();\n        const position = this.domConverter.viewPositionToDom(selectionPosition);\n        if (position && isText(position.parent) && startsWithFiller(position.parent)) {\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Removes the inline filler.\n\t */ _removeInlineFiller() {\n        const domFillerNode = this._inlineFiller;\n        // Something weird happened and the stored node doesn't contain the filler's text.\n        if (!startsWithFiller(domFillerNode)) {\n            /**\n\t\t\t * The inline filler node was lost. Most likely, something overwrote the filler text node\n\t\t\t * in the DOM.\n\t\t\t *\n\t\t\t * @error view-renderer-filler-was-lost\n\t\t\t */ throw new CKEditorError('view-renderer-filler-was-lost', this);\n        }\n        if (isInlineFiller(domFillerNode)) {\n            domFillerNode.remove();\n        } else {\n            domFillerNode.data = domFillerNode.data.substr(INLINE_FILLER_LENGTH);\n        }\n        this._inlineFiller = null;\n    }\n    /**\n\t * Checks if the inline {@link module:engine/view/filler filler} should be added.\n\t *\n\t * @returns `true` if the inline filler should be added.\n\t */ _needsInlineFillerAtSelection() {\n        if (this.selection.rangeCount != 1 || !this.selection.isCollapsed) {\n            return false;\n        }\n        const selectionPosition = this.selection.getFirstPosition();\n        const selectionParent = selectionPosition.parent;\n        const selectionOffset = selectionPosition.offset;\n        // If there is no DOM root we do not care about fillers.\n        if (!this.domConverter.mapViewToDom(selectionParent.root)) {\n            return false;\n        }\n        if (!selectionParent.is('element')) {\n            return false;\n        }\n        // Prevent adding inline filler inside elements with contenteditable=false.\n        // https://github.com/ckeditor/ckeditor5-engine/issues/1170\n        if (!isEditable(selectionParent)) {\n            return false;\n        }\n        const nodeBefore = selectionPosition.nodeBefore;\n        const nodeAfter = selectionPosition.nodeAfter;\n        if (nodeBefore instanceof Text$1 || nodeAfter instanceof Text$1) {\n            return false;\n        }\n        // We have block filler, we do not need inline one.\n        if (selectionOffset === selectionParent.getFillerOffset() && (!nodeBefore || !nodeBefore.is('element', 'br'))) {\n            return false;\n        }\n        // Do not use inline filler while typing outside inline elements on Android.\n        // The deleteContentBackward would remove part of the inline filler instead of removing last letter in a link.\n        if (env.isAndroid && (nodeBefore || nodeAfter)) {\n            return false;\n        }\n        return true;\n    }\n    /**\n\t * Checks if text needs to be updated and possibly updates it.\n\t *\n\t * @param viewText View text to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */ _updateText(viewText, options) {\n        const domText = this.domConverter.findCorrespondingDomText(viewText);\n        const newDomText = this.domConverter.viewToDom(viewText);\n        let expectedText = newDomText.data;\n        const filler = options.inlineFillerPosition;\n        if (filler && filler.parent == viewText.parent && filler.offset == viewText.index) {\n            expectedText = INLINE_FILLER + expectedText;\n        }\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update text',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: normal'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        this._updateTextNode(domText, expectedText);\n    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n    // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n    // @if CK_DEBUG_TYPING // }\n    }\n    /**\n\t * Checks if attribute list needs to be updated and possibly updates it.\n\t *\n\t * @param viewElement The view element to update.\n\t */ _updateAttrs(viewElement) {\n        const domElement = this.domConverter.mapViewToDom(viewElement);\n        if (!domElement) {\n            // If there is no `domElement` it means that 'viewElement' is outdated as its mapping was updated\n            // in 'this._updateChildrenMappings()'. There is no need to process it as new view element which\n            // replaced old 'viewElement' mapping was also added to 'this.markedAttributes'\n            // in 'this._updateChildrenMappings()' so it will be processed separately.\n            return;\n        }\n        const domAttrKeys = Array.from(domElement.attributes).map((attr)=>attr.name);\n        const viewAttrKeys = viewElement.getAttributeKeys();\n        // Add or overwrite attributes.\n        for (const key of viewAttrKeys){\n            this.domConverter.setDomElementAttribute(domElement, key, viewElement.getAttribute(key), viewElement);\n        }\n        // Remove from DOM attributes which do not exists in the view.\n        for (const key of domAttrKeys){\n            // All other attributes not present in the DOM should be removed.\n            if (!viewElement.hasAttribute(key)) {\n                this.domConverter.removeDomElementAttribute(domElement, key);\n            }\n        }\n    }\n    /**\n\t * Checks if elements child list needs to be updated and possibly updates it.\n\t *\n\t * Note that on Android, to reduce the risk of composition breaks, it tries to update data of an existing\n\t * child text nodes instead of replacing them completely.\n\t *\n\t * @param viewElement View element to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */ _updateChildren(viewElement, options) {\n        const domElement = this.domConverter.mapViewToDom(viewElement);\n        if (!domElement) {\n            // If there is no `domElement` it means that it was already removed from DOM.\n            // There is no need to process it. It will be processed when re-inserted.\n            return;\n        }\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update children',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: normal'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        // IME on Android inserts a new text node while typing after a link\n        // instead of updating an existing text node that follows the link.\n        // We must normalize those text nodes so the diff won't get confused.\n        // https://github.com/ckeditor/ckeditor5/issues/12574.\n        if (env.isAndroid) {\n            let previousDomNode = null;\n            for (const domNode of Array.from(domElement.childNodes)){\n                if (previousDomNode && isText(previousDomNode) && isText(domNode)) {\n                    domElement.normalize();\n                    break;\n                }\n                previousDomNode = domNode;\n            }\n        }\n        const inlineFillerPosition = options.inlineFillerPosition;\n        const actualDomChildren = domElement.childNodes;\n        const expectedDomChildren = Array.from(this.domConverter.viewChildrenToDom(viewElement, {\n            bind: true\n        }));\n        // Inline filler element has to be created as it is present in the DOM, but not in the view. It is required\n        // during diffing so text nodes could be compared correctly and also during rendering to maintain\n        // proper order and indexes while updating the DOM.\n        if (inlineFillerPosition && inlineFillerPosition.parent === viewElement) {\n            addInlineFiller(domElement.ownerDocument, expectedDomChildren, inlineFillerPosition.offset);\n        }\n        const diff = this._diffNodeLists(actualDomChildren, expectedDomChildren);\n        // We need to make sure that we update the existing text node and not replace it with another one.\n        // The composition and different \"language\" browser extensions are fragile to text node being completely replaced.\n        const actions = this._findUpdateActions(diff, actualDomChildren, expectedDomChildren, areTextNodes);\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping && actions.every( a => a == 'equal' ) ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Nothing to update.',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-style: italic'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        let i = 0;\n        const nodesToUnbind = new Set();\n        // Handle deletions first.\n        // This is to prevent a situation where an element that already exists in `actualDomChildren` is inserted at a different\n        // index in `actualDomChildren`. Since `actualDomChildren` is a `NodeList`, this works like move, not like an insert,\n        // and it disrupts the whole algorithm. See https://github.com/ckeditor/ckeditor5/issues/6367.\n        //\n        // It doesn't matter in what order we remove or add nodes, as long as we remove and add correct nodes at correct indexes.\n        for (const action of actions){\n            if (action === 'delete') {\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING //\tconst node = actualDomChildren[ i ];\n                // @if CK_DEBUG_TYPING // \tif ( isText( node ) ) {\n                // @if CK_DEBUG_TYPING // \t\tconsole.info( '%c[Renderer]%c Remove text node' +\n                // @if CK_DEBUG_TYPING // \t\t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: ` +\n                // @if CK_DEBUG_TYPING // \t\t\t`%c${ _escapeTextNodeData( node.data ) }%c (${ node.data.length })`,\n                // @if CK_DEBUG_TYPING // \t\t\t'color: green; font-weight: bold',\n                // @if CK_DEBUG_TYPING // \t\t\tthis.isComposing ? 'color: red; font-weight: bold' : '', 'color: blue', ''\n                // @if CK_DEBUG_TYPING // \t\t);\n                // @if CK_DEBUG_TYPING // \t} else {\n                // @if CK_DEBUG_TYPING // \t\tconsole.info( '%c[Renderer]%c Remove element' +\n                // @if CK_DEBUG_TYPING // \t\t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: `,\n                // @if CK_DEBUG_TYPING // \t\t\t'color: green; font-weight: bold',\n                // @if CK_DEBUG_TYPING // \t\t\tthis.isComposing ? 'color: red; font-weight: bold' : '',\n                // @if CK_DEBUG_TYPING // \t\t\tnode\n                // @if CK_DEBUG_TYPING // \t\t);\n                // @if CK_DEBUG_TYPING // \t}\n                // @if CK_DEBUG_TYPING // }\n                nodesToUnbind.add(actualDomChildren[i]);\n                remove$1(actualDomChildren[i]);\n            } else if (action === 'equal' || action === 'update') {\n                i++;\n            }\n        }\n        i = 0;\n        for (const action of actions){\n            if (action === 'insert') {\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING //\tconst node = expectedDomChildren[ i ];\n                // @if CK_DEBUG_TYPING //\tif ( isText( node ) ) {\n                // @if CK_DEBUG_TYPING //\t\tconsole.info( '%c[Renderer]%c Insert text node' +\n                // @if CK_DEBUG_TYPING //\t\t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: ` +\n                // @if CK_DEBUG_TYPING //\t\t\t`%c${ _escapeTextNodeData( node.data ) }%c (${ node.data.length })`,\n                // @if CK_DEBUG_TYPING //\t\t\t'color: green; font-weight: bold',\n                // @if CK_DEBUG_TYPING //\t\t\tthis.isComposing ? 'color: red; font-weight: bold' : '',\n                // @if CK_DEBUG_TYPING //\t\t\t'color: blue', ''\n                // @if CK_DEBUG_TYPING //\t\t);\n                // @if CK_DEBUG_TYPING //\t} else {\n                // @if CK_DEBUG_TYPING //\t\tconsole.info( '%c[Renderer]%c Insert element:',\n                // @if CK_DEBUG_TYPING //\t\t\t'color: green; font-weight: bold', 'font-weight: normal',\n                // @if CK_DEBUG_TYPING //\t\t\tnode\n                // @if CK_DEBUG_TYPING //\t\t);\n                // @if CK_DEBUG_TYPING //\t}\n                // @if CK_DEBUG_TYPING // }\n                insertAt(domElement, i, expectedDomChildren[i]);\n                i++;\n            } else if (action === 'update') {\n                this._updateTextNode(actualDomChildren[i], expectedDomChildren[i].data);\n                i++;\n            } else if (action === 'equal') {\n                // Force updating text nodes inside elements which did not change and do not need to be re-rendered (#1125).\n                // Do it here (not in the loop above) because only after insertions the `i` index is correct.\n                this._markDescendantTextToSync(this.domConverter.domToView(expectedDomChildren[i]));\n                i++;\n            }\n        }\n        // Unbind removed nodes. When node does not have a parent it means that it was removed from DOM tree during\n        // comparison with the expected DOM. We don't need to check child nodes, because if child node was reinserted,\n        // it was moved to DOM tree out of the removed node.\n        for (const node of nodesToUnbind){\n            if (!node.parentNode) {\n                this.domConverter.unbindDomElement(node);\n            }\n        }\n    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n    // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n    // @if CK_DEBUG_TYPING // }\n    }\n    /**\n\t * Shorthand for diffing two arrays or node lists of DOM nodes.\n\t *\n\t * @param actualDomChildren Actual DOM children\n\t * @param expectedDomChildren Expected DOM children.\n\t * @returns The list of actions based on the {@link module:utils/diff~diff} function.\n\t */ _diffNodeLists(actualDomChildren, expectedDomChildren) {\n        actualDomChildren = filterOutFakeSelectionContainer(actualDomChildren, this._fakeSelectionContainer);\n        return diff(actualDomChildren, expectedDomChildren, sameNodes$1.bind(null, this.domConverter));\n    }\n    /**\n\t * Finds DOM nodes that were replaced with the similar nodes (same tag name) in the view. All nodes are compared\n\t * within one `insert`/`delete` action group, for example:\n\t *\n\t * ```\n\t * Actual DOM:\t\t<p><b>Foo</b>Bar<i>Baz</i><b>Bax</b></p>\n\t * Expected DOM:\t<p>Bar<b>123</b><i>Baz</i><b>456</b></p>\n\t * Input actions:\t[ insert, insert, delete, delete, equal, insert, delete ]\n\t * Output actions:\t[ insert, replace, delete, equal, replace ]\n\t * ```\n\t *\n\t * @param actions Actions array which is a result of the {@link module:utils/diff~diff} function.\n\t * @param actualDom Actual DOM children\n\t * @param expectedDom Expected DOM children.\n\t * @param comparator A comparator function that should return `true` if the given node should be reused\n\t * (either by the update of a text node data or an element children list for similar elements).\n\t * @returns Actions array modified with the `update` actions.\n\t */ _findUpdateActions(actions, actualDom, expectedDom, comparator) {\n        // If there is no both 'insert' and 'delete' actions, no need to check for replaced elements.\n        if (actions.indexOf('insert') === -1 || actions.indexOf('delete') === -1) {\n            return actions;\n        }\n        let newActions = [];\n        let actualSlice = [];\n        let expectedSlice = [];\n        const counter = {\n            equal: 0,\n            insert: 0,\n            delete: 0\n        };\n        for (const action of actions){\n            if (action === 'insert') {\n                expectedSlice.push(expectedDom[counter.equal + counter.insert]);\n            } else if (action === 'delete') {\n                actualSlice.push(actualDom[counter.equal + counter.delete]);\n            } else {\n                newActions = newActions.concat(diff(actualSlice, expectedSlice, comparator).map((action)=>action === 'equal' ? 'update' : action));\n                newActions.push('equal');\n                // Reset stored elements on 'equal'.\n                actualSlice = [];\n                expectedSlice = [];\n            }\n            counter[action]++;\n        }\n        return newActions.concat(diff(actualSlice, expectedSlice, comparator).map((action)=>action === 'equal' ? 'update' : action));\n    }\n    /**\n\t * Checks if text needs to be updated and possibly updates it by removing and inserting only parts\n\t * of the data from the existing text node to reduce impact on the IME composition.\n\t *\n\t * @param domText DOM text node to update.\n\t * @param expectedText The expected data of a text node.\n\t */ _updateTextNode(domText, expectedText) {\n        const actualText = domText.data;\n        if (actualText == expectedText) {\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Text node does not need update:%c ' +\n            // @if CK_DEBUG_TYPING // \t\t`${ _escapeTextNodeData( actualText ) }%c (${ actualText.length })`,\n            // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-style: italic', 'color: blue', ''\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            return;\n        }\n        // Our approach to interleaving space character with NBSP might differ with the one implemented by the browser.\n        // Avoid modifying the text node in the DOM if only NBSPs and spaces are interchanged.\n        // We should avoid DOM modifications while composing to avoid breakage of composition.\n        // See: https://github.com/ckeditor/ckeditor5/issues/13994.\n        if (env.isAndroid && this.isComposing && actualText.replace(/\\u00A0/g, ' ') == expectedText.replace(/\\u00A0/g, ' ')) {\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Text node ignore NBSP changes while composing: ' +\n            // @if CK_DEBUG_TYPING // \t\t`%c${ _escapeTextNodeData( actualText ) }%c (${ actualText.length }) ->` +\n            // @if CK_DEBUG_TYPING // \t\t` %c${ _escapeTextNodeData( expectedText ) }%c (${ expectedText.length })`,\n            // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-style: italic', 'color: blue', '', 'color: blue', ''\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            return;\n        }\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Update text node' +\n        // @if CK_DEBUG_TYPING // \t\t`${ this.isComposing ? ' while composing (may break composition)' : '' }: ` +\n        // @if CK_DEBUG_TYPING // \t\t`%c${ _escapeTextNodeData( actualText ) }%c (${ actualText.length }) ->` +\n        // @if CK_DEBUG_TYPING // \t\t` %c${ _escapeTextNodeData( expectedText ) }%c (${ expectedText.length })`,\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', this.isComposing ? 'color: red; font-weight: bold' : '',\n        // @if CK_DEBUG_TYPING // \t\t'color: blue', '', 'color: blue', ''\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        this._updateTextNodeInternal(domText, expectedText);\n    }\n    /**\n\t * Part of the `_updateTextNode` method extracted for easier testing.\n\t */ _updateTextNodeInternal(domText, expectedText) {\n        const actions = fastDiff(domText.data, expectedText);\n        for (const action of actions){\n            if (action.type === 'insert') {\n                domText.insertData(action.index, action.values.join(''));\n            } else {\n                domText.deleteData(action.index, action.howMany);\n            }\n        }\n    }\n    /**\n\t * Marks text nodes to be synchronized.\n\t *\n\t * If a text node is passed, it will be marked. If an element is passed, all descendant text nodes inside it will be marked.\n\t *\n\t * @param viewNode View node to sync.\n\t */ _markDescendantTextToSync(viewNode) {\n        if (!viewNode) {\n            return;\n        }\n        if (viewNode.is('$text')) {\n            this.markedTexts.add(viewNode);\n        } else if (viewNode.is('element')) {\n            for (const child of viewNode.getChildren()){\n                this._markDescendantTextToSync(child);\n            }\n        }\n    }\n    /**\n\t * Checks if the selection needs to be updated and possibly updates it.\n\t */ _updateSelection() {\n        // Block updating DOM selection in (non-Android) Blink while the user is selecting to prevent accidental selection collapsing.\n        // Note: Structural changes in DOM must trigger selection rendering, though. Nodes the selection was anchored\n        // to, may disappear in DOM which would break the selection (e.g. in real-time collaboration scenarios).\n        // https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723\n        if (env.isBlink && !env.isAndroid && this.isSelecting && !this.markedChildren.size) {\n            return;\n        }\n        // If there is no selection - remove DOM and fake selections.\n        if (this.selection.rangeCount === 0) {\n            this._removeDomSelection();\n            this._removeFakeSelection();\n            return;\n        }\n        const domRoot = this.domConverter.mapViewToDom(this.selection.editableElement);\n        // Do nothing if there is no focus, or there is no DOM element corresponding to selection's editable element.\n        if (!this.isFocused || !domRoot) {\n            return;\n        }\n        // Render fake selection - create the fake selection container (if needed) and move DOM selection to it.\n        if (this.selection.isFake) {\n            this._updateFakeSelection(domRoot);\n        } else if (this._fakeSelectionContainer && this._fakeSelectionContainer.isConnected) {\n            this._removeFakeSelection();\n            this._updateDomSelection(domRoot);\n        } else if (!(this.isComposing && env.isAndroid)) {\n            this._updateDomSelection(domRoot);\n        }\n    }\n    /**\n\t * Updates the fake selection.\n\t *\n\t * @param domRoot A valid DOM root where the fake selection container should be added.\n\t */ _updateFakeSelection(domRoot) {\n        const domDocument = domRoot.ownerDocument;\n        if (!this._fakeSelectionContainer) {\n            this._fakeSelectionContainer = createFakeSelectionContainer(domDocument);\n        }\n        const container = this._fakeSelectionContainer;\n        // Bind fake selection container with the current selection *position*.\n        this.domConverter.bindFakeSelection(container, this.selection);\n        if (!this._fakeSelectionNeedsUpdate(domRoot)) {\n            return;\n        }\n        if (!container.parentElement || container.parentElement != domRoot) {\n            domRoot.appendChild(container);\n        }\n        container.textContent = this.selection.fakeSelectionLabel || '\\u00A0';\n        const domSelection = domDocument.getSelection();\n        const domRange = domDocument.createRange();\n        domSelection.removeAllRanges();\n        domRange.selectNodeContents(container);\n        domSelection.addRange(domRange);\n    }\n    /**\n\t * Updates the DOM selection.\n\t *\n\t * @param domRoot A valid DOM root where the DOM selection should be rendered.\n\t */ _updateDomSelection(domRoot) {\n        const domSelection = domRoot.ownerDocument.defaultView.getSelection();\n        // Let's check whether DOM selection needs updating at all.\n        if (!this._domSelectionNeedsUpdate(domSelection)) {\n            return;\n        }\n        // Multi-range selection is not available in most browsers, and, at least in Chrome, trying to\n        // set such selection, that is not continuous, throws an error. Because of that, we will just use anchor\n        // and focus of view selection.\n        // Since we are not supporting multi-range selection, we also do not need to check if proper editable is\n        // selected. If there is any editable selected, it is okay (editable is taken from selection anchor).\n        const anchor = this.domConverter.viewPositionToDom(this.selection.anchor);\n        const focus = this.domConverter.viewPositionToDom(this.selection.focus);\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Update DOM selection:',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', '', anchor, focus\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        domSelection.setBaseAndExtent(anchor.parent, anchor.offset, focus.parent, focus.offset);\n        // Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n        if (env.isGecko) {\n            fixGeckoSelectionAfterBr(focus, domSelection);\n        }\n    }\n    /**\n\t * Checks whether a given DOM selection needs to be updated.\n\t *\n\t * @param domSelection The DOM selection to check.\n\t */ _domSelectionNeedsUpdate(domSelection) {\n        if (!this.domConverter.isDomSelectionCorrect(domSelection)) {\n            // Current DOM selection is in incorrect position. We need to update it.\n            return true;\n        }\n        const oldViewSelection = domSelection && this.domConverter.domSelectionToView(domSelection);\n        if (oldViewSelection && this.selection.isEqual(oldViewSelection)) {\n            return false;\n        }\n        // If selection is not collapsed, it does not need to be updated if it is similar.\n        if (!this.selection.isCollapsed && this.selection.isSimilar(oldViewSelection)) {\n            // Selection did not changed and is correct, do not update.\n            return false;\n        }\n        // Selections are not similar.\n        return true;\n    }\n    /**\n\t * Checks whether the fake selection needs to be updated.\n\t *\n\t * @param domRoot A valid DOM root where a new fake selection container should be added.\n\t */ _fakeSelectionNeedsUpdate(domRoot) {\n        const container = this._fakeSelectionContainer;\n        const domSelection = domRoot.ownerDocument.getSelection();\n        // Fake selection needs to be updated if there's no fake selection container, or the container currently sits\n        // in a different root.\n        if (!container || container.parentElement !== domRoot) {\n            return true;\n        }\n        // Make sure that the selection actually is within the fake selection.\n        if (domSelection.anchorNode !== container && !container.contains(domSelection.anchorNode)) {\n            return true;\n        }\n        return container.textContent !== this.selection.fakeSelectionLabel;\n    }\n    /**\n\t * Removes the DOM selection.\n\t */ _removeDomSelection() {\n        for (const doc of this.domDocuments){\n            const domSelection = doc.getSelection();\n            if (domSelection.rangeCount) {\n                const activeDomElement = doc.activeElement;\n                const viewElement = this.domConverter.mapDomToView(activeDomElement);\n                if (activeDomElement && viewElement) {\n                    domSelection.removeAllRanges();\n                }\n            }\n        }\n    }\n    /**\n\t * Removes the fake selection.\n\t */ _removeFakeSelection() {\n        const container = this._fakeSelectionContainer;\n        if (container) {\n            container.remove();\n        }\n    }\n    /**\n\t * Checks if focus needs to be updated and possibly updates it.\n\t */ _updateFocus() {\n        if (this.isFocused) {\n            const editable = this.selection.editableElement;\n            if (editable) {\n                this.domConverter.focus(editable);\n            }\n        }\n    }\n}\n/**\n * Checks if provided element is editable.\n */ function isEditable(element) {\n    if (element.getAttribute('contenteditable') == 'false') {\n        return false;\n    }\n    const parent = element.findAncestor((element)=>element.hasAttribute('contenteditable'));\n    return !parent || parent.getAttribute('contenteditable') == 'true';\n}\n/**\n * Adds inline filler at a given position.\n *\n * The position can be given as an array of DOM nodes and an offset in that array,\n * or a DOM parent element and an offset in that element.\n *\n * @returns The DOM text node that contains an inline filler.\n */ function addInlineFiller(domDocument, domParentOrArray, offset) {\n    const childNodes = domParentOrArray instanceof Array ? domParentOrArray : domParentOrArray.childNodes;\n    const nodeAfterFiller = childNodes[offset];\n    if (isText(nodeAfterFiller)) {\n        nodeAfterFiller.data = INLINE_FILLER + nodeAfterFiller.data;\n        return nodeAfterFiller;\n    } else {\n        const fillerNode = domDocument.createTextNode(INLINE_FILLER);\n        if (Array.isArray(domParentOrArray)) {\n            childNodes.splice(offset, 0, fillerNode);\n        } else {\n            insertAt(domParentOrArray, offset, fillerNode);\n        }\n        return fillerNode;\n    }\n}\n/**\n * Whether two DOM nodes should be considered as similar.\n * Nodes are considered similar if they have the same tag name.\n */ function areSimilarElements(node1, node2) {\n    return isNode(node1) && isNode(node2) && !isText(node1) && !isText(node2) && !isComment(node1) && !isComment(node2) && node1.tagName.toLowerCase() === node2.tagName.toLowerCase();\n}\n/**\n * Whether two DOM nodes are text nodes.\n */ function areTextNodes(node1, node2) {\n    return isNode(node1) && isNode(node2) && isText(node1) && isText(node2);\n}\n/**\n * Whether two dom nodes should be considered as the same.\n * Two nodes which are considered the same are:\n *\n * * Text nodes with the same text.\n * * Element nodes represented by the same object.\n * * Two block filler elements.\n *\n * @param blockFillerMode Block filler mode, see {@link module:engine/view/domconverter~DomConverter#blockFillerMode}.\n */ function sameNodes$1(domConverter, actualDomChild, expectedDomChild) {\n    // Elements.\n    if (actualDomChild === expectedDomChild) {\n        return true;\n    } else if (isText(actualDomChild) && isText(expectedDomChild)) {\n        return actualDomChild.data === expectedDomChild.data;\n    } else if (domConverter.isBlockFiller(actualDomChild) && domConverter.isBlockFiller(expectedDomChild)) {\n        return true;\n    }\n    // Not matching types.\n    return false;\n}\n/**\n * The following is a Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n * When the native DOM selection is at the end of the block and preceded by <br /> e.g.\n *\n * ```html\n * <p>foo<br/>[]</p>\n * ```\n *\n * which happens a lot when using the soft line break, the browser fails to (visually) move the\n * caret to the new line. A quick fix is as simple as force–refreshing the selection with the same range.\n */ function fixGeckoSelectionAfterBr(focus, domSelection) {\n    let parent = focus.parent;\n    let offset = focus.offset;\n    if (isText(parent) && isInlineFiller(parent)) {\n        offset = indexOf(parent) + 1;\n        parent = parent.parentNode;\n    }\n    // This fix works only when the focus point is at the very end of an element.\n    // There is no point in running it in cases unrelated to the browser bug.\n    if (parent.nodeType != Node.ELEMENT_NODE || offset != parent.childNodes.length - 1) {\n        return;\n    }\n    const childAtOffset = parent.childNodes[offset];\n    // To stay on the safe side, the fix being as specific as possible, it targets only the\n    // selection which is at the very end of the element and preceded by <br />.\n    if (childAtOffset && childAtOffset.tagName == 'BR') {\n        domSelection.addRange(domSelection.getRangeAt(0));\n    }\n}\nfunction filterOutFakeSelectionContainer(domChildList, fakeSelectionContainer) {\n    const childList = Array.from(domChildList);\n    if (childList.length == 0 || !fakeSelectionContainer) {\n        return childList;\n    }\n    const last = childList[childList.length - 1];\n    if (last == fakeSelectionContainer) {\n        childList.pop();\n    }\n    return childList;\n}\n/**\n * Creates a fake selection container for a given document.\n */ function createFakeSelectionContainer(domDocument) {\n    const container = domDocument.createElement('div');\n    container.className = 'ck-fake-selection-container';\n    Object.assign(container.style, {\n        position: 'fixed',\n        top: 0,\n        left: '-9999px',\n        // See https://github.com/ckeditor/ckeditor5/issues/752.\n        width: '42px'\n    });\n    // Fill it with a text node so we can update it later.\n    container.textContent = '\\u00A0';\n    return container;\n} // @if CK_DEBUG_TYPING // function _escapeTextNodeData( text ) {\n // @if CK_DEBUG_TYPING // \tconst escapedText = text\n // @if CK_DEBUG_TYPING // \t\t.replace( /&/g, '&amp;' )\n // @if CK_DEBUG_TYPING // \t\t.replace( /\\u00A0/g, '&nbsp;' )\n // @if CK_DEBUG_TYPING // \t\t.replace( /\\u2060/g, '&NoBreak;' );\n // @if CK_DEBUG_TYPING //\n // @if CK_DEBUG_TYPING // \treturn `\"${ escapedText }\"`;\n // @if CK_DEBUG_TYPING // }\n\nconst BR_FILLER_REF = BR_FILLER(global.document); // eslint-disable-line new-cap\nconst NBSP_FILLER_REF = NBSP_FILLER(global.document); // eslint-disable-line new-cap\nconst MARKED_NBSP_FILLER_REF = MARKED_NBSP_FILLER(global.document); // eslint-disable-line new-cap\nconst UNSAFE_ATTRIBUTE_NAME_PREFIX = 'data-ck-unsafe-attribute-';\nconst UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';\n/**\n * `DomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles\n * {@link module:engine/view/domconverter~DomConverter#bindElements bindings} between these nodes.\n *\n * An instance of the DOM converter is available under\n * {@link module:engine/view/view~View#domConverter `editor.editing.view.domConverter`}.\n *\n * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~Renderer}), does not keep the\n * state of a tree nor keeps the synchronization between the tree view and the DOM tree (use {@link module:engine/view/document~Document}).\n *\n * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.\n * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.\n */ class DomConverter {\n    document;\n    /**\n\t * Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.\n\t */ renderingMode;\n    /**\n\t * The mode of a block filler used by the DOM converter.\n\t */ blockFillerMode;\n    /**\n\t * Elements which are considered pre-formatted elements.\n\t */ preElements;\n    /**\n\t * Elements which are considered block elements (and hence should be filled with a\n\t * {@link #isBlockFiller block filler}).\n\t *\n\t * Whether an element is considered a block element also affects handling of trailing whitespaces.\n\t *\n\t * You can extend this array if you introduce support for block elements which are not yet recognized here.\n\t */ blockElements;\n    /**\n\t * A list of elements that exist inline (in text) but their inner structure cannot be edited because\n\t * of the way they are rendered by the browser. They are mostly HTML form elements but there are other\n\t * elements such as `<img>` or `<iframe>` that also have non-editable children or no children whatsoever.\n\t *\n\t * Whether an element is considered an inline object has an impact on white space rendering (trimming)\n\t * around (and inside of it). In short, white spaces in text nodes next to inline objects are not trimmed.\n\t *\n\t * You can extend this array if you introduce support for inline object elements which are not yet recognized here.\n\t */ inlineObjectElements;\n    /**\n\t * A list of elements which may affect the editing experience. To avoid this, those elements are replaced with\n\t * `<span data-ck-unsafe-element=\"[element name]\"></span>` while rendering in the editing mode.\n\t */ unsafeElements;\n    /**\n\t * The DOM Document used to create DOM nodes.\n\t */ _domDocument;\n    /**\n\t * The DOM-to-view mapping.\n\t */ _domToViewMapping = new WeakMap();\n    /**\n\t * The view-to-DOM mapping.\n\t */ _viewToDomMapping = new WeakMap();\n    /**\n\t * Holds the mapping between fake selection containers and corresponding view selections.\n\t */ _fakeSelectionMapping = new WeakMap();\n    /**\n\t * Matcher for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM nodes to view elements.\n\t */ _rawContentElementMatcher = new Matcher();\n    /**\n\t * Matcher for inline object view elements. This is an extension of a simple {@link #inlineObjectElements} array of element names.\n\t */ _inlineObjectElementMatcher = new Matcher();\n    /**\n\t * Set of elements with temporary custom properties that require clearing after render.\n\t */ _elementsWithTemporaryCustomProperties = new Set();\n    /**\n\t * Creates a DOM converter.\n\t *\n\t * @param document The view document instance.\n\t * @param options An object with configuration options.\n\t * @param options.blockFillerMode The type of the block filler to use.\n\t * Default value depends on the options.renderingMode:\n\t *  'nbsp' when options.renderingMode == 'data',\n\t *  'br' when options.renderingMode == 'editing'.\n\t * @param options.renderingMode Whether to leave the View-to-DOM conversion result unchanged\n\t * or improve editing experience by filtering out interactive data.\n\t */ constructor(document, { blockFillerMode, renderingMode = 'editing' } = {}){\n        this.document = document;\n        this.renderingMode = renderingMode;\n        this.blockFillerMode = blockFillerMode || (renderingMode === 'editing' ? 'br' : 'nbsp');\n        this.preElements = [\n            'pre'\n        ];\n        this.blockElements = [\n            'address',\n            'article',\n            'aside',\n            'blockquote',\n            'caption',\n            'center',\n            'dd',\n            'details',\n            'dir',\n            'div',\n            'dl',\n            'dt',\n            'fieldset',\n            'figcaption',\n            'figure',\n            'footer',\n            'form',\n            'h1',\n            'h2',\n            'h3',\n            'h4',\n            'h5',\n            'h6',\n            'header',\n            'hgroup',\n            'legend',\n            'li',\n            'main',\n            'menu',\n            'nav',\n            'ol',\n            'p',\n            'pre',\n            'section',\n            'summary',\n            'table',\n            'tbody',\n            'td',\n            'tfoot',\n            'th',\n            'thead',\n            'tr',\n            'ul'\n        ];\n        this.inlineObjectElements = [\n            'object',\n            'iframe',\n            'input',\n            'button',\n            'textarea',\n            'select',\n            'option',\n            'video',\n            'embed',\n            'audio',\n            'img',\n            'canvas'\n        ];\n        this.unsafeElements = [\n            'script',\n            'style'\n        ];\n        this._domDocument = this.renderingMode === 'editing' ? global.document : global.document.implementation.createHTMLDocument('');\n    }\n    /**\n\t * Binds a given DOM element that represents fake selection to a **position** of a\n\t * {@link module:engine/view/documentselection~DocumentSelection document selection}.\n\t * Document selection copy is stored and can be retrieved by the\n\t * {@link module:engine/view/domconverter~DomConverter#fakeSelectionToView} method.\n\t */ bindFakeSelection(domElement, viewDocumentSelection) {\n        this._fakeSelectionMapping.set(domElement, new Selection$1(viewDocumentSelection));\n    }\n    /**\n\t * Returns a {@link module:engine/view/selection~Selection view selection} instance corresponding to a given\n\t * DOM element that represents fake selection. Returns `undefined` if binding to the given DOM element does not exist.\n\t */ fakeSelectionToView(domElement) {\n        return this._fakeSelectionMapping.get(domElement);\n    }\n    /**\n\t * Binds DOM and view elements, so it will be possible to get corresponding elements using\n\t * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.\n\t *\n\t * @param domElement The DOM element to bind.\n\t * @param viewElement The view element to bind.\n\t */ bindElements(domElement, viewElement) {\n        this._domToViewMapping.set(domElement, viewElement);\n        this._viewToDomMapping.set(viewElement, domElement);\n    }\n    /**\n\t * Unbinds a given DOM element from the view element it was bound to. Unbinding is deep, meaning that all children of\n\t * the DOM element will be unbound too.\n\t *\n\t * @param domElement The DOM element to unbind.\n\t */ unbindDomElement(domElement) {\n        const viewElement = this._domToViewMapping.get(domElement);\n        if (viewElement) {\n            this._domToViewMapping.delete(domElement);\n            this._viewToDomMapping.delete(viewElement);\n            for (const child of Array.from(domElement.children)){\n                this.unbindDomElement(child);\n            }\n        }\n    }\n    /**\n\t * Binds DOM and view document fragments, so it will be possible to get corresponding document fragments using\n\t * {@link module:engine/view/domconverter~DomConverter#mapDomToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#mapViewToDom}.\n\t *\n\t * @param domFragment The DOM document fragment to bind.\n\t * @param viewFragment The view document fragment to bind.\n\t */ bindDocumentFragments(domFragment, viewFragment) {\n        this._domToViewMapping.set(domFragment, viewFragment);\n        this._viewToDomMapping.set(viewFragment, domFragment);\n    }\n    /**\n\t * Decides whether a given pair of attribute key and value should be passed further down the pipeline.\n\t *\n\t * @param elementName Element name in lower case.\n\t */ shouldRenderAttribute(attributeKey, attributeValue, elementName) {\n        if (this.renderingMode === 'data') {\n            return true;\n        }\n        attributeKey = attributeKey.toLowerCase();\n        if (attributeKey.startsWith('on')) {\n            return false;\n        }\n        if (attributeKey === 'srcdoc' && attributeValue.match(/\\bon\\S+\\s*=|javascript:|<\\s*\\/*script/i)) {\n            return false;\n        }\n        if (elementName === 'img' && (attributeKey === 'src' || attributeKey === 'srcset')) {\n            return true;\n        }\n        if (elementName === 'source' && attributeKey === 'srcset') {\n            return true;\n        }\n        if (attributeValue.match(/^\\s*(javascript:|data:(image\\/svg|text\\/x?html))/i)) {\n            return false;\n        }\n        return true;\n    }\n    /**\n\t * Set `domElement`'s content using provided `html` argument. Apply necessary filtering for the editing pipeline.\n\t *\n\t * @param domElement DOM element that should have `html` set as its content.\n\t * @param html Textual representation of the HTML that will be set on `domElement`.\n\t */ setContentOf(domElement, html) {\n        // For data pipeline we pass the HTML as-is.\n        if (this.renderingMode === 'data') {\n            domElement.innerHTML = html;\n            return;\n        }\n        const document = new DOMParser().parseFromString(html, 'text/html');\n        const fragment = document.createDocumentFragment();\n        const bodyChildNodes = document.body.childNodes;\n        while(bodyChildNodes.length > 0){\n            fragment.appendChild(bodyChildNodes[0]);\n        }\n        const treeWalker = document.createTreeWalker(fragment, NodeFilter.SHOW_ELEMENT);\n        const nodes = [];\n        let currentNode;\n        // eslint-disable-next-line no-cond-assign\n        while(currentNode = treeWalker.nextNode()){\n            nodes.push(currentNode);\n        }\n        for (const currentNode of nodes){\n            // Go through nodes to remove those that are prohibited in editing pipeline.\n            for (const attributeName of currentNode.getAttributeNames()){\n                this.setDomElementAttribute(currentNode, attributeName, currentNode.getAttribute(attributeName));\n            }\n            const elementName = currentNode.tagName.toLowerCase();\n            // There are certain nodes, that should be renamed to <span> in editing pipeline.\n            if (this._shouldRenameElement(elementName)) {\n                _logUnsafeElement(elementName);\n                currentNode.replaceWith(this._createReplacementDomElement(elementName, currentNode));\n            }\n        }\n        // Empty the target element.\n        while(domElement.firstChild){\n            domElement.firstChild.remove();\n        }\n        domElement.append(fragment);\n    }\n    /**\n\t * Converts the view to the DOM. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments the method will return corresponding items.\n\t *\n\t * @param viewNode View node or document fragment to transform.\n\t * @param options Conversion options.\n\t * @param options.bind Determines whether new elements will be bound.\n\t * @param options.withChildren If `false`, node's and document fragment's children will not be converted.\n\t * @returns Converted node or DocumentFragment.\n\t */ viewToDom(viewNode, options = {}) {\n        if (viewNode.is('$text')) {\n            const textData = this._processDataFromViewText(viewNode);\n            return this._domDocument.createTextNode(textData);\n        } else {\n            const viewElementOrFragment = viewNode;\n            if (this.mapViewToDom(viewElementOrFragment)) {\n                // Do not reuse element that is marked to not reuse (for example an IMG element\n                // so it can immediately display a placeholder background instead of waiting for the new src to load).\n                if (viewElementOrFragment.getCustomProperty('editingPipeline:doNotReuseOnce')) {\n                    this._elementsWithTemporaryCustomProperties.add(viewElementOrFragment);\n                } else {\n                    return this.mapViewToDom(viewElementOrFragment);\n                }\n            }\n            let domElement;\n            if (viewElementOrFragment.is('documentFragment')) {\n                // Create DOM document fragment.\n                domElement = this._domDocument.createDocumentFragment();\n                if (options.bind) {\n                    this.bindDocumentFragments(domElement, viewElementOrFragment);\n                }\n            } else if (viewElementOrFragment.is('uiElement')) {\n                if (viewElementOrFragment.name === '$comment') {\n                    domElement = this._domDocument.createComment(viewElementOrFragment.getCustomProperty('$rawContent'));\n                } else {\n                    // UIElement has its own render() method (see #799).\n                    domElement = viewElementOrFragment.render(this._domDocument, this);\n                }\n                if (options.bind) {\n                    this.bindElements(domElement, viewElementOrFragment);\n                }\n                return domElement;\n            } else {\n                // Create DOM element.\n                if (this._shouldRenameElement(viewElementOrFragment.name)) {\n                    _logUnsafeElement(viewElementOrFragment.name);\n                    domElement = this._createReplacementDomElement(viewElementOrFragment.name);\n                } else if (viewElementOrFragment.hasAttribute('xmlns')) {\n                    domElement = this._domDocument.createElementNS(viewElementOrFragment.getAttribute('xmlns'), viewElementOrFragment.name);\n                } else {\n                    domElement = this._domDocument.createElement(viewElementOrFragment.name);\n                }\n                // RawElement take care of their children in RawElement#render() method which can be customized\n                // (see https://github.com/ckeditor/ckeditor5/issues/4469).\n                if (viewElementOrFragment.is('rawElement')) {\n                    viewElementOrFragment.render(domElement, this);\n                }\n                if (options.bind) {\n                    this.bindElements(domElement, viewElementOrFragment);\n                }\n                // Copy element's attributes.\n                for (const key of viewElementOrFragment.getAttributeKeys()){\n                    this.setDomElementAttribute(domElement, key, viewElementOrFragment.getAttribute(key), viewElementOrFragment);\n                }\n            }\n            if (options.withChildren !== false) {\n                for (const child of this.viewChildrenToDom(viewElementOrFragment, options)){\n                    if (domElement instanceof HTMLTemplateElement) {\n                        domElement.content.appendChild(child);\n                    } else {\n                        domElement.appendChild(child);\n                    }\n                }\n            }\n            return domElement;\n        }\n    }\n    /**\n\t * Sets the attribute on a DOM element.\n\t *\n\t * **Note**: To remove the attribute, use {@link #removeDomElementAttribute}.\n\t *\n\t * @param domElement The DOM element the attribute should be set on.\n\t * @param key The name of the attribute.\n\t * @param value The value of the attribute.\n\t * @param relatedViewElement The view element related to the `domElement` (if there is any).\n\t * It helps decide whether the attribute set is unsafe. For instance, view elements created via the\n\t * {@link module:engine/view/downcastwriter~DowncastWriter} methods can allow certain attributes that would normally be filtered out.\n\t */ setDomElementAttribute(domElement, key, value, relatedViewElement) {\n        const shouldRenderAttribute = this.shouldRenderAttribute(key, value, domElement.tagName.toLowerCase()) || relatedViewElement && relatedViewElement.shouldRenderUnsafeAttribute(key);\n        if (!shouldRenderAttribute) {\n            logWarning('domconverter-unsafe-attribute-detected', {\n                domElement,\n                key,\n                value\n            });\n        }\n        if (!isValidAttributeName(key)) {\n            /**\n\t\t\t * Invalid attribute name was ignored during rendering.\n\t\t\t *\n\t\t\t * @error domconverter-invalid-attribute-detected\n\t\t\t */ logWarning('domconverter-invalid-attribute-detected', {\n                domElement,\n                key,\n                value\n            });\n            return;\n        }\n        // The old value was safe but the new value is unsafe.\n        if (domElement.hasAttribute(key) && !shouldRenderAttribute) {\n            domElement.removeAttribute(key);\n        } else if (domElement.hasAttribute(UNSAFE_ATTRIBUTE_NAME_PREFIX + key) && shouldRenderAttribute) {\n            domElement.removeAttribute(UNSAFE_ATTRIBUTE_NAME_PREFIX + key);\n        }\n        // If the attribute should not be rendered, rename it (instead of removing) to give developers some idea of what\n        // is going on (https://github.com/ckeditor/ckeditor5/issues/10801).\n        domElement.setAttribute(shouldRenderAttribute ? key : UNSAFE_ATTRIBUTE_NAME_PREFIX + key, value);\n    }\n    /**\n\t * Removes an attribute from a DOM element.\n\t *\n\t * **Note**: To set the attribute, use {@link #setDomElementAttribute}.\n\t *\n\t * @param domElement The DOM element the attribute should be removed from.\n\t * @param key The name of the attribute.\n\t */ removeDomElementAttribute(domElement, key) {\n        // See #_createReplacementDomElement() to learn what this is.\n        if (key == UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE) {\n            return;\n        }\n        domElement.removeAttribute(key);\n        // See setDomElementAttribute() to learn what this is.\n        domElement.removeAttribute(UNSAFE_ATTRIBUTE_NAME_PREFIX + key);\n    }\n    /**\n\t * Converts children of the view element to DOM using the\n\t * {@link module:engine/view/domconverter~DomConverter#viewToDom} method.\n\t * Additionally, this method adds block {@link module:engine/view/filler filler} to the list of children, if needed.\n\t *\n\t * @param viewElement Parent view element.\n\t * @param options See {@link module:engine/view/domconverter~DomConverter#viewToDom} options parameter.\n\t * @returns DOM nodes.\n\t */ *viewChildrenToDom(viewElement, options = {}) {\n        const fillerPositionOffset = viewElement.getFillerOffset && viewElement.getFillerOffset();\n        let offset = 0;\n        for (const childView of viewElement.getChildren()){\n            if (fillerPositionOffset === offset) {\n                yield this._getBlockFiller();\n            }\n            const transparentRendering = childView.is('element') && !!childView.getCustomProperty('dataPipeline:transparentRendering') && !first(childView.getAttributes());\n            if (transparentRendering && this.renderingMode == 'data') {\n                // `RawElement` doesn't have #children defined, so they need to be temporarily rendered\n                // and extracted directly.\n                if (childView.is('rawElement')) {\n                    const tempElement = this._domDocument.createElement(childView.name);\n                    childView.render(tempElement, this);\n                    yield* [\n                        ...tempElement.childNodes\n                    ];\n                } else {\n                    yield* this.viewChildrenToDom(childView, options);\n                }\n            } else {\n                if (transparentRendering) {\n                    /**\n\t\t\t\t\t * The `dataPipeline:transparentRendering` flag is supported only in the data pipeline.\n\t\t\t\t\t *\n\t\t\t\t\t * @error domconverter-transparent-rendering-unsupported-in-editing-pipeline\n\t\t\t\t\t */ logWarning('domconverter-transparent-rendering-unsupported-in-editing-pipeline', {\n                        viewElement: childView\n                    });\n                }\n                yield this.viewToDom(childView, options);\n            }\n            offset++;\n        }\n        if (fillerPositionOffset === offset) {\n            yield this._getBlockFiller();\n        }\n    }\n    /**\n\t * Converts view {@link module:engine/view/range~Range} to DOM range.\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t *\n\t * @param viewRange View range.\n\t * @returns DOM range.\n\t */ viewRangeToDom(viewRange) {\n        const domStart = this.viewPositionToDom(viewRange.start);\n        const domEnd = this.viewPositionToDom(viewRange.end);\n        const domRange = this._domDocument.createRange();\n        domRange.setStart(domStart.parent, domStart.offset);\n        domRange.setEnd(domEnd.parent, domEnd.offset);\n        return domRange;\n    }\n    /**\n\t * Converts view {@link module:engine/view/position~Position} to DOM parent and offset.\n\t *\n\t * Inline and block {@link module:engine/view/filler fillers} are handled during the conversion.\n\t * If the converted position is directly before inline filler it is moved inside the filler.\n\t *\n\t * @param viewPosition View position.\n\t * @returns DOM position or `null` if view position could not be converted to DOM.\n\t * DOM position has two properties:\n\t * * `parent` - DOM position parent.\n\t * * `offset` - DOM position offset.\n\t */ viewPositionToDom(viewPosition) {\n        const viewParent = viewPosition.parent;\n        if (viewParent.is('$text')) {\n            const domParent = this.findCorrespondingDomText(viewParent);\n            if (!domParent) {\n                // Position is in a view text node that has not been rendered to DOM yet.\n                return null;\n            }\n            let offset = viewPosition.offset;\n            if (startsWithFiller(domParent)) {\n                offset += INLINE_FILLER_LENGTH;\n            }\n            return {\n                parent: domParent,\n                offset\n            };\n        } else {\n            // viewParent is instance of ViewElement.\n            let domParent, domBefore, domAfter;\n            if (viewPosition.offset === 0) {\n                domParent = this.mapViewToDom(viewParent);\n                if (!domParent) {\n                    // Position is in a view element that has not been rendered to DOM yet.\n                    return null;\n                }\n                domAfter = domParent.childNodes[0];\n            } else {\n                const nodeBefore = viewPosition.nodeBefore;\n                domBefore = nodeBefore.is('$text') ? this.findCorrespondingDomText(nodeBefore) : this.mapViewToDom(nodeBefore);\n                if (!domBefore) {\n                    // Position is after a view element that has not been rendered to DOM yet.\n                    return null;\n                }\n                domParent = domBefore.parentNode;\n                domAfter = domBefore.nextSibling;\n            }\n            // If there is an inline filler at position return position inside the filler. We should never return\n            // the position before the inline filler.\n            if (isText(domAfter) && startsWithFiller(domAfter)) {\n                return {\n                    parent: domAfter,\n                    offset: INLINE_FILLER_LENGTH\n                };\n            }\n            const offset = domBefore ? indexOf(domBefore) + 1 : 0;\n            return {\n                parent: domParent,\n                offset\n            };\n        }\n    }\n    /**\n\t * Converts DOM to view. For all text nodes, not bound elements and document fragments new items will\n\t * be created. For bound elements and document fragments function will return corresponding items. For\n\t * {@link module:engine/view/filler fillers} `null` will be returned.\n\t * For all DOM elements rendered by {@link module:engine/view/uielement~UIElement} that UIElement will be returned.\n\t *\n\t * @param domNode DOM node or document fragment to transform.\n\t * @param options Conversion options.\n\t * @param options.bind Determines whether new elements will be bound. False by default.\n\t * @param options.withChildren If `true`, node's and document fragment's children will be converted too. True by default.\n\t * @param options.keepOriginalCase If `false`, node's tag name will be converted to lower case. False by default.\n\t * @param options.skipComments If `false`, comment nodes will be converted to `$comment`\n\t * {@link module:engine/view/uielement~UIElement view UI elements}. False by default.\n\t * @returns Converted node or document fragment or `null` if DOM node is a {@link module:engine/view/filler filler}\n\t * or the given node is an empty text node.\n\t */ domToView(domNode, options = {}) {\n        const inlineNodes = [];\n        const generator = this._domToView(domNode, options, inlineNodes);\n        // Get the first yielded value or a returned value.\n        const node = generator.next().value;\n        if (!node) {\n            return null;\n        }\n        // Trigger children handling.\n        generator.next();\n        // Whitespace cleaning.\n        this._processDomInlineNodes(null, inlineNodes, options);\n        // Text not got trimmed to an empty string so there is no result node.\n        if (node.is('$text') && node.data.length == 0) {\n            return null;\n        }\n        return node;\n    }\n    /**\n\t * Converts children of the DOM element to view nodes using\n\t * the {@link module:engine/view/domconverter~DomConverter#domToView} method.\n\t * Additionally this method omits block {@link module:engine/view/filler filler}, if it exists in the DOM parent.\n\t *\n\t * @param domElement Parent DOM element.\n\t * @param options See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.\n\t * @param inlineNodes An array that will be populated with inline nodes. It's used internally for whitespace processing.\n\t * @returns View nodes.\n\t */ *domChildrenToView(domElement, options = {}, inlineNodes = []) {\n        // Get child nodes from content document fragment if element is template\n        let childNodes = [];\n        if (domElement instanceof HTMLTemplateElement) {\n            childNodes = [\n                ...domElement.content.childNodes\n            ];\n        } else {\n            childNodes = [\n                ...domElement.childNodes\n            ];\n        }\n        for(let i = 0; i < childNodes.length; i++){\n            const domChild = childNodes[i];\n            const generator = this._domToView(domChild, options, inlineNodes);\n            // Get the first yielded value or a returned value.\n            const viewChild = generator.next().value;\n            if (viewChild !== null) {\n                // Whitespace cleaning before entering a block element (between block elements).\n                if (this._isBlockViewElement(viewChild)) {\n                    this._processDomInlineNodes(domElement, inlineNodes, options);\n                }\n                yield viewChild;\n                // Trigger children handling.\n                generator.next();\n            }\n        }\n        // Whitespace cleaning before leaving a block element (content of block element).\n        this._processDomInlineNodes(domElement, inlineNodes, options);\n    }\n    /**\n\t * Converts DOM selection to view {@link module:engine/view/selection~Selection}.\n\t * Ranges which cannot be converted will be omitted.\n\t *\n\t * @param domSelection DOM selection.\n\t * @returns View selection.\n\t */ domSelectionToView(domSelection) {\n        // See: https://github.com/ckeditor/ckeditor5/issues/9635.\n        if (isGeckoRestrictedDomSelection(domSelection)) {\n            return new Selection$1([]);\n        }\n        // DOM selection might be placed in fake selection container.\n        // If container contains fake selection - return corresponding view selection.\n        if (domSelection.rangeCount === 1) {\n            let container = domSelection.getRangeAt(0).startContainer;\n            // The DOM selection might be moved to the text node inside the fake selection container.\n            if (isText(container)) {\n                container = container.parentNode;\n            }\n            const viewSelection = this.fakeSelectionToView(container);\n            if (viewSelection) {\n                return viewSelection;\n            }\n        }\n        const isBackward = this.isDomSelectionBackward(domSelection);\n        const viewRanges = [];\n        for(let i = 0; i < domSelection.rangeCount; i++){\n            // DOM Range have correct start and end, no matter what is the DOM Selection direction. So we don't have to fix anything.\n            const domRange = domSelection.getRangeAt(i);\n            const viewRange = this.domRangeToView(domRange);\n            if (viewRange) {\n                viewRanges.push(viewRange);\n            }\n        }\n        return new Selection$1(viewRanges, {\n            backward: isBackward\n        });\n    }\n    /**\n\t * Converts DOM Range to view {@link module:engine/view/range~Range}.\n\t * If the start or end position can not be converted `null` is returned.\n\t *\n\t * @param domRange DOM range.\n\t * @returns View range.\n\t */ domRangeToView(domRange) {\n        const viewStart = this.domPositionToView(domRange.startContainer, domRange.startOffset);\n        const viewEnd = this.domPositionToView(domRange.endContainer, domRange.endOffset);\n        if (viewStart && viewEnd) {\n            return new Range$1(viewStart, viewEnd);\n        }\n        return null;\n    }\n    /**\n\t * Converts DOM parent and offset to view {@link module:engine/view/position~Position}.\n\t *\n\t * If the position is inside a {@link module:engine/view/filler filler} which has no corresponding view node,\n\t * position of the filler will be converted and returned.\n\t *\n\t * If the position is inside DOM element rendered by {@link module:engine/view/uielement~UIElement}\n\t * that position will be converted to view position before that UIElement.\n\t *\n\t * If structures are too different and it is not possible to find corresponding position then `null` will be returned.\n\t *\n\t * @param domParent DOM position parent.\n\t * @param domOffset DOM position offset. You can skip it when converting the inline filler node.\n\t * @returns View position.\n\t */ domPositionToView(domParent, domOffset = 0) {\n        if (this.isBlockFiller(domParent)) {\n            return this.domPositionToView(domParent.parentNode, indexOf(domParent));\n        }\n        // If position is somewhere inside UIElement or a RawElement - return position before that element.\n        const viewElement = this.mapDomToView(domParent);\n        if (viewElement && (viewElement.is('uiElement') || viewElement.is('rawElement'))) {\n            return Position$1._createBefore(viewElement);\n        }\n        if (isText(domParent)) {\n            if (isInlineFiller(domParent)) {\n                return this.domPositionToView(domParent.parentNode, indexOf(domParent));\n            }\n            const viewParent = this.findCorrespondingViewText(domParent);\n            let offset = domOffset;\n            if (!viewParent) {\n                return null;\n            }\n            if (startsWithFiller(domParent)) {\n                offset -= INLINE_FILLER_LENGTH;\n                offset = offset < 0 ? 0 : offset;\n            }\n            return new Position$1(viewParent, offset);\n        } else {\n            if (domOffset === 0) {\n                const viewParent = this.mapDomToView(domParent);\n                if (viewParent) {\n                    return new Position$1(viewParent, 0);\n                }\n            } else {\n                const domBefore = domParent.childNodes[domOffset - 1];\n                // Jump over an inline filler (and also on Firefox jump over a block filler while pressing backspace in an empty paragraph).\n                if (isText(domBefore) && isInlineFiller(domBefore) || domBefore && this.isBlockFiller(domBefore)) {\n                    return this.domPositionToView(domBefore.parentNode, indexOf(domBefore));\n                }\n                const viewBefore = isText(domBefore) ? this.findCorrespondingViewText(domBefore) : this.mapDomToView(domBefore);\n                // TODO #663\n                if (viewBefore && viewBefore.parent) {\n                    return new Position$1(viewBefore.parent, viewBefore.index + 1);\n                }\n            }\n            return null;\n        }\n    }\n    /**\n\t * Returns corresponding view {@link module:engine/view/element~Element Element} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment} for provided DOM element or\n\t * document fragment. If there is no view item {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * to the given DOM - `undefined` is returned.\n\t *\n\t * For all DOM elements rendered by a {@link module:engine/view/uielement~UIElement} or\n\t * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * @param domElementOrDocumentFragment DOM element or document fragment.\n\t * @returns Corresponding view element, document fragment or `undefined` if no element was bound.\n\t */ mapDomToView(domElementOrDocumentFragment) {\n        const hostElement = this.getHostViewElement(domElementOrDocumentFragment);\n        return hostElement || this._domToViewMapping.get(domElementOrDocumentFragment);\n    }\n    /**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * For all text nodes rendered by a {@link module:engine/view/uielement~UIElement} or\n\t * a {@link module:engine/view/rawelement~RawElement}, the parent `UIElement` or `RawElement` will be returned.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * Note that for the block or inline {@link module:engine/view/filler filler} this method returns `null`.\n\t *\n\t * @param domText DOM text node.\n\t * @returns Corresponding view text node or `null`, if it was not possible to find a corresponding node.\n\t */ findCorrespondingViewText(domText) {\n        if (isInlineFiller(domText)) {\n            return null;\n        }\n        // If DOM text was rendered by a UIElement or a RawElement - return this parent element.\n        const hostElement = this.getHostViewElement(domText);\n        if (hostElement) {\n            return hostElement;\n        }\n        const previousSibling = domText.previousSibling;\n        // Try to use previous sibling to find the corresponding text node.\n        if (previousSibling) {\n            if (!this.isElement(previousSibling)) {\n                // The previous is text or comment.\n                return null;\n            }\n            const viewElement = this.mapDomToView(previousSibling);\n            if (viewElement) {\n                const nextSibling = viewElement.nextSibling;\n                // It might be filler which has no corresponding view node.\n                if (nextSibling instanceof Text$1) {\n                    return nextSibling;\n                } else {\n                    return null;\n                }\n            }\n        } else {\n            const viewElement = this.mapDomToView(domText.parentNode);\n            if (viewElement) {\n                const firstChild = viewElement.getChild(0);\n                // It might be filler which has no corresponding view node.\n                if (firstChild instanceof Text$1) {\n                    return firstChild;\n                } else {\n                    return null;\n                }\n            }\n        }\n        return null;\n    }\n    mapViewToDom(documentFragmentOrElement) {\n        return this._viewToDomMapping.get(documentFragmentOrElement);\n    }\n    /**\n\t * Finds corresponding text node. Text nodes are not {@link module:engine/view/domconverter~DomConverter#bindElements bound},\n\t * corresponding text node is returned based on the sibling or parent.\n\t *\n\t * If the directly previous sibling is a {@link module:engine/view/domconverter~DomConverter#bindElements bound} element, it is used\n\t * to find the corresponding text node.\n\t *\n\t * If this is a first child in the parent and the parent is a {@link module:engine/view/domconverter~DomConverter#bindElements bound}\n\t * element, it is used to find the corresponding text node.\n\t *\n\t * Otherwise `null` is returned.\n\t *\n\t * @param viewText View text node.\n\t * @returns Corresponding DOM text node or `null`, if it was not possible to find a corresponding node.\n\t */ findCorrespondingDomText(viewText) {\n        const previousSibling = viewText.previousSibling;\n        // Try to use previous sibling to find the corresponding text node.\n        if (previousSibling && this.mapViewToDom(previousSibling)) {\n            return this.mapViewToDom(previousSibling).nextSibling;\n        }\n        // If this is a first node, try to use parent to find the corresponding text node.\n        if (!previousSibling && viewText.parent && this.mapViewToDom(viewText.parent)) {\n            return this.mapViewToDom(viewText.parent).childNodes[0];\n        }\n        return null;\n    }\n    /**\n\t * Focuses DOM editable that is corresponding to provided {@link module:engine/view/editableelement~EditableElement}.\n\t */ focus(viewEditable) {\n        const domEditable = this.mapViewToDom(viewEditable);\n        if (domEditable && domEditable.ownerDocument.activeElement !== domEditable) {\n            // Save the scrollX and scrollY positions before the focus.\n            const { scrollX, scrollY } = global.window;\n            const scrollPositions = [];\n            // Save all scrollLeft and scrollTop values starting from domEditable up to\n            // document#documentElement.\n            forEachDomElementAncestor(domEditable, (node)=>{\n                const { scrollLeft, scrollTop } = node;\n                scrollPositions.push([\n                    scrollLeft,\n                    scrollTop\n                ]);\n            });\n            domEditable.focus();\n            // Restore scrollLeft and scrollTop values starting from domEditable up to\n            // document#documentElement.\n            // https://github.com/ckeditor/ckeditor5-engine/issues/951\n            // https://github.com/ckeditor/ckeditor5-engine/issues/957\n            forEachDomElementAncestor(domEditable, (node)=>{\n                const [scrollLeft, scrollTop] = scrollPositions.shift();\n                node.scrollLeft = scrollLeft;\n                node.scrollTop = scrollTop;\n            });\n            // Restore the scrollX and scrollY positions after the focus.\n            // https://github.com/ckeditor/ckeditor5-engine/issues/951\n            global.window.scrollTo(scrollX, scrollY);\n        }\n    }\n    /**\n\t * Remove DOM selection from blurred editable, so it won't interfere with clicking on dropdowns (especially on iOS).\n\t *\n\t * @internal\n\t */ _clearDomSelection() {\n        const domEditable = this.mapViewToDom(this.document.selection.editableElement);\n        if (!domEditable) {\n            return;\n        }\n        // Check if DOM selection is inside editor editable element.\n        const domSelection = domEditable.ownerDocument.defaultView.getSelection();\n        const newViewSelection = this.domSelectionToView(domSelection);\n        const selectionInEditable = newViewSelection && newViewSelection.rangeCount > 0;\n        if (selectionInEditable) {\n            domSelection.removeAllRanges();\n        }\n    }\n    /**\n\t * Returns `true` when `node.nodeType` equals `Node.ELEMENT_NODE`.\n\t *\n\t * @param node Node to check.\n\t */ isElement(node) {\n        return node && node.nodeType == Node.ELEMENT_NODE;\n    }\n    /**\n\t * Returns `true` when `node.nodeType` equals `Node.DOCUMENT_FRAGMENT_NODE`.\n\t *\n\t * @param node Node to check.\n\t */ isDocumentFragment(node) {\n        return node && node.nodeType == Node.DOCUMENT_FRAGMENT_NODE;\n    }\n    /**\n\t * Checks if the node is an instance of the block filler for this DOM converter.\n\t *\n\t * ```ts\n\t * const converter = new DomConverter( viewDocument, { blockFillerMode: 'br' } );\n\t *\n\t * converter.isBlockFiller( BR_FILLER( document ) ); // true\n\t * converter.isBlockFiller( NBSP_FILLER( document ) ); // false\n\t * ```\n\t *\n\t * **Note:**: For the `'nbsp'` mode the method also checks context of a node so it cannot be a detached node.\n\t *\n\t * **Note:** A special case in the `'nbsp'` mode exists where the `<br>` in `<p><br></p>` is treated as a block filler.\n\t *\n\t * @param domNode DOM node to check.\n\t * @returns True if a node is considered a block filler for given mode.\n\t */ isBlockFiller(domNode) {\n        if (this.blockFillerMode == 'br') {\n            return domNode.isEqualNode(BR_FILLER_REF);\n        }\n        // Special case for <p><br></p> in which <br> should be treated as filler even when we are not in the 'br' mode. See ckeditor5#5564.\n        if (domNode.tagName === 'BR' && hasBlockParent(domNode, this.blockElements) && domNode.parentNode.childNodes.length === 1) {\n            return true;\n        }\n        // If not in 'br' mode, try recognizing both marked and regular nbsp block fillers.\n        return domNode.isEqualNode(MARKED_NBSP_FILLER_REF) || isNbspBlockFiller(domNode, this.blockElements);\n    }\n    /**\n\t * Returns `true` if given selection is a backward selection, that is, if it's `focus` is before `anchor`.\n\t *\n\t * @param DOM Selection instance to check.\n\t */ isDomSelectionBackward(selection) {\n        if (selection.isCollapsed) {\n            return false;\n        }\n        // Since it takes multiple lines of code to check whether a \"DOM Position\" is before/after another \"DOM Position\",\n        // we will use the fact that range will collapse if it's end is before it's start.\n        const range = this._domDocument.createRange();\n        try {\n            range.setStart(selection.anchorNode, selection.anchorOffset);\n            range.setEnd(selection.focusNode, selection.focusOffset);\n        } catch (e) {\n            // Safari sometimes gives us a selection that makes Range.set{Start,End} throw.\n            // See https://github.com/ckeditor/ckeditor5/issues/12375.\n            return false;\n        }\n        const backward = range.collapsed;\n        range.detach();\n        return backward;\n    }\n    /**\n\t * Returns a parent {@link module:engine/view/uielement~UIElement} or {@link module:engine/view/rawelement~RawElement}\n\t * that hosts the provided DOM node. Returns `null` if there is no such parent.\n\t */ getHostViewElement(domNode) {\n        const ancestors = getAncestors(domNode);\n        // Remove domNode from the list.\n        ancestors.pop();\n        while(ancestors.length){\n            const domNode = ancestors.pop();\n            const viewNode = this._domToViewMapping.get(domNode);\n            if (viewNode && (viewNode.is('uiElement') || viewNode.is('rawElement'))) {\n                return viewNode;\n            }\n        }\n        return null;\n    }\n    /**\n\t * Checks if the given selection's boundaries are at correct places.\n\t *\n\t * The following places are considered as incorrect for selection boundaries:\n\t *\n\t * * before or in the middle of an inline filler sequence,\n\t * * inside a DOM element which represents {@link module:engine/view/uielement~UIElement a view UI element},\n\t * * inside a DOM element which represents {@link module:engine/view/rawelement~RawElement a view raw element}.\n\t *\n\t * @param domSelection The DOM selection object to be checked.\n\t * @returns `true` if the given selection is at a correct place, `false` otherwise.\n\t */ isDomSelectionCorrect(domSelection) {\n        return this._isDomSelectionPositionCorrect(domSelection.anchorNode, domSelection.anchorOffset) && this._isDomSelectionPositionCorrect(domSelection.focusNode, domSelection.focusOffset);\n    }\n    /**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM nodes to view elements.\n\t *\n\t * This is affecting how {@link module:engine/view/domconverter~DomConverter#domToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#domChildrenToView} process DOM nodes.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching a view element whose content should\n\t * be treated as raw data.\n\t */ registerRawContentMatcher(pattern) {\n        this._rawContentElementMatcher.add(pattern);\n    }\n    /**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for inline object view elements.\n\t *\n\t * This is affecting how {@link module:engine/view/domconverter~DomConverter#domToView} and\n\t * {@link module:engine/view/domconverter~DomConverter#domChildrenToView} process DOM nodes.\n\t *\n\t * This is an extension of a simple {@link #inlineObjectElements} array of element names.\n\t *\n\t * @param pattern Pattern matching a view element which should be treated as an inline object.\n\t */ registerInlineObjectMatcher(pattern) {\n        this._inlineObjectElementMatcher.add(pattern);\n    }\n    /**\n\t * Clear temporary custom properties.\n\t *\n\t * @internal\n\t */ _clearTemporaryCustomProperties() {\n        for (const element of this._elementsWithTemporaryCustomProperties){\n            element._removeCustomProperty('editingPipeline:doNotReuseOnce');\n        }\n        this._elementsWithTemporaryCustomProperties.clear();\n    }\n    /**\n\t * Returns the block {@link module:engine/view/filler filler} node based on the current {@link #blockFillerMode} setting.\n\t */ _getBlockFiller() {\n        switch(this.blockFillerMode){\n            case 'nbsp':\n                return NBSP_FILLER(this._domDocument); // eslint-disable-line new-cap\n            case 'markedNbsp':\n                return MARKED_NBSP_FILLER(this._domDocument); // eslint-disable-line new-cap\n            case 'br':\n                return BR_FILLER(this._domDocument); // eslint-disable-line new-cap\n        }\n    }\n    /**\n\t * Checks if the given DOM position is a correct place for selection boundary. See {@link #isDomSelectionCorrect}.\n\t *\n\t * @param domParent Position parent.\n\t * @param offset Position offset.\n\t * @returns `true` if given position is at a correct place for selection boundary, `false` otherwise.\n\t */ _isDomSelectionPositionCorrect(domParent, offset) {\n        // If selection is before or in the middle of inline filler string, it is incorrect.\n        if (isText(domParent) && startsWithFiller(domParent) && offset < INLINE_FILLER_LENGTH) {\n            // Selection in a text node, at wrong position (before or in the middle of filler).\n            return false;\n        }\n        if (this.isElement(domParent) && startsWithFiller(domParent.childNodes[offset])) {\n            // Selection in an element node, before filler text node.\n            return false;\n        }\n        const viewParent = this.mapDomToView(domParent);\n        // The position is incorrect when anchored inside a UIElement or a RawElement.\n        // Note: In case of UIElement and RawElement, mapDomToView() returns a parent element for any DOM child\n        // so there's no need to perform any additional checks.\n        if (viewParent && (viewParent.is('uiElement') || viewParent.is('rawElement'))) {\n            return false;\n        }\n        return true;\n    }\n    /**\n\t * Internal generator for {@link #domToView}. Also used by {@link #domChildrenToView}.\n\t * Separates DOM nodes conversion from whitespaces processing.\n\t *\n\t * @param domNode DOM node or document fragment to transform.\n\t * @param inlineNodes An array of recently encountered inline nodes truncated to the block element boundaries.\n\t * Used later to process whitespaces.\n\t */ *_domToView(domNode, options, inlineNodes) {\n        if (this.isBlockFiller(domNode)) {\n            return null;\n        }\n        // When node is inside a UIElement or a RawElement return that parent as it's view representation.\n        const hostElement = this.getHostViewElement(domNode);\n        if (hostElement) {\n            return hostElement;\n        }\n        if (isComment(domNode) && options.skipComments) {\n            return null;\n        }\n        if (isText(domNode)) {\n            if (isInlineFiller(domNode)) {\n                return null;\n            } else {\n                const textData = domNode.data;\n                if (textData === '') {\n                    return null;\n                }\n                const textNode = new Text$1(this.document, textData);\n                inlineNodes.push(textNode);\n                return textNode;\n            }\n        } else {\n            let viewElement = this.mapDomToView(domNode);\n            if (viewElement) {\n                if (this._isInlineObjectElement(viewElement)) {\n                    inlineNodes.push(viewElement);\n                }\n                return viewElement;\n            }\n            if (this.isDocumentFragment(domNode)) {\n                // Create view document fragment.\n                viewElement = new DocumentFragment$1(this.document);\n                if (options.bind) {\n                    this.bindDocumentFragments(domNode, viewElement);\n                }\n            } else {\n                // Create view element.\n                viewElement = this._createViewElement(domNode, options);\n                if (options.bind) {\n                    this.bindElements(domNode, viewElement);\n                }\n                // Copy element's attributes.\n                const attrs = domNode.attributes;\n                if (attrs) {\n                    for(let l = attrs.length, i = 0; i < l; i++){\n                        viewElement._setAttribute(attrs[i].name, attrs[i].value);\n                    }\n                }\n                // Treat this element's content as a raw data if it was registered as such.\n                if (this._isViewElementWithRawContent(viewElement, options)) {\n                    viewElement._setCustomProperty('$rawContent', domNode.innerHTML);\n                    if (!this._isBlockViewElement(viewElement)) {\n                        inlineNodes.push(viewElement);\n                    }\n                    return viewElement;\n                }\n                // Comment node is also treated as an element with raw data.\n                if (isComment(domNode)) {\n                    viewElement._setCustomProperty('$rawContent', domNode.data);\n                    return viewElement;\n                }\n            }\n            // Yield the element first so the flow of nested inline nodes is not reversed inside elements.\n            yield viewElement;\n            const nestedInlineNodes = [];\n            if (options.withChildren !== false) {\n                for (const child of this.domChildrenToView(domNode, options, nestedInlineNodes)){\n                    viewElement._appendChild(child);\n                }\n            }\n            // Check if this is an inline object after processing child nodes so matcher\n            // for inline objects can verify if the element is empty.\n            if (this._isInlineObjectElement(viewElement)) {\n                inlineNodes.push(viewElement);\n            } else {\n                // It's an inline element that is not an object (like <b>, <i>) or a block element.\n                for (const inlineNode of nestedInlineNodes){\n                    inlineNodes.push(inlineNode);\n                }\n            }\n        }\n    }\n    /**\n\t * Internal helper that walks the list of inline view nodes already generated from DOM nodes\n\t * and handles whitespaces and NBSPs.\n\t *\n\t * @param domParent The DOM parent of the given inline nodes. This should be a document fragment or\n\t * a block element to whitespace processing start cleaning.\n\t * @param inlineNodes An array of recently encountered inline nodes truncated to the block element boundaries.\n\t */ _processDomInlineNodes(domParent, inlineNodes, options) {\n        if (!inlineNodes.length) {\n            return;\n        }\n        // Process text nodes only after reaching a block or document fragment,\n        // do not alter whitespaces while processing an inline element like <b> or <i>.\n        if (domParent && !this.isDocumentFragment(domParent) && !this._isBlockDomElement(domParent)) {\n            return;\n        }\n        let prevNodeEndsWithSpace = false;\n        for(let i = 0; i < inlineNodes.length; i++){\n            const node = inlineNodes[i];\n            if (!node.is('$text')) {\n                prevNodeEndsWithSpace = false;\n                continue;\n            }\n            let data;\n            let nodeEndsWithSpace = false;\n            if (this._isPreFormatted(node)) {\n                data = getDataWithoutFiller(node.data);\n            } else {\n                // Change all consecutive whitespace characters (from the [ \\n\\t\\r] set –\n                // see https://github.com/ckeditor/ckeditor5-engine/issues/822#issuecomment-311670249) to a single space character.\n                // That's how multiple whitespaces are treated when rendered, so we normalize those whitespaces.\n                // We're replacing 1+ (and not 2+) to also normalize singular \\n\\t\\r characters (#822).\n                data = node.data.replace(/[ \\n\\t\\r]{1,}/g, ' ');\n                nodeEndsWithSpace = /[^\\S\\u00A0]/.test(data.charAt(data.length - 1));\n                const prevNode = i > 0 ? inlineNodes[i - 1] : null;\n                const nextNode = i + 1 < inlineNodes.length ? inlineNodes[i + 1] : null;\n                const shouldLeftTrim = !prevNode || prevNode.is('element') && prevNode.name == 'br' || prevNodeEndsWithSpace;\n                const shouldRightTrim = nextNode ? false : !startsWithFiller(node.data);\n                // Do not try to clear whitespaces if this is flat mapping for the purpose of mutation observer and differ in rendering.\n                if (options.withChildren !== false) {\n                    // If the previous dom text node does not exist or it ends by whitespace character, remove space character from the\n                    // beginning of this text node. Such space character is treated as a whitespace.\n                    if (shouldLeftTrim) {\n                        data = data.replace(/^ /, '');\n                    }\n                    // If the next text node does not exist remove space character from the end of this text node.\n                    if (shouldRightTrim) {\n                        data = data.replace(/ $/, '');\n                    }\n                }\n                // At the beginning and end of a block element, Firefox inserts normal space + <br> instead of non-breaking space.\n                // This means that the text node starts/end with normal space instead of non-breaking space.\n                // This causes a problem because the normal space would be removed in `.replace` calls above. To prevent that,\n                // the inline filler is removed only after the data is initially processed (by the `.replace` above). See ckeditor5#692.\n                data = getDataWithoutFiller(data);\n                // At this point we should have removed all whitespaces from DOM text data.\n                //\n                // Now, We will reverse the process that happens in `_processDataFromViewText`.\n                //\n                // We have to change &nbsp; chars, that were in DOM text data because of rendering reasons, to spaces.\n                // First, change all ` \\u00A0` pairs (space + &nbsp;) to two spaces. DOM converter changes two spaces from model/view to\n                // ` \\u00A0` to ensure proper rendering. Since here we convert back, we recognize those pairs and change them back to `  `.\n                data = data.replace(/ \\u00A0/g, '  ');\n                const isNextNodeInlineObjectElement = nextNode && nextNode.is('element') && nextNode.name != 'br';\n                const isNextNodeStartingWithSpace = nextNode && nextNode.is('$text') && nextNode.data.charAt(0) == ' ';\n                // Then, let's change the last nbsp to a space.\n                if (/[ \\u00A0]\\u00A0$/.test(data) || !nextNode || isNextNodeInlineObjectElement || isNextNodeStartingWithSpace) {\n                    data = data.replace(/\\u00A0$/, ' ');\n                }\n                // Then, change &nbsp; character that is at the beginning of the text node to space character.\n                // We do that replacement only if this is the first node or the previous node ends on whitespace character.\n                if (shouldLeftTrim || prevNode && prevNode.is('element') && prevNode.name != 'br') {\n                    data = data.replace(/^\\u00A0/, ' ');\n                }\n            }\n            // At this point, all whitespaces should be removed and all &nbsp; created for rendering reasons should be\n            // changed to normal space. All left &nbsp; are &nbsp; inserted intentionally.\n            if (data.length == 0 && node.parent) {\n                node._remove();\n                inlineNodes.splice(i, 1);\n                i--;\n            } else {\n                node._data = data;\n                prevNodeEndsWithSpace = nodeEndsWithSpace;\n            }\n        }\n        inlineNodes.length = 0;\n    }\n    /**\n\t * Takes text data from a given {@link module:engine/view/text~Text#data} and processes it so\n\t * it is correctly displayed in the DOM.\n\t *\n\t * Following changes are done:\n\t *\n\t * * a space at the beginning is changed to `&nbsp;` if this is the first text node in its container\n\t * element or if a previous text node ends with a space character,\n\t * * space at the end of the text node is changed to `&nbsp;` if there are two spaces at the end of a node or if next node\n\t * starts with a space or if it is the last text node in its container,\n\t * * remaining spaces are replaced to a chain of spaces and `&nbsp;` (e.g. `'x   x'` becomes `'x &nbsp; x'`).\n\t *\n\t * Content of {@link #preElements} is not processed.\n\t *\n\t * @param node View text node to process.\n\t * @returns Processed text data.\n\t */ _processDataFromViewText(node) {\n        let data = node.data;\n        // If the currently processed view text node is preformatted, we should not change whitespaces.\n        if (this._isPreFormatted(node)) {\n            return data;\n        }\n        // 1. Replace the first space with a nbsp if the previous node ends with a space or there is no previous node\n        // (container element boundary).\n        if (data.charAt(0) == ' ') {\n            const prevNode = this._getTouchingInlineViewNode(node, false);\n            const prevEndsWithSpace = prevNode && prevNode.is('$textProxy') && this._nodeEndsWithSpace(prevNode);\n            if (prevEndsWithSpace || !prevNode) {\n                data = '\\u00A0' + data.substr(1);\n            }\n        }\n        // 2. Replace the last space with nbsp if there are two spaces at the end or if the next node starts with space or there is no\n        // next node (container element boundary).\n        //\n        // Keep in mind that Firefox prefers $nbsp; before tag, not inside it:\n        //\n        // Foo <span>&nbsp;bar</span>  <-- bad.\n        // Foo&nbsp;<span> bar</span>  <-- good.\n        //\n        // More here: https://github.com/ckeditor/ckeditor5-engine/issues/1747.\n        if (data.charAt(data.length - 1) == ' ') {\n            const nextNode = this._getTouchingInlineViewNode(node, true);\n            const nextStartsWithSpace = nextNode && nextNode.is('$textProxy') && nextNode.data.charAt(0) == ' ';\n            if (data.charAt(data.length - 2) == ' ' || !nextNode || nextStartsWithSpace) {\n                data = data.substr(0, data.length - 1) + '\\u00A0';\n            }\n        }\n        // 3. Create space+nbsp pairs.\n        return data.replace(/ {2}/g, ' \\u00A0');\n    }\n    /**\n\t * Checks whether given node ends with a space character after changing appropriate space characters to `&nbsp;`s.\n\t *\n\t * @param  node Node to check.\n\t * @returns `true` if given `node` ends with space, `false` otherwise.\n\t */ _nodeEndsWithSpace(node) {\n        if (this._isPreFormatted(node)) {\n            return false;\n        }\n        const data = this._processDataFromViewText(node);\n        return data.charAt(data.length - 1) == ' ';\n    }\n    /**\n\t * Checks whether given text contains preformatted white space. This is the case if\n\t * * any of node ancestors has a name which is in `preElements` array, or\n\t * * the closest ancestor that has the `white-space` CSS property sets it to a value that preserves spaces\n\t *\n\t * @param node Node to check\n\t * @returns `true` if given node contains preformatted white space, `false` otherwise.\n\t */ _isPreFormatted(node) {\n        if (_hasViewParentOfType(node, this.preElements)) {\n            return true;\n        }\n        for (const ancestor of node.getAncestors({\n            parentFirst: true\n        })){\n            if (!ancestor.is('element') || !ancestor.hasStyle('white-space') || ancestor.getStyle('white-space') === 'inherit') {\n                continue;\n            }\n            // If the node contains the `white-space` property with a value that does not preserve spaces, it will take\n            // precedence over any white-space settings its ancestors contain, so no further parent checking needs to\n            // be done.\n            return [\n                'pre',\n                'pre-wrap',\n                'break-spaces'\n            ].includes(ancestor.getStyle('white-space'));\n        }\n        return false;\n    }\n    /**\n\t * Helper function. For given {@link module:engine/view/text~Text view text node}, it finds previous or next sibling\n\t * that is contained in the same container element. If there is no such sibling, `null` is returned.\n\t *\n\t * @param node Reference node.\n\t * @returns Touching text node, an inline object\n\t * or `null` if there is no next or previous touching text node.\n\t */ _getTouchingInlineViewNode(node, getNext) {\n        const treeWalker = new TreeWalker$1({\n            startPosition: getNext ? Position$1._createAfter(node) : Position$1._createBefore(node),\n            direction: getNext ? 'forward' : 'backward'\n        });\n        for (const { item } of treeWalker){\n            // Found a text node in the same container element.\n            if (item.is('$textProxy')) {\n                return item;\n            } else if (item.is('element') && item.getCustomProperty('dataPipeline:transparentRendering')) {\n                continue;\n            } else if (item.is('element', 'br')) {\n                return null;\n            } else if (this._isInlineObjectElement(item)) {\n                return item;\n            } else if (item.is('containerElement')) {\n                return null;\n            }\n        }\n        return null;\n    }\n    /**\n\t * Returns `true` if a DOM node belongs to {@link #blockElements}. `false` otherwise.\n\t */ _isBlockDomElement(node) {\n        return this.isElement(node) && this.blockElements.includes(node.tagName.toLowerCase());\n    }\n    /**\n\t * Returns `true` if a view node belongs to {@link #blockElements}. `false` otherwise.\n\t */ _isBlockViewElement(node) {\n        return node.is('element') && this.blockElements.includes(node.name);\n    }\n    /**\n\t * Returns `true` if a DOM node belongs to {@link #inlineObjectElements}. `false` otherwise.\n\t */ _isInlineObjectElement(node) {\n        if (!node.is('element')) {\n            return false;\n        }\n        return node.name == 'br' || this.inlineObjectElements.includes(node.name) || !!this._inlineObjectElementMatcher.match(node);\n    }\n    /**\n\t * Creates view element basing on the node type.\n\t *\n\t * @param node DOM node to check.\n\t * @param options Conversion options. See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.\n\t */ _createViewElement(node, options) {\n        if (isComment(node)) {\n            return new UIElement(this.document, '$comment');\n        }\n        const viewName = options.keepOriginalCase ? node.tagName : node.tagName.toLowerCase();\n        return new Element$1(this.document, viewName);\n    }\n    /**\n\t * Checks if view element's content should be treated as a raw data.\n\t *\n\t * @param viewElement View element to check.\n\t * @param options Conversion options. See {@link module:engine/view/domconverter~DomConverter#domToView} options parameter.\n\t */ _isViewElementWithRawContent(viewElement, options) {\n        return options.withChildren !== false && viewElement.is('element') && !!this._rawContentElementMatcher.match(viewElement);\n    }\n    /**\n\t * Checks whether a given element name should be renamed in a current rendering mode.\n\t *\n\t * @param elementName The name of view element.\n\t */ _shouldRenameElement(elementName) {\n        const name = elementName.toLowerCase();\n        return this.renderingMode === 'editing' && this.unsafeElements.includes(name);\n    }\n    /**\n\t * Return a <span> element with a special attribute holding the name of the original element.\n\t * Optionally, copy all the attributes of the original element if that element is provided.\n\t *\n\t * @param elementName The name of view element.\n\t * @param originalDomElement The original DOM element to copy attributes and content from.\n\t */ _createReplacementDomElement(elementName, originalDomElement) {\n        const newDomElement = this._domDocument.createElement('span');\n        // Mark the span replacing a script as hidden.\n        newDomElement.setAttribute(UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE, elementName);\n        if (originalDomElement) {\n            while(originalDomElement.firstChild){\n                newDomElement.appendChild(originalDomElement.firstChild);\n            }\n            for (const attributeName of originalDomElement.getAttributeNames()){\n                newDomElement.setAttribute(attributeName, originalDomElement.getAttribute(attributeName));\n            }\n        }\n        return newDomElement;\n    }\n}\n/**\n * Helper function.\n * Used to check if given native `Element` or `Text` node has parent with tag name from `types` array.\n *\n * @returns`true` if such parent exists or `false` if it does not.\n */ function _hasViewParentOfType(node, types) {\n    return node.getAncestors().some((parent)=>parent.is('element') && types.includes(parent.name));\n}\n/**\n * A helper that executes given callback for each DOM node's ancestor, starting from the given node\n * and ending in document#documentElement.\n *\n * @param callback A callback to be executed for each ancestor.\n */ function forEachDomElementAncestor(element, callback) {\n    let node = element;\n    while(node){\n        callback(node);\n        node = node.parentElement;\n    }\n}\n/**\n * Checks if given node is a nbsp block filler.\n *\n * A &nbsp; is a block filler only if it is a single child of a block element.\n *\n * @param domNode DOM node.\n */ function isNbspBlockFiller(domNode, blockElements) {\n    const isNBSP = domNode.isEqualNode(NBSP_FILLER_REF);\n    return isNBSP && hasBlockParent(domNode, blockElements) && domNode.parentNode.childNodes.length === 1;\n}\n/**\n * Checks if domNode has block parent.\n *\n * @param domNode DOM node.\n */ function hasBlockParent(domNode, blockElements) {\n    const parent = domNode.parentNode;\n    return !!parent && !!parent.tagName && blockElements.includes(parent.tagName.toLowerCase());\n}\n/**\n * Log to console the information about element that was replaced.\n * Check UNSAFE_ELEMENTS for all recognized unsafe elements.\n *\n * @param elementName The name of the view element.\n */ function _logUnsafeElement(elementName) {\n    if (elementName === 'script') {\n        logWarning('domconverter-unsafe-script-element-detected');\n    }\n    if (elementName === 'style') {\n        logWarning('domconverter-unsafe-style-element-detected');\n    }\n}\n/**\n * In certain cases, Firefox mysteriously assigns so called \"restricted objects\" to native DOM Range properties.\n * Any attempt at accessing restricted object's properties causes errors.\n * See: https://github.com/ckeditor/ckeditor5/issues/9635.\n */ function isGeckoRestrictedDomSelection(domSelection) {\n    if (!env.isGecko) {\n        return false;\n    }\n    if (!domSelection.rangeCount) {\n        return false;\n    }\n    const container = domSelection.getRangeAt(0).startContainer;\n    try {\n        Object.prototype.toString.call(container);\n    } catch (error) {\n        return true;\n    }\n    return false;\n}\n /**\n * While rendering the editor content, the {@link module:engine/view/domconverter~DomConverter} detected a `<script>` element that may\n * disrupt the editing experience. To avoid this, the `<script>` element was replaced with `<span data-ck-unsafe-element=\"script\"></span>`.\n *\n * @error domconverter-unsafe-script-element-detected\n */  /**\n * While rendering the editor content, the {@link module:engine/view/domconverter~DomConverter} detected a `<style>` element that may affect\n * the editing experience. To avoid this, the `<style>` element was replaced with `<span data-ck-unsafe-element=\"style\"></span>`.\n *\n * @error domconverter-unsafe-style-element-detected\n */  /**\n * The {@link module:engine/view/domconverter~DomConverter} detected an interactive attribute in the\n * {@glink framework/architecture/editing-engine#editing-pipeline editing pipeline}. For the best\n * editing experience, the attribute was renamed to `data-ck-unsafe-attribute-[original attribute name]`.\n *\n * If you are the author of the plugin that generated this attribute and you want it to be preserved\n * in the editing pipeline, you can configure this when creating the element\n * using {@link module:engine/view/downcastwriter~DowncastWriter} during the\n * {@glink framework/architecture/editing-engine#conversion model–view conversion}. Methods such as\n * {@link module:engine/view/downcastwriter~DowncastWriter#createContainerElement},\n * {@link module:engine/view/downcastwriter~DowncastWriter#createAttributeElement}, or\n * {@link module:engine/view/downcastwriter~DowncastWriter#createEmptyElement}\n * accept an option that will disable filtering of specific attributes:\n *\n * ```ts\n * const paragraph = writer.createContainerElement( 'p',\n * \t{\n * \t\tclass: 'clickable-paragraph',\n * \t\tonclick: 'alert( \"Paragraph clicked!\" )'\n * \t},\n * \t{\n * \t\t// Make sure the \"onclick\" attribute will pass through.\n * \t\trenderUnsafeAttributes: [ 'onclick' ]\n * \t}\n * );\n * ```\n *\n * @error domconverter-unsafe-attribute-detected\n * @param domElement The DOM element the attribute was set on.\n * @param key The original name of the attribute\n * @param value The value of the original attribute\n */\n\n/**\n * Abstract base observer class. Observers are classes which listen to DOM events, do the preliminary\n * processing and fire events on the {@link module:engine/view/document~Document} objects.\n * Observers can also add features to the view, for instance by updating its status or marking elements\n * which need a refresh on DOM events.\n */ class Observer extends /* #__PURE__ */ DomEmitterMixin() {\n    /**\n\t * An instance of the view controller.\n\t */ view;\n    /**\n\t * A reference to the {@link module:engine/view/document~Document} object.\n\t */ document;\n    /**\n\t * The state of the observer. If it is disabled, no events will be fired.\n\t */ _isEnabled = false;\n    /**\n\t * Creates an instance of the observer.\n\t */ constructor(view){\n        super();\n        this.view = view;\n        this.document = view.document;\n    }\n    /**\n\t * The state of the observer. If it is disabled, no events will be fired.\n\t */ get isEnabled() {\n        return this._isEnabled;\n    }\n    /**\n\t * Enables the observer. This method is called when the observer is registered to the\n\t * {@link module:engine/view/view~View} and after {@link module:engine/view/view~View#forceRender rendering}\n\t * (all observers are {@link #disable disabled} before rendering).\n\t *\n\t * A typical use case for disabling observers is that mutation observers need to be disabled for the rendering.\n\t * However, a child class may not need to be disabled, so it can implement an empty method.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#disable\n\t */ enable() {\n        this._isEnabled = true;\n    }\n    /**\n\t * Disables the observer. This method is called before\n\t * {@link module:engine/view/view~View#forceRender rendering} to prevent firing events during rendering.\n\t *\n\t * @see module:engine/view/observer/observer~Observer#enable\n\t */ disable() {\n        this._isEnabled = false;\n    }\n    /**\n\t * Disables and destroys the observer, among others removes event listeners created by the observer.\n\t */ destroy() {\n        this.disable();\n        this.stopListening();\n    }\n    /**\n\t * Checks whether a given DOM event should be ignored (should not be turned into a synthetic view document event).\n\t *\n\t * Currently, an event will be ignored only if its target or any of its ancestors has the `data-cke-ignore-events` attribute.\n\t * This attribute can be used inside the structures generated by\n\t * {@link module:engine/view/downcastwriter~DowncastWriter#createUIElement `DowncastWriter#createUIElement()`} to ignore events\n\t * fired within a UI that should be excluded from CKEditor 5's realms.\n\t *\n\t * @param domTarget The DOM event target to check (usually an element, sometimes a text node and\n\t * potentially sometimes a document, too).\n\t * @returns Whether this event should be ignored by the observer.\n\t */ checkShouldIgnoreEventFromTarget(domTarget) {\n        if (domTarget && domTarget.nodeType === 3) {\n            domTarget = domTarget.parentNode;\n        }\n        if (!domTarget || domTarget.nodeType !== 1) {\n            return false;\n        }\n        return domTarget.matches('[data-cke-ignore-events], [data-cke-ignore-events] *');\n    }\n}\n\n/**\n * Information about a DOM event in context of the {@link module:engine/view/document~Document}.\n * It wraps the native event, which usually should not be used as the wrapper contains\n * additional data (like key code for keyboard events).\n *\n * @typeParam TEvent The type of DOM Event that this class represents.\n */ class DomEventData {\n    /**\n\t * Instance of the view controller.\n\t */ view;\n    /**\n\t * The instance of the document.\n\t */ document;\n    /**\n\t * The DOM event.\n\t */ domEvent;\n    /**\n\t * The DOM target.\n\t */ domTarget;\n    /**\n\t * @param view The instance of the view controller.\n\t * @param domEvent The DOM event.\n\t * @param additionalData Additional properties that the instance should contain.\n\t */ constructor(view, domEvent, additionalData){\n        this.view = view;\n        this.document = view.document;\n        this.domEvent = domEvent;\n        this.domTarget = domEvent.target;\n        extend(this, additionalData);\n    }\n    /**\n\t * The tree view element representing the target.\n\t */ get target() {\n        return this.view.domConverter.mapDomToView(this.domTarget);\n    }\n    /**\n\t * Prevents the native's event default action.\n\t */ preventDefault() {\n        this.domEvent.preventDefault();\n    }\n    /**\n\t * Stops native event propagation.\n\t */ stopPropagation() {\n        this.domEvent.stopPropagation();\n    }\n}\n\n/**\n * Base class for DOM event observers. This class handles\n * {@link module:engine/view/observer/observer~Observer#observe adding} listeners to DOM elements,\n * {@link module:engine/view/observer/observer~Observer#disable disabling} and\n * {@link module:engine/view/observer/observer~Observer#enable re-enabling} events.\n * Child class needs to define\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#domEventType DOM event type} and\n * {@link module:engine/view/observer/domeventobserver~DomEventObserver#onDomEvent callback}.\n *\n * For instance:\n *\n * ```ts\n * class ClickObserver extends DomEventObserver<'click'> {\n * \t// It can also be defined as a normal property in the constructor.\n * \tget domEventType(): 'click' {\n * \t\treturn 'click';\n * \t}\n *\n * \tonDomEvent( domEvent: MouseEvent ): void {\n * \t\tthis.fire( 'click', domEvent );\n * \t}\n * }\n * ```\n *\n * @typeParam EventType DOM Event type name or an union of those.\n * @typeParam AdditionalData Additional data passed along with the event.\n */ class DomEventObserver extends Observer {\n    /**\n\t * If set to `true` DOM events will be listened on the capturing phase.\n\t * Default value is `false`.\n\t */ useCapture = false;\n    /**\n\t * @inheritDoc\n\t */ observe(domElement) {\n        const types = typeof this.domEventType == 'string' ? [\n            this.domEventType\n        ] : this.domEventType;\n        types.forEach((type)=>{\n            this.listenTo(domElement, type, (eventInfo, domEvent)=>{\n                if (this.isEnabled && !this.checkShouldIgnoreEventFromTarget(domEvent.target)) {\n                    this.onDomEvent(domEvent);\n                }\n            }, {\n                useCapture: this.useCapture\n            });\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ stopObserving(domElement) {\n        this.stopListening(domElement);\n    }\n    /**\n\t * Calls `Document#fire()` if observer {@link #isEnabled is enabled}.\n\t *\n\t * @see module:utils/emittermixin~Emitter#fire\n\t * @param eventType The event type (name).\n\t * @param domEvent The DOM event.\n\t * @param additionalData The additional data which should extend the\n\t * {@link module:engine/view/observer/domeventdata~DomEventData event data} object.\n\t */ fire(eventType, domEvent, additionalData) {\n        if (this.isEnabled) {\n            this.document.fire(eventType, new DomEventData(this.view, domEvent, additionalData));\n        }\n    }\n}\n\n/**\n * Observer for events connected with pressing keyboard keys.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n */ class KeyObserver extends DomEventObserver {\n    /**\n\t * @inheritDoc\n\t */ domEventType = [\n        'keydown',\n        'keyup'\n    ];\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvt) {\n        const data = {\n            keyCode: domEvt.keyCode,\n            altKey: domEvt.altKey,\n            ctrlKey: domEvt.ctrlKey,\n            shiftKey: domEvt.shiftKey,\n            metaKey: domEvt.metaKey,\n            get keystroke () {\n                return getCode(this);\n            }\n        };\n        this.fire(domEvt.type, domEvt, data);\n    }\n}\n\n/**\n * Fake selection observer class. If view selection is fake it is placed in dummy DOM container. This observer listens\n * on {@link module:engine/view/document~Document#event:keydown keydown} events and handles moving fake view selection to the correct place\n * if arrow keys are pressed.\n * Fires {@link module:engine/view/document~Document#event:selectionChange selectionChange event} simulating natural behaviour of\n * {@link module:engine/view/observer/selectionobserver~SelectionObserver SelectionObserver}.\n */ class FakeSelectionObserver extends Observer {\n    /**\n\t * Fires debounced event `selectionChangeDone`. It uses `lodash#debounce` method to delay function call.\n\t */ _fireSelectionChangeDoneDebounced;\n    /**\n\t * Creates new FakeSelectionObserver instance.\n\t */ constructor(view){\n        super(view);\n        this._fireSelectionChangeDoneDebounced = debounce((data)=>{\n            this.document.fire('selectionChangeDone', data);\n        }, 200);\n    }\n    /**\n\t * @inheritDoc\n\t */ observe() {\n        const document = this.document;\n        document.on('arrowKey', (eventInfo, data)=>{\n            const selection = document.selection;\n            if (selection.isFake && this.isEnabled) {\n                // Prevents default key down handling - no selection change will occur.\n                data.preventDefault();\n            }\n        }, {\n            context: '$capture'\n        });\n        document.on('arrowKey', (eventInfo, data)=>{\n            const selection = document.selection;\n            if (selection.isFake && this.isEnabled) {\n                this._handleSelectionMove(data.keyCode);\n            }\n        }, {\n            priority: 'lowest'\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ stopObserving() {}\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this._fireSelectionChangeDoneDebounced.cancel();\n    }\n    /**\n\t * Handles collapsing view selection according to given key code. If left or up key is provided - new selection will be\n\t * collapsed to left. If right or down key is pressed - new selection will be collapsed to right.\n\t *\n\t * This method fires {@link module:engine/view/document~Document#event:selectionChange} and\n\t * {@link module:engine/view/document~Document#event:selectionChangeDone} events imitating behaviour of\n\t * {@link module:engine/view/observer/selectionobserver~SelectionObserver}.\n\t */ _handleSelectionMove(keyCode) {\n        const selection = this.document.selection;\n        const newSelection = new Selection$1(selection.getRanges(), {\n            backward: selection.isBackward,\n            fake: false\n        });\n        // Left or up arrow pressed - move selection to start.\n        if (keyCode == keyCodes.arrowleft || keyCode == keyCodes.arrowup) {\n            newSelection.setTo(newSelection.getFirstPosition());\n        }\n        // Right or down arrow pressed - move selection to end.\n        if (keyCode == keyCodes.arrowright || keyCode == keyCodes.arrowdown) {\n            newSelection.setTo(newSelection.getLastPosition());\n        }\n        const data = {\n            oldSelection: selection,\n            newSelection,\n            domSelection: null\n        };\n        // Fire dummy selection change event.\n        this.document.fire('selectionChange', data);\n        // Call` #_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n        // This function is debounced what means that `selectionChangeDone` event will be fired only when\n        // defined int the function time will elapse since the last time the function was called.\n        // So `selectionChangeDone` will be fired when selection will stop changing.\n        this._fireSelectionChangeDoneDebounced(data);\n    }\n}\n\n// @if CK_DEBUG_TYPING // const { _debouncedLine } = require( '../../dev-utils/utils.js' );\n/**\n * Mutation observer's role is to watch for any DOM changes inside the editor that weren't\n * done by the editor's {@link module:engine/view/renderer~Renderer} itself and reverting these changes.\n *\n * It does this by observing all mutations in the DOM, marking related view elements as changed and calling\n * {@link module:engine/view/renderer~Renderer#render}. Because all mutated nodes are marked as\n * \"to be rendered\" and the {@link module:engine/view/renderer~Renderer#render `render()`} method is called,\n * all changes are reverted in the DOM (the DOM is synced with the editor's view structure).\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n */ class MutationObserver extends Observer {\n    /**\n\t * Reference to the {@link module:engine/view/view~View#domConverter}.\n\t */ domConverter;\n    /**\n\t * Native mutation observer config.\n\t */ _config;\n    /**\n\t * Observed DOM elements.\n\t */ _domElements;\n    /**\n\t * Native mutation observer.\n\t */ _mutationObserver;\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        this._config = {\n            childList: true,\n            characterData: true,\n            subtree: true\n        };\n        this.domConverter = view.domConverter;\n        this._domElements = new Set();\n        this._mutationObserver = new window.MutationObserver(this._onMutations.bind(this));\n    }\n    /**\n\t * Synchronously handles mutations and empties the queue.\n\t */ flush() {\n        this._onMutations(this._mutationObserver.takeRecords());\n    }\n    /**\n\t * @inheritDoc\n\t */ observe(domElement) {\n        this._domElements.add(domElement);\n        if (this.isEnabled) {\n            this._mutationObserver.observe(domElement, this._config);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ stopObserving(domElement) {\n        this._domElements.delete(domElement);\n        if (this.isEnabled) {\n            // Unfortunately, it is not possible to stop observing particular DOM element.\n            // In order to stop observing one of multiple DOM elements, we need to re-connect the mutation observer.\n            this._mutationObserver.disconnect();\n            for (const domElement of this._domElements){\n                this._mutationObserver.observe(domElement, this._config);\n            }\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ enable() {\n        super.enable();\n        for (const domElement of this._domElements){\n            this._mutationObserver.observe(domElement, this._config);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ disable() {\n        super.disable();\n        this._mutationObserver.disconnect();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this._mutationObserver.disconnect();\n    }\n    /**\n\t * Handles mutations. Mark view elements to sync and call render.\n\t *\n\t * @param domMutations Array of native mutations.\n\t */ _onMutations(domMutations) {\n        // As a result of this.flush() we can have an empty collection.\n        if (domMutations.length === 0) {\n            return;\n        }\n        const domConverter = this.domConverter;\n        // Use map and set for deduplication.\n        const mutatedTextNodes = new Set();\n        const elementsWithMutatedChildren = new Set();\n        // Handle `childList` mutations first, so we will be able to check if the `characterData` mutation is in the\n        // element with changed structure anyway.\n        for (const mutation of domMutations){\n            const element = domConverter.mapDomToView(mutation.target);\n            if (!element) {\n                continue;\n            }\n            // Do not collect mutations from UIElements and RawElements.\n            if (element.is('uiElement') || element.is('rawElement')) {\n                continue;\n            }\n            if (mutation.type === 'childList' && !this._isBogusBrMutation(mutation)) {\n                elementsWithMutatedChildren.add(element);\n            }\n        }\n        // Handle `characterData` mutations later, when we have the full list of nodes which changed structure.\n        for (const mutation of domMutations){\n            const element = domConverter.mapDomToView(mutation.target);\n            // Do not collect mutations from UIElements and RawElements.\n            if (element && (element.is('uiElement') || element.is('rawElement'))) {\n                continue;\n            }\n            if (mutation.type === 'characterData') {\n                const text = domConverter.findCorrespondingViewText(mutation.target);\n                if (text && !elementsWithMutatedChildren.has(text.parent)) {\n                    mutatedTextNodes.add(text);\n                } else if (!text && startsWithFiller(mutation.target)) {\n                    elementsWithMutatedChildren.add(domConverter.mapDomToView(mutation.target.parentNode));\n                }\n            }\n        }\n        // Now we build the list of mutations to mark elements. We did not do it earlier to avoid marking the\n        // same node multiple times in case of duplication.\n        const mutations = [];\n        for (const textNode of mutatedTextNodes){\n            mutations.push({\n                type: 'text',\n                node: textNode\n            });\n        }\n        for (const viewElement of elementsWithMutatedChildren){\n            const domElement = domConverter.mapViewToDom(viewElement);\n            const viewChildren = Array.from(viewElement.getChildren());\n            const newViewChildren = Array.from(domConverter.domChildrenToView(domElement, {\n                withChildren: false\n            }));\n            // It may happen that as a result of many changes (sth was inserted and then removed),\n            // both elements haven't really changed. #1031\n            if (!isEqualWith(viewChildren, newViewChildren, sameNodes)) {\n                mutations.push({\n                    type: 'children',\n                    node: viewElement\n                });\n            }\n        }\n        // In case only non-relevant mutations were recorded it skips the event and force render (#5600).\n        if (mutations.length) {\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \t_debouncedLine();\n            // @if CK_DEBUG_TYPING // \tconsole.group( '%c[MutationObserver]%c Mutations detected',\n            // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green', 'font-weight: bold'\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            this.document.fire('mutations', {\n                mutations\n            });\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n        // @if CK_DEBUG_TYPING // }\n        }\n    }\n    /**\n\t * Checks if mutation was generated by the browser inserting bogus br on the end of the block element.\n\t * Such mutations are generated while pressing space or performing native spellchecker correction\n\t * on the end of the block element in Firefox browser.\n\t *\n\t * @param mutation Native mutation object.\n\t */ _isBogusBrMutation(mutation) {\n        let addedNode = null;\n        // Check if mutation added only one node on the end of its parent.\n        if (mutation.nextSibling === null && mutation.removedNodes.length === 0 && mutation.addedNodes.length == 1) {\n            addedNode = this.domConverter.domToView(mutation.addedNodes[0], {\n                withChildren: false\n            });\n        }\n        return addedNode && addedNode.is('element', 'br');\n    }\n}\nfunction sameNodes(child1, child2) {\n    // First level of comparison (array of children vs array of children) – use the Lodash's default behavior.\n    if (Array.isArray(child1)) {\n        return;\n    }\n    // Elements.\n    if (child1 === child2) {\n        return true;\n    } else if (child1.is('$text') && child2.is('$text')) {\n        return child1.data === child2.data;\n    }\n    // Not matching types.\n    return false;\n}\n\n/**\n * {@link module:engine/view/document~Document#event:focus Focus}\n * and {@link module:engine/view/document~Document#event:blur blur} events observer.\n * Focus observer handle also {@link module:engine/view/rooteditableelement~RootEditableElement#isFocused isFocused} property of the\n * {@link module:engine/view/rooteditableelement~RootEditableElement root elements}.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n */ class FocusObserver extends DomEventObserver {\n    /**\n\t * Identifier of the timeout currently used by focus listener to delay rendering execution.\n\t */ _renderTimeoutId = null;\n    /**\n\t * Set to `true` if the document is in the process of setting the focus.\n\t *\n\t * The flag is used to indicate that setting the focus is in progress.\n\t */ _isFocusChanging = false;\n    /**\n\t * @inheritDoc\n\t */ domEventType = [\n        'focus',\n        'blur'\n    ];\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        this.useCapture = true;\n        const document = this.document;\n        document.on('focus', ()=>this._handleFocus());\n        document.on('blur', (evt, data)=>this._handleBlur(data));\n        // Focus the editor in cases where browser dispatches `beforeinput` event to a not-focused editable element.\n        // This is flushed by the beforeinput listener in the `InsertTextObserver`.\n        // Note that focus is set only if the document is not focused yet.\n        // See https://github.com/ckeditor/ckeditor5/issues/14702.\n        document.on('beforeinput', ()=>{\n            if (!document.isFocused) {\n                this._handleFocus();\n            }\n        }, {\n            priority: 'highest'\n        });\n    }\n    /**\n\t * Finishes setting the document focus state.\n\t */ flush() {\n        if (this._isFocusChanging) {\n            this._isFocusChanging = false;\n            this.document.isFocused = true;\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvent) {\n        this.fire(domEvent.type, domEvent);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this._clearTimeout();\n        super.destroy();\n    }\n    /**\n\t * The `focus` event handler.\n\t */ _handleFocus() {\n        this._clearTimeout();\n        this._isFocusChanging = true;\n        // Unfortunately native `selectionchange` event is fired asynchronously.\n        // We need to wait until `SelectionObserver` handle the event and then render. Otherwise rendering will\n        // overwrite new DOM selection with selection from the view.\n        // See https://github.com/ckeditor/ckeditor5-engine/issues/795 for more details.\n        // Long timeout is needed to solve #676 and https://github.com/ckeditor/ckeditor5-engine/issues/1157 issues.\n        //\n        // Using `view.change()` instead of `view.forceRender()` to prevent double rendering\n        // in a situation where `selectionchange` already caused selection change.\n        this._renderTimeoutId = setTimeout(()=>{\n            this._renderTimeoutId = null;\n            this.flush();\n            this.view.change(()=>{});\n        }, 50);\n    }\n    /**\n\t * The `blur` event handler.\n\t */ _handleBlur(data) {\n        const selectedEditable = this.document.selection.editableElement;\n        if (selectedEditable === null || selectedEditable === data.target) {\n            this.document.isFocused = false;\n            this._isFocusChanging = false;\n            // Re-render the document to update view elements\n            // (changing document.isFocused already marked view as changed since last rendering).\n            this.view.change(()=>{});\n        }\n    }\n    /**\n\t * Clears timeout.\n\t */ _clearTimeout() {\n        if (this._renderTimeoutId) {\n            clearTimeout(this._renderTimeoutId);\n            this._renderTimeoutId = null;\n        }\n    }\n}\n\n/**\n * Selection observer class observes selection changes in the document. If a selection changes on the document this\n * observer checks if the DOM selection is different from the {@link module:engine/view/document~Document#selection view selection}.\n * The selection observer fires {@link module:engine/view/document~Document#event:selectionChange} event only if\n * a selection change was the only change in the document and the DOM selection is different from the view selection.\n *\n * This observer also manages the {@link module:engine/view/document~Document#isSelecting} property of the view document.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n */ class SelectionObserver extends Observer {\n    /**\n\t * Instance of the mutation observer. Selection observer calls\n\t * {@link module:engine/view/observer/mutationobserver~MutationObserver#flush} to ensure that the mutations will be handled\n\t * before the {@link module:engine/view/document~Document#event:selectionChange} event is fired.\n\t */ mutationObserver;\n    /**\n\t * Instance of the focus observer. Focus observer calls\n\t * {@link module:engine/view/observer/focusobserver~FocusObserver#flush} to mark the latest focus change as complete.\n\t */ focusObserver;\n    /**\n\t * Reference to the view {@link module:engine/view/documentselection~DocumentSelection} object used to compare\n\t * new selection with it.\n\t */ selection;\n    /**\n\t * Reference to the {@link module:engine/view/view~View#domConverter}.\n\t */ domConverter;\n    /**\n\t * A set of documents which have added `selectionchange` listener to avoid adding a listener twice to the same\n\t * document.\n\t */ _documents;\n    /**\n\t * Fires debounced event `selectionChangeDone`. It uses `lodash#debounce` method to delay function call.\n\t */ _fireSelectionChangeDoneDebounced;\n    /**\n\t * When called, starts clearing the {@link #_loopbackCounter} counter in time intervals. When the number of selection\n\t * changes exceeds a certain limit within the interval of time, the observer will not fire `selectionChange` but warn about\n\t * possible infinite selection loop.\n\t */ _clearInfiniteLoopInterval;\n    /**\n\t * Unlocks the `isSelecting` state of the view document in case the selection observer did not record this fact\n\t * correctly (for whatever reason). It is a safeguard (paranoid check), that returns document to the normal state\n\t * after a certain period of time (debounced, postponed by each selectionchange event).\n\t */ _documentIsSelectingInactivityTimeoutDebounced;\n    /**\n\t * Private property to check if the code does not enter infinite loop.\n\t */ _loopbackCounter;\n    constructor(view){\n        super(view);\n        this.mutationObserver = view.getObserver(MutationObserver);\n        this.focusObserver = view.getObserver(FocusObserver);\n        this.selection = this.document.selection;\n        this.domConverter = view.domConverter;\n        this._documents = new WeakSet();\n        this._fireSelectionChangeDoneDebounced = debounce((data)=>{\n            this.document.fire('selectionChangeDone', data);\n        }, 200);\n        this._clearInfiniteLoopInterval = setInterval(()=>this._clearInfiniteLoop(), 1000);\n        this._documentIsSelectingInactivityTimeoutDebounced = debounce(()=>this.document.isSelecting = false, 5000);\n        this._loopbackCounter = 0;\n    }\n    /**\n\t * @inheritDoc\n\t */ observe(domElement) {\n        const domDocument = domElement.ownerDocument;\n        const startDocumentIsSelecting = ()=>{\n            this.document.isSelecting = true;\n            // Let's activate the safety timeout each time the document enters the \"is selecting\" state.\n            this._documentIsSelectingInactivityTimeoutDebounced();\n        };\n        const endDocumentIsSelecting = ()=>{\n            if (!this.document.isSelecting) {\n                return;\n            }\n            // Make sure that model selection is up-to-date at the end of selecting process.\n            // Sometimes `selectionchange` events could arrive after the `mouseup` event and that selection could be already outdated.\n            this._handleSelectionChange(domDocument);\n            this.document.isSelecting = false;\n            // The safety timeout can be canceled when the document leaves the \"is selecting\" state.\n            this._documentIsSelectingInactivityTimeoutDebounced.cancel();\n        };\n        // The document has the \"is selecting\" state while the user keeps making (extending) the selection\n        // (e.g. by holding the mouse button and moving the cursor). The state resets when they either released\n        // the mouse button or interrupted the process by pressing or releasing any key.\n        this.listenTo(domElement, 'selectstart', startDocumentIsSelecting, {\n            priority: 'highest'\n        });\n        this.listenTo(domElement, 'keydown', endDocumentIsSelecting, {\n            priority: 'highest',\n            useCapture: true\n        });\n        this.listenTo(domElement, 'keyup', endDocumentIsSelecting, {\n            priority: 'highest',\n            useCapture: true\n        });\n        // Add document-wide listeners only once. This method could be called for multiple editing roots.\n        if (this._documents.has(domDocument)) {\n            return;\n        }\n        // This listener is using capture mode to make sure that selection is upcasted before any other\n        // handler would like to check it and update (for example table multi cell selection).\n        this.listenTo(domDocument, 'mouseup', endDocumentIsSelecting, {\n            priority: 'highest',\n            useCapture: true\n        });\n        this.listenTo(domDocument, 'selectionchange', (evt, domEvent)=>{\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \t_debouncedLine();\n            // @if CK_DEBUG_TYPING // \tconst domSelection = domDocument.defaultView!.getSelection();\n            // @if CK_DEBUG_TYPING // \tconsole.group( '%c[SelectionObserver]%c selectionchange', 'color: green', ''\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // \tconsole.info( '%c[SelectionObserver]%c DOM Selection:', 'font-weight: bold; color: green', '',\n            // @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.anchorNode, offset: domSelection!.anchorOffset },\n            // @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.focusNode, offset: domSelection!.focusOffset }\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            // The Renderer is disabled while composing on non-android browsers, so we can't update the view selection\n            // because the DOM and view tree drifted apart. Position mapping could fail because of it.\n            if (this.document.isComposing && !env.isAndroid) {\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconsole.info( '%c[SelectionObserver]%c Selection change ignored (isComposing)',\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green', ''\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n                // @if CK_DEBUG_TYPING // }\n                return;\n            }\n            this._handleSelectionChange(domDocument);\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n            // @if CK_DEBUG_TYPING // }\n            // Defer the safety timeout when the selection changes (e.g. the user keeps extending the selection\n            // using their mouse).\n            this._documentIsSelectingInactivityTimeoutDebounced();\n        });\n        // Update the model DocumentSelection just after the Renderer and the SelectionObserver are locked.\n        // We do this synchronously (without waiting for the `selectionchange` DOM event) as browser updates\n        // the DOM selection (but not visually) to span the text that is under composition and could be replaced.\n        this.listenTo(this.view.document, 'compositionstart', ()=>{\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconst domSelection = domDocument.defaultView!.getSelection();\n            // @if CK_DEBUG_TYPING // \tconsole.group( '%c[SelectionObserver]%c update selection on compositionstart', 'color: green', ''\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // \tconsole.info( '%c[SelectionObserver]%c DOM Selection:', 'font-weight: bold; color: green', '',\n            // @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.anchorNode, offset: domSelection!.anchorOffset },\n            // @if CK_DEBUG_TYPING // \t\t{ node: domSelection!.focusNode, offset: domSelection!.focusOffset }\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            this._handleSelectionChange(domDocument);\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n        // @if CK_DEBUG_TYPING // }\n        }, {\n            priority: 'lowest'\n        });\n        this._documents.add(domDocument);\n    }\n    /**\n\t * @inheritDoc\n\t */ stopObserving(domElement) {\n        this.stopListening(domElement);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        clearInterval(this._clearInfiniteLoopInterval);\n        this._fireSelectionChangeDoneDebounced.cancel();\n        this._documentIsSelectingInactivityTimeoutDebounced.cancel();\n    }\n    /* istanbul ignore next -- @preserve */ _reportInfiniteLoop() {\n    // @if CK_DEBUG //\t\tthrow new Error(\n    // @if CK_DEBUG //\t\t\t'Selection change observer detected an infinite rendering loop.\\n\\n' +\n    // @if CK_DEBUG //\t \t\t'⚠️⚠️ Report this error on https://github.com/ckeditor/ckeditor5/issues/11658.'\n    // @if CK_DEBUG //\t\t);\n    }\n    /**\n\t * Selection change listener. {@link module:engine/view/observer/mutationobserver~MutationObserver#flush Flush} mutations, check if\n\t * a selection changes and fires {@link module:engine/view/document~Document#event:selectionChange} event on every change\n\t * and {@link module:engine/view/document~Document#event:selectionChangeDone} when a selection stop changing.\n\t *\n\t * @param domDocument DOM document.\n\t */ _handleSelectionChange(domDocument) {\n        if (!this.isEnabled) {\n            return;\n        }\n        const domSelection = domDocument.defaultView.getSelection();\n        if (this.checkShouldIgnoreEventFromTarget(domSelection.anchorNode)) {\n            return;\n        }\n        // Ensure the mutation event will be before selection event on all browsers.\n        this.mutationObserver.flush();\n        const newViewSelection = this.domConverter.domSelectionToView(domSelection);\n        // Do not convert selection change if the new view selection has no ranges in it.\n        //\n        // It means that the DOM selection is in some way incorrect. Ranges that were in the DOM selection could not be\n        // converted to the view. This happens when the DOM selection was moved outside of the editable element.\n        if (newViewSelection.rangeCount == 0) {\n            this.view.hasDomSelection = false;\n            return;\n        }\n        this.view.hasDomSelection = true;\n        // Mark the latest focus change as complete (we got new selection after the focus so the selection is in the focused element).\n        this.focusObserver.flush();\n        if (this.selection.isEqual(newViewSelection) && this.domConverter.isDomSelectionCorrect(domSelection)) {\n            return;\n        }\n        // Ensure we are not in the infinite loop (#400).\n        // This counter is reset each second. 60 selection changes in 1 second is enough high number\n        // to be very difficult (impossible) to achieve using just keyboard keys (during normal editor use).\n        if (++this._loopbackCounter > 60) {\n            // Selection change observer detected an infinite rendering loop.\n            // Most probably you try to put the selection in the position which is not allowed\n            // by the browser and browser fixes it automatically what causes `selectionchange` event on\n            // which a loopback through a model tries to re-render the wrong selection and again.\n            this._reportInfiniteLoop();\n            return;\n        }\n        if (this.selection.isSimilar(newViewSelection)) {\n            // If selection was equal and we are at this point of algorithm, it means that it was incorrect.\n            // Just re-render it, no need to fire any events, etc.\n            this.view.forceRender();\n        } else {\n            const data = {\n                oldSelection: this.selection,\n                newSelection: newViewSelection,\n                domSelection\n            };\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.info( '%c[SelectionObserver]%c Fire selection change:',\n            // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green', '',\n            // @if CK_DEBUG_TYPING // \t\tnewViewSelection.getFirstRange()\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            // Prepare data for new selection and fire appropriate events.\n            this.document.fire('selectionChange', data);\n            // Call `#_fireSelectionChangeDoneDebounced` every time when `selectionChange` event is fired.\n            // This function is debounced what means that `selectionChangeDone` event will be fired only when\n            // defined int the function time will elapse since the last time the function was called.\n            // So `selectionChangeDone` will be fired when selection will stop changing.\n            this._fireSelectionChangeDoneDebounced(data);\n        }\n    }\n    /**\n\t * Clears `SelectionObserver` internal properties connected with preventing infinite loop.\n\t */ _clearInfiniteLoop() {\n        this._loopbackCounter = 0;\n    }\n}\n\n// @if CK_DEBUG_TYPING // const { _debouncedLine } = require( '../../dev-utils/utils.js' );\n/**\n * {@link module:engine/view/document~Document#event:compositionstart Compositionstart},\n * {@link module:engine/view/document~Document#event:compositionupdate compositionupdate} and\n * {@link module:engine/view/document~Document#event:compositionend compositionend} events observer.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n */ class CompositionObserver extends DomEventObserver {\n    /**\n\t * @inheritDoc\n\t */ domEventType = [\n        'compositionstart',\n        'compositionupdate',\n        'compositionend'\n    ];\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        const document = this.document;\n        document.on('compositionstart', ()=>{\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.log( '%c[CompositionObserver] ' +\n            // @if CK_DEBUG_TYPING // \t\t'┌───────────────────────────── isComposing = true ─────────────────────────────┐',\n            // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green'\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            document.isComposing = true;\n        }, {\n            priority: 'low'\n        });\n        document.on('compositionend', ()=>{\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.log( '%c[CompositionObserver] ' +\n            // @if CK_DEBUG_TYPING // \t\t'└───────────────────────────── isComposing = false ─────────────────────────────┘',\n            // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green'\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            document.isComposing = false;\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvent) {\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \t_debouncedLine();\n        // @if CK_DEBUG_TYPING // \tconsole.group( `%c[CompositionObserver]%c ${ domEvent.type }`, 'color: green', '' );\n        // @if CK_DEBUG_TYPING // }\n        this.fire(domEvent.type, domEvent, {\n            data: domEvent.data\n        });\n    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n    // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n    // @if CK_DEBUG_TYPING // }\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module engine/view/datatransfer\n */ /**\n * A facade over the native [`DataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n */ class DataTransfer {\n    /**\n\t * The array of files created from the native `DataTransfer#files` or `DataTransfer#items`.\n\t */ _files;\n    /**\n\t * The native DataTransfer object.\n\t */ _native;\n    /**\n\t * @param nativeDataTransfer The native [`DataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n\t * @param options.cacheFiles Whether `files` list should be initialized in the constructor.\n\t */ constructor(nativeDataTransfer, options = {}){\n        // We should store references to the File instances in case someone would like to process this files\n        // outside the event handler. Files are stored only for `drop` and `paste` events because they are not usable\n        // in other events and are generating a huge delay on Firefox while dragging.\n        // See https://github.com/ckeditor/ckeditor5/issues/13366.\n        this._files = options.cacheFiles ? getFiles(nativeDataTransfer) : null;\n        this._native = nativeDataTransfer;\n    }\n    /**\n\t * The array of files created from the native `DataTransfer#files` or `DataTransfer#items`.\n\t */ get files() {\n        if (!this._files) {\n            this._files = getFiles(this._native);\n        }\n        return this._files;\n    }\n    /**\n\t * Returns an array of available native content types.\n\t */ get types() {\n        return this._native.types;\n    }\n    /**\n\t * Gets the data from the data transfer by its MIME type.\n\t *\n\t * ```ts\n\t * dataTransfer.getData( 'text/plain' );\n\t * ```\n\t *\n\t * @param type The MIME type. E.g. `text/html` or `text/plain`.\n\t */ getData(type) {\n        return this._native.getData(type);\n    }\n    /**\n\t * Sets the data in the data transfer.\n\t *\n\t * @param type The MIME type. E.g. `text/html` or `text/plain`.\n\t */ setData(type, data) {\n        this._native.setData(type, data);\n    }\n    /**\n\t * The effect that is allowed for a drag operation.\n\t */ set effectAllowed(value) {\n        this._native.effectAllowed = value;\n    }\n    get effectAllowed() {\n        return this._native.effectAllowed;\n    }\n    /**\n\t * The actual drop effect.\n\t */ set dropEffect(value) {\n        this._native.dropEffect = value;\n    }\n    get dropEffect() {\n        return this._native.dropEffect;\n    }\n    /**\n\t * Set a preview image of the dragged content.\n\t */ setDragImage(image, x, y) {\n        this._native.setDragImage(image, x, y);\n    }\n    /**\n\t * Whether the dragging operation was canceled.\n\t */ get isCanceled() {\n        return this._native.dropEffect == 'none' || !!this._native.mozUserCancelled;\n    }\n}\nfunction getFiles(nativeDataTransfer) {\n    // DataTransfer.files and items are array-like and might not have an iterable interface.\n    const files = Array.from(nativeDataTransfer.files || []);\n    const items = Array.from(nativeDataTransfer.items || []);\n    if (files.length) {\n        return files;\n    }\n    // Chrome has empty DataTransfer.files, but allows getting files through the items interface.\n    return items.filter((item)=>item.kind === 'file').map((item)=>item.getAsFile());\n}\n\n// @if CK_DEBUG_TYPING // const { _debouncedLine } = require( '../../dev-utils/utils.js' );\n/**\n * Observer for events connected with data input.\n *\n * **Note**: This observer is attached by {@link module:engine/view/view~View} and available by default in all\n * editor instances.\n */ class InputObserver extends DomEventObserver {\n    /**\n\t * @inheritDoc\n\t */ domEventType = 'beforeinput';\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvent) {\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \t_debouncedLine();\n        // @if CK_DEBUG_TYPING // \tconsole.group( `%c[InputObserver]%c ${ domEvent.type }: ${ domEvent.inputType }`,\n        // @if CK_DEBUG_TYPING // \t\t'color: green', 'color: default'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        const domTargetRanges = domEvent.getTargetRanges();\n        const view = this.view;\n        const viewDocument = view.document;\n        let dataTransfer = null;\n        let data = null;\n        let targetRanges = [];\n        if (domEvent.dataTransfer) {\n            dataTransfer = new DataTransfer(domEvent.dataTransfer);\n        }\n        if (domEvent.data !== null) {\n            data = domEvent.data;\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( `%c[InputObserver]%c event data: %c${ JSON.stringify( data ) }`,\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: bold', 'color: blue;'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        } else if (dataTransfer) {\n            data = dataTransfer.getData('text/plain');\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( `%c[InputObserver]%c event data transfer: %c${ JSON.stringify( data ) }`,\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: bold', 'color: blue;'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        }\n        // If the editor selection is fake (an object is selected), the DOM range does not make sense because it is anchored\n        // in the fake selection container.\n        if (viewDocument.selection.isFake) {\n            // Future-proof: in case of multi-range fake selections being possible.\n            targetRanges = Array.from(viewDocument.selection.getRanges());\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( '%c[InputObserver]%c using fake selection:',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: bold', targetRanges,\n        // @if CK_DEBUG_TYPING // \t\tviewDocument.selection.isFake ? 'fake view selection' : 'fake DOM parent'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        } else if (domTargetRanges.length) {\n            targetRanges = domTargetRanges.map((domRange)=>{\n                // Sometimes browser provides range that starts before editable node.\n                // We try to fall back to collapsed range at the valid end position.\n                // See https://github.com/ckeditor/ckeditor5/issues/14411.\n                // See https://github.com/ckeditor/ckeditor5/issues/14050.\n                const viewStart = view.domConverter.domPositionToView(domRange.startContainer, domRange.startOffset);\n                const viewEnd = view.domConverter.domPositionToView(domRange.endContainer, domRange.endOffset);\n                if (viewStart) {\n                    return view.createRange(viewStart, viewEnd);\n                } else if (viewEnd) {\n                    return view.createRange(viewEnd);\n                }\n            }).filter((range)=>!!range);\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( '%c[InputObserver]%c using target ranges:',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: bold', targetRanges\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        } else if (env.isAndroid) {\n            const domSelection = domEvent.target.ownerDocument.defaultView.getSelection();\n            targetRanges = Array.from(view.domConverter.domSelectionToView(domSelection).getRanges());\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( '%c[InputObserver]%c using selection ranges:',\n        // @if CK_DEBUG_TYPING // \t\t'color: green; font-weight: bold', 'font-weight: bold', targetRanges\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        }\n        // Android sometimes fires insertCompositionText with a new-line character at the end of the data\n        // instead of firing insertParagraph beforeInput event.\n        // Fire the correct type of beforeInput event and ignore the replaced fragment of text because\n        // it wants to replace \"test\" with \"test\\n\".\n        // https://github.com/ckeditor/ckeditor5/issues/12368.\n        if (env.isAndroid && domEvent.inputType == 'insertCompositionText' && data && data.endsWith('\\n')) {\n            this.fire(domEvent.type, domEvent, {\n                inputType: 'insertParagraph',\n                targetRanges: [\n                    view.createRange(targetRanges[0].end)\n                ]\n            });\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n            // @if CK_DEBUG_TYPING // }\n            return;\n        }\n        // Normalize the insertText data that includes new-line characters.\n        // https://github.com/ckeditor/ckeditor5/issues/2045.\n        if (domEvent.inputType == 'insertText' && data && data.includes('\\n')) {\n            // There might be a single new-line or double for new paragraph, but we translate\n            // it to paragraphs as it is our default action for enter handling.\n            const parts = data.split(/\\n{1,2}/g);\n            let partTargetRanges = targetRanges;\n            for(let i = 0; i < parts.length; i++){\n                const dataPart = parts[i];\n                if (dataPart != '') {\n                    this.fire(domEvent.type, domEvent, {\n                        data: dataPart,\n                        dataTransfer,\n                        targetRanges: partTargetRanges,\n                        inputType: domEvent.inputType,\n                        isComposing: domEvent.isComposing\n                    });\n                    // Use the result view selection so following events will be added one after another.\n                    partTargetRanges = [\n                        viewDocument.selection.getFirstRange()\n                    ];\n                }\n                if (i + 1 < parts.length) {\n                    this.fire(domEvent.type, domEvent, {\n                        inputType: 'insertParagraph',\n                        targetRanges: partTargetRanges\n                    });\n                    // Use the result view selection so following events will be added one after another.\n                    partTargetRanges = [\n                        viewDocument.selection.getFirstRange()\n                    ];\n                }\n            }\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n            // @if CK_DEBUG_TYPING // }\n            return;\n        }\n        // Fire the normalized beforeInput event.\n        this.fire(domEvent.type, domEvent, {\n            data,\n            dataTransfer,\n            targetRanges,\n            inputType: domEvent.inputType,\n            isComposing: domEvent.isComposing\n        });\n    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n    // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n    // @if CK_DEBUG_TYPING // }\n    }\n}\n\n/**\n * Arrow keys observer introduces the {@link module:engine/view/document~Document#event:arrowKey `Document#arrowKey`} event.\n *\n * Note that this observer is attached by the {@link module:engine/view/view~View} and is available by default.\n */ class ArrowKeysObserver extends Observer {\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        this.document.on('keydown', (event, data)=>{\n            if (this.isEnabled && isArrowKeyCode(data.keyCode)) {\n                const eventInfo = new BubblingEventInfo(this.document, 'arrowKey', this.document.selection.getFirstRange());\n                this.document.fire(eventInfo, data);\n                if (eventInfo.stop.called) {\n                    event.stop();\n                }\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ observe() {}\n    /**\n\t * @inheritDoc\n\t */ stopObserving() {}\n}\n\n/**\n * Tab observer introduces the {@link module:engine/view/document~Document#event:tab `Document#tab`} event.\n *\n * Note that because {@link module:engine/view/observer/tabobserver~TabObserver} is attached by the\n * {@link module:engine/view/view~View}, this event is available by default.\n */ class TabObserver extends Observer {\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        const doc = this.document;\n        doc.on('keydown', (evt, data)=>{\n            if (!this.isEnabled || data.keyCode != keyCodes.tab || data.ctrlKey) {\n                return;\n            }\n            const event = new BubblingEventInfo(doc, 'tab', doc.selection.getFirstRange());\n            doc.fire(event, data);\n            if (event.stop.called) {\n                evt.stop();\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ observe() {}\n    /**\n\t * @inheritDoc\n\t */ stopObserving() {}\n}\n\n/**\n * Editor's view controller class. Its main responsibility is DOM - View management for editing purposes, to provide\n * abstraction over the DOM structure and events and hide all browsers quirks.\n *\n * View controller renders view document to DOM whenever view structure changes. To determine when view can be rendered,\n * all changes need to be done using the {@link module:engine/view/view~View#change} method, using\n * {@link module:engine/view/downcastwriter~DowncastWriter}:\n *\n * ```ts\n * view.change( writer => {\n * \twriter.insert( position, writer.createText( 'foo' ) );\n * } );\n * ```\n *\n * View controller also register {@link module:engine/view/observer/observer~Observer observers} which observes changes\n * on DOM and fire events on the {@link module:engine/view/document~Document Document}.\n * Note that the following observers are added by the class constructor and are always available:\n *\n * * {@link module:engine/view/observer/selectionobserver~SelectionObserver},\n * * {@link module:engine/view/observer/focusobserver~FocusObserver},\n * * {@link module:engine/view/observer/keyobserver~KeyObserver},\n * * {@link module:engine/view/observer/fakeselectionobserver~FakeSelectionObserver}.\n * * {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n * * {@link module:engine/view/observer/inputobserver~InputObserver}.\n * * {@link module:engine/view/observer/arrowkeysobserver~ArrowKeysObserver}.\n * * {@link module:engine/view/observer/tabobserver~TabObserver}.\n *\n * This class also {@link module:engine/view/view~View#attachDomRoot binds the DOM and the view elements}.\n *\n * If you do not need full a DOM - view management, and only want to transform a tree of view elements to a tree of DOM\n * elements you do not need this controller. You can use the {@link module:engine/view/domconverter~DomConverter DomConverter} instead.\n */ class View extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * Instance of the {@link module:engine/view/document~Document} associated with this view controller.\n\t */ document;\n    /**\n\t * Instance of the {@link module:engine/view/domconverter~DomConverter domConverter} used by\n\t * {@link module:engine/view/view~View#_renderer renderer}\n\t * and {@link module:engine/view/observer/observer~Observer observers}.\n\t */ domConverter;\n    /**\n\t * Roots of the DOM tree. Map on the `HTMLElement`s with roots names as keys.\n\t */ domRoots = new Map();\n    /**\n\t * Instance of the {@link module:engine/view/renderer~Renderer renderer}.\n\t */ _renderer;\n    /**\n\t * A DOM root attributes cache. It saves the initial values of DOM root attributes before the DOM element\n\t * is {@link module:engine/view/view~View#attachDomRoot attached} to the view so later on, when\n\t * the view is destroyed ({@link module:engine/view/view~View#detachDomRoot}), they can be easily restored.\n\t * This way, the DOM element can go back to the (clean) state as if the editing view never used it.\n\t */ _initialDomRootAttributes = new WeakMap();\n    /**\n\t * Map of registered {@link module:engine/view/observer/observer~Observer observers}.\n\t */ _observers = new Map();\n    /**\n\t * DowncastWriter instance used in {@link #change change method} callbacks.\n\t */ _writer;\n    /**\n\t * Is set to `true` when {@link #change view changes} are currently in progress.\n\t */ _ongoingChange = false;\n    /**\n\t * Used to prevent calling {@link #forceRender} and {@link #change} during rendering view to the DOM.\n\t */ _postFixersInProgress = false;\n    /**\n\t * Internal flag to temporary disable rendering. See the usage in the {@link #_disableRendering}.\n\t */ _renderingDisabled = false;\n    /**\n\t * Internal flag that disables rendering when there are no changes since the last rendering.\n\t * It stores information about changed selection and changed elements from attached document roots.\n\t */ _hasChangedSinceTheLastRendering = false;\n    /**\n\t * @param stylesProcessor The styles processor instance.\n\t */ constructor(stylesProcessor){\n        super();\n        this.document = new Document$1(stylesProcessor);\n        this.domConverter = new DomConverter(this.document);\n        this.set('isRenderingInProgress', false);\n        this.set('hasDomSelection', false);\n        this._renderer = new Renderer(this.domConverter, this.document.selection);\n        this._renderer.bind('isFocused', 'isSelecting', 'isComposing').to(this.document, 'isFocused', 'isSelecting', 'isComposing');\n        this._writer = new DowncastWriter(this.document);\n        // Add default observers.\n        // Make sure that this list matches AlwaysRegisteredObservers type.\n        this.addObserver(MutationObserver);\n        this.addObserver(FocusObserver);\n        this.addObserver(SelectionObserver);\n        this.addObserver(KeyObserver);\n        this.addObserver(FakeSelectionObserver);\n        this.addObserver(CompositionObserver);\n        this.addObserver(ArrowKeysObserver);\n        this.addObserver(InputObserver);\n        this.addObserver(TabObserver);\n        // Inject quirks handlers.\n        injectQuirksHandling(this);\n        injectUiElementHandling(this);\n        // Use 'normal' priority so that rendering is performed as first when using that priority.\n        this.on('render', ()=>{\n            this._render();\n            // Informs that layout has changed after render.\n            this.document.fire('layoutChanged');\n            // Reset the `_hasChangedSinceTheLastRendering` flag after rendering.\n            this._hasChangedSinceTheLastRendering = false;\n        });\n        // Listen to the document selection changes directly.\n        this.listenTo(this.document.selection, 'change', ()=>{\n            this._hasChangedSinceTheLastRendering = true;\n        });\n        // Trigger re-render if only the focus changed.\n        this.listenTo(this.document, 'change:isFocused', ()=>{\n            this._hasChangedSinceTheLastRendering = true;\n        });\n        // Remove ranges from DOM selection if editor is blurred.\n        // See https://github.com/ckeditor/ckeditor5/issues/5753.\n        if (env.isiOS) {\n            this.listenTo(this.document, 'blur', (evt, data)=>{\n                const relatedViewElement = this.domConverter.mapDomToView(data.domEvent.relatedTarget);\n                // Do not modify DOM selection if focus is moved to other editable of the same editor.\n                if (!relatedViewElement) {\n                    this.domConverter._clearDomSelection();\n                }\n            });\n        }\n        // Listen to external content mutations (directly in the DOM) and mark them to get verified by the renderer.\n        this.listenTo(this.document, 'mutations', (evt, { mutations })=>{\n            mutations.forEach((mutation)=>this._renderer.markToSync(mutation.type, mutation.node));\n        }, {\n            priority: 'low'\n        });\n        // After all mutated nodes were marked to sync we can trigger view to DOM synchronization\n        // to make sure the DOM structure matches the view.\n        this.listenTo(this.document, 'mutations', ()=>{\n            this.forceRender();\n        }, {\n            priority: 'lowest'\n        });\n    }\n    /**\n\t * Attaches a DOM root element to the view element and enable all observers on that element.\n\t * Also {@link module:engine/view/renderer~Renderer#markToSync mark element} to be synchronized\n\t * with the view what means that all child nodes will be removed and replaced with content of the view root.\n\t *\n\t * This method also will change view element name as the same as tag name of given dom root.\n\t * Name is always transformed to lower case.\n\t *\n\t * **Note:** Use {@link #detachDomRoot `detachDomRoot()`} to revert this action.\n\t *\n\t * @param domRoot DOM root element.\n\t * @param name Name of the root.\n\t */ attachDomRoot(domRoot, name = 'main') {\n        const viewRoot = this.document.getRoot(name);\n        // Set view root name the same as DOM root tag name.\n        viewRoot._name = domRoot.tagName.toLowerCase();\n        const initialDomRootAttributes = {};\n        // 1. Copy and cache the attributes to remember the state of the element before attaching.\n        //    The cached attributes will be restored in detachDomRoot() so the element goes to the\n        //    clean state as if the editing view never used it.\n        // 2. Apply the attributes using the view writer, so they all go under the control of the engine.\n        //    The editing view takes over the attribute management completely because various\n        //    features (e.g. addPlaceholder()) require dynamic changes of those attributes and they\n        //    cannot be managed by the engine and the UI library at the same time.\n        for (const { name, value } of Array.from(domRoot.attributes)){\n            initialDomRootAttributes[name] = value;\n            // Do not use writer.setAttribute() for the class attribute. The EditableUIView class\n            // and its descendants could have already set some using the writer.addClass() on the view\n            // document root. They haven't been rendered yet so they are not present in the DOM root.\n            // Using writer.setAttribute( 'class', ... ) would override them completely.\n            if (name === 'class') {\n                this._writer.addClass(value.split(' '), viewRoot);\n            } else {\n                // There is a chance that some attributes have already been set on the view root before attaching\n                // the DOM root and should be preserved. This is a similar case to the \"class\" attribute except\n                // this time there is no workaround using a some low-level API.\n                if (!viewRoot.hasAttribute(name)) {\n                    this._writer.setAttribute(name, value, viewRoot);\n                }\n            }\n        }\n        this._initialDomRootAttributes.set(domRoot, initialDomRootAttributes);\n        const updateContenteditableAttribute = ()=>{\n            this._writer.setAttribute('contenteditable', (!viewRoot.isReadOnly).toString(), viewRoot);\n            if (viewRoot.isReadOnly) {\n                this._writer.addClass('ck-read-only', viewRoot);\n            } else {\n                this._writer.removeClass('ck-read-only', viewRoot);\n            }\n        };\n        // Set initial value.\n        updateContenteditableAttribute();\n        this.domRoots.set(name, domRoot);\n        this.domConverter.bindElements(domRoot, viewRoot);\n        this._renderer.markToSync('children', viewRoot);\n        this._renderer.markToSync('attributes', viewRoot);\n        this._renderer.domDocuments.add(domRoot.ownerDocument);\n        viewRoot.on('change:children', (evt, node)=>this._renderer.markToSync('children', node));\n        viewRoot.on('change:attributes', (evt, node)=>this._renderer.markToSync('attributes', node));\n        viewRoot.on('change:text', (evt, node)=>this._renderer.markToSync('text', node));\n        viewRoot.on('change:isReadOnly', ()=>this.change(updateContenteditableAttribute));\n        viewRoot.on('change', ()=>{\n            this._hasChangedSinceTheLastRendering = true;\n        });\n        for (const observer of this._observers.values()){\n            observer.observe(domRoot, name);\n        }\n    }\n    /**\n\t * Detaches a DOM root element from the view element and restores its attributes to the state before\n\t * {@link #attachDomRoot `attachDomRoot()`}.\n\t *\n\t * @param name Name of the root to detach.\n\t */ detachDomRoot(name) {\n        const domRoot = this.domRoots.get(name);\n        // Remove all root attributes so the DOM element is \"bare\".\n        Array.from(domRoot.attributes).forEach(({ name })=>domRoot.removeAttribute(name));\n        const initialDomRootAttributes = this._initialDomRootAttributes.get(domRoot);\n        // Revert all view root attributes back to the state before attachDomRoot was called.\n        for(const attribute in initialDomRootAttributes){\n            domRoot.setAttribute(attribute, initialDomRootAttributes[attribute]);\n        }\n        this.domRoots.delete(name);\n        this.domConverter.unbindDomElement(domRoot);\n        for (const observer of this._observers.values()){\n            observer.stopObserving(domRoot);\n        }\n    }\n    /**\n\t * Gets DOM root element.\n\t *\n\t * @param name  Name of the root.\n\t * @returns DOM root element instance.\n\t */ getDomRoot(name = 'main') {\n        return this.domRoots.get(name);\n    }\n    /**\n\t * Creates observer of the given type if not yet created, {@link module:engine/view/observer/observer~Observer#enable enables} it\n\t * and {@link module:engine/view/observer/observer~Observer#observe attaches} to all existing and future\n\t * {@link #domRoots DOM roots}.\n\t *\n\t * Note: Observers are recognized by their constructor (classes). A single observer will be instantiated and used only\n\t * when registered for the first time. This means that features and other components can register a single observer\n\t * multiple times without caring whether it has been already added or not.\n\t *\n\t * @param ObserverConstructor The constructor of an observer to add.\n\t * Should create an instance inheriting from {@link module:engine/view/observer/observer~Observer}.\n\t * @returns Added observer instance.\n\t */ addObserver(ObserverConstructor) {\n        let observer = this._observers.get(ObserverConstructor);\n        if (observer) {\n            return observer;\n        }\n        observer = new ObserverConstructor(this);\n        this._observers.set(ObserverConstructor, observer);\n        for (const [name, domElement] of this.domRoots){\n            observer.observe(domElement, name);\n        }\n        observer.enable();\n        return observer;\n    }\n    /**\n\t * Returns observer of the given type or `undefined` if such observer has not been added yet.\n\t *\n\t * @param ObserverConstructor The constructor of an observer to get.\n\t * @returns Observer instance or undefined.\n\t */ getObserver(ObserverConstructor) {\n        return this._observers.get(ObserverConstructor);\n    }\n    /**\n\t * Disables all added observers.\n\t */ disableObservers() {\n        for (const observer of this._observers.values()){\n            observer.disable();\n        }\n    }\n    /**\n\t * Enables all added observers.\n\t */ enableObservers() {\n        for (const observer of this._observers.values()){\n            observer.enable();\n        }\n    }\n    /**\n\t * Scrolls the page viewport and {@link #domRoots} with their ancestors to reveal the\n\t * caret, **if not already visible to the user**.\n\t *\n\t * **Note**: Calling this method fires the {@link module:engine/view/view~ViewScrollToTheSelectionEvent} event that\n\t * allows custom behaviors.\n\t *\n\t * @param options Additional configuration of the scrolling behavior.\n\t * @param options.viewportOffset A distance between the DOM selection and the viewport boundary to be maintained\n\t * while scrolling to the selection (default is 20px). Setting this value to `0` will reveal the selection precisely at\n\t * the viewport boundary.\n\t * @param options.ancestorOffset A distance between the DOM selection and scrollable DOM root ancestor(s) to be maintained\n\t * while scrolling to the selection (default is 20px). Setting this value to `0` will reveal the selection precisely at\n\t * the scrollable ancestor(s) boundary.\n\t * @param options.alignToTop When set `true`, the DOM selection will be aligned to the top of the viewport if not already visible\n\t * (see `forceScroll` to learn more).\n\t * @param options.forceScroll When set `true`, the DOM selection will be aligned to the top of the viewport and scrollable ancestors\n\t * whether it is already visible or not. This option will only work when `alignToTop` is `true`.\n\t */ scrollToTheSelection({ alignToTop, forceScroll, viewportOffset = 20, ancestorOffset = 20 } = {}) {\n        const range = this.document.selection.getFirstRange();\n        if (!range) {\n            return;\n        }\n        // Clone to make sure properties like `viewportOffset` are not mutated in the event listeners.\n        const originalArgs = cloneDeep({\n            alignToTop,\n            forceScroll,\n            viewportOffset,\n            ancestorOffset\n        });\n        if (typeof viewportOffset === 'number') {\n            viewportOffset = {\n                top: viewportOffset,\n                bottom: viewportOffset,\n                left: viewportOffset,\n                right: viewportOffset\n            };\n        }\n        const options = {\n            target: this.domConverter.viewRangeToDom(range),\n            viewportOffset,\n            ancestorOffset,\n            alignToTop,\n            forceScroll\n        };\n        this.fire('scrollToTheSelection', options, originalArgs);\n        scrollViewportToShowTarget(options);\n    }\n    /**\n\t * It will focus DOM element representing {@link module:engine/view/editableelement~EditableElement EditableElement}\n\t * that is currently having selection inside.\n\t */ focus() {\n        if (!this.document.isFocused) {\n            const editable = this.document.selection.editableElement;\n            if (editable) {\n                this.domConverter.focus(editable);\n                this.forceRender();\n            }\n        }\n    }\n    /**\n\t * The `change()` method is the primary way of changing the view. You should use it to modify any node in the view tree.\n\t * It makes sure that after all changes are made the view is rendered to the DOM (assuming that the view will be changed\n\t * inside the callback). It prevents situations when the DOM is updated when the view state is not yet correct. It allows\n\t * to nest calls one inside another and still performs a single rendering after all those changes are made.\n\t * It also returns the return value of its callback.\n\t *\n\t * ```ts\n\t * const text = view.change( writer => {\n\t * \tconst newText = writer.createText( 'foo' );\n\t * \twriter.insert( position1, newText );\n\t *\n\t * \tview.change( writer => {\n\t * \t\twriter.insert( position2, writer.createText( 'bar' ) );\n\t * \t} );\n\t *\n\t * \twriter.remove( range );\n\t *\n\t * \treturn newText;\n\t * } );\n\t * ```\n\t *\n\t * When the outermost change block is done and rendering to the DOM is over the\n\t * {@link module:engine/view/view~View#event:render `View#render`} event is fired.\n\t *\n\t * This method throws a `applying-view-changes-on-rendering` error when\n\t * the change block is used after rendering to the DOM has started.\n\t *\n\t * @param callback Callback function which may modify the view.\n\t * @returns Value returned by the callback.\n\t */ change(callback) {\n        if (this.isRenderingInProgress || this._postFixersInProgress) {\n            /**\n\t\t\t * Thrown when there is an attempt to make changes to the view tree when it is in incorrect state. This may\n\t\t\t * cause some unexpected behaviour and inconsistency between the DOM and the view.\n\t\t\t * This may be caused by:\n\t\t\t *\n\t\t\t * * calling {@link module:engine/view/view~View#change} or {@link module:engine/view/view~View#forceRender} during rendering\n\t\t\t * process,\n\t\t\t * * calling {@link module:engine/view/view~View#change} or {@link module:engine/view/view~View#forceRender} inside of\n\t\t\t *   {@link module:engine/view/document~Document#registerPostFixer post-fixer function}.\n\t\t\t *\n\t\t\t * @error cannot-change-view-tree\n\t\t\t */ throw new CKEditorError('cannot-change-view-tree', this);\n        }\n        try {\n            // Recursive call to view.change() method - execute listener immediately.\n            if (this._ongoingChange) {\n                return callback(this._writer);\n            }\n            // This lock will assure that all recursive calls to view.change() will end up in same block - one \"render\"\n            // event for all nested calls.\n            this._ongoingChange = true;\n            const callbackResult = callback(this._writer);\n            this._ongoingChange = false;\n            // This lock is used by editing controller to render changes from outer most model.change() once. As plugins might call\n            // view.change() inside model.change() block - this will ensures that postfixers and rendering are called once after all\n            // changes. Also, we don't need to render anything if there're no changes since last rendering.\n            if (!this._renderingDisabled && this._hasChangedSinceTheLastRendering) {\n                this._postFixersInProgress = true;\n                this.document._callPostFixers(this._writer);\n                this._postFixersInProgress = false;\n                this.fire('render');\n            }\n            return callbackResult;\n        } catch (err) {\n            // @if CK_DEBUG // throw err;\n            /* istanbul ignore next -- @preserve */ CKEditorError.rethrowUnexpectedError(err, this);\n        }\n    }\n    /**\n\t * Forces rendering {@link module:engine/view/document~Document view document} to DOM. If any view changes are\n\t * currently in progress, rendering will start after all {@link #change change blocks} are processed.\n\t *\n\t * Note that this method is dedicated for special cases. All view changes should be wrapped in the {@link #change}\n\t * block and the view will automatically check whether it needs to render DOM or not.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `applying-view-changes-on-rendering` when\n\t * trying to re-render when rendering to DOM has already started.\n\t */ forceRender() {\n        this._hasChangedSinceTheLastRendering = true;\n        this.getObserver(FocusObserver).flush();\n        this.change(()=>{});\n    }\n    /**\n\t * Destroys this instance. Makes sure that all observers are destroyed and listeners removed.\n\t */ destroy() {\n        for (const observer of this._observers.values()){\n            observer.destroy();\n        }\n        this.document.destroy();\n        this.stopListening();\n    }\n    /**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~Item view item}.\n\t */ createPositionAt(itemOrPosition, offset) {\n        return Position$1._createAt(itemOrPosition, offset);\n    }\n    /**\n\t * Creates a new position after given view item.\n\t *\n\t * @param item View item after which the position should be located.\n\t */ createPositionAfter(item) {\n        return Position$1._createAfter(item);\n    }\n    /**\n\t * Creates a new position before given view item.\n\t *\n\t * @param item View item before which the position should be located.\n\t */ createPositionBefore(item) {\n        return Position$1._createBefore(item);\n    }\n    /**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates it's own {@link module:engine/view/position~Position} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */ createRange(start, end) {\n        return new Range$1(start, end);\n    }\n    /**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t */ createRangeOn(item) {\n        return Range$1._createOn(item);\n    }\n    /**\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */ createRangeIn(element) {\n        return Range$1._createIn(element);\n    }\n    createSelection(...args) {\n        return new Selection$1(...args);\n    }\n    /**\n\t * Disables or enables rendering. If the flag is set to `true` then the rendering will be disabled.\n\t * If the flag is set to `false` and if there was some change in the meantime, then the rendering action will be performed.\n\t *\n\t * @internal\n\t * @param flag A flag indicates whether the rendering should be disabled.\n\t */ _disableRendering(flag) {\n        this._renderingDisabled = flag;\n        if (flag == false) {\n            // Render when you stop blocking rendering.\n            this.change(()=>{});\n        }\n    }\n    /**\n\t * Renders all changes. In order to avoid triggering the observers (e.g. selection) all observers are disabled\n\t * before rendering and re-enabled after that.\n\t */ _render() {\n        this.isRenderingInProgress = true;\n        this.disableObservers();\n        this._renderer.render();\n        this.enableObservers();\n        this.isRenderingInProgress = false;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module engine/model/typecheckable\n */ class TypeCheckable {\n    /* istanbul ignore next -- @preserve */ is() {\n        // There are a lot of overloads above.\n        // Overriding method in derived classes remove them and only `is( type: string ): boolean` is visible which we don't want.\n        // One option would be to copy them all to all classes, but that's ugly.\n        // It's best when TypeScript compiler doesn't see those overloads, except the one in the top base class.\n        // To overload a method, but not let the compiler see it, do after class definition:\n        // `MyClass.prototype.is = function( type: string ) {...}`\n        throw new Error('is() method is abstract');\n    }\n}\n\n/**\n * Model node. Most basic structure of model tree.\n *\n * This is an abstract class that is a base for other classes representing different nodes in model.\n *\n * **Note:** If a node is detached from the model tree, you can manipulate it using it's API.\n * However, it is **very important** that nodes already attached to model tree should be only changed through\n * {@link module:engine/model/writer~Writer Writer API}.\n *\n * Changes done by `Node` methods, like {@link module:engine/model/element~Element#_insertChild _insertChild} or\n * {@link module:engine/model/node~Node#_setAttribute _setAttribute}\n * do not generate {@link module:engine/model/operation/operation~Operation operations}\n * which are essential for correct editor work if you modify nodes in {@link module:engine/model/document~Document document} root.\n *\n * The flow of working on `Node` (and classes that inherits from it) is as such:\n * 1. You can create a `Node` instance, modify it using it's API.\n * 2. Add `Node` to the model using `Batch` API.\n * 3. Change `Node` that was already added to the model using `Batch` API.\n *\n * Similarly, you cannot use `Batch` API on a node that has not been added to the model tree, with the exception\n * of {@link module:engine/model/writer~Writer#insert inserting} that node to the model tree.\n *\n * Be aware that using {@link module:engine/model/writer~Writer#remove remove from Batch API} does not allow to use `Node` API because\n * the information about `Node` is still kept in model document.\n *\n * In case of {@link module:engine/model/element~Element element node}, adding and removing children also counts as changing a node and\n * follows same rules.\n */ let Node$1 = class Node extends TypeCheckable {\n    /**\n\t * Parent of this node. It could be {@link module:engine/model/element~Element}\n\t * or {@link module:engine/model/documentfragment~DocumentFragment}.\n\t * Equals to `null` if the node has no parent.\n\t */ parent = null;\n    /**\n\t * Attributes set on this node.\n\t */ _attrs;\n    /**\n\t * Creates a model node.\n\t *\n\t * This is an abstract class, so this constructor should not be used directly.\n\t *\n\t * @param attrs Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */ constructor(attrs){\n        super();\n        this._attrs = toMap(attrs);\n    }\n    /**\n\t * {@link module:engine/model/document~Document Document} that owns this root element.\n\t */ get document() {\n        return null;\n    }\n    /**\n\t * Index of this node in its parent or `null` if the node has no parent.\n\t *\n\t * Accessing this property throws an error if this node's parent element does not contain it.\n\t * This means that model tree got broken.\n\t */ get index() {\n        let pos;\n        if (!this.parent) {\n            return null;\n        }\n        if ((pos = this.parent.getChildIndex(this)) === null) {\n            throw new CKEditorError('model-node-not-found-in-parent', this);\n        }\n        return pos;\n    }\n    /**\n\t * Offset at which this node starts in its parent. It is equal to the sum of {@link #offsetSize offsetSize}\n\t * of all its previous siblings. Equals to `null` if node has no parent.\n\t *\n\t * Accessing this property throws an error if this node's parent element does not contain it.\n\t * This means that model tree got broken.\n\t */ get startOffset() {\n        let pos;\n        if (!this.parent) {\n            return null;\n        }\n        if ((pos = this.parent.getChildStartOffset(this)) === null) {\n            throw new CKEditorError('model-node-not-found-in-parent', this);\n        }\n        return pos;\n    }\n    /**\n\t * Offset size of this node. Represents how much \"offset space\" is occupied by the node in it's parent.\n\t * It is important for {@link module:engine/model/position~Position position}. When node has `offsetSize` greater than `1`, position\n\t * can be placed between that node start and end. `offsetSize` greater than `1` is for nodes that represents more\n\t * than one entity, i.e. {@link module:engine/model/text~Text text node}.\n\t */ get offsetSize() {\n        return 1;\n    }\n    /**\n\t * Offset at which this node ends in it's parent. It is equal to the sum of this node's\n\t * {@link module:engine/model/node~Node#startOffset start offset} and {@link #offsetSize offset size}.\n\t * Equals to `null` if the node has no parent.\n\t */ get endOffset() {\n        if (!this.parent) {\n            return null;\n        }\n        return this.startOffset + this.offsetSize;\n    }\n    /**\n\t * Node's next sibling or `null` if the node is a last child of it's parent or if the node has no parent.\n\t */ get nextSibling() {\n        const index = this.index;\n        return index !== null && this.parent.getChild(index + 1) || null;\n    }\n    /**\n\t * Node's previous sibling or `null` if the node is a first child of it's parent or if the node has no parent.\n\t */ get previousSibling() {\n        const index = this.index;\n        return index !== null && this.parent.getChild(index - 1) || null;\n    }\n    /**\n\t * The top-most ancestor of the node. If node has no parent it is the root itself. If the node is a part\n\t * of {@link module:engine/model/documentfragment~DocumentFragment}, it's `root` is equal to that `DocumentFragment`.\n\t */ get root() {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n        let root = this;\n        while(root.parent){\n            root = root.parent;\n        }\n        return root;\n    }\n    /**\n\t * Returns `true` if the node is inside a document root that is attached to the document.\n\t */ isAttached() {\n        // If the node has no parent it means that it is a root.\n        // But this is not a `RootElement`, so it means that it is not attached.\n        //\n        // If this is not the root, check if this element's root is attached.\n        return this.parent === null ? false : this.root.isAttached();\n    }\n    /**\n\t * Gets path to the node. The path is an array containing starting offsets of consecutive ancestors of this node,\n\t * beginning from {@link module:engine/model/node~Node#root root}, down to this node's starting offset. The path can be used to\n\t * create {@link module:engine/model/position~Position Position} instance.\n\t *\n\t * ```ts\n\t * const abc = new Text( 'abc' );\n\t * const foo = new Text( 'foo' );\n\t * const h1 = new Element( 'h1', null, new Text( 'header' ) );\n\t * const p = new Element( 'p', null, [ abc, foo ] );\n\t * const div = new Element( 'div', null, [ h1, p ] );\n\t * foo.getPath(); // Returns [ 1, 3 ]. `foo` is in `p` which is in `div`. `p` starts at offset 1, while `foo` at 3.\n\t * h1.getPath(); // Returns [ 0 ].\n\t * div.getPath(); // Returns [].\n\t * ```\n\t */ getPath() {\n        const path = [];\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n        let node = this;\n        while(node.parent){\n            path.unshift(node.startOffset);\n            node = node.parent;\n        }\n        return path;\n    }\n    /**\n\t * Returns ancestors array of this node.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this node will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from node's parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */ getAncestors(options = {}) {\n        const ancestors = [];\n        let parent = options.includeSelf ? this : this.parent;\n        while(parent){\n            ancestors[options.parentFirst ? 'push' : 'unshift'](parent);\n            parent = parent.parent;\n        }\n        return ancestors;\n    }\n    /**\n\t * Returns a {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both nodes.\n\t *\n\t * @param node The second node.\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` both nodes will be considered \"ancestors\" too.\n\t * Which means that if e.g. node A is inside B, then their common ancestor will be B.\n\t */ getCommonAncestor(node, options = {}) {\n        const ancestorsA = this.getAncestors(options);\n        const ancestorsB = node.getAncestors(options);\n        let i = 0;\n        while(ancestorsA[i] == ancestorsB[i] && ancestorsA[i]){\n            i++;\n        }\n        return i === 0 ? null : ancestorsA[i - 1];\n    }\n    /**\n\t * Returns whether this node is before given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/model/documentfragment~DocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */ isBefore(node) {\n        // Given node is not before this node if they are same.\n        if (this == node) {\n            return false;\n        }\n        // Return `false` if it is impossible to compare nodes.\n        if (this.root !== node.root) {\n            return false;\n        }\n        const thisPath = this.getPath();\n        const nodePath = node.getPath();\n        const result = compareArrays(thisPath, nodePath);\n        switch(result){\n            case 'prefix':\n                return true;\n            case 'extension':\n                return false;\n            default:\n                return thisPath[result] < nodePath[result];\n        }\n    }\n    /**\n\t * Returns whether this node is after given node. `false` is returned if nodes are in different trees (for example,\n\t * in different {@link module:engine/model/documentfragment~DocumentFragment}s).\n\t *\n\t * @param node Node to compare with.\n\t */ isAfter(node) {\n        // Given node is not before this node if they are same.\n        if (this == node) {\n            return false;\n        }\n        // Return `false` if it is impossible to compare nodes.\n        if (this.root !== node.root) {\n            return false;\n        }\n        // In other cases, just check if the `node` is before, and return the opposite.\n        return !this.isBefore(node);\n    }\n    /**\n\t * Checks if the node has an attribute with given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on node, `false` otherwise.\n\t */ hasAttribute(key) {\n        return this._attrs.has(key);\n    }\n    /**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on node.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */ getAttribute(key) {\n        return this._attrs.get(key);\n    }\n    /**\n\t * Returns iterator that iterates over this node's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */ getAttributes() {\n        return this._attrs.entries();\n    }\n    /**\n\t * Returns iterator that iterates over this node's attribute keys.\n\t */ getAttributeKeys() {\n        return this._attrs.keys();\n    }\n    /**\n\t * Converts `Node` to plain object and returns it.\n\t *\n\t * @returns `Node` converted to plain object.\n\t */ toJSON() {\n        const json = {};\n        // Serializes attributes to the object.\n        // attributes = { a: 'foo', b: 1, c: true }.\n        if (this._attrs.size) {\n            json.attributes = Array.from(this._attrs).reduce((result, attr)=>{\n                result[attr[0]] = attr[1];\n                return result;\n            }, {});\n        }\n        return json;\n    }\n    /**\n\t * Creates a copy of this node, that is a node with exactly same attributes, and returns it.\n\t *\n\t * @internal\n\t * @returns Node with same attributes as this node.\n\t */ _clone(_deep) {\n        return new this.constructor(this._attrs);\n    }\n    /**\n\t * Removes this node from it's parent.\n\t *\n\t * @internal\n\t * @see module:engine/model/writer~Writer#remove\n\t */ _remove() {\n        this.parent._removeChildren(this.index);\n    }\n    /**\n\t * Sets attribute on the node. If attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * @see module:engine/model/writer~Writer#setAttribute\n\t * @internal\n\t * @param key Key of attribute to set.\n\t * @param value Attribute value.\n\t */ _setAttribute(key, value) {\n        this._attrs.set(key, value);\n    }\n    /**\n\t * Removes all attributes from the node and sets given attributes.\n\t *\n\t * @see module:engine/model/writer~Writer#setAttributes\n\t * @internal\n\t * @param attrs Attributes to set. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */ _setAttributesTo(attrs) {\n        this._attrs = toMap(attrs);\n    }\n    /**\n\t * Removes an attribute with given key from the node.\n\t *\n\t * @see module:engine/model/writer~Writer#removeAttribute\n\t * @internal\n\t * @param key Key of attribute to remove.\n\t * @returns `true` if the attribute was set on the element, `false` otherwise.\n\t */ _removeAttribute(key) {\n        return this._attrs.delete(key);\n    }\n    /**\n\t * Removes all attributes from the node.\n\t *\n\t * @see module:engine/model/writer~Writer#clearAttributes\n\t * @internal\n\t */ _clearAttributes() {\n        this._attrs.clear();\n    }\n};\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nNode$1.prototype.is = function(type) {\n    return type === 'node' || type === 'model:node';\n};\n\n/**\n * Provides an interface to operate on a list of {@link module:engine/model/node~Node nodes}. `NodeList` is used internally\n * in classes like {@link module:engine/model/element~Element Element}\n * or {@link module:engine/model/documentfragment~DocumentFragment DocumentFragment}.\n */ class NodeList {\n    /**\n\t * Nodes contained in this node list.\n\t */ _nodes = [];\n    /**\n\t * Creates an empty node list.\n\t *\n\t * @internal\n\t * @param nodes Nodes contained in this node list.\n\t */ constructor(nodes){\n        if (nodes) {\n            this._insertNodes(0, nodes);\n        }\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * Iterates over all nodes contained inside this node list.\n\t */ [Symbol.iterator]() {\n        return this._nodes[Symbol.iterator]();\n    }\n    /**\n\t * Number of nodes contained inside this node list.\n\t */ get length() {\n        return this._nodes.length;\n    }\n    /**\n\t * Sum of {@link module:engine/model/node~Node#offsetSize offset sizes} of all nodes contained inside this node list.\n\t */ get maxOffset() {\n        return this._nodes.reduce((sum, node)=>sum + node.offsetSize, 0);\n    }\n    /**\n\t * Gets the node at the given index. Returns `null` if incorrect index was passed.\n\t */ getNode(index) {\n        return this._nodes[index] || null;\n    }\n    /**\n\t * Returns an index of the given node. Returns `null` if given node is not inside this node list.\n\t */ getNodeIndex(node) {\n        const index = this._nodes.indexOf(node);\n        return index == -1 ? null : index;\n    }\n    /**\n\t * Returns the starting offset of given node. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~Node#offsetSize offset sizes} of all nodes that are before this node in this node list.\n\t */ getNodeStartOffset(node) {\n        const index = this.getNodeIndex(node);\n        return index === null ? null : this._nodes.slice(0, index).reduce((sum, node)=>sum + node.offsetSize, 0);\n    }\n    /**\n\t * Converts index to offset in node list.\n\t *\n\t * Returns starting offset of a node that is at given index. Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * `model-nodelist-index-out-of-bounds` if given index is less than `0` or more than {@link #length}.\n\t */ indexToOffset(index) {\n        if (index == this._nodes.length) {\n            return this.maxOffset;\n        }\n        const node = this._nodes[index];\n        if (!node) {\n            /**\n\t\t\t * Given index cannot be found in the node list.\n\t\t\t *\n\t\t\t * @error model-nodelist-index-out-of-bounds\n\t\t\t */ throw new CKEditorError('model-nodelist-index-out-of-bounds', this);\n        }\n        return this.getNodeStartOffset(node);\n    }\n    /**\n\t * Converts offset in node list to index.\n\t *\n\t * Returns index of a node that occupies given offset. Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError}\n\t * `model-nodelist-offset-out-of-bounds` if given offset is less than `0` or more than {@link #maxOffset}.\n\t */ offsetToIndex(offset) {\n        let totalOffset = 0;\n        for (const node of this._nodes){\n            if (offset >= totalOffset && offset < totalOffset + node.offsetSize) {\n                return this.getNodeIndex(node);\n            }\n            totalOffset += node.offsetSize;\n        }\n        if (totalOffset != offset) {\n            /**\n\t\t\t * Given offset cannot be found in the node list.\n\t\t\t *\n\t\t\t * @error model-nodelist-offset-out-of-bounds\n\t\t\t * @param offset\n\t\t\t * @param nodeList Stringified node list.\n\t\t\t */ throw new CKEditorError('model-nodelist-offset-out-of-bounds', this, {\n                offset,\n                nodeList: this\n            });\n        }\n        return this.length;\n    }\n    /**\n\t * Inserts given nodes at given index.\n\t *\n\t * @internal\n\t * @param index Index at which nodes should be inserted.\n\t * @param nodes Nodes to be inserted.\n\t */ _insertNodes(index, nodes) {\n        // Validation.\n        for (const node of nodes){\n            if (!(node instanceof Node$1)) {\n                /**\n\t\t\t\t * Trying to insert an object which is not a Node instance.\n\t\t\t\t *\n\t\t\t\t * @error model-nodelist-insertnodes-not-node\n\t\t\t\t */ throw new CKEditorError('model-nodelist-insertnodes-not-node', this);\n            }\n        }\n        this._nodes = spliceArray(this._nodes, Array.from(nodes), index, 0);\n    }\n    /**\n\t * Removes one or more nodes starting at the given index.\n\t *\n\t * @internal\n\t * @param indexStart Index of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns Array containing removed nodes.\n\t */ _removeNodes(indexStart, howMany = 1) {\n        return this._nodes.splice(indexStart, howMany);\n    }\n    /**\n\t * Converts `NodeList` instance to an array containing nodes that were inserted in the node list. Nodes\n\t * are also converted to their plain object representation.\n\t *\n\t * @returns `NodeList` instance converted to `Array`.\n\t */ toJSON() {\n        return this._nodes.map((node)=>node.toJSON());\n    }\n}\n\n// @if CK_DEBUG_ENGINE // const { convertMapToStringifiedObject } = require( '../dev-utils/utils' );\n/**\n * Model text node. Type of {@link module:engine/model/node~Node node} that contains {@link module:engine/model/text~Text#data text data}.\n *\n * **Important:** see {@link module:engine/model/node~Node} to read about restrictions using `Text` and `Node` API.\n *\n * **Note:** keep in mind that `Text` instances might indirectly got removed from model tree when model is changed.\n * This happens when {@link module:engine/model/writer~Writer model writer} is used to change model and the text node is merged with\n * another text node. Then, both text nodes are removed and a new text node is inserted into the model. Because of\n * this behavior, keeping references to `Text` is not recommended. Instead, consider creating\n * {@link module:engine/model/liveposition~LivePosition live position} placed before the text node.\n */ class Text extends Node$1 {\n    /**\n\t * Text data contained in this text node.\n\t *\n\t * @internal\n\t */ _data;\n    /**\n\t * Creates a text node.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~Writer#createText} method instead.\n\t *\n\t * @internal\n\t * @param data Node's text.\n\t * @param attrs Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */ constructor(data, attrs){\n        super(attrs);\n        this._data = data || '';\n    }\n    /**\n\t * @inheritDoc\n\t */ get offsetSize() {\n        return this.data.length;\n    }\n    /**\n\t * Returns a text data contained in the node.\n\t */ get data() {\n        return this._data;\n    }\n    /**\n\t * Converts `Text` instance to plain object and returns it.\n\t *\n\t * @returns`Text` instance converted to plain object.\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.data = this.data;\n        return json;\n    }\n    /**\n\t * Creates a copy of this text node and returns it. Created text node has same text data and attributes as original text node.\n\t *\n\t * @internal\n\t * @returns `Text` instance created using given plain object.\n\t */ _clone() {\n        return new Text(this.data, this.getAttributes());\n    }\n    /**\n\t * Creates a `Text` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param json Plain object to be converted to `Text`.\n\t * @returns `Text` instance created using given plain object.\n\t */ static fromJSON(json) {\n        return new Text(json.data, json.attributes);\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nText.prototype.is = function(type) {\n    return type === '$text' || type === 'model:$text' || // This are legacy values kept for backward compatibility.\n    type === 'text' || type === 'model:text' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n    type === 'node' || type === 'model:node';\n};\n\n// @if CK_DEBUG_ENGINE // const { convertMapToStringifiedObject } = require( '../dev-utils/utils' );\n/**\n * `TextProxy` represents a part of {@link module:engine/model/text~Text text node}.\n *\n * Since {@link module:engine/model/position~Position positions} can be placed between characters of a text node,\n * {@link module:engine/model/range~Range ranges} may contain only parts of text nodes. When {@link module:engine/model/range~Range#getItems\n * getting items}\n * contained in such range, we need to represent a part of that text node, since returning the whole text node would be incorrect.\n * `TextProxy` solves this issue.\n *\n * `TextProxy` has an API similar to {@link module:engine/model/text~Text Text} and allows to do most of the common tasks performed\n * on model nodes.\n *\n * **Note:** Some `TextProxy` instances may represent whole text node, not just a part of it.\n * See {@link module:engine/model/textproxy~TextProxy#isPartial}.\n *\n * **Note:** `TextProxy` is not an instance of {@link module:engine/model/node~Node node}. Keep this in mind when using it as a\n * parameter of methods.\n *\n * **Note:** `TextProxy` is a readonly interface. If you want to perform changes on model data represented by a `TextProxy`\n * use {@link module:engine/model/writer~Writer model writer API}.\n *\n * **Note:** `TextProxy` instances are created on the fly, basing on the current state of model. Because of this, it is\n * highly unrecommended to store references to `TextProxy` instances. `TextProxy` instances are not refreshed when\n * model changes, so they might get invalidated. Instead, consider creating {@link module:engine/model/liveposition~LivePosition live\n * position}.\n *\n * `TextProxy` instances are created by {@link module:engine/model/treewalker~TreeWalker model tree walker}. You should not need to create\n * an instance of this class by your own.\n */ class TextProxy extends TypeCheckable {\n    /**\n\t * Text node which part is represented by this text proxy.\n\t */ textNode;\n    /**\n\t * Text data represented by this text proxy.\n\t */ data;\n    /**\n\t * Offset in {@link module:engine/model/textproxy~TextProxy#textNode text node} from which the text proxy starts.\n\t */ offsetInText;\n    /**\n\t * Creates a text proxy.\n\t *\n\t * @internal\n\t * @param textNode Text node which part is represented by this text proxy.\n\t * @param offsetInText Offset in {@link module:engine/model/textproxy~TextProxy#textNode text node} from which the text proxy\n\t * starts.\n\t * @param length Text proxy length, that is how many text node's characters, starting from `offsetInText` it represents.\n\t */ constructor(textNode, offsetInText, length){\n        super();\n        this.textNode = textNode;\n        if (offsetInText < 0 || offsetInText > textNode.offsetSize) {\n            /**\n\t\t\t * Given `offsetInText` value is incorrect.\n\t\t\t *\n\t\t\t * @error model-textproxy-wrong-offsetintext\n\t\t\t */ throw new CKEditorError('model-textproxy-wrong-offsetintext', this);\n        }\n        if (length < 0 || offsetInText + length > textNode.offsetSize) {\n            /**\n\t\t\t * Given `length` value is incorrect.\n\t\t\t *\n\t\t\t * @error model-textproxy-wrong-length\n\t\t\t */ throw new CKEditorError('model-textproxy-wrong-length', this);\n        }\n        this.data = textNode.data.substring(offsetInText, offsetInText + length);\n        this.offsetInText = offsetInText;\n    }\n    /**\n\t * Offset at which this text proxy starts in it's parent.\n\t *\n\t * @see module:engine/model/node~Node#startOffset\n\t */ get startOffset() {\n        return this.textNode.startOffset !== null ? this.textNode.startOffset + this.offsetInText : null;\n    }\n    /**\n\t * Offset size of this text proxy. Equal to the number of characters represented by the text proxy.\n\t *\n\t * @see module:engine/model/node~Node#offsetSize\n\t */ get offsetSize() {\n        return this.data.length;\n    }\n    /**\n\t * Offset at which this text proxy ends in it's parent.\n\t *\n\t * @see module:engine/model/node~Node#endOffset\n\t */ get endOffset() {\n        return this.startOffset !== null ? this.startOffset + this.offsetSize : null;\n    }\n    /**\n\t * Flag indicating whether `TextProxy` instance covers only part of the original {@link module:engine/model/text~Text text node}\n\t * (`true`) or the whole text node (`false`).\n\t *\n\t * This is `false` when text proxy starts at the very beginning of {@link module:engine/model/textproxy~TextProxy#textNode textNode}\n\t * ({@link module:engine/model/textproxy~TextProxy#offsetInText offsetInText} equals `0`) and text proxy sizes is equal to\n\t * text node size.\n\t */ get isPartial() {\n        return this.offsetSize !== this.textNode.offsetSize;\n    }\n    /**\n\t * Parent of this text proxy, which is same as parent of text node represented by this text proxy.\n\t */ get parent() {\n        return this.textNode.parent;\n    }\n    /**\n\t * Root of this text proxy, which is same as root of text node represented by this text proxy.\n\t */ get root() {\n        return this.textNode.root;\n    }\n    /**\n\t * Gets path to this text proxy.\n\t *\n\t * @see module:engine/model/node~Node#getPath\n\t */ getPath() {\n        const path = this.textNode.getPath();\n        if (path.length > 0) {\n            path[path.length - 1] += this.offsetInText;\n        }\n        return path;\n    }\n    /**\n\t * Returns ancestors array of this text proxy.\n\t *\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this text proxy will be also included in parent's array.\n\t * @param options.parentFirst When set to `true`, array will be sorted from text proxy parent to root element,\n\t * otherwise root element will be the first item in the array.\n\t * @returns Array with ancestors.\n\t */ getAncestors(options = {}) {\n        const ancestors = [];\n        let parent = options.includeSelf ? this : this.parent;\n        while(parent){\n            ancestors[options.parentFirst ? 'push' : 'unshift'](parent);\n            parent = parent.parent;\n        }\n        return ancestors;\n    }\n    /**\n\t * Checks if this text proxy has an attribute for given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on text proxy, `false` otherwise.\n\t */ hasAttribute(key) {\n        return this.textNode.hasAttribute(key);\n    }\n    /**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on text proxy.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */ getAttribute(key) {\n        return this.textNode.getAttribute(key);\n    }\n    /**\n\t * Returns iterator that iterates over this node's attributes. Attributes are returned as arrays containing two\n\t * items. First one is attribute key and second is attribute value.\n\t *\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */ getAttributes() {\n        return this.textNode.getAttributes();\n    }\n    /**\n\t * Returns iterator that iterates over this node's attribute keys.\n\t */ getAttributeKeys() {\n        return this.textNode.getAttributeKeys();\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nTextProxy.prototype.is = function(type) {\n    return type === '$textProxy' || type === 'model:$textProxy' || // This are legacy values kept for backward compatibility.\n    type === 'textProxy' || type === 'model:textProxy';\n};\n\n// @if CK_DEBUG_ENGINE // const { stringifyMap, convertMapToStringifiedObject, convertMapToTags } = require( '../dev-utils/utils' );\n/**\n * Model element. Type of {@link module:engine/model/node~Node node} that has a {@link module:engine/model/element~Element#name name} and\n * {@link module:engine/model/element~Element#getChildren child nodes}.\n *\n * **Important**: see {@link module:engine/model/node~Node} to read about restrictions using `Element` and `Node` API.\n */ class Element extends Node$1 {\n    /**\n\t * Element name.\n\t */ name;\n    /**\n\t * List of children nodes.\n\t */ _children = new NodeList();\n    /**\n\t * Creates a model element.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~Writer#createElement} method instead.\n\t *\n\t * @internal\n\t * @param name Element's name.\n\t * @param attrs Element's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t * @param children One or more nodes to be inserted as children of created element.\n\t */ constructor(name, attrs, children){\n        super(attrs);\n        this.name = name;\n        if (children) {\n            this._insertChild(0, children);\n        }\n    }\n    /**\n\t * Number of this element's children.\n\t */ get childCount() {\n        return this._children.length;\n    }\n    /**\n\t * Sum of {@link module:engine/model/node~Node#offsetSize offset sizes} of all of this element's children.\n\t */ get maxOffset() {\n        return this._children.maxOffset;\n    }\n    /**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t */ get isEmpty() {\n        return this.childCount === 0;\n    }\n    /**\n\t * Gets the child at the given index.\n\t */ getChild(index) {\n        return this._children.getNode(index);\n    }\n    /**\n\t * Returns an iterator that iterates over all of this element's children.\n\t */ getChildren() {\n        return this._children[Symbol.iterator]();\n    }\n    /**\n\t * Returns an index of the given child node. Returns `null` if given node is not a child of this element.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's index in this element.\n\t */ getChildIndex(node) {\n        return this._children.getNodeIndex(node);\n    }\n    /**\n\t * Returns the starting offset of given child. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~Node#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t * given node is not a child of this element.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's starting offset.\n\t */ getChildStartOffset(node) {\n        return this._children.getNodeStartOffset(node);\n    }\n    /**\n\t * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t * too high, returns {@link module:engine/model/element~Element#getChildIndex index after last child}.\n\t *\n\t * ```ts\n\t * const textNode = new Text( 'foo' );\n\t * const pElement = new Element( 'p' );\n\t * const divElement = new Element( [ textNode, pElement ] );\n\t * divElement.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t * divElement.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t * divElement.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t * divElement.offsetToIndex( 2 ); // Returns 0.\n\t * divElement.offsetToIndex( 3 ); // Returns 1.\n\t * divElement.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t * ```\n\t */ offsetToIndex(offset) {\n        return this._children.offsetToIndex(offset);\n    }\n    /**\n\t * Returns a descendant node by its path relative to this element.\n\t *\n\t * ```ts\n\t * // <this>a<b>c</b></this>\n\t * this.getNodeByPath( [ 0 ] );     // -> \"a\"\n\t * this.getNodeByPath( [ 1 ] );     // -> <b>\n\t * this.getNodeByPath( [ 1, 0 ] );  // -> \"c\"\n\t * ```\n\t *\n\t * @param relativePath Path of the node to find, relative to this element.\n\t */ getNodeByPath(relativePath) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n        let node = this;\n        for (const index of relativePath){\n            node = node.getChild(node.offsetToIndex(index));\n        }\n        return node;\n    }\n    /**\n\t * Returns the parent element of the given name. Returns null if the element is not inside the desired parent.\n\t *\n\t * @param parentName The name of the parent element to find.\n\t * @param options Options object.\n\t * @param options.includeSelf When set to `true` this node will be also included while searching.\n\t */ findAncestor(parentName, options = {}) {\n        let parent = options.includeSelf ? this : this.parent;\n        while(parent){\n            if (parent.name === parentName) {\n                return parent;\n            }\n            parent = parent.parent;\n        }\n        return null;\n    }\n    /**\n\t * Converts `Element` instance to plain object and returns it. Takes care of converting all of this element's children.\n\t *\n\t * @returns `Element` instance converted to plain object.\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.name = this.name;\n        if (this._children.length > 0) {\n            json.children = [];\n            for (const node of this._children){\n                json.children.push(node.toJSON());\n            }\n        }\n        return json;\n    }\n    /**\n\t * Creates a copy of this element and returns it. Created element has the same name and attributes as the original element.\n\t * If clone is deep, the original element's children are also cloned. If not, then empty element is returned.\n\t *\n\t * @internal\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any child.\n\t */ _clone(deep = false) {\n        const children = deep ? Array.from(this._children).map((node)=>node._clone(true)) : undefined;\n        return new Element(this.name, this.getAttributes(), children);\n    }\n    /**\n\t * {@link module:engine/model/element~Element#_insertChild Inserts} one or more nodes at the end of this element.\n\t *\n\t * @see module:engine/model/writer~Writer#append\n\t * @internal\n\t * @param nodes Nodes to be inserted.\n\t */ _appendChild(nodes) {\n        this._insertChild(this.childCount, nodes);\n    }\n    /**\n\t * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~Node#parent parent} of these nodes\n\t * to this element.\n\t *\n\t * @see module:engine/model/writer~Writer#insert\n\t * @internal\n\t * @param index Index at which nodes should be inserted.\n\t * @param items Items to be inserted.\n\t */ _insertChild(index, items) {\n        const nodes = normalize$1(items);\n        for (const node of nodes){\n            // If node that is being added to this element is already inside another element, first remove it from the old parent.\n            if (node.parent !== null) {\n                node._remove();\n            }\n            node.parent = this;\n        }\n        this._children._insertNodes(index, nodes);\n    }\n    /**\n\t * Removes one or more nodes starting at the given index and sets\n\t * {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.\n\t *\n\t * @see module:engine/model/writer~Writer#remove\n\t * @internal\n\t * @param index Index of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns Array containing removed nodes.\n\t */ _removeChildren(index, howMany = 1) {\n        const nodes = this._children._removeNodes(index, howMany);\n        for (const node of nodes){\n            node.parent = null;\n        }\n        return nodes;\n    }\n    /**\n\t * Creates an `Element` instance from given plain object (i.e. parsed JSON string).\n\t * Converts `Element` children to proper nodes.\n\t *\n\t * @param json Plain object to be converted to `Element`.\n\t * @returns `Element` instance created using given plain object.\n\t */ static fromJSON(json) {\n        let children;\n        if (json.children) {\n            children = [];\n            for (const child of json.children){\n                if (child.name) {\n                    // If child has name property, it is an Element.\n                    children.push(Element.fromJSON(child));\n                } else {\n                    // Otherwise, it is a Text node.\n                    children.push(Text.fromJSON(child));\n                }\n            }\n        }\n        return new Element(json.name, json.attributes, children);\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'element' || type === 'model:element' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'node' || type === 'model:node';\n    }\n    return name === this.name && (type === 'element' || type === 'model:element');\n};\n/**\n * Converts strings to Text and non-iterables to arrays.\n */ function normalize$1(nodes) {\n    // Separate condition because string is iterable.\n    if (typeof nodes == 'string') {\n        return [\n            new Text(nodes)\n        ];\n    }\n    if (!isIterable(nodes)) {\n        nodes = [\n            nodes\n        ];\n    }\n    // Array.from to enable .map() on non-arrays.\n    return Array.from(nodes).map((node)=>{\n        if (typeof node == 'string') {\n            return new Text(node);\n        }\n        if (node instanceof TextProxy) {\n            return new Text(node.data, node.getAttributes());\n        }\n        return node;\n    });\n}\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */ class TreeWalker {\n    /**\n\t * Walking direction. Defaults `'forward'`.\n\t */ direction;\n    /**\n\t * Iterator boundaries.\n\t *\n\t * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t * on the start of boundary, then `{ done: true }` is returned.\n\t *\n\t * If boundaries are not defined they are set before first and after last child of the root node.\n\t */ boundaries;\n    /**\n\t * Flag indicating whether all consecutive characters with the same attributes should be\n\t * returned as one {@link module:engine/model/textproxy~TextProxy} (`true`) or one by one (`false`).\n\t */ singleCharacters;\n    /**\n\t * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t * iterated node will not be returned along with `elementEnd` tag.\n\t */ shallow;\n    /**\n\t * Flag indicating whether iterator should ignore `elementEnd` tags. If the option is true walker will not\n\t * return a parent node of the start position. If this option is `true` each {@link module:engine/model/element~Element} will\n\t * be returned once, while if the option is `false` they might be returned twice:\n\t * for `'elementStart'` and `'elementEnd'`.\n\t */ ignoreElementEnd;\n    /**\n\t * Iterator position. This is always static position, even if the initial position was a\n\t * {@link module:engine/model/liveposition~LivePosition live position}. If start position is not defined then position depends\n\t * on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t * is `'backward'` position starts from the end.\n\t */ _position;\n    /**\n\t * Start boundary cached for optimization purposes.\n\t */ _boundaryStartParent;\n    /**\n\t * End boundary cached for optimization purposes.\n\t */ _boundaryEndParent;\n    /**\n\t * Parent of the most recently visited node. Cached for optimization purposes.\n\t */ _visitedParent;\n    /**\n\t * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t *\n\t * @param options Object with configuration.\n\t */ constructor(options){\n        if (!options || !options.boundaries && !options.startPosition) {\n            /**\n\t\t\t * Neither boundaries nor starting position of a `TreeWalker` have been defined.\n\t\t\t *\n\t\t\t * @error model-tree-walker-no-start-position\n\t\t\t */ throw new CKEditorError('model-tree-walker-no-start-position', null);\n        }\n        const direction = options.direction || 'forward';\n        if (direction != 'forward' && direction != 'backward') {\n            /**\n\t\t\t * Only `backward` and `forward` direction allowed.\n\t\t\t *\n\t\t\t * @error model-tree-walker-unknown-direction\n\t\t\t */ throw new CKEditorError('model-tree-walker-unknown-direction', options, {\n                direction\n            });\n        }\n        this.direction = direction;\n        this.boundaries = options.boundaries || null;\n        if (options.startPosition) {\n            this._position = options.startPosition.clone();\n        } else {\n            this._position = Position._createAt(this.boundaries[this.direction == 'backward' ? 'end' : 'start']);\n        }\n        // Reset position stickiness in case it was set to other value, as the stickiness is kept after cloning.\n        this.position.stickiness = 'toNone';\n        this.singleCharacters = !!options.singleCharacters;\n        this.shallow = !!options.shallow;\n        this.ignoreElementEnd = !!options.ignoreElementEnd;\n        this._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n        this._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n        this._visitedParent = this.position.parent;\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * @returns {Iterable.<module:engine/model/treewalker~TreeWalkerValue>}\n\t */ [Symbol.iterator]() {\n        return this;\n    }\n    /**\n\t * Iterator position. This is always static position, even if the initial position was a\n\t * {@link module:engine/model/liveposition~LivePosition live position}. If start position is not defined then position depends\n\t * on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t * is `'backward'` position starts from the end.\n\t */ get position() {\n        return this._position;\n    }\n    /**\n\t * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * walker.skip( value => value.type == 'text' ); // <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t * walker.skip( () => true ); // Move the position to the end: <paragraph>[]foo</paragraph> -> <paragraph>foo</paragraph>[]\n\t * walker.skip( () => false ); // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/model/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t */ skip(skip) {\n        let done, value, prevPosition, prevVisitedParent;\n        do {\n            prevPosition = this.position;\n            prevVisitedParent = this._visitedParent;\n            ({ done, value } = this.next());\n        }while (!done && skip(value))\n        if (!done) {\n            this._position = prevPosition;\n            this._visitedParent = prevVisitedParent;\n        }\n    }\n    /**\n\t * Gets the next tree walker's value.\n\t */ next() {\n        if (this.direction == 'forward') {\n            return this._next();\n        } else {\n            return this._previous();\n        }\n    }\n    /**\n\t * Makes a step forward in model. Moves the {@link #position} to the next position and returns the encountered value.\n\t */ _next() {\n        const previousPosition = this.position;\n        const position = this.position.clone();\n        const parent = this._visitedParent;\n        // We are at the end of the root.\n        if (parent.parent === null && position.offset === parent.maxOffset) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // We reached the walker boundary.\n        if (parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // Get node just after the current position.\n        // Use a highly optimized version instead of checking the text node first and then getting the node after. See #6582.\n        const textNodeAtPosition = getTextNodeAtPosition(position, parent);\n        const node = textNodeAtPosition || getNodeAfterPosition(position, parent, textNodeAtPosition);\n        if (node instanceof Element) {\n            if (!this.shallow) {\n                // Manual operations on path internals for optimization purposes. Here and in the rest of the method.\n                position.path.push(0);\n                this._visitedParent = node;\n            } else {\n                // We are past the walker boundaries.\n                if (this.boundaries && this.boundaries.end.isBefore(position)) {\n                    return {\n                        done: true,\n                        value: undefined\n                    };\n                }\n                position.offset++;\n            }\n            this._position = position;\n            return formatReturnValue('elementStart', node, previousPosition, position, 1);\n        }\n        if (node instanceof Text) {\n            let charactersCount;\n            if (this.singleCharacters) {\n                charactersCount = 1;\n            } else {\n                let offset = node.endOffset;\n                if (this._boundaryEndParent == parent && this.boundaries.end.offset < offset) {\n                    offset = this.boundaries.end.offset;\n                }\n                charactersCount = offset - position.offset;\n            }\n            const offsetInTextNode = position.offset - node.startOffset;\n            const item = new TextProxy(node, offsetInTextNode, charactersCount);\n            position.offset += charactersCount;\n            this._position = position;\n            return formatReturnValue('text', item, previousPosition, position, charactersCount);\n        }\n        // `node` is not set, we reached the end of current `parent`.\n        position.path.pop();\n        position.offset++;\n        this._position = position;\n        this._visitedParent = parent.parent;\n        if (this.ignoreElementEnd) {\n            return this._next();\n        }\n        return formatReturnValue('elementEnd', parent, previousPosition, position);\n    }\n    /**\n\t * Makes a step backward in model. Moves the {@link #position} to the previous position and returns the encountered value.\n\t */ _previous() {\n        const previousPosition = this.position;\n        const position = this.position.clone();\n        const parent = this._visitedParent;\n        // We are at the beginning of the root.\n        if (parent.parent === null && position.offset === 0) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // We reached the walker boundary.\n        if (parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // Get node just before the current position.\n        // Use a highly optimized version instead of checking the text node first and then getting the node before. See #6582.\n        const positionParent = position.parent;\n        const textNodeAtPosition = getTextNodeAtPosition(position, positionParent);\n        const node = textNodeAtPosition || getNodeBeforePosition(position, positionParent, textNodeAtPosition);\n        if (node instanceof Element) {\n            position.offset--;\n            if (this.shallow) {\n                this._position = position;\n                return formatReturnValue('elementStart', node, previousPosition, position, 1);\n            }\n            position.path.push(node.maxOffset);\n            this._position = position;\n            this._visitedParent = node;\n            if (this.ignoreElementEnd) {\n                return this._previous();\n            }\n            return formatReturnValue('elementEnd', node, previousPosition, position);\n        }\n        if (node instanceof Text) {\n            let charactersCount;\n            if (this.singleCharacters) {\n                charactersCount = 1;\n            } else {\n                let offset = node.startOffset;\n                if (this._boundaryStartParent == parent && this.boundaries.start.offset > offset) {\n                    offset = this.boundaries.start.offset;\n                }\n                charactersCount = position.offset - offset;\n            }\n            const offsetInTextNode = position.offset - node.startOffset;\n            const item = new TextProxy(node, offsetInTextNode - charactersCount, charactersCount);\n            position.offset -= charactersCount;\n            this._position = position;\n            return formatReturnValue('text', item, previousPosition, position, charactersCount);\n        }\n        // `node` is not set, we reached the beginning of current `parent`.\n        position.path.pop();\n        this._position = position;\n        this._visitedParent = parent.parent;\n        return formatReturnValue('elementStart', parent, previousPosition, position, 1);\n    }\n}\nfunction formatReturnValue(type, item, previousPosition, nextPosition, length) {\n    return {\n        done: false,\n        value: {\n            type,\n            item,\n            previousPosition,\n            nextPosition,\n            length\n        }\n    };\n}\n\n/**\n * Represents a position in the model tree.\n *\n * A position is represented by its {@link module:engine/model/position~Position#root} and\n * a {@link module:engine/model/position~Position#path} in that root.\n *\n * You can create position instances via its constructor or the `createPosition*()` factory methods of\n * {@link module:engine/model/model~Model} and {@link module:engine/model/writer~Writer}.\n *\n * **Note:** Position is based on offsets, not indexes. This means that a position between two text nodes\n * `foo` and `bar` has offset `3`, not `1`. See {@link module:engine/model/position~Position#path} for more information.\n *\n * Since a position in the model is represented by a {@link module:engine/model/position~Position#root position root} and\n * {@link module:engine/model/position~Position#path position path} it is possible to create positions placed in non-existing places.\n * This requirement is important for operational transformation algorithms.\n *\n * Also, {@link module:engine/model/operation/operation~Operation operations}\n * kept in the {@link module:engine/model/document~Document#history document history}\n * are storing positions (and ranges) which were correct when those operations were applied, but may not be correct\n * after the document has changed.\n *\n * When changes are applied to the model, it may also happen that {@link module:engine/model/position~Position#parent position parent}\n * will change even if position path has not changed. Keep in mind, that if a position leads to non-existing element,\n * {@link module:engine/model/position~Position#parent} and some other properties and methods will throw errors.\n *\n * In most cases, position with wrong path is caused by an error in code, but it is sometimes needed, as described above.\n */ class Position extends TypeCheckable {\n    /**\n\t * Root of the position path.\n\t */ root;\n    /**\n\t * Position of the node in the tree. **Path contains offsets, not indexes.**\n\t *\n\t * Position can be placed before, after or in a {@link module:engine/model/node~Node node} if that node has\n\t * {@link module:engine/model/node~Node#offsetSize} greater than `1`. Items in position path are\n\t * {@link module:engine/model/node~Node#startOffset starting offsets} of position ancestors, starting from direct root children,\n\t * down to the position offset in it's parent.\n\t *\n\t * ```\n\t * ROOT\n\t *  |- P            before: [ 0 ]         after: [ 1 ]\n\t *  |- UL           before: [ 1 ]         after: [ 2 ]\n\t *     |- LI        before: [ 1, 0 ]      after: [ 1, 1 ]\n\t *     |  |- foo    before: [ 1, 0, 0 ]   after: [ 1, 0, 3 ]\n\t *     |- LI        before: [ 1, 1 ]      after: [ 1, 2 ]\n\t *        |- bar    before: [ 1, 1, 0 ]   after: [ 1, 1, 3 ]\n\t * ```\n\t *\n\t * `foo` and `bar` are representing {@link module:engine/model/text~Text text nodes}. Since text nodes has offset size\n\t * greater than `1` you can place position offset between their start and end:\n\t *\n\t * ```\n\t * ROOT\n\t *  |- P\n\t *  |- UL\n\t *     |- LI\n\t *     |  |- f^o|o  ^ has path: [ 1, 0, 1 ]   | has path: [ 1, 0, 2 ]\n\t *     |- LI\n\t *        |- b^a|r  ^ has path: [ 1, 1, 1 ]   | has path: [ 1, 1, 2 ]\n\t * ```\n\t */ path;\n    /**\n\t * Position stickiness. See {@link module:engine/model/position~PositionStickiness}.\n\t */ stickiness;\n    /**\n\t * Creates a position.\n\t *\n\t * @param root Root of the position.\n\t * @param path Position path. See {@link module:engine/model/position~Position#path}.\n\t * @param stickiness Position stickiness. See {@link module:engine/model/position~PositionStickiness}.\n\t */ constructor(root, path, stickiness = 'toNone'){\n        super();\n        if (!root.is('element') && !root.is('documentFragment')) {\n            /**\n\t\t\t * Position root is invalid.\n\t\t\t *\n\t\t\t * Positions can only be anchored in elements or document fragments.\n\t\t\t *\n\t\t\t * @error model-position-root-invalid\n\t\t\t */ throw new CKEditorError('model-position-root-invalid', root);\n        }\n        if (!(path instanceof Array) || path.length === 0) {\n            /**\n\t\t\t * Position path must be an array with at least one item.\n\t\t\t *\n\t\t\t * @error model-position-path-incorrect-format\n\t\t\t * @param path\n\t\t\t */ throw new CKEditorError('model-position-path-incorrect-format', root, {\n                path\n            });\n        }\n        // Normalize the root and path when element (not root) is passed.\n        if (root.is('rootElement')) {\n            path = path.slice();\n        } else {\n            path = [\n                ...root.getPath(),\n                ...path\n            ];\n            root = root.root;\n        }\n        this.root = root;\n        this.path = path;\n        this.stickiness = stickiness;\n    }\n    /**\n\t * Offset at which this position is located in its {@link module:engine/model/position~Position#parent parent}. It is equal\n\t * to the last item in position {@link module:engine/model/position~Position#path path}.\n\t *\n\t * @type {Number}\n\t */ get offset() {\n        return this.path[this.path.length - 1];\n    }\n    set offset(newOffset) {\n        this.path[this.path.length - 1] = newOffset;\n    }\n    /**\n\t * Parent element of this position.\n\t *\n\t * Keep in mind that `parent` value is calculated when the property is accessed.\n\t * If {@link module:engine/model/position~Position#path position path}\n\t * leads to a non-existing element, `parent` property will throw error.\n\t *\n\t * Also it is a good idea to cache `parent` property if it is used frequently in an algorithm (i.e. in a long loop).\n\t */ get parent() {\n        let parent = this.root;\n        for(let i = 0; i < this.path.length - 1; i++){\n            parent = parent.getChild(parent.offsetToIndex(this.path[i]));\n            if (!parent) {\n                /**\n\t\t\t\t * The position's path is incorrect. This means that a position does not point to\n\t\t\t\t * a correct place in the tree and hence, some of its methods and getters cannot work correctly.\n\t\t\t\t *\n\t\t\t\t * **Note**: Unlike DOM and view positions, in the model, the\n\t\t\t\t * {@link module:engine/model/position~Position#parent position's parent} is always an element or a document fragment.\n\t\t\t\t * The last offset in the {@link module:engine/model/position~Position#path position's path} is the point in this element\n\t\t\t\t * where this position points.\n\t\t\t\t *\n\t\t\t\t * Read more about model positions and offsets in\n\t\t\t\t * the {@glink framework/architecture/editing-engine#indexes-and-offsets Editing engine architecture} guide.\n\t\t\t\t *\n\t\t\t\t * @error model-position-path-incorrect\n\t\t\t\t * @param position The incorrect position.\n\t\t\t\t */ throw new CKEditorError('model-position-path-incorrect', this, {\n                    position: this\n                });\n            }\n        }\n        if (parent.is('$text')) {\n            throw new CKEditorError('model-position-path-incorrect', this, {\n                position: this\n            });\n        }\n        return parent;\n    }\n    /**\n\t * Position {@link module:engine/model/position~Position#offset offset} converted to an index in position's parent node. It is\n\t * equal to the {@link module:engine/model/node~Node#index index} of a node after this position. If position is placed\n\t * in text node, position index is equal to the index of that text node.\n\t */ get index() {\n        return this.parent.offsetToIndex(this.offset);\n    }\n    /**\n\t * Returns {@link module:engine/model/text~Text text node} instance in which this position is placed or `null` if this\n\t * position is not in a text node.\n\t */ get textNode() {\n        return getTextNodeAtPosition(this, this.parent);\n    }\n    /**\n\t * Node directly after this position or `null` if this position is in text node.\n\t */ get nodeAfter() {\n        // Cache the parent and reuse for performance reasons. See #6579 and #6582.\n        const parent = this.parent;\n        return getNodeAfterPosition(this, parent, getTextNodeAtPosition(this, parent));\n    }\n    /**\n\t * Node directly before this position or `null` if this position is in text node.\n\t */ get nodeBefore() {\n        // Cache the parent and reuse for performance reasons. See #6579 and #6582.\n        const parent = this.parent;\n        return getNodeBeforePosition(this, parent, getTextNodeAtPosition(this, parent));\n    }\n    /**\n\t * Is `true` if position is at the beginning of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n\t */ get isAtStart() {\n        return this.offset === 0;\n    }\n    /**\n\t * Is `true` if position is at the end of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n\t */ get isAtEnd() {\n        return this.offset == this.parent.maxOffset;\n    }\n    /**\n\t * Checks whether this position is before or after given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t */ compareWith(otherPosition) {\n        if (this.root != otherPosition.root) {\n            return 'different';\n        }\n        const result = compareArrays(this.path, otherPosition.path);\n        switch(result){\n            case 'same':\n                return 'same';\n            case 'prefix':\n                return 'before';\n            case 'extension':\n                return 'after';\n            default:\n                return this.path[result] < otherPosition.path[result] ? 'before' : 'after';\n        }\n    }\n    /**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/model/treewalker~TreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * ```ts\n\t * getLastMatchingPosition( value => value.type == 'text' );\n\t * // <paragraph>[]foo</paragraph> -> <paragraph>foo[]</paragraph>\n\t *\n\t * getLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } );\n\t * // <paragraph>foo[]</paragraph> -> <paragraph>[]foo</paragraph>\n\t *\n\t * getLastMatchingPosition( value => false );\n\t * // Do not move the position.\n\t * ```\n\t *\n\t * @param skip Callback function. Gets {@link module:engine/model/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t *\n\t * @returns The position after the last item which matches the `skip` callback test.\n\t */ getLastMatchingPosition(skip, options = {}) {\n        options.startPosition = this;\n        const treeWalker = new TreeWalker(options);\n        treeWalker.skip(skip);\n        return treeWalker.position;\n    }\n    /**\n\t * Returns a path to this position's parent. Parent path is equal to position {@link module:engine/model/position~Position#path path}\n\t * but without the last item.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @returns Path to the parent.\n\t */ getParentPath() {\n        return this.path.slice(0, -1);\n    }\n    /**\n\t * Returns ancestors array of this position, that is this position's parent and its ancestors.\n\t *\n\t * @returns Array with ancestors.\n\t */ getAncestors() {\n        const parent = this.parent;\n        if (parent.is('documentFragment')) {\n            return [\n                parent\n            ];\n        } else {\n            return parent.getAncestors({\n                includeSelf: true\n            });\n        }\n    }\n    /**\n\t * Returns the parent element of the given name. Returns null if the position is not inside the desired parent.\n\t *\n\t * @param parentName The name of the parent element to find.\n\t */ findAncestor(parentName) {\n        const parent = this.parent;\n        if (parent.is('element')) {\n            return parent.findAncestor(parentName, {\n                includeSelf: true\n            });\n        }\n        return null;\n    }\n    /**\n\t * Returns the slice of two position {@link #path paths} which is identical. The {@link #root roots}\n\t * of these two paths must be identical.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param position The second position.\n\t * @returns The common path.\n\t */ getCommonPath(position) {\n        if (this.root != position.root) {\n            return [];\n        }\n        // We find on which tree-level start and end have the lowest common ancestor\n        const cmp = compareArrays(this.path, position.path);\n        // If comparison returned string it means that arrays are same.\n        const diffAt = typeof cmp == 'string' ? Math.min(this.path.length, position.path.length) : cmp;\n        return this.path.slice(0, diffAt);\n    }\n    /**\n\t * Returns an {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both positions. The {@link #root roots} of these two positions must be identical.\n\t *\n\t * @param position The second position.\n\t */ getCommonAncestor(position) {\n        const ancestorsA = this.getAncestors();\n        const ancestorsB = position.getAncestors();\n        let i = 0;\n        while(ancestorsA[i] == ancestorsB[i] && ancestorsA[i]){\n            i++;\n        }\n        return i === 0 ? null : ancestorsA[i - 1];\n    }\n    /**\n\t * Returns a new instance of `Position`, that has same {@link #parent parent} but it's offset\n\t * is shifted by `shift` value (can be a negative value).\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param shift Offset shift. Can be a negative value.\n\t * @returns Shifted position.\n\t */ getShiftedBy(shift) {\n        const shifted = this.clone();\n        const offset = shifted.offset + shift;\n        shifted.offset = offset < 0 ? 0 : offset;\n        return shifted;\n    }\n    /**\n\t * Checks whether this position is after given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @see module:engine/model/position~Position#isBefore\n\t * @param  otherPosition Position to compare with.\n\t * @returns True if this position is after given position.\n\t */ isAfter(otherPosition) {\n        return this.compareWith(otherPosition) == 'after';\n    }\n    /**\n\t * Checks whether this position is before given position.\n\t *\n\t * **Note:** watch out when using negation of the value returned by this method, because the negation will also\n\t * be `true` if positions are in different roots and you might not expect this. You should probably use\n\t * `a.isAfter( b ) || a.isEqual( b )` or `!a.isBefore( p ) && a.root == b.root` in most scenarios. If your\n\t * condition uses multiple `isAfter` and `isBefore` checks, build them so they do not use negated values, i.e.:\n\t *\n\t * ```ts\n\t * if ( a.isBefore( b ) && c.isAfter( d ) ) {\n\t * \t// do A.\n\t * } else {\n\t * \t// do B.\n\t * }\n\t * ```\n\t *\n\t * or, if you have only one if-branch:\n\t *\n\t * ```ts\n\t * if ( !( a.isBefore( b ) && c.isAfter( d ) ) {\n\t * \t// do B.\n\t * }\n\t * ```\n\t *\n\t * rather than:\n\t *\n\t * ```ts\n\t * if ( !a.isBefore( b ) || && !c.isAfter( d ) ) {\n\t * \t// do B.\n\t * } else {\n\t * \t// do A.\n\t * }\n\t * ```\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if this position is before given position.\n\t */ isBefore(otherPosition) {\n        return this.compareWith(otherPosition) == 'before';\n    }\n    /**\n\t * Checks whether this position is equal to given position.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if positions are same.\n\t */ isEqual(otherPosition) {\n        return this.compareWith(otherPosition) == 'same';\n    }\n    /**\n\t * Checks whether this position is touching given position. Positions touch when there are no text nodes\n\t * or empty nodes in a range between them. Technically, those positions are not equal but in many cases\n\t * they are very similar or even indistinguishable.\n\t *\n\t * @param otherPosition Position to compare with.\n\t * @returns True if positions touch.\n\t */ isTouching(otherPosition) {\n        if (this.root !== otherPosition.root) {\n            return false;\n        }\n        const commonLevel = Math.min(this.path.length, otherPosition.path.length);\n        for(let level = 0; level < commonLevel; level++){\n            const diff = this.path[level] - otherPosition.path[level];\n            // Positions are spread by a node, so they are not touching.\n            if (diff < -1 || diff > 1) {\n                return false;\n            } else if (diff === 1) {\n                // `otherPosition` is on the left.\n                // `this` is on the right.\n                return checkTouchingBranch(otherPosition, this, level);\n            } else if (diff === -1) {\n                // `this` is on the left.\n                // `otherPosition` is on the right.\n                return checkTouchingBranch(this, otherPosition, level);\n            }\n        // `diff === 0`.\n        // Positions are inside the same element on this level, compare deeper.\n        }\n        // If we ended up here, it means that positions paths have the same beginning.\n        // If the paths have the same length, then it means that they are identical, so the positions are same.\n        if (this.path.length === otherPosition.path.length) {\n            return true;\n        } else if (this.path.length > otherPosition.path.length) {\n            return checkOnlyZeroes(this.path, commonLevel);\n        } else {\n            return checkOnlyZeroes(otherPosition.path, commonLevel);\n        }\n    }\n    /**\n\t * Checks if two positions are in the same parent.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param position Position to compare with.\n\t * @returns `true` if positions have the same parent, `false` otherwise.\n\t */ hasSameParentAs(position) {\n        if (this.root !== position.root) {\n            return false;\n        }\n        const thisParentPath = this.getParentPath();\n        const posParentPath = position.getParentPath();\n        return compareArrays(thisParentPath, posParentPath) == 'same';\n    }\n    /**\n\t * Returns a copy of this position that is transformed by given `operation`.\n\t *\n\t * The new position's parameters are updated accordingly to the effect of the `operation`.\n\t *\n\t * For example, if `n` nodes are inserted before the position, the returned position {@link ~Position#offset} will be\n\t * increased by `n`. If the position was in a merged element, it will be accordingly moved to the new element, etc.\n\t *\n\t * This method is safe to use it on non-existing positions (for example during operational transformation).\n\t *\n\t * @param operation Operation to transform by.\n\t * @returns Transformed position.\n\t */ getTransformedByOperation(operation) {\n        let result;\n        switch(operation.type){\n            case 'insert':\n                result = this._getTransformedByInsertOperation(operation);\n                break;\n            case 'move':\n            case 'remove':\n            case 'reinsert':\n                result = this._getTransformedByMoveOperation(operation);\n                break;\n            case 'split':\n                result = this._getTransformedBySplitOperation(operation);\n                break;\n            case 'merge':\n                result = this._getTransformedByMergeOperation(operation);\n                break;\n            default:\n                result = Position._createAt(this);\n                break;\n        }\n        return result;\n    }\n    /**\n\t * Returns a copy of this position transformed by an insert operation.\n\t *\n\t * @internal\n\t */ _getTransformedByInsertOperation(operation) {\n        return this._getTransformedByInsertion(operation.position, operation.howMany);\n    }\n    /**\n\t * Returns a copy of this position transformed by a move operation.\n\t *\n\t * @internal\n\t */ _getTransformedByMoveOperation(operation) {\n        return this._getTransformedByMove(operation.sourcePosition, operation.targetPosition, operation.howMany);\n    }\n    /**\n\t * Returns a copy of this position transformed by a split operation.\n\t *\n\t * @internal\n\t */ _getTransformedBySplitOperation(operation) {\n        const movedRange = operation.movedRange;\n        const isContained = movedRange.containsPosition(this) || movedRange.start.isEqual(this) && this.stickiness == 'toNext';\n        if (isContained) {\n            return this._getCombined(operation.splitPosition, operation.moveTargetPosition);\n        } else {\n            if (operation.graveyardPosition) {\n                return this._getTransformedByMove(operation.graveyardPosition, operation.insertionPosition, 1);\n            } else {\n                return this._getTransformedByInsertion(operation.insertionPosition, 1);\n            }\n        }\n    }\n    /**\n\t * Returns a copy of this position transformed by merge operation.\n\t *\n\t * @internal\n\t */ _getTransformedByMergeOperation(operation) {\n        const movedRange = operation.movedRange;\n        const isContained = movedRange.containsPosition(this) || movedRange.start.isEqual(this);\n        let pos;\n        if (isContained) {\n            pos = this._getCombined(operation.sourcePosition, operation.targetPosition);\n            if (operation.sourcePosition.isBefore(operation.targetPosition)) {\n                // Above happens during OT when the merged element is moved before the merged-to element.\n                pos = pos._getTransformedByDeletion(operation.deletionPosition, 1);\n            }\n        } else if (this.isEqual(operation.deletionPosition)) {\n            pos = Position._createAt(operation.deletionPosition);\n        } else {\n            pos = this._getTransformedByMove(operation.deletionPosition, operation.graveyardPosition, 1);\n        }\n        return pos;\n    }\n    /**\n\t * Returns a copy of this position that is updated by removing `howMany` nodes starting from `deletePosition`.\n\t * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.\n\t *\n\t * @internal\n\t * @param deletePosition Position before the first removed node.\n\t * @param howMany How many nodes are removed.\n\t * @returns Transformed position or `null`.\n\t */ _getTransformedByDeletion(deletePosition, howMany) {\n        const transformed = Position._createAt(this);\n        // This position can't be affected if deletion was in a different root.\n        if (this.root != deletePosition.root) {\n            return transformed;\n        }\n        if (compareArrays(deletePosition.getParentPath(), this.getParentPath()) == 'same') {\n            // If nodes are removed from the node that is pointed by this position...\n            if (deletePosition.offset < this.offset) {\n                // And are removed from before an offset of that position...\n                if (deletePosition.offset + howMany > this.offset) {\n                    // Position is in removed range, it's no longer in the tree.\n                    return null;\n                } else {\n                    // Decrement the offset accordingly.\n                    transformed.offset -= howMany;\n                }\n            }\n        } else if (compareArrays(deletePosition.getParentPath(), this.getParentPath()) == 'prefix') {\n            // If nodes are removed from a node that is on a path to this position...\n            const i = deletePosition.path.length - 1;\n            if (deletePosition.offset <= this.path[i]) {\n                // And are removed from before next node of that path...\n                if (deletePosition.offset + howMany > this.path[i]) {\n                    // If the next node of that path is removed return null\n                    // because the node containing this position got removed.\n                    return null;\n                } else {\n                    // Otherwise, decrement index on that path.\n                    transformed.path[i] -= howMany;\n                }\n            }\n        }\n        return transformed;\n    }\n    /**\n\t * Returns a copy of this position that is updated by inserting `howMany` nodes at `insertPosition`.\n\t *\n\t * @internal\n\t * @param insertPosition Position where nodes are inserted.\n\t * @param howMany How many nodes are inserted.\n\t * @returns Transformed position.\n\t */ _getTransformedByInsertion(insertPosition, howMany) {\n        const transformed = Position._createAt(this);\n        // This position can't be affected if insertion was in a different root.\n        if (this.root != insertPosition.root) {\n            return transformed;\n        }\n        if (compareArrays(insertPosition.getParentPath(), this.getParentPath()) == 'same') {\n            // If nodes are inserted in the node that is pointed by this position...\n            if (insertPosition.offset < this.offset || insertPosition.offset == this.offset && this.stickiness != 'toPrevious') {\n                // And are inserted before an offset of that position...\n                // \"Push\" this positions offset.\n                transformed.offset += howMany;\n            }\n        } else if (compareArrays(insertPosition.getParentPath(), this.getParentPath()) == 'prefix') {\n            // If nodes are inserted in a node that is on a path to this position...\n            const i = insertPosition.path.length - 1;\n            if (insertPosition.offset <= this.path[i]) {\n                // And are inserted before next node of that path...\n                // \"Push\" the index on that path.\n                transformed.path[i] += howMany;\n            }\n        }\n        return transformed;\n    }\n    /**\n\t * Returns a copy of this position that is updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @internal\n\t * @param sourcePosition Position before the first element to move.\n\t * @param targetPosition Position where moved elements will be inserted.\n\t * @param howMany How many consecutive nodes to move, starting from `sourcePosition`.\n\t * @returns Transformed position.\n\t */ _getTransformedByMove(sourcePosition, targetPosition, howMany) {\n        // Update target position, as it could be affected by nodes removal.\n        targetPosition = targetPosition._getTransformedByDeletion(sourcePosition, howMany);\n        if (sourcePosition.isEqual(targetPosition)) {\n            // If `targetPosition` is equal to `sourcePosition` this isn't really any move. Just return position as it is.\n            return Position._createAt(this);\n        }\n        // Moving a range removes nodes from their original position. We acknowledge this by proper transformation.\n        const transformed = this._getTransformedByDeletion(sourcePosition, howMany);\n        const isMoved = transformed === null || sourcePosition.isEqual(this) && this.stickiness == 'toNext' || sourcePosition.getShiftedBy(howMany).isEqual(this) && this.stickiness == 'toPrevious';\n        if (isMoved) {\n            // This position is inside moved range (or sticks to it).\n            // In this case, we calculate a combination of this position, move source position and target position.\n            return this._getCombined(sourcePosition, targetPosition);\n        } else {\n            // This position is not inside a removed range.\n            //\n            // In next step, we simply reflect inserting `howMany` nodes, which might further affect the position.\n            return transformed._getTransformedByInsertion(targetPosition, howMany);\n        }\n    }\n    /**\n\t * Returns a new position that is a combination of this position and given positions.\n\t *\n\t * The combined position is a copy of this position transformed by moving a range starting at `source` position\n\t * to the `target` position. It is expected that this position is inside the moved range.\n\t *\n\t * Example:\n\t *\n\t * ```ts\n\t * let original = model.createPositionFromPath( root, [ 2, 3, 1 ] );\n\t * let source = model.createPositionFromPath( root, [ 2, 2 ] );\n\t * let target = model.createPositionFromPath( otherRoot, [ 1, 1, 3 ] );\n\t * original._getCombined( source, target ); // path is [ 1, 1, 4, 1 ], root is `otherRoot`\n\t * ```\n\t *\n\t * Explanation:\n\t *\n\t * We have a position `[ 2, 3, 1 ]` and move some nodes from `[ 2, 2 ]` to `[ 1, 1, 3 ]`. The original position\n\t * was inside moved nodes and now should point to the new place. The moved nodes will be after\n\t * positions `[ 1, 1, 3 ]`, `[ 1, 1, 4 ]`, `[ 1, 1, 5 ]`. Since our position was in the second moved node,\n\t * the transformed position will be in a sub-tree of a node at `[ 1, 1, 4 ]`. Looking at original path, we\n\t * took care of `[ 2, 3 ]` part of it. Now we have to add the rest of the original path to the transformed path.\n\t * Finally, the transformed position will point to `[ 1, 1, 4, 1 ]`.\n\t *\n\t * @internal\n\t * @param source Beginning of the moved range.\n\t * @param target Position where the range is moved.\n\t * @returns Combined position.\n\t */ _getCombined(source, target) {\n        const i = source.path.length - 1;\n        // The first part of a path to combined position is a path to the place where nodes were moved.\n        const combined = Position._createAt(target);\n        combined.stickiness = this.stickiness;\n        // Then we have to update the rest of the path.\n        // Fix the offset because this position might be after `from` position and we have to reflect that.\n        combined.offset = combined.offset + this.path[i] - source.offset;\n        // Then, add the rest of the path.\n        // If this position is at the same level as `from` position nothing will get added.\n        combined.path = [\n            ...combined.path,\n            ...this.path.slice(i + 1)\n        ];\n        return combined;\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        return {\n            root: this.root.toJSON(),\n            path: Array.from(this.path),\n            stickiness: this.stickiness\n        };\n    }\n    /**\n\t * Returns a new position that is equal to current position.\n\t */ clone() {\n        return new this.constructor(this.root, this.path, this.stickiness);\n    }\n    /**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/model/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/model/item~Item model item} and `'before'` or `'after'` (sets position before or after given model item).\n\t *\n\t * This method is a shortcut to other factory methods such as:\n\t *\n\t * * {@link module:engine/model/position~Position._createBefore},\n\t * * {@link module:engine/model/position~Position._createAfter}.\n\t *\n\t * @internal\n\t * @param offset Offset or one of the flags. Used only when the first parameter is a {@link module:engine/model/item~Item model item}.\n\t * @param stickiness Position stickiness. Used only when the first parameter is a {@link module:engine/model/item~Item model item}.\n\t */ static _createAt(itemOrPosition, offset, stickiness = 'toNone') {\n        if (itemOrPosition instanceof Position) {\n            return new Position(itemOrPosition.root, itemOrPosition.path, itemOrPosition.stickiness);\n        } else {\n            const node = itemOrPosition;\n            if (offset == 'end') {\n                offset = node.maxOffset;\n            } else if (offset == 'before') {\n                return this._createBefore(node, stickiness);\n            } else if (offset == 'after') {\n                return this._createAfter(node, stickiness);\n            } else if (offset !== 0 && !offset) {\n                /**\n\t\t\t\t * {@link module:engine/model/model~Model#createPositionAt `Model#createPositionAt()`}\n\t\t\t\t * requires the offset to be specified when the first parameter is a model item.\n\t\t\t\t *\n\t\t\t\t * @error model-createpositionat-offset-required\n\t\t\t\t */ throw new CKEditorError('model-createpositionat-offset-required', [\n                    this,\n                    itemOrPosition\n                ]);\n            }\n            if (!node.is('element') && !node.is('documentFragment')) {\n                /**\n\t\t\t\t * Position parent have to be a model element or model document fragment.\n\t\t\t\t *\n\t\t\t\t * @error model-position-parent-incorrect\n\t\t\t\t */ throw new CKEditorError('model-position-parent-incorrect', [\n                    this,\n                    itemOrPosition\n                ]);\n            }\n            const path = node.getPath();\n            path.push(offset);\n            return new this(node.root, path, stickiness);\n        }\n    }\n    /**\n\t * Creates a new position, after given {@link module:engine/model/item~Item model item}.\n\t *\n\t * @internal\n\t * @param item Item after which the position should be placed.\n\t * @param stickiness Position stickiness.\n\t */ static _createAfter(item, stickiness) {\n        if (!item.parent) {\n            /**\n\t\t\t * You can not make a position after a root element.\n\t\t\t *\n\t\t\t * @error model-position-after-root\n\t\t\t * @param root\n\t\t\t */ throw new CKEditorError('model-position-after-root', [\n                this,\n                item\n            ], {\n                root: item\n            });\n        }\n        return this._createAt(item.parent, item.endOffset, stickiness);\n    }\n    /**\n\t * Creates a new position, before the given {@link module:engine/model/item~Item model item}.\n\t *\n\t * @internal\n\t * @param item Item before which the position should be placed.\n\t * @param stickiness Position stickiness.\n\t */ static _createBefore(item, stickiness) {\n        if (!item.parent) {\n            /**\n\t\t\t * You can not make a position before a root element.\n\t\t\t *\n\t\t\t * @error model-position-before-root\n\t\t\t * @param root\n\t\t\t */ throw new CKEditorError('model-position-before-root', item, {\n                root: item\n            });\n        }\n        return this._createAt(item.parent, item.startOffset, stickiness);\n    }\n    /**\n\t * Creates a `Position` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param json Plain object to be converted to `Position`.\n\t * @param doc Document object that will be position owner.\n\t * @returns `Position` instance created using given plain object.\n\t */ static fromJSON(json, doc) {\n        if (json.root === '$graveyard') {\n            const pos = new Position(doc.graveyard, json.path);\n            pos.stickiness = json.stickiness;\n            return pos;\n        }\n        if (!doc.getRoot(json.root)) {\n            /**\n\t\t\t * Cannot create position for document. Root with specified name does not exist.\n\t\t\t *\n\t\t\t * @error model-position-fromjson-no-root\n\t\t\t * @param rootName\n\t\t\t */ throw new CKEditorError('model-position-fromjson-no-root', doc, {\n                rootName: json.root\n            });\n        }\n        return new Position(doc.getRoot(json.root), json.path, json.stickiness);\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nPosition.prototype.is = function(type) {\n    return type === 'position' || type === 'model:position';\n};\n/**\n * Returns a text node at the given position.\n *\n * This is a helper function optimized to reuse the position parent instance for performance reasons.\n *\n * Normally, you should use {@link module:engine/model/position~Position#textNode `Position#textNode`}.\n * If you start hitting performance issues with {@link module:engine/model/position~Position#parent `Position#parent`}\n * check if your algorithm does not access it multiple times (which can happen directly or indirectly via other position properties).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/6579.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getNodeAfterPosition}\n * * {@link module:engine/model/position~getNodeBeforePosition}\n *\n * @param positionParent The parent of the given position.\n */ function getTextNodeAtPosition(position, positionParent) {\n    const node = positionParent.getChild(positionParent.offsetToIndex(position.offset));\n    if (node && node.is('$text') && node.startOffset < position.offset) {\n        return node;\n    }\n    return null;\n}\n/**\n * Returns the node after the given position.\n *\n * This is a helper function optimized to reuse the position parent instance and the calculation of the text node at the\n * specific position for performance reasons.\n *\n * Normally, you should use {@link module:engine/model/position~Position#nodeAfter `Position#nodeAfter`}.\n * If you start hitting performance issues with {@link module:engine/model/position~Position#parent `Position#parent`} and/or\n * {@link module:engine/model/position~Position#textNode `Position#textNode`}\n * check if your algorithm does not access those properties multiple times\n * (which can happen directly or indirectly via other position properties).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/6579 and https://github.com/ckeditor/ckeditor5/issues/6582.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getTextNodeAtPosition}\n * * {@link module:engine/model/position~getNodeBeforePosition}\n *\n * @param positionParent The parent of the given position.\n * @param textNode Text node at the given position.\n */ function getNodeAfterPosition(position, positionParent, textNode) {\n    if (textNode !== null) {\n        return null;\n    }\n    return positionParent.getChild(positionParent.offsetToIndex(position.offset));\n}\n/**\n * Returns the node before the given position.\n *\n * Refer to {@link module:engine/model/position~getNodeBeforePosition} for documentation on when to use this util method.\n *\n * See also:\n *\n * * {@link module:engine/model/position~getTextNodeAtPosition}\n * * {@link module:engine/model/position~getNodeAfterPosition}\n *\n * @param positionParent The parent of the given position.\n * @param textNode Text node at the given position.\n */ function getNodeBeforePosition(position, positionParent, textNode) {\n    if (textNode !== null) {\n        return null;\n    }\n    return positionParent.getChild(positionParent.offsetToIndex(position.offset) - 1);\n}\n/**\n * This is a helper function for `Position#isTouching()`.\n *\n * It checks whether to given positions are touching, considering that they have the same root and paths\n * until given level, and at given level they differ by 1 (so they are branching at `level` point).\n *\n * The exact requirements for touching positions are described in `Position#isTouching()` and also\n * in the body of this function.\n *\n * @param left Position \"on the left\" (it is before `right`).\n * @param right Position \"on the right\" (it is after `left`).\n * @param level Level on which the positions are different.\n */ function checkTouchingBranch(left, right, level) {\n    if (level + 1 === left.path.length) {\n        // Left position does not have any more entries after the point where the positions differ.\n        // [ 2 ] vs [ 3 ]\n        // [ 2 ] vs [ 3, 0, 0 ]\n        // The positions are spread by node at [ 2 ].\n        return false;\n    }\n    if (!checkOnlyZeroes(right.path, level + 1)) {\n        // Right position does not have only zeroes, so we have situation like:\n        // [ 2, maxOffset ] vs [ 3, 1 ]\n        // [ 2, maxOffset ] vs [ 3, 1, 0, 0 ]\n        // The positions are spread by node at [ 3, 0 ].\n        return false;\n    }\n    if (!checkOnlyMaxOffset(left, level + 1)) {\n        // Left position does not have only max offsets, so we have situation like:\n        // [ 2, 4 ] vs [ 3 ]\n        // [ 2, 4 ] vs [ 3, 0, 0 ]\n        // The positions are spread by node at [ 2, 5 ].\n        return false;\n    }\n    // Left position has only max offsets and right position has only zeroes or nothing.\n    // [ 2, maxOffset ] vs [ 3 ]\n    // [ 2, maxOffset, maxOffset ] vs [ 3, 0 ]\n    // There are not elements between positions. The positions are touching.\n    return true;\n}\n/**\n * Checks whether for given array, starting from given index until the end of the array, all items are `0`s.\n *\n * This is a helper function for `Position#isTouching()`.\n */ function checkOnlyZeroes(arr, idx) {\n    while(idx < arr.length){\n        if (arr[idx] !== 0) {\n            return false;\n        }\n        idx++;\n    }\n    return true;\n}\n/**\n * Checks whether for given position, starting from given path level, whether the position is at the end of\n * its parent and whether each element on the path to the position is also at at the end of its parent.\n *\n * This is a helper function for `Position#isTouching()`.\n */ function checkOnlyMaxOffset(pos, level) {\n    let parent = pos.parent;\n    let idx = pos.path.length - 1;\n    let add = 0;\n    while(idx >= level){\n        if (pos.path[idx] + add !== parent.maxOffset) {\n            return false;\n        }\n        // After the first check, we \"go up\", and check whether the position's parent-parent is the last element.\n        // However, we need to add 1 to the value in the path to \"simulate\" moving the path after the parent.\n        // It happens just once.\n        add = 1;\n        idx--;\n        parent = parent.parent;\n    }\n    return true;\n}\n\n/**\n * Represents a range in the model tree.\n *\n * A range is defined by its {@link module:engine/model/range~Range#start} and {@link module:engine/model/range~Range#end}\n * positions.\n *\n * You can create range instances via its constructor or the `createRange*()` factory methods of\n * {@link module:engine/model/model~Model} and {@link module:engine/model/writer~Writer}.\n */ class Range extends TypeCheckable {\n    /**\n\t * Start position.\n\t */ start;\n    /**\n\t * End position.\n\t */ end;\n    /**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * @param start The start position.\n\t * @param end The end position. If not set, the range will be collapsed at the `start` position.\n\t */ constructor(start, end){\n        super();\n        this.start = Position._createAt(start);\n        this.end = end ? Position._createAt(end) : Position._createAt(start);\n        // If the range is collapsed, treat in a similar way as a position and set its boundaries stickiness to 'toNone'.\n        // In other case, make the boundaries stick to the \"inside\" of the range.\n        this.start.stickiness = this.isCollapsed ? 'toNone' : 'toNext';\n        this.end.stickiness = this.isCollapsed ? 'toNone' : 'toPrevious';\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/model/position~Position positions},\n\t * grouped as {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t * It iterates over all {@link module:engine/model/textproxy~TextProxy text contents} that are inside the range\n\t * and all the {@link module:engine/model/element~Element}s that are entered into when iterating over this range.\n\t *\n\t * This iterator uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range\n\t * and `ignoreElementEnd` option set to `true`.\n\t */ *[Symbol.iterator]() {\n        yield* new TreeWalker({\n            boundaries: this,\n            ignoreElementEnd: true\n        });\n    }\n    /**\n\t * Describes whether the range is collapsed, that is if {@link #start} and\n\t * {@link #end} positions are equal.\n\t */ get isCollapsed() {\n        return this.start.isEqual(this.end);\n    }\n    /**\n\t * Describes whether this range is flat, that is if {@link #start} position and\n\t * {@link #end} position are in the same {@link module:engine/model/position~Position#parent}.\n\t */ get isFlat() {\n        const startParentPath = this.start.getParentPath();\n        const endParentPath = this.end.getParentPath();\n        return compareArrays(startParentPath, endParentPath) == 'same';\n    }\n    /**\n\t * Range root element.\n\t */ get root() {\n        return this.start.root;\n    }\n    /**\n\t * Checks whether this range contains given {@link module:engine/model/position~Position position}.\n\t *\n\t * @param position Position to check.\n\t * @returns `true` if given {@link module:engine/model/position~Position position} is contained\n\t * in this range,`false` otherwise.\n\t */ containsPosition(position) {\n        return position.isAfter(this.start) && position.isBefore(this.end);\n    }\n    /**\n\t * Checks whether this range contains given {@link ~Range range}.\n\t *\n\t * @param otherRange Range to check.\n\t * @param loose Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t * start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t * even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t * @returns {Boolean} `true` if given {@link ~Range range} boundaries are contained by this range, `false` otherwise.\n\t */ containsRange(otherRange, loose = false) {\n        if (otherRange.isCollapsed) {\n            loose = false;\n        }\n        const containsStart = this.containsPosition(otherRange.start) || loose && this.start.isEqual(otherRange.start);\n        const containsEnd = this.containsPosition(otherRange.end) || loose && this.end.isEqual(otherRange.end);\n        return containsStart && containsEnd;\n    }\n    /**\n\t * Checks whether given {@link module:engine/model/item~Item} is inside this range.\n\t */ containsItem(item) {\n        const pos = Position._createBefore(item);\n        return this.containsPosition(pos) || this.start.isEqual(pos);\n    }\n    /**\n\t * Two ranges are equal if their {@link #start} and {@link #end} positions are equal.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns `true` if ranges are equal, `false` otherwise.\n\t */ isEqual(otherRange) {\n        return this.start.isEqual(otherRange.start) && this.end.isEqual(otherRange.end);\n    }\n    /**\n\t * Checks and returns whether this range intersects with given range.\n\t *\n\t * @param otherRange Range to compare with.\n\t * @returns `true` if ranges intersect, `false` otherwise.\n\t */ isIntersecting(otherRange) {\n        return this.start.isBefore(otherRange.end) && this.end.isAfter(otherRange.start);\n    }\n    /**\n\t * Computes which part(s) of this {@link ~Range range} is not a part of given {@link ~Range range}.\n\t * Returned array contains zero, one or two {@link ~Range ranges}.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t * let transformed = range.getDifference( otherRange );\n\t * // transformed array has no ranges because `otherRange` contains `range`\n\t *\n\t * otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 3 ] ) );\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has one range: from [ 3 ] to [ 4, 0, 1 ]\n\t *\n\t * otherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 4 ] ) );\n\t * transformed = range.getDifference( otherRange );\n\t * // transformed array has two ranges: from [ 2, 7 ] to [ 3 ] and from [ 4 ] to [ 4, 0, 1 ]\n\t * ```\n\t *\n\t * @param otherRange Range to differentiate against.\n\t * @returns The difference between ranges.\n\t */ getDifference(otherRange) {\n        const ranges = [];\n        if (this.isIntersecting(otherRange)) {\n            // Ranges intersect.\n            if (this.containsPosition(otherRange.start)) {\n                // Given range start is inside this range. This means that we have to\n                // add shrunken range - from the start to the middle of this range.\n                ranges.push(new Range(this.start, otherRange.start));\n            }\n            if (this.containsPosition(otherRange.end)) {\n                // Given range end is inside this range. This means that we have to\n                // add shrunken range - from the middle of this range to the end.\n                ranges.push(new Range(otherRange.end, this.end));\n            }\n        } else {\n            // Ranges do not intersect, return the original range.\n            ranges.push(new Range(this.start, this.end));\n        }\n        return ranges;\n    }\n    /**\n\t * Returns an intersection of this {@link ~Range range} and given {@link ~Range range}.\n\t * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let otherRange = model.createRange( model.createPositionFromPath( root, [ 1 ] ), model.createPositionFromPath( root, [ 2 ] ) );\n\t * let transformed = range.getIntersection( otherRange ); // null - ranges have no common part\n\t *\n\t * otherRange = model.createRange( model.createPositionFromPath( root, [ 3 ] ), model.createPositionFromPath( root, [ 5 ] ) );\n\t * transformed = range.getIntersection( otherRange ); // range from [ 3 ] to [ 4, 0, 1 ]\n\t * ```\n\t *\n\t * @param otherRange Range to check for intersection.\n\t * @returns A common part of given ranges or `null` if ranges have no common part.\n\t */ getIntersection(otherRange) {\n        if (this.isIntersecting(otherRange)) {\n            // Ranges intersect, so a common range will be returned.\n            // At most, it will be same as this range.\n            let commonRangeStart = this.start;\n            let commonRangeEnd = this.end;\n            if (this.containsPosition(otherRange.start)) {\n                // Given range start is inside this range. This means thaNt we have to\n                // shrink common range to the given range start.\n                commonRangeStart = otherRange.start;\n            }\n            if (this.containsPosition(otherRange.end)) {\n                // Given range end is inside this range. This means that we have to\n                // shrink common range to the given range end.\n                commonRangeEnd = otherRange.end;\n            }\n            return new Range(commonRangeStart, commonRangeEnd);\n        }\n        // Ranges do not intersect, so they do not have common part.\n        return null;\n    }\n    /**\n\t * Returns a range created by joining this {@link ~Range range} with the given {@link ~Range range}.\n\t * If ranges have no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let otherRange = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 1 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 2 ] )\n \t * );\n\t * let transformed = range.getJoined( otherRange ); // null - ranges have no common part\n\t *\n\t * otherRange = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 3 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 5 ] )\n\t * );\n\t * transformed = range.getJoined( otherRange ); // range from [ 2, 7 ] to [ 5 ]\n\t * ```\n\t *\n\t * @param otherRange Range to be joined.\n\t * @param loose Whether the intersection check is loose or strict. If the check is strict (`false`),\n\t * ranges are tested for intersection or whether start/end positions are equal. If the check is loose (`true`),\n\t * compared range is also checked if it's {@link module:engine/model/position~Position#isTouching touching} current range.\n\t * @returns A sum of given ranges or `null` if ranges have no common part.\n\t */ getJoined(otherRange, loose = false) {\n        let shouldJoin = this.isIntersecting(otherRange);\n        if (!shouldJoin) {\n            if (this.start.isBefore(otherRange.start)) {\n                shouldJoin = loose ? this.end.isTouching(otherRange.start) : this.end.isEqual(otherRange.start);\n            } else {\n                shouldJoin = loose ? otherRange.end.isTouching(this.start) : otherRange.end.isEqual(this.start);\n            }\n        }\n        if (!shouldJoin) {\n            return null;\n        }\n        let startPosition = this.start;\n        let endPosition = this.end;\n        if (otherRange.start.isBefore(startPosition)) {\n            startPosition = otherRange.start;\n        }\n        if (otherRange.end.isAfter(endPosition)) {\n            endPosition = otherRange.end;\n        }\n        return new Range(startPosition, endPosition);\n    }\n    /**\n\t * Computes and returns the smallest set of {@link #isFlat flat} ranges, that covers this range in whole.\n\t *\n\t * See an example of a model structure (`[` and `]` are range boundaries):\n\t *\n\t * ```\n\t * root                                                            root\n\t *  |- element DIV                         DIV             P2              P3             DIV\n\t *  |   |- element H                   H        P1        f o o           b a r       H         P4\n\t *  |   |   |- \"fir[st\"             fir[st     lorem                               se]cond     ipsum\n\t *  |   |- element P1\n\t *  |   |   |- \"lorem\"                                              ||\n\t *  |- element P2                                                   ||\n\t *  |   |- \"foo\"                                                    VV\n\t *  |- element P3\n\t *  |   |- \"bar\"                                                   root\n\t *  |- element DIV                         DIV             [P2             P3]             DIV\n\t *  |   |- element H                   H       [P1]       f o o           b a r        H         P4\n\t *  |   |   |- \"se]cond\"            fir[st]    lorem                               [se]cond     ipsum\n\t *  |   |- element P4\n\t *  |   |   |- \"ipsum\"\n\t * ```\n\t *\n\t * As it can be seen, letters contained in the range are: `stloremfoobarse`, spread across different parents.\n\t * We are looking for minimal set of flat ranges that contains the same nodes.\n\t *\n\t * Minimal flat ranges for above range `( [ 0, 0, 3 ], [ 3, 0, 2 ] )` will be:\n\t *\n\t * ```\n\t * ( [ 0, 0, 3 ], [ 0, 0, 5 ] ) = \"st\"\n\t * ( [ 0, 1 ], [ 0, 2 ] ) = element P1 (\"lorem\")\n\t * ( [ 1 ], [ 3 ] ) = element P2, element P3 (\"foobar\")\n\t * ( [ 3, 0, 0 ], [ 3, 0, 2 ] ) = \"se\"\n\t * ```\n\t *\n\t * **Note:** if an {@link module:engine/model/element~Element element} is not wholly contained in this range, it won't be returned\n\t * in any of the returned flat ranges. See in the example how `H` elements at the beginning and at the end of the range\n\t * were omitted. Only their parts that were wholly in the range were returned.\n\t *\n\t * **Note:** this method is not returning flat ranges that contain no nodes.\n\t *\n\t * @returns Array of flat ranges covering this range.\n\t */ getMinimalFlatRanges() {\n        const ranges = [];\n        const diffAt = this.start.getCommonPath(this.end).length;\n        const pos = Position._createAt(this.start);\n        let posParent = pos.parent;\n        // Go up.\n        while(pos.path.length > diffAt + 1){\n            const howMany = posParent.maxOffset - pos.offset;\n            if (howMany !== 0) {\n                ranges.push(new Range(pos, pos.getShiftedBy(howMany)));\n            }\n            pos.path = pos.path.slice(0, -1);\n            pos.offset++;\n            posParent = posParent.parent;\n        }\n        // Go down.\n        while(pos.path.length <= this.end.path.length){\n            const offset = this.end.path[pos.path.length - 1];\n            const howMany = offset - pos.offset;\n            if (howMany !== 0) {\n                ranges.push(new Range(pos, pos.getShiftedBy(howMany)));\n            }\n            pos.offset = offset;\n            pos.path.push(0);\n        }\n        return ranges;\n    }\n    /**\n\t * Creates a {@link module:engine/model/treewalker~TreeWalker TreeWalker} instance with this range as a boundary.\n\t *\n\t * For example, to iterate over all items in the entire document root:\n\t *\n\t * ```ts\n\t * // Create a range spanning over the entire root content:\n\t * const range = editor.model.createRangeIn( editor.model.document.getRoot() );\n\t *\n\t * // Iterate over all items in this range:\n\t * for ( const value of range.getWalker() ) {\n\t * \tconsole.log( value.item );\n\t * }\n\t * ```\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t */ getWalker(options = {}) {\n        options.boundaries = this;\n        return new TreeWalker(options);\n    }\n    /**\n\t * Returns an iterator that iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n\t * set to `true`. However it returns only {@link module:engine/model/item~Item model items},\n\t * not {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t */ *getItems(options = {}) {\n        options.boundaries = this;\n        options.ignoreElementEnd = true;\n        const treeWalker = new TreeWalker(options);\n        for (const value of treeWalker){\n            yield value.item;\n        }\n    }\n    /**\n\t * Returns an iterator that iterates over all {@link module:engine/model/position~Position positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/model/position~Position positions}, not {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t */ *getPositions(options = {}) {\n        options.boundaries = this;\n        const treeWalker = new TreeWalker(options);\n        yield treeWalker.position;\n        for (const value of treeWalker){\n            yield value.nextPosition;\n        }\n    }\n    /**\n\t * Returns a range that is a result of transforming this range by given `operation`.\n\t *\n\t * **Note:** transformation may break one range into multiple ranges (for example, when a part of the range is\n\t * moved to a different part of document tree). For this reason, an array is returned by this method and it\n\t * may contain one or more `Range` instances.\n\t *\n\t * @param operation Operation to transform range by.\n\t * @returns Range which is the result of transformation.\n\t */ getTransformedByOperation(operation) {\n        switch(operation.type){\n            case 'insert':\n                return this._getTransformedByInsertOperation(operation);\n            case 'move':\n            case 'remove':\n            case 'reinsert':\n                return this._getTransformedByMoveOperation(operation);\n            case 'split':\n                return [\n                    this._getTransformedBySplitOperation(operation)\n                ];\n            case 'merge':\n                return [\n                    this._getTransformedByMergeOperation(operation)\n                ];\n        }\n        return [\n            new Range(this.start, this.end)\n        ];\n    }\n    /**\n\t * Returns a range that is a result of transforming this range by multiple `operations`.\n\t *\n\t * @see ~Range#getTransformedByOperation\n\t * @param operations Operations to transform the range by.\n\t * @returns Range which is the result of transformation.\n\t */ getTransformedByOperations(operations) {\n        const ranges = [\n            new Range(this.start, this.end)\n        ];\n        for (const operation of operations){\n            for(let i = 0; i < ranges.length; i++){\n                const result = ranges[i].getTransformedByOperation(operation);\n                ranges.splice(i, 1, ...result);\n                i += result.length - 1;\n            }\n        }\n        // It may happen that a range is split into two, and then the part of second \"piece\" is moved into first\n        // \"piece\". In this case we will have incorrect third range, which should not be included in the result --\n        // because it is already included in the first \"piece\". In this loop we are looking for all such ranges that\n        // are inside other ranges and we simply remove them.\n        for(let i = 0; i < ranges.length; i++){\n            const range = ranges[i];\n            for(let j = i + 1; j < ranges.length; j++){\n                const next = ranges[j];\n                if (range.containsRange(next) || next.containsRange(range) || range.isEqual(next)) {\n                    ranges.splice(j, 1);\n                }\n            }\n        }\n        return ranges;\n    }\n    /**\n\t * Returns an {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of the range's both ends (in which the entire range is contained).\n\t */ getCommonAncestor() {\n        return this.start.getCommonAncestor(this.end);\n    }\n    /**\n\t * Returns an {@link module:engine/model/element~Element Element} contained by the range.\n\t * The element will be returned when it is the **only** node within the range and **fully–contained**\n\t * at the same time.\n\t */ getContainedElement() {\n        if (this.isCollapsed) {\n            return null;\n        }\n        const nodeAfterStart = this.start.nodeAfter;\n        const nodeBeforeEnd = this.end.nodeBefore;\n        if (nodeAfterStart && nodeAfterStart.is('element') && nodeAfterStart === nodeBeforeEnd) {\n            return nodeAfterStart;\n        }\n        return null;\n    }\n    /**\n\t * Converts `Range` to plain object and returns it.\n\t *\n\t * @returns `Node` converted to plain object.\n\t */ toJSON() {\n        return {\n            start: this.start.toJSON(),\n            end: this.end.toJSON()\n        };\n    }\n    /**\n\t * Returns a new range that is equal to current range.\n\t */ clone() {\n        return new this.constructor(this.start, this.end);\n    }\n    /**\n\t * Returns a result of transforming a copy of this range by insert operation.\n\t *\n\t * One or more ranges may be returned as a result of this transformation.\n\t *\n\t * @internal\n\t */ _getTransformedByInsertOperation(operation, spread = false) {\n        return this._getTransformedByInsertion(operation.position, operation.howMany, spread);\n    }\n    /**\n\t * Returns a result of transforming a copy of this range by move operation.\n\t *\n\t * One or more ranges may be returned as a result of this transformation.\n\t *\n\t * @internal\n\t */ _getTransformedByMoveOperation(operation, spread = false) {\n        const sourcePosition = operation.sourcePosition;\n        const howMany = operation.howMany;\n        const targetPosition = operation.targetPosition;\n        return this._getTransformedByMove(sourcePosition, targetPosition, howMany, spread);\n    }\n    /**\n\t * Returns a result of transforming a copy of this range by split operation.\n\t *\n\t * Always one range is returned. The transformation is done in a way to not break the range.\n\t *\n\t * @internal\n\t */ _getTransformedBySplitOperation(operation) {\n        const start = this.start._getTransformedBySplitOperation(operation);\n        let end = this.end._getTransformedBySplitOperation(operation);\n        if (this.end.isEqual(operation.insertionPosition)) {\n            end = this.end.getShiftedBy(1);\n        }\n        // Below may happen when range contains graveyard element used by split operation.\n        if (start.root != end.root) {\n            // End position was next to the moved graveyard element and was moved with it.\n            // Fix it by using old `end` which has proper `root`.\n            end = this.end.getShiftedBy(-1);\n        }\n        return new Range(start, end);\n    }\n    /**\n\t * Returns a result of transforming a copy of this range by merge operation.\n\t *\n\t * Always one range is returned. The transformation is done in a way to not break the range.\n\t *\n\t * @internal\n\t */ _getTransformedByMergeOperation(operation) {\n        // Special case when the marker is set on \"the closing tag\" of an element. Marker can be set like that during\n        // transformations, especially when a content of a few block elements were removed. For example:\n        //\n        // {} is the transformed range, [] is the removed range.\n        // <p>F[o{o</p><p>B}ar</p><p>Xy]z</p>\n        //\n        // <p>Fo{o</p><p>B}ar</p><p>z</p>\n        // <p>F{</p><p>B}ar</p><p>z</p>\n        // <p>F{</p>}<p>z</p>\n        // <p>F{}z</p>\n        //\n        if (this.start.isEqual(operation.targetPosition) && this.end.isEqual(operation.deletionPosition)) {\n            return new Range(this.start);\n        }\n        let start = this.start._getTransformedByMergeOperation(operation);\n        let end = this.end._getTransformedByMergeOperation(operation);\n        if (start.root != end.root) {\n            // This happens when the end position was next to the merged (deleted) element.\n            // Then, the end position was moved to the graveyard root. In this case we need to fix\n            // the range cause its boundaries would be in different roots.\n            end = this.end.getShiftedBy(-1);\n        }\n        if (start.isAfter(end)) {\n            // This happens in three following cases:\n            //\n            // Case 1: Merge operation source position is before the target position (due to some transformations, OT, etc.)\n            //         This means that start can be moved before the end of the range.\n            //\n            // Before: <p>a{a</p><p>b}b</p><p>cc</p>\n            // Merge:  <p>b}b</p><p>cca{a</p>\n            // Fix:    <p>{b}b</p><p>ccaa</p>\n            //\n            // Case 2: Range start is before merged node but not directly.\n            //         Result should include all nodes that were in the original range.\n            //\n            // Before: <p>aa</p>{<p>cc</p><p>b}b</p>\n            // Merge:  <p>aab}b</p>{<p>cc</p>\n            // Fix:    <p>aa{bb</p><p>cc</p>}\n            //\n            //         The range is expanded by an additional `b` letter but it is better than dropping the whole `cc` paragraph.\n            //\n            // Case 3: Range start is directly before merged node.\n            //         Resulting range should include only nodes from the merged element:\n            //\n            // Before: <p>aa</p>{<p>b}b</p><p>cc</p>\n            // Merge:  <p>aab}b</p>{<p>cc</p>\n            // Fix:    <p>aa{b}b</p><p>cc</p>\n            //\n            if (operation.sourcePosition.isBefore(operation.targetPosition)) {\n                // Case 1.\n                start = Position._createAt(end);\n                start.offset = 0;\n            } else {\n                if (!operation.deletionPosition.isEqual(start)) {\n                    // Case 2.\n                    end = operation.deletionPosition;\n                }\n                // In both case 2 and 3 start is at the end of the merge-to element.\n                start = operation.targetPosition;\n            }\n            return new Range(start, end);\n        }\n        return new Range(start, end);\n    }\n    /**\n\t * Returns an array containing one or two {@link ~Range ranges} that are a result of transforming this\n\t * {@link ~Range range} by inserting `howMany` nodes at `insertPosition`. Two {@link ~Range ranges} are\n\t * returned if the insertion was inside this {@link ~Range range} and `spread` is set to `true`.\n\t *\n\t * Examples:\n\t *\n\t * ```ts\n\t * let range = model.createRange(\n\t * \tmodel.createPositionFromPath( root, [ 2, 7 ] ),\n\t * \tmodel.createPositionFromPath( root, [ 4, 0, 1 ] )\n\t * );\n\t * let transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 1 ] ), 2 );\n\t * // transformed array has one range from [ 4, 7 ] to [ 6, 0, 1 ]\n\t *\n\t * transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 4, 0, 0 ] ), 4 );\n\t * // transformed array has one range from [ 2, 7 ] to [ 4, 0, 5 ]\n\t *\n\t * transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4 );\n\t * // transformed array has one range, which is equal to original range\n\t *\n\t * transformed = range._getTransformedByInsertion( model.createPositionFromPath( root, [ 3, 2 ] ), 4, true );\n\t * // transformed array has two ranges: from [ 2, 7 ] to [ 3, 2 ] and from [ 3, 6 ] to [ 4, 0, 1 ]\n\t * ```\n\t *\n\t * @internal\n\t * @param insertPosition Position where nodes are inserted.\n\t * @param howMany How many nodes are inserted.\n\t * @param spread Flag indicating whether this range should be spread if insertion\n\t * was inside the range. Defaults to `false`.\n\t * @returns Result of the transformation.\n\t */ _getTransformedByInsertion(insertPosition, howMany, spread = false) {\n        if (spread && this.containsPosition(insertPosition)) {\n            // Range has to be spread. The first part is from original start to the spread point.\n            // The other part is from spread point to the original end, but transformed by\n            // insertion to reflect insertion changes.\n            return [\n                new Range(this.start, insertPosition),\n                new Range(insertPosition.getShiftedBy(howMany), this.end._getTransformedByInsertion(insertPosition, howMany))\n            ];\n        } else {\n            const range = new Range(this.start, this.end);\n            range.start = range.start._getTransformedByInsertion(insertPosition, howMany);\n            range.end = range.end._getTransformedByInsertion(insertPosition, howMany);\n            return [\n                range\n            ];\n        }\n    }\n    /**\n\t * Returns an array containing {@link ~Range ranges} that are a result of transforming this\n\t * {@link ~Range range} by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @internal\n\t * @param sourcePosition Position from which nodes are moved.\n\t * @param targetPosition Position to where nodes are moved.\n\t * @param howMany How many nodes are moved.\n\t * @param spread Whether the range should be spread if the move points inside the range.\n\t * @returns  Result of the transformation.\n\t */ _getTransformedByMove(sourcePosition, targetPosition, howMany, spread = false) {\n        // Special case for transforming a collapsed range. Just transform it like a position.\n        if (this.isCollapsed) {\n            const newPos = this.start._getTransformedByMove(sourcePosition, targetPosition, howMany);\n            return [\n                new Range(newPos)\n            ];\n        }\n        // Special case for transformation when a part of the range is moved towards the range.\n        //\n        // Examples:\n        //\n        // <div><p>ab</p><p>c[d</p></div><p>e]f</p> --> <div><p>ab</p></div><p>c[d</p><p>e]f</p>\n        // <p>e[f</p><div><p>a]b</p><p>cd</p></div> --> <p>e[f</p><p>a]b</p><div><p>cd</p></div>\n        //\n        // Without this special condition, the default algorithm leaves an \"artifact\" range from one of `differenceSet` parts:\n        //\n        // <div><p>ab</p><p>c[d</p></div><p>e]f</p> --> <div><p>ab</p>{</div>}<p>c[d</p><p>e]f</p>\n        //\n        // This special case is applied only if the range is to be kept together (not spread).\n        const moveRange = Range._createFromPositionAndShift(sourcePosition, howMany);\n        const insertPosition = targetPosition._getTransformedByDeletion(sourcePosition, howMany);\n        if (this.containsPosition(targetPosition) && !spread) {\n            if (moveRange.containsPosition(this.start) || moveRange.containsPosition(this.end)) {\n                const start = this.start._getTransformedByMove(sourcePosition, targetPosition, howMany);\n                const end = this.end._getTransformedByMove(sourcePosition, targetPosition, howMany);\n                return [\n                    new Range(start, end)\n                ];\n            }\n        }\n        // Default algorithm.\n        let result;\n        const differenceSet = this.getDifference(moveRange);\n        let difference = null;\n        const common = this.getIntersection(moveRange);\n        if (differenceSet.length == 1) {\n            // `moveRange` and this range may intersect but may be separate.\n            difference = new Range(differenceSet[0].start._getTransformedByDeletion(sourcePosition, howMany), differenceSet[0].end._getTransformedByDeletion(sourcePosition, howMany));\n        } else if (differenceSet.length == 2) {\n            // `moveRange` is inside this range.\n            difference = new Range(this.start, this.end._getTransformedByDeletion(sourcePosition, howMany));\n        } // else, `moveRange` contains this range.\n        if (difference) {\n            result = difference._getTransformedByInsertion(insertPosition, howMany, common !== null || spread);\n        } else {\n            result = [];\n        }\n        if (common) {\n            const transformedCommon = new Range(common.start._getCombined(moveRange.start, insertPosition), common.end._getCombined(moveRange.start, insertPosition));\n            if (result.length == 2) {\n                result.splice(1, 0, transformedCommon);\n            } else {\n                result.push(transformedCommon);\n            }\n        }\n        return result;\n    }\n    /**\n\t * Returns a copy of this range that is transformed by deletion of `howMany` nodes from `deletePosition`.\n\t *\n\t * If the deleted range is intersecting with the transformed range, the transformed range will be shrank.\n\t *\n\t * If the deleted range contains transformed range, `null` will be returned.\n\t *\n\t * @internal\n\t * @param deletionPosition Position from which nodes are removed.\n\t * @param howMany How many nodes are removed.\n\t * @returns Result of the transformation.\n\t */ _getTransformedByDeletion(deletePosition, howMany) {\n        let newStart = this.start._getTransformedByDeletion(deletePosition, howMany);\n        let newEnd = this.end._getTransformedByDeletion(deletePosition, howMany);\n        if (newStart == null && newEnd == null) {\n            return null;\n        }\n        if (newStart == null) {\n            newStart = deletePosition;\n        }\n        if (newEnd == null) {\n            newEnd = deletePosition;\n        }\n        return new Range(newStart, newEnd);\n    }\n    /**\n\t * Creates a new range, spreading from specified {@link module:engine/model/position~Position position} to a position moved by\n\t * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t *\n\t * @internal\n\t * @param position Beginning of the range.\n\t * @param shift How long the range should be.\n\t */ static _createFromPositionAndShift(position, shift) {\n        const start = position;\n        const end = position.getShiftedBy(shift);\n        return shift > 0 ? new this(start, end) : new this(end, start);\n    }\n    /**\n\t * Creates a range inside an {@link module:engine/model/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @internal\n\t * @param element Element which is a parent for the range.\n\t */ static _createIn(element) {\n        return new this(Position._createAt(element, 0), Position._createAt(element, element.maxOffset));\n    }\n    /**\n\t * Creates a range that starts before given {@link module:engine/model/item~Item model item} and ends after it.\n\t *\n\t * @internal\n\t */ static _createOn(item) {\n        return this._createFromPositionAndShift(Position._createBefore(item), item.offsetSize);\n    }\n    /**\n\t * Combines all ranges from the passed array into a one range. At least one range has to be passed.\n\t * Passed ranges must not have common parts.\n\t *\n\t * The first range from the array is a reference range. If other ranges start or end on the exactly same position where\n\t * the reference range, they get combined into one range.\n\t *\n\t * ```\n\t * [  ][]  [    ][ ][             ][ ][]  [  ]  // Passed ranges, shown sorted\n\t * [    ]                                       // The result of the function if the first range was a reference range.\n\t *         [                           ]        // The result of the function if the third-to-seventh range was a reference range.\n\t *                                        [  ]  // The result of the function if the last range was a reference range.\n\t * ```\n\t *\n\t * @internal\n\t * @param ranges Ranges to combine.\n\t * @returns Combined range.\n\t */ static _createFromRanges(ranges) {\n        if (ranges.length === 0) {\n            /**\n\t\t\t * At least one range has to be passed to\n\t\t\t * {@link module:engine/model/range~Range._createFromRanges `Range._createFromRanges()`}.\n\t\t\t *\n\t\t\t * @error range-create-from-ranges-empty-array\n\t\t\t */ throw new CKEditorError('range-create-from-ranges-empty-array', null);\n        } else if (ranges.length == 1) {\n            return ranges[0].clone();\n        }\n        // 1. Set the first range in `ranges` array as a reference range.\n        // If we are going to return just a one range, one of the ranges need to be the reference one.\n        // Other ranges will be stuck to that range, if possible.\n        const ref = ranges[0];\n        // 2. Sort all the ranges so it's easier to process them.\n        ranges.sort((a, b)=>{\n            return a.start.isAfter(b.start) ? 1 : -1;\n        });\n        // 3. Check at which index the reference range is now.\n        const refIndex = ranges.indexOf(ref);\n        // 4. At this moment we don't need the original range.\n        // We are going to modify the result and we need to return a new instance of Range.\n        // We have to create a copy of the reference range.\n        const result = new this(ref.start, ref.end);\n        // 5. Ranges should be checked and glued starting from the range that is closest to the reference range.\n        // Since ranges are sorted, start with the range with index that is closest to reference range index.\n        if (refIndex > 0) {\n            // eslint-disable-next-line no-constant-condition\n            for(let i = refIndex - 1; true; i++){\n                if (ranges[i].end.isEqual(result.start)) {\n                    result.start = Position._createAt(ranges[i].start);\n                } else {\n                    break;\n                }\n            }\n        }\n        // 6. Ranges should be checked and glued starting from the range that is closest to the reference range.\n        // Since ranges are sorted, start with the range with index that is closest to reference range index.\n        for(let i = refIndex + 1; i < ranges.length; i++){\n            if (ranges[i].start.isEqual(result.end)) {\n                result.end = Position._createAt(ranges[i].end);\n            } else {\n                break;\n            }\n        }\n        return result;\n    }\n    /**\n\t * Creates a `Range` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param json Plain object to be converted to `Range`.\n\t * @param doc Document object that will be range owner.\n\t * @returns `Range` instance created using given plain object.\n\t */ static fromJSON(json, doc) {\n        return new this(Position.fromJSON(json.start, doc), Position.fromJSON(json.end, doc));\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nRange.prototype.is = function(type) {\n    return type === 'range' || type === 'model:range';\n};\n\n/**\n * Maps elements, positions and markers between the {@link module:engine/view/document~Document view} and\n * the {@link module:engine/model/model model}.\n *\n * The instance of the Mapper used for the editing pipeline is available in\n * {@link module:engine/controller/editingcontroller~EditingController#mapper `editor.editing.mapper`}.\n *\n * Mapper uses bound elements to find corresponding elements and positions, so, to get proper results,\n * all model elements should be {@link module:engine/conversion/mapper~Mapper#bindElements bound}.\n *\n * To map the complex model to/from view relations, you may provide custom callbacks for the\n * {@link module:engine/conversion/mapper~Mapper#event:modelToViewPosition modelToViewPosition event} and\n * {@link module:engine/conversion/mapper~Mapper#event:viewToModelPosition viewToModelPosition event} that are fired whenever\n * a position mapping request occurs.\n * Those events are fired by the {@link module:engine/conversion/mapper~Mapper#toViewPosition toViewPosition}\n * and {@link module:engine/conversion/mapper~Mapper#toModelPosition toModelPosition} methods. `Mapper` adds its own default callbacks\n * with `'lowest'` priority. To override default `Mapper` mapping, add custom callback with higher priority and\n * stop the event.\n */ class Mapper extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * Model element to view element mapping.\n\t */ _modelToViewMapping = new WeakMap();\n    /**\n\t * View element to model element mapping.\n\t */ _viewToModelMapping = new WeakMap();\n    /**\n\t * A map containing callbacks between view element names and functions evaluating length of view elements\n\t * in model.\n\t */ _viewToModelLengthCallbacks = new Map();\n    /**\n\t * Model marker name to view elements mapping.\n\t *\n\t * Keys are `String`s while values are `Set`s with {@link module:engine/view/element~Element view elements}.\n\t * One marker (name) can be mapped to multiple elements.\n\t */ _markerNameToElements = new Map();\n    /**\n\t * View element to model marker names mapping.\n\t *\n\t * This is reverse to {@link ~Mapper#_markerNameToElements} map.\n\t */ _elementToMarkerNames = new Map();\n    /**\n\t * The map of removed view elements with their current root (used for deferred unbinding).\n\t */ _deferredBindingRemovals = new Map();\n    /**\n\t * Stores marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t * has been removed, moved or renamed).\n\t */ _unboundMarkerNames = new Set();\n    /**\n\t * Creates an instance of the mapper.\n\t */ constructor(){\n        super();\n        // Default mapper algorithm for mapping model position to view position.\n        this.on('modelToViewPosition', (evt, data)=>{\n            if (data.viewPosition) {\n                return;\n            }\n            const viewContainer = this._modelToViewMapping.get(data.modelPosition.parent);\n            if (!viewContainer) {\n                /**\n\t\t\t\t * A model position could not be mapped to the view because the parent of the model position\n\t\t\t\t * does not have a mapped view element (might have not been converted yet or it has no converter).\n\t\t\t\t *\n\t\t\t\t * Make sure that the model element is correctly converted to the view.\n\t\t\t\t *\n\t\t\t\t * @error mapping-model-position-view-parent-not-found\n\t\t\t\t */ throw new CKEditorError('mapping-model-position-view-parent-not-found', this, {\n                    modelPosition: data.modelPosition\n                });\n            }\n            data.viewPosition = this.findPositionIn(viewContainer, data.modelPosition.offset);\n        }, {\n            priority: 'low'\n        });\n        // Default mapper algorithm for mapping view position to model position.\n        this.on('viewToModelPosition', (evt, data)=>{\n            if (data.modelPosition) {\n                return;\n            }\n            const viewBlock = this.findMappedViewAncestor(data.viewPosition);\n            const modelParent = this._viewToModelMapping.get(viewBlock);\n            const modelOffset = this._toModelOffset(data.viewPosition.parent, data.viewPosition.offset, viewBlock);\n            data.modelPosition = Position._createAt(modelParent, modelOffset);\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * Marks model and view elements as corresponding. Corresponding elements can be retrieved by using\n\t * the {@link module:engine/conversion/mapper~Mapper#toModelElement toModelElement} and\n\t * {@link module:engine/conversion/mapper~Mapper#toViewElement toViewElement} methods.\n\t * The information that elements are bound is also used to translate positions.\n\t *\n\t * @param modelElement Model element.\n\t * @param viewElement View element.\n\t */ bindElements(modelElement, viewElement) {\n        this._modelToViewMapping.set(modelElement, viewElement);\n        this._viewToModelMapping.set(viewElement, modelElement);\n    }\n    /**\n\t * Unbinds the given {@link module:engine/view/element~Element view element} from the map.\n\t *\n\t * **Note:** view-to-model binding will be removed, if it existed. However, corresponding model-to-view binding\n\t * will be removed only if model element is still bound to the passed `viewElement`.\n\t *\n\t * This behavior allows for re-binding model element to another view element without fear of losing the new binding\n\t * when the previously bound view element is unbound.\n\t *\n\t * @param viewElement View element to unbind.\n\t * @param options The options object.\n\t * @param options.defer Controls whether the binding should be removed immediately or deferred until a\n\t * {@link #flushDeferredBindings `flushDeferredBindings()`} call.\n\t */ unbindViewElement(viewElement, options = {}) {\n        const modelElement = this.toModelElement(viewElement);\n        if (this._elementToMarkerNames.has(viewElement)) {\n            for (const markerName of this._elementToMarkerNames.get(viewElement)){\n                this._unboundMarkerNames.add(markerName);\n            }\n        }\n        if (options.defer) {\n            this._deferredBindingRemovals.set(viewElement, viewElement.root);\n        } else {\n            this._viewToModelMapping.delete(viewElement);\n            if (this._modelToViewMapping.get(modelElement) == viewElement) {\n                this._modelToViewMapping.delete(modelElement);\n            }\n        }\n    }\n    /**\n\t * Unbinds the given {@link module:engine/model/element~Element model element} from the map.\n\t *\n\t * **Note:** the model-to-view binding will be removed, if it existed. However, the corresponding view-to-model binding\n\t * will be removed only if the view element is still bound to the passed `modelElement`.\n\t *\n\t * This behavior lets for re-binding view element to another model element without fear of losing the new binding\n\t * when the previously bound model element is unbound.\n\t *\n\t * @param modelElement Model element to unbind.\n\t */ unbindModelElement(modelElement) {\n        const viewElement = this.toViewElement(modelElement);\n        this._modelToViewMapping.delete(modelElement);\n        if (this._viewToModelMapping.get(viewElement) == modelElement) {\n            this._viewToModelMapping.delete(viewElement);\n        }\n    }\n    /**\n\t * Binds the given marker name with the given {@link module:engine/view/element~Element view element}. The element\n\t * will be added to the current set of elements bound with the given marker name.\n\t *\n\t * @param element Element to bind.\n\t * @param name Marker name.\n\t */ bindElementToMarker(element, name) {\n        const elements = this._markerNameToElements.get(name) || new Set();\n        elements.add(element);\n        const names = this._elementToMarkerNames.get(element) || new Set();\n        names.add(name);\n        this._markerNameToElements.set(name, elements);\n        this._elementToMarkerNames.set(element, names);\n    }\n    /**\n\t * Unbinds an element from given marker name.\n\t *\n\t * @param element Element to unbind.\n\t * @param name Marker name.\n\t */ unbindElementFromMarkerName(element, name) {\n        const nameToElements = this._markerNameToElements.get(name);\n        if (nameToElements) {\n            nameToElements.delete(element);\n            if (nameToElements.size == 0) {\n                this._markerNameToElements.delete(name);\n            }\n        }\n        const elementToNames = this._elementToMarkerNames.get(element);\n        if (elementToNames) {\n            elementToNames.delete(name);\n            if (elementToNames.size == 0) {\n                this._elementToMarkerNames.delete(element);\n            }\n        }\n    }\n    /**\n\t * Returns all marker names of markers which have changed due to unbinding a view element (so it is assumed that the view element\n\t * has been removed, moved or renamed) since the last flush. After returning, the marker names list is cleared.\n\t */ flushUnboundMarkerNames() {\n        const markerNames = Array.from(this._unboundMarkerNames);\n        this._unboundMarkerNames.clear();\n        return markerNames;\n    }\n    /**\n\t * Unbinds all deferred binding removals of view elements that in the meantime were not re-attached to some root or document fragment.\n\t *\n\t * See: {@link #unbindViewElement `unbindViewElement()`}.\n\t */ flushDeferredBindings() {\n        for (const [viewElement, root] of this._deferredBindingRemovals){\n            // Unbind it only if it wasn't re-attached to some root or document fragment.\n            if (viewElement.root == root) {\n                this.unbindViewElement(viewElement);\n            }\n        }\n        this._deferredBindingRemovals = new Map();\n    }\n    /**\n\t * Removes all model to view and view to model bindings.\n\t */ clearBindings() {\n        this._modelToViewMapping = new WeakMap();\n        this._viewToModelMapping = new WeakMap();\n        this._markerNameToElements = new Map();\n        this._elementToMarkerNames = new Map();\n        this._unboundMarkerNames = new Set();\n        this._deferredBindingRemovals = new Map();\n    }\n    toModelElement(viewElement) {\n        return this._viewToModelMapping.get(viewElement);\n    }\n    toViewElement(modelElement) {\n        return this._modelToViewMapping.get(modelElement);\n    }\n    /**\n\t * Gets the corresponding model range.\n\t *\n\t * @param viewRange View range.\n\t * @returns Corresponding model range.\n\t */ toModelRange(viewRange) {\n        return new Range(this.toModelPosition(viewRange.start), this.toModelPosition(viewRange.end));\n    }\n    /**\n\t * Gets the corresponding view range.\n\t *\n\t * @param modelRange Model range.\n\t * @returns Corresponding view range.\n\t */ toViewRange(modelRange) {\n        return new Range$1(this.toViewPosition(modelRange.start), this.toViewPosition(modelRange.end));\n    }\n    /**\n\t * Gets the corresponding model position.\n\t *\n\t * @fires viewToModelPosition\n\t * @param viewPosition View position.\n\t * @returns Corresponding model position.\n\t */ toModelPosition(viewPosition) {\n        const data = {\n            viewPosition,\n            mapper: this\n        };\n        this.fire('viewToModelPosition', data);\n        return data.modelPosition;\n    }\n    /**\n\t * Gets the corresponding view position.\n\t *\n\t * @fires modelToViewPosition\n\t * @param modelPosition Model position.\n\t * @param options Additional options for position mapping process.\n\t * @param options.isPhantom Should be set to `true` if the model position to map is pointing to a place\n\t * in model tree which no longer exists. For example, it could be an end of a removed model range.\n\t * @returns Corresponding view position.\n\t */ toViewPosition(modelPosition, options = {}) {\n        const data = {\n            modelPosition,\n            mapper: this,\n            isPhantom: options.isPhantom\n        };\n        this.fire('modelToViewPosition', data);\n        return data.viewPosition;\n    }\n    /**\n\t * Gets all view elements bound to the given marker name.\n\t *\n\t * @param name Marker name.\n\t * @returns View elements bound with the given marker name or `null`\n\t * if no elements are bound to the given marker name.\n\t */ markerNameToElements(name) {\n        const boundElements = this._markerNameToElements.get(name);\n        if (!boundElements) {\n            return null;\n        }\n        const elements = new Set();\n        for (const element of boundElements){\n            if (element.is('attributeElement')) {\n                for (const clone of element.getElementsWithSameId()){\n                    elements.add(clone);\n                }\n            } else {\n                elements.add(element);\n            }\n        }\n        return elements;\n    }\n    /**\n\t * Registers a callback that evaluates the length in the model of a view element with the given name.\n\t *\n\t * The callback is fired with one argument, which is a view element instance. The callback is expected to return\n\t * a number representing the length of the view element in the model.\n\t *\n\t * ```ts\n\t * // List item in view may contain nested list, which have other list items. In model though,\n\t * // the lists are represented by flat structure. Because of those differences, length of list view element\n\t * // may be greater than one. In the callback it's checked how many nested list items are in evaluated list item.\n\t *\n\t * function getViewListItemLength( element ) {\n\t * \tlet length = 1;\n\t *\n\t * \tfor ( let child of element.getChildren() ) {\n\t * \t\tif ( child.name == 'ul' || child.name == 'ol' ) {\n\t * \t\t\tfor ( let item of child.getChildren() ) {\n\t * \t\t\t\tlength += getViewListItemLength( item );\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t *\n\t * \treturn length;\n\t * }\n\t *\n\t * mapper.registerViewToModelLength( 'li', getViewListItemLength );\n\t * ```\n\t *\n\t * @param viewElementName Name of view element for which callback is registered.\n\t * @param lengthCallback Function return a length of view element instance in model.\n\t */ registerViewToModelLength(viewElementName, lengthCallback) {\n        this._viewToModelLengthCallbacks.set(viewElementName, lengthCallback);\n    }\n    /**\n\t * For the given `viewPosition`, finds and returns the closest ancestor of this position that has a mapping to\n\t * the model.\n\t *\n\t * @param viewPosition Position for which a mapped ancestor should be found.\n\t */ findMappedViewAncestor(viewPosition) {\n        let parent = viewPosition.parent;\n        while(!this._viewToModelMapping.has(parent)){\n            parent = parent.parent;\n        }\n        return parent;\n    }\n    /**\n\t * Calculates model offset based on the view position and the block element.\n\t *\n\t * Example:\n\t *\n\t * ```html\n\t * <p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, p ) -> 5\n\t * ```\n\t *\n\t * Is a sum of:\n\t *\n\t * ```html\n\t * <p>foo|<b>bar</b></p> // _toModelOffset( p, 3, p ) -> 3\n\t * <p>foo<b>ba|r</b></p> // _toModelOffset( b, 2, b ) -> 2\n\t * ```\n\t *\n\t * @param viewParent Position parent.\n\t * @param viewOffset Position offset.\n\t * @param viewBlock Block used as a base to calculate offset.\n\t * @returns Offset in the model.\n\t */ _toModelOffset(viewParent, viewOffset, viewBlock) {\n        if (viewBlock != viewParent) {\n            // See example.\n            const offsetToParentStart = this._toModelOffset(viewParent.parent, viewParent.index, viewBlock);\n            const offsetInParent = this._toModelOffset(viewParent, viewOffset, viewParent);\n            return offsetToParentStart + offsetInParent;\n        }\n        // viewBlock == viewParent, so we need to calculate the offset in the parent element.\n        // If the position is a text it is simple (\"ba|r\" -> 2).\n        if (viewParent.is('$text')) {\n            return viewOffset;\n        }\n        // If the position is in an element we need to sum lengths of siblings ( <b> bar </b> foo | -> 3 + 3 = 6 ).\n        let modelOffset = 0;\n        for(let i = 0; i < viewOffset; i++){\n            modelOffset += this.getModelLength(viewParent.getChild(i));\n        }\n        return modelOffset;\n    }\n    /**\n\t * Gets the length of the view element in the model.\n\t *\n\t * The length is calculated as follows:\n\t * * if a {@link #registerViewToModelLength length mapping callback} is provided for the given `viewNode`, it is used to\n\t * evaluate the model length (`viewNode` is used as first and only parameter passed to the callback),\n\t * * length of a {@link module:engine/view/text~Text text node} is equal to the length of its\n\t * {@link module:engine/view/text~Text#data data},\n\t * * length of a {@link module:engine/view/uielement~UIElement ui element} is equal to 0,\n\t * * length of a mapped {@link module:engine/view/element~Element element} is equal to 1,\n\t * * length of a non-mapped {@link module:engine/view/element~Element element} is equal to the length of its children.\n\t *\n\t * Examples:\n\t *\n\t * ```\n\t * foo                          -> 3 // Text length is equal to its data length.\n\t * <p>foo</p>                   -> 1 // Length of an element which is mapped is by default equal to 1.\n\t * <b>foo</b>                   -> 3 // Length of an element which is not mapped is a length of its children.\n\t * <div><p>x</p><p>y</p></div>  -> 2 // Assuming that <div> is not mapped and <p> are mapped.\n\t * ```\n\t *\n\t * @param viewNode View node.\n\t * @returns Length of the node in the tree model.\n\t */ getModelLength(viewNode) {\n        if (this._viewToModelLengthCallbacks.get(viewNode.name)) {\n            const callback = this._viewToModelLengthCallbacks.get(viewNode.name);\n            return callback(viewNode);\n        } else if (this._viewToModelMapping.has(viewNode)) {\n            return 1;\n        } else if (viewNode.is('$text')) {\n            return viewNode.data.length;\n        } else if (viewNode.is('uiElement')) {\n            return 0;\n        } else {\n            let len = 0;\n            for (const child of viewNode.getChildren()){\n                len += this.getModelLength(child);\n            }\n            return len;\n        }\n    }\n    /**\n\t * Finds the position in the view node (or in its children) with the expected model offset.\n\t *\n\t * Example:\n\t *\n\t * ```\n\t * <p>fo<b>bar</b>bom</p> -> expected offset: 4\n\t *\n\t * findPositionIn( p, 4 ):\n\t * <p>|fo<b>bar</b>bom</p> -> expected offset: 4, actual offset: 0\n\t * <p>fo|<b>bar</b>bom</p> -> expected offset: 4, actual offset: 2\n\t * <p>fo<b>bar</b>|bom</p> -> expected offset: 4, actual offset: 5 -> we are too far\n\t *\n\t * findPositionIn( b, 4 - ( 5 - 3 ) ):\n\t * <p>fo<b>|bar</b>bom</p> -> expected offset: 2, actual offset: 0\n\t * <p>fo<b>bar|</b>bom</p> -> expected offset: 2, actual offset: 3 -> we are too far\n\t *\n\t * findPositionIn( bar, 2 - ( 3 - 3 ) ):\n\t * We are in the text node so we can simple find the offset.\n\t * <p>fo<b>ba|r</b>bom</p> -> expected offset: 2, actual offset: 2 -> position found\n\t * ```\n\t *\n\t * @param viewParent Tree view element in which we are looking for the position.\n\t * @param expectedOffset Expected offset.\n\t * @returns Found position.\n\t */ findPositionIn(viewParent, expectedOffset) {\n        // Last scanned view node.\n        let viewNode;\n        // Length of the last scanned view node.\n        let lastLength = 0;\n        let modelOffset = 0;\n        let viewOffset = 0;\n        // In the text node it is simple: the offset in the model equals the offset in the text.\n        if (viewParent.is('$text')) {\n            return new Position$1(viewParent, expectedOffset);\n        }\n        // In other cases we add lengths of child nodes to find the proper offset.\n        // If it is smaller we add the length.\n        while(modelOffset < expectedOffset){\n            viewNode = viewParent.getChild(viewOffset);\n            lastLength = this.getModelLength(viewNode);\n            modelOffset += lastLength;\n            viewOffset++;\n        }\n        // If it equals we found the position.\n        if (modelOffset == expectedOffset) {\n            return this._moveViewPositionToTextNode(new Position$1(viewParent, viewOffset));\n        } else {\n            // ( modelOffset - lastLength ) is the offset to the child we enter,\n            // so we subtract it from the expected offset to fine the offset in the child.\n            return this.findPositionIn(viewNode, expectedOffset - (modelOffset - lastLength));\n        }\n    }\n    /**\n\t * Because we prefer positions in the text nodes over positions next to text nodes, if the view position was next to a text node,\n\t * it moves it into the text node instead.\n\t *\n\t * ```\n\t * <p>[]<b>foo</b></p> -> <p>[]<b>foo</b></p> // do not touch if position is not directly next to text\n\t * <p>foo[]<b>foo</b></p> -> <p>foo{}<b>foo</b></p> // move to text node\n\t * <p><b>[]foo</b></p> -> <p><b>{}foo</b></p> // move to text node\n\t * ```\n\t *\n\t * @param viewPosition Position potentially next to the text node.\n\t * @returns Position in the text node if possible.\n\t */ _moveViewPositionToTextNode(viewPosition) {\n        // If the position is just after a text node, put it at the end of that text node.\n        // If the position is just before a text node, put it at the beginning of that text node.\n        const nodeBefore = viewPosition.nodeBefore;\n        const nodeAfter = viewPosition.nodeAfter;\n        if (nodeBefore instanceof Text$1) {\n            return new Position$1(nodeBefore, nodeBefore.data.length);\n        } else if (nodeAfter instanceof Text$1) {\n            return new Position$1(nodeAfter, 0);\n        }\n        // Otherwise, just return the given position.\n        return viewPosition;\n    }\n}\n\n/**\n * Manages a list of consumable values for the {@link module:engine/model/item~Item model items}.\n *\n * Consumables are various aspects of the model. A model item can be broken down into separate, single properties that might be\n * taken into consideration when converting that item.\n *\n * `ModelConsumable` is used by {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} while analyzing the changed\n * parts of {@link module:engine/model/document~Document the document}. The added / changed / removed model items are broken down\n * into singular properties (the item itself and its attributes). All those parts are saved in `ModelConsumable`. Then,\n * during conversion, when the given part of a model item is converted (i.e. the view element has been inserted into the view,\n * but without attributes), the consumable value is removed from `ModelConsumable`.\n *\n * For model items, `ModelConsumable` stores consumable values of one of following types: `insert`, `addattribute:<attributeKey>`,\n * `changeattributes:<attributeKey>`, `removeattributes:<attributeKey>`.\n *\n * In most cases, it is enough to let th {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}\n * gather consumable values, so there is no need to use\n * the {@link module:engine/conversion/modelconsumable~ModelConsumable#add add method} directly.\n * However, it is important to understand how consumable values can be\n * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed}.\n * See {@link module:engine/conversion/downcasthelpers default downcast converters} for more information.\n *\n * Keep in mind that one conversion event may have multiple callbacks (converters) attached to it. Each of those is\n * able to convert one or more parts of the model. However, when one of those callbacks actually converts\n * something, the others should not, because they would duplicate the results. Using `ModelConsumable` helps to avoid\n * this situation, because callbacks should only convert these values that were not yet consumed from `ModelConsumable`.\n *\n * Consuming multiple values in a single callback:\n *\n * ```ts\n * // Converter for custom `imageBlock` element that might have a `caption` element inside which changes\n * // how the image is displayed in the view:\n * //\n * // Model:\n * //\n * // [imageBlock]\n * //   └─ [caption]\n * //       └─ foo\n * //\n * // View:\n * //\n * // <figure>\n * //   ├─ <img />\n * //   └─ <caption>\n * //       └─ foo\n * modelConversionDispatcher.on( 'insert:imageBlock', ( evt, data, conversionApi ) => {\n * \t// First, consume the `imageBlock` element.\n * \tconversionApi.consumable.consume( data.item, 'insert' );\n *\n * \t// Just create normal image element for the view.\n * \t// Maybe it will be \"decorated\" later.\n * \tconst viewImage = new ViewElement( 'img' );\n * \tconst insertPosition = conversionApi.mapper.toViewPosition( data.range.start );\n * \tconst viewWriter = conversionApi.writer;\n *\n * \t// Check if the `imageBlock` element has children.\n * \tif ( data.item.childCount > 0 ) {\n * \t\tconst modelCaption = data.item.getChild( 0 );\n *\n * \t\t// `modelCaption` insertion change is consumed from consumable values.\n * \t\t// It will not be converted by other converters, but it's children (probably some text) will be.\n * \t\t// Through mapping, converters for text will know where to insert contents of `modelCaption`.\n * \t\tif ( conversionApi.consumable.consume( modelCaption, 'insert' ) ) {\n * \t\t\tconst viewCaption = new ViewElement( 'figcaption' );\n *\n * \t\t\tconst viewImageHolder = new ViewElement( 'figure', null, [ viewImage, viewCaption ] );\n *\n * \t\t\tconversionApi.mapper.bindElements( modelCaption, viewCaption );\n * \t\t\tconversionApi.mapper.bindElements( data.item, viewImageHolder );\n * \t\t\tviewWriter.insert( insertPosition, viewImageHolder );\n * \t\t}\n * \t} else {\n * \t\tconversionApi.mapper.bindElements( data.item, viewImage );\n * \t\tviewWriter.insert( insertPosition, viewImage );\n * \t}\n *\n * \tevt.stop();\n * } );\n * ```\n */ class ModelConsumable {\n    /**\n\t * Contains list of consumable values.\n\t */ _consumable = new Map();\n    /**\n\t * For each {@link module:engine/model/textproxy~TextProxy} added to `ModelConsumable`, this registry holds a parent\n\t * of that `TextProxy` and the start and end indices of that `TextProxy`. This allows identification of the `TextProxy`\n\t * instances that point to the same part of the model but are different instances. Each distinct `TextProxy`\n\t * is given a unique `Symbol` which is then registered as consumable. This process is transparent for the `ModelConsumable`\n\t * API user because whenever `TextProxy` is added, tested, consumed or reverted, the internal mechanisms of\n\t * `ModelConsumable` translate `TextProxy` to that unique `Symbol`.\n\t */ _textProxyRegistry = new Map();\n    /**\n\t * Adds a consumable value to the consumables list and links it with a given model item.\n\t *\n\t * ```ts\n\t * modelConsumable.add( modelElement, 'insert' ); // Add `modelElement` insertion change to consumable values.\n\t * modelConsumable.add( modelElement, 'addAttribute:bold' ); // Add `bold` attribute insertion on `modelElement` change.\n\t * modelConsumable.add( modelElement, 'removeAttribute:bold' ); // Add `bold` attribute removal on `modelElement` change.\n\t * modelConsumable.add( modelSelection, 'selection' ); // Add `modelSelection` to consumable values.\n\t * modelConsumable.add( modelRange, 'range' ); // Add `modelRange` to consumable values.\n\t * ```\n\t *\n\t * @param item Model item, range or selection that has the consumable.\n\t * @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t */ add(item, type) {\n        type = _normalizeConsumableType(type);\n        if (item instanceof TextProxy) {\n            item = this._getSymbolForTextProxy(item);\n        }\n        if (!this._consumable.has(item)) {\n            this._consumable.set(item, new Map());\n        }\n        this._consumable.get(item).set(type, true);\n    }\n    /**\n\t * Removes a given consumable value from a given model item.\n\t *\n\t * ```ts\n\t * modelConsumable.consume( modelElement, 'insert' ); // Remove `modelElement` insertion change from consumable values.\n\t * modelConsumable.consume( modelElement, 'addAttribute:bold' ); // Remove `bold` attribute insertion on `modelElement` change.\n\t * modelConsumable.consume( modelElement, 'removeAttribute:bold' ); // Remove `bold` attribute removal on `modelElement` change.\n\t * modelConsumable.consume( modelSelection, 'selection' ); // Remove `modelSelection` from consumable values.\n\t * modelConsumable.consume( modelRange, 'range' ); // Remove 'modelRange' from consumable values.\n\t * ```\n\t *\n\t * @param item Model item, range or selection from which consumable will be consumed.\n\t * @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t * @returns `true` if consumable value was available and was consumed, `false` otherwise.\n\t */ consume(item, type) {\n        type = _normalizeConsumableType(type);\n        if (item instanceof TextProxy) {\n            item = this._getSymbolForTextProxy(item);\n        }\n        if (this.test(item, type)) {\n            this._consumable.get(item).set(type, false);\n            return true;\n        } else {\n            return false;\n        }\n    }\n    /**\n\t * Tests whether there is a consumable value of a given type connected with a given model item.\n\t *\n\t * ```ts\n\t * modelConsumable.test( modelElement, 'insert' ); // Check for `modelElement` insertion change.\n\t * modelConsumable.test( modelElement, 'addAttribute:bold' ); // Check for `bold` attribute insertion on `modelElement` change.\n\t * modelConsumable.test( modelElement, 'removeAttribute:bold' ); // Check for `bold` attribute removal on `modelElement` change.\n\t * modelConsumable.test( modelSelection, 'selection' ); // Check if `modelSelection` is consumable.\n\t * modelConsumable.test( modelRange, 'range' ); // Check if `modelRange` is consumable.\n\t * ```\n\t *\n\t * @param item Model item, range or selection to be tested.\n\t * @param type Consumable type. Will be normalized to a proper form, that is either `<word>` or `<part>:<part>`.\n\t * Second colon and everything after will be cut. Passing event name is a safe and good practice.\n\t * @returns `null` if such consumable was never added, `false` if the consumable values was\n\t * already consumed or `true` if it was added and not consumed yet.\n\t */ test(item, type) {\n        type = _normalizeConsumableType(type);\n        if (item instanceof TextProxy) {\n            item = this._getSymbolForTextProxy(item);\n        }\n        const itemConsumables = this._consumable.get(item);\n        if (itemConsumables === undefined) {\n            return null;\n        }\n        const value = itemConsumables.get(type);\n        if (value === undefined) {\n            return null;\n        }\n        return value;\n    }\n    /**\n\t * Reverts consuming of a consumable value.\n\t *\n\t * ```ts\n\t * modelConsumable.revert( modelElement, 'insert' ); // Revert consuming `modelElement` insertion change.\n\t * modelConsumable.revert( modelElement, 'addAttribute:bold' ); // Revert consuming `bold` attribute insert from `modelElement`.\n\t * modelConsumable.revert( modelElement, 'removeAttribute:bold' ); // Revert consuming `bold` attribute remove from `modelElement`.\n\t * modelConsumable.revert( modelSelection, 'selection' ); // Revert consuming `modelSelection`.\n\t * modelConsumable.revert( modelRange, 'range' ); // Revert consuming `modelRange`.\n\t * ```\n\t *\n\t * @param item Model item, range or selection to be reverted.\n\t * @param type Consumable type.\n\t * @returns `true` if consumable has been reversed, `false` otherwise. `null` if the consumable has\n\t * never been added.\n\t */ revert(item, type) {\n        type = _normalizeConsumableType(type);\n        if (item instanceof TextProxy) {\n            item = this._getSymbolForTextProxy(item);\n        }\n        const test = this.test(item, type);\n        if (test === false) {\n            this._consumable.get(item).set(type, true);\n            return true;\n        } else if (test === true) {\n            return false;\n        }\n        return null;\n    }\n    /**\n\t * Verifies if all events from the specified group were consumed.\n\t *\n\t * @param eventGroup The events group to verify.\n\t */ verifyAllConsumed(eventGroup) {\n        const items = [];\n        for (const [item, consumables] of this._consumable){\n            for (const [event, canConsume] of consumables){\n                const eventPrefix = event.split(':')[0];\n                if (canConsume && eventGroup == eventPrefix) {\n                    items.push({\n                        event,\n                        item: item.name || item.description\n                    });\n                }\n            }\n        }\n        if (items.length) {\n            /**\n\t\t\t * Some of the {@link module:engine/model/item~Item model items} were not consumed while downcasting the model to view.\n\t\t\t *\n\t\t\t * This might be the effect of:\n\t\t\t *\n\t\t\t * * A missing converter for some model elements. Make sure that you registered downcast converters for all model elements.\n\t\t\t * * A custom converter that does not consume converted items. Make sure that you\n\t\t\t * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} all model elements that you converted\n\t\t\t * from the model to the view.\n\t\t\t * * A custom converter that called `event.stop()`. When providing a custom converter, keep in mind that you should not stop\n\t\t\t * the event. If you stop it then the default converter at the `lowest` priority will not trigger the conversion of this node's\n\t\t\t * attributes and child nodes.\n\t\t\t *\n\t\t\t * @error conversion-model-consumable-not-consumed\n\t\t\t * @param {Array.<module:engine/model/item~Item>} items Items that were not consumed.\n\t\t\t */ throw new CKEditorError('conversion-model-consumable-not-consumed', null, {\n                items\n            });\n        }\n    }\n    /**\n\t * Gets a unique symbol for the passed {@link module:engine/model/textproxy~TextProxy} instance. All `TextProxy` instances that\n\t * have same parent, same start index and same end index will get the same symbol.\n\t *\n\t * Used internally to correctly consume `TextProxy` instances.\n\t *\n\t * @internal\n\t * @param textProxy `TextProxy` instance to get a symbol for.\n\t * @returns Symbol representing all equal instances of `TextProxy`.\n\t */ _getSymbolForTextProxy(textProxy) {\n        let symbol = null;\n        const startMap = this._textProxyRegistry.get(textProxy.startOffset);\n        if (startMap) {\n            const endMap = startMap.get(textProxy.endOffset);\n            if (endMap) {\n                symbol = endMap.get(textProxy.parent);\n            }\n        }\n        if (!symbol) {\n            symbol = this._addSymbolForTextProxy(textProxy);\n        }\n        return symbol;\n    }\n    /**\n\t * Adds a symbol for the given {@link module:engine/model/textproxy~TextProxy} instance.\n\t *\n\t * Used internally to correctly consume `TextProxy` instances.\n\t *\n\t * @param textProxy Text proxy instance.\n\t * @returns Symbol generated for given `TextProxy`.\n\t */ _addSymbolForTextProxy(textProxy) {\n        const start = textProxy.startOffset;\n        const end = textProxy.endOffset;\n        const parent = textProxy.parent;\n        const symbol = Symbol('$textProxy:' + textProxy.data);\n        let startMap;\n        let endMap;\n        startMap = this._textProxyRegistry.get(start);\n        if (!startMap) {\n            startMap = new Map();\n            this._textProxyRegistry.set(start, startMap);\n        }\n        endMap = startMap.get(end);\n        if (!endMap) {\n            endMap = new Map();\n            startMap.set(end, endMap);\n        }\n        endMap.set(parent, symbol);\n        return symbol;\n    }\n}\n/**\n * Returns a normalized consumable type name from the given string. A normalized consumable type name is a string that has\n * at most one colon, for example: `insert` or `addMarker:highlight`. If a string to normalize has more \"parts\" (more colons),\n * the further parts are dropped, for example: `addattribute:bold:$text` -> `addattributes:bold`.\n *\n * @param type Consumable type.\n * @returns Normalized consumable type.\n */ function _normalizeConsumableType(type) {\n    const parts = type.split(':');\n    // For inserts allow passing event name, it's stored in the context of a specified element so the element name is not needed.\n    if (parts[0] == 'insert') {\n        return parts[0];\n    }\n    // Markers are identified by the whole name (otherwise we would consume the whole markers group).\n    if (parts[0] == 'addMarker' || parts[0] == 'removeMarker') {\n        return type;\n    }\n    return parts.length > 1 ? parts[0] + ':' + parts[1] : parts[0];\n}\n\n/**\n * The downcast dispatcher is a central point of downcasting (conversion from the model to the view), which is a process of reacting\n * to changes in the model and firing a set of events. The callbacks listening to these events are called converters. The\n * converters' role is to convert the model changes to changes in view (for example, adding view nodes or\n * changing attributes on view elements).\n *\n * During the conversion process, downcast dispatcher fires events basing on the state of the model and prepares\n * data for these events. It is important to understand that the events are connected with the changes done on the model,\n * for example: \"a node has been inserted\" or \"an attribute has changed\". This is in contrary to upcasting (a view-to-model conversion)\n * where you convert the view state (view nodes) to a model tree.\n *\n * The events are prepared basing on a diff created by the {@link module:engine/model/differ~Differ Differ}, which buffers them\n * and then passes to the downcast dispatcher as a diff between the old model state and the new model state.\n *\n * Note that because the changes are converted, there is a need to have a mapping between the model structure and the view structure.\n * To map positions and elements during the downcast (a model-to-view conversion), use {@link module:engine/conversion/mapper~Mapper}.\n *\n * Downcast dispatcher fires the following events for model tree changes:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`} &ndash;\n * If a range of nodes was inserted to the model tree.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove `remove`} &ndash;\n * If a range of nodes was removed from the model tree.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`} &ndash;\n * If an attribute was added, changed or removed from a model node.\n *\n * For {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert`}\n * and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`},\n * the downcast dispatcher generates {@link module:engine/conversion/modelconsumable~ModelConsumable consumables}.\n * These are used to have control over which changes have already been consumed. It is useful when some converters\n * overwrite others or convert multiple changes (for example, it converts an insertion of an element and also converts that\n * element's attributes during the insertion).\n *\n * Additionally, downcast dispatcher fires events for {@link module:engine/model/markercollection~Marker marker} changes:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`} &ndash; If a marker was added.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:removeMarker `removeMarker`} &ndash; If a marker was\n * removed.\n *\n * Note that changing a marker is done through removing the marker from the old range and adding it to the new range,\n * so both of these events are fired.\n *\n * Finally, a downcast dispatcher also handles firing events for the {@link module:engine/model/selection model selection}\n * conversion:\n *\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:selection `selection`}\n * &ndash; Converts the selection from the model to the view.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute`}\n * &ndash; Fired for every selection attribute.\n * * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker `addMarker`}\n * &ndash; Fired for every marker that contains a selection.\n *\n * Unlike the model tree and the markers, the events for selection are not fired for changes but for a selection state.\n *\n * When providing custom listeners for a downcast dispatcher, remember to check whether a given change has not been\n * {@link module:engine/conversion/modelconsumable~ModelConsumable#consume consumed} yet.\n *\n * When providing custom listeners for a downcast dispatcher, keep in mind that you **should not** stop the event. If you stop it,\n * then the default converter at the `lowest` priority will not trigger the conversion of this node's attributes and child nodes.\n *\n * When providing custom listeners for a downcast dispatcher, remember to use the provided\n * {@link module:engine/view/downcastwriter~DowncastWriter view downcast writer} to apply changes to the view document.\n *\n * You can read more about conversion in the following guide:\n *\n * * {@glink framework/deep-dive/conversion/downcast Downcast conversion}\n *\n * An example of a custom converter for the downcast dispatcher:\n *\n * ```ts\n * // You will convert inserting a \"paragraph\" model element into the model.\n * downcastDispatcher.on( 'insert:paragraph', ( evt, data, conversionApi ) => {\n * \t// Remember to check whether the change has not been consumed yet and consume it.\n * \tif ( !conversionApi.consumable.consume( data.item, 'insert' ) ) {\n * \t\treturn;\n * \t}\n *\n * \t// Translate the position in the model to a position in the view.\n * \tconst viewPosition = conversionApi.mapper.toViewPosition( data.range.start );\n *\n * \t// Create a <p> element that will be inserted into the view at the `viewPosition`.\n * \tconst viewElement = conversionApi.writer.createContainerElement( 'p' );\n *\n * \t// Bind the newly created view element to the model element so positions will map accordingly in the future.\n * \tconversionApi.mapper.bindElements( data.item, viewElement );\n *\n * \t// Add the newly created view element to the view.\n * \tconversionApi.writer.insert( viewPosition, viewElement );\n * } );\n * ```\n */ class DowncastDispatcher extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * A template for an interface passed by the dispatcher to the event callbacks.\n\t *\n\t * @internal\n\t */ _conversionApi;\n    /**\n\t * A map of already fired events for a given `ModelConsumable`.\n\t */ _firedEventsMap;\n    /**\n\t * Creates a downcast dispatcher instance.\n\t *\n\t * @see module:engine/conversion/downcastdispatcher~DowncastConversionApi\n\t *\n\t * @param conversionApi Additional properties for an interface that will be passed to events fired\n\t * by the downcast dispatcher.\n\t */ constructor(conversionApi){\n        super();\n        this._conversionApi = {\n            dispatcher: this,\n            ...conversionApi\n        };\n        this._firedEventsMap = new WeakMap();\n    }\n    /**\n\t * Converts changes buffered in the given {@link module:engine/model/differ~Differ model differ}\n\t * and fires conversion events based on it.\n\t *\n\t * @fires insert\n\t * @fires remove\n\t * @fires attribute\n\t * @fires addMarker\n\t * @fires removeMarker\n\t * @fires reduceChanges\n\t * @param differ The differ object with buffered changes.\n\t * @param markers Markers related to the model fragment to convert.\n\t * @param writer The view writer that should be used to modify the view document.\n\t */ convertChanges(differ, markers, writer) {\n        const conversionApi = this._createConversionApi(writer, differ.getRefreshedItems());\n        // Before the view is updated, remove markers which have changed.\n        for (const change of differ.getMarkersToRemove()){\n            this._convertMarkerRemove(change.name, change.range, conversionApi);\n        }\n        // Let features modify the change list (for example to allow reconversion).\n        const changes = this._reduceChanges(differ.getChanges());\n        // Convert changes that happened on model tree.\n        for (const entry of changes){\n            if (entry.type === 'insert') {\n                this._convertInsert(Range._createFromPositionAndShift(entry.position, entry.length), conversionApi);\n            } else if (entry.type === 'reinsert') {\n                this._convertReinsert(Range._createFromPositionAndShift(entry.position, entry.length), conversionApi);\n            } else if (entry.type === 'remove') {\n                this._convertRemove(entry.position, entry.length, entry.name, conversionApi);\n            } else {\n                // Defaults to 'attribute' change.\n                this._convertAttribute(entry.range, entry.attributeKey, entry.attributeOldValue, entry.attributeNewValue, conversionApi);\n            }\n        }\n        // Remove mappings for all removed view elements.\n        // Remove these mappings as soon as they are not needed (https://github.com/ckeditor/ckeditor5/issues/15411).\n        conversionApi.mapper.flushDeferredBindings();\n        for (const markerName of conversionApi.mapper.flushUnboundMarkerNames()){\n            const markerRange = markers.get(markerName).getRange();\n            this._convertMarkerRemove(markerName, markerRange, conversionApi);\n            this._convertMarkerAdd(markerName, markerRange, conversionApi);\n        }\n        // After the view is updated, convert markers which have changed.\n        for (const change of differ.getMarkersToAdd()){\n            this._convertMarkerAdd(change.name, change.range, conversionApi);\n        }\n        // Verify if all insert consumables were consumed.\n        conversionApi.consumable.verifyAllConsumed('insert');\n    }\n    /**\n\t * Starts a conversion of a model range and the provided markers.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @fires addMarker\n\t * @param range The inserted range.\n\t * @param markers The map of markers that should be down-casted.\n\t * @param writer The view writer that should be used to modify the view document.\n\t * @param options Optional options object passed to `convertionApi.options`.\n\t */ convert(range, markers, writer, options = {}) {\n        const conversionApi = this._createConversionApi(writer, undefined, options);\n        this._convertInsert(range, conversionApi);\n        for (const [name, range] of markers){\n            this._convertMarkerAdd(name, range, conversionApi);\n        }\n        // Verify if all insert consumables were consumed.\n        conversionApi.consumable.verifyAllConsumed('insert');\n    }\n    /**\n\t * Starts the model selection conversion.\n\t *\n\t * Fires events for a given {@link module:engine/model/selection~Selection selection} to start the selection conversion.\n\t *\n\t * @fires selection\n\t * @fires addMarker\n\t * @fires attribute\n\t * @param selection The selection to convert.\n\t * @param markers Markers connected with the converted model.\n\t * @param writer View writer that should be used to modify the view document.\n\t */ convertSelection(selection, markers, writer) {\n        const conversionApi = this._createConversionApi(writer);\n        // First perform a clean-up at the current position of the selection.\n        this.fire('cleanSelection', {\n            selection\n        }, conversionApi);\n        // Don't convert selection if it is in a model root that does not have a view root (for now this is only the graveyard root).\n        const modelRoot = selection.getFirstPosition().root;\n        if (!conversionApi.mapper.toViewElement(modelRoot)) {\n            return;\n        }\n        // Now, perform actual selection conversion.\n        const markersAtSelection = Array.from(markers.getMarkersAtPosition(selection.getFirstPosition()));\n        this._addConsumablesForSelection(conversionApi.consumable, selection, markersAtSelection);\n        this.fire('selection', {\n            selection\n        }, conversionApi);\n        if (!selection.isCollapsed) {\n            return;\n        }\n        for (const marker of markersAtSelection){\n            // Do not fire event if the marker has been consumed.\n            if (conversionApi.consumable.test(selection, 'addMarker:' + marker.name)) {\n                const markerRange = marker.getRange();\n                if (!shouldMarkerChangeBeConverted(selection.getFirstPosition(), marker, conversionApi.mapper)) {\n                    continue;\n                }\n                const data = {\n                    item: selection,\n                    markerName: marker.name,\n                    markerRange\n                };\n                this.fire(`addMarker:${marker.name}`, data, conversionApi);\n            }\n        }\n        for (const key of selection.getAttributeKeys()){\n            // Do not fire event if the attribute has been consumed.\n            if (conversionApi.consumable.test(selection, 'attribute:' + key)) {\n                const data = {\n                    item: selection,\n                    range: selection.getFirstRange(),\n                    attributeKey: key,\n                    attributeOldValue: null,\n                    attributeNewValue: selection.getAttribute(key)\n                };\n                this.fire(`attribute:${key}:$text`, data, conversionApi);\n            }\n        }\n    }\n    /**\n\t * Fires insertion conversion of a range of nodes.\n\t *\n\t * For each node in the range, {@link #event:insert `insert` event is fired}. For each attribute on each node,\n\t * {@link #event:attribute `attribute` event is fired}.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @param range The inserted range.\n\t * @param conversionApi The conversion API object.\n\t * @param options.doNotAddConsumables Whether the ModelConsumable should not get populated\n\t * for items in the provided range.\n\t */ _convertInsert(range, conversionApi, options = {}) {\n        if (!options.doNotAddConsumables) {\n            // Collect a list of things that can be consumed, consisting of nodes and their attributes.\n            this._addConsumablesForInsert(conversionApi.consumable, range);\n        }\n        // Fire a separate insert event for each node and text fragment contained in the range.\n        for (const data of Array.from(range.getWalker({\n            shallow: true\n        })).map(walkerValueToEventData)){\n            this._testAndFire('insert', data, conversionApi);\n        }\n    }\n    /**\n\t * Fires conversion of a single node removal. Fires {@link #event:remove remove event} with provided data.\n\t *\n\t * @param position Position from which node was removed.\n\t * @param length Offset size of removed node.\n\t * @param name Name of removed node.\n\t * @param conversionApi The conversion API object.\n\t */ _convertRemove(position, length, name, conversionApi) {\n        this.fire(`remove:${name}`, {\n            position,\n            length\n        }, conversionApi);\n    }\n    /**\n\t * Starts a conversion of an attribute change on a given `range`.\n\t *\n\t * For each node in the given `range`, {@link #event:attribute attribute event} is fired with the passed data.\n\t *\n\t * @fires attribute\n\t * @param range Changed range.\n\t * @param key Key of the attribute that has changed.\n\t * @param oldValue Attribute value before the change or `null` if the attribute has not been set before.\n\t * @param newValue New attribute value or `null` if the attribute has been removed.\n\t * @param conversionApi The conversion API object.\n\t */ _convertAttribute(range, key, oldValue, newValue, conversionApi) {\n        // Create a list with attributes to consume.\n        this._addConsumablesForRange(conversionApi.consumable, range, `attribute:${key}`);\n        // Create a separate attribute event for each node in the range.\n        for (const value of range){\n            const data = {\n                item: value.item,\n                range: Range._createFromPositionAndShift(value.previousPosition, value.length),\n                attributeKey: key,\n                attributeOldValue: oldValue,\n                attributeNewValue: newValue\n            };\n            this._testAndFire(`attribute:${key}`, data, conversionApi);\n        }\n    }\n    /**\n\t * Fires re-insertion conversion (with a `reconversion` flag passed to `insert` events)\n\t * of a range of elements (only elements on the range depth, without children).\n\t *\n\t * For each node in the range on its depth (without children), {@link #event:insert `insert` event} is fired.\n\t * For each attribute on each node, {@link #event:attribute `attribute` event} is fired.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @param range The range to reinsert.\n\t * @param conversionApi The conversion API object.\n\t */ _convertReinsert(range, conversionApi) {\n        // Convert the elements - without converting children.\n        const walkerValues = Array.from(range.getWalker({\n            shallow: true\n        }));\n        // Collect a list of things that can be consumed, consisting of nodes and their attributes.\n        this._addConsumablesForInsert(conversionApi.consumable, walkerValues);\n        // Fire a separate insert event for each node and text fragment contained shallowly in the range.\n        for (const data of walkerValues.map(walkerValueToEventData)){\n            this._testAndFire('insert', {\n                ...data,\n                reconversion: true\n            }, conversionApi);\n        }\n    }\n    /**\n\t * Converts the added marker. Fires the {@link #event:addMarker `addMarker`} event for each item\n\t * in the marker's range. If the range is collapsed, a single event is dispatched. See the event description for more details.\n\t *\n\t * @fires addMarker\n\t * @param markerName Marker name.\n\t * @param markerRange The marker range.\n\t * @param conversionApi The conversion API object.\n\t */ _convertMarkerAdd(markerName, markerRange, conversionApi) {\n        // Do not convert if range is in graveyard.\n        if (markerRange.root.rootName == '$graveyard') {\n            return;\n        }\n        // In markers' case, event name == consumable name.\n        const eventName = `addMarker:${markerName}`;\n        //\n        // First, fire an event for the whole marker.\n        //\n        conversionApi.consumable.add(markerRange, eventName);\n        this.fire(eventName, {\n            markerName,\n            markerRange\n        }, conversionApi);\n        //\n        // Do not fire events for each item inside the range if the range got consumed.\n        // Also consume the whole marker consumable if it wasn't consumed.\n        //\n        if (!conversionApi.consumable.consume(markerRange, eventName)) {\n            return;\n        }\n        //\n        // Then, fire an event for each item inside the marker range.\n        //\n        this._addConsumablesForRange(conversionApi.consumable, markerRange, eventName);\n        for (const item of markerRange.getItems()){\n            // Do not fire event for already consumed items.\n            if (!conversionApi.consumable.test(item, eventName)) {\n                continue;\n            }\n            const data = {\n                item,\n                range: Range._createOn(item),\n                markerName,\n                markerRange\n            };\n            this.fire(eventName, data, conversionApi);\n        }\n    }\n    /**\n\t * Fires the conversion of the marker removal. Fires the {@link #event:removeMarker `removeMarker`} event with the provided data.\n\t *\n\t * @fires removeMarker\n\t * @param markerName Marker name.\n\t * @param markerRange The marker range.\n\t * @param conversionApi The conversion API object.\n\t */ _convertMarkerRemove(markerName, markerRange, conversionApi) {\n        // Do not convert if range is in graveyard.\n        if (markerRange.root.rootName == '$graveyard') {\n            return;\n        }\n        this.fire(`removeMarker:${markerName}`, {\n            markerName,\n            markerRange\n        }, conversionApi);\n    }\n    /**\n\t * Fires the reduction of changes buffered in the {@link module:engine/model/differ~Differ `Differ`}.\n\t *\n\t * Features can replace selected {@link module:engine/model/differ~DiffItem `DiffItem`}s with `reinsert` entries to trigger\n\t * reconversion. The {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n\t * `DowncastHelpers.elementToStructure()`} is using this event to trigger reconversion.\n\t *\n\t * @fires reduceChanges\n\t */ _reduceChanges(changes) {\n        const data = {\n            changes\n        };\n        this.fire('reduceChanges', data);\n        return data.changes;\n    }\n    /**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume from a given range,\n\t * assuming that the range has just been inserted to the model.\n\t *\n\t * @param consumable The consumable.\n\t * @param walkerValues The walker values for the inserted range.\n\t * @returns The values to consume.\n\t */ _addConsumablesForInsert(consumable, walkerValues) {\n        for (const value of walkerValues){\n            const item = value.item;\n            // Add consumable if it wasn't there yet.\n            if (consumable.test(item, 'insert') === null) {\n                consumable.add(item, 'insert');\n                for (const key of item.getAttributeKeys()){\n                    consumable.add(item, 'attribute:' + key);\n                }\n            }\n        }\n        return consumable;\n    }\n    /**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with values to consume for a given range.\n\t *\n\t * @param consumable The consumable.\n\t * @param range The affected range.\n\t * @param type Consumable type.\n\t * @returns The values to consume.\n\t */ _addConsumablesForRange(consumable, range, type) {\n        for (const item of range.getItems()){\n            consumable.add(item, type);\n        }\n        return consumable;\n    }\n    /**\n\t * Populates provided {@link module:engine/conversion/modelconsumable~ModelConsumable} with selection consumable values.\n\t *\n\t * @param consumable The consumable.\n\t * @param selection The selection to create the consumable from.\n\t * @param markers Markers that contain the selection.\n\t * @returns The values to consume.\n\t */ _addConsumablesForSelection(consumable, selection, markers) {\n        consumable.add(selection, 'selection');\n        for (const marker of markers){\n            consumable.add(selection, 'addMarker:' + marker.name);\n        }\n        for (const key of selection.getAttributeKeys()){\n            consumable.add(selection, 'attribute:' + key);\n        }\n        return consumable;\n    }\n    /**\n\t * Tests whether given event wasn't already fired and if so, fires it.\n\t *\n\t * @fires insert\n\t * @fires attribute\n\t * @param type Event type.\n\t * @param data Event data.\n\t * @param conversionApi The conversion API object.\n\t */ _testAndFire(type, data, conversionApi) {\n        const eventName = getEventName(type, data);\n        const itemKey = data.item.is('$textProxy') ? conversionApi.consumable._getSymbolForTextProxy(data.item) : data.item;\n        const eventsFiredForConversion = this._firedEventsMap.get(conversionApi);\n        const eventsFiredForItem = eventsFiredForConversion.get(itemKey);\n        if (!eventsFiredForItem) {\n            eventsFiredForConversion.set(itemKey, new Set([\n                eventName\n            ]));\n        } else if (!eventsFiredForItem.has(eventName)) {\n            eventsFiredForItem.add(eventName);\n        } else {\n            return;\n        }\n        this.fire(eventName, data, conversionApi);\n    }\n    /**\n\t * Fires not already fired events for setting attributes on just inserted item.\n\t *\n\t * @param item The model item to convert attributes for.\n\t * @param conversionApi The conversion API object.\n\t */ _testAndFireAddAttributes(item, conversionApi) {\n        const data = {\n            item,\n            range: Range._createOn(item)\n        };\n        for (const key of data.item.getAttributeKeys()){\n            data.attributeKey = key;\n            data.attributeOldValue = null;\n            data.attributeNewValue = data.item.getAttribute(key);\n            this._testAndFire(`attribute:${key}`, data, conversionApi);\n        }\n    }\n    /**\n\t * Builds an instance of the {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi} from a template and a given\n\t * {@link module:engine/view/downcastwriter~DowncastWriter `DowncastWriter`} and options object.\n\t *\n\t * @param writer View writer that should be used to modify the view document.\n\t * @param refreshedItems A set of model elements that should not reuse their\n\t * previous view representations.\n\t * @param options Optional options passed to `convertionApi.options`.\n\t * @return The conversion API object.\n\t */ _createConversionApi(writer, refreshedItems = new Set(), options = {}) {\n        const conversionApi = {\n            ...this._conversionApi,\n            consumable: new ModelConsumable(),\n            writer,\n            options,\n            convertItem: (item)=>this._convertInsert(Range._createOn(item), conversionApi),\n            convertChildren: (element)=>this._convertInsert(Range._createIn(element), conversionApi, {\n                    doNotAddConsumables: true\n                }),\n            convertAttributes: (item)=>this._testAndFireAddAttributes(item, conversionApi),\n            canReuseView: (viewElement)=>!refreshedItems.has(conversionApi.mapper.toModelElement(viewElement))\n        };\n        this._firedEventsMap.set(conversionApi, new Map());\n        return conversionApi;\n    }\n}\n/**\n * Helper function, checks whether change of `marker` at `modelPosition` should be converted. Marker changes are not\n * converted if they happen inside an element with custom conversion method.\n */ function shouldMarkerChangeBeConverted(modelPosition, marker, mapper) {\n    const range = marker.getRange();\n    const ancestors = Array.from(modelPosition.getAncestors());\n    ancestors.shift(); // Remove root element. It cannot be passed to `model.Range#containsItem`.\n    ancestors.reverse();\n    const hasCustomHandling = ancestors.some((element)=>{\n        if (range.containsItem(element)) {\n            const viewElement = mapper.toViewElement(element);\n            return !!viewElement.getCustomProperty('addHighlight');\n        }\n    });\n    return !hasCustomHandling;\n}\nfunction getEventName(type, data) {\n    const name = data.item.is('element') ? data.item.name : '$text';\n    return `${type}:${name}`;\n}\nfunction walkerValueToEventData(value) {\n    const item = value.item;\n    const itemRange = Range._createFromPositionAndShift(value.previousPosition, value.length);\n    return {\n        item,\n        range: itemRange\n    };\n}\n\n/**\n * Selection is a set of {@link module:engine/model/range~Range ranges}. It has a direction specified by its\n * {@link module:engine/model/selection~Selection#anchor anchor} and {@link module:engine/model/selection~Selection#focus focus}\n * (it can be {@link module:engine/model/selection~Selection#isBackward forward or backward}).\n * Additionally, selection may have its own attributes (think – whether text typed in in this selection\n * should have those attributes – e.g. whether you type a bolded text).\n */ class Selection extends /* #__PURE__ */ EmitterMixin(TypeCheckable) {\n    /**\n\t * Specifies whether the last added range was added as a backward or forward range.\n\t */ _lastRangeBackward = false;\n    /**\n\t * List of attributes set on current selection.\n\t */ _attrs = new Map();\n    /** @internal */ _ranges = [];\n    /**\n\t * Creates a new selection instance based on the given {@link module:engine/model/selection~Selectable selectable}\n\t * or creates an empty selection if no arguments were passed.\n\t *\n\t * ```ts\n\t * // Creates empty selection without ranges.\n\t * const selection = writer.createSelection();\n\t *\n\t * // Creates selection at the given range.\n\t * const range = writer.createRange( start, end );\n\t * const selection = writer.createSelection( range );\n\t *\n\t * // Creates selection at the given ranges\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * const selection = writer.createSelection( ranges );\n\t *\n\t * // Creates selection from the other selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const otherSelection = writer.createSelection();\n\t * const selection = writer.createSelection( otherSelection );\n\t *\n\t * // Creates selection from the given document selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const documentSelection = model.document.selection;\n\t * const selection = writer.createSelection( documentSelection );\n\t *\n\t * // Creates selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * const selection = writer.createSelection( position );\n\t *\n\t * // Creates selection at the given offset in the given element.\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * const selection = writer.createSelection( paragraph, offset );\n\t *\n\t * // Creates a range inside an {@link module:engine/model/element~Element element} which starts before the\n\t * // first child of that element and ends after the last child of that element.\n\t * const selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * // Creates a range on an {@link module:engine/model/item~Item item} which starts before the item and ends\n\t * // just after the item.\n\t * const selection = writer.createSelection( paragraph, 'on' );\n\t * ```\n\t *\n\t * Selection's constructor allow passing additional options (`'backward'`) as the last argument.\n\t *\n\t * ```ts\n\t * // Creates backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t *\n\t * @internal\n\t */ constructor(...args){\n        super();\n        if (args.length) {\n            this.setTo(...args);\n        }\n    }\n    /**\n\t * Selection anchor. Anchor is the position from which the selection was started. If a user is making a selection\n\t * by dragging the mouse, the anchor is where the user pressed the mouse button (the beginning of the selection).\n\t *\n\t * Anchor and {@link #focus} define the direction of the selection, which is important\n\t * when expanding/shrinking selection. The focus moves, while the anchor should remain in the same place.\n\t *\n\t * Anchor is always set to the {@link module:engine/model/range~Range#start start} or\n\t * {@link module:engine/model/range~Range#end end} position of the last of selection's ranges. Whether it is\n\t * the `start` or `end` depends on the specified `options.backward`. See the {@link #setTo `setTo()`} method.\n\t *\n\t * May be set to `null` if there are no ranges in the selection.\n\t *\n\t * @see #focus\n\t */ get anchor() {\n        if (this._ranges.length > 0) {\n            const range = this._ranges[this._ranges.length - 1];\n            return this._lastRangeBackward ? range.end : range.start;\n        }\n        return null;\n    }\n    /**\n\t * Selection focus. Focus is the position where the selection ends. If a user is making a selection\n\t * by dragging the mouse, the focus is where the mouse cursor is.\n\t *\n\t * May be set to `null` if there are no ranges in the selection.\n\t *\n\t * @see #anchor\n\t */ get focus() {\n        if (this._ranges.length > 0) {\n            const range = this._ranges[this._ranges.length - 1];\n            return this._lastRangeBackward ? range.start : range.end;\n        }\n        return null;\n    }\n    /**\n\t * Whether the selection is collapsed. Selection is collapsed when there is exactly one range in it\n\t * and it is collapsed.\n\t */ get isCollapsed() {\n        const length = this._ranges.length;\n        if (length === 1) {\n            return this._ranges[0].isCollapsed;\n        } else {\n            return false;\n        }\n    }\n    /**\n\t * Returns the number of ranges in the selection.\n\t */ get rangeCount() {\n        return this._ranges.length;\n    }\n    /**\n\t * Specifies whether the selection's {@link #focus} precedes the selection's {@link #anchor}.\n\t */ get isBackward() {\n        return !this.isCollapsed && this._lastRangeBackward;\n    }\n    /**\n\t * Checks whether this selection is equal to the given selection. Selections are equal if they have the same directions,\n\t * the same number of ranges and all ranges from one selection equal to ranges from the another selection.\n\t *\n\t * @param otherSelection Selection to compare with.\n\t * @returns `true` if selections are equal, `false` otherwise.\n\t */ isEqual(otherSelection) {\n        if (this.rangeCount != otherSelection.rangeCount) {\n            return false;\n        } else if (this.rangeCount === 0) {\n            return true;\n        }\n        if (!this.anchor.isEqual(otherSelection.anchor) || !this.focus.isEqual(otherSelection.focus)) {\n            return false;\n        }\n        for (const thisRange of this._ranges){\n            let found = false;\n            for (const otherRange of otherSelection._ranges){\n                if (thisRange.isEqual(otherRange)) {\n                    found = true;\n                    break;\n                }\n            }\n            if (!found) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Returns an iterable object that iterates over copies of selection ranges.\n\t */ *getRanges() {\n        for (const range of this._ranges){\n            yield new Range(range.start, range.end);\n        }\n    }\n    /**\n\t * Returns a copy of the first range in the selection.\n\t * First range is the one which {@link module:engine/model/range~Range#start start} position\n\t * {@link module:engine/model/position~Position#isBefore is before} start position of all other ranges\n\t * (not to confuse with the first range added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getFirstRange() {\n        let first = null;\n        for (const range of this._ranges){\n            if (!first || range.start.isBefore(first.start)) {\n                first = range;\n            }\n        }\n        return first ? new Range(first.start, first.end) : null;\n    }\n    /**\n\t * Returns a copy of the last range in the selection.\n\t * Last range is the one which {@link module:engine/model/range~Range#end end} position\n\t * {@link module:engine/model/position~Position#isAfter is after} end position of all other ranges (not to confuse with the range most\n\t * recently added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getLastRange() {\n        let last = null;\n        for (const range of this._ranges){\n            if (!last || range.end.isAfter(last.end)) {\n                last = range;\n            }\n        }\n        return last ? new Range(last.start, last.end) : null;\n    }\n    /**\n\t * Returns the first position in the selection.\n\t * First position is the position that {@link module:engine/model/position~Position#isBefore is before}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getFirstPosition() {\n        const first = this.getFirstRange();\n        return first ? first.start.clone() : null;\n    }\n    /**\n\t * Returns the last position in the selection.\n\t * Last position is the position that {@link module:engine/model/position~Position#isAfter is after}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getLastPosition() {\n        const lastRange = this.getLastRange();\n        return lastRange ? lastRange.end.clone() : null;\n    }\n    /**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/model/selection~Selectable selectable}.\n\t *\n\t * ```ts\n\t * // Removes all selection's ranges.\n\t * selection.setTo( null );\n\t *\n\t * // Sets selection to the given range.\n\t * const range = writer.createRange( start, end );\n\t * selection.setTo( range );\n\t *\n\t * // Sets selection to given ranges.\n\t * const ranges = [ writer.createRange( start1, end2 ), writer.createRange( star2, end2 ) ];\n\t * selection.setTo( ranges );\n\t *\n\t * // Sets selection to other selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const otherSelection = writer.createSelection();\n\t * selection.setTo( otherSelection );\n\t *\n\t * // Sets selection to the given document selection.\n\t * // Note: It doesn't copy selection attributes.\n\t * const documentSelection = new DocumentSelection( doc );\n\t * selection.setTo( documentSelection );\n\t *\n\t * // Sets collapsed selection at the given position.\n\t * const position = writer.createPositionFromPath( root, path );\n\t * selection.setTo( position );\n\t *\n\t * // Sets collapsed selection at the position of the given node and an offset.\n\t * selection.setTo( paragraph, offset );\n\t * ```\n\t *\n\t * Creates a range inside an {@link module:engine/model/element~Element element} which starts before the first child of\n \t * that element and ends after the last child of that element.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'in' );\n\t * ```\n\t *\n\t * Creates a range on an {@link module:engine/model/item~Item item} which starts before the item and ends just after the item.\n\t *\n\t * ```ts\n\t * selection.setTo( paragraph, 'on' );\n\t * ```\n\t *\n\t * `Selection#setTo()`' method allow passing additional options (`backward`) as the last argument.\n\t *\n\t * ```ts\n\t * // Sets backward selection.\n\t * const selection = writer.createSelection( range, { backward: true } );\n\t * ```\n\t */ setTo(...args) {\n        let [selectable, placeOrOffset, options] = args;\n        if (typeof placeOrOffset == 'object') {\n            options = placeOrOffset;\n            placeOrOffset = undefined;\n        }\n        if (selectable === null) {\n            this._setRanges([]);\n        } else if (selectable instanceof Selection) {\n            this._setRanges(selectable.getRanges(), selectable.isBackward);\n        } else if (selectable && typeof selectable.getRanges == 'function') {\n            // We assume that the selectable is a DocumentSelection.\n            // It can't be imported here, because it would lead to circular imports.\n            this._setRanges(selectable.getRanges(), selectable.isBackward);\n        } else if (selectable instanceof Range) {\n            this._setRanges([\n                selectable\n            ], !!options && !!options.backward);\n        } else if (selectable instanceof Position) {\n            this._setRanges([\n                new Range(selectable)\n            ]);\n        } else if (selectable instanceof Node$1) {\n            const backward = !!options && !!options.backward;\n            let range;\n            if (placeOrOffset == 'in') {\n                range = Range._createIn(selectable);\n            } else if (placeOrOffset == 'on') {\n                range = Range._createOn(selectable);\n            } else if (placeOrOffset !== undefined) {\n                range = new Range(Position._createAt(selectable, placeOrOffset));\n            } else {\n                /**\n\t\t\t\t * selection.setTo requires the second parameter when the first parameter is a node.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-setto-required-second-parameter\n\t\t\t\t */ throw new CKEditorError('model-selection-setto-required-second-parameter', [\n                    this,\n                    selectable\n                ]);\n            }\n            this._setRanges([\n                range\n            ], backward);\n        } else if (isIterable(selectable)) {\n            // We assume that the selectable is an iterable of ranges.\n            this._setRanges(selectable, options && !!options.backward);\n        } else {\n            /**\n\t\t\t * Cannot set the selection to the given place.\n\t\t\t *\n\t\t\t * Invalid parameters were specified when setting the selection. Common issues:\n\t\t\t *\n\t\t\t * * A {@link module:engine/model/textproxy~TextProxy} instance was passed instead of\n\t\t\t * a real {@link module:engine/model/text~Text}.\n\t\t\t * * View nodes were passed instead of model nodes.\n\t\t\t * * `null`/`undefined` was passed.\n\t\t\t *\n\t\t\t * @error model-selection-setto-not-selectable\n\t\t\t */ throw new CKEditorError('model-selection-setto-not-selectable', [\n                this,\n                selectable\n            ]);\n        }\n    }\n    /**\n\t * Replaces all ranges that were added to the selection with given array of ranges. Last range of the array\n\t * is treated like the last added range and is used to set {@link module:engine/model/selection~Selection#anchor} and\n\t * {@link module:engine/model/selection~Selection#focus}. Accepts a flag describing in which direction the selection is made.\n\t *\n\t * @fires change:range\n\t * @param newRanges Ranges to set.\n\t * @param isLastBackward Flag describing if last added range was selected forward - from start to end (`false`)\n\t * or backward - from end to start (`true`).\n\t */ _setRanges(newRanges, isLastBackward = false) {\n        const ranges = Array.from(newRanges);\n        // Check whether there is any range in new ranges set that is different than all already added ranges.\n        const anyNewRange = ranges.some((newRange)=>{\n            if (!(newRange instanceof Range)) {\n                /**\n\t\t\t\t * Selection range set to an object that is not an instance of {@link module:engine/model/range~Range}.\n\t\t\t\t *\n\t\t\t\t * Only {@link module:engine/model/range~Range} instances can be used to set a selection.\n\t\t\t\t * Common mistakes leading to this error are:\n\t\t\t\t *\n\t\t\t\t * * using DOM `Range` object,\n\t\t\t\t * * incorrect CKEditor 5 installation with multiple `ckeditor5-engine` packages having different versions.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-set-ranges-not-range\n\t\t\t\t */ throw new CKEditorError('model-selection-set-ranges-not-range', [\n                    this,\n                    newRanges\n                ]);\n            }\n            return this._ranges.every((oldRange)=>{\n                return !oldRange.isEqual(newRange);\n            });\n        });\n        // Don't do anything if nothing changed.\n        if (ranges.length === this._ranges.length && !anyNewRange) {\n            return;\n        }\n        this._replaceAllRanges(ranges);\n        this._lastRangeBackward = !!isLastBackward;\n        this.fire('change:range', {\n            directChange: true\n        });\n    }\n    /**\n\t * Moves {@link module:engine/model/selection~Selection#focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/model/writer~Writer#createPositionAt writer.createPositionAt()} parameters.\n\t *\n\t * @fires change:range\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~Item model item}.\n\t */ setFocus(itemOrPosition, offset) {\n        if (this.anchor === null) {\n            /**\n\t\t\t * Cannot set selection focus if there are no ranges in selection.\n\t\t\t *\n\t\t\t * @error model-selection-setfocus-no-ranges\n\t\t\t */ throw new CKEditorError('model-selection-setfocus-no-ranges', [\n                this,\n                itemOrPosition\n            ]);\n        }\n        const newFocus = Position._createAt(itemOrPosition, offset);\n        if (newFocus.compareWith(this.focus) == 'same') {\n            return;\n        }\n        const anchor = this.anchor;\n        if (this._ranges.length) {\n            this._popRange();\n        }\n        if (newFocus.compareWith(anchor) == 'before') {\n            this._pushRange(new Range(newFocus, anchor));\n            this._lastRangeBackward = true;\n        } else {\n            this._pushRange(new Range(anchor, newFocus));\n            this._lastRangeBackward = false;\n        }\n        this.fire('change:range', {\n            directChange: true\n        });\n    }\n    /**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */ getAttribute(key) {\n        return this._attrs.get(key);\n    }\n    /**\n\t * Returns iterable that iterates over this selection's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */ getAttributes() {\n        return this._attrs.entries();\n    }\n    /**\n\t * Returns iterable that iterates over this selection's attribute keys.\n\t */ getAttributeKeys() {\n        return this._attrs.keys();\n    }\n    /**\n\t * Checks if the selection has an attribute for given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on selection, `false` otherwise.\n\t */ hasAttribute(key) {\n        return this._attrs.has(key);\n    }\n    /**\n\t * Removes an attribute with given key from the selection.\n\t *\n\t * If given attribute was set on the selection, fires the {@link #event:change:range} event with\n\t * removed attribute key.\n\t *\n\t * @fires change:attribute\n\t * @param key Key of attribute to remove.\n\t */ removeAttribute(key) {\n        if (this.hasAttribute(key)) {\n            this._attrs.delete(key);\n            this.fire('change:attribute', {\n                attributeKeys: [\n                    key\n                ],\n                directChange: true\n            });\n        }\n    }\n    /**\n\t * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t *\n\t * If the attribute value has changed, fires the {@link #event:change:range} event with\n\t * the attribute key.\n\t *\n\t * @fires change:attribute\n\t * @param key Key of attribute to set.\n\t * @param value Attribute value.\n\t */ setAttribute(key, value) {\n        if (this.getAttribute(key) !== value) {\n            this._attrs.set(key, value);\n            this.fire('change:attribute', {\n                attributeKeys: [\n                    key\n                ],\n                directChange: true\n            });\n        }\n    }\n    /**\n\t * Returns the selected element. {@link module:engine/model/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */ getSelectedElement() {\n        if (this.rangeCount !== 1) {\n            return null;\n        }\n        return this.getFirstRange().getContainedElement();\n    }\n    /**\n\t * Gets elements of type {@link module:engine/model/schema~Schema#isBlock \"block\"} touched by the selection.\n\t *\n\t * This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t *\n\t * **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t * but will not return blocks nested in other blocks.\n\t *\n\t * In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t *\n\t * ```xml\n\t * <paragraph>[a</paragraph>\n\t * <blockQuote>\n\t * \t<paragraph>b</paragraph>\n\t * </blockQuote>\n\t * <paragraph>c]d</paragraph>\n\t * ```\n\t *\n\t * In this case the paragraph will also be returned, despite the collapsed selection:\n\t *\n\t * ```xml\n\t * <paragraph>[]a</paragraph>\n\t * ```\n\t *\n\t * In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t *\n\t * ```xml\n\t * [<blockA></blockA>\n\t * <blockB>\n\t * \t<blockC></blockC>\n\t * \t<blockD></blockD>\n\t * </blockB>\n\t * <blockE></blockE>]\n\t * ```\n\t *\n\t * If the selection is inside a block all the inner blocks (A & B) are returned:\n\t *\n\t * ```xml\n\t * <block>\n\t * \t<blockA>[a</blockA>\n\t * \t<blockB>b]</blockB>\n\t * </block>\n\t * ```\n\t *\n\t * **Special case**: Selection ignores first and/or last blocks if nothing (from user perspective) is selected in them.\n\t *\n\t * ```xml\n\t * // Selection ends and the beginning of the last block.\n\t * <paragraph>[a</paragraph>\n\t * <paragraph>b</paragraph>\n\t * <paragraph>]c</paragraph> // This block will not be returned\n\t *\n\t * // Selection begins at the end of the first block.\n\t * <paragraph>a[</paragraph> // This block will not be returned\n\t * <paragraph>b</paragraph>\n\t * <paragraph>c]</paragraph>\n\t *\n\t * // Selection begings at the end of the first block and ends at the beginning of the last block.\n\t * <paragraph>a[</paragraph> // This block will not be returned\n\t * <paragraph>b</paragraph>\n\t * <paragraph>]c</paragraph> // This block will not be returned\n\t * ```\n\t */ *getSelectedBlocks() {\n        const visited = new WeakSet();\n        for (const range of this.getRanges()){\n            // Get start block of range in case of a collapsed range.\n            const startBlock = getParentBlock$1(range.start, visited);\n            if (isStartBlockSelected(startBlock, range)) {\n                yield startBlock;\n            }\n            for (const value of range.getWalker()){\n                const block = value.item;\n                if (value.type == 'elementEnd' && isUnvisitedTopBlock(block, visited, range)) {\n                    yield block;\n                }\n            }\n            const endBlock = getParentBlock$1(range.end, visited);\n            if (isEndBlockSelected(endBlock, range)) {\n                yield endBlock;\n            }\n        }\n    }\n    /**\n\t * Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t * at a position {@link module:engine/model/position~Position#isTouching touching} the element's start and ends at position\n\t * touching the element's end.\n\t *\n\t * By default, this method will check whether the entire content of the selection's current root is selected.\n\t * Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t */ containsEntireContent(element = this.anchor.root) {\n        const limitStartPosition = Position._createAt(element, 0);\n        const limitEndPosition = Position._createAt(element, 'end');\n        return limitStartPosition.isTouching(this.getFirstPosition()) && limitEndPosition.isTouching(this.getLastPosition());\n    }\n    /**\n\t * Adds given range to internal {@link #_ranges ranges array}. Throws an error\n\t * if given range is intersecting with any range that is already stored in this selection.\n\t */ _pushRange(range) {\n        this._checkRange(range);\n        this._ranges.push(new Range(range.start, range.end));\n    }\n    /**\n\t * Checks if given range intersects with ranges that are already in the selection. Throws an error if it does.\n\t */ _checkRange(range) {\n        for(let i = 0; i < this._ranges.length; i++){\n            if (range.isIntersecting(this._ranges[i])) {\n                /**\n\t\t\t\t * Trying to add a range that intersects with another range in the selection.\n\t\t\t\t *\n\t\t\t\t * @error model-selection-range-intersects\n\t\t\t\t * @param addedRange Range that was added to the selection.\n\t\t\t\t * @param intersectingRange Range in the selection that intersects with `addedRange`.\n\t\t\t\t */ throw new CKEditorError('model-selection-range-intersects', [\n                    this,\n                    range\n                ], {\n                    addedRange: range,\n                    intersectingRange: this._ranges[i]\n                });\n            }\n        }\n    }\n    /**\n\t * Replaces all the ranges by the given ones.\n\t * Uses {@link #_popRange _popRange} and {@link #_pushRange _pushRange} to ensure proper ranges removal and addition.\n\t */ _replaceAllRanges(ranges) {\n        this._removeAllRanges();\n        for (const range of ranges){\n            this._pushRange(range);\n        }\n    }\n    /**\n\t * Deletes ranges from internal range array. Uses {@link #_popRange _popRange} to\n\t * ensure proper ranges removal.\n\t */ _removeAllRanges() {\n        while(this._ranges.length > 0){\n            this._popRange();\n        }\n    }\n    /**\n\t * Removes most recently added range from the selection.\n\t */ _popRange() {\n        this._ranges.pop();\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nSelection.prototype.is = function(type) {\n    return type === 'selection' || type === 'model:selection';\n};\n/**\n * Checks whether the given element extends $block in the schema and has a parent (is not a root).\n * Marks it as already visited.\n */ function isUnvisitedBlock(element, visited) {\n    if (visited.has(element)) {\n        return false;\n    }\n    visited.add(element);\n    return element.root.document.model.schema.isBlock(element) && !!element.parent;\n}\n/**\n * Checks if the given element is a $block was not previously visited and is a top block in a range.\n */ function isUnvisitedTopBlock(element, visited, range) {\n    return isUnvisitedBlock(element, visited) && isTopBlockInRange(element, range);\n}\n/**\n * Finds the lowest element in position's ancestors which is a block.\n * It will search until first ancestor that is a limit element.\n * Marks all ancestors as already visited to not include any of them later on.\n */ function getParentBlock$1(position, visited) {\n    const element = position.parent;\n    const schema = element.root.document.model.schema;\n    const ancestors = position.parent.getAncestors({\n        parentFirst: true,\n        includeSelf: true\n    });\n    let hasParentLimit = false;\n    const block = ancestors.find((element)=>{\n        // Stop searching after first parent node that is limit element.\n        if (hasParentLimit) {\n            return false;\n        }\n        hasParentLimit = schema.isLimit(element);\n        return !hasParentLimit && isUnvisitedBlock(element, visited);\n    });\n    // Mark all ancestors of this position's parent, because find() might've stopped early and\n    // the found block may be a child of another block.\n    ancestors.forEach((element)=>visited.add(element));\n    return block;\n}\n/**\n * Checks if the blocks is not nested in other block inside a range.\n */ function isTopBlockInRange(block, range) {\n    const parentBlock = findAncestorBlock(block);\n    if (!parentBlock) {\n        return true;\n    }\n    // Add loose flag to check as parentRange can be equal to range.\n    const isParentInRange = range.containsRange(Range._createOn(parentBlock), true);\n    return !isParentInRange;\n}\n/**\n * If a selection starts at the end of a block, that block is not returned as from the user's perspective this block wasn't selected.\n * See [#11585](https://github.com/ckeditor/ckeditor5/issues/11585) for more details.\n *\n * ```xml\n * <paragraph>a[</paragraph> // This block will not be returned\n * <paragraph>b</paragraph>\n * <paragraph>c]</paragraph>\n * ```\n *\n * Collapsed selection is not affected by it:\n *\n * ```xml\n * <paragraph>a[]</paragraph> // This block will be returned\n * ```\n */ function isStartBlockSelected(startBlock, range) {\n    if (!startBlock) {\n        return false;\n    }\n    if (range.isCollapsed || startBlock.isEmpty) {\n        return true;\n    }\n    if (range.start.isTouching(Position._createAt(startBlock, startBlock.maxOffset))) {\n        return false;\n    }\n    return isTopBlockInRange(startBlock, range);\n}\n/**\n * If a selection ends at the beginning of a block, that block is not returned as from the user's perspective this block wasn't selected.\n * See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n *\n * ```xml\n * <paragraph>[a</paragraph>\n * <paragraph>b</paragraph>\n * <paragraph>]c</paragraph> // this block will not be returned\n * ```\n *\n * Collapsed selection is not affected by it:\n *\n * ```xml\n * <paragraph>[]a</paragraph> // this block will be returned\n * ```\n */ function isEndBlockSelected(endBlock, range) {\n    if (!endBlock) {\n        return false;\n    }\n    if (range.isCollapsed || endBlock.isEmpty) {\n        return true;\n    }\n    if (range.end.isTouching(Position._createAt(endBlock, 0))) {\n        return false;\n    }\n    return isTopBlockInRange(endBlock, range);\n}\n/**\n * Returns first ancestor block of a node.\n */ function findAncestorBlock(node) {\n    const schema = node.root.document.model.schema;\n    let parent = node.parent;\n    while(parent){\n        if (schema.isBlock(parent)) {\n            return parent;\n        }\n        parent = parent.parent;\n    }\n}\n\n/**\n * `LiveRange` is a type of {@link module:engine/model/range~Range Range}\n * that updates itself as {@link module:engine/model/document~Document document}\n * is changed through operations. It may be used as a bookmark.\n *\n * **Note:** Be very careful when dealing with `LiveRange`. Each `LiveRange` instance bind events that might\n * have to be unbound. Use {@link module:engine/model/liverange~LiveRange#detach detach} whenever you don't need `LiveRange` anymore.\n */ class LiveRange extends /* #__PURE__ */ EmitterMixin(Range) {\n    /**\n\t * Creates a live range.\n\t *\n\t * @see module:engine/model/range~Range\n\t */ constructor(start, end){\n        super(start, end);\n        bindWithDocument$1.call(this);\n    }\n    /**\n\t * Unbinds all events previously bound by `LiveRange`. Use it whenever you don't need `LiveRange` instance\n\t * anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was\n\t * referring to it).\n\t */ detach() {\n        this.stopListening();\n    }\n    /**\n\t * Creates a {@link module:engine/model/range~Range range instance} that is equal to this live range.\n\t */ toRange() {\n        return new Range(this.start, this.end);\n    }\n    /**\n\t * Creates a `LiveRange` instance that is equal to the given range.\n\t */ static fromRange(range) {\n        return new LiveRange(range.start, range.end);\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nLiveRange.prototype.is = function(type) {\n    return type === 'liveRange' || type === 'model:liveRange' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n    type == 'range' || type === 'model:range';\n};\n/**\n * Binds this `LiveRange` to the {@link module:engine/model/document~Document document}\n * that owns this range's {@link module:engine/model/range~Range#root root}.\n */ function bindWithDocument$1() {\n    this.listenTo(this.root.document.model, 'applyOperation', (event, args)=>{\n        const operation = args[0];\n        if (!operation.isDocumentOperation) {\n            return;\n        }\n        transform$2.call(this, operation);\n    }, {\n        priority: 'low'\n    });\n}\n/**\n * Updates this range accordingly to the updates applied to the model. Bases on change events.\n */ function transform$2(operation) {\n    // Transform the range by the operation. Join the result ranges if needed.\n    const ranges = this.getTransformedByOperation(operation);\n    const result = Range._createFromRanges(ranges);\n    const boundariesChanged = !result.isEqual(this);\n    const contentChanged = doesOperationChangeRangeContent(this, operation);\n    let deletionPosition = null;\n    if (boundariesChanged) {\n        // If range boundaries have changed, fire `change:range` event.\n        //\n        if (result.root.rootName == '$graveyard') {\n            // If the range was moved to the graveyard root, set `deletionPosition`.\n            if (operation.type == 'remove') {\n                deletionPosition = operation.sourcePosition;\n            } else {\n                // Merge operation.\n                deletionPosition = operation.deletionPosition;\n            }\n        }\n        const oldRange = this.toRange();\n        this.start = result.start;\n        this.end = result.end;\n        this.fire('change:range', oldRange, {\n            deletionPosition\n        });\n    } else if (contentChanged) {\n        // If range boundaries have not changed, but there was change inside the range, fire `change:content` event.\n        this.fire('change:content', this.toRange(), {\n            deletionPosition\n        });\n    }\n}\n/**\n * Checks whether given operation changes something inside the range (even if it does not change boundaries).\n */ function doesOperationChangeRangeContent(range, operation) {\n    switch(operation.type){\n        case 'insert':\n            return range.containsPosition(operation.position);\n        case 'move':\n        case 'remove':\n        case 'reinsert':\n        case 'merge':\n            return range.containsPosition(operation.sourcePosition) || range.start.isEqual(operation.sourcePosition) || range.containsPosition(operation.targetPosition);\n        case 'split':\n            return range.containsPosition(operation.splitPosition) || range.containsPosition(operation.insertionPosition);\n    }\n    return false;\n}\n\nconst storePrefix = 'selection:';\n/**\n * `DocumentSelection` is a special selection which is used as the\n * {@link module:engine/model/document~Document#selection document's selection}.\n * There can be only one instance of `DocumentSelection` per document.\n *\n * Document selection can only be changed by using the {@link module:engine/model/writer~Writer} instance\n * inside the {@link module:engine/model/model~Model#change `change()`} block, as it provides a secure way to modify model.\n *\n * `DocumentSelection` is automatically updated upon changes in the {@link module:engine/model/document~Document document}\n * to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n *\n * Differences between {@link module:engine/model/selection~Selection} and `DocumentSelection` are:\n * * there is always a range in `DocumentSelection` - even if no ranges were added there is a \"default range\"\n * present in the selection,\n * * ranges added to this selection updates automatically when the document changes,\n * * attributes of `DocumentSelection` are updated automatically according to selection ranges.\n *\n * Since `DocumentSelection` uses {@link module:engine/model/liverange~LiveRange live ranges}\n * and is updated when {@link module:engine/model/document~Document document}\n * changes, it cannot be set on {@link module:engine/model/node~Node nodes}\n * that are inside {@link module:engine/model/documentfragment~DocumentFragment document fragment}.\n * If you need to represent a selection in document fragment,\n * use {@link module:engine/model/selection~Selection Selection class} instead.\n */ class DocumentSelection extends /* #__PURE__ */ EmitterMixin(TypeCheckable) {\n    /**\n\t * Selection used internally by that class (`DocumentSelection` is a proxy to that selection).\n\t */ _selection;\n    /**\n\t * Creates an empty live selection for given {@link module:engine/model/document~Document}.\n\t *\n\t * @param doc Document which owns this selection.\n\t */ constructor(doc){\n        super();\n        this._selection = new LiveSelection(doc);\n        this._selection.delegate('change:range').to(this);\n        this._selection.delegate('change:attribute').to(this);\n        this._selection.delegate('change:marker').to(this);\n    }\n    /**\n\t * Describes whether the selection is collapsed. Selection is collapsed when there is exactly one range which is\n\t * collapsed.\n\t */ get isCollapsed() {\n        return this._selection.isCollapsed;\n    }\n    /**\n\t * Selection anchor. Anchor may be described as a position where the most recent part of the selection starts.\n\t * Together with {@link #focus} they define the direction of selection, which is important\n\t * when expanding/shrinking selection. Anchor is always {@link module:engine/model/range~Range#start start} or\n\t * {@link module:engine/model/range~Range#end end} position of the most recently added range.\n\t *\n\t * Is set to `null` if there are no ranges in selection.\n\t *\n\t * @see #focus\n\t */ get anchor() {\n        return this._selection.anchor;\n    }\n    /**\n\t * Selection focus. Focus is a position where the selection ends.\n\t *\n\t * Is set to `null` if there are no ranges in selection.\n\t *\n\t * @see #anchor\n\t */ get focus() {\n        return this._selection.focus;\n    }\n    /**\n\t * Number of ranges in selection.\n\t */ get rangeCount() {\n        return this._selection.rangeCount;\n    }\n    /**\n\t * Describes whether `Documentselection` has own range(s) set, or if it is defaulted to\n\t * {@link module:engine/model/document~Document#_getDefaultRange document's default range}.\n\t */ get hasOwnRange() {\n        return this._selection.hasOwnRange;\n    }\n    /**\n\t * Specifies whether the {@link #focus}\n\t * precedes {@link #anchor}.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */ get isBackward() {\n        return this._selection.isBackward;\n    }\n    /**\n\t * Describes whether the gravity is overridden (using {@link module:engine/model/writer~Writer#overrideSelectionGravity}) or not.\n\t *\n\t * Note that the gravity remains overridden as long as will not be restored the same number of times as it was overridden.\n\t */ get isGravityOverridden() {\n        return this._selection.isGravityOverridden;\n    }\n    /**\n\t * A collection of selection {@link module:engine/model/markercollection~Marker markers}.\n\t * Marker is a selection marker when selection range is inside the marker range.\n\t *\n\t * **Note**: Only markers from {@link ~DocumentSelection#observeMarkers observed markers groups} are collected.\n\t */ get markers() {\n        return this._selection.markers;\n    }\n    /**\n\t * Used for the compatibility with the {@link module:engine/model/selection~Selection#isEqual} method.\n\t *\n\t * @internal\n\t */ get _ranges() {\n        return this._selection._ranges;\n    }\n    /**\n\t * Returns an iterable that iterates over copies of selection ranges.\n\t */ getRanges() {\n        return this._selection.getRanges();\n    }\n    /**\n\t * Returns the first position in the selection.\n\t * First position is the position that {@link module:engine/model/position~Position#isBefore is before}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getFirstPosition() {\n        return this._selection.getFirstPosition();\n    }\n    /**\n\t * Returns the last position in the selection.\n\t * Last position is the position that {@link module:engine/model/position~Position#isAfter is after}\n\t * any other position in the selection.\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getLastPosition() {\n        return this._selection.getLastPosition();\n    }\n    /**\n\t * Returns a copy of the first range in the selection.\n\t * First range is the one which {@link module:engine/model/range~Range#start start} position\n\t * {@link module:engine/model/position~Position#isBefore is before} start position of all other ranges\n\t * (not to confuse with the first range added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getFirstRange() {\n        return this._selection.getFirstRange();\n    }\n    /**\n\t * Returns a copy of the last range in the selection.\n\t * Last range is the one which {@link module:engine/model/range~Range#end end} position\n\t * {@link module:engine/model/position~Position#isAfter is after} end position of all other ranges (not to confuse with the range most\n\t * recently added to the selection).\n\t *\n\t * Returns `null` if there are no ranges in selection.\n\t */ getLastRange() {\n        return this._selection.getLastRange();\n    }\n    /**\n\t * Gets elements of type {@link module:engine/model/schema~Schema#isBlock \"block\"} touched by the selection.\n\t *\n\t * This method's result can be used for example to apply block styling to all blocks covered by this selection.\n\t *\n\t * **Note:** `getSelectedBlocks()` returns blocks that are nested in other non-block elements\n\t * but will not return blocks nested in other blocks.\n\t *\n\t * In this case the function will return exactly all 3 paragraphs (note: `<blockQuote>` is not a block itself):\n\t *\n\t * ```\n\t * <paragraph>[a</paragraph>\n\t * <blockQuote>\n\t * \t<paragraph>b</paragraph>\n\t * </blockQuote>\n\t * <paragraph>c]d</paragraph>\n\t * ```\n\t *\n\t * In this case the paragraph will also be returned, despite the collapsed selection:\n\t *\n\t * ```\n\t * <paragraph>[]a</paragraph>\n\t * ```\n\t *\n\t * In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:\n\t *\n\t * ```\n\t * [<blockA></blockA>\n\t * <blockB>\n\t * \t<blockC></blockC>\n\t * \t<blockD></blockD>\n\t * </blockB>\n\t * <blockE></blockE>]\n\t * ```\n\t *\n\t * If the selection is inside a block all the inner blocks (A & B) are returned:\n\t *\n\t * ```\n\t * <block>\n\t * \t<blockA>[a</blockA>\n\t * \t<blockB>b]</blockB>\n\t * </block>\n\t * ```\n\t *\n\t * **Special case**: If a selection ends at the beginning of a block, that block is not returned as from user perspective\n\t * this block wasn't selected. See [#984](https://github.com/ckeditor/ckeditor5-engine/issues/984) for more details.\n\t *\n\t * ```\n\t * <paragraph>[a</paragraph>\n\t * <paragraph>b</paragraph>\n\t * <paragraph>]c</paragraph> // this block will not be returned\n\t * ```\n\t */ getSelectedBlocks() {\n        return this._selection.getSelectedBlocks();\n    }\n    /**\n\t * Returns the selected element. {@link module:engine/model/element~Element Element} is considered as selected if there is only\n\t * one range in the selection, and that range contains exactly one element.\n\t * Returns `null` if there is no selected element.\n\t */ getSelectedElement() {\n        return this._selection.getSelectedElement();\n    }\n    /**\n\t * Checks whether the selection contains the entire content of the given element. This means that selection must start\n\t * at a position {@link module:engine/model/position~Position#isTouching touching} the element's start and ends at position\n\t * touching the element's end.\n\t *\n\t * By default, this method will check whether the entire content of the selection's current root is selected.\n\t * Useful to check if e.g. the user has just pressed <kbd>Ctrl</kbd> + <kbd>A</kbd>.\n\t */ containsEntireContent(element) {\n        return this._selection.containsEntireContent(element);\n    }\n    /**\n\t * Unbinds all events previously bound by document selection.\n\t */ destroy() {\n        this._selection.destroy();\n    }\n    /**\n\t * Returns iterable that iterates over this selection's attribute keys.\n\t */ getAttributeKeys() {\n        return this._selection.getAttributeKeys();\n    }\n    /**\n\t * Returns iterable that iterates over this selection's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t */ getAttributes() {\n        return this._selection.getAttributes();\n    }\n    /**\n\t * Gets an attribute value for given key or `undefined` if that attribute is not set on the selection.\n\t *\n\t * @param key Key of attribute to look for.\n\t * @returns Attribute value or `undefined`.\n\t */ getAttribute(key) {\n        return this._selection.getAttribute(key);\n    }\n    /**\n\t * Checks if the selection has an attribute for given key.\n\t *\n\t * @param key Key of attribute to check.\n\t * @returns `true` if attribute with given key is set on selection, `false` otherwise.\n\t */ hasAttribute(key) {\n        return this._selection.hasAttribute(key);\n    }\n    /**\n\t * Refreshes selection attributes and markers according to the current position in the model.\n\t */ refresh() {\n        this._selection.updateMarkers();\n        this._selection._updateAttributes(false);\n    }\n    /**\n\t * Registers a marker group prefix or a marker name to be collected in the\n\t * {@link ~DocumentSelection#markers selection markers collection}.\n\t *\n\t * See also {@link module:engine/model/markercollection~MarkerCollection#getMarkersGroup `MarkerCollection#getMarkersGroup()`}.\n\t *\n\t * @param prefixOrName The marker group prefix or marker name.\n\t */ observeMarkers(prefixOrName) {\n        this._selection.observeMarkers(prefixOrName);\n    }\n    /**\n\t * Moves {@link module:engine/model/documentselection~DocumentSelection#focus} to the specified location.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#setSelectionFocus} method.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link module:engine/model/writer~Writer#createPositionAt writer.createPositionAt()} parameters.\n\t *\n\t * @see module:engine/model/writer~Writer#setSelectionFocus\n\t * @internal\n\t * @param offset Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/model/item~Item model item}.\n\t */ _setFocus(itemOrPosition, offset) {\n        this._selection.setFocus(itemOrPosition, offset);\n    }\n    /**\n\t * Sets this selection's ranges and direction to the specified location based on the given\n\t * {@link module:engine/model/selection~Selectable selectable}.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#setSelection} method.\n\t *\n\t * @see module:engine/model/writer~Writer#setSelection\n\t * @internal\n\t */ _setTo(...args) {\n        this._selection.setTo(...args);\n    }\n    /**\n\t * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#setSelectionAttribute} method.\n\t *\n\t * @see module:engine/model/writer~Writer#setSelectionAttribute\n\t * @internal\n\t * @param key Key of the attribute to set.\n\t * @param value Attribute value.\n\t */ _setAttribute(key, value) {\n        this._selection.setAttribute(key, value);\n    }\n    /**\n\t * Removes an attribute with given key from the selection.\n\t * If the given attribute was set on the selection, fires the {@link module:engine/model/selection~Selection#event:change:range}\n\t * event with removed attribute key.\n\t * Should be used only within the {@link module:engine/model/writer~Writer#removeSelectionAttribute} method.\n\t *\n\t * @see module:engine/model/writer~Writer#removeSelectionAttribute\n\t * @internal\n\t * @param key Key of the attribute to remove.\n\t */ _removeAttribute(key) {\n        this._selection.removeAttribute(key);\n    }\n    /**\n\t * Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t *\n\t * @internal\n\t */ _getStoredAttributes() {\n        return this._selection.getStoredAttributes();\n    }\n    /**\n\t * Temporarily changes the gravity of the selection from the left to the right.\n\t *\n\t * The gravity defines from which direction the selection inherits its attributes. If it's the default left\n\t * gravity, the selection (after being moved by the the user) inherits attributes from its left hand side.\n\t * This method allows to temporarily override this behavior by forcing the gravity to the right.\n\t *\n\t * It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry\n\t * of the process.\n\t *\n\t * @see module:engine/model/writer~Writer#overrideSelectionGravity\n\t * @internal\n\t * @returns The unique id which allows restoring the gravity.\n\t */ _overrideGravity() {\n        return this._selection.overrideGravity();\n    }\n    /**\n\t * Restores the {@link ~DocumentSelection#_overrideGravity overridden gravity}.\n\t *\n\t * Restoring the gravity is only possible using the unique identifier returned by\n\t * {@link ~DocumentSelection#_overrideGravity}. Note that the gravity remains overridden as long as won't be restored\n\t * the same number of times it was overridden.\n\t *\n\t * @see module:engine/model/writer~Writer#restoreSelectionGravity\n\t * @internal\n\t * @param uid The unique id returned by {@link #_overrideGravity}.\n\t */ _restoreGravity(uid) {\n        this._selection.restoreGravity(uid);\n    }\n    /**\n\t * Generates and returns an attribute key for selection attributes store, basing on original attribute key.\n\t *\n\t * @internal\n\t * @param key Attribute key to convert.\n\t * @returns Converted attribute key, applicable for selection store.\n\t */ static _getStoreAttributeKey(key) {\n        return storePrefix + key;\n    }\n    /**\n\t * Checks whether the given attribute key is an attribute stored on an element.\n\t *\n\t * @internal\n\t */ static _isStoreAttributeKey(key) {\n        return key.startsWith(storePrefix);\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nDocumentSelection.prototype.is = function(type) {\n    return type === 'selection' || type == 'model:selection' || type == 'documentSelection' || type == 'model:documentSelection';\n};\n/**\n * `LiveSelection` is used internally by {@link module:engine/model/documentselection~DocumentSelection} and shouldn't be used directly.\n *\n * LiveSelection` is automatically updated upon changes in the {@link module:engine/model/document~Document document}\n * to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.\n *\n * Differences between {@link module:engine/model/selection~Selection} and `LiveSelection` are:\n * * there is always a range in `LiveSelection` - even if no ranges were added there is a \"default range\"\n * present in the selection,\n * * ranges added to this selection updates automatically when the document changes,\n * * attributes of `LiveSelection` are updated automatically according to selection ranges.\n */ class LiveSelection extends Selection {\n    /**\n\t * List of selection markers.\n\t * Marker is a selection marker when selection range is inside the marker range.\n\t */ markers = new Collection({\n        idProperty: 'name'\n    });\n    /**\n\t * Document which owns this selection.\n\t */ _model;\n    /**\n\t * Document which owns this selection.\n\t */ _document;\n    /**\n\t * Keeps mapping of attribute name to priority with which the attribute got modified (added/changed/removed)\n\t * last time. Possible values of priority are: `'low'` and `'normal'`.\n\t *\n\t * Priorities are used by internal `LiveSelection` mechanisms. All attributes set using `LiveSelection`\n\t * attributes API are set with `'normal'` priority.\n\t */ _attributePriority = new Map();\n    /**\n\t * Position to which the selection should be set if the last selection range was moved to the graveyard.\n\t */ _selectionRestorePosition = null;\n    /**\n\t * Flag that informs whether the selection ranges have changed. It is changed on true when `LiveRange#change:range` event is fired.\n\t */ _hasChangedRange = false;\n    /**\n\t * Each overriding gravity adds an UID to the set and each removal removes it.\n\t * Gravity is overridden when there's at least one UID in the set.\n\t * Gravity is restored when the set is empty.\n\t * This is to prevent conflicts when gravity is overridden by more than one feature at the same time.\n\t */ _overriddenGravityRegister = new Set();\n    /**\n\t * Prefixes of marker names that should affect `LiveSelection#markers` collection.\n\t */ _observedMarkers = new Set();\n    /**\n\t * Creates an empty live selection for given {@link module:engine/model/document~Document}.\n\t *\n\t * @param doc Document which owns this selection.\n\t */ constructor(doc){\n        super();\n        this._model = doc.model;\n        this._document = doc;\n        // Ensure selection is correct after each operation.\n        this.listenTo(this._model, 'applyOperation', (evt, args)=>{\n            const operation = args[0];\n            if (!operation.isDocumentOperation || operation.type == 'marker' || operation.type == 'rename' || operation.type == 'noop') {\n                return;\n            }\n            // Fix selection if the last range was removed from it and we have a position to which we can restore the selection.\n            if (this._ranges.length == 0 && this._selectionRestorePosition) {\n                this._fixGraveyardSelection(this._selectionRestorePosition);\n            }\n            // \"Forget\" the restore position even if it was not \"used\".\n            this._selectionRestorePosition = null;\n            if (this._hasChangedRange) {\n                this._hasChangedRange = false;\n                this.fire('change:range', {\n                    directChange: false\n                });\n            }\n        }, {\n            priority: 'lowest'\n        });\n        // Ensure selection is correct and up to date after each range change.\n        this.on('change:range', ()=>{\n            this._validateSelectionRanges(this.getRanges());\n        });\n        // Update markers data stored by the selection after each marker change.\n        // This handles only marker changes done through marker operations (not model tree changes).\n        this.listenTo(this._model.markers, 'update', (evt, marker, oldRange, newRange)=>{\n            this._updateMarker(marker, newRange);\n        });\n        // Ensure selection is up to date after each change block.\n        this.listenTo(this._document, 'change', (evt, batch)=>{\n            clearAttributesStoredInElement(this._model, batch);\n        });\n    }\n    get isCollapsed() {\n        const length = this._ranges.length;\n        return length === 0 ? this._document._getDefaultRange().isCollapsed : super.isCollapsed;\n    }\n    get anchor() {\n        return super.anchor || this._document._getDefaultRange().start;\n    }\n    get focus() {\n        return super.focus || this._document._getDefaultRange().end;\n    }\n    get rangeCount() {\n        return this._ranges.length ? this._ranges.length : 1;\n    }\n    /**\n\t * Describes whether `LiveSelection` has own range(s) set, or if it is defaulted to\n\t * {@link module:engine/model/document~Document#_getDefaultRange document's default range}.\n\t */ get hasOwnRange() {\n        return this._ranges.length > 0;\n    }\n    /**\n\t * When set to `true` then selection attributes on node before the caret won't be taken\n\t * into consideration while updating selection attributes.\n\t */ get isGravityOverridden() {\n        return !!this._overriddenGravityRegister.size;\n    }\n    /**\n\t * Unbinds all events previously bound by live selection.\n\t */ destroy() {\n        for(let i = 0; i < this._ranges.length; i++){\n            this._ranges[i].detach();\n        }\n        this.stopListening();\n    }\n    *getRanges() {\n        if (this._ranges.length) {\n            yield* super.getRanges();\n        } else {\n            yield this._document._getDefaultRange();\n        }\n    }\n    getFirstRange() {\n        return super.getFirstRange() || this._document._getDefaultRange();\n    }\n    getLastRange() {\n        return super.getLastRange() || this._document._getDefaultRange();\n    }\n    setTo(...args) {\n        super.setTo(...args);\n        this._updateAttributes(true);\n        this.updateMarkers();\n    }\n    setFocus(itemOrPosition, offset) {\n        super.setFocus(itemOrPosition, offset);\n        this._updateAttributes(true);\n        this.updateMarkers();\n    }\n    setAttribute(key, value) {\n        if (this._setAttribute(key, value)) {\n            // Fire event with exact data.\n            const attributeKeys = [\n                key\n            ];\n            this.fire('change:attribute', {\n                attributeKeys,\n                directChange: true\n            });\n        }\n    }\n    removeAttribute(key) {\n        if (this._removeAttribute(key)) {\n            // Fire event with exact data.\n            const attributeKeys = [\n                key\n            ];\n            this.fire('change:attribute', {\n                attributeKeys,\n                directChange: true\n            });\n        }\n    }\n    overrideGravity() {\n        const overrideUid = uid();\n        // Remember that another overriding has been requested. It will need to be removed\n        // before the gravity is to be restored.\n        this._overriddenGravityRegister.add(overrideUid);\n        if (this._overriddenGravityRegister.size === 1) {\n            this._updateAttributes(true);\n        }\n        return overrideUid;\n    }\n    restoreGravity(uid) {\n        if (!this._overriddenGravityRegister.has(uid)) {\n            /**\n\t\t\t * Restoring gravity for an unknown UID is not possible. Make sure you are using a correct\n\t\t\t * UID obtained from the {@link module:engine/model/writer~Writer#overrideSelectionGravity} to restore.\n\t\t\t *\n\t\t\t * @error document-selection-gravity-wrong-restore\n\t\t\t * @param uid The unique identifier returned by\n\t\t\t * {@link module:engine/model/documentselection~DocumentSelection#_overrideGravity}.\n\t\t\t */ throw new CKEditorError('document-selection-gravity-wrong-restore', this, {\n                uid\n            });\n        }\n        this._overriddenGravityRegister.delete(uid);\n        // Restore gravity only when all overriding have been restored.\n        if (!this.isGravityOverridden) {\n            this._updateAttributes(true);\n        }\n    }\n    observeMarkers(prefixOrName) {\n        this._observedMarkers.add(prefixOrName);\n        this.updateMarkers();\n    }\n    _replaceAllRanges(ranges) {\n        this._validateSelectionRanges(ranges);\n        super._replaceAllRanges(ranges);\n    }\n    _popRange() {\n        this._ranges.pop().detach();\n    }\n    _pushRange(range) {\n        const liveRange = this._prepareRange(range);\n        // `undefined` is returned when given `range` is in graveyard root.\n        if (liveRange) {\n            this._ranges.push(liveRange);\n        }\n    }\n    _validateSelectionRanges(ranges) {\n        for (const range of ranges){\n            if (!this._document._validateSelectionRange(range)) {\n                /**\n\t\t\t\t * Range from {@link module:engine/model/documentselection~DocumentSelection document selection}\n\t\t\t\t * starts or ends at incorrect position.\n\t\t\t\t *\n\t\t\t\t * @error document-selection-wrong-position\n\t\t\t\t * @param range\n\t\t\t\t */ throw new CKEditorError('document-selection-wrong-position', this, {\n                    range\n                });\n            }\n        }\n    }\n    /**\n\t * Prepares given range to be added to selection. Checks if it is correct,\n\t * converts it to {@link module:engine/model/liverange~LiveRange LiveRange}\n\t * and sets listeners listening to the range's change event.\n\t */ _prepareRange(range) {\n        this._checkRange(range);\n        if (range.root == this._document.graveyard) {\n            // @if CK_DEBUG // console.warn( 'Trying to add a Range that is in the graveyard root. Range rejected.' );\n            return;\n        }\n        const liveRange = LiveRange.fromRange(range);\n        // If selection range is moved to the graveyard remove it from the selection object.\n        // Also, save some data that can be used to restore selection later, on `Model#applyOperation` event.\n        liveRange.on('change:range', (evt, oldRange, data)=>{\n            this._hasChangedRange = true;\n            if (liveRange.root == this._document.graveyard) {\n                this._selectionRestorePosition = data.deletionPosition;\n                const index = this._ranges.indexOf(liveRange);\n                this._ranges.splice(index, 1);\n                liveRange.detach();\n            }\n        });\n        return liveRange;\n    }\n    updateMarkers() {\n        if (!this._observedMarkers.size) {\n            return;\n        }\n        const markers = [];\n        let changed = false;\n        for (const marker of this._model.markers){\n            const markerGroup = marker.name.split(':', 1)[0];\n            if (!this._observedMarkers.has(markerGroup)) {\n                continue;\n            }\n            const markerRange = marker.getRange();\n            for (const selectionRange of this.getRanges()){\n                if (markerRange.containsRange(selectionRange, !selectionRange.isCollapsed)) {\n                    markers.push(marker);\n                }\n            }\n        }\n        const oldMarkers = Array.from(this.markers);\n        for (const marker of markers){\n            if (!this.markers.has(marker)) {\n                this.markers.add(marker);\n                changed = true;\n            }\n        }\n        for (const marker of Array.from(this.markers)){\n            if (!markers.includes(marker)) {\n                this.markers.remove(marker);\n                changed = true;\n            }\n        }\n        if (changed) {\n            this.fire('change:marker', {\n                oldMarkers,\n                directChange: false\n            });\n        }\n    }\n    _updateMarker(marker, markerRange) {\n        const markerGroup = marker.name.split(':', 1)[0];\n        if (!this._observedMarkers.has(markerGroup)) {\n            return;\n        }\n        let changed = false;\n        const oldMarkers = Array.from(this.markers);\n        const hasMarker = this.markers.has(marker);\n        if (!markerRange) {\n            if (hasMarker) {\n                this.markers.remove(marker);\n                changed = true;\n            }\n        } else {\n            let contained = false;\n            for (const selectionRange of this.getRanges()){\n                if (markerRange.containsRange(selectionRange, !selectionRange.isCollapsed)) {\n                    contained = true;\n                    break;\n                }\n            }\n            if (contained && !hasMarker) {\n                this.markers.add(marker);\n                changed = true;\n            } else if (!contained && hasMarker) {\n                this.markers.remove(marker);\n                changed = true;\n            }\n        }\n        if (changed) {\n            this.fire('change:marker', {\n                oldMarkers,\n                directChange: false\n            });\n        }\n    }\n    /**\n\t * Updates this selection attributes according to its ranges and the {@link module:engine/model/document~Document model document}.\n\t */ _updateAttributes(clearAll) {\n        const newAttributes = toMap(this._getSurroundingAttributes());\n        const oldAttributes = toMap(this.getAttributes());\n        if (clearAll) {\n            // If `clearAll` remove all attributes and reset priorities.\n            this._attributePriority = new Map();\n            this._attrs = new Map();\n        } else {\n            // If not, remove only attributes added with `low` priority.\n            for (const [key, priority] of this._attributePriority){\n                if (priority == 'low') {\n                    this._attrs.delete(key);\n                    this._attributePriority.delete(key);\n                }\n            }\n        }\n        this._setAttributesTo(newAttributes);\n        // Let's evaluate which attributes really changed.\n        const changed = [];\n        // First, loop through all attributes that are set on selection right now.\n        // Check which of them are different than old attributes.\n        for (const [newKey, newValue] of this.getAttributes()){\n            if (!oldAttributes.has(newKey) || oldAttributes.get(newKey) !== newValue) {\n                changed.push(newKey);\n            }\n        }\n        // Then, check which of old attributes got removed.\n        for (const [oldKey] of oldAttributes){\n            if (!this.hasAttribute(oldKey)) {\n                changed.push(oldKey);\n            }\n        }\n        // Fire event with exact data (fire only if anything changed).\n        if (changed.length > 0) {\n            this.fire('change:attribute', {\n                attributeKeys: changed,\n                directChange: false\n            });\n        }\n    }\n    /**\n\t * Internal method for setting `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t * parameter).\n\t */ _setAttribute(key, value, directChange = true) {\n        const priority = directChange ? 'normal' : 'low';\n        if (priority == 'low' && this._attributePriority.get(key) == 'normal') {\n            // Priority too low.\n            return false;\n        }\n        const oldValue = super.getAttribute(key);\n        // Don't do anything if value has not changed.\n        if (oldValue === value) {\n            return false;\n        }\n        this._attrs.set(key, value);\n        // Update priorities map.\n        this._attributePriority.set(key, priority);\n        return true;\n    }\n    /**\n\t * Internal method for removing `LiveSelection` attribute. Supports attribute priorities (through `directChange`\n\t * parameter).\n\t *\n\t * NOTE: Even if attribute is not present in the selection but is provided to this method, it's priority will\n\t * be changed according to `directChange` parameter.\n\t */ _removeAttribute(key, directChange = true) {\n        const priority = directChange ? 'normal' : 'low';\n        if (priority == 'low' && this._attributePriority.get(key) == 'normal') {\n            // Priority too low.\n            return false;\n        }\n        // Update priorities map.\n        this._attributePriority.set(key, priority);\n        // Don't do anything if value has not changed.\n        if (!super.hasAttribute(key)) {\n            return false;\n        }\n        this._attrs.delete(key);\n        return true;\n    }\n    /**\n\t * Internal method for setting multiple `LiveSelection` attributes. Supports attribute priorities (through\n\t * `directChange` parameter).\n\t */ _setAttributesTo(attrs) {\n        const changed = new Set();\n        for (const [oldKey, oldValue] of this.getAttributes()){\n            // Do not remove attribute if attribute with same key and value is about to be set.\n            if (attrs.get(oldKey) === oldValue) {\n                continue;\n            }\n            // All rest attributes will be removed so changed attributes won't change .\n            this._removeAttribute(oldKey, false);\n        }\n        for (const [key, value] of attrs){\n            // Attribute may not be set because of attributes or because same key/value is already added.\n            const gotAdded = this._setAttribute(key, value, false);\n            if (gotAdded) {\n                changed.add(key);\n            }\n        }\n        return changed;\n    }\n    /**\n\t * Returns an iterable that iterates through all selection attributes stored in current selection's parent.\n\t */ *getStoredAttributes() {\n        const selectionParent = this.getFirstPosition().parent;\n        if (this.isCollapsed && selectionParent.isEmpty) {\n            for (const key of selectionParent.getAttributeKeys()){\n                if (key.startsWith(storePrefix)) {\n                    const realKey = key.substr(storePrefix.length);\n                    yield [\n                        realKey,\n                        selectionParent.getAttribute(key)\n                    ];\n                }\n            }\n        }\n    }\n    /**\n\t * Checks model text nodes that are closest to the selection's first position and returns attributes of first\n\t * found element. If there are no text nodes in selection's first position parent, it returns selection\n\t * attributes stored in that parent.\n\t */ _getSurroundingAttributes() {\n        const position = this.getFirstPosition();\n        const schema = this._model.schema;\n        if (position.root.rootName == '$graveyard') {\n            return null;\n        }\n        let attrs = null;\n        if (!this.isCollapsed) {\n            // 1. If selection is a range...\n            const range = this.getFirstRange();\n            // ...look for a first character node in that range and take attributes from it.\n            for (const value of range){\n                // If the item is an object, we don't want to get attributes from its children...\n                if (value.item.is('element') && schema.isObject(value.item)) {\n                    // ...but collect attributes from inline object.\n                    attrs = getTextAttributes(value.item, schema);\n                    break;\n                }\n                if (value.type == 'text') {\n                    attrs = value.item.getAttributes();\n                    break;\n                }\n            }\n        } else {\n            // 2. If the selection is a caret or the range does not contain a character node...\n            const nodeBefore = position.textNode ? position.textNode : position.nodeBefore;\n            const nodeAfter = position.textNode ? position.textNode : position.nodeAfter;\n            // When gravity is overridden then don't take node before into consideration.\n            if (!this.isGravityOverridden) {\n                // ...look at the node before caret and take attributes from it if it is a character node.\n                attrs = getTextAttributes(nodeBefore, schema);\n            }\n            // 3. If not, look at the node after caret...\n            if (!attrs) {\n                attrs = getTextAttributes(nodeAfter, schema);\n            }\n            // 4. If not, try to find the first character on the left, that is in the same node.\n            // When gravity is overridden then don't take node before into consideration.\n            if (!this.isGravityOverridden && !attrs) {\n                let node = nodeBefore;\n                while(node && !attrs){\n                    node = node.previousSibling;\n                    attrs = getTextAttributes(node, schema);\n                }\n            }\n            // 5. If not found, try to find the first character on the right, that is in the same node.\n            if (!attrs) {\n                let node = nodeAfter;\n                while(node && !attrs){\n                    node = node.nextSibling;\n                    attrs = getTextAttributes(node, schema);\n                }\n            }\n            // 6. If not found, selection should retrieve attributes from parent.\n            if (!attrs) {\n                attrs = this.getStoredAttributes();\n            }\n        }\n        return attrs;\n    }\n    /**\n\t * Fixes the selection after all its ranges got removed.\n\t * @param deletionPosition Position where the deletion happened.\n\t */ _fixGraveyardSelection(deletionPosition) {\n        // Find a range that is a correct selection range and is closest to the position where the deletion happened.\n        const selectionRange = this._model.schema.getNearestSelectionRange(deletionPosition);\n        // If nearest valid selection range has been found - add it in the place of old range.\n        if (selectionRange) {\n            // Check the range, convert it to live range, bind events, etc.\n            this._pushRange(selectionRange);\n        }\n    // If nearest valid selection range cannot be found don't add any range. Selection will be set to the default range.\n    }\n}\n/**\n * Helper function for {@link module:engine/model/liveselection~LiveSelection#_updateAttributes}.\n *\n * It checks if the passed model item is a text node (or text proxy) and, if so, returns it's attributes.\n * If not, it checks if item is an inline object and does the same. Otherwise it returns `null`.\n */ function getTextAttributes(node, schema) {\n    if (!node) {\n        return null;\n    }\n    if (node instanceof TextProxy || node instanceof Text) {\n        return node.getAttributes();\n    }\n    if (!schema.isInline(node)) {\n        return null;\n    }\n    // Stop on inline elements (such as `<softBreak>`) that are not objects (such as `<imageInline>` or `<mathml>`).\n    if (!schema.isObject(node)) {\n        return [];\n    }\n    const attributes = [];\n    // Collect all attributes that can be applied to the text node.\n    for (const [key, value] of node.getAttributes()){\n        if (schema.checkAttribute('$text', key) && schema.getAttributeProperties(key).copyFromObject !== false) {\n            attributes.push([\n                key,\n                value\n            ]);\n        }\n    }\n    return attributes;\n}\n/**\n * Removes selection attributes from element which is not empty anymore.\n */ function clearAttributesStoredInElement(model, batch) {\n    const differ = model.document.differ;\n    for (const entry of differ.getChanges()){\n        if (entry.type != 'insert') {\n            continue;\n        }\n        const changeParent = entry.position.parent;\n        const isNoLongerEmpty = entry.length === changeParent.maxOffset;\n        if (isNoLongerEmpty) {\n            model.enqueueChange(batch, (writer)=>{\n                const storedAttributes = Array.from(changeParent.getAttributeKeys()).filter((key)=>key.startsWith(storePrefix));\n                for (const key of storedAttributes){\n                    writer.removeAttribute(key, changeParent);\n                }\n            });\n        }\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module engine/conversion/conversionhelpers\n */ /**\n * Base class for conversion helpers.\n */ class ConversionHelpers {\n    _dispatchers;\n    /**\n\t * Creates a conversion helpers instance.\n\t */ constructor(dispatchers){\n        this._dispatchers = dispatchers;\n    }\n    /**\n\t * Registers a conversion helper.\n\t *\n\t * **Note**: See full usage example in the `{@link module:engine/conversion/conversion~Conversion#for conversion.for()}`\n\t * method description.\n\t *\n\t * @param conversionHelper The function to be called on event.\n\t */ add(conversionHelper) {\n        for (const dispatcher of this._dispatchers){\n            conversionHelper(dispatcher);\n        }\n        return this;\n    }\n}\n\n/**\n * Downcast conversion helper functions.\n *\n * Learn more about {@glink framework/deep-dive/conversion/downcast downcast helpers}.\n *\n * @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n */ class DowncastHelpers extends ConversionHelpers {\n    /**\n\t * Model element to view element conversion helper.\n\t *\n\t * This conversion results in creating a view element. For example, model `<paragraph>Foo</paragraph>` becomes `<p>Foo</p>` in the view.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'paragraph',\n\t * \tview: 'p'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'paragraph',\n\t * \tview: 'div',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'fancyParagraph',\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'fancy'\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: 'heading',\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * The element-to-element conversion supports the reconversion mechanism. It can be enabled by using either the `attributes` or\n\t * the `children` props on a model description. You will find a couple examples below.\n\t *\n\t * In order to reconvert an element if any of its direct children have been added or removed, use the `children` property on a `model`\n\t * description. For example, this model:\n\t *\n\t * ```xml\n\t * <box>\n\t * \t<paragraph>Some text.</paragraph>\n\t * </box>\n\t * ```\n\t *\n\t * will be converted into this structure in the view:\n\t *\n\t * ```html\n\t * <div class=\"box\" data-type=\"single\">\n\t * \t<p>Some text.</p>\n\t * </div>\n\t * ```\n\t *\n\t * But if more items were inserted in the model:\n\t *\n\t * ```xml\n\t * <box>\n\t * \t<paragraph>Some text.</paragraph>\n\t * \t<paragraph>Other item.</paragraph>\n\t * </box>\n\t * ```\n\t *\n\t * it will be converted into this structure in the view (note the element `data-type` change):\n\t *\n\t * ```html\n\t * <div class=\"box\" data-type=\"multiple\">\n\t * \t<p>Some text.</p>\n\t * \t<p>Other item.</p>\n\t * </div>\n\t * ```\n\t *\n\t * Such a converter would look like this (note that the `paragraph` elements are converted separately):\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: {\n\t * \t\tname: 'box',\n\t * \t\tchildren: true\n\t * \t},\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createContainerElement( 'div', {\n\t * \t\t\tclass: 'box',\n\t * \t\t\t'data-type': modelElement.childCount == 1 ? 'single' : 'multiple'\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * In order to reconvert element if any of its attributes have been updated, use the `attributes` property on a `model`\n\t * description. For example, this model:\n\t *\n\t * ```xml\n\t * <heading level=\"2\">Some text.</heading>\n\t * ```\n\t *\n\t * will be converted into this structure in the view:\n\t *\n\t * ```html\n\t * <h2>Some text.</h2>\n\t * ```\n\t *\n\t * But if the `heading` element's `level` attribute has been updated to `3` for example, then\n\t * it will be converted into this structure in the view:\n\t *\n\t * ```html\n\t * <h3>Some text.</h3>\n\t * ```\n\t *\n\t * Such a converter would look as follows:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t * \tmodel: {\n\t * \t\tname: 'heading',\n\t * \t\tattributes: 'level'\n\t * \t},\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createContainerElement( 'h' + modelElement.getAttribute( 'level' ) );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * You can read more about the element-to-element conversion in the\n\t * {@glink framework/deep-dive/conversion/downcast downcast conversion} guide.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The description or a name of the model element to convert.\n\t * @param config.model.attributes The list of attribute names that should be consumed while creating\n\t * the view element. Note that the view will be reconverted if any of the listed attributes changes.\n \t * @param config.model.children Specifies whether the view element requires reconversion if the list\n\t * of the model child nodes changed.\n\t * @param config.view A view element definition or a function that takes the model element and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as parameters and returns a view container element.\n\t */ elementToElement(config) {\n        return this.add(downcastElementToElement(config));\n    }\n    /**\n\t * The model element to view structure (several elements) conversion helper.\n\t *\n\t * This conversion results in creating a view structure with one or more slots defined for the child nodes.\n\t * For example, a model `<table>` may become this structure in the view:\n\t *\n\t * ```html\n\t * <figure class=\"table\">\n\t * \t<table>\n\t * \t\t<tbody>${ slot for table rows }</tbody>\n\t * \t</table>\n\t * </figure>\n\t * ```\n\t *\n\t * The children of the model's `<table>` element will be inserted into the `<tbody>` element.\n\t * If the `elementToElement()` helper was used, the children would be inserted into the `<figure>`.\n\t *\n\t * Imagine a table feature where for this model structure:\n\t *\n\t * ```xml\n\t * <table headingRows=\"1\">\n\t * \t<tableRow> ... table cells 1 ... </tableRow>\n\t * \t<tableRow> ... table cells 2 ... </tableRow>\n\t * \t<tableRow> ... table cells 3 ... </tableRow>\n\t * \t<caption>Caption text</caption>\n\t * </table>\n\t * ```\n\t *\n\t * we want to generate this view structure:\n\t *\n\t * ```html\n\t * <figure class=\"table\">\n\t * \t<table>\n\t * \t\t<thead>\n\t * \t\t\t<tr> ... table cells 1 ... </tr>\n\t * \t\t</thead>\n\t * \t\t<tbody>\n\t * \t\t\t<tr> ... table cells 2 ... </tr>\n\t * \t\t\t<tr> ... table cells 3 ... </tr>\n\t * \t\t</tbody>\n\t * \t</table>\n\t * \t<figcaption>Caption text</figcaption>\n\t * </figure>\n\t * ```\n\t *\n\t * The converter has to take the `headingRows` attribute into consideration when allocating the `<tableRow>` elements\n\t * into the `<tbody>` and `<thead>` elements. Hence, we need two slots and need to define proper filter callbacks for them.\n\t *\n\t * Additionally, all elements other than `<tableRow>` should be placed outside the `<table>` tag.\n\t * In the example above, this will handle the table caption.\n\t *\n\t * Such a converter would look like this:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).elementToStructure( {\n\t * \tmodel: {\n\t * \t\tname: 'table',\n\t * \t\tattributes: [ 'headingRows' ]\n\t * \t},\n\t * \tview: ( modelElement, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\tconst figureElement = writer.createContainerElement( 'figure', { class: 'table' } );\n\t * \t\tconst tableElement = writer.createContainerElement( 'table' );\n\t *\n\t * \t\twriter.insert( writer.createPositionAt( figureElement, 0 ), tableElement );\n\t *\n\t * \t\tconst headingRows = modelElement.getAttribute( 'headingRows' ) || 0;\n\t *\n\t * \t\tif ( headingRows > 0 ) {\n\t * \t\t\tconst tableHead = writer.createContainerElement( 'thead' );\n\t *\n\t * \t\t\tconst headSlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index < headingRows );\n\t *\n\t * \t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableHead );\n\t * \t\t\twriter.insert( writer.createPositionAt( tableHead, 0 ), headSlot );\n\t * \t\t}\n\t *\n\t * \t\tif ( headingRows < tableUtils.getRows( table ) ) {\n\t * \t\t\tconst tableBody = writer.createContainerElement( 'tbody' );\n\t *\n\t * \t\t\tconst bodySlot = writer.createSlot( node => node.is( 'element', 'tableRow' ) && node.index >= headingRows );\n\t *\n\t * \t\t\twriter.insert( writer.createPositionAt( tableElement, 'end' ), tableBody );\n\t * \t\t\twriter.insert( writer.createPositionAt( tableBody, 0 ), bodySlot );\n\t * \t\t}\n\t *\n\t * \t\tconst restSlot = writer.createSlot( node => !node.is( 'element', 'tableRow' ) );\n\t *\n\t * \t\twriter.insert( writer.createPositionAt( figureElement, 'end' ), restSlot );\n\t *\n\t * \t\treturn figureElement;\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Note: The children of a model element that's being converted must be allocated in the same order in the view\n\t * in which they are placed in the model.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n \t * @param config.model The description or a name of the model element to convert.\n\t * @param config.model.name The name of the model element to convert.\n \t * @param config.model.attributes The list of attribute names that should be consumed while creating\n\t * the view structure. Note that the view will be reconverted if any of the listed attributes will change.\n\t * @param config.view A function that takes the model element and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters\n\t * and returns a view container element with slots for model child nodes to be converted into.\n\t */ elementToStructure(config) {\n        return this.add(downcastElementToStructure(config));\n    }\n    /**\n\t * Model attribute to view element conversion helper.\n\t *\n\t * This conversion results in wrapping view nodes with a view attribute element. For example, a model text node with\n\t * `\"Foo\"` as data and the `bold` attribute becomes `<strong>Foo</strong>` in the view.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: 'strong'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: 'b',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'invert',\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: [ 'font-light', 'bg-dark' ]\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'fontSize',\n\t * \t\tvalues: [ 'big', 'small' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tbig: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '1.2em'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tsmall: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '0.8em'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: ( modelAttributeValue, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createAttributeElement( 'span', {\n\t * \t\t\tstyle: 'font-weight:' + modelAttributeValue\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'color',\n\t * \t\tname: '$text'\n\t * \t},\n\t * \tview: ( modelAttributeValue, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createAttributeElement( 'span', {\n\t * \t\t\tstyle: 'color:' + modelAttributeValue\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n\t * of `String`s with possible values if the model attribute is an enumerable.\n\t * @param config.view A view element definition or a function\n\t * that takes the model attribute value and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as parameters and returns a view\n\t * attribute element. If `config.model.values` is given, `config.view` should be an object assigning values from `config.model.values`\n\t * to view element definitions or functions.\n\t * @param config.converterPriority Converter priority.\n\t */ attributeToElement(config) {\n        return this.add(downcastAttributeToElement(config));\n    }\n    /**\n\t * Model attribute to view attribute conversion helper.\n\t *\n\t * This conversion results in adding an attribute to a view node, basing on an attribute from a model node. For example,\n\t * `<imageInline src='foo.jpg'></imageInline>` is converted to `<img src='foo.jpg'></img>`.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'source',\n\t * \tview: 'src'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'source',\n\t * \tview: 'href',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'imageInline',\n\t * \t\tkey: 'source'\n\t * \t},\n\t * \tview: 'src'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'styled',\n\t * \t\tvalues: [ 'dark', 'light' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tdark: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: [ 'styled', 'styled-dark' ]\n\t * \t\t},\n\t * \t\tlight: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: [ 'styled', 'styled-light' ]\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'styled',\n\t * \tview: modelAttributeValue => ( {\n\t * \t\tkey: 'class',\n\t * \t\tvalue: 'styled-' + modelAttributeValue\n\t * \t} )\n\t * } );\n\t * ```\n\t *\n\t * **Note**: Downcasting to a style property requires providing `value` as an object:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t * \tmodel: 'lineHeight',\n\t * \tview: modelAttributeValue => ( {\n\t * \t\tkey: 'style',\n\t * \t\tvalue: {\n\t * \t\t\t'line-height': modelAttributeValue,\n\t * \t\t\t'border-bottom': '1px dotted #ba2'\n\t * \t\t}\n\t * \t} )\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n\t * the attribute key, possible values and, optionally, an element name to convert from.\n\t * @param config.view A view attribute key, or a `{ key, value }` object or a function that takes the model attribute value and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as parameters and returns a `{ key, value }` object. If the `key` is `'class'`, the `value` can be a `String` or an\n\t * array of `String`s. If the `key` is `'style'`, the `value` is an object with key-value pairs. In other cases, `value` is a `String`.\n\t * If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n\t * `{ key, value }` objects or a functions.\n\t * @param config.converterPriority Converter priority.\n\t */ attributeToAttribute(config) {\n        return this.add(downcastAttributeToAttribute(config));\n    }\n    /**\n\t * Model marker to view element conversion helper.\n\t *\n\t * **Note**: This method should be used mainly for editing the downcast and it is recommended\n\t * to use the {@link #markerToData `#markerToData()`} helper instead.\n\t *\n\t * This helper may produce invalid HTML code (e.g. a span between table cells).\n\t * It should only be used when you are sure that the produced HTML will be semantically correct.\n\t *\n\t * This conversion results in creating a view element on the boundaries of the converted marker. If the converted marker\n\t * is collapsed, only one element is created. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>`\n\t * becomes `<p>F<span data-marker=\"search\"></span>oo b<span data-marker=\"search\"></span>ar</p>` in the view.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: 'marker-search'\n\t * } );\n\t *\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: 'search-result',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tattributes: {\n\t * \t\t\t'data-marker': 'search'\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t * \tmodel: 'search',\n\t * \tview: ( markerData, conversionApi ) => {\n\t * \t\tconst { writer } = conversionApi;\n\t *\n\t * \t\treturn writer.createUIElement( 'span', {\n\t * \t\t\t'data-marker': 'search',\n\t * \t\t\t'data-start': markerData.isOpening\n\t * \t\t} );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * If a function is passed as the `config.view` parameter, it will be used to generate both boundary elements. The function\n\t * receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as a parameters and should return an instance of the\n\t * {@link module:engine/view/uielement~UIElement view UI element}. The `data` object and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi `conversionApi`} are passed from\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}. Additionally,\n\t * the `data.isOpening` parameter is passed, which is set to `true` for the marker start boundary element, and `false` for\n\t * the marker end boundary element.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The name of the model marker (or model marker group) to convert.\n\t * @param config.view A view element definition or a function that takes the model marker data and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as a parameters\n\t * and returns a view UI element.\n\t * @param config.converterPriority Converter priority.\n\t */ markerToElement(config) {\n        return this.add(downcastMarkerToElement(config));\n    }\n    /**\n\t * Model marker to highlight conversion helper.\n\t *\n\t * This conversion results in creating a highlight on view nodes. For this kind of conversion,\n\t * the {@link module:engine/conversion/downcasthelpers~HighlightDescriptor} should be provided.\n\t *\n\t * For text nodes, a `<span>` {@link module:engine/view/attributeelement~AttributeElement} is created and it wraps all text nodes\n\t * in the converted marker range. For example, a model marker set like this: `<paragraph>F[oo b]ar</paragraph>` becomes\n\t * `<p>F<span class=\"comment\">oo b</span>ar</p>` in the view.\n\t *\n\t * {@link module:engine/view/containerelement~ContainerElement} may provide a custom way of handling highlight. Most often,\n\t * the element itself is given classes and attributes described in the highlight descriptor (instead of being wrapped in `<span>`).\n\t * For example, a model marker set like this:\n\t * `[<imageInline src=\"foo.jpg\"></imageInline>]` becomes `<img src=\"foo.jpg\" class=\"comment\"></img>` in the view.\n\t *\n\t * For container elements, the conversion is two-step. While the converter processes the highlight descriptor and passes it\n\t * to a container element, it is the container element instance itself that applies values from the highlight descriptor.\n\t * So, in a sense, the converter takes care of stating what should be applied on what, while the element decides how to apply that.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' ).markerToHighlight( { model: 'comment', view: { classes: 'comment' } } );\n\t *\n\t * editor.conversion.for( 'downcast' ).markerToHighlight( {\n\t * \tmodel: 'comment',\n\t * \tview: { classes: 'comment' },\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'downcast' ).markerToHighlight( {\n\t * \tmodel: 'comment',\n\t * \tview: ( data, conversionApi ) => {\n\t * \t\t// Assuming that the marker name is in a form of comment:commentType:commentId.\n\t * \t\tconst [ , commentType, commentId ] = data.markerName.split( ':' );\n\t *\n\t * \t\treturn {\n\t * \t\t\tclasses: [ 'comment', 'comment-' + commentType ],\n\t * \t\t\tattributes: { 'data-comment-id': commentId }\n\t * \t\t};\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * If a function is passed as the `config.view` parameter, it will be used to generate the highlight descriptor. The function\n\t * receives the `data` object and {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API}\n\t * as the parameters and should return a\n\t * {@link module:engine/conversion/downcasthelpers~HighlightDescriptor highlight descriptor}.\n\t * The `data` object properties are passed from {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker}.\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The name of the model marker (or model marker group) to convert.\n\t * @param config.view A highlight descriptor that will be used for highlighting or a function that takes the model marker data and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as a parameters\n\t * and returns a highlight descriptor.\n\t * @param config.converterPriority Converter priority.\n\t */ markerToHighlight(config) {\n        return this.add(downcastMarkerToHighlight(config));\n    }\n    /**\n\t * Model marker converter for data downcast.\n\t *\n\t * This conversion creates a representation for model marker boundaries in the view:\n\t *\n\t * * If the marker boundary is before or after a model element, a view attribute is set on a corresponding view element.\n\t * * In other cases, a view element with the specified tag name is inserted at the corresponding view position.\n\t *\n\t * Typically, the marker names use the `group:uniqueId:otherData` convention. For example: `comment:e34zfk9k2n459df53sjl34:zx32c`.\n\t * The default configuration for this conversion is that the first part is the `group` part and the rest of\n\t * the marker name becomes the `name` part.\n\t *\n\t * Tag and attribute names and values are generated from the marker name:\n\t *\n\t * * The templates for attributes are `data-[group]-start-before=\"[name]\"`, `data-[group]-start-after=\"[name]\"`,\n\t * `data-[group]-end-before=\"[name]\"` and `data-[group]-end-after=\"[name]\"`.\n\t * * The templates for view elements are `<[group]-start name=\"[name]\">` and `<[group]-end name=\"[name]\">`.\n\t *\n\t * Attributes mark whether the given marker's start or end boundary is before or after the given element.\n\t * The `data-[group]-start-before` and `data-[group]-end-after` attributes are favored.\n\t * The other two are used when the former two cannot be used.\n\t *\n\t * The conversion configuration can take a function that will generate different group and name parts.\n\t * If such a function is set as the `config.view` parameter, it is passed a marker name and it is expected to return an object with two\n\t * properties: `group` and `name`. If the function returns a falsy value, the conversion will not take place.\n\t *\n\t * Basic usage:\n\t *\n\t * ```ts\n\t * // Using the default conversion.\n\t * // In this case, all markers with names starting with 'comment:' will be converted.\n\t * // The `group` parameter will be set to `comment`.\n\t * // The `name` parameter will be the rest of the marker name (without the `:`).\n\t * editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t * \tmodel: 'comment'\n\t * } );\n\t * ```\n\t *\n\t * An example of a view that may be generated by this conversion (assuming a marker with the name `comment:commentId:uid` marked\n\t * by `[]`):\n\t *\n\t * ```\n\t * // Model:\n\t * <paragraph>Foo[bar</paragraph>\n\t * <imageBlock src=\"abc.jpg\"></imageBlock>]\n\t *\n\t * // View:\n\t * <p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t * <figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t * ```\n\t *\n\t * In the example above, the comment starts before \"bar\" and ends after the image.\n\t *\n\t * If the `name` part is empty, the following view may be generated:\n\t *\n\t * ```html\n\t * <p>Foo <myMarker-start></myMarker-start>bar</p>\n\t * <figure data-myMarker-end-after=\"\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t * ```\n\t *\n\t * **Note:** A situation where some markers have the `name` part and some do not, is incorrect and should be avoided.\n\t *\n\t * Examples where `data-group-start-after` and `data-group-end-before` are used:\n\t *\n\t * ```\n\t * // Model:\n\t * <blockQuote>[]<paragraph>Foo</paragraph></blockQuote>\n\t *\n\t * // View:\n\t * <blockquote><p data-group-end-before=\"name\" data-group-start-before=\"name\">Foo</p></blockquote>\n\t * ```\n\t *\n\t * Similarly, when a marker is collapsed after the last element:\n\t *\n\t * ```\n\t * // Model:\n\t * <blockQuote><paragraph>Foo</paragraph>[]</blockQuote>\n\t *\n\t * // View:\n\t * <blockquote><p data-group-end-after=\"name\" data-group-start-after=\"name\">Foo</p></blockquote>\n\t * ```\n\t *\n\t * When there are multiple markers from the same group stored in the same attribute of the same element, their\n\t * name parts are put together in the attribute value, for example: `data-group-start-before=\"name1,name2,name3\"`.\n\t *\n\t * Other examples of usage:\n\t *\n\t * ```ts\n\t * // Using a custom function which is the same as the default conversion:\n\t * editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t * \tmodel: 'comment',\n\t * \tview: markerName => ( {\n\t * \t\tgroup: 'comment',\n\t * \t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t * \t} )\n\t * } );\n\t *\n\t * // Using the converter priority:\n\t * editor.conversion.for( 'dataDowncast' ).markerToData( {\n\t * \tmodel: 'comment',\n\t * \tview: markerName => ( {\n\t * \t\tgroup: 'comment',\n\t * \t\tname: markerName.substr( 8 ) // Removes 'comment:' part.\n\t * \t} ),\n\t * \tconverterPriority: 'high'\n\t * } );\n\t * ```\n\t *\n\t * This kind of conversion is useful for saving data into the database, so it should be used in the data conversion pipeline.\n\t *\n\t * See the {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} API guide to learn how to\n\t * add a converter to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.model The name of the model marker (or the model marker group) to convert.\n\t * @param config.view A function that takes the model marker name and\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi downcast conversion API} as the parameters\n\t * and returns an object with the `group` and `name` properties.\n\t * @param config.converterPriority Converter priority.\n\t */ markerToData(config) {\n        return this.add(downcastMarkerToData(config));\n    }\n}\n/**\n * Function factory that creates a default downcast converter for text insertion changes.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n * ```ts\n * modelDispatcher.on( 'insert:$text', insertText() );\n * ```\n *\n * @returns Insert text event converter.\n */ function insertText() {\n    return (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        const viewWriter = conversionApi.writer;\n        const viewPosition = conversionApi.mapper.toViewPosition(data.range.start);\n        const viewText = viewWriter.createText(data.item.data);\n        viewWriter.insert(viewPosition, viewText);\n    };\n}\n/**\n * Function factory that creates a default downcast converter for triggering attributes and children conversion.\n *\n * @returns The converter.\n */ function insertAttributesAndChildren() {\n    return (evt, data, conversionApi)=>{\n        conversionApi.convertAttributes(data.item);\n        // Start converting children of the current item.\n        // In case of reconversion children were already re-inserted or converted separately.\n        if (!data.reconversion && data.item.is('element') && !data.item.isEmpty) {\n            conversionApi.convertChildren(data.item);\n        }\n    };\n}\n/**\n * Function factory that creates a default downcast converter for node remove changes.\n *\n * ```ts\n * modelDispatcher.on( 'remove', remove() );\n * ```\n *\n * @returns Remove event converter.\n */ function remove() {\n    return (evt, data, conversionApi)=>{\n        // Find the view range start position by mapping the model position at which the remove happened.\n        const viewStart = conversionApi.mapper.toViewPosition(data.position);\n        const modelEnd = data.position.getShiftedBy(data.length);\n        const viewEnd = conversionApi.mapper.toViewPosition(modelEnd, {\n            isPhantom: true\n        });\n        const viewRange = conversionApi.writer.createRange(viewStart, viewEnd);\n        // Trim the range to remove in case some UI elements are on the view range boundaries.\n        const removed = conversionApi.writer.remove(viewRange.getTrimmed());\n        // After the range is removed, unbind all view elements from the model.\n        // Range inside view document fragment is used to unbind deeply.\n        for (const child of conversionApi.writer.createRangeIn(removed).getItems()){\n            conversionApi.mapper.unbindViewElement(child, {\n                defer: true\n            });\n        }\n    };\n}\n/**\n * Creates a `<span>` {@link module:engine/view/attributeelement~AttributeElement view attribute element} from the information\n * provided by the {@link module:engine/conversion/downcasthelpers~HighlightDescriptor highlight descriptor} object. If the priority\n * is not provided in the descriptor, the default priority will be used.\n */ function createViewElementFromHighlightDescriptor(writer, descriptor) {\n    const viewElement = writer.createAttributeElement('span', descriptor.attributes);\n    if (descriptor.classes) {\n        viewElement._addClass(descriptor.classes);\n    }\n    if (typeof descriptor.priority === 'number') {\n        viewElement._priority = descriptor.priority;\n    }\n    viewElement._id = descriptor.id;\n    return viewElement;\n}\n/**\n * Function factory that creates a converter which converts a non-collapsed {@link module:engine/model/selection~Selection model selection}\n * to a {@link module:engine/view/documentselection~DocumentSelection view selection}. The converter consumes appropriate\n * value from the `consumable` object and maps model positions from the selection to view positions.\n *\n * ```ts\n * modelDispatcher.on( 'selection', convertRangeSelection() );\n * ```\n *\n * @returns Selection converter.\n */ function convertRangeSelection() {\n    return (evt, data, conversionApi)=>{\n        const selection = data.selection;\n        if (selection.isCollapsed) {\n            return;\n        }\n        if (!conversionApi.consumable.consume(selection, 'selection')) {\n            return;\n        }\n        const viewRanges = [];\n        for (const range of selection.getRanges()){\n            viewRanges.push(conversionApi.mapper.toViewRange(range));\n        }\n        conversionApi.writer.setSelection(viewRanges, {\n            backward: selection.isBackward\n        });\n    };\n}\n/**\n * Function factory that creates a converter which converts a collapsed {@link module:engine/model/selection~Selection model selection} to\n * a {@link module:engine/view/documentselection~DocumentSelection view selection}. The converter consumes appropriate\n * value from the `consumable` object, maps the model selection position to the view position and breaks\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements} at the selection position.\n *\n * ```ts\n * modelDispatcher.on( 'selection', convertCollapsedSelection() );\n * ```\n *\n * An example of the view state before and after converting the collapsed selection:\n *\n * ```\n *    <p><strong>f^oo<strong>bar</p>\n * -> <p><strong>f</strong>^<strong>oo</strong>bar</p>\n * ```\n *\n * By breaking attribute elements like `<strong>`, the selection is in a correct element. Then, when the selection attribute is\n * converted, broken attributes might be merged again, or the position where the selection is may be wrapped\n * with different, appropriate attribute elements.\n *\n * See also {@link module:engine/conversion/downcasthelpers~cleanSelection} which does a clean-up\n * by merging attributes.\n *\n * @returns Selection converter.\n */ function convertCollapsedSelection() {\n    return (evt, data, conversionApi)=>{\n        const selection = data.selection;\n        if (!selection.isCollapsed) {\n            return;\n        }\n        if (!conversionApi.consumable.consume(selection, 'selection')) {\n            return;\n        }\n        const viewWriter = conversionApi.writer;\n        const modelPosition = selection.getFirstPosition();\n        const viewPosition = conversionApi.mapper.toViewPosition(modelPosition);\n        const brokenPosition = viewWriter.breakAttributes(viewPosition);\n        viewWriter.setSelection(brokenPosition);\n    };\n}\n/**\n * Function factory that creates a converter which cleans artifacts after the previous\n * {@link module:engine/model/selection~Selection model selection} conversion. It removes all empty\n * {@link module:engine/view/attributeelement~AttributeElement view attribute elements} and merges sibling attributes at all start and end\n * positions of all ranges.\n *\n * ```\n *    <p><strong>^</strong></p>\n * -> <p>^</p>\n *\n *    <p><strong>foo</strong>^<strong>bar</strong>bar</p>\n * -> <p><strong>foo^bar<strong>bar</p>\n *\n *    <p><strong>foo</strong><em>^</em><strong>bar</strong>bar</p>\n * -> <p><strong>foo^bar<strong>bar</p>\n * ```\n *\n * This listener should be assigned before any converter for the new selection:\n *\n * ```ts\n * modelDispatcher.on( 'cleanSelection', cleanSelection() );\n * ```\n *\n * See {@link module:engine/conversion/downcasthelpers~convertCollapsedSelection}\n * which does the opposite by breaking attributes in the selection position.\n *\n * @returns Selection converter.\n */ function cleanSelection() {\n    return (evt, data, conversionApi)=>{\n        const viewWriter = conversionApi.writer;\n        const viewSelection = viewWriter.document.selection;\n        for (const range of viewSelection.getRanges()){\n            // Not collapsed selection should not have artifacts.\n            if (range.isCollapsed) {\n                // Position might be in the node removed by the view writer.\n                if (range.end.parent.isAttached()) {\n                    conversionApi.writer.mergeAttributes(range.start);\n                }\n            }\n        }\n        viewWriter.setSelection(null);\n    };\n}\n/**\n * Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n * It can also be used to convert selection attributes. In that case, an empty attribute element will be created and the\n * selection will be put inside it.\n *\n * Attributes from the model are converted to a view element that will be wrapping these view nodes that are bound to\n * model elements having the given attribute. This is useful for attributes like `bold` that may be set on text nodes in the model\n * but are represented as an element in the view:\n *\n * ```\n * [paragraph]              MODEL ====> VIEW        <p>\n * \t|- a {bold: true}                             |- <b>\n * \t|- b {bold: true}                             |   |- ab\n * \t|- c                                          |- c\n * \t```\n *\n * Passed `Function` will be provided with the attribute value and then all the parameters of the\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute `attribute` event}.\n * It is expected that the function returns an {@link module:engine/view/element~Element}.\n * The result of the function will be the wrapping element.\n * When the provided `Function` does not return any element, no conversion will take place.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n * ```ts\n * modelDispatcher.on( 'attribute:bold', wrap( ( modelAttributeValue, { writer } ) => {\n * \treturn writer.createAttributeElement( 'strong' );\n * } );\n * ```\n *\n * @internal\n * @param elementCreator Function returning a view element that will be used for wrapping.\n * @returns Set/change attribute converter.\n */ function wrap(elementCreator) {\n    return (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.test(data.item, evt.name)) {\n            return;\n        }\n        // Recreate current wrapping node. It will be used to unwrap view range if the attribute value has changed\n        // or the attribute was removed.\n        const oldViewElement = elementCreator(data.attributeOldValue, conversionApi, data);\n        // Create node to wrap with.\n        const newViewElement = elementCreator(data.attributeNewValue, conversionApi, data);\n        if (!oldViewElement && !newViewElement) {\n            return;\n        }\n        conversionApi.consumable.consume(data.item, evt.name);\n        const viewWriter = conversionApi.writer;\n        const viewSelection = viewWriter.document.selection;\n        if (data.item instanceof Selection || data.item instanceof DocumentSelection) {\n            // Selection attribute conversion.\n            viewWriter.wrap(viewSelection.getFirstRange(), newViewElement);\n        } else {\n            // Node attribute conversion.\n            let viewRange = conversionApi.mapper.toViewRange(data.range);\n            // First, unwrap the range from current wrapper.\n            if (data.attributeOldValue !== null && oldViewElement) {\n                viewRange = viewWriter.unwrap(viewRange, oldViewElement);\n            }\n            if (data.attributeNewValue !== null && newViewElement) {\n                viewWriter.wrap(viewRange, newViewElement);\n            }\n        }\n    };\n}\n/**\n * Function factory that creates a converter which converts node insertion changes from the model to the view.\n * The function passed will be provided with all the parameters of the dispatcher's\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert `insert` event}.\n * It is expected that the function returns an {@link module:engine/view/element~Element}.\n * The result of the function will be inserted into the view.\n *\n * The converter automatically consumes the corresponding value from the consumables list and binds the model and view elements.\n *\n * ```ts\n * downcastDispatcher.on(\n * \t'insert:myElem',\n * \tinsertElement( ( modelItem, { writer } ) => {\n * \t\tconst text = writer.createText( 'myText' );\n * \t\tconst myElem = writer.createElement( 'myElem', { myAttr: 'my-' + modelItem.getAttribute( 'myAttr' ) }, text );\n *\n * \t\t// Do something fancy with `myElem` using `modelItem` or other parameters.\n *\n * \t\treturn myElem;\n * \t}\n * ) );\n * ```\n *\n * @internal\n * @param  elementCreator Function returning a view element, which will be inserted.\n * @param consumer Function defining element consumption process.\n * By default this function just consume passed item insertion.\n * @returns Insert element event converter.\n */ function insertElement(elementCreator, consumer = defaultConsumer) {\n    return (evt, data, conversionApi)=>{\n        if (!consumer(data.item, conversionApi.consumable, {\n            preflight: true\n        })) {\n            return;\n        }\n        const viewElement = elementCreator(data.item, conversionApi, data);\n        if (!viewElement) {\n            return;\n        }\n        // Consume an element insertion and all present attributes that are specified as a reconversion triggers.\n        consumer(data.item, conversionApi.consumable);\n        const viewPosition = conversionApi.mapper.toViewPosition(data.range.start);\n        conversionApi.mapper.bindElements(data.item, viewElement);\n        conversionApi.writer.insert(viewPosition, viewElement);\n        // Convert attributes before converting children.\n        conversionApi.convertAttributes(data.item);\n        // Convert children or reinsert previous view elements.\n        reinsertOrConvertNodes(viewElement, data.item.getChildren(), conversionApi, {\n            reconversion: data.reconversion\n        });\n    };\n}\n/**\n * Function factory that creates a converter which converts a single model node insertion to a view structure.\n *\n * It is expected that the passed element creator function returns an {@link module:engine/view/element~Element} with attached slots\n * created with `writer.createSlot()` to indicate where child nodes should be converted.\n *\n * @see module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure\n *\n * @internal\n * @param elementCreator Function returning a view structure, which will be inserted.\n * @param consumer A callback that is expected to consume all the consumables\n * that were used by the element creator.\n * @returns Insert element event converter.\n*/ function insertStructure(elementCreator, consumer) {\n    return (evt, data, conversionApi)=>{\n        if (!consumer(data.item, conversionApi.consumable, {\n            preflight: true\n        })) {\n            return;\n        }\n        const slotsMap = new Map();\n        conversionApi.writer._registerSlotFactory(createSlotFactory(data.item, slotsMap, conversionApi));\n        // View creation.\n        const viewElement = elementCreator(data.item, conversionApi, data);\n        conversionApi.writer._clearSlotFactory();\n        if (!viewElement) {\n            return;\n        }\n        // Check if all children are covered by slots and there is no child that landed in multiple slots.\n        validateSlotsChildren(data.item, slotsMap, conversionApi);\n        // Consume an element insertion and all present attributes that are specified as a reconversion triggers.\n        consumer(data.item, conversionApi.consumable);\n        const viewPosition = conversionApi.mapper.toViewPosition(data.range.start);\n        conversionApi.mapper.bindElements(data.item, viewElement);\n        conversionApi.writer.insert(viewPosition, viewElement);\n        // Convert attributes before converting children.\n        conversionApi.convertAttributes(data.item);\n        // Fill view slots with previous view elements or create new ones.\n        fillSlots(viewElement, slotsMap, conversionApi, {\n            reconversion: data.reconversion\n        });\n    };\n}\n/**\n * Function factory that creates a converter which converts marker adding change to the\n * {@link module:engine/view/uielement~UIElement view UI element}.\n *\n * The view UI element that will be added to the view depends on the passed parameter. See {@link ~insertElement}.\n * In case of a non-collapsed range, the UI element will not wrap nodes but separate elements will be placed at the beginning\n * and at the end of the range.\n *\n * This converter binds created UI elements with the marker name using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n *\n * @internal\n * @param elementCreator A view UI element or a function returning the view element that will be inserted.\n * @returns Insert element event converter.\n */ function insertUIElement(elementCreator) {\n    return (evt, data, conversionApi)=>{\n        // Create two view elements. One will be inserted at the beginning of marker, one at the end.\n        // If marker is collapsed, only \"opening\" element will be inserted.\n        data.isOpening = true;\n        const viewStartElement = elementCreator(data, conversionApi);\n        data.isOpening = false;\n        const viewEndElement = elementCreator(data, conversionApi);\n        if (!viewStartElement || !viewEndElement) {\n            return;\n        }\n        const markerRange = data.markerRange;\n        // Marker that is collapsed has consumable build differently that non-collapsed one.\n        // For more information see `addMarker` event description.\n        // If marker's range is collapsed - check if it can be consumed.\n        if (markerRange.isCollapsed && !conversionApi.consumable.consume(markerRange, evt.name)) {\n            return;\n        }\n        // If marker's range is not collapsed - consume all items inside.\n        for (const value of markerRange){\n            if (!conversionApi.consumable.consume(value.item, evt.name)) {\n                return;\n            }\n        }\n        const mapper = conversionApi.mapper;\n        const viewWriter = conversionApi.writer;\n        // Add \"opening\" element.\n        viewWriter.insert(mapper.toViewPosition(markerRange.start), viewStartElement);\n        conversionApi.mapper.bindElementToMarker(viewStartElement, data.markerName);\n        // Add \"closing\" element only if range is not collapsed.\n        if (!markerRange.isCollapsed) {\n            viewWriter.insert(mapper.toViewPosition(markerRange.end), viewEndElement);\n            conversionApi.mapper.bindElementToMarker(viewEndElement, data.markerName);\n        }\n        evt.stop();\n    };\n}\n/**\n * Function factory that returns a default downcast converter for removing a {@link module:engine/view/uielement~UIElement UI element}\n * based on marker remove change.\n *\n * This converter unbinds elements from the marker name.\n *\n * @returns Removed UI element converter.\n */ function removeUIElement() {\n    return (evt, data, conversionApi)=>{\n        const elements = conversionApi.mapper.markerNameToElements(data.markerName);\n        if (!elements) {\n            return;\n        }\n        for (const element of elements){\n            conversionApi.mapper.unbindElementFromMarkerName(element, data.markerName);\n            conversionApi.writer.clear(conversionApi.writer.createRangeOn(element), element);\n        }\n        conversionApi.writer.clearClonedElementsGroup(data.markerName);\n        evt.stop();\n    };\n}\n/**\n * Function factory that creates a default converter for model markers.\n *\n * See {@link DowncastHelpers#markerToData} for more information what type of view is generated.\n *\n * This converter binds created UI elements and affected view elements with the marker name\n * using {@link module:engine/conversion/mapper~Mapper#bindElementToMarker}.\n *\n * @returns Add marker converter.\n */ function insertMarkerData(viewCreator) {\n    return (evt, data, conversionApi)=>{\n        const viewMarkerData = viewCreator(data.markerName, conversionApi);\n        if (!viewMarkerData) {\n            return;\n        }\n        const markerRange = data.markerRange;\n        if (!conversionApi.consumable.consume(markerRange, evt.name)) {\n            return;\n        }\n        // Adding closing data first to keep the proper order in the view.\n        handleMarkerBoundary(markerRange, false, conversionApi, data, viewMarkerData);\n        handleMarkerBoundary(markerRange, true, conversionApi, data, viewMarkerData);\n        evt.stop();\n    };\n}\n/**\n * Helper function for `insertMarkerData()` that marks a marker boundary at the beginning or end of given `range`.\n */ function handleMarkerBoundary(range, isStart, conversionApi, data, viewMarkerData) {\n    const modelPosition = isStart ? range.start : range.end;\n    const elementAfter = modelPosition.nodeAfter && modelPosition.nodeAfter.is('element') ? modelPosition.nodeAfter : null;\n    const elementBefore = modelPosition.nodeBefore && modelPosition.nodeBefore.is('element') ? modelPosition.nodeBefore : null;\n    if (elementAfter || elementBefore) {\n        let modelElement;\n        let isBefore;\n        // If possible, we want to add `data-group-start-before` and `data-group-end-after` attributes.\n        if (isStart && elementAfter || !isStart && !elementBefore) {\n            // [<elementAfter>...</elementAfter> -> <elementAfter data-group-start-before=\"...\">...</elementAfter>\n            // <parent>]<elementAfter> -> <parent><elementAfter data-group-end-before=\"...\">\n            modelElement = elementAfter;\n            isBefore = true;\n        } else {\n            // <elementBefore>...</elementBefore>] -> <elementBefore data-group-end-after=\"...\">...</elementBefore>\n            // </elementBefore>[</parent> -> </elementBefore data-group-start-after=\"...\"></parent>\n            modelElement = elementBefore;\n            isBefore = false;\n        }\n        const viewElement = conversionApi.mapper.toViewElement(modelElement);\n        // In rare circumstances, the model element may be not mapped to any view element and that would cause an error.\n        // One of those situations is a soft break inside code block.\n        if (viewElement) {\n            insertMarkerAsAttribute(viewElement, isStart, isBefore, conversionApi, data, viewMarkerData);\n            return;\n        }\n    }\n    const viewPosition = conversionApi.mapper.toViewPosition(modelPosition);\n    insertMarkerAsElement(viewPosition, isStart, conversionApi, data, viewMarkerData);\n}\n/**\n * Helper function for `insertMarkerData()` that marks a marker boundary in the view as an attribute on a view element.\n */ function insertMarkerAsAttribute(viewElement, isStart, isBefore, conversionApi, data, viewMarkerData) {\n    const attributeName = `data-${viewMarkerData.group}-${isStart ? 'start' : 'end'}-${isBefore ? 'before' : 'after'}`;\n    const markerNames = viewElement.hasAttribute(attributeName) ? viewElement.getAttribute(attributeName).split(',') : [];\n    // Adding marker name at the beginning to have the same order in the attribute as there is with marker elements.\n    markerNames.unshift(viewMarkerData.name);\n    conversionApi.writer.setAttribute(attributeName, markerNames.join(','), viewElement);\n    conversionApi.mapper.bindElementToMarker(viewElement, data.markerName);\n}\n/**\n * Helper function for `insertMarkerData()` that marks a marker boundary in the view as a separate view ui element.\n */ function insertMarkerAsElement(position, isStart, conversionApi, data, viewMarkerData) {\n    const viewElementName = `${viewMarkerData.group}-${isStart ? 'start' : 'end'}`;\n    const attrs = viewMarkerData.name ? {\n        'name': viewMarkerData.name\n    } : null;\n    const viewElement = conversionApi.writer.createUIElement(viewElementName, attrs);\n    conversionApi.writer.insert(position, viewElement);\n    conversionApi.mapper.bindElementToMarker(viewElement, data.markerName);\n}\n/**\n * Function factory that creates a converter for removing a model marker data added by the {@link #insertMarkerData} converter.\n *\n * @returns Remove marker converter.\n */ function removeMarkerData(viewCreator) {\n    return (evt, data, conversionApi)=>{\n        const viewData = viewCreator(data.markerName, conversionApi);\n        if (!viewData) {\n            return;\n        }\n        const elements = conversionApi.mapper.markerNameToElements(data.markerName);\n        if (!elements) {\n            return;\n        }\n        for (const element of elements){\n            conversionApi.mapper.unbindElementFromMarkerName(element, data.markerName);\n            if (element.is('containerElement')) {\n                removeMarkerFromAttribute(`data-${viewData.group}-start-before`, element);\n                removeMarkerFromAttribute(`data-${viewData.group}-start-after`, element);\n                removeMarkerFromAttribute(`data-${viewData.group}-end-before`, element);\n                removeMarkerFromAttribute(`data-${viewData.group}-end-after`, element);\n            } else {\n                conversionApi.writer.clear(conversionApi.writer.createRangeOn(element), element);\n            }\n        }\n        conversionApi.writer.clearClonedElementsGroup(data.markerName);\n        evt.stop();\n        function removeMarkerFromAttribute(attributeName, element) {\n            if (element.hasAttribute(attributeName)) {\n                const markerNames = new Set(element.getAttribute(attributeName).split(','));\n                markerNames.delete(viewData.name);\n                if (markerNames.size == 0) {\n                    conversionApi.writer.removeAttribute(attributeName, element);\n                } else {\n                    conversionApi.writer.setAttribute(attributeName, Array.from(markerNames).join(','), element);\n                }\n            }\n        }\n    };\n}\n/**\n * Function factory that creates a converter which converts the set/change/remove attribute changes from the model to the view.\n *\n * Attributes from the model are converted to the view element attributes in the view. You may provide a custom function to generate\n * a key-value attribute pair to add/change/remove. If not provided, model attributes will be converted to view element\n * attributes on a one-to-one basis.\n *\n * *Note:** The provided attribute creator should always return the same `key` for a given attribute from the model.\n *\n * The converter automatically consumes the corresponding value from the consumables list and stops the event (see\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).\n *\n * ```ts\n * modelDispatcher.on( 'attribute:customAttr:myElem', changeAttribute( ( value, data ) => {\n * \t// Change attribute key from `customAttr` to `class` in the view.\n * \tconst key = 'class';\n * \tlet value = data.attributeNewValue;\n *\n * \t// Force attribute value to 'empty' if the model element is empty.\n * \tif ( data.item.childCount === 0 ) {\n * \t\tvalue = 'empty';\n * \t}\n *\n * \t// Return the key-value pair.\n * \treturn { key, value };\n * } ) );\n * ```\n *\n * @param attributeCreator Function returning an object with two properties: `key` and `value`, which\n * represent the attribute key and attribute value to be set on a {@link module:engine/view/element~Element view element}.\n * The function is passed the model attribute value as the first parameter and additional data about the change as the second parameter.\n * @returns Set/change attribute converter.\n */ function changeAttribute(attributeCreator) {\n    return (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.test(data.item, evt.name)) {\n            return;\n        }\n        const oldAttribute = attributeCreator(data.attributeOldValue, conversionApi, data);\n        const newAttribute = attributeCreator(data.attributeNewValue, conversionApi, data);\n        if (!oldAttribute && !newAttribute) {\n            return;\n        }\n        conversionApi.consumable.consume(data.item, evt.name);\n        const viewElement = conversionApi.mapper.toViewElement(data.item);\n        const viewWriter = conversionApi.writer;\n        // If model item cannot be mapped to a view element, it means item is not an `Element` instance but a `TextProxy` node.\n        // Only elements can have attributes in a view so do not proceed for anything else (#1587).\n        if (!viewElement) {\n            /**\n\t\t\t * This error occurs when a {@link module:engine/model/textproxy~TextProxy text node's} attribute is to be downcasted\n\t\t\t * by an {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `Attribute to Attribute converter`}.\n\t\t\t * In most cases it is caused by converters misconfiguration when only \"generic\" converter is defined:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * editor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\t * \tmodel: 'attribute-name',\n\t\t\t * \tview: 'attribute-name'\n\t\t\t * } ) );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * and given attribute is used on text node, for example:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * model.change( writer => {\n\t\t\t * \twriter.insertText( 'Foo', { 'attribute-name': 'bar' }, parent, 0 );\n\t\t\t * } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * In such cases, to convert the same attribute for both {@link module:engine/model/element~Element}\n\t\t\t * and {@link module:engine/model/textproxy~TextProxy `Text`} nodes, text specific\n\t\t\t * {@link module:engine/conversion/conversion~Conversion#attributeToElement `Attribute to Element converter`}\n\t\t\t * with higher {@link module:utils/priorities~PriorityString priority} must also be defined:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * editor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\t * \tmodel: {\n\t\t\t * \t\tkey: 'attribute-name',\n\t\t\t * \t\tname: '$text'\n\t\t\t * \t},\n\t\t\t * \tview: ( value, { writer } ) => {\n\t\t\t * \t\treturn writer.createAttributeElement( 'span', { 'attribute-name': value } );\n\t\t\t * \t},\n\t\t\t * \tconverterPriority: 'high'\n\t\t\t * } ) );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @error conversion-attribute-to-attribute-on-text\n\t\t\t */ throw new CKEditorError('conversion-attribute-to-attribute-on-text', conversionApi.dispatcher, data);\n        }\n        // First remove the old attribute if there was one.\n        if (data.attributeOldValue !== null && oldAttribute) {\n            if (oldAttribute.key == 'class') {\n                const classes = typeof oldAttribute.value == 'string' ? oldAttribute.value.split(/\\s+/) : oldAttribute.value;\n                for (const className of classes){\n                    viewWriter.removeClass(className, viewElement);\n                }\n            } else if (oldAttribute.key == 'style') {\n                if (typeof oldAttribute.value == 'string') {\n                    const styles = new StylesMap(viewWriter.document.stylesProcessor);\n                    styles.setTo(oldAttribute.value);\n                    for (const [key] of styles.getStylesEntries()){\n                        viewWriter.removeStyle(key, viewElement);\n                    }\n                } else {\n                    const keys = Object.keys(oldAttribute.value);\n                    for (const key of keys){\n                        viewWriter.removeStyle(key, viewElement);\n                    }\n                }\n            } else {\n                viewWriter.removeAttribute(oldAttribute.key, viewElement);\n            }\n        }\n        // Then set the new attribute.\n        if (data.attributeNewValue !== null && newAttribute) {\n            if (newAttribute.key == 'class') {\n                const classes = typeof newAttribute.value == 'string' ? newAttribute.value.split(/\\s+/) : newAttribute.value;\n                for (const className of classes){\n                    viewWriter.addClass(className, viewElement);\n                }\n            } else if (newAttribute.key == 'style') {\n                if (typeof newAttribute.value == 'string') {\n                    const styles = new StylesMap(viewWriter.document.stylesProcessor);\n                    styles.setTo(newAttribute.value);\n                    for (const [key, value] of styles.getStylesEntries()){\n                        viewWriter.setStyle(key, value, viewElement);\n                    }\n                } else {\n                    const keys = Object.keys(newAttribute.value);\n                    for (const key of keys){\n                        viewWriter.setStyle(key, newAttribute.value[key], viewElement);\n                    }\n                }\n            } else {\n                viewWriter.setAttribute(newAttribute.key, newAttribute.value, viewElement);\n            }\n        }\n    };\n}\n/**\n * Function factory that creates a converter which converts the text inside marker's range. The converter wraps the text with\n * {@link module:engine/view/attributeelement~AttributeElement} created from the provided descriptor.\n * See {link module:engine/conversion/downcasthelpers~createViewElementFromHighlightDescriptor}.\n *\n * It can also be used to convert the selection that is inside a marker. In that case, an empty attribute element will be\n * created and the selection will be put inside it.\n *\n * If the highlight descriptor does not provide the `priority` property, `10` will be used.\n *\n * If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n *\n * This converter binds the created {@link module:engine/view/attributeelement~AttributeElement attribute elemens} with the marker name\n * using the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n */ function highlightText(highlightDescriptor) {\n    return (evt, data, conversionApi)=>{\n        if (!data.item) {\n            return;\n        }\n        if (!(data.item instanceof Selection || data.item instanceof DocumentSelection) && !data.item.is('$textProxy')) {\n            return;\n        }\n        const descriptor = prepareDescriptor(highlightDescriptor, data, conversionApi);\n        if (!descriptor) {\n            return;\n        }\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        const viewWriter = conversionApi.writer;\n        const viewElement = createViewElementFromHighlightDescriptor(viewWriter, descriptor);\n        const viewSelection = viewWriter.document.selection;\n        if (data.item instanceof Selection || data.item instanceof DocumentSelection) {\n            viewWriter.wrap(viewSelection.getFirstRange(), viewElement);\n        } else {\n            const viewRange = conversionApi.mapper.toViewRange(data.range);\n            const rangeAfterWrap = viewWriter.wrap(viewRange, viewElement);\n            for (const element of rangeAfterWrap.getItems()){\n                if (element.is('attributeElement') && element.isSimilar(viewElement)) {\n                    conversionApi.mapper.bindElementToMarker(element, data.markerName);\n                    break;\n                }\n            }\n        }\n    };\n}\n/**\n * Converter function factory. It creates a function which applies the marker's highlight to an element inside the marker's range.\n *\n * The converter checks if an element has the `addHighlight` function stored as a\n * {@link module:engine/view/element~Element#_setCustomProperty custom property} and, if so, uses it to apply the highlight.\n * In such case the converter will consume all element's children, assuming that they were handled by the element itself.\n *\n * When the `addHighlight` custom property is not present, the element is not converted in any special way.\n * This means that converters will proceed to convert the element's child nodes.\n *\n * If the highlight descriptor does not provide the `priority` property, `10` will be used.\n *\n * If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n *\n * This converter binds altered {@link module:engine/view/containerelement~ContainerElement container elements} with the marker name using\n * the {@link module:engine/conversion/mapper~Mapper#bindElementToMarker} method.\n */ function highlightElement(highlightDescriptor) {\n    return (evt, data, conversionApi)=>{\n        if (!data.item) {\n            return;\n        }\n        if (!(data.item instanceof Element)) {\n            return;\n        }\n        const descriptor = prepareDescriptor(highlightDescriptor, data, conversionApi);\n        if (!descriptor) {\n            return;\n        }\n        if (!conversionApi.consumable.test(data.item, evt.name)) {\n            return;\n        }\n        const viewElement = conversionApi.mapper.toViewElement(data.item);\n        if (viewElement && viewElement.getCustomProperty('addHighlight')) {\n            // Consume element itself.\n            conversionApi.consumable.consume(data.item, evt.name);\n            // Consume all children nodes.\n            for (const value of Range._createIn(data.item)){\n                conversionApi.consumable.consume(value.item, evt.name);\n            }\n            const addHighlightCallback = viewElement.getCustomProperty('addHighlight');\n            addHighlightCallback(viewElement, descriptor, conversionApi.writer);\n            conversionApi.mapper.bindElementToMarker(viewElement, data.markerName);\n        }\n    };\n}\n/**\n * Function factory that creates a converter which converts the removing model marker to the view.\n *\n * Both text nodes and elements are handled by this converter but they are handled a bit differently.\n *\n * Text nodes are unwrapped using the {@link module:engine/view/attributeelement~AttributeElement attribute element} created from the\n * provided highlight descriptor. See {link module:engine/conversion/downcasthelpers~HighlightDescriptor}.\n *\n * For elements, the converter checks if an element has the `removeHighlight` function stored as a\n * {@link module:engine/view/element~Element#_setCustomProperty custom property}. If so, it uses it to remove the highlight.\n * In such case, the children of that element will not be converted.\n *\n * When `removeHighlight` is not present, the element is not converted in any special way.\n * The converter will proceed to convert the element's child nodes instead.\n *\n * If the highlight descriptor does not provide the `priority` property, `10` will be used.\n *\n * If the highlight descriptor does not provide the `id` property, the name of the marker will be used.\n *\n * This converter unbinds elements from the marker name.\n */ function removeHighlight(highlightDescriptor) {\n    return (evt, data, conversionApi)=>{\n        // This conversion makes sense only for non-collapsed range.\n        if (data.markerRange.isCollapsed) {\n            return;\n        }\n        const descriptor = prepareDescriptor(highlightDescriptor, data, conversionApi);\n        if (!descriptor) {\n            return;\n        }\n        // View element that will be used to unwrap `AttributeElement`s.\n        const viewHighlightElement = createViewElementFromHighlightDescriptor(conversionApi.writer, descriptor);\n        // Get all elements bound with given marker name.\n        const elements = conversionApi.mapper.markerNameToElements(data.markerName);\n        if (!elements) {\n            return;\n        }\n        for (const element of elements){\n            conversionApi.mapper.unbindElementFromMarkerName(element, data.markerName);\n            if (element.is('attributeElement')) {\n                conversionApi.writer.unwrap(conversionApi.writer.createRangeOn(element), viewHighlightElement);\n            } else {\n                // if element.is( 'containerElement' ).\n                const removeHighlightCallback = element.getCustomProperty('removeHighlight');\n                removeHighlightCallback(element, descriptor.id, conversionApi.writer);\n            }\n        }\n        conversionApi.writer.clearClonedElementsGroup(data.markerName);\n        evt.stop();\n    };\n}\n/**\n * Model element to view element conversion helper.\n *\n * See {@link ~DowncastHelpers#elementToElement `.elementToElement()` downcast helper} for examples and config params description.\n *\n * @param config Conversion configuration.\n * @param config.model The description or a name of the model element to convert.\n * @param config.model.attributes List of attributes triggering element reconversion.\n * @param config.model.children Should reconvert element if the list of model child nodes changed.\n * @returns Conversion helper.\n */ function downcastElementToElement(config) {\n    const model = normalizeModelElementConfig(config.model);\n    const view = normalizeToElementConfig(config.view, 'container');\n    // Trigger reconversion on children list change if element is a subject to any reconversion.\n    // This is required to be able to trigger Differ#refreshItem() on a direct child of the reconverted element.\n    if (model.attributes.length) {\n        model.children = true;\n    }\n    return (dispatcher)=>{\n        dispatcher.on(`insert:${model.name}`, insertElement(view, createConsumer(model)), {\n            priority: config.converterPriority || 'normal'\n        });\n        if (model.children || model.attributes.length) {\n            dispatcher.on('reduceChanges', createChangeReducer(model), {\n                priority: 'low'\n            });\n        }\n    };\n}\n/**\n * Model element to view structure conversion helper.\n *\n * See {@link ~DowncastHelpers#elementToStructure `.elementToStructure()` downcast helper} for examples and config params description.\n *\n * @param config Conversion configuration.\n * @returns Conversion helper.\n */ function downcastElementToStructure(config) {\n    const model = normalizeModelElementConfig(config.model);\n    const view = normalizeToElementConfig(config.view, 'container');\n    // Trigger reconversion on children list change because it always needs to use slots to put children in proper places.\n    // This is required to be able to trigger Differ#refreshItem() on a direct child of the reconverted element.\n    model.children = true;\n    return (dispatcher)=>{\n        if (dispatcher._conversionApi.schema.checkChild(model.name, '$text')) {\n            /**\n\t\t\t * This error occurs when a {@link module:engine/model/element~Element model element} is downcasted\n\t\t\t * via {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToStructure} helper but the element was\n\t\t\t * allowed to host `$text` by the {@link module:engine/model/schema~Schema model schema}.\n\t\t\t *\n\t\t\t * For instance, this may be the result of `myElement` allowing the content of\n\t\t\t * {@glink framework/deep-dive/schema#generic-items `$block`} in its schema definition:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * // Element definition in schema.\n\t\t\t * schema.register( 'myElement', {\n\t\t\t * \tallowContentOf: '$block',\n\t\t\t *\n\t\t\t * \t// ...\n\t\t\t * } );\n\t\t\t *\n\t\t\t * // ...\n\t\t\t *\n\t\t\t * // Conversion of myElement with the use of elementToStructure().\n\t\t\t * editor.conversion.for( 'downcast' ).elementToStructure( {\n\t\t\t * \tmodel: 'myElement',\n\t\t\t * \tview: ( modelElement, { writer } ) => {\n\t\t\t * \t\t// ...\n\t\t\t * \t}\n\t\t\t * } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * In such case, {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`} helper\n\t\t\t * can be used instead to get around this problem:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * editor.conversion.for( 'downcast' ).elementToElement( {\n\t\t\t * \tmodel: 'myElement',\n\t\t\t * \tview: ( modelElement, { writer } ) => {\n\t\t\t * \t\t// ...\n\t\t\t * \t}\n\t\t\t * } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @error conversion-element-to-structure-disallowed-text\n\t\t\t * @param {String} elementName The name of the element the structure is to be created for.\n\t\t\t */ throw new CKEditorError('conversion-element-to-structure-disallowed-text', dispatcher, {\n                elementName: model.name\n            });\n        }\n        dispatcher.on(`insert:${model.name}`, insertStructure(view, createConsumer(model)), {\n            priority: config.converterPriority || 'normal'\n        });\n        dispatcher.on('reduceChanges', createChangeReducer(model), {\n            priority: 'low'\n        });\n    };\n}\n/**\n * Model attribute to view element conversion helper.\n *\n * See {@link ~DowncastHelpers#attributeToElement `.attributeToElement()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The key of the attribute to convert from or a `{ key, values }` object. `values` is an array\n * of `String`s with possible values if the model attribute is an enumerable.\n * @param config.view A view element definition or a function that takes the model attribute value and\n * {@link module:engine/view/downcastwriter~DowncastWriter view downcast writer} as parameters and returns a view attribute element.\n * If `config.model.values` is given, `config.view` should be an object assigning values from `config.model.values` to view element\n * definitions or functions.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */ function downcastAttributeToElement(config) {\n    config = cloneDeep(config);\n    let model = config.model;\n    if (typeof model == 'string') {\n        model = {\n            key: model\n        };\n    }\n    let eventName = `attribute:${model.key}`;\n    if (model.name) {\n        eventName += ':' + model.name;\n    }\n    if (model.values) {\n        for (const modelValue of model.values){\n            config.view[modelValue] = normalizeToElementConfig(config.view[modelValue], 'attribute');\n        }\n    } else {\n        config.view = normalizeToElementConfig(config.view, 'attribute');\n    }\n    const elementCreator = getFromAttributeCreator(config);\n    return (dispatcher)=>{\n        dispatcher.on(eventName, wrap(elementCreator), {\n            priority: config.converterPriority || 'normal'\n        });\n    };\n}\n/**\n * Model attribute to view attribute conversion helper.\n *\n * See {@link ~DowncastHelpers#attributeToAttribute `.attributeToAttribute()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The key of the attribute to convert from or a `{ key, values, [ name ] }` object describing\n * the attribute key, possible values and, optionally, an element name to convert from.\n * @param config.view A view attribute key, or a `{ key, value }` object or a function that takes the model attribute value and returns\n * a `{ key, value }` object.\n * If `key` is `'class'`, `value` can be a `String` or an array of `String`s. If `key` is `'style'`, `value` is an object with\n * key-value pairs. In other cases, `value` is a `String`.\n * If `config.model.values` is set, `config.view` should be an object assigning values from `config.model.values` to\n * `{ key, value }` objects or a functions.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */ function downcastAttributeToAttribute(config) {\n    config = cloneDeep(config);\n    let model = config.model;\n    if (typeof model == 'string') {\n        model = {\n            key: model\n        };\n    }\n    let eventName = `attribute:${model.key}`;\n    if (model.name) {\n        eventName += ':' + model.name;\n    }\n    if (model.values) {\n        for (const modelValue of model.values){\n            config.view[modelValue] = normalizeToAttributeConfig(config.view[modelValue]);\n        }\n    } else {\n        config.view = normalizeToAttributeConfig(config.view);\n    }\n    const elementCreator = getFromAttributeCreator(config);\n    return (dispatcher)=>{\n        dispatcher.on(eventName, changeAttribute(elementCreator), {\n            priority: config.converterPriority || 'normal'\n        });\n    };\n}\n/**\n * Model marker to view element conversion helper.\n *\n * See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The name of the model marker (or model marker group) to convert.\n * @param config.view A view element definition or a function that takes the model marker data as a parameter and returns a view UI element.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */ function downcastMarkerToElement(config) {\n    const view = normalizeToElementConfig(config.view, 'ui');\n    return (dispatcher)=>{\n        dispatcher.on(`addMarker:${config.model}`, insertUIElement(view), {\n            priority: config.converterPriority || 'normal'\n        });\n        dispatcher.on(`removeMarker:${config.model}`, removeUIElement(), {\n            priority: config.converterPriority || 'normal'\n        });\n    };\n}\n/**\n * Model marker to view data conversion helper.\n *\n * See {@link ~DowncastHelpers#markerToData `markerToData()` downcast helper} to learn more.\n *\n * @returns Conversion helper.\n */ function downcastMarkerToData(config) {\n    config = cloneDeep(config);\n    const group = config.model;\n    let view = config.view;\n    // Default conversion.\n    if (!view) {\n        view = (markerName)=>({\n                group,\n                name: markerName.substr(config.model.length + 1)\n            });\n    }\n    return (dispatcher)=>{\n        dispatcher.on(`addMarker:${group}`, insertMarkerData(view), {\n            priority: config.converterPriority || 'normal'\n        });\n        dispatcher.on(`removeMarker:${group}`, removeMarkerData(view), {\n            priority: config.converterPriority || 'normal'\n        });\n    };\n}\n/**\n * Model marker to highlight conversion helper.\n *\n * See {@link ~DowncastHelpers#markerToElement `.markerToElement()` downcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.model The name of the model marker (or model marker group) to convert.\n * @param config.view A highlight descriptor that will be used for highlighting or a function that takes\n * the model marker data as a parameter and returns a highlight descriptor.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */ function downcastMarkerToHighlight(config) {\n    return (dispatcher)=>{\n        dispatcher.on(`addMarker:${config.model}`, highlightText(config.view), {\n            priority: config.converterPriority || 'normal'\n        });\n        dispatcher.on(`addMarker:${config.model}`, highlightElement(config.view), {\n            priority: config.converterPriority || 'normal'\n        });\n        dispatcher.on(`removeMarker:${config.model}`, removeHighlight(config.view), {\n            priority: config.converterPriority || 'normal'\n        });\n    };\n}\n/**\n * Takes `config.model`, and converts it to an object with normalized structure.\n *\n * @param model Model configuration or element name.\n */ function normalizeModelElementConfig(model) {\n    if (typeof model == 'string') {\n        model = {\n            name: model\n        };\n    }\n    return {\n        name: model.name,\n        attributes: model.attributes ? toArray(model.attributes) : [],\n        children: !!model.children\n    };\n}\n/**\n * Takes `config.view`, and if it is an {@link module:engine/view/elementdefinition~ElementDefinition}, converts it\n * to a function (because lower level converters accept only element creator functions).\n *\n * @param view View configuration.\n * @param viewElementType View element type to create.\n * @returns Element creator function to use in lower level converters.\n */ function normalizeToElementConfig(view, viewElementType) {\n    if (typeof view == 'function') {\n        // If `view` is already a function, don't do anything.\n        return view;\n    }\n    return (modelData, conversionApi)=>createViewElementFromDefinition(view, conversionApi, viewElementType);\n}\n/**\n * Creates a view element instance from the provided {@link module:engine/view/elementdefinition~ElementDefinition} and class.\n */ function createViewElementFromDefinition(viewElementDefinition, conversionApi, viewElementType) {\n    if (typeof viewElementDefinition == 'string') {\n        // If `viewElementDefinition` is given as a `String`, normalize it to an object with `name` property.\n        viewElementDefinition = {\n            name: viewElementDefinition\n        };\n    }\n    let element;\n    const viewWriter = conversionApi.writer;\n    const attributes = Object.assign({}, viewElementDefinition.attributes);\n    if (viewElementType == 'container') {\n        element = viewWriter.createContainerElement(viewElementDefinition.name, attributes);\n    } else if (viewElementType == 'attribute') {\n        const options = {\n            priority: viewElementDefinition.priority || AttributeElement.DEFAULT_PRIORITY\n        };\n        element = viewWriter.createAttributeElement(viewElementDefinition.name, attributes, options);\n    } else {\n        // 'ui'.\n        element = viewWriter.createUIElement(viewElementDefinition.name, attributes);\n    }\n    if (viewElementDefinition.styles) {\n        const keys = Object.keys(viewElementDefinition.styles);\n        for (const key of keys){\n            viewWriter.setStyle(key, viewElementDefinition.styles[key], element);\n        }\n    }\n    if (viewElementDefinition.classes) {\n        const classes = viewElementDefinition.classes;\n        if (typeof classes == 'string') {\n            viewWriter.addClass(classes, element);\n        } else {\n            for (const className of classes){\n                viewWriter.addClass(className, element);\n            }\n        }\n    }\n    return element;\n}\nfunction getFromAttributeCreator(config) {\n    if (config.model.values) {\n        return (modelAttributeValue, conversionApi, data)=>{\n            const view = config.view[modelAttributeValue];\n            if (view) {\n                return view(modelAttributeValue, conversionApi, data);\n            }\n            return null;\n        };\n    } else {\n        return config.view;\n    }\n}\n/**\n * Takes the configuration, adds default parameters if they do not exist and normalizes other parameters to be used in downcast converters\n * for generating a view attribute.\n *\n * @param view View configuration.\n */ function normalizeToAttributeConfig(view) {\n    if (typeof view == 'string') {\n        return (modelAttributeValue)=>({\n                key: view,\n                value: modelAttributeValue\n            });\n    } else if (typeof view == 'object') {\n        // { key, value, ... }\n        if (view.value) {\n            return ()=>view;\n        } else {\n            return (modelAttributeValue)=>({\n                    key: view.key,\n                    value: modelAttributeValue\n                });\n        }\n    } else {\n        // function.\n        return view;\n    }\n}\n/**\n * Helper function for `highlight`. Prepares the actual descriptor object using value passed to the converter.\n */ function prepareDescriptor(highlightDescriptor, data, conversionApi) {\n    // If passed descriptor is a creator function, call it. If not, just use passed value.\n    const descriptor = typeof highlightDescriptor == 'function' ? highlightDescriptor(data, conversionApi) : highlightDescriptor;\n    if (!descriptor) {\n        return null;\n    }\n    // Apply default descriptor priority.\n    if (!descriptor.priority) {\n        descriptor.priority = 10;\n    }\n    // Default descriptor id is marker name.\n    if (!descriptor.id) {\n        descriptor.id = data.markerName;\n    }\n    return descriptor;\n}\n/**\n * Creates a function that checks a single differ diff item whether it should trigger reconversion.\n *\n * @param model A normalized `config.model` converter configuration.\n * @param model.name The name of element.\n * @param model.attributes The list of attribute names that should trigger reconversion.\n * @param model.children Whether the child list change should trigger reconversion.\n */ function createChangeReducerCallback(model) {\n    return (node, change)=>{\n        if (!node.is('element', model.name)) {\n            return false;\n        }\n        if (change.type == 'attribute') {\n            if (model.attributes.includes(change.attributeKey)) {\n                return true;\n            }\n        } else {\n            /* istanbul ignore else: This is always true because otherwise it would not register a reducer callback. -- @preserve */ if (model.children) {\n                return true;\n            }\n        }\n        return false;\n    };\n}\n/**\n * Creates a `reduceChanges` event handler for reconversion.\n *\n * @param model A normalized `config.model` converter configuration.\n * @param model.name The name of element.\n * @param model.attributes The list of attribute names that should trigger reconversion.\n * @param model.children Whether the child list change should trigger reconversion.\n */ function createChangeReducer(model) {\n    const shouldReplace = createChangeReducerCallback(model);\n    return (evt, data)=>{\n        const reducedChanges = [];\n        if (!data.reconvertedElements) {\n            data.reconvertedElements = new Set();\n        }\n        for (const change of data.changes){\n            // For attribute use node affected by the change.\n            // For insert or remove use parent element because we need to check if it's added/removed child.\n            const node = change.type == 'attribute' ? change.range.start.nodeAfter : change.position.parent;\n            if (!node || !shouldReplace(node, change)) {\n                reducedChanges.push(change);\n                continue;\n            }\n            // If it's already marked for reconversion, so skip this change, otherwise add the diff items.\n            if (!data.reconvertedElements.has(node)) {\n                data.reconvertedElements.add(node);\n                const position = Position._createBefore(node);\n                let changeIndex = reducedChanges.length;\n                // We need to insert remove+reinsert before any other change on and inside the re-converted element.\n                // This is important because otherwise we would remove element that had already been modified by the previous change.\n                // Note that there could be some element removed before the re-converted element, so we must not break this behavior.\n                for(let i = reducedChanges.length - 1; i >= 0; i--){\n                    const change = reducedChanges[i];\n                    const changePosition = change.type == 'attribute' ? change.range.start : change.position;\n                    const positionRelation = changePosition.compareWith(position);\n                    if (positionRelation == 'before' || change.type == 'remove' && positionRelation == 'same') {\n                        break;\n                    }\n                    changeIndex = i;\n                }\n                reducedChanges.splice(changeIndex, 0, {\n                    type: 'remove',\n                    name: node.name,\n                    position,\n                    length: 1\n                }, {\n                    type: 'reinsert',\n                    name: node.name,\n                    position,\n                    length: 1\n                });\n            }\n        }\n        data.changes = reducedChanges;\n    };\n}\n/**\n * Creates a function that checks if an element and its watched attributes can be consumed and consumes them.\n *\n * @param model A normalized `config.model` converter configuration.\n * @param model.name The name of element.\n * @param model.attributes The list of attribute names that should trigger reconversion.\n * @param model.children Whether the child list change should trigger reconversion.\n */ function createConsumer(model) {\n    return (node, consumable, options = {})=>{\n        const events = [\n            'insert'\n        ];\n        // Collect all set attributes that are triggering conversion.\n        for (const attributeName of model.attributes){\n            if (node.hasAttribute(attributeName)) {\n                events.push(`attribute:${attributeName}`);\n            }\n        }\n        if (!events.every((event)=>consumable.test(node, event))) {\n            return false;\n        }\n        if (!options.preflight) {\n            events.forEach((event)=>consumable.consume(node, event));\n        }\n        return true;\n    };\n}\n/**\n * Creates a function that create view slots.\n *\n * @returns Function exposed by writer as createSlot().\n */ function createSlotFactory(element, slotsMap, conversionApi) {\n    return (writer, modeOrFilter)=>{\n        const slot = writer.createContainerElement('$slot');\n        let children = null;\n        if (modeOrFilter === 'children') {\n            children = Array.from(element.getChildren());\n        } else if (typeof modeOrFilter == 'function') {\n            children = Array.from(element.getChildren()).filter((element)=>modeOrFilter(element));\n        } else {\n            /**\n\t\t\t * Unknown slot mode was provided to `writer.createSlot()` in downcast converter.\n\t\t\t *\n\t\t\t * @error conversion-slot-mode-unknown\n\t\t\t */ throw new CKEditorError('conversion-slot-mode-unknown', conversionApi.dispatcher, {\n                modeOrFilter\n            });\n        }\n        slotsMap.set(slot, children);\n        return slot;\n    };\n}\n/**\n * Checks if all children are covered by slots and there is no child that landed in multiple slots.\n */ function validateSlotsChildren(element, slotsMap, conversionApi) {\n    const childrenInSlots = Array.from(slotsMap.values()).flat();\n    const uniqueChildrenInSlots = new Set(childrenInSlots);\n    if (uniqueChildrenInSlots.size != childrenInSlots.length) {\n        /**\n\t\t * Filters provided to `writer.createSlot()` overlap (at least two filters accept the same child element).\n\t\t *\n\t\t * @error conversion-slot-filter-overlap\n\t\t * @param {module:engine/model/element~Element} element The element of which children would not be properly\n\t\t * allocated to multiple slots.\n\t\t */ throw new CKEditorError('conversion-slot-filter-overlap', conversionApi.dispatcher, {\n            element\n        });\n    }\n    if (uniqueChildrenInSlots.size != element.childCount) {\n        /**\n\t\t * Filters provided to `writer.createSlot()` are incomplete and exclude at least one children element (one of\n\t\t * the children elements would not be assigned to any of the slots).\n\t\t *\n\t\t * @error conversion-slot-filter-incomplete\n\t\t * @param {module:engine/model/element~Element} element The element of which children would not be properly\n\t\t * allocated to multiple slots.\n\t\t */ throw new CKEditorError('conversion-slot-filter-incomplete', conversionApi.dispatcher, {\n            element\n        });\n    }\n}\n/**\n * Fill slots with appropriate view elements.\n */ function fillSlots(viewElement, slotsMap, conversionApi, options) {\n    // Set temporary position mapping to redirect child view elements into a proper slots.\n    conversionApi.mapper.on('modelToViewPosition', toViewPositionMapping, {\n        priority: 'highest'\n    });\n    let currentSlot = null;\n    let currentSlotNodes = null;\n    // Fill slots with nested view nodes.\n    for ([currentSlot, currentSlotNodes] of slotsMap){\n        reinsertOrConvertNodes(viewElement, currentSlotNodes, conversionApi, options);\n        conversionApi.writer.move(conversionApi.writer.createRangeIn(currentSlot), conversionApi.writer.createPositionBefore(currentSlot));\n        conversionApi.writer.remove(currentSlot);\n    }\n    conversionApi.mapper.off('modelToViewPosition', toViewPositionMapping);\n    function toViewPositionMapping(evt, data) {\n        const element = data.modelPosition.nodeAfter;\n        // Find the proper offset within the slot.\n        const index = currentSlotNodes.indexOf(element);\n        if (index < 0) {\n            return;\n        }\n        data.viewPosition = data.mapper.findPositionIn(currentSlot, index);\n    }\n}\n/**\n * Inserts view representation of `nodes` into the `viewElement` either by bringing back just removed view nodes\n * or by triggering conversion for them.\n */ function reinsertOrConvertNodes(viewElement, modelNodes, conversionApi, options) {\n    // Fill with nested view nodes.\n    for (const modelChildNode of modelNodes){\n        // Try reinserting the view node for the specified model node...\n        if (!reinsertNode(viewElement.root, modelChildNode, conversionApi, options)) {\n            // ...or else convert the model element to the view.\n            conversionApi.convertItem(modelChildNode);\n        }\n    }\n}\n/**\n * Checks if the view for the given model element could be reused and reinserts it to the view.\n *\n * @returns `false` if view element can't be reused.\n */ function reinsertNode(viewRoot, modelNode, conversionApi, options) {\n    const { writer, mapper } = conversionApi;\n    // Don't reinsert if this is not a reconversion...\n    if (!options.reconversion) {\n        return false;\n    }\n    const viewChildNode = mapper.toViewElement(modelNode);\n    // ...or there is no view to reinsert or it was already inserted to the view structure...\n    if (!viewChildNode || viewChildNode.root == viewRoot) {\n        return false;\n    }\n    // ...or it was strictly marked as not to be reused.\n    if (!conversionApi.canReuseView(viewChildNode)) {\n        return false;\n    }\n    // Otherwise reinsert the view node.\n    writer.move(writer.createRangeOn(viewChildNode), mapper.toViewPosition(Position._createBefore(modelNode)));\n    return true;\n}\n/**\n * The default consumer for insert events.\n *\n * @param item Model item.\n * @param consumable The model consumable.\n * @param options.preflight Whether should consume or just check if can be consumed.\n */ function defaultConsumer(item, consumable, { preflight } = {}) {\n    if (preflight) {\n        return consumable.test(item, 'insert');\n    } else {\n        return consumable.consume(item, 'insert');\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module engine/model/utils/autoparagraphing\n */ /**\n * Fixes all empty roots.\n *\n * @internal\n * @param writer The model writer.\n * @returns `true` if any change has been applied, `false` otherwise.\n */ function autoParagraphEmptyRoots(writer) {\n    const { schema, document } = writer.model;\n    for (const root of document.getRoots()){\n        if (root.isEmpty && !schema.checkChild(root, '$text')) {\n            // If paragraph element is allowed in the root, create paragraph element.\n            if (schema.checkChild(root, 'paragraph')) {\n                writer.insertElement('paragraph', root);\n                // Other roots will get fixed in the next post-fixer round. Those will be triggered\n                // in the same batch no matter if this method was triggered by the post-fixing or not\n                // (the above insertElement call will trigger the post-fixers).\n                return true;\n            }\n        }\n    }\n    return false;\n}\n/**\n * Checks if the given node wrapped with a paragraph would be accepted by the schema in the given position.\n *\n * @internal\n * @param position The position at which to check.\n * @param nodeOrType The child node or child type to check.\n * @param schema A schema instance used for element validation.\n */ function isParagraphable(position, nodeOrType, schema) {\n    const context = schema.createContext(position);\n    // When paragraph is allowed in this context...\n    if (!schema.checkChild(context, 'paragraph')) {\n        return false;\n    }\n    // And a node would be allowed in this paragraph...\n    if (!schema.checkChild(context.push('paragraph'), nodeOrType)) {\n        return false;\n    }\n    return true;\n}\n/**\n * Inserts a new paragraph at the given position and returns a position inside that paragraph.\n *\n * @internal\n * @param position The position where a paragraph should be inserted.\n * @param writer The model writer.\n * @returns  Position inside the created paragraph.\n */ function wrapInParagraph(position, writer) {\n    const paragraph = writer.createElement('paragraph');\n    writer.insert(paragraph, position);\n    return writer.createPositionAt(paragraph, 0);\n}\n\n/**\n * Contains the {@link module:engine/view/view view} to {@link module:engine/model/model model} converters for\n * {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}.\n *\n * @module engine/conversion/upcasthelpers\n */ /**\n * Upcast conversion helper functions.\n *\n * Learn more about {@glink framework/deep-dive/conversion/upcast upcast helpers}.\n *\n * @extends module:engine/conversion/conversionhelpers~ConversionHelpers\n */ class UpcastHelpers extends ConversionHelpers {\n    /**\n\t * View element to model element conversion helper.\n\t *\n\t * This conversion results in creating a model element. For example,\n\t * view `<p>Foo</p>` becomes `<paragraph>Foo</paragraph>` in the model.\n\t *\n\t * Keep in mind that the element will be inserted only if it is allowed\n\t * by {@link module:engine/model/schema~Schema schema} configuration.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: 'p',\n\t * \tmodel: 'paragraph'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: 'p',\n\t * \tmodel: 'paragraph',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'fancy'\n\t * \t},\n\t * \tmodel: 'fancyParagraph'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToElement( {\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'heading'\n\t * \t},\n\t * \tmodel: ( viewElement, conversionApi ) => {\n\t * \t\tconst modelWriter = conversionApi.writer;\n\t *\n\t * \t\treturn modelWriter.createElement( 'heading', { level: viewElement.getAttribute( 'data-level' ) } );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Pattern matching all view elements which should be converted. If not set, the converter\n\t * will fire for every view element.\n\t * @param config.model Name of the model element, a model element instance or a function that takes a view element\n\t * and {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API}\n\t * and returns a model element. The model element will be inserted in the model.\n\t * @param config.converterPriority Converter priority.\n\t */ elementToElement(config) {\n        return this.add(upcastElementToElement(config));\n    }\n    /**\n\t * View element to model attribute conversion helper.\n\t *\n\t * This conversion results in setting an attribute on a model node. For example, view `<strong>Foo</strong>` becomes\n\t * `Foo` {@link module:engine/model/text~Text model text node} with `bold` attribute set to `true`.\n\t *\n\t * This helper is meant to set a model attribute on all the elements that are inside the converted element:\n\t *\n\t * ```\n\t * <strong>Foo</strong>   -->   <strong><p>Foo</p></strong>   -->   <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t * ```\n\t *\n\t * Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t * Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text. See\n\t * {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute} for comparison.\n\t *\n\t * Keep in mind that the attribute will be set only if it is allowed by {@link module:engine/model/schema~Schema schema} configuration.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: 'strong',\n\t * \tmodel: 'bold'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: 'strong',\n\t * \tmodel: 'bold',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: 'bold'\n\t * \t},\n\t * \tmodel: 'bold'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: [ 'styled', 'styled-dark' ]\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'styled',\n\t * \t\tvalue: 'dark'\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tstyles: {\n\t * \t\t\t'font-size': /[\\s\\S]+/\n\t * \t\t}\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'fontSize',\n\t * \t\tvalue: ( viewElement, conversionApi ) => {\n\t * \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t * \t\t\tconst value = fontSize.substr( 0, fontSize.length - 2 );\n\t *\n\t * \t\t\tif ( value <= 10 ) {\n\t * \t\t\t\treturn 'small';\n\t * \t\t\t} else if ( value > 12 ) {\n\t * \t\t\t\treturn 'big';\n\t * \t\t\t}\n\t *\n\t * \t\t\treturn null;\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Pattern matching all view elements which should be converted.\n\t * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n\t * the model attribute. `value` property may be set as a function that takes a view element and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t * If `String` is given, the model attribute value will be set to `true`.\n\t * @param config.converterPriority Converter priority. Defaults to `low`.\n\t */ elementToAttribute(config) {\n        return this.add(upcastElementToAttribute(config));\n    }\n    /**\n\t * View attribute to model attribute conversion helper.\n\t *\n\t * This conversion results in setting an attribute on a model node. For example, view `<img src=\"foo.jpg\"></img>` becomes\n\t * `<imageBlock source=\"foo.jpg\"></imageBlock>` in the model.\n\t *\n\t * This helper is meant to convert view attributes from view elements which got converted to the model, so the view attribute\n\t * is set only on the corresponding model node:\n\t *\n\t * ```\n\t * <div class=\"dark\"><div>foo</div></div>    -->    <div dark=\"true\"><div>foo</div></div>\n\t * ```\n\t *\n\t * Above, `class=\"dark\"` attribute is added only to the `<div>` elements that has it. This is in contrast to\n\t * {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute} which sets attributes for\n\t * all the children in the model:\n\t *\n\t * ```\n\t * <strong>Foo</strong>   -->   <strong><p>Foo</p></strong>   -->   <paragraph><$text bold=\"true\">Foo</$text></paragraph>\n\t * ```\n\t *\n\t * Above is a sample of HTML code, that goes through autoparagraphing (first step) and then is converted (second step).\n\t * Even though `<strong>` is over `<p>` element, `bold=\"true\"` was added to the text.\n\t *\n\t * Keep in mind that the attribute will be set only if it is allowed by {@link module:engine/model/schema~Schema schema} configuration.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: 'src',\n\t * \tmodel: 'source'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: { key: 'src' },\n\t * \tmodel: 'source'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: { key: 'src' },\n\t * \tmodel: 'source',\n\t * \tconverterPriority: 'normal'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tkey: 'data-style',\n\t * \t\tvalue: /[\\s\\S]+/\n\t * \t},\n\t * \tmodel: 'styled'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tname: 'img',\n\t * \t\tkey: 'class',\n\t * \t\tvalue: 'styled-dark'\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'styled',\n\t * \t\tvalue: 'dark'\n\t * \t}\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tkey: 'class',\n\t * \t\tvalue: /styled-[\\S]+/\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'styled'\n\t * \t\tvalue: ( viewElement, conversionApi ) => {\n\t * \t\t\tconst regexp = /styled-([\\S]+)/;\n\t * \t\t\tconst match = viewElement.getAttribute( 'class' ).match( regexp );\n\t *\n\t * \t\t\treturn match[ 1 ];\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Converting styles works a bit differently as it requires `view.styles` to be an object and by default\n\t * a model attribute will be set to `true` by such a converter. You can set the model attribute to any value by providing the `value`\n\t * callback that returns the desired value.\n\t *\n\t * ```ts\n\t * // Default conversion of font-weight style will result in setting bold attribute to true.\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tstyles: {\n\t * \t\t\t'font-weight': 'bold'\n\t * \t\t}\n\t * \t},\n\t * \tmodel: 'bold'\n\t * } );\n\t *\n\t * // This converter will pass any style value to the `lineHeight` model attribute.\n\t * editor.conversion.for( 'upcast' ).attributeToAttribute( {\n\t * \tview: {\n\t * \t\tstyles: {\n\t * \t\t\t'line-height': /[\\s\\S]+/\n\t * \t\t}\n\t * \t},\n\t * \tmodel: {\n\t * \t\tkey: 'lineHeight',\n\t * \t\tvalue: ( viewElement, conversionApi ) => viewElement.getStyle( 'line-height' )\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Specifies which view attribute will be converted. If a `String` is passed,\n\t * attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n\t * specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n\t * property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n\t * a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n\t * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n\t * the model attribute. `value` property may be set as a function that takes a view element and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the value.\n\t * If `String` is given, the model attribute value will be same as view attribute value.\n\t * @param config.converterPriority Converter priority. Defaults to `low`.\n\t */ attributeToAttribute(config) {\n        return this.add(upcastAttributeToAttribute(config));\n    }\n    /**\n\t * View element to model marker conversion helper.\n\t *\n\t * This conversion results in creating a model marker. For example, if the marker was stored in a view as an element:\n\t * `<p>Fo<span data-marker=\"comment\" data-comment-id=\"7\"></span>o</p><p>B<span data-marker=\"comment\" data-comment-id=\"7\"></span>ar</p>`,\n\t * after the conversion is done, the marker will be available in\n\t * {@link module:engine/model/model~Model#markers model document markers}.\n\t *\n\t * **Note**: When this helper is used in the data upcast in combination with\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} in the data downcast,\n\t * then invalid HTML code (e.g. a span between table cells) may be produced by the latter converter.\n\t *\n\t * In most of the cases, the {@link #dataToMarker} should be used instead.\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: 'marker-search',\n\t * \tmodel: 'search'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: 'marker-search',\n\t * \tmodel: 'search',\n\t * \tconverterPriority: 'high'\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: 'marker-search',\n\t * \tmodel: ( viewElement, conversionApi ) => 'comment:' + viewElement.getAttribute( 'data-comment-id' )\n\t * } );\n\t *\n\t * editor.conversion.for( 'upcast' ).elementToMarker( {\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tattributes: {\n\t * \t\t\t'data-marker': 'search'\n\t * \t\t}\n\t * \t},\n\t * \tmodel: 'search'\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view Pattern matching all view elements which should be converted.\n\t * @param config.model Name of the model marker, or a function that takes a view element and returns\n\t * a model marker name.\n\t * @param config.converterPriority Converter priority.\n\t */ elementToMarker(config) {\n        return this.add(upcastElementToMarker(config));\n    }\n    /**\n\t * View-to-model marker conversion helper.\n\t *\n\t * Converts view data created by {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`}\n\t * back to a model marker.\n\t *\n\t * This converter looks for specific view elements and view attributes that mark marker boundaries. See\n\t * {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToData `#markerToData()`} to learn what view data\n\t * is expected by this converter.\n\t *\n\t * The `config.view` property is equal to the marker group name to convert.\n\t *\n\t * By default, this converter creates markers with the `group:name` name convention (to match the default `markerToData` conversion).\n\t *\n\t * The conversion configuration can take a function that will generate a marker name.\n\t * If such function is set as the `config.model` parameter, it is passed the `name` part from the view element or attribute and it is\n\t * expected to return a string with the marker name.\n\t *\n\t * Basic usage:\n\t *\n\t * ```ts\n\t * // Using the default conversion.\n\t * // In this case, all markers from the `comment` group will be converted.\n\t * // The conversion will look for `<comment-start>` and `<comment-end>` tags and\n\t * // `data-comment-start-before`, `data-comment-start-after`,\n\t * // `data-comment-end-before` and `data-comment-end-after` attributes.\n\t * editor.conversion.for( 'upcast' ).dataToMarker( {\n\t * \tview: 'comment'\n\t * } );\n\t * ```\n\t *\n\t * An example of a model that may be generated by this conversion:\n\t *\n\t * ```\n\t * // View:\n\t * <p>Foo<comment-start name=\"commentId:uid\"></comment-start>bar</p>\n\t * <figure data-comment-end-after=\"commentId:uid\" class=\"image\"><img src=\"abc.jpg\" /></figure>\n\t *\n\t * // Model:\n\t * <paragraph>Foo[bar</paragraph>\n\t * <imageBlock src=\"abc.jpg\"></imageBlock>]\n\t * ```\n\t *\n\t * Where `[]` are boundaries of a marker that will receive the `comment:commentId:uid` name.\n\t *\n\t * Other examples of usage:\n\t *\n\t * ```ts\n\t * // Using a custom function which is the same as the default conversion:\n\t * editor.conversion.for( 'upcast' ).dataToMarker( {\n\t * \tview: 'comment',\n\t * \tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t * } );\n\t *\n\t * // Using the converter priority:\n\t * editor.conversion.for( 'upcast' ).dataToMarker( {\n\t * \tview: 'comment',\n\t * \tmodel: ( name, conversionApi ) => 'comment:' + name,\n\t * \tconverterPriority: 'high'\n\t * } );\n\t * ```\n\t *\n\t * See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter\n\t * to the conversion process.\n\t *\n\t * @param config Conversion configuration.\n\t * @param config.view The marker group name to convert.\n\t * @param config.model A function that takes the `name` part from the view element or attribute and\n\t * {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi upcast conversion API} and returns the marker name.\n\t * @param config.converterPriority Converter priority.\n\t */ dataToMarker(config) {\n        return this.add(upcastDataToMarker(config));\n    }\n}\n/**\n * Function factory, creates a converter that converts {@link module:engine/view/documentfragment~DocumentFragment view document fragment}\n * or all children of {@link module:engine/view/element~Element} into\n * {@link module:engine/model/documentfragment~DocumentFragment model document fragment}.\n * This is the \"entry-point\" converter for upcast (view to model conversion). This converter starts the conversion of all children\n * of passed view document fragment. Those children {@link module:engine/view/node~Node view nodes} are then handled by other converters.\n *\n * This also a \"default\", last resort converter for all view elements that has not been converted by other converters.\n * When a view element is being converted to the model but it does not have converter specified, that view element\n * will be converted to {@link module:engine/model/documentfragment~DocumentFragment model document fragment} and returned.\n *\n * @returns Universal converter for view {@link module:engine/view/documentfragment~DocumentFragment fragments} and\n * {@link module:engine/view/element~Element elements} that returns\n * {@link module:engine/model/documentfragment~DocumentFragment model fragment} with children of converted view item.\n */ function convertToModelFragment$1() {\n    return (evt, data, conversionApi)=>{\n        // Second argument in `consumable.consume` is discarded for ViewDocumentFragment but is needed for ViewElement.\n        if (!data.modelRange && conversionApi.consumable.consume(data.viewItem, {\n            name: true\n        })) {\n            const { modelRange, modelCursor } = conversionApi.convertChildren(data.viewItem, data.modelCursor);\n            data.modelRange = modelRange;\n            data.modelCursor = modelCursor;\n        }\n    };\n}\n/**\n * Function factory, creates a converter that converts {@link module:engine/view/text~Text} to {@link module:engine/model/text~Text}.\n *\n * @returns {@link module:engine/view/text~Text View text} converter.\n */ function convertText() {\n    return (evt, data, { schema, consumable, writer })=>{\n        let position = data.modelCursor;\n        // When node is already converted then do nothing.\n        if (!consumable.test(data.viewItem)) {\n            return;\n        }\n        if (!schema.checkChild(position, '$text')) {\n            if (!isParagraphable(position, '$text', schema)) {\n                return;\n            }\n            // Do not auto-paragraph whitespaces.\n            if (data.viewItem.data.trim().length == 0) {\n                return;\n            }\n            position = wrapInParagraph(position, writer);\n        }\n        consumable.consume(data.viewItem);\n        const text = writer.createText(data.viewItem.data);\n        writer.insert(text, position);\n        data.modelRange = writer.createRange(position, position.getShiftedBy(text.offsetSize));\n        data.modelCursor = data.modelRange.end;\n    };\n}\n/**\n * Function factory, creates a callback function which converts a {@link module:engine/view/selection~Selection\n * view selection} taken from the {@link module:engine/view/document~Document#event:selectionChange} event\n * and sets in on the {@link module:engine/model/document~Document#selection model}.\n *\n * **Note**: because there is no view selection change dispatcher nor any other advanced view selection to model\n * conversion mechanism, the callback should be set directly on view document.\n *\n * ```ts\n * view.document.on( 'selectionChange', convertSelectionChange( modelDocument, mapper ) );\n * ```\n *\n * @param model Data model.\n * @param mapper Conversion mapper.\n * @returns {@link module:engine/view/document~Document#event:selectionChange} callback function.\n */ function convertSelectionChange(model, mapper) {\n    return (evt, data)=>{\n        const viewSelection = data.newSelection;\n        const ranges = [];\n        for (const viewRange of viewSelection.getRanges()){\n            ranges.push(mapper.toModelRange(viewRange));\n        }\n        const modelSelection = model.createSelection(ranges, {\n            backward: viewSelection.isBackward\n        });\n        if (!modelSelection.isEqual(model.document.selection)) {\n            model.change((writer)=>{\n                writer.setSelection(modelSelection);\n            });\n        }\n    };\n}\n/**\n * View element to model element conversion helper.\n *\n * See {@link ~UpcastHelpers#elementToElement `.elementToElement()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Pattern matching all view elements which should be converted. If not\n * set, the converter will fire for every view element.\n * @param config.model Name of the model element, a model element\n * instance or a function that takes a view element and returns a model element. The model element will be inserted in the model.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */ function upcastElementToElement(config) {\n    config = cloneDeep(config);\n    const converter = prepareToElementConverter(config);\n    const elementName = getViewElementNameFromConfig(config.view);\n    const eventName = elementName ? `element:${elementName}` : 'element';\n    return (dispatcher)=>{\n        dispatcher.on(eventName, converter, {\n            priority: config.converterPriority || 'normal'\n        });\n    };\n}\n/**\n * View element to model attribute conversion helper.\n *\n * See {@link ~UpcastHelpers#elementToAttribute `.elementToAttribute()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Pattern matching all view elements which should be converted.\n * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n * the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n * If `String` is given, the model attribute value will be set to `true`.\n * @param config.converterPriority Converter priority. Defaults to `low`.\n * @returns Conversion helper.\n */ function upcastElementToAttribute(config) {\n    config = cloneDeep(config);\n    normalizeModelAttributeConfig(config);\n    const converter = prepareToAttributeConverter(config, false);\n    const elementName = getViewElementNameFromConfig(config.view);\n    const eventName = elementName ? `element:${elementName}` : 'element';\n    return (dispatcher)=>{\n        dispatcher.on(eventName, converter, {\n            priority: config.converterPriority || 'low'\n        });\n    };\n}\n/**\n * View attribute to model attribute conversion helper.\n *\n * See {@link ~UpcastHelpers#attributeToAttribute `.attributeToAttribute()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Specifies which view attribute will be converted. If a `String` is passed,\n * attributes with given key will be converted. If an `Object` is passed, it must have a required `key` property,\n * specifying view attribute key, and may have an optional `value` property, specifying view attribute value and optional `name`\n * property specifying a view element name from/on which the attribute should be converted. `value` can be given as a `String`,\n * a `RegExp` or a function callback, that takes view attribute value as the only parameter and returns `Boolean`.\n * @param config.model Model attribute key or an object with `key` and `value` properties, describing\n * the model attribute. `value` property may be set as a function that takes a view element and returns the value.\n * If `String` is given, the model attribute value will be same as view attribute value.\n * @param config.converterPriority Converter priority. Defaults to `low`.\n * @returns Conversion helper.\n */ function upcastAttributeToAttribute(config) {\n    config = cloneDeep(config);\n    let viewKey = null;\n    if (typeof config.view == 'string' || config.view.key) {\n        viewKey = normalizeViewAttributeKeyValueConfig(config);\n    }\n    normalizeModelAttributeConfig(config, viewKey);\n    const converter = prepareToAttributeConverter(config, true);\n    return (dispatcher)=>{\n        dispatcher.on('element', converter, {\n            priority: config.converterPriority || 'low'\n        });\n    };\n}\n/**\n * View element to model marker conversion helper.\n *\n * See {@link ~UpcastHelpers#elementToMarker `.elementToMarker()` upcast helper} for examples.\n *\n * @param config Conversion configuration.\n * @param config.view Pattern matching all view elements which should be converted.\n * @param config.model Name of the model marker, or a function that takes a view element and returns\n * a model marker name.\n * @param config.converterPriority Converter priority.\n * @returns Conversion helper.\n */ function upcastElementToMarker(config) {\n    const model = normalizeElementToMarkerModelConfig(config.model);\n    return upcastElementToElement({\n        ...config,\n        model\n    });\n}\n/**\n * View data to model marker conversion helper.\n *\n * See {@link ~UpcastHelpers#dataToMarker} to learn more.\n *\n * @returns Conversion helper.\n */ function upcastDataToMarker(config) {\n    config = cloneDeep(config);\n    // Default conversion.\n    if (!config.model) {\n        config.model = (name)=>{\n            return name ? config.view + ':' + name : config.view;\n        };\n    }\n    const normalizedConfig = {\n        view: config.view,\n        model: config.model\n    };\n    const converterStart = prepareToElementConverter(normalizeDataToMarkerConfig(normalizedConfig, 'start'));\n    const converterEnd = prepareToElementConverter(normalizeDataToMarkerConfig(normalizedConfig, 'end'));\n    return (dispatcher)=>{\n        dispatcher.on(`element:${config.view}-start`, converterStart, {\n            priority: config.converterPriority || 'normal'\n        });\n        dispatcher.on(`element:${config.view}-end`, converterEnd, {\n            priority: config.converterPriority || 'normal'\n        });\n        // Below is a hack that is needed to properly handle `converterPriority` for both elements and attributes.\n        // Attribute conversion needs to be performed *after* element conversion.\n        // This converter handles both element conversion and attribute conversion, which means that if a single\n        // `config.converterPriority` is used, it will lead to problems. For example, if the `'high'` priority is used,\n        // the attribute conversion will be performed before a lot of element upcast converters.\n        // On the other hand, we want to support `config.converterPriority` and converter overwriting.\n        //\n        // To make it work, we need to do some extra processing for priority for attribute converter.\n        // Priority `'low'` value should be the base value and then we will change it depending on `config.converterPriority` value.\n        //\n        // This hack probably would not be needed if attributes are upcasted separately.\n        //\n        const basePriority = priorities.low;\n        const maxPriority = priorities.highest;\n        const priorityFactor = priorities.get(config.converterPriority) / maxPriority; // Number in range [ -1, 1 ].\n        dispatcher.on('element', upcastAttributeToMarker(normalizedConfig), {\n            priority: basePriority + priorityFactor\n        });\n    };\n}\n/**\n * Function factory, returns a callback function which converts view attributes to a model marker.\n *\n * The converter looks for elements with `data-group-start-before`, `data-group-start-after`, `data-group-end-before`\n * and `data-group-end-after` attributes and inserts `$marker` model elements before/after those elements.\n * `group` part is specified in `config.view`.\n *\n * @returns Marker converter.\n */ function upcastAttributeToMarker(config) {\n    return (evt, data, conversionApi)=>{\n        const attrName = `data-${config.view}`;\n        // Check if any attribute for the given view item can be consumed before changing the conversion data\n        // and consuming view items with these attributes.\n        if (!conversionApi.consumable.test(data.viewItem, {\n            attributes: attrName + '-end-after'\n        }) && !conversionApi.consumable.test(data.viewItem, {\n            attributes: attrName + '-start-after'\n        }) && !conversionApi.consumable.test(data.viewItem, {\n            attributes: attrName + '-end-before'\n        }) && !conversionApi.consumable.test(data.viewItem, {\n            attributes: attrName + '-start-before'\n        })) {\n            return;\n        }\n        // This converter wants to add a model element, marking a marker, before/after an element (or maybe even group of elements).\n        // To do that, we can use `data.modelRange` which is set on an element (or a group of elements) that has been upcasted.\n        // But, if the processed view element has not been upcasted yet (it does not have been converted), we need to\n        // fire conversion for its children first, then we will have `data.modelRange` available.\n        if (!data.modelRange) {\n            Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n        }\n        if (conversionApi.consumable.consume(data.viewItem, {\n            attributes: attrName + '-end-after'\n        })) {\n            addMarkerElements(data.modelRange.end, data.viewItem.getAttribute(attrName + '-end-after').split(','));\n        }\n        if (conversionApi.consumable.consume(data.viewItem, {\n            attributes: attrName + '-start-after'\n        })) {\n            addMarkerElements(data.modelRange.end, data.viewItem.getAttribute(attrName + '-start-after').split(','));\n        }\n        if (conversionApi.consumable.consume(data.viewItem, {\n            attributes: attrName + '-end-before'\n        })) {\n            addMarkerElements(data.modelRange.start, data.viewItem.getAttribute(attrName + '-end-before').split(','));\n        }\n        if (conversionApi.consumable.consume(data.viewItem, {\n            attributes: attrName + '-start-before'\n        })) {\n            addMarkerElements(data.modelRange.start, data.viewItem.getAttribute(attrName + '-start-before').split(','));\n        }\n        function addMarkerElements(position, markerViewNames) {\n            for (const markerViewName of markerViewNames){\n                const markerName = config.model(markerViewName, conversionApi);\n                const element = conversionApi.writer.createElement('$marker', {\n                    'data-name': markerName\n                });\n                conversionApi.writer.insert(element, position);\n                if (data.modelCursor.isEqual(position)) {\n                    data.modelCursor = data.modelCursor.getShiftedBy(1);\n                } else {\n                    data.modelCursor = data.modelCursor._getTransformedByInsertion(position, 1);\n                }\n                data.modelRange = data.modelRange._getTransformedByInsertion(position, 1)[0];\n            }\n        }\n    };\n}\n/**\n * Helper function for from-view-element conversion. Checks if `config.view` directly specifies converted view element's name\n * and if so, returns it.\n *\n * @param config Conversion view config.\n * @returns View element name or `null` if name is not directly set.\n */ function getViewElementNameFromConfig(viewConfig) {\n    if (typeof viewConfig == 'string') {\n        return viewConfig;\n    }\n    if (typeof viewConfig == 'object' && typeof viewConfig.name == 'string') {\n        return viewConfig.name;\n    }\n    return null;\n}\n/**\n * Helper for to-model-element conversion. Takes a config object and returns a proper converter function.\n *\n * @param config Conversion configuration.\n * @returns View to model converter.\n */ function prepareToElementConverter(config) {\n    const matcher = new Matcher(config.view);\n    return (evt, data, conversionApi)=>{\n        const matcherResult = matcher.match(data.viewItem);\n        if (!matcherResult) {\n            return;\n        }\n        const match = matcherResult.match;\n        // Force consuming element's name.\n        match.name = true;\n        if (!conversionApi.consumable.test(data.viewItem, match)) {\n            return;\n        }\n        const modelElement = getModelElement(config.model, data.viewItem, conversionApi);\n        if (!modelElement) {\n            return;\n        }\n        if (!conversionApi.safeInsert(modelElement, data.modelCursor)) {\n            return;\n        }\n        conversionApi.consumable.consume(data.viewItem, match);\n        conversionApi.convertChildren(data.viewItem, modelElement);\n        conversionApi.updateConversionResult(modelElement, data);\n    };\n}\n/**\n * Helper function for upcasting-to-element converter. Takes the model configuration, the converted view element\n * and a writer instance and returns a model element instance to be inserted in the model.\n *\n * @param model Model conversion configuration.\n * @param input The converted view node.\n * @param conversionApi The upcast conversion API.\n */ function getModelElement(model, input, conversionApi) {\n    if (model instanceof Function) {\n        return model(input, conversionApi);\n    } else {\n        return conversionApi.writer.createElement(model);\n    }\n}\n/**\n * Helper function view-attribute-to-model-attribute helper. Normalizes `config.view` which was set as `String` or\n * as an `Object` with `key`, `value` and `name` properties. Normalized `config.view` has is compatible with\n * {@link module:engine/view/matcher~MatcherPattern}.\n *\n * @param config Conversion config.\n * @returns Key of the converted view attribute.\n */ function normalizeViewAttributeKeyValueConfig(config) {\n    if (typeof config.view == 'string') {\n        config.view = {\n            key: config.view\n        };\n    }\n    const key = config.view.key;\n    const value = typeof config.view.value == 'undefined' ? /[\\s\\S]*/ : config.view.value;\n    let normalized;\n    if (key == 'class' || key == 'style') {\n        const keyName = key == 'class' ? 'classes' : 'styles';\n        normalized = {\n            [keyName]: value\n        };\n    } else {\n        normalized = {\n            attributes: {\n                [key]: value\n            }\n        };\n    }\n    if (config.view.name) {\n        normalized.name = config.view.name;\n    }\n    config.view = normalized;\n    return key;\n}\n/**\n * Helper function that normalizes `config.model` in from-model-attribute conversion. `config.model` can be set\n * as a `String`, an `Object` with only `key` property or an `Object` with `key` and `value` properties. Normalized\n * `config.model` is an `Object` with `key` and `value` properties.\n *\n * @param config Conversion config.\n * @param viewAttributeKeyToCopy Key of the converted view attribute. If it is set, model attribute value\n * will be equal to view attribute value.\n */ function normalizeModelAttributeConfig(config, viewAttributeKeyToCopy = null) {\n    const defaultModelValue = viewAttributeKeyToCopy === null ? true : (viewElement)=>viewElement.getAttribute(viewAttributeKeyToCopy);\n    const key = typeof config.model != 'object' ? config.model : config.model.key;\n    const value = typeof config.model != 'object' || typeof config.model.value == 'undefined' ? defaultModelValue : config.model.value;\n    config.model = {\n        key,\n        value\n    };\n}\n/**\n * Helper for to-model-attribute conversion. Takes the model attribute name and conversion configuration and returns\n * a proper converter function.\n *\n * @param config Conversion configuration. It is possible to provide multiple configurations in an array.\n * @param shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n * on all elements in the range.\n */ function prepareToAttributeConverter(config, shallow) {\n    const matcher = new Matcher(config.view);\n    return (evt, data, conversionApi)=>{\n        // Converting an attribute of an element that has not been converted to anything does not make sense\n        // because there will be nowhere to set that attribute on. At this stage, the element should've already\n        // been converted (https://github.com/ckeditor/ckeditor5/issues/11000).\n        if (!data.modelRange && shallow) {\n            return;\n        }\n        const match = matcher.match(data.viewItem);\n        // If there is no match, this callback should not do anything.\n        if (!match) {\n            return;\n        }\n        if (onlyViewNameIsDefined(config.view, data.viewItem)) {\n            match.match.name = true;\n        } else {\n            // Do not test `name` consumable because it could get consumed already while upcasting some other attribute\n            // on the same element (for example <span class=\"big\" style=\"color: red\">foo</span>).\n            delete match.match.name;\n        }\n        // Try to consume appropriate values from consumable values list.\n        if (!conversionApi.consumable.test(data.viewItem, match.match)) {\n            return;\n        }\n        const modelKey = config.model.key;\n        const modelValue = typeof config.model.value == 'function' ? config.model.value(data.viewItem, conversionApi) : config.model.value;\n        // Do not convert if attribute building function returned falsy value.\n        if (modelValue === null) {\n            return;\n        }\n        // Since we are converting to attribute we need a range on which we will set the attribute.\n        // If the range is not created yet, let's create it by converting children of the current node first.\n        if (!data.modelRange) {\n            // Convert children and set conversion result as a current data.\n            Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n        }\n        // Set attribute on current `output`. `Schema` is checked inside this helper function.\n        const attributeWasSet = setAttributeOn(data.modelRange, {\n            key: modelKey,\n            value: modelValue\n        }, shallow, conversionApi);\n        // It may happen that a converter will try to set an attribute that is not allowed in the given context.\n        // In such a situation we cannot consume the attribute. See: https://github.com/ckeditor/ckeditor5/pull/9249#issuecomment-815658459.\n        if (attributeWasSet) {\n            // Verify if the element itself wasn't consumed yet. It could be consumed already while upcasting some other attribute\n            // on the same element (for example <span class=\"big\" style=\"color: red\">foo</span>).\n            // We need to consume it so other features (especially GHS) won't try to convert it.\n            // Note that it's not tested by the other element-to-attribute converters whether an element was consumed before\n            // (in case of converters that the element itself is just a context and not the primary information to convert).\n            if (conversionApi.consumable.test(data.viewItem, {\n                name: true\n            })) {\n                match.match.name = true;\n            }\n            conversionApi.consumable.consume(data.viewItem, match.match);\n        }\n    };\n}\n/**\n * Helper function that checks if element name should be consumed in attribute converters.\n *\n * @param viewConfig Conversion view config.\n */ function onlyViewNameIsDefined(viewConfig, viewItem) {\n    // https://github.com/ckeditor/ckeditor5-engine/issues/1786\n    const configToTest = typeof viewConfig == 'function' ? viewConfig(viewItem) : viewConfig;\n    if (typeof configToTest == 'object' && !getViewElementNameFromConfig(configToTest)) {\n        return false;\n    }\n    return !configToTest.classes && !configToTest.attributes && !configToTest.styles;\n}\n/**\n * Helper function for to-model-attribute converter. Sets model attribute on given range. Checks {@link module:engine/model/schema~Schema}\n * to ensure proper model structure.\n *\n * If any node on the given range has already defined an attribute with the same name, its value will not be updated.\n *\n * @param modelRange Model range on which attribute should be set.\n * @param modelAttribute Model attribute to set.\n * @param conversionApi Conversion API.\n * @param shallow If set to `true` the attribute will be set only on top-level nodes. Otherwise, it will be set\n * on all elements in the range.\n * @returns `true` if attribute was set on at least one node from given `modelRange`.\n */ function setAttributeOn(modelRange, modelAttribute, shallow, conversionApi) {\n    let result = false;\n    // Set attribute on each item in range according to Schema.\n    for (const node of Array.from(modelRange.getItems({\n        shallow\n    }))){\n        // Skip if not allowed.\n        if (!conversionApi.schema.checkAttribute(node, modelAttribute.key)) {\n            continue;\n        }\n        // Mark the node as consumed even if the attribute will not be updated because it's in a valid context (schema)\n        // and would be converted if the attribute wouldn't be present. See #8921.\n        result = true;\n        // Do not override the attribute if it's already present.\n        if (node.hasAttribute(modelAttribute.key)) {\n            continue;\n        }\n        conversionApi.writer.setAttribute(modelAttribute.key, modelAttribute.value, node);\n    }\n    return result;\n}\n/**\n * Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastElementToMarker()`\n * function and converts it to a format that is supported by `upcastElementToElement()` function.\n */ function normalizeElementToMarkerModelConfig(model) {\n    return (viewElement, conversionApi)=>{\n        const markerName = typeof model == 'string' ? model : model(viewElement, conversionApi);\n        return conversionApi.writer.createElement('$marker', {\n            'data-name': markerName\n        });\n    };\n}\n/**\n * Helper function for upcasting-to-marker conversion. Takes the config in a format requested by `upcastDataToMarker()`\n * function and converts it to a format that is supported by `upcastElementToElement()` function.\n */ function normalizeDataToMarkerConfig(config, type) {\n    const elementCreatorFunction = (viewElement, conversionApi)=>{\n        const viewName = viewElement.getAttribute('name');\n        const markerName = config.model(viewName, conversionApi);\n        return conversionApi.writer.createElement('$marker', {\n            'data-name': markerName\n        });\n    };\n    return {\n        // Upcast <markerGroup-start> and <markerGroup-end> elements.\n        view: `${config.view}-${type}`,\n        model: elementCreatorFunction\n    };\n}\n\n/**\n * Injects selection post-fixer to the model.\n *\n * The role of the selection post-fixer is to ensure that the selection is in a correct place\n * after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n *\n * The correct position means that:\n *\n * * All collapsed selection ranges are in a place where the {@link module:engine/model/schema~Schema}\n * allows a `$text`.\n * * None of the selection's non-collapsed ranges crosses a {@link module:engine/model/schema~Schema#isLimit limit element}\n * boundary (a range must be rooted within one limit element).\n * * Only {@link module:engine/model/schema~Schema#isSelectable selectable elements} can be selected from the outside\n * (e.g. `[<paragraph>foo</paragraph>]` is invalid). This rule applies independently to both selection ends, so this\n * selection is correct: `<paragraph>f[oo</paragraph><imageBlock></imageBlock>]`.\n *\n * If the position is not correct, the post-fixer will automatically correct it.\n *\n * ## Fixing a non-collapsed selection\n *\n * See as an example a selection that starts in a P1 element and ends inside the text of a TD element\n * (`[` and `]` are range boundaries and `(l)` denotes an element defined as `isLimit=true`):\n *\n * ```\n * root\n *  |- element P1\n *  |   |- \"foo\"                                      root\n *  |- element TABLE (l)                   P1         TABLE             P2\n *  |   |- element TR (l)                 f o[o     TR      TR         b a r\n *  |   |   |- element TD (l)                       TD      TD\n *  |   |       |- \"aaa\"                          a]a a    b b b\n *  |   |- element TR (l)\n *  |   |   |- element TD (l)                           ||\n *  |   |       |- \"bbb\"                                ||\n *  |- element P2                                       VV\n *  |   |- \"bar\"\n *                                                    root\n *                                         P1         TABLE]            P2\n *                                        f o[o     TR      TR         b a r\n *                                                  TD      TD\n *                                                a a a    b b b\n * ```\n *\n * In the example above, the TABLE, TR and TD are defined as `isLimit=true` in the schema. The range which is not contained within\n * a single limit element must be expanded to select the outermost limit element. The range end is inside the text node of the TD element.\n * As the TD element is a child of the TR and TABLE elements, where both are defined as `isLimit=true` in the schema, the range must be\n * expanded to select the whole TABLE element.\n *\n * **Note** If the selection contains multiple ranges, the method returns a minimal set of ranges that are not intersecting after expanding\n * them to select `isLimit=true` elements.\n */ function injectSelectionPostFixer(model) {\n    model.document.registerPostFixer((writer)=>selectionPostFixer(writer, model));\n}\n/**\n * The selection post-fixer.\n */ function selectionPostFixer(writer, model) {\n    const selection = model.document.selection;\n    const schema = model.schema;\n    const ranges = [];\n    let wasFixed = false;\n    for (const modelRange of selection.getRanges()){\n        // Go through all ranges in selection and try fixing each of them.\n        // Those ranges might overlap but will be corrected later.\n        const correctedRange = tryFixingRange(modelRange, schema);\n        // \"Selection fixing\" algorithms sometimes get lost. In consequence, it may happen\n        // that a new range is returned but, in fact, it has the same positions as the original\n        // range anyway. If this range is not discarded, a new selection will be set and that,\n        // for instance, would destroy the selection attributes. Let's make sure that the post-fixer\n        // actually worked first before setting a new selection.\n        //\n        // https://github.com/ckeditor/ckeditor5/issues/6693\n        if (correctedRange && !correctedRange.isEqual(modelRange)) {\n            ranges.push(correctedRange);\n            wasFixed = true;\n        } else {\n            ranges.push(modelRange);\n        }\n    }\n    // If any of ranges were corrected update the selection.\n    if (wasFixed) {\n        writer.setSelection(mergeIntersectingRanges(ranges), {\n            backward: selection.isBackward\n        });\n    }\n    return false;\n}\n/**\n * Tries fixing a range if it's incorrect.\n *\n * **Note:** This helper is used by the selection post-fixer and to fix the `beforeinput` target ranges.\n *\n * @returns Returns fixed range or null if range is valid.\n */ function tryFixingRange(range, schema) {\n    if (range.isCollapsed) {\n        return tryFixingCollapsedRange(range, schema);\n    }\n    return tryFixingNonCollapsedRage(range, schema);\n}\n/**\n * Tries to fix collapsed ranges.\n *\n * * Fixes situation when a range is in a place where $text is not allowed\n *\n * @param range Collapsed range to fix.\n * @returns Returns fixed range or null if range is valid.\n */ function tryFixingCollapsedRange(range, schema) {\n    const originalPosition = range.start;\n    const nearestSelectionRange = schema.getNearestSelectionRange(originalPosition);\n    // This might be null, i.e. when the editor data is empty or the selection is inside a limit element\n    // that doesn't allow text inside.\n    // In the first case, there is no need to fix the selection range.\n    // In the second, let's go up to the outer selectable element\n    if (!nearestSelectionRange) {\n        const ancestorObject = originalPosition.getAncestors().reverse().find((item)=>schema.isObject(item));\n        if (ancestorObject) {\n            return Range._createOn(ancestorObject);\n        }\n        return null;\n    }\n    if (!nearestSelectionRange.isCollapsed) {\n        return nearestSelectionRange;\n    }\n    const fixedPosition = nearestSelectionRange.start;\n    // Fixed position is the same as original - no need to return corrected range.\n    if (originalPosition.isEqual(fixedPosition)) {\n        return null;\n    }\n    return new Range(fixedPosition);\n}\n/**\n * Tries to fix an expanded range.\n *\n * @param range Expanded range to fix.\n * @returns Returns fixed range or null if range is valid.\n */ function tryFixingNonCollapsedRage(range, schema) {\n    const { start, end } = range;\n    const isTextAllowedOnStart = schema.checkChild(start, '$text');\n    const isTextAllowedOnEnd = schema.checkChild(end, '$text');\n    const startLimitElement = schema.getLimitElement(start);\n    const endLimitElement = schema.getLimitElement(end);\n    // Ranges which both end are inside the same limit element (or root) might needs only minor fix.\n    if (startLimitElement === endLimitElement) {\n        // Range is valid when both position allows to place a text:\n        // - <block>f[oobarba]z</block>\n        // This would be \"fixed\" by a next check but as it will be the same it's better to return null so the selection stays the same.\n        if (isTextAllowedOnStart && isTextAllowedOnEnd) {\n            return null;\n        }\n        // Range that is on non-limit element (or is partially) must be fixed so it is placed inside the block around $text:\n        // - [<block>foo</block>]    ->    <block>[foo]</block>\n        // - [<block>foo]</block>    ->    <block>[foo]</block>\n        // - <block>f[oo</block>]    ->    <block>f[oo]</block>\n        // - [<block>foo</block><selectable></selectable>]    ->    <block>[foo</block><selectable></selectable>]\n        if (checkSelectionOnNonLimitElements(start, end, schema)) {\n            const isStartBeforeSelectable = start.nodeAfter && schema.isSelectable(start.nodeAfter);\n            const fixedStart = isStartBeforeSelectable ? null : schema.getNearestSelectionRange(start, 'forward');\n            const isEndAfterSelectable = end.nodeBefore && schema.isSelectable(end.nodeBefore);\n            const fixedEnd = isEndAfterSelectable ? null : schema.getNearestSelectionRange(end, 'backward');\n            // The schema.getNearestSelectionRange might return null - if that happens use original position.\n            const rangeStart = fixedStart ? fixedStart.start : start;\n            const rangeEnd = fixedEnd ? fixedEnd.end : end;\n            return new Range(rangeStart, rangeEnd);\n        }\n    }\n    const isStartInLimit = startLimitElement && !startLimitElement.is('rootElement');\n    const isEndInLimit = endLimitElement && !endLimitElement.is('rootElement');\n    // At this point we eliminated valid positions on text nodes so if one of range positions is placed inside a limit element\n    // then the range crossed limit element boundaries and needs to be fixed.\n    if (isStartInLimit || isEndInLimit) {\n        const bothInSameParent = start.nodeAfter && end.nodeBefore && start.nodeAfter.parent === end.nodeBefore.parent;\n        const expandStart = isStartInLimit && (!bothInSameParent || !isSelectable(start.nodeAfter, schema));\n        const expandEnd = isEndInLimit && (!bothInSameParent || !isSelectable(end.nodeBefore, schema));\n        // Although we've already found limit element on start/end positions we must find the outer-most limit element.\n        // as limit elements might be nested directly inside (ie table > tableRow > tableCell).\n        let fixedStart = start;\n        let fixedEnd = end;\n        if (expandStart) {\n            fixedStart = Position._createBefore(findOutermostLimitAncestor(startLimitElement, schema));\n        }\n        if (expandEnd) {\n            fixedEnd = Position._createAfter(findOutermostLimitAncestor(endLimitElement, schema));\n        }\n        return new Range(fixedStart, fixedEnd);\n    }\n    // Range was not fixed at this point so it is valid - ie it was placed around limit element already.\n    return null;\n}\n/**\n * Finds the outer-most ancestor.\n */ function findOutermostLimitAncestor(startingNode, schema) {\n    let isLimitNode = startingNode;\n    let parent = isLimitNode;\n    // Find outer most isLimit block as such blocks might be nested (ie. in tables).\n    while(schema.isLimit(parent) && parent.parent){\n        isLimitNode = parent;\n        parent = parent.parent;\n    }\n    return isLimitNode;\n}\n/**\n * Checks whether any of range boundaries is placed around non-limit elements.\n */ function checkSelectionOnNonLimitElements(start, end, schema) {\n    const startIsOnBlock = start.nodeAfter && !schema.isLimit(start.nodeAfter) || schema.checkChild(start, '$text');\n    const endIsOnBlock = end.nodeBefore && !schema.isLimit(end.nodeBefore) || schema.checkChild(end, '$text');\n    // We should fix such selection when one of those nodes needs fixing.\n    return startIsOnBlock || endIsOnBlock;\n}\n/**\n * Returns a minimal non-intersecting array of ranges without duplicates.\n *\n * @param ranges Ranges to merge.\n * @returns Array of unique and non-intersecting ranges.\n */ function mergeIntersectingRanges(ranges) {\n    const rangesToMerge = [\n        ...ranges\n    ];\n    const rangeIndexesToRemove = new Set();\n    let currentRangeIndex = 1;\n    while(currentRangeIndex < rangesToMerge.length){\n        const currentRange = rangesToMerge[currentRangeIndex];\n        const previousRanges = rangesToMerge.slice(0, currentRangeIndex);\n        for (const [previousRangeIndex, previousRange] of previousRanges.entries()){\n            if (rangeIndexesToRemove.has(previousRangeIndex)) {\n                continue;\n            }\n            if (currentRange.isEqual(previousRange)) {\n                rangeIndexesToRemove.add(previousRangeIndex);\n            } else if (currentRange.isIntersecting(previousRange)) {\n                rangeIndexesToRemove.add(previousRangeIndex);\n                rangeIndexesToRemove.add(currentRangeIndex);\n                const mergedRange = currentRange.getJoined(previousRange);\n                rangesToMerge.push(mergedRange);\n            }\n        }\n        currentRangeIndex++;\n    }\n    const nonIntersectingRanges = rangesToMerge.filter((_, index)=>!rangeIndexesToRemove.has(index));\n    return nonIntersectingRanges;\n}\n/**\n * Checks if node exists and if it's a selectable.\n */ function isSelectable(node, schema) {\n    return node && schema.isSelectable(node);\n}\n\n// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' );\n/**\n * A controller for the editing pipeline. The editing pipeline controls the {@link ~EditingController#model model} rendering,\n * including selection handling. It also creates the {@link ~EditingController#view view} which builds a\n * browser-independent virtualization over the DOM elements. The editing controller also attaches default converters.\n */ class EditingController extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * Editor model.\n\t */ model;\n    /**\n\t * Editing view controller.\n\t */ view;\n    /**\n\t * A mapper that describes the model-view binding.\n\t */ mapper;\n    /**\n\t * Downcast dispatcher that converts changes from the model to the {@link #view editing view}.\n\t */ downcastDispatcher;\n    /**\n\t * Creates an editing controller instance.\n\t *\n\t * @param model Editing model.\n\t * @param stylesProcessor The styles processor instance.\n\t */ constructor(model, stylesProcessor){\n        super();\n        this.model = model;\n        this.view = new View(stylesProcessor);\n        this.mapper = new Mapper();\n        this.downcastDispatcher = new DowncastDispatcher({\n            mapper: this.mapper,\n            schema: model.schema\n        });\n        const doc = this.model.document;\n        const selection = doc.selection;\n        const markers = this.model.markers;\n        // When plugins listen on model changes (on selection change, post fixers, etc.) and change the view as a result of\n        // the model's change, they might trigger view rendering before the conversion is completed (e.g. before the selection\n        // is converted). We disable rendering for the length of the outermost model change() block to prevent that.\n        //\n        // See https://github.com/ckeditor/ckeditor5-engine/issues/1528\n        this.listenTo(this.model, '_beforeChanges', ()=>{\n            this.view._disableRendering(true);\n        }, {\n            priority: 'highest'\n        });\n        this.listenTo(this.model, '_afterChanges', ()=>{\n            this.view._disableRendering(false);\n        }, {\n            priority: 'lowest'\n        });\n        // Whenever model document is changed, convert those changes to the view (using model.Document#differ).\n        // Do it on 'low' priority, so changes are converted after other listeners did their job.\n        // Also convert model selection.\n        this.listenTo(doc, 'change', ()=>{\n            this.view.change((writer)=>{\n                this.downcastDispatcher.convertChanges(doc.differ, markers, writer);\n                this.downcastDispatcher.convertSelection(selection, markers, writer);\n            });\n        }, {\n            priority: 'low'\n        });\n        // Convert selection from the view to the model when it changes in the view.\n        this.listenTo(this.view.document, 'selectionChange', convertSelectionChange(this.model, this.mapper));\n        // Fix `beforeinput` target ranges so that they map to the valid model ranges.\n        this.listenTo(this.view.document, 'beforeinput', fixTargetRanges(this.mapper, this.model.schema, this.view), {\n            priority: 'high'\n        });\n        // Attach default model converters.\n        this.downcastDispatcher.on('insert:$text', insertText(), {\n            priority: 'lowest'\n        });\n        this.downcastDispatcher.on('insert', insertAttributesAndChildren(), {\n            priority: 'lowest'\n        });\n        this.downcastDispatcher.on('remove', remove(), {\n            priority: 'low'\n        });\n        // Attach default model selection converters.\n        this.downcastDispatcher.on('cleanSelection', cleanSelection());\n        this.downcastDispatcher.on('selection', convertRangeSelection(), {\n            priority: 'low'\n        });\n        this.downcastDispatcher.on('selection', convertCollapsedSelection(), {\n            priority: 'low'\n        });\n        // Binds {@link module:engine/view/document~Document#roots view roots collection} to\n        // {@link module:engine/model/document~Document#roots model roots collection} so creating\n        // model root automatically creates corresponding view root.\n        this.view.document.roots.bindTo(this.model.document.roots).using((root)=>{\n            // $graveyard is a special root that has no reflection in the view.\n            if (root.rootName == '$graveyard') {\n                return null;\n            }\n            const viewRoot = new RootEditableElement(this.view.document, root.name);\n            viewRoot.rootName = root.rootName;\n            this.mapper.bindElements(root, viewRoot);\n            return viewRoot;\n        });\n    // @if CK_DEBUG_ENGINE // initDocumentDumping( this.model.document );\n    // @if CK_DEBUG_ENGINE // initDocumentDumping( this.view.document );\n    // @if CK_DEBUG_ENGINE // dumpTrees( this.model.document, this.model.document.version );\n    // @if CK_DEBUG_ENGINE // dumpTrees( this.view.document, this.model.document.version );\n    // @if CK_DEBUG_ENGINE // this.model.document.on( 'change', () => {\n    // @if CK_DEBUG_ENGINE //\tdumpTrees( this.view.document, this.model.document.version );\n    // @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } );\n    }\n    /**\n\t * Removes all event listeners attached to the `EditingController`. Destroys all objects created\n\t * by `EditingController` that need to be destroyed.\n\t */ destroy() {\n        this.view.destroy();\n        this.stopListening();\n    }\n    /**\n\t * Calling this method will refresh the marker by triggering the downcast conversion for it.\n\t *\n\t * Reconverting the marker is useful when you want to change its {@link module:engine/view/element~Element view element}\n\t * without changing any marker data. For instance:\n\t *\n\t * ```ts\n\t * let isCommentActive = false;\n\t *\n\t * model.conversion.markerToHighlight( {\n\t * \tmodel: 'comment',\n\t * \tview: data => {\n\t * \t\tconst classes = [ 'comment-marker' ];\n\t *\n\t * \t\tif ( isCommentActive ) {\n\t * \t\t\tclasses.push( 'comment-marker--active' );\n\t * \t\t}\n\t *\n\t * \t\treturn { classes };\n\t * \t}\n\t * } );\n\t *\n\t * // ...\n\t *\n\t * // Change the property that indicates if marker is displayed as active or not.\n\t * isCommentActive = true;\n\t *\n\t * // Reconverting will downcast and synchronize the marker with the new isCommentActive state value.\n\t * editor.editing.reconvertMarker( 'comment' );\n\t * ```\n\t *\n\t * **Note**: If you want to reconvert a model item, use {@link #reconvertItem} instead.\n\t *\n\t * @param markerOrName Name of a marker to update, or a marker instance.\n\t */ reconvertMarker(markerOrName) {\n        const markerName = typeof markerOrName == 'string' ? markerOrName : markerOrName.name;\n        const currentMarker = this.model.markers.get(markerName);\n        if (!currentMarker) {\n            /**\n\t\t\t * The marker with the provided name does not exist and cannot be reconverted.\n\t\t\t *\n\t\t\t * @error editingcontroller-reconvertmarker-marker-not-exist\n\t\t\t * @param {String} markerName The name of the reconverted marker.\n\t\t\t */ throw new CKEditorError('editingcontroller-reconvertmarker-marker-not-exist', this, {\n                markerName\n            });\n        }\n        this.model.change(()=>{\n            this.model.markers._refresh(currentMarker);\n        });\n    }\n    /**\n\t * Calling this method will downcast a model item on demand (by requesting a refresh in the {@link module:engine/model/differ~Differ}).\n\t *\n\t * You can use it if you want the view representation of a specific item updated as a response to external modifications. For instance,\n\t * when the view structure depends not only on the associated model data but also on some external state.\n\t *\n\t * **Note**: If you want to reconvert a model marker, use {@link #reconvertMarker} instead.\n\t *\n\t * @param item Item to refresh.\n\t */ reconvertItem(item) {\n        this.model.change(()=>{\n            this.model.document.differ._refreshItem(item);\n        });\n    }\n}\n/**\n * Checks whether the target ranges provided by the `beforeInput` event can be properly mapped to model ranges and fixes them if needed.\n *\n * This is using the same logic as the selection post-fixer.\n */ function fixTargetRanges(mapper, schema, view) {\n    return (evt, data)=>{\n        // The Renderer is disabled while composing on non-android browsers, so we can't be sure that target ranges\n        // could be properly mapped to view and model because the DOM and view tree drifted apart.\n        if (view.document.isComposing && !env.isAndroid) {\n            return;\n        }\n        for(let i = 0; i < data.targetRanges.length; i++){\n            const viewRange = data.targetRanges[i];\n            const modelRange = mapper.toModelRange(viewRange);\n            const correctedRange = tryFixingRange(modelRange, schema);\n            if (!correctedRange || correctedRange.isEqual(modelRange)) {\n                continue;\n            }\n            data.targetRanges[i] = mapper.toViewRange(correctedRange);\n        }\n    };\n}\n\n/**\n * Class used for handling consumption of view {@link module:engine/view/element~Element elements},\n * {@link module:engine/view/text~Text text nodes} and {@link module:engine/view/documentfragment~DocumentFragment document fragments}.\n * Element's name and its parts (attributes, classes and styles) can be consumed separately. Consuming an element's name\n * does not consume its attributes, classes and styles.\n * To add items for consumption use {@link module:engine/conversion/viewconsumable~ViewConsumable#add add method}.\n * To test items use {@link module:engine/conversion/viewconsumable~ViewConsumable#test test method}.\n * To consume items use {@link module:engine/conversion/viewconsumable~ViewConsumable#consume consume method}.\n * To revert already consumed items use {@link module:engine/conversion/viewconsumable~ViewConsumable#revert revert method}.\n *\n * ```ts\n * viewConsumable.add( element, { name: true } ); // Adds element's name as ready to be consumed.\n * viewConsumable.add( textNode ); // Adds text node for consumption.\n * viewConsumable.add( docFragment ); // Adds document fragment for consumption.\n * viewConsumable.test( element, { name: true }  ); // Tests if element's name can be consumed.\n * viewConsumable.test( textNode ); // Tests if text node can be consumed.\n * viewConsumable.test( docFragment ); // Tests if document fragment can be consumed.\n * viewConsumable.consume( element, { name: true }  ); // Consume element's name.\n * viewConsumable.consume( textNode ); // Consume text node.\n * viewConsumable.consume( docFragment ); // Consume document fragment.\n * viewConsumable.revert( element, { name: true }  ); // Revert already consumed element's name.\n * viewConsumable.revert( textNode ); // Revert already consumed text node.\n * viewConsumable.revert( docFragment ); // Revert already consumed document fragment.\n * ```\n */ class ViewConsumable {\n    /**\n\t * Map of consumable elements. If {@link module:engine/view/element~Element element} is used as a key,\n\t * {@link module:engine/conversion/viewconsumable~ViewElementConsumables ViewElementConsumables} instance is stored as value.\n\t * For {@link module:engine/view/text~Text text nodes} and\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragments} boolean value is stored as value.\n\t */ _consumables = new Map();\n    add(element, consumables) {\n        let elementConsumables;\n        // For text nodes and document fragments just mark them as consumable.\n        if (element.is('$text') || element.is('documentFragment')) {\n            this._consumables.set(element, true);\n            return;\n        }\n        // For elements create new ViewElementConsumables or update already existing one.\n        if (!this._consumables.has(element)) {\n            elementConsumables = new ViewElementConsumables(element);\n            this._consumables.set(element, elementConsumables);\n        } else {\n            elementConsumables = this._consumables.get(element);\n        }\n        elementConsumables.add(consumables);\n    }\n    /**\n\t * Tests if {@link module:engine/view/element~Element view element}, {@link module:engine/view/text~Text text node} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment} can be consumed.\n\t * It returns `true` when all items included in method's call can be consumed. Returns `false` when\n\t * first already consumed item is found and `null` when first non-consumable item is found.\n\t *\n\t * ```ts\n\t * viewConsumable.test( p, { name: true } ); // Tests element's name.\n\t * viewConsumable.test( p, { attributes: 'name' } ); // Tests attribute.\n\t * viewConsumable.test( p, { classes: 'foobar' } ); // Tests class.\n\t * viewConsumable.test( p, { styles: 'color' } ); // Tests style.\n\t * viewConsumable.test( p, { attributes: 'name', styles: 'color' } ); // Tests attribute and style.\n\t * viewConsumable.test( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be tested.\n\t * viewConsumable.test( textNode ); // Tests text node.\n\t * viewConsumable.test( docFragment ); // Tests document fragment.\n\t * ```\n\t *\n\t * Testing classes and styles as attribute will test if all added classes/styles can be consumed.\n\t *\n\t * ```ts\n\t * viewConsumable.test( p, { attributes: 'class' } ); // Tests if all added classes can be consumed.\n\t * viewConsumable.test( p, { attributes: 'style' } ); // Tests if all added styles can be consumed.\n\t * ```\n\t *\n\t * @param consumables Used only if first parameter is {@link module:engine/view/element~Element view element} instance.\n\t * @param consumables.name If set to true element's name will be included.\n\t * @param consumables.attributes Attribute name or array of attribute names.\n\t * @param consumables.classes Class name or array of class names.\n\t * @param consumables.styles Style name or array of style names.\n\t * @returns Returns `true` when all items included in method's call can be consumed. Returns `false`\n\t * when first already consumed item is found and `null` when first non-consumable item is found.\n\t */ test(element, consumables) {\n        const elementConsumables = this._consumables.get(element);\n        if (elementConsumables === undefined) {\n            return null;\n        }\n        // For text nodes and document fragments return stored boolean value.\n        if (element.is('$text') || element.is('documentFragment')) {\n            return elementConsumables;\n        }\n        // For elements test consumables object.\n        return elementConsumables.test(consumables);\n    }\n    /**\n\t * Consumes {@link module:engine/view/element~Element view element}, {@link module:engine/view/text~Text text node} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment}.\n\t * It returns `true` when all items included in method's call can be consumed, otherwise returns `false`.\n\t *\n\t * ```ts\n\t * viewConsumable.consume( p, { name: true } ); // Consumes element's name.\n\t * viewConsumable.consume( p, { attributes: 'name' } ); // Consumes element's attribute.\n\t * viewConsumable.consume( p, { classes: 'foobar' } ); // Consumes element's class.\n\t * viewConsumable.consume( p, { styles: 'color' } ); // Consumes element's style.\n\t * viewConsumable.consume( p, { attributes: 'name', styles: 'color' } ); // Consumes attribute and style.\n\t * viewConsumable.consume( p, { classes: [ 'baz', 'bar' ] } ); // Multiple consumables can be consumed.\n\t * viewConsumable.consume( textNode ); // Consumes text node.\n\t * viewConsumable.consume( docFragment ); // Consumes document fragment.\n\t * ```\n\t *\n\t * Consuming classes and styles as attribute will test if all added classes/styles can be consumed.\n\t *\n\t * ```ts\n\t * viewConsumable.consume( p, { attributes: 'class' } ); // Consume only if all added classes can be consumed.\n\t * viewConsumable.consume( p, { attributes: 'style' } ); // Consume only if all added styles can be consumed.\n\t * ```\n\t *\n\t * @param consumables Used only if first parameter is {@link module:engine/view/element~Element view element} instance.\n\t * @param consumables.name If set to true element's name will be included.\n\t * @param consumables.attributes Attribute name or array of attribute names.\n\t * @param consumables.classes Class name or array of class names.\n\t * @param consumables.styles Style name or array of style names.\n\t * @returns Returns `true` when all items included in method's call can be consumed,\n\t * otherwise returns `false`.\n\t */ consume(element, consumables) {\n        if (this.test(element, consumables)) {\n            if (element.is('$text') || element.is('documentFragment')) {\n                // For text nodes and document fragments set value to false.\n                this._consumables.set(element, false);\n            } else {\n                // For elements - consume consumables object.\n                this._consumables.get(element).consume(consumables);\n            }\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Reverts {@link module:engine/view/element~Element view element}, {@link module:engine/view/text~Text text node} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment document fragment} so they can be consumed once again.\n\t * Method does not revert items that were never previously added for consumption, even if they are included in\n\t * method's call.\n\t *\n\t * ```ts\n\t * viewConsumable.revert( p, { name: true } ); // Reverts element's name.\n\t * viewConsumable.revert( p, { attributes: 'name' } ); // Reverts element's attribute.\n\t * viewConsumable.revert( p, { classes: 'foobar' } ); // Reverts element's class.\n\t * viewConsumable.revert( p, { styles: 'color' } ); // Reverts element's style.\n\t * viewConsumable.revert( p, { attributes: 'name', styles: 'color' } ); // Reverts attribute and style.\n\t * viewConsumable.revert( p, { classes: [ 'baz', 'bar' ] } ); // Multiple names can be reverted.\n\t * viewConsumable.revert( textNode ); // Reverts text node.\n\t * viewConsumable.revert( docFragment ); // Reverts document fragment.\n\t * ```\n\t *\n\t * Reverting classes and styles as attribute will revert all classes/styles that were previously added for\n\t * consumption.\n\t *\n\t * ```ts\n\t * viewConsumable.revert( p, { attributes: 'class' } ); // Reverts all classes added for consumption.\n\t * viewConsumable.revert( p, { attributes: 'style' } ); // Reverts all styles added for consumption.\n\t * ```\n\t *\n\t * @param consumables Used only if first parameter is {@link module:engine/view/element~Element view element} instance.\n\t * @param consumables.name If set to true element's name will be included.\n\t * @param consumables.attributes Attribute name or array of attribute names.\n\t * @param consumables.classes Class name or array of class names.\n\t * @param consumables.styles Style name or array of style names.\n\t */ revert(element, consumables) {\n        const elementConsumables = this._consumables.get(element);\n        if (elementConsumables !== undefined) {\n            if (element.is('$text') || element.is('documentFragment')) {\n                // For text nodes and document fragments - set consumable to true.\n                this._consumables.set(element, true);\n            } else {\n                // For elements - revert items from consumables object.\n                elementConsumables.revert(consumables);\n            }\n        }\n    }\n    /**\n\t * Creates consumable object from {@link module:engine/view/element~Element view element}. Consumable object will include\n\t * element's name and all its attributes, classes and styles.\n\t */ static consumablesFromElement(element) {\n        const consumables = {\n            element,\n            name: true,\n            attributes: [],\n            classes: [],\n            styles: []\n        };\n        const attributes = element.getAttributeKeys();\n        for (const attribute of attributes){\n            // Skip classes and styles - will be added separately.\n            if (attribute == 'style' || attribute == 'class') {\n                continue;\n            }\n            consumables.attributes.push(attribute);\n        }\n        const classes = element.getClassNames();\n        for (const className of classes){\n            consumables.classes.push(className);\n        }\n        const styles = element.getStyleNames();\n        for (const style of styles){\n            consumables.styles.push(style);\n        }\n        return consumables;\n    }\n    /**\n\t * Creates {@link module:engine/conversion/viewconsumable~ViewConsumable ViewConsumable} instance from\n\t * {@link module:engine/view/node~Node node} or {@link module:engine/view/documentfragment~DocumentFragment document fragment}.\n\t * Instance will contain all elements, child nodes, attributes, styles and classes added for consumption.\n\t *\n\t * @param from View node or document fragment from which `ViewConsumable` will be created.\n\t * @param instance If provided, given `ViewConsumable` instance will be used\n\t * to add all consumables. It will be returned instead of a new instance.\n\t */ static createFrom(from, instance) {\n        if (!instance) {\n            instance = new ViewConsumable();\n        }\n        if (from.is('$text')) {\n            instance.add(from);\n            return instance;\n        }\n        // Add `from` itself, if it is an element.\n        if (from.is('element')) {\n            instance.add(from, ViewConsumable.consumablesFromElement(from));\n        }\n        if (from.is('documentFragment')) {\n            instance.add(from);\n        }\n        for (const child of from.getChildren()){\n            instance = ViewConsumable.createFrom(child, instance);\n        }\n        return instance;\n    }\n}\nconst CONSUMABLE_TYPES = [\n    'attributes',\n    'classes',\n    'styles'\n];\n/**\n * This is a private helper-class for {@link module:engine/conversion/viewconsumable~ViewConsumable}.\n * It represents and manipulates consumable parts of a single {@link module:engine/view/element~Element}.\n */ class ViewElementConsumables {\n    element;\n    /**\n\t * Flag indicating if name of the element can be consumed.\n\t */ _canConsumeName;\n    /**\n\t * Contains maps of element's consumables: attributes, classes and styles.\n\t */ _consumables;\n    /**\n\t * Creates ViewElementConsumables instance.\n\t *\n\t * @param from View node or document fragment from which `ViewElementConsumables` is being created.\n\t */ constructor(from){\n        this.element = from;\n        this._canConsumeName = null;\n        this._consumables = {\n            attributes: new Map(),\n            styles: new Map(),\n            classes: new Map()\n        };\n    }\n    /**\n\t * Adds consumable parts of the {@link module:engine/view/element~Element view element}.\n\t * Element's name itself can be marked to be consumed (when element's name is consumed its attributes, classes and\n\t * styles still could be consumed):\n\t *\n\t * ```ts\n\t * consumables.add( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.add( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t * consumables.add( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t * ```\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t * attribute is provided - it should be handled separately by providing `style` and `class` in consumables object.\n\t *\n\t * @param consumables Object describing which parts of the element can be consumed.\n\t * @param consumables.name If set to `true` element's name will be added as consumable.\n\t * @param consumables.attributes Attribute name or array of attribute names to add as consumable.\n\t * @param consumables.classes Class name or array of class names to add as consumable.\n\t * @param consumables.styles Style name or array of style names to add as consumable.\n\t */ add(consumables) {\n        if (consumables.name) {\n            this._canConsumeName = true;\n        }\n        for (const type of CONSUMABLE_TYPES){\n            if (type in consumables) {\n                this._add(type, consumables[type]);\n            }\n        }\n    }\n    /**\n\t * Tests if parts of the {@link module:engine/view/node~Node view node} can be consumed.\n\t *\n\t * Element's name can be tested:\n\t *\n\t * ```ts\n\t * consumables.test( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.test( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t * consumables.test( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t * ```\n\t *\n\t * @param consumables Object describing which parts of the element should be tested.\n\t * @param consumables.name If set to `true` element's name will be tested.\n\t * @param consumables.attributes Attribute name or array of attribute names to test.\n\t * @param consumables.classes Class name or array of class names to test.\n\t * @param consumables.styles Style name or array of style names to test.\n\t * @returns `true` when all tested items can be consumed, `null` when even one of the items\n\t * was never marked for consumption and `false` when even one of the items was already consumed.\n\t */ test(consumables) {\n        // Check if name can be consumed.\n        if (consumables.name && !this._canConsumeName) {\n            return this._canConsumeName;\n        }\n        for (const type of CONSUMABLE_TYPES){\n            if (type in consumables) {\n                const value = this._test(type, consumables[type]);\n                if (value !== true) {\n                    return value;\n                }\n            }\n        }\n        // Return true only if all can be consumed.\n        return true;\n    }\n    /**\n\t * Consumes parts of {@link module:engine/view/element~Element view element}. This function does not check if consumable item\n\t * is already consumed - it consumes all consumable items provided.\n\t * Element's name can be consumed:\n\t *\n\t * ```ts\n\t * consumables.consume( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.consume( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t * consumables.consume( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t * ```\n\t *\n\t * @param consumables Object describing which parts of the element should be consumed.\n\t * @param consumables.name If set to `true` element's name will be consumed.\n\t * @param consumables.attributes Attribute name or array of attribute names to consume.\n\t * @param consumables.classes Class name or array of class names to consume.\n\t * @param consumables.styles Style name or array of style names to consume.\n\t */ consume(consumables) {\n        if (consumables.name) {\n            this._canConsumeName = false;\n        }\n        for (const type of CONSUMABLE_TYPES){\n            if (type in consumables) {\n                this._consume(type, consumables[type]);\n            }\n        }\n    }\n    /**\n\t * Revert already consumed parts of {@link module:engine/view/element~Element view Element}, so they can be consumed once again.\n\t * Element's name can be reverted:\n\t *\n\t * ```ts\n\t * consumables.revert( { name: true } );\n\t * ```\n\t *\n\t * Attributes classes and styles:\n\t *\n\t * ```ts\n\t * consumables.revert( { attributes: 'title', classes: 'foo', styles: 'color' } );\n\t * consumables.revert( { attributes: [ 'title', 'name' ], classes: [ 'foo', 'bar' ] );\n\t * ```\n\t *\n\t * @param consumables Object describing which parts of the element should be reverted.\n\t * @param consumables.name If set to `true` element's name will be reverted.\n\t * @param consumables.attributes Attribute name or array of attribute names to revert.\n\t * @param consumables.classes Class name or array of class names to revert.\n\t * @param consumables.styles Style name or array of style names to revert.\n\t */ revert(consumables) {\n        if (consumables.name) {\n            this._canConsumeName = true;\n        }\n        for (const type of CONSUMABLE_TYPES){\n            if (type in consumables) {\n                this._revert(type, consumables[type]);\n            }\n        }\n    }\n    /**\n\t * Helper method that adds consumables of a given type: attribute, class or style.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `viewconsumable-invalid-attribute` when `class` or `style`\n\t * type is provided - it should be handled separately by providing actual style/class type.\n\t *\n\t * @param type Type of the consumable item: `attributes`, `classes` or `styles`.\n\t * @param item Consumable item or array of items.\n\t */ _add(type, item) {\n        const items = toArray(item);\n        const consumables = this._consumables[type];\n        for (const name of items){\n            if (type === 'attributes' && (name === 'class' || name === 'style')) {\n                /**\n\t\t\t\t * Class and style attributes should be handled separately in\n\t\t\t\t * {@link module:engine/conversion/viewconsumable~ViewConsumable#add `ViewConsumable#add()`}.\n\t\t\t\t *\n\t\t\t\t * What you have done is trying to use:\n\t\t\t\t *\n\t\t\t\t * ```ts\n\t\t\t\t * consumables.add( { attributes: [ 'class', 'style' ] } );\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * While each class and style should be registered separately:\n\t\t\t\t *\n\t\t\t\t * ```ts\n\t\t\t\t * consumables.add( { classes: 'some-class', styles: 'font-weight' } );\n\t\t\t\t * ```\n\t\t\t\t *\n\t\t\t\t * @error viewconsumable-invalid-attribute\n\t\t\t\t */ throw new CKEditorError('viewconsumable-invalid-attribute', this);\n            }\n            consumables.set(name, true);\n            if (type === 'styles') {\n                for (const alsoName of this.element.document.stylesProcessor.getRelatedStyles(name)){\n                    consumables.set(alsoName, true);\n                }\n            }\n        }\n    }\n    /**\n\t * Helper method that tests consumables of a given type: attribute, class or style.\n\t *\n\t * @param type Type of the consumable item: `attributes`, `classes` or `styles`.\n\t * @param item Consumable item or array of items.\n\t * @returns Returns `true` if all items can be consumed, `null` when one of the items cannot be\n\t * consumed and `false` when one of the items is already consumed.\n\t */ _test(type, item) {\n        const items = toArray(item);\n        const consumables = this._consumables[type];\n        for (const name of items){\n            if (type === 'attributes' && (name === 'class' || name === 'style')) {\n                const consumableName = name == 'class' ? 'classes' : 'styles';\n                // Check all classes/styles if class/style attribute is tested.\n                const value = this._test(consumableName, [\n                    ...this._consumables[consumableName].keys()\n                ]);\n                if (value !== true) {\n                    return value;\n                }\n            } else {\n                const value = consumables.get(name);\n                // Return null if attribute is not found.\n                if (value === undefined) {\n                    return null;\n                }\n                if (!value) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n    /**\n\t * Helper method that consumes items of a given type: attribute, class or style.\n\t *\n\t * @param type Type of the consumable item: `attributes`, `classes` or `styles`.\n\t * @param item Consumable item or array of items.\n\t */ _consume(type, item) {\n        const items = toArray(item);\n        const consumables = this._consumables[type];\n        for (const name of items){\n            if (type === 'attributes' && (name === 'class' || name === 'style')) {\n                const consumableName = name == 'class' ? 'classes' : 'styles';\n                // If class or style is provided for consumption - consume them all.\n                this._consume(consumableName, [\n                    ...this._consumables[consumableName].keys()\n                ]);\n            } else {\n                consumables.set(name, false);\n                if (type == 'styles') {\n                    for (const toConsume of this.element.document.stylesProcessor.getRelatedStyles(name)){\n                        consumables.set(toConsume, false);\n                    }\n                }\n            }\n        }\n    }\n    /**\n\t * Helper method that reverts items of a given type: attribute, class or style.\n\t *\n\t * @param type Type of the consumable item: `attributes`, `classes` or , `styles`.\n\t * @param item Consumable item or array of items.\n\t */ _revert(type, item) {\n        const items = toArray(item);\n        const consumables = this._consumables[type];\n        for (const name of items){\n            if (type === 'attributes' && (name === 'class' || name === 'style')) {\n                const consumableName = name == 'class' ? 'classes' : 'styles';\n                // If class or style is provided for reverting - revert them all.\n                this._revert(consumableName, [\n                    ...this._consumables[consumableName].keys()\n                ]);\n            } else {\n                const value = consumables.get(name);\n                if (value === false) {\n                    consumables.set(name, true);\n                }\n            }\n        }\n    }\n}\n\n/**\n * The model's schema. It defines the allowed and disallowed structures of nodes as well as nodes' attributes.\n * The schema is usually defined by the features and based on them, the editing framework and features\n * make decisions on how to change and process the model.\n *\n * The instance of schema is available in {@link module:engine/model/model~Model#schema `editor.model.schema`}.\n *\n * Read more about the schema in:\n *\n * * The {@glink framework/architecture/editing-engine#schema schema section} of the\n * {@glink framework/architecture/editing-engine Introduction to the Editing engine architecture} guide.\n * * The {@glink framework/deep-dive/schema Schema deep-dive} guide.\n */ class Schema extends /* #__PURE__ */ ObservableMixin() {\n    _sourceDefinitions = {};\n    /**\n\t * A dictionary containing attribute properties.\n\t */ _attributeProperties = {};\n    /**\n\t * Stores additional callbacks registered for schema items, which are evaluated when {@link ~Schema#checkChild} is called.\n\t *\n\t * Keys are schema item names for which the callbacks are registered. Values are arrays with the callbacks.\n\t *\n\t * Some checks are added under {@link ~Schema#_genericCheckSymbol} key, these are evaluated for every {@link ~Schema#checkChild} call.\n\t */ _customChildChecks = new Map();\n    /**\n\t * Stores additional callbacks registered for attribute names, which are evaluated when {@link ~Schema#checkAttribute} is called.\n\t *\n\t * Keys are schema attribute names for which the callbacks are registered. Values are arrays with the callbacks.\n\t *\n\t * Some checks are added under {@link ~Schema#_genericCheckSymbol} key, these are evaluated for every\n\t * {@link ~Schema#checkAttribute} call.\n\t */ _customAttributeChecks = new Map();\n    _genericCheckSymbol = Symbol('$generic');\n    _compiledDefinitions;\n    /**\n\t * Creates a schema instance.\n\t */ constructor(){\n        super();\n        this.decorate('checkChild');\n        this.decorate('checkAttribute');\n        this.on('checkAttribute', (evt, args)=>{\n            args[0] = new SchemaContext(args[0]);\n        }, {\n            priority: 'highest'\n        });\n        this.on('checkChild', (evt, args)=>{\n            args[0] = new SchemaContext(args[0]);\n            args[1] = this.getDefinition(args[1]);\n        }, {\n            priority: 'highest'\n        });\n    }\n    /**\n\t * Registers a schema item. Can only be called once for every item name.\n\t *\n\t * ```ts\n\t * schema.register( 'paragraph', {\n\t * \tinheritAllFrom: '$block'\n\t * } );\n\t * ```\n\t */ register(itemName, definition) {\n        if (this._sourceDefinitions[itemName]) {\n            /**\n\t\t\t * A single item cannot be registered twice in the schema.\n\t\t\t *\n\t\t\t * This situation may happen when:\n\t\t\t *\n\t\t\t * * Two or more plugins called {@link module:engine/model/schema~Schema#register `register()`} with the same name.\n\t\t\t * This will usually mean that there is a collision between plugins which try to use the same element in the model.\n\t\t\t * Unfortunately, the only way to solve this is by modifying one of these plugins to use a unique model element name.\n\t\t\t * * A single plugin was loaded twice. This happens when it is installed by npm/yarn in two versions\n\t\t\t * and usually means one or more of the following issues:\n\t\t\t *     * a version mismatch (two of your dependencies require two different versions of this plugin),\n\t\t\t *     * incorrect imports (this plugin is somehow imported twice in a way which confuses webpack),\n\t\t\t *     * mess in `node_modules/` (`rm -rf node_modules/` may help).\n\t\t\t *\n\t\t\t * **Note:** Check the logged `itemName` to better understand which plugin was duplicated/conflicting.\n\t\t\t *\n\t\t\t * @param itemName The name of the model element that is being registered twice.\n\t\t\t * @error schema-cannot-register-item-twice\n\t\t\t */ throw new CKEditorError('schema-cannot-register-item-twice', this, {\n                itemName\n            });\n        }\n        this._sourceDefinitions[itemName] = [\n            Object.assign({}, definition)\n        ];\n        this._clearCache();\n    }\n    /**\n\t * Extends a {@link #register registered} item's definition.\n\t *\n\t * Extending properties such as `allowIn` will add more items to the existing properties,\n\t * while redefining properties such as `isBlock` will override the previously defined ones.\n\t *\n\t * ```ts\n\t * schema.register( 'foo', {\n\t * \tallowIn: '$root',\n\t * \tisBlock: true;\n\t * } );\n\t * schema.extend( 'foo', {\n\t * \tallowIn: 'blockQuote',\n\t * \tisBlock: false\n\t * } );\n\t *\n\t * schema.getDefinition( 'foo' );\n\t * //\t{\n\t * //\t\tallowIn: [ '$root', 'blockQuote' ],\n\t * // \t\tisBlock: false\n\t * //\t}\n\t * ```\n\t */ extend(itemName, definition) {\n        if (!this._sourceDefinitions[itemName]) {\n            /**\n\t\t\t * Cannot extend an item which was not registered yet.\n\t\t\t *\n\t\t\t * This error happens when a plugin tries to extend the schema definition of an item which was not\n\t\t\t * {@link module:engine/model/schema~Schema#register registered} yet.\n\t\t\t *\n\t\t\t * @param itemName The name of the model element which is being extended.\n\t\t\t * @error schema-cannot-extend-missing-item\n\t\t\t */ throw new CKEditorError('schema-cannot-extend-missing-item', this, {\n                itemName\n            });\n        }\n        this._sourceDefinitions[itemName].push(Object.assign({}, definition));\n        this._clearCache();\n    }\n    /**\n\t * Returns data of all registered items.\n\t *\n\t * This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t * checking a list of all block elements, etc).\n\t * Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t * in other cases.\n\t */ getDefinitions() {\n        if (!this._compiledDefinitions) {\n            this._compile();\n        }\n        return this._compiledDefinitions;\n    }\n    /**\n\t * Returns a definition of the given item or `undefined` if an item is not registered.\n\t *\n\t * This method should normally be used for reflection purposes (e.g. defining a clone of a certain element,\n\t * checking a list of all block elements, etc).\n\t * Use specific methods (such as {@link #checkChild `checkChild()`} or {@link #isLimit `isLimit()`})\n\t * in other cases.\n\t */ getDefinition(item) {\n        let itemName;\n        if (typeof item == 'string') {\n            itemName = item;\n        } else if ('is' in item && (item.is('$text') || item.is('$textProxy'))) {\n            itemName = '$text';\n        } else {\n            itemName = item.name;\n        }\n        return this.getDefinitions()[itemName];\n    }\n    /**\n\t * Returns `true` if the given item is registered in the schema.\n\t *\n\t * ```ts\n\t * schema.isRegistered( 'paragraph' ); // -> true\n\t * schema.isRegistered( editor.model.document.getRoot() ); // -> true\n\t * schema.isRegistered( 'foo' ); // -> false\n\t * ```\n\t */ isRegistered(item) {\n        return !!this.getDefinition(item);\n    }\n    /**\n\t * Returns `true` if the given item is defined to be\n\t * a block by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isBlock` property.\n\t *\n\t * ```ts\n\t * schema.isBlock( 'paragraph' ); // -> true\n\t * schema.isBlock( '$root' ); // -> false\n\t *\n\t * const paragraphElement = writer.createElement( 'paragraph' );\n\t * schema.isBlock( paragraphElement ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#block-elements Block elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */ isBlock(item) {\n        const def = this.getDefinition(item);\n        return !!(def && def.isBlock);\n    }\n    /**\n\t * Returns `true` if the given item should be treated as a limit element.\n\t *\n\t * It considers an item to be a limit element if its\n\t * {@link module:engine/model/schema~SchemaItemDefinition}'s\n\t * {@link module:engine/model/schema~SchemaItemDefinition#isLimit `isLimit`} or\n\t * {@link module:engine/model/schema~SchemaItemDefinition#isObject `isObject`} property\n\t * was set to `true`.\n\t *\n\t * ```ts\n\t * schema.isLimit( 'paragraph' ); // -> false\n\t * schema.isLimit( '$root' ); // -> true\n\t * schema.isLimit( editor.model.document.getRoot() ); // -> true\n\t * schema.isLimit( 'imageBlock' ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#limit-elements Limit elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */ isLimit(item) {\n        const def = this.getDefinition(item);\n        if (!def) {\n            return false;\n        }\n        return !!(def.isLimit || def.isObject);\n    }\n    /**\n\t * Returns `true` if the given item should be treated as an object element.\n\t *\n\t * It considers an item to be an object element if its\n\t * {@link module:engine/model/schema~SchemaItemDefinition}'s\n\t * {@link module:engine/model/schema~SchemaItemDefinition#isObject `isObject`} property\n\t * was set to `true`.\n\t *\n\t * ```ts\n\t * schema.isObject( 'paragraph' ); // -> false\n\t * schema.isObject( 'imageBlock' ); // -> true\n\t *\n\t * const imageElement = writer.createElement( 'imageBlock' );\n\t * schema.isObject( imageElement ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#object-elements Object elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */ isObject(item) {\n        const def = this.getDefinition(item);\n        if (!def) {\n            return false;\n        }\n        // Note: Check out the implementation of #isLimit(), #isSelectable(), and #isContent()\n        // to understand why these three constitute an object.\n        return !!(def.isObject || def.isLimit && def.isSelectable && def.isContent);\n    }\n    /**\n\t * Returns `true` if the given item is defined to be\n\t * an inline element by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isInline` property.\n\t *\n\t * ```ts\n\t * schema.isInline( 'paragraph' ); // -> false\n\t * schema.isInline( 'softBreak' ); // -> true\n\t *\n\t * const text = writer.createText( 'foo' );\n\t * schema.isInline( text ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#inline-elements Inline elements} section of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */ isInline(item) {\n        const def = this.getDefinition(item);\n        return !!(def && def.isInline);\n    }\n    /**\n\t * Returns `true` if the given item is defined to be\n\t * a selectable element by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isSelectable` property.\n\t *\n\t * ```ts\n\t * schema.isSelectable( 'paragraph' ); // -> false\n\t * schema.isSelectable( 'heading1' ); // -> false\n\t * schema.isSelectable( 'imageBlock' ); // -> true\n\t * schema.isSelectable( 'tableCell' ); // -> true\n\t *\n\t * const text = writer.createText( 'foo' );\n\t * schema.isSelectable( text ); // -> false\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#selectable-elements Selectable elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */ isSelectable(item) {\n        const def = this.getDefinition(item);\n        if (!def) {\n            return false;\n        }\n        return !!(def.isSelectable || def.isObject);\n    }\n    /**\n\t * Returns `true` if the given item is defined to be\n\t * a content by the {@link module:engine/model/schema~SchemaItemDefinition}'s `isContent` property.\n\t *\n\t * ```ts\n\t * schema.isContent( 'paragraph' ); // -> false\n\t * schema.isContent( 'heading1' ); // -> false\n\t * schema.isContent( 'imageBlock' ); // -> true\n\t * schema.isContent( 'horizontalLine' ); // -> true\n\t *\n\t * const text = writer.createText( 'foo' );\n\t * schema.isContent( text ); // -> true\n\t * ```\n\t *\n\t * See the {@glink framework/deep-dive/schema#content-elements Content elements section} of\n\t * the {@glink framework/deep-dive/schema Schema deep-dive} guide for more details.\n\t */ isContent(item) {\n        const def = this.getDefinition(item);\n        if (!def) {\n            return false;\n        }\n        return !!(def.isContent || def.isObject);\n    }\n    /**\n\t * Checks whether the given node can be a child of the given context.\n\t *\n\t * ```ts\n\t * schema.checkChild( model.document.getRoot(), paragraph ); // -> false\n\t *\n\t * schema.register( 'paragraph', {\n\t * \tallowIn: '$root'\n\t * } );\n\t *\n\t * schema.checkChild( model.document.getRoot(), paragraph ); // -> true\n\t * ```\n\t *\n\t * Both {@link module:engine/model/schema~Schema#addChildCheck callback checks} and declarative rules (added when\n\t * {@link module:engine/model/schema~Schema#register registering} and {@link module:engine/model/schema~Schema#extend extending} items)\n\t * are evaluated when this method is called.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * Note that when verifying whether the given node can be a child of the given context, the schema also verifies the entire\n\t * context &ndash; from its root to its last element. Therefore, it is possible for `checkChild()` to return `false` even though\n\t * the `context` last element can contain the checked child. It happens if one of the `context` elements does not allow its child.\n\t * When `context` is verified, {@link module:engine/model/schema~Schema#addChildCheck custom checks} are considered as well.\n\t *\n\t * @fires checkChild\n\t * @param context The context in which the child will be checked.\n\t * @param def The child to check.\n\t */ checkChild(context, def) {\n        // Note: `context` and `def` are already normalized here to `SchemaContext` and `SchemaCompiledItemDefinition`.\n        if (!def) {\n            return false;\n        }\n        return this._checkContextMatch(context, def);\n    }\n    /**\n\t * Checks whether the given attribute can be applied in the given context (on the last item of the context).\n\t *\n\t * ```ts\n\t * schema.checkAttribute( textNode, 'bold' ); // -> false\n\t *\n\t * schema.extend( '$text', {\n\t * \tallowAttributes: 'bold'\n\t * } );\n\t *\n\t * schema.checkAttribute( textNode, 'bold' ); // -> true\n\t * ```\n\t *\n\t * Both {@link module:engine/model/schema~Schema#addAttributeCheck callback checks} and declarative rules (added when\n\t * {@link module:engine/model/schema~Schema#register registering} and {@link module:engine/model/schema~Schema#extend extending} items)\n\t * are evaluated when this method is called.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * @fires checkAttribute\n\t * @param context The context in which the attribute will be checked.\n\t * @param attributeName Name of attribute to check in the given context.\n\t */ checkAttribute(context, attributeName) {\n        // Note: `context` is already normalized here to `SchemaContext`.\n        const def = this.getDefinition(context.last);\n        if (!def) {\n            return false;\n        }\n        // First, check all attribute checks declared as callbacks.\n        // Note that `_evaluateAttributeChecks()` will return `undefined` if neither child check was applicable (no decision was made).\n        const isAllowed = this._evaluateAttributeChecks(context, attributeName);\n        // If the decision was not made inside attribute check callbacks, then use declarative rules.\n        return isAllowed !== undefined ? isAllowed : def.allowAttributes.includes(attributeName);\n    }\n    /**\n\t * Checks whether the given element (`elementToMerge`) can be merged with the specified base element (`positionOrBaseElement`).\n\t *\n\t * In other words &ndash; both elements are not a limit elements and whether `elementToMerge`'s children\n\t * {@link #checkChild are allowed} in the `positionOrBaseElement`.\n\t *\n\t * This check ensures that elements merged with {@link module:engine/model/writer~Writer#merge `Writer#merge()`}\n\t * will be valid.\n\t *\n\t * Instead of elements, you can pass the instance of the {@link module:engine/model/position~Position} class as the\n\t * `positionOrBaseElement`. It means that the elements before and after the position will be checked whether they can be merged.\n\t *\n\t * @param positionOrBaseElement The position or base element to which the `elementToMerge` will be merged.\n\t * @param elementToMerge The element to merge. Required if `positionOrBaseElement` is an element.\n\t */ checkMerge(positionOrBaseElement, elementToMerge) {\n        if (positionOrBaseElement instanceof Position) {\n            const nodeBefore = positionOrBaseElement.nodeBefore;\n            const nodeAfter = positionOrBaseElement.nodeAfter;\n            if (!(nodeBefore instanceof Element)) {\n                /**\n\t\t\t\t * The node before the merge position must be an element.\n\t\t\t\t *\n\t\t\t\t * @error schema-check-merge-no-element-before\n\t\t\t\t */ throw new CKEditorError('schema-check-merge-no-element-before', this);\n            }\n            if (!(nodeAfter instanceof Element)) {\n                /**\n\t\t\t\t * The node after the merge position must be an element.\n\t\t\t\t *\n\t\t\t\t * @error schema-check-merge-no-element-after\n\t\t\t\t */ throw new CKEditorError('schema-check-merge-no-element-after', this);\n            }\n            return this.checkMerge(nodeBefore, nodeAfter);\n        }\n        if (this.isLimit(positionOrBaseElement) || this.isLimit(elementToMerge)) {\n            return false;\n        }\n        for (const child of elementToMerge.getChildren()){\n            if (!this.checkChild(positionOrBaseElement, child)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Allows registering a callback to the {@link #checkChild} method calls.\n\t *\n\t * Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t * by using the declarative API of {@link module:engine/model/schema~SchemaItemDefinition}.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * For example, by using this method you can disallow elements in specific contexts:\n\t *\n\t * ```ts\n\t * // Disallow `heading1` inside a `blockQuote` that is inside a table.\n\t * schema.addChildCheck( ( context, childDefinition ) => {\n\t * \tif ( context.endsWith( 'tableCell blockQuote' ) ) {\n\t * \t\treturn false;\n\t * \t}\n\t * }, 'heading1' );\n\t * ```\n\t *\n\t * You can skip the optional `itemName` parameter to evaluate the callback for every `checkChild()` call.\n\t *\n\t * ```ts\n\t * // Inside specific custom element, allow only children, which allows for a specific attribute.\n\t * schema.addChildCheck( ( context, childDefinition ) => {\n\t * \tif ( context.endsWith( 'myElement' ) ) {\n\t * \t\treturn childDefinition.allowAttributes.includes( 'myAttribute' );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Please note that the generic callbacks may affect the editor performance and should be avoided if possible.\n\t *\n\t * When one of the callbacks makes a decision (returns `true` or `false`) the processing is finished and other callbacks are not fired.\n\t * Callbacks are fired in the order they were added, however generic callbacks are fired before callbacks added for a specified item.\n\t *\n\t * You can also use `checkChild` event, if you need even better control. The result from the example above could also be\n\t * achieved with following event callback:\n\t *\n\t * ```ts\n\t * schema.on( 'checkChild', ( evt, args ) => {\n\t * \tconst context = args[ 0 ];\n\t * \tconst childDefinition = args[ 1 ];\n\t *\n\t * \tif ( context.endsWith( 'myElement' ) ) {\n\t * \t\t// Prevent next listeners from being called.\n\t * \t\tevt.stop();\n\t * \t\t// Set the `checkChild()` return value.\n\t * \t\tevt.return = childDefinition.allowAttributes.includes( 'myAttribute' );\n\t * \t}\n\t * }, { priority: 'high' } );\n\t * ```\n\t *\n\t * Note that the callback checks and declarative rules checks are processed on `normal` priority.\n\t *\n\t * Adding callbacks this way can also negatively impact editor performance.\n\t *\n\t * @param callback The callback to be called. It is called with two parameters:\n\t * {@link module:engine/model/schema~SchemaContext} (context) instance and\n\t * {@link module:engine/model/schema~SchemaCompiledItemDefinition} (definition). The callback may return `true/false` to override\n\t * `checkChild()`'s return value. If it does not return a boolean value, the default algorithm (or other callbacks) will define\n\t * `checkChild()`'s return value.\n\t * @param itemName Name of the schema item for which the callback is registered. If specified, the callback will be run only for\n\t * `checkChild()` calls which `def` parameter matches the `itemName`. Otherwise, the callback will run for every `checkChild` call.\n\t */ addChildCheck(callback, itemName) {\n        const key = itemName !== undefined ? itemName : this._genericCheckSymbol;\n        const checks = this._customChildChecks.get(key) || [];\n        checks.push(callback);\n        this._customChildChecks.set(key, checks);\n    }\n    /**\n\t * Allows registering a callback to the {@link #checkAttribute} method calls.\n\t *\n\t * Callbacks allow you to implement rules which are not otherwise possible to achieve\n\t * by using the declarative API of {@link module:engine/model/schema~SchemaItemDefinition}.\n\t *\n\t * Note that callback checks have bigger priority than declarative rules checks and may overwrite them.\n\t *\n\t * For example, by using this method you can disallow setting attributes on nodes in specific contexts:\n\t *\n\t * ```ts\n\t * // Disallow setting `bold` on text inside `heading1` element:\n\t * schema.addAttributeCheck( context => {\n\t * \tif ( context.endsWith( 'heading1 $text' ) ) {\n\t * \t\treturn false;\n\t * \t}\n\t * }, 'bold' );\n\t * ```\n\t *\n\t * You can skip the optional `attributeName` parameter to evaluate the callback for every `checkAttribute()` call.\n\t *\n\t * ```ts\n\t * // Disallow formatting attributes on text inside custom `myTitle` element:\n\t * schema.addAttributeCheck( ( context, attributeName ) => {\n\t * \tif ( context.endsWith( 'myTitle $text' ) && schema.getAttributeProperties( attributeName ).isFormatting ) {\n\t * \t\treturn false;\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Please note that the generic callbacks may affect the editor performance and should be avoided if possible.\n\t *\n\t * When one of the callbacks makes a decision (returns `true` or `false`) the processing is finished and other callbacks are not fired.\n\t * Callbacks are fired in the order they were added, however generic callbacks are fired before callbacks added for a specified item.\n\t *\n\t * You can also use {@link #event:checkAttribute} event, if you need even better control. The result from the example above could also\n\t * be achieved with following event callback:\n\t *\n\t * ```ts\n\t * schema.on( 'checkAttribute', ( evt, args ) => {\n\t * \tconst context = args[ 0 ];\n\t * \tconst attributeName = args[ 1 ];\n\t *\n\t * \tif ( context.endsWith( 'myTitle $text' ) && schema.getAttributeProperties( attributeName ).isFormatting ) {\n\t * \t\t// Prevent next listeners from being called.\n\t * \t\tevt.stop();\n\t * \t\t// Set the `checkAttribute()` return value.\n\t * \t\tevt.return = false;\n\t * \t}\n\t * }, { priority: 'high' } );\n\t * ```\n\t *\n\t * Note that the callback checks and declarative rules checks are processed on `normal` priority.\n\t *\n\t * Adding callbacks this way can also negatively impact editor performance.\n\t *\n\t * @param callback The callback to be called. It is called with two parameters:\n\t * {@link module:engine/model/schema~SchemaContext `context`} and attribute name. The callback may return `true` or `false`, to\n\t * override `checkAttribute()`'s return value. If it does not return a boolean value, the default algorithm (or other callbacks)\n\t * will define `checkAttribute()`'s return value.\n\t * @param attributeName Name of the attribute for which the callback is registered. If specified, the callback will be run only for\n\t * `checkAttribute()` calls with matching `attributeName`. Otherwise, the callback will run for every `checkAttribute()` call.\n\t */ addAttributeCheck(callback, attributeName) {\n        const key = attributeName !== undefined ? attributeName : this._genericCheckSymbol;\n        const checks = this._customAttributeChecks.get(key) || [];\n        checks.push(callback);\n        this._customAttributeChecks.set(key, checks);\n    }\n    /**\n\t * This method allows assigning additional metadata to the model attributes. For example,\n\t * {@link module:engine/model/schema~AttributeProperties `AttributeProperties#isFormatting` property} is\n\t * used to mark formatting attributes (like `bold` or `italic`).\n\t *\n\t * ```ts\n\t * // Mark bold as a formatting attribute.\n\t * schema.setAttributeProperties( 'bold', {\n\t * \tisFormatting: true\n\t * } );\n\t *\n\t * // Override code not to be considered a formatting markup.\n\t * schema.setAttributeProperties( 'code', {\n\t * \tisFormatting: false\n\t * } );\n\t * ```\n\t *\n\t * Properties are not limited to members defined in the\n\t * {@link module:engine/model/schema~AttributeProperties `AttributeProperties` type} and you can also use custom properties:\n\t *\n\t * ```ts\n\t * schema.setAttributeProperties( 'blockQuote', {\n\t * \tcustomProperty: 'value'\n\t * } );\n\t * ```\n\t *\n\t * Subsequent calls with the same attribute will extend its custom properties:\n\t *\n\t * ```ts\n\t * schema.setAttributeProperties( 'blockQuote', {\n\t * \tone: 1\n\t * } );\n\t *\n\t * schema.setAttributeProperties( 'blockQuote', {\n\t * \ttwo: 2\n\t * } );\n\t *\n\t * console.log( schema.getAttributeProperties( 'blockQuote' ) );\n\t * // Logs: { one: 1, two: 2 }\n\t * ```\n\t *\n\t * @param attributeName A name of the attribute to receive the properties.\n\t * @param properties A dictionary of properties.\n\t */ setAttributeProperties(attributeName, properties) {\n        this._attributeProperties[attributeName] = Object.assign(this.getAttributeProperties(attributeName), properties);\n    }\n    /**\n\t * Returns properties associated with a given model attribute. See {@link #setAttributeProperties `setAttributeProperties()`}.\n\t *\n\t * @param attributeName A name of the attribute.\n\t */ getAttributeProperties(attributeName) {\n        return this._attributeProperties[attributeName] || {};\n    }\n    /**\n\t * Returns the lowest {@link module:engine/model/schema~Schema#isLimit limit element} containing the entire\n\t * selection/range/position or the root otherwise.\n\t *\n\t * @param selectionOrRangeOrPosition The selection/range/position to check.\n\t * @returns The lowest limit element containing the entire `selectionOrRangeOrPosition`.\n\t */ getLimitElement(selectionOrRangeOrPosition) {\n        let element;\n        if (selectionOrRangeOrPosition instanceof Position) {\n            element = selectionOrRangeOrPosition.parent;\n        } else {\n            const ranges = selectionOrRangeOrPosition instanceof Range ? [\n                selectionOrRangeOrPosition\n            ] : Array.from(selectionOrRangeOrPosition.getRanges());\n            // Find the common ancestor for all selection's ranges.\n            element = ranges.reduce((element, range)=>{\n                const rangeCommonAncestor = range.getCommonAncestor();\n                if (!element) {\n                    return rangeCommonAncestor;\n                }\n                return element.getCommonAncestor(rangeCommonAncestor, {\n                    includeSelf: true\n                });\n            }, null);\n        }\n        while(!this.isLimit(element)){\n            if (element.parent) {\n                element = element.parent;\n            } else {\n                break;\n            }\n        }\n        return element;\n    }\n    /**\n\t * Checks whether the attribute is allowed in selection:\n\t *\n\t * * if the selection is not collapsed, then checks if the attribute is allowed on any of nodes in that range,\n\t * * if the selection is collapsed, then checks if on the selection position there's a text with the\n\t * specified attribute allowed.\n\t *\n\t * @param selection Selection which will be checked.\n\t * @param attribute The name of the attribute to check.\n\t */ checkAttributeInSelection(selection, attribute) {\n        if (selection.isCollapsed) {\n            const firstPosition = selection.getFirstPosition();\n            const context = [\n                ...firstPosition.getAncestors(),\n                new Text('', selection.getAttributes())\n            ];\n            // Check whether schema allows for a text with the attribute in the selection.\n            return this.checkAttribute(context, attribute);\n        } else {\n            const ranges = selection.getRanges();\n            // For all ranges, check nodes in them until you find a node that is allowed to have the attribute.\n            for (const range of ranges){\n                for (const value of range){\n                    if (this.checkAttribute(value.item, attribute)) {\n                        // If we found a node that is allowed to have the attribute, return true.\n                        return true;\n                    }\n                }\n            }\n        }\n        // If we haven't found such node, return false.\n        return false;\n    }\n    /**\n\t * Transforms the given set of ranges into a set of ranges where the given attribute is allowed (and can be applied).\n\t *\n\t * @param ranges Ranges to be validated.\n\t * @param attribute The name of the attribute to check.\n\t * @returns Ranges in which the attribute is allowed.\n\t */ *getValidRanges(ranges, attribute) {\n        ranges = convertToMinimalFlatRanges(ranges);\n        for (const range of ranges){\n            yield* this._getValidRangesForRange(range, attribute);\n        }\n    }\n    /**\n\t * Basing on given `position`, finds and returns a {@link module:engine/model/range~Range range} which is\n\t * nearest to that `position` and is a correct range for selection.\n\t *\n\t * The correct selection range might be collapsed when it is located in a position where the text node can be placed.\n\t * Non-collapsed range is returned when selection can be placed around element marked as an \"object\" in\n\t * the {@link module:engine/model/schema~Schema schema}.\n\t *\n\t * Direction of searching for the nearest correct selection range can be specified as:\n\t *\n\t * * `both` - searching will be performed in both ways,\n\t * * `forward` - searching will be performed only forward,\n\t * * `backward` - searching will be performed only backward.\n\t *\n\t * When valid selection range cannot be found, `null` is returned.\n\t *\n\t * @param position Reference position where new selection range should be looked for.\n\t * @param direction Search direction.\n\t * @returns Nearest selection range or `null` if one cannot be found.\n\t */ getNearestSelectionRange(position, direction = 'both') {\n        if (position.root.rootName == '$graveyard') {\n            // No valid selection range in the graveyard.\n            // This is important when getting the document selection default range.\n            return null;\n        }\n        // Return collapsed range if provided position is valid.\n        if (this.checkChild(position, '$text')) {\n            return new Range(position);\n        }\n        let backwardWalker, forwardWalker;\n        // Never leave a limit element.\n        const limitElement = position.getAncestors().reverse().find((item)=>this.isLimit(item)) || position.root;\n        if (direction == 'both' || direction == 'backward') {\n            backwardWalker = new TreeWalker({\n                boundaries: Range._createIn(limitElement),\n                startPosition: position,\n                direction: 'backward'\n            });\n        }\n        if (direction == 'both' || direction == 'forward') {\n            forwardWalker = new TreeWalker({\n                boundaries: Range._createIn(limitElement),\n                startPosition: position\n            });\n        }\n        for (const data of combineWalkers(backwardWalker, forwardWalker)){\n            const type = data.walker == backwardWalker ? 'elementEnd' : 'elementStart';\n            const value = data.value;\n            if (value.type == type && this.isObject(value.item)) {\n                return Range._createOn(value.item);\n            }\n            if (this.checkChild(value.nextPosition, '$text')) {\n                return new Range(value.nextPosition);\n            }\n        }\n        return null;\n    }\n    /**\n\t * Tries to find position ancestors that allow to insert a given node.\n\t * It starts searching from the given position and goes node by node to the top of the model tree\n\t * as long as a {@link module:engine/model/schema~Schema#isLimit limit element}, an\n\t * {@link module:engine/model/schema~Schema#isObject object element} or a topmost ancestor is not reached.\n\t *\n\t * @param position The position that the search will start from.\n\t * @param node The node for which an allowed parent should be found or its name.\n\t * @returns Allowed parent or null if nothing was found.\n\t */ findAllowedParent(position, node) {\n        let parent = position.parent;\n        while(parent){\n            if (this.checkChild(parent, node)) {\n                return parent;\n            }\n            // Do not split limit elements.\n            if (this.isLimit(parent)) {\n                return null;\n            }\n            parent = parent.parent;\n        }\n        return null;\n    }\n    /**\n\t * Sets attributes allowed by the schema on a given node.\n\t *\n\t * @param node A node to set attributes on.\n\t * @param attributes Attributes keys and values.\n\t * @param writer An instance of the model writer.\n\t */ setAllowedAttributes(node, attributes, writer) {\n        const model = writer.model;\n        for (const [attributeName, attributeValue] of Object.entries(attributes)){\n            if (model.schema.checkAttribute(node, attributeName)) {\n                writer.setAttribute(attributeName, attributeValue, node);\n            }\n        }\n    }\n    /**\n\t * Removes attributes disallowed by the schema.\n\t *\n\t * @param nodes Nodes that will be filtered.\n\t */ removeDisallowedAttributes(nodes, writer) {\n        for (const node of nodes){\n            // When node is a `Text` it has no children, so just filter it out.\n            if (node.is('$text')) {\n                removeDisallowedAttributeFromNode(this, node, writer);\n            } else {\n                const rangeInNode = Range._createIn(node);\n                const positionsInRange = rangeInNode.getPositions();\n                for (const position of positionsInRange){\n                    const item = position.nodeBefore || position.parent;\n                    removeDisallowedAttributeFromNode(this, item, writer);\n                }\n            }\n        }\n    }\n    /**\n\t * Gets attributes of a node that have a given property.\n\t *\n\t * @param node Node to get attributes from.\n\t * @param propertyName Name of the property that attribute must have to return it.\n\t * @param propertyValue Desired value of the property that we want to check.\n\t * When `undefined` attributes will be returned if they have set a given property no matter what the value is. If specified it will\n\t * return attributes which given property's value is equal to this parameter.\n\t * @returns Object with attributes' names as key and attributes' values as value.\n\t */ getAttributesWithProperty(node, propertyName, propertyValue) {\n        const attributes = {};\n        for (const [attributeName, attributeValue] of node.getAttributes()){\n            const attributeProperties = this.getAttributeProperties(attributeName);\n            if (attributeProperties[propertyName] === undefined) {\n                continue;\n            }\n            if (propertyValue === undefined || propertyValue === attributeProperties[propertyName]) {\n                attributes[attributeName] = attributeValue;\n            }\n        }\n        return attributes;\n    }\n    /**\n\t * Creates an instance of the schema context.\n\t */ createContext(context) {\n        return new SchemaContext(context);\n    }\n    _clearCache() {\n        this._compiledDefinitions = null;\n    }\n    _compile() {\n        const definitions = {};\n        const sourceRules = this._sourceDefinitions;\n        const itemNames = Object.keys(sourceRules);\n        for (const itemName of itemNames){\n            definitions[itemName] = compileBaseItemRule(sourceRules[itemName], itemName);\n        }\n        const items = Object.values(definitions);\n        // Sometimes features add rules (allows, disallows) for items that has not been registered yet. We allow that, to make it easier\n        // to put the schema together. However, sometimes these items are never registered. To prevent operating\n        // removeUnregisteredEntries( definitions, items );\n        // 1. Propagate `childItem.allowIn` to `parentItem.allowChildren` and vice versa, so that these properties are completely mirrored\n        // for all children and parents. Do the same for `disallowIn` and `disallowChildren`.\n        for (const item of items){\n            propagateAllowIn(definitions, item);\n            propagateAllowChildren(definitions, item);\n            propagateDisallowIn(definitions, item);\n            propagateDisallowChildren(definitions, item);\n        }\n        // 2. Remove from `allowIn` and `allowChildren` these items which where disallowed by `disallowIn` and `disallowChildren`.\n        // Do the same for attributes. Now we have a clear situation where which item/attribute is allowed. Inheritance is in next steps.\n        for (const item of items){\n            resolveDisallows(definitions, item);\n        }\n        // 3. Compile `item.allowContentOf` property. For each entry in `allowContentOf`, we want to take `allowChildren` and rewrite\n        // them into `item.allowChildren`. `item.disallowChildren` is used to filter out some entries. This way \"own rules\" have higher\n        // priority than \"inherited rules\". Mirroring from step 1. is maintained.\n        for (const item of items){\n            compileAllowContentOf(definitions, item);\n        }\n        // 4. Compile `item.allowWhere` property. For each entry in `allowWhere`, we want to take `allowIn` and rewrite them into\n        // `item.allowIn`. `item.disallowIn` is used to filter out some entries. This way \"own rules\" have higher priority than\n        // \"inherited rules\". Mirroring from step 1. is maintained.\n        for (const item of items){\n            compileAllowWhere(definitions, item);\n        }\n        // 5. Compile `item.allowAttributesOf`. For each entry in `allowAttributesOf`, we want to take `allowAttributes` and rewrite them\n        // into `item.allowAttributes`. `item.disallowAttributes` is used to filter out some entries. This way \"own rules\" have higher\n        // priority than \"inherited rules\".\n        for (const item of items){\n            compileAllowAttributesOf(definitions, item);\n        }\n        // 6. Compile `item.inheritTypesFrom` property. For each entry in `inheritTypesFrom`, we want to take `is*` properties and\n        // set them on `item` (if they are not set yet).\n        for (const item of items){\n            compileInheritPropertiesFrom(definitions, item);\n        }\n        // Compile final definitions. Unnecessary properties are removed and some additional cleaning is applied.\n        this._compiledDefinitions = compileDefinitions(definitions);\n    }\n    _checkContextMatch(context, def) {\n        const parentItem = context.last;\n        // First, check all child checks declared as callbacks.\n        // Note that `_evaluateChildChecks()` will return `undefined` if neither child check was applicable (no decision was made).\n        let isAllowed = this._evaluateChildChecks(context, def);\n        // If the decision was not made inside child check callbacks, then use declarative rules.\n        isAllowed = isAllowed !== undefined ? isAllowed : def.allowIn.includes(parentItem.name);\n        // If the item is not allowed in the `context`, return `false`.\n        if (!isAllowed) {\n            return false;\n        }\n        // If the item is allowed, recursively verify the rest of the `context`.\n        const parentItemDefinition = this.getDefinition(parentItem);\n        const parentContext = context.trimLast();\n        // One of the items in the original `context` did not have a definition specified. In this case, the whole context is disallowed.\n        if (!parentItemDefinition) {\n            return false;\n        }\n        // Whole `context` was verified and passed checks.\n        if (parentContext.length == 0) {\n            return true;\n        }\n        // Verify \"truncated\" parent context. The last item of the original context is now the definition to check.\n        return this._checkContextMatch(parentContext, parentItemDefinition);\n    }\n    /**\n\t * Calls child check callbacks to decide whether `def` is allowed in `context`. It uses both generic and specific (defined for `def`\n\t * item) callbacks. If neither callback makes a decision, `undefined` is returned.\n\t *\n\t * Note that the first callback that makes a decision \"wins\", i.e., if any callback returns `true` or `false`, then the processing\n\t * is over and that result is returned.\n\t */ _evaluateChildChecks(context, def) {\n        const genericChecks = this._customChildChecks.get(this._genericCheckSymbol) || [];\n        const childChecks = this._customChildChecks.get(def.name) || [];\n        for (const check of [\n            ...genericChecks,\n            ...childChecks\n        ]){\n            const result = check(context, def);\n            if (result !== undefined) {\n                return result;\n            }\n        }\n    }\n    /**\n\t * Calls attribute check callbacks to decide whether `attributeName` can be set on the last element of `context`. It uses both\n\t * generic and specific (defined for `attributeName`) callbacks. If neither callback makes a decision, `undefined` is returned.\n\t *\n\t * Note that the first callback that makes a decision \"wins\", i.e., if any callback returns `true` or `false`, then the processing\n\t * is over and that result is returned.\n\t */ _evaluateAttributeChecks(context, attributeName) {\n        const genericChecks = this._customAttributeChecks.get(this._genericCheckSymbol) || [];\n        const childChecks = this._customAttributeChecks.get(attributeName) || [];\n        for (const check of [\n            ...genericChecks,\n            ...childChecks\n        ]){\n            const result = check(context, attributeName);\n            if (result !== undefined) {\n                return result;\n            }\n        }\n    }\n    /**\n\t * Takes a flat range and an attribute name. Traverses the range recursively and deeply to find and return all ranges\n\t * inside the given range on which the attribute can be applied.\n\t *\n\t * This is a helper function for {@link ~Schema#getValidRanges}.\n\t *\n\t * @param range The range to process.\n\t * @param attribute The name of the attribute to check.\n\t * @returns Ranges in which the attribute is allowed.\n\t */ *_getValidRangesForRange(range, attribute) {\n        let start = range.start;\n        let end = range.start;\n        for (const item of range.getItems({\n            shallow: true\n        })){\n            if (item.is('element')) {\n                yield* this._getValidRangesForRange(Range._createIn(item), attribute);\n            }\n            if (!this.checkAttribute(item, attribute)) {\n                if (!start.isEqual(end)) {\n                    yield new Range(start, end);\n                }\n                start = Position._createAfter(item);\n            }\n            end = Position._createAfter(item);\n        }\n        if (!start.isEqual(end)) {\n            yield new Range(start, end);\n        }\n    }\n    /**\n\t * Returns a model range which is optimal (in terms of UX) for inserting a widget block.\n\t *\n\t * For instance, if a selection is in the middle of a paragraph, the collapsed range before this paragraph\n\t * will be returned so that it is not split. If the selection is at the end of a paragraph,\n\t * the collapsed range after this paragraph will be returned.\n\t *\n\t * Note: If the selection is placed in an empty block, the range in that block will be returned. If that range\n\t * is then passed to {@link module:engine/model/model~Model#insertContent}, the block will be fully replaced\n\t * by the inserted widget block.\n\t *\n\t * @internal\n\t * @param selection The selection based on which the insertion position should be calculated.\n\t * @param place The place where to look for optimal insertion range.\n\t * The `auto` value will determine itself the best position for insertion.\n\t * The `before` value will try to find a position before selection.\n\t * The `after` value will try to find a position after selection.\n\t * @returns The optimal range.\n\t */ findOptimalInsertionRange(selection, place) {\n        const selectedElement = selection.getSelectedElement();\n        if (selectedElement && this.isObject(selectedElement) && !this.isInline(selectedElement)) {\n            if (place == 'before' || place == 'after') {\n                return new Range(Position._createAt(selectedElement, place));\n            }\n            return Range._createOn(selectedElement);\n        }\n        const firstBlock = first(selection.getSelectedBlocks());\n        // There are no block elements within ancestors (in the current limit element).\n        if (!firstBlock) {\n            return new Range(selection.focus);\n        }\n        // If inserting into an empty block – return position in that block. It will get\n        // replaced with the image by insertContent(). #42.\n        if (firstBlock.isEmpty) {\n            return new Range(Position._createAt(firstBlock, 0));\n        }\n        const positionAfter = Position._createAfter(firstBlock);\n        // If selection is at the end of the block - return position after the block.\n        if (selection.focus.isTouching(positionAfter)) {\n            return new Range(positionAfter);\n        }\n        // Otherwise, return position before the block.\n        return new Range(Position._createBefore(firstBlock));\n    }\n}\n/**\n * A schema context &ndash; a list of ancestors of a given position in the document.\n *\n * Considering such position:\n *\n * ```xml\n * <$root>\n * \t<blockQuote>\n * \t\t<paragraph>\n * \t\t\t^\n * \t\t</paragraph>\n * \t</blockQuote>\n * </$root>\n * ```\n *\n * The context of this position is its {@link module:engine/model/position~Position#getAncestors lists of ancestors}:\n *\n *\t\t[ rootElement, blockQuoteElement, paragraphElement ]\n *\n * Contexts are used in the {@link module:engine/model/schema~Schema#event:checkChild `Schema#checkChild`} and\n * {@link module:engine/model/schema~Schema#event:checkAttribute `Schema#checkAttribute`} events as a definition\n * of a place in the document where the check occurs. The context instances are created based on the first arguments\n * of the {@link module:engine/model/schema~Schema#checkChild `Schema#checkChild()`} and\n * {@link module:engine/model/schema~Schema#checkAttribute `Schema#checkAttribute()`} methods so when\n * using these methods you need to use {@link module:engine/model/schema~SchemaContextDefinition}s.\n */ class SchemaContext {\n    _items;\n    /**\n\t * Creates an instance of the context.\n\t */ constructor(context){\n        if (context instanceof SchemaContext) {\n            return context;\n        }\n        let items;\n        if (typeof context == 'string') {\n            items = [\n                context\n            ];\n        } else if (!Array.isArray(context)) {\n            // `context` is item or position.\n            // Position#getAncestors() doesn't accept any parameters but it works just fine here.\n            items = context.getAncestors({\n                includeSelf: true\n            });\n        } else {\n            items = context;\n        }\n        this._items = items.map(mapContextItem);\n    }\n    /**\n\t * The number of items.\n\t */ get length() {\n        return this._items.length;\n    }\n    /**\n\t * The last item (the lowest node).\n\t */ get last() {\n        return this._items[this._items.length - 1];\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * Iterates over all context items.\n\t */ [Symbol.iterator]() {\n        return this._items[Symbol.iterator]();\n    }\n    /**\n\t * Returns a new schema context instance with an additional item.\n\t *\n\t * Item can be added as:\n\t *\n\t * ```ts\n\t * const context = new SchemaContext( [ '$root' ] );\n\t *\n\t * // An element.\n\t * const fooElement = writer.createElement( 'fooElement' );\n\t * const newContext = context.push( fooElement ); // [ '$root', 'fooElement' ]\n\t *\n\t * // A text node.\n\t * const text = writer.createText( 'foobar' );\n\t * const newContext = context.push( text ); // [ '$root', '$text' ]\n\t *\n\t * // A string (element name).\n\t * const newContext = context.push( 'barElement' ); // [ '$root', 'barElement' ]\n\t * ```\n\t *\n\t * **Note** {@link module:engine/model/node~Node} that is already in the model tree will be added as the only item\n\t * (without ancestors).\n\t *\n\t * @param item An item that will be added to the current context.\n\t * @returns A new schema context instance with an additional item.\n\t */ push(item) {\n        const ctx = new SchemaContext([\n            item\n        ]);\n        ctx._items = [\n            ...this._items,\n            ...ctx._items\n        ];\n        return ctx;\n    }\n    /**\n\t * Returns a new schema context that is based on this context but has the last item removed.\n\t *\n\t * ```ts\n\t * const ctxParagraph = new SchemaContext( [ '$root', 'blockQuote', 'paragraph' ] );\n\t * const ctxBlockQuote = ctxParagraph.trimLast(); // Items in `ctxBlockQuote` are: `$root` an `blockQuote`.\n\t * const ctxRoot = ctxBlockQuote.trimLast(); // Items in `ctxRoot` are: `$root`.\n\t * ```\n\t *\n\t * @returns A new reduced schema context instance.\n\t */ trimLast() {\n        const ctx = new SchemaContext([]);\n        ctx._items = this._items.slice(0, -1);\n        return ctx;\n    }\n    /**\n\t * Gets an item on the given index.\n\t */ getItem(index) {\n        return this._items[index];\n    }\n    /**\n\t * Returns the names of items.\n\t */ *getNames() {\n        yield* this._items.map((item)=>item.name);\n    }\n    /**\n\t * Checks whether the context ends with the given nodes.\n\t *\n\t * ```ts\n\t * const ctx = new SchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t *\n\t * ctx.endsWith( '$text' ); // -> true\n\t * ctx.endsWith( 'paragraph $text' ); // -> true\n\t * ctx.endsWith( '$root' ); // -> false\n\t * ctx.endsWith( 'paragraph' ); // -> false\n\t * ```\n\t */ endsWith(query) {\n        return Array.from(this.getNames()).join(' ').endsWith(query);\n    }\n    /**\n\t * Checks whether the context starts with the given nodes.\n\t *\n\t * ```ts\n\t * const ctx = new SchemaContext( [ rootElement, paragraphElement, textNode ] );\n\t *\n\t * ctx.endsWith( '$root' ); // -> true\n\t * ctx.endsWith( '$root paragraph' ); // -> true\n\t * ctx.endsWith( '$text' ); // -> false\n\t * ctx.endsWith( 'paragraph' ); // -> false\n\t * ```\n\t */ startsWith(query) {\n        return Array.from(this.getNames()).join(' ').startsWith(query);\n    }\n}\nfunction compileBaseItemRule(sourceItemRules, itemName) {\n    const itemRule = {\n        name: itemName,\n        allowIn: new Set(),\n        allowChildren: new Set(),\n        disallowIn: new Set(),\n        disallowChildren: new Set(),\n        allowContentOf: new Set(),\n        allowWhere: new Set(),\n        allowAttributes: new Set(),\n        disallowAttributes: new Set(),\n        allowAttributesOf: new Set(),\n        inheritTypesFrom: new Set()\n    };\n    copyTypes(sourceItemRules, itemRule);\n    copyProperty(sourceItemRules, itemRule, 'allowIn');\n    copyProperty(sourceItemRules, itemRule, 'allowChildren');\n    copyProperty(sourceItemRules, itemRule, 'disallowIn');\n    copyProperty(sourceItemRules, itemRule, 'disallowChildren');\n    copyProperty(sourceItemRules, itemRule, 'allowContentOf');\n    copyProperty(sourceItemRules, itemRule, 'allowWhere');\n    copyProperty(sourceItemRules, itemRule, 'allowAttributes');\n    copyProperty(sourceItemRules, itemRule, 'disallowAttributes');\n    copyProperty(sourceItemRules, itemRule, 'allowAttributesOf');\n    copyProperty(sourceItemRules, itemRule, 'inheritTypesFrom');\n    resolveInheritAll(sourceItemRules, itemRule);\n    return itemRule;\n}\nfunction propagateAllowIn(definitions, item) {\n    for (const parentName of item.allowIn){\n        const parentItem = definitions[parentName];\n        if (parentItem) {\n            parentItem.allowChildren.add(item.name);\n        } else {\n            item.allowIn.delete(parentName);\n        }\n    }\n}\nfunction propagateAllowChildren(definitions, item) {\n    for (const childName of item.allowChildren){\n        const childItem = definitions[childName];\n        if (childItem) {\n            childItem.allowIn.add(item.name);\n        } else {\n            item.allowChildren.delete(childName);\n        }\n    }\n}\nfunction propagateDisallowIn(definitions, item) {\n    for (const parentName of item.disallowIn){\n        const parentItem = definitions[parentName];\n        if (parentItem) {\n            parentItem.disallowChildren.add(item.name);\n        } else {\n            item.disallowIn.delete(parentName);\n        }\n    }\n}\nfunction propagateDisallowChildren(definitions, item) {\n    for (const childName of item.disallowChildren){\n        const childItem = definitions[childName];\n        if (childItem) {\n            childItem.disallowIn.add(item.name);\n        } else {\n            item.disallowChildren.delete(childName);\n        }\n    }\n}\nfunction resolveDisallows(definitions, item) {\n    for (const childName of item.disallowChildren){\n        item.allowChildren.delete(childName);\n    }\n    for (const parentName of item.disallowIn){\n        item.allowIn.delete(parentName);\n    }\n    for (const attributeName of item.disallowAttributes){\n        item.allowAttributes.delete(attributeName);\n    }\n}\nfunction compileAllowContentOf(definitions, item) {\n    for (const allowContentOfItemName of item.allowContentOf){\n        const baseItem = definitions[allowContentOfItemName];\n        if (!baseItem) {\n            continue;\n        }\n        // Copy `disallowChildren` to propagate this \"knowledge\" down the inheritance chain. The inheritance may involve multiple items and\n        // if this is not propagated, then items down the chain may start to allow for items that were disallowed by previous base items.\n        //\n        // The scenarios were it is important involves multiple inherits both on parent items side and on the child items side.\n        baseItem.disallowChildren.forEach((childName)=>{\n            // Own item's rules takes precedence before inherited.\n            // If the item directly allows for given child, ignore that base item disallowed that child.\n            if (item.allowChildren.has(childName)) {\n                return;\n            }\n            item.disallowChildren.add(childName);\n            definitions[childName].disallowIn.add(item.name);\n        });\n        // Copy `allowChildren` from the base item to allow for the same items.\n        baseItem.allowChildren.forEach((childName)=>{\n            // Own item's rules takes precedence before inherited.\n            // Also, `item.disallowChildren` might get some new items during inheritance process.\n            if (item.disallowChildren.has(childName)) {\n                return;\n            }\n            item.allowChildren.add(childName);\n            definitions[childName].allowIn.add(item.name);\n        });\n    }\n}\nfunction compileAllowWhere(definitions, item) {\n    for (const allowWhereItemName of item.allowWhere){\n        const baseItem = definitions[allowWhereItemName];\n        if (!baseItem) {\n            continue;\n        }\n        // Copy `disallowIn` to propagate this \"knowledge\" down the inheritance chain. The inheritance may involve multiple items and\n        // if this is not propagated, then items down the chain may start to be allowed in items in which they were disallowed previously.\n        //\n        // The scenarios were it is important involves multiple inherits both on parent items side and on the child items side.\n        baseItem.disallowIn.forEach((parentName)=>{\n            // Own item's rules takes precedence before inherited.\n            // If the item is directly allowed in given parent, ignore that base item was disallowed in it.\n            if (item.allowIn.has(parentName)) {\n                return;\n            }\n            item.disallowIn.add(parentName);\n            definitions[parentName].disallowChildren.add(item.name);\n        });\n        // Copy `allowIn` from the base item to allow item in same parents.\n        baseItem.allowIn.forEach((parentName)=>{\n            // Own item's rules takes precedence before inherited.\n            // Also, `item.disallowIn` might get some new items during inheritance process.\n            if (item.disallowIn.has(parentName)) {\n                return;\n            }\n            item.allowIn.add(parentName);\n            definitions[parentName].allowChildren.add(item.name);\n        });\n    }\n}\nfunction compileDefinitions(definitions) {\n    const finalDefinitions = {};\n    for (const item of Object.values(definitions)){\n        finalDefinitions[item.name] = {\n            name: item.name,\n            // `is*` properties may not be set - convert `undefined` to `false`.\n            isBlock: !!item.isBlock,\n            isContent: !!item.isContent,\n            isInline: !!item.isInline,\n            isLimit: !!item.isLimit,\n            isObject: !!item.isObject,\n            isSelectable: !!item.isSelectable,\n            // Filter out non-existing items.\n            allowIn: Array.from(item.allowIn).filter((name)=>!!definitions[name]),\n            allowChildren: Array.from(item.allowChildren).filter((name)=>!!definitions[name]),\n            allowAttributes: Array.from(item.allowAttributes)\n        };\n    }\n    return finalDefinitions;\n}\nfunction compileAllowAttributesOf(definitions, item) {\n    for (const allowAttributeOfItemName of item.allowAttributesOf){\n        const baseItem = definitions[allowAttributeOfItemName];\n        if (!baseItem) {\n            return;\n        }\n        baseItem.allowAttributes.forEach((attributeName)=>{\n            if (item.disallowAttributes.has(attributeName)) {\n                return;\n            }\n            item.allowAttributes.add(attributeName);\n        });\n    }\n}\nfunction compileInheritPropertiesFrom(definitions, item) {\n    for (const inheritPropertiesOfItemName of item.inheritTypesFrom){\n        const inheritFrom = definitions[inheritPropertiesOfItemName];\n        if (inheritFrom) {\n            const typeNames = Object.keys(inheritFrom).filter((name)=>name.startsWith('is'));\n            for (const name of typeNames){\n                if (!(name in item)) {\n                    item[name] = inheritFrom[name];\n                }\n            }\n        }\n    }\n}\nfunction copyTypes(sourceItemRules, itemRule) {\n    for (const sourceItemRule of sourceItemRules){\n        const typeNames = Object.keys(sourceItemRule).filter((name)=>name.startsWith('is'));\n        for (const name of typeNames){\n            itemRule[name] = !!sourceItemRule[name];\n        }\n    }\n}\nfunction copyProperty(sourceItemRules, itemRule, propertyName) {\n    for (const sourceItemRule of sourceItemRules){\n        let value = sourceItemRule[propertyName];\n        // `value` can be a string, an array or undefined.\n        // Convert a string to an array with one item, then handle an array. Skip undefined this way.\n        if (typeof value == 'string') {\n            value = [\n                value\n            ];\n        }\n        if (Array.isArray(value)) {\n            value.forEach((singleValue)=>itemRule[propertyName].add(singleValue));\n        }\n    }\n}\nfunction resolveInheritAll(sourceItemRules, itemRule) {\n    for (const sourceItemRule of sourceItemRules){\n        const inheritFrom = sourceItemRule.inheritAllFrom;\n        if (inheritFrom) {\n            itemRule.allowContentOf.add(inheritFrom);\n            itemRule.allowWhere.add(inheritFrom);\n            itemRule.allowAttributesOf.add(inheritFrom);\n            itemRule.inheritTypesFrom.add(inheritFrom);\n        }\n    }\n}\nfunction mapContextItem(ctxItem) {\n    if (typeof ctxItem == 'string' || ctxItem.is('documentFragment')) {\n        return {\n            name: typeof ctxItem == 'string' ? ctxItem : '$documentFragment',\n            *getAttributeKeys () {},\n            getAttribute () {}\n        };\n    } else {\n        return {\n            // '$text' means text nodes and text proxies.\n            name: ctxItem.is('element') ? ctxItem.name : '$text',\n            *getAttributeKeys () {\n                yield* ctxItem.getAttributeKeys();\n            },\n            getAttribute (key) {\n                return ctxItem.getAttribute(key);\n            }\n        };\n    }\n}\n/**\n * Generator function returning values from provided walkers, switching between them at each iteration. If only one walker\n * is provided it will return data only from that walker.\n *\n * @param backward Walker iterating in backward direction.\n * @param forward Walker iterating in forward direction.\n * @returns Object returned at each iteration contains `value` and `walker` (informing which walker returned\n * given value) fields.\n */ function* combineWalkers(backward, forward) {\n    let done = false;\n    while(!done){\n        done = true;\n        if (backward) {\n            const step = backward.next();\n            if (!step.done) {\n                done = false;\n                yield {\n                    walker: backward,\n                    value: step.value\n                };\n            }\n        }\n        if (forward) {\n            const step = forward.next();\n            if (!step.done) {\n                done = false;\n                yield {\n                    walker: forward,\n                    value: step.value\n                };\n            }\n        }\n    }\n}\n/**\n * Takes an array of non-intersecting ranges. For each of them gets minimal flat ranges covering that range and returns\n * all those minimal flat ranges.\n *\n * @param ranges Ranges to process.\n * @returns Minimal flat ranges of given `ranges`.\n */ function* convertToMinimalFlatRanges(ranges) {\n    for (const range of ranges){\n        yield* range.getMinimalFlatRanges();\n    }\n}\nfunction removeDisallowedAttributeFromNode(schema, node, writer) {\n    for (const attribute of node.getAttributeKeys()){\n        if (!schema.checkAttribute(node, attribute)) {\n            writer.removeAttribute(attribute, node);\n        }\n    }\n}\n\n/**\n * Upcast dispatcher is a central point of the view-to-model conversion, which is a process of\n * converting a given {@link module:engine/view/documentfragment~DocumentFragment view document fragment} or\n * {@link module:engine/view/element~Element view element} into a correct model structure.\n *\n * During the conversion process, the dispatcher fires events for all {@link module:engine/view/node~Node view nodes}\n * from the converted view document fragment.\n * Special callbacks called \"converters\" should listen to these events in order to convert the view nodes.\n *\n * The second parameter of the callback is the `data` object with the following properties:\n *\n * * `data.viewItem` contains a {@link module:engine/view/node~Node view node} or a\n * {@link module:engine/view/documentfragment~DocumentFragment view document fragment}\n * that is converted at the moment and might be handled by the callback.\n * * `data.modelRange` is used to point to the result\n * of the current conversion (e.g. the element that is being inserted)\n * and is always a {@link module:engine/model/range~Range} when the conversion succeeds.\n * * `data.modelCursor` is a {@link module:engine/model/position~Position position} on which the converter should insert\n * the newly created items.\n *\n * The third parameter of the callback is an instance of {@link module:engine/conversion/upcastdispatcher~UpcastConversionApi}\n * which provides additional tools for converters.\n *\n * You can read more about conversion in the {@glink framework/deep-dive/conversion/upcast Upcast conversion} guide.\n *\n * Examples of event-based converters:\n *\n * ```ts\n * // A converter for links (<a>).\n * editor.data.upcastDispatcher.on( 'element:a', ( evt, data, conversionApi ) => {\n * \tif ( conversionApi.consumable.consume( data.viewItem, { name: true, attributes: [ 'href' ] } ) ) {\n * \t\t// The <a> element is inline and is represented by an attribute in the model.\n * \t\t// This is why you need to convert only children.\n * \t\tconst { modelRange } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n *\n * \t\tfor ( let item of modelRange.getItems() ) {\n * \t\t\tif ( conversionApi.schema.checkAttribute( item, 'linkHref' ) ) {\n * \t\t\t\tconversionApi.writer.setAttribute( 'linkHref', data.viewItem.getAttribute( 'href' ), item );\n * \t\t\t}\n * \t\t}\n * \t}\n * } );\n *\n * // Convert <p> element's font-size style.\n * // Note: You should use a low-priority observer in order to ensure that\n * // it is executed after the element-to-element converter.\n * editor.data.upcastDispatcher.on( 'element:p', ( evt, data, conversionApi ) => {\n * \tconst { consumable, schema, writer } = conversionApi;\n *\n * \tif ( !consumable.consume( data.viewItem, { style: 'font-size' } ) ) {\n * \t\treturn;\n * \t}\n *\n * \tconst fontSize = data.viewItem.getStyle( 'font-size' );\n *\n * \t// Do not go for the model element after data.modelCursor because it might happen\n * \t// that a single view element was converted to multiple model elements. Get all of them.\n * \tfor ( const item of data.modelRange.getItems( { shallow: true } ) ) {\n * \t\tif ( schema.checkAttribute( item, 'fontSize' ) ) {\n * \t\t\twriter.setAttribute( 'fontSize', fontSize, item );\n * \t\t}\n * \t}\n * }, { priority: 'low' } );\n *\n * // Convert all elements which have no custom converter into a paragraph (autoparagraphing).\n * editor.data.upcastDispatcher.on( 'element', ( evt, data, conversionApi ) => {\n * \t// Check if an element can be converted.\n * \tif ( !conversionApi.consumable.test( data.viewItem, { name: data.viewItem.name } ) ) {\n * \t\t// When an element is already consumed by higher priority converters, do nothing.\n * \t\treturn;\n * \t}\n *\n * \tconst paragraph = conversionApi.writer.createElement( 'paragraph' );\n *\n * \t// Try to safely insert a paragraph at the model cursor - it will find an allowed parent for the current element.\n * \tif ( !conversionApi.safeInsert( paragraph, data.modelCursor ) ) {\n * \t\t// When an element was not inserted, it means that you cannot insert a paragraph at this position.\n * \t\treturn;\n * \t}\n *\n * \t// Consume the inserted element.\n * \tconversionApi.consumable.consume( data.viewItem, { name: data.viewItem.name } ) );\n *\n * \t// Convert the children to a paragraph.\n * \tconst { modelRange } = conversionApi.convertChildren( data.viewItem,  paragraph ) );\n *\n * \t// Update `modelRange` and `modelCursor` in the `data` as a conversion result.\n * \tconversionApi.updateConversionResult( paragraph, data );\n * }, { priority: 'low' } );\n * ```\n *\n * @fires viewCleanup\n * @fires element\n * @fires text\n * @fires documentFragment\n */ class UpcastDispatcher extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * An interface passed by the dispatcher to the event callbacks.\n\t */ conversionApi;\n    /**\n\t * The list of elements that were created during splitting.\n\t *\n\t * After the conversion process, the list is cleared.\n\t */ _splitParts = new Map();\n    /**\n\t * The list of cursor parent elements that were created during splitting.\n\t *\n\t * After the conversion process the list is cleared.\n\t */ _cursorParents = new Map();\n    /**\n\t * The position in the temporary structure where the converted content is inserted. The structure reflects the context of\n\t * the target position where the content will be inserted. This property is built based on the context parameter of the\n\t * convert method.\n\t */ _modelCursor = null;\n    /**\n\t * The list of elements that were created during the splitting but should not get removed on conversion end even if they are empty.\n\t *\n\t * The list is cleared after the conversion process.\n\t */ _emptyElementsToKeep = new Set();\n    /**\n\t * Creates an upcast dispatcher that operates using the passed API.\n\t *\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi\n\t * @param conversionApi Additional properties for an interface that will be passed to events fired\n\t * by the upcast dispatcher.\n\t */ constructor(conversionApi){\n        super();\n        this.conversionApi = {\n            ...conversionApi,\n            consumable: null,\n            writer: null,\n            store: null,\n            convertItem: (viewItem, modelCursor)=>this._convertItem(viewItem, modelCursor),\n            convertChildren: (viewElement, positionOrElement)=>this._convertChildren(viewElement, positionOrElement),\n            safeInsert: (modelNode, position)=>this._safeInsert(modelNode, position),\n            updateConversionResult: (modelElement, data)=>this._updateConversionResult(modelElement, data),\n            // Advanced API - use only if custom position handling is needed.\n            splitToAllowedParent: (modelNode, modelCursor)=>this._splitToAllowedParent(modelNode, modelCursor),\n            getSplitParts: (modelElement)=>this._getSplitParts(modelElement),\n            keepEmptyElement: (modelElement)=>this._keepEmptyElement(modelElement)\n        };\n    }\n    /**\n\t * Starts the conversion process. The entry point for the conversion.\n\t *\n\t * @fires element\n\t * @fires text\n\t * @fires documentFragment\n\t * @param viewElement The part of the view to be converted.\n\t * @param writer An instance of the model writer.\n\t * @param context Elements will be converted according to this context.\n\t * @returns Model data that is the result of the conversion process\n\t * wrapped in `DocumentFragment`. Converted marker elements will be set as the document fragment's\n\t * {@link module:engine/model/documentfragment~DocumentFragment#markers static markers map}.\n\t */ convert(viewElement, writer, context = [\n        '$root'\n    ]) {\n        this.fire('viewCleanup', viewElement);\n        // Create context tree and set position in the top element.\n        // Items will be converted according to this position.\n        this._modelCursor = createContextTree(context, writer);\n        // Store writer in conversion as a conversion API\n        // to be sure that conversion process will use the same batch.\n        this.conversionApi.writer = writer;\n        // Create consumable values list for conversion process.\n        this.conversionApi.consumable = ViewConsumable.createFrom(viewElement);\n        // Custom data stored by converter for conversion process.\n        this.conversionApi.store = {};\n        // Do the conversion.\n        const { modelRange } = this._convertItem(viewElement, this._modelCursor);\n        // Conversion result is always a document fragment so let's create it.\n        const documentFragment = writer.createDocumentFragment();\n        // When there is a conversion result.\n        if (modelRange) {\n            // Remove all empty elements that were created while splitting.\n            this._removeEmptyElements();\n            // Move all items that were converted in context tree to the document fragment.\n            for (const item of Array.from(this._modelCursor.parent.getChildren())){\n                writer.append(item, documentFragment);\n            }\n            // Extract temporary markers elements from model and set as static markers collection.\n            documentFragment.markers = extractMarkersFromModelFragment(documentFragment, writer);\n        }\n        // Clear context position.\n        this._modelCursor = null;\n        // Clear split elements & parents lists.\n        this._splitParts.clear();\n        this._cursorParents.clear();\n        this._emptyElementsToKeep.clear();\n        // Clear conversion API.\n        this.conversionApi.writer = null;\n        this.conversionApi.store = null;\n        // Return fragment as conversion result.\n        return documentFragment;\n    }\n    /**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertItem\n\t */ _convertItem(viewItem, modelCursor) {\n        const data = {\n            viewItem,\n            modelCursor,\n            modelRange: null\n        };\n        if (viewItem.is('element')) {\n            this.fire(`element:${viewItem.name}`, data, this.conversionApi);\n        } else if (viewItem.is('$text')) {\n            this.fire('text', data, this.conversionApi);\n        } else {\n            this.fire('documentFragment', data, this.conversionApi);\n        }\n        // Handle incorrect conversion result.\n        if (data.modelRange && !(data.modelRange instanceof Range)) {\n            /**\n\t\t\t * Incorrect conversion result was dropped.\n\t\t\t *\n\t\t\t * {@link module:engine/model/range~Range Model range} should be a conversion result.\n\t\t\t *\n\t\t\t * @error view-conversion-dispatcher-incorrect-result\n\t\t\t */ throw new CKEditorError('view-conversion-dispatcher-incorrect-result', this);\n        }\n        return {\n            modelRange: data.modelRange,\n            modelCursor: data.modelCursor\n        };\n    }\n    /**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#convertChildren\n\t */ _convertChildren(viewItem, elementOrModelCursor) {\n        let nextModelCursor = elementOrModelCursor.is('position') ? elementOrModelCursor : Position._createAt(elementOrModelCursor, 0);\n        const modelRange = new Range(nextModelCursor);\n        for (const viewChild of Array.from(viewItem.getChildren())){\n            const result = this._convertItem(viewChild, nextModelCursor);\n            if (result.modelRange instanceof Range) {\n                modelRange.end = result.modelRange.end;\n                nextModelCursor = result.modelCursor;\n            }\n        }\n        return {\n            modelRange,\n            modelCursor: nextModelCursor\n        };\n    }\n    /**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#safeInsert\n\t */ _safeInsert(modelNode, position) {\n        // Find allowed parent for element that we are going to insert.\n        // If current parent does not allow to insert element but one of the ancestors does\n        // then split nodes to allowed parent.\n        const splitResult = this._splitToAllowedParent(modelNode, position);\n        // When there is no split result it means that we can't insert element to model tree, so let's skip it.\n        if (!splitResult) {\n            return false;\n        }\n        // Insert element on allowed position.\n        this.conversionApi.writer.insert(modelNode, splitResult.position);\n        return true;\n    }\n    /**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#updateConversionResult\n\t */ _updateConversionResult(modelElement, data) {\n        const parts = this._getSplitParts(modelElement);\n        const writer = this.conversionApi.writer;\n        // Set conversion result range - only if not set already.\n        if (!data.modelRange) {\n            data.modelRange = writer.createRange(writer.createPositionBefore(modelElement), writer.createPositionAfter(parts[parts.length - 1]));\n        }\n        const savedCursorParent = this._cursorParents.get(modelElement);\n        // Now we need to check where the `modelCursor` should be.\n        if (savedCursorParent) {\n            // If we split parent to insert our element then we want to continue conversion in the new part of the split parent.\n            //\n            // before: <allowed><notAllowed>foo[]</notAllowed></allowed>\n            // after:  <allowed><notAllowed>foo</notAllowed> <converted></converted> <notAllowed>[]</notAllowed></allowed>\n            data.modelCursor = writer.createPositionAt(savedCursorParent, 0);\n        } else {\n            // Otherwise just continue after inserted element.\n            data.modelCursor = data.modelRange.end;\n        }\n    }\n    /**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#splitToAllowedParent\n\t */ _splitToAllowedParent(node, modelCursor) {\n        const { schema, writer } = this.conversionApi;\n        // Try to find allowed parent.\n        let allowedParent = schema.findAllowedParent(modelCursor, node);\n        if (allowedParent) {\n            // When current position parent allows to insert node then return this position.\n            if (allowedParent === modelCursor.parent) {\n                return {\n                    position: modelCursor\n                };\n            }\n            // When allowed parent is in context tree (it's outside the converted tree).\n            if (this._modelCursor.parent.getAncestors().includes(allowedParent)) {\n                allowedParent = null;\n            }\n        }\n        if (!allowedParent) {\n            // Check if the node wrapped with a paragraph would be accepted by the schema.\n            if (!isParagraphable(modelCursor, node, schema)) {\n                return null;\n            }\n            return {\n                position: wrapInParagraph(modelCursor, writer)\n            };\n        }\n        // Split element to allowed parent.\n        const splitResult = this.conversionApi.writer.split(modelCursor, allowedParent);\n        // Using the range returned by `model.Writer#split`, we will pair original elements with their split parts.\n        //\n        // The range returned from the writer spans \"over the split\" or, precisely saying, from the end of the original element (the one\n        // that got split) to the beginning of the other part of that element:\n        //\n        // <limit><a><b><c>X[]Y</c></b><a></limit> ->\n        // <limit><a><b><c>X[</c></b></a><a><b><c>]Y</c></b></a>\n        //\n        // After the split there cannot be any full node between the positions in `splitRange`. The positions are touching.\n        // Also, because of how splitting works, it is easy to notice, that \"closing tags\" are in the reverse order than \"opening tags\".\n        // Also, since we split all those elements, each of them has to have the other part.\n        //\n        // With those observations in mind, we will pair the original elements with their split parts by saving \"closing tags\" and matching\n        // them with \"opening tags\" in the reverse order. For that we can use a stack.\n        const stack = [];\n        for (const treeWalkerValue of splitResult.range.getWalker()){\n            if (treeWalkerValue.type == 'elementEnd') {\n                stack.push(treeWalkerValue.item);\n            } else {\n                // There should not be any text nodes after the element is split, so the only other value is `elementStart`.\n                const originalPart = stack.pop();\n                const splitPart = treeWalkerValue.item;\n                this._registerSplitPair(originalPart, splitPart);\n            }\n        }\n        const cursorParent = splitResult.range.end.parent;\n        this._cursorParents.set(node, cursorParent);\n        return {\n            position: splitResult.position,\n            cursorParent\n        };\n    }\n    /**\n\t * Registers that a `splitPart` element is a split part of the `originalPart` element.\n\t *\n\t * The data set by this method is used by {@link #_getSplitParts} and {@link #_removeEmptyElements}.\n\t */ _registerSplitPair(originalPart, splitPart) {\n        if (!this._splitParts.has(originalPart)) {\n            this._splitParts.set(originalPart, [\n                originalPart\n            ]);\n        }\n        const list = this._splitParts.get(originalPart);\n        this._splitParts.set(splitPart, list);\n        list.push(splitPart);\n    }\n    /**\n\t * @see module:engine/conversion/upcastdispatcher~UpcastConversionApi#getSplitParts\n\t */ _getSplitParts(element) {\n        let parts;\n        if (!this._splitParts.has(element)) {\n            parts = [\n                element\n            ];\n        } else {\n            parts = this._splitParts.get(element);\n        }\n        return parts;\n    }\n    /**\n\t * Mark an element that were created during the splitting to not get removed on conversion end even if it is empty.\n\t */ _keepEmptyElement(element) {\n        this._emptyElementsToKeep.add(element);\n    }\n    /**\n\t * Checks if there are any empty elements created while splitting and removes them.\n\t *\n\t * This method works recursively to re-check empty elements again after at least one element was removed in the initial call,\n\t * as some elements might have become empty after other empty elements were removed from them.\n\t */ _removeEmptyElements() {\n        let anyRemoved = false;\n        for (const element of this._splitParts.keys()){\n            if (element.isEmpty && !this._emptyElementsToKeep.has(element)) {\n                this.conversionApi.writer.remove(element);\n                this._splitParts.delete(element);\n                anyRemoved = true;\n            }\n        }\n        if (anyRemoved) {\n            this._removeEmptyElements();\n        }\n    }\n}\n/**\n * Traverses given model item and searches elements which marks marker range. Found element is removed from\n * DocumentFragment but path of this element is stored in a Map which is then returned.\n *\n * @param modelItem Fragment of model.\n * @returns List of static markers.\n */ function extractMarkersFromModelFragment(modelItem, writer) {\n    const markerElements = new Set();\n    const markers = new Map();\n    // Create ModelTreeWalker.\n    const range = Range._createIn(modelItem).getItems();\n    // Walk through DocumentFragment and collect marker elements.\n    for (const item of range){\n        // Check if current element is a marker.\n        if (item.is('element', '$marker')) {\n            markerElements.add(item);\n        }\n    }\n    // Walk through collected marker elements store its path and remove its from the DocumentFragment.\n    for (const markerElement of markerElements){\n        const markerName = markerElement.getAttribute('data-name');\n        const currentPosition = writer.createPositionBefore(markerElement);\n        // When marker of given name is not stored it means that we have found the beginning of the range.\n        if (!markers.has(markerName)) {\n            markers.set(markerName, new Range(currentPosition.clone()));\n        // Otherwise is means that we have found end of the marker range.\n        } else {\n            markers.get(markerName).end = currentPosition.clone();\n        }\n        // Remove marker element from DocumentFragment.\n        writer.remove(markerElement);\n    }\n    return markers;\n}\n/**\n * Creates model fragment according to given context and returns position in the bottom (the deepest) element.\n */ function createContextTree(contextDefinition, writer) {\n    let position;\n    for (const item of new SchemaContext(contextDefinition)){\n        const attributes = {};\n        for (const key of item.getAttributeKeys()){\n            attributes[key] = item.getAttribute(key);\n        }\n        const current = writer.createElement(item.name, attributes);\n        if (position) {\n            writer.insert(current, position);\n        }\n        position = Position._createAt(current, 0);\n    }\n    return position;\n}\n\n/**\n * Basic HTML writer. It uses the native `innerHTML` property for basic conversion\n * from a document fragment to an HTML string.\n */ class BasicHtmlWriter {\n    /**\n\t * Returns an HTML string created from the document fragment.\n\t */ getHtml(fragment) {\n        const doc = global.document.implementation.createHTMLDocument('');\n        const container = doc.createElement('div');\n        container.appendChild(fragment);\n        return container.innerHTML;\n    }\n}\n\n/**\n * The HTML data processor class.\n * This data processor implementation uses HTML as input and output data.\n */ class HtmlDataProcessor {\n    /**\n\t * A DOM parser instance used to parse an HTML string to an HTML document.\n\t */ domParser;\n    /**\n\t * A DOM converter used to convert DOM elements to view elements.\n\t */ domConverter;\n    /**\n\t * A basic HTML writer instance used to convert DOM elements to an HTML string.\n\t */ htmlWriter;\n    skipComments = true;\n    /**\n\t * Creates a new instance of the HTML data processor class.\n\t *\n\t * @param document The view document instance.\n\t */ constructor(document){\n        this.domParser = new DOMParser();\n        this.domConverter = new DomConverter(document, {\n            renderingMode: 'data'\n        });\n        this.htmlWriter = new BasicHtmlWriter();\n    }\n    /**\n\t * Converts a provided {@link module:engine/view/documentfragment~DocumentFragment document fragment}\n\t * to data format &ndash; in this case to an HTML string.\n\t *\n\t * @returns HTML string.\n\t */ toData(viewFragment) {\n        // Convert view DocumentFragment to DOM DocumentFragment.\n        const domFragment = this.domConverter.viewToDom(viewFragment);\n        // Convert DOM DocumentFragment to HTML output.\n        return this.htmlWriter.getHtml(domFragment);\n    }\n    /**\n\t * Converts the provided HTML string to a view tree.\n\t *\n\t * @param data An HTML string.\n\t * @returns A converted view element.\n\t */ toView(data) {\n        // Convert input HTML data to DOM DocumentFragment.\n        const domFragment = this._toDom(data);\n        // Convert DOM DocumentFragment to view DocumentFragment.\n        return this.domConverter.domToView(domFragment, {\n            skipComments: this.skipComments\n        });\n    }\n    /**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from the DOM to the view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching all view elements whose content should be treated as raw data.\n\t */ registerRawContentMatcher(pattern) {\n        this.domConverter.registerRawContentMatcher(pattern);\n    }\n    /**\n\t * If the processor is set to use marked fillers, it will insert `&nbsp;` fillers wrapped in `<span>` elements\n\t * (`<span data-cke-filler=\"true\">&nbsp;</span>`) instead of regular `&nbsp;` characters.\n\t *\n\t * This mode allows for a more precise handling of the block fillers (so they do not leak into the editor content) but\n\t * bloats the editor data with additional markup.\n\t *\n\t * This mode may be required by some features and will be turned on by them automatically.\n\t *\n\t * @param type Whether to use the default or the marked `&nbsp;` block fillers.\n\t */ useFillerType(type) {\n        this.domConverter.blockFillerMode = type == 'marked' ? 'markedNbsp' : 'nbsp';\n    }\n    /**\n\t * Converts an HTML string to its DOM representation. Returns a document fragment containing nodes parsed from\n\t * the provided data.\n\t */ _toDom(data) {\n        // Wrap data with a <body> tag so leading non-layout nodes (like <script>, <style>, HTML comment)\n        // will be preserved in the body collection.\n        // Do it only for data that is not a full HTML document.\n        if (!data.match(/<(?:html|body|head|meta)(?:\\s[^>]*)?>/i)) {\n            data = `<body>${data}</body>`;\n        }\n        const document = this.domParser.parseFromString(data, 'text/html');\n        const fragment = document.createDocumentFragment();\n        const bodyChildNodes = document.body.childNodes;\n        while(bodyChildNodes.length > 0){\n            fragment.appendChild(bodyChildNodes[0]);\n        }\n        return fragment;\n    }\n}\n\n/**\n * Controller for the data pipeline. The data pipeline controls how data is retrieved from the document\n * and set inside it. Hence, the controller features two methods which allow to {@link ~DataController#get get}\n * and {@link ~DataController#set set} data of the {@link ~DataController#model model}\n * using the given:\n *\n * * {@link module:engine/dataprocessor/dataprocessor~DataProcessor data processor},\n * * downcast converters,\n * * upcast converters.\n *\n * An instance of the data controller is always available in the {@link module:core/editor/editor~Editor#data `editor.data`}\n * property:\n *\n * ```ts\n * editor.data.get( { rootName: 'customRoot' } ); // -> '<p>Hello!</p>'\n * ```\n */ class DataController extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * Data model.\n\t */ model;\n    /**\n\t * Mapper used for the conversion. It has no permanent bindings, because these are created while getting data and\n\t * are cleared directly after the data are converted. However, the mapper is defined as a class property, because\n\t * it needs to be passed to the `DowncastDispatcher` as a conversion API.\n\t */ mapper;\n    /**\n\t * Downcast dispatcher used by the {@link #get get method}. Downcast converters should be attached to it.\n\t */ downcastDispatcher;\n    /**\n\t * Upcast dispatcher used by the {@link #set set method}. Upcast converters should be attached to it.\n\t */ upcastDispatcher;\n    /**\n\t * The view document used by the data controller.\n\t */ viewDocument;\n    /**\n\t * Styles processor used during the conversion.\n\t */ stylesProcessor;\n    /**\n\t * Data processor used specifically for HTML conversion.\n\t */ htmlProcessor;\n    /**\n\t * Data processor used during the conversion.\n\t * Same instance as {@link #htmlProcessor} by default. Can be replaced at run time to handle different format, e.g. XML or Markdown.\n\t */ processor;\n    /**\n\t * The view downcast writer just for data conversion purposes, i.e. to modify\n\t * the {@link #viewDocument}.\n\t */ _viewWriter;\n    /**\n\t * Creates a data controller instance.\n\t *\n\t * @param model Data model.\n\t * @param stylesProcessor The styles processor instance.\n\t */ constructor(model, stylesProcessor){\n        super();\n        this.model = model;\n        this.mapper = new Mapper();\n        this.downcastDispatcher = new DowncastDispatcher({\n            mapper: this.mapper,\n            schema: model.schema\n        });\n        this.downcastDispatcher.on('insert:$text', insertText(), {\n            priority: 'lowest'\n        });\n        this.downcastDispatcher.on('insert', insertAttributesAndChildren(), {\n            priority: 'lowest'\n        });\n        this.upcastDispatcher = new UpcastDispatcher({\n            schema: model.schema\n        });\n        this.viewDocument = new Document$1(stylesProcessor);\n        this.stylesProcessor = stylesProcessor;\n        this.htmlProcessor = new HtmlDataProcessor(this.viewDocument);\n        this.processor = this.htmlProcessor;\n        this._viewWriter = new DowncastWriter(this.viewDocument);\n        // Define default converters for text and elements.\n        //\n        // Note that if there is no default converter for the element it will be skipped, for instance `<b>foo</b>` will be\n        // converted to nothing. We therefore add `convertToModelFragment` as a last converter so it converts children of that\n        // element to the document fragment so `<b>foo</b>` will still be converted to `foo` even if there is no converter for `<b>`.\n        this.upcastDispatcher.on('text', convertText(), {\n            priority: 'lowest'\n        });\n        this.upcastDispatcher.on('element', convertToModelFragment$1(), {\n            priority: 'lowest'\n        });\n        this.upcastDispatcher.on('documentFragment', convertToModelFragment$1(), {\n            priority: 'lowest'\n        });\n        ObservableMixin().prototype.decorate.call(this, 'init');\n        ObservableMixin().prototype.decorate.call(this, 'set');\n        ObservableMixin().prototype.decorate.call(this, 'get');\n        ObservableMixin().prototype.decorate.call(this, 'toView');\n        ObservableMixin().prototype.decorate.call(this, 'toModel');\n        // Fire the `ready` event when the initialization has completed. Such low-level listener offers the possibility\n        // to plug into the initialization pipeline without interrupting the initialization flow.\n        this.on('init', ()=>{\n            this.fire('ready');\n        }, {\n            priority: 'lowest'\n        });\n        // Fix empty roots after DataController is 'ready' (note that the init method could be decorated and stopped).\n        // We need to handle this event because initial data could be empty and the post-fixer would not get triggered.\n        this.on('ready', ()=>{\n            this.model.enqueueChange({\n                isUndoable: false\n            }, autoParagraphEmptyRoots);\n        }, {\n            priority: 'lowest'\n        });\n    }\n    /**\n\t * Returns the model's data converted by downcast dispatchers attached to {@link #downcastDispatcher} and\n\t * formatted by the {@link #processor data processor}.\n\t *\n\t * A warning is logged when you try to retrieve data for a detached root, as most probably this is a mistake. A detached root should\n\t * be treated like it is removed, and you should not save its data. Note, that the detached root data is always an empty string.\n\t *\n\t * @fires get\n\t * @param options Additional configuration for the retrieved data. `DataController` provides two optional\n\t * properties: `rootName` and `trim`. Other properties of this object are specified by various editor features.\n\t * @param options.rootName Root name. Default 'main'.\n\t * @param options.trim Whether returned data should be trimmed. This option is set to `empty` by default,\n\t * which means whenever editor content is considered empty, an empty string will be returned. To turn off trimming completely\n\t * use `'none'`. In such cases the exact content will be returned (for example a `<p>&nbsp;</p>` for an empty editor).\n\t * @returns Output data.\n\t */ get(options = {}) {\n        const { rootName = 'main', trim = 'empty' } = options;\n        if (!this._checkIfRootsExists([\n            rootName\n        ])) {\n            /**\n\t\t\t * Cannot get data from a non-existing root. This error is thrown when\n\t\t\t * {@link module:engine/controller/datacontroller~DataController#get `DataController#get()` method}\n\t\t\t * is called with a non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t\t * calling {@link module:engine/controller/datacontroller~DataController#get} like:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * data.get( { rootName: 'root2' } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-get-non-existent-root\n\t\t\t */ throw new CKEditorError('datacontroller-get-non-existent-root', this);\n        }\n        const root = this.model.document.getRoot(rootName);\n        if (!root.isAttached()) {\n            /**\n\t\t\t * Retrieving document data for a detached root.\n\t\t\t *\n\t\t\t * This usually indicates an error as a detached root should be considered \"removed\" and should not be included in the\n\t\t\t * document data.\n\t\t\t *\n\t\t\t * @error datacontroller-get-detached-root\n\t\t\t */ logWarning('datacontroller-get-detached-root', this);\n        }\n        if (trim === 'empty' && !this.model.hasContent(root, {\n            ignoreWhitespaces: true\n        })) {\n            return '';\n        }\n        return this.stringify(root, options);\n    }\n    /**\n\t * Returns the content of the given {@link module:engine/model/element~Element model's element} or\n\t * {@link module:engine/model/documentfragment~DocumentFragment model document fragment} converted by the downcast converters\n\t * attached to the {@link #downcastDispatcher} and formatted by the {@link #processor data processor}.\n\t *\n\t * @param modelElementOrFragment The element whose content will be stringified.\n\t * @param options Additional configuration passed to the conversion process.\n\t * @returns Output data.\n\t */ stringify(modelElementOrFragment, options = {}) {\n        // Model -> view.\n        const viewDocumentFragment = this.toView(modelElementOrFragment, options);\n        // View -> data.\n        return this.processor.toData(viewDocumentFragment);\n    }\n    /**\n\t * Returns the content of the given {@link module:engine/model/element~Element model element} or\n\t * {@link module:engine/model/documentfragment~DocumentFragment model document fragment} converted by the downcast\n\t * converters attached to {@link #downcastDispatcher} into a\n\t * {@link module:engine/view/documentfragment~DocumentFragment view document fragment}.\n\t *\n\t * @fires toView\n\t * @param modelElementOrFragment Element or document fragment whose content will be converted.\n\t * @param options Additional configuration that will be available through the\n\t * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#options} during the conversion process.\n\t * @returns Output view DocumentFragment.\n\t */ toView(modelElementOrFragment, options = {}) {\n        const viewDocument = this.viewDocument;\n        const viewWriter = this._viewWriter;\n        // Clear bindings so the call to this method returns correct results.\n        this.mapper.clearBindings();\n        // First, convert elements.\n        const modelRange = Range._createIn(modelElementOrFragment);\n        const viewDocumentFragment = new DocumentFragment$1(viewDocument);\n        this.mapper.bindElements(modelElementOrFragment, viewDocumentFragment);\n        // Prepare list of markers.\n        // For document fragment, simply take the markers assigned to this document fragment.\n        // For model root, all markers in that root will be taken.\n        // For model element, we need to check which markers are intersecting with this element and relatively modify the markers' ranges.\n        // Collapsed markers at element boundary, although considered as not intersecting with the element, will also be returned.\n        const markers = modelElementOrFragment.is('documentFragment') ? modelElementOrFragment.markers : _getMarkersRelativeToElement(modelElementOrFragment);\n        this.downcastDispatcher.convert(modelRange, markers, viewWriter, options);\n        return viewDocumentFragment;\n    }\n    /**\n\t * Sets the initial input data parsed by the {@link #processor data processor} and\n\t * converted by the {@link #upcastDispatcher view-to-model converters}.\n\t * Initial data can be only set to a document whose {@link module:engine/model/document~Document#version} is equal 0.\n\t *\n\t * **Note** This method is {@link module:utils/observablemixin~Observable#decorate decorated} which is\n\t * used by e.g. collaborative editing plugin that syncs remote data on init.\n\t *\n\t * When data is passed as a string, it is initialized on the default `main` root:\n\t *\n\t * ```ts\n\t * dataController.init( '<p>Foo</p>' ); // Initializes data on the `main` root only, as no other is specified.\n\t * ```\n\t *\n\t * To initialize data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t *\n\t * ```ts\n\t * dataController.init( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Initializes data on both the `main` and `title` roots.\n\t * ```\n\t *\n\t * @fires init\n\t * @param data Input data as a string or an object containing the `rootName` - `data`\n\t * pairs to initialize data on multiple roots at once.\n\t * @returns Promise that is resolved after the data is set on the editor.\n\t */ init(data) {\n        if (this.model.document.version) {\n            /**\n\t\t\t * Cannot set initial data to a non-empty {@link module:engine/model/document~Document}.\n\t\t\t * Initial data should be set once, during the {@link module:core/editor/editor~Editor} initialization,\n\t\t\t * when the {@link module:engine/model/document~Document#version} is equal 0.\n\t\t\t *\n\t\t\t * @error datacontroller-init-document-not-empty\n\t\t\t */ throw new CKEditorError('datacontroller-init-document-not-empty', this);\n        }\n        let initialData = {};\n        if (typeof data === 'string') {\n            initialData.main = data; // Default root is 'main'. To initiate data on a different root, object should be passed.\n        } else {\n            initialData = data;\n        }\n        if (!this._checkIfRootsExists(Object.keys(initialData))) {\n            /**\n\t\t\t * Cannot init data on a non-existent root. This error is thrown when\n\t\t\t * {@link module:engine/controller/datacontroller~DataController#init DataController#init() method}\n\t\t\t * is called with non-existent root name. For example, if there is an editor instance with only `main` root,\n\t\t\t * calling {@link module:engine/controller/datacontroller~DataController#init} like:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * data.init( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-init-non-existent-root\n\t\t\t */ throw new CKEditorError('datacontroller-init-non-existent-root', this);\n        }\n        this.model.enqueueChange({\n            isUndoable: false\n        }, (writer)=>{\n            for (const rootName of Object.keys(initialData)){\n                const modelRoot = this.model.document.getRoot(rootName);\n                writer.insert(this.parse(initialData[rootName], modelRoot), modelRoot, 0);\n            }\n        });\n        return Promise.resolve();\n    }\n    /**\n\t * Sets the input data parsed by the {@link #processor data processor} and\n\t * converted by the {@link #upcastDispatcher view-to-model converters}.\n\t * This method can be used any time to replace existing editor data with the new one without clearing the\n\t * {@link module:engine/model/document~Document#history document history}.\n\t *\n\t * This method also creates a batch with all the changes applied. If all you need is to parse data, use\n\t * the {@link #parse} method.\n\t *\n\t * When data is passed as a string it is set on the default `main` root:\n\t *\n\t * ```ts\n\t * dataController.set( '<p>Foo</p>' ); // Sets data on the `main` root, as no other is specified.\n\t * ```\n\t *\n\t * To set data on a different root or multiple roots at once, an object containing `rootName` - `data` pairs should be passed:\n\t *\n\t * ```ts\n\t * dataController.set( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Sets data on the `main` and `title` roots as specified.\n\t * ```\n\t *\n\t * To set the data with a preserved undo stack and add the change to the undo stack, set `{ isUndoable: true }` as a `batchType` option.\n\t *\n\t * ```ts\n\t * dataController.set( '<p>Foo</p>', { batchType: { isUndoable: true } } );\n\t * ```\n\t *\n\t * @fires set\n\t * @param data Input data as a string or an object containing the `rootName` - `data`\n\t * pairs to set data on multiple roots at once.\n\t * @param options Options for setting data.\n\t * @param options.batchType The batch type that will be used to create a batch for the changes applied by this method.\n\t * By default, the batch will be set as {@link module:engine/model/batch~Batch#isUndoable not undoable} and the undo stack will be\n\t * cleared after the new data is applied (all undo steps will be removed). If the batch type `isUndoable` flag is be set to `true`,\n\t * the undo stack will be preserved instead and not cleared when new data is applied.\n\t */ set(data, options = {}) {\n        let newData = {};\n        if (typeof data === 'string') {\n            newData.main = data; // The default root is 'main'. To set data on a different root, an object should be passed.\n        } else {\n            newData = data;\n        }\n        if (!this._checkIfRootsExists(Object.keys(newData))) {\n            /**\n\t\t\t * Cannot set data on a non-existent root. This error is thrown when the\n\t\t\t * {@link module:engine/controller/datacontroller~DataController#set DataController#set() method}\n\t\t\t * is called with non-existent root name. For example, if there is an editor instance with only the default `main` root,\n\t\t\t * calling {@link module:engine/controller/datacontroller~DataController#set} like:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * data.set( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * will throw this error.\n\t\t\t *\n\t\t\t * @error datacontroller-set-non-existent-root\n\t\t\t */ throw new CKEditorError('datacontroller-set-non-existent-root', this);\n        }\n        this.model.enqueueChange(options.batchType || {}, (writer)=>{\n            writer.setSelection(null);\n            writer.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());\n            for (const rootName of Object.keys(newData)){\n                // Save to model.\n                const modelRoot = this.model.document.getRoot(rootName);\n                writer.remove(writer.createRangeIn(modelRoot));\n                writer.insert(this.parse(newData[rootName], modelRoot), modelRoot, 0);\n            }\n        });\n    }\n    /**\n\t * Returns the data parsed by the {@link #processor data processor} and then converted by upcast converters\n\t * attached to the {@link #upcastDispatcher}.\n\t *\n\t * @see #set\n\t * @param data Data to parse.\n\t * @param context Base context in which the view will be converted to the model.\n\t * See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t * @returns Parsed data.\n\t */ parse(data, context = '$root') {\n        // data -> view\n        const viewDocumentFragment = this.processor.toView(data);\n        // view -> model\n        return this.toModel(viewDocumentFragment, context);\n    }\n    /**\n\t * Returns the result of the given {@link module:engine/view/element~Element view element} or\n\t * {@link module:engine/view/documentfragment~DocumentFragment view document fragment} converted by the\n\t * {@link #upcastDispatcher view-to-model converters}, wrapped by {@link module:engine/model/documentfragment~DocumentFragment}.\n\t *\n\t * When marker elements were converted during the conversion process, it will be set as a document fragment's\n\t * {@link module:engine/model/documentfragment~DocumentFragment#markers static markers map}.\n\t *\n\t * @fires toModel\n\t * @param viewElementOrFragment The element or document fragment whose content will be converted.\n\t * @param context Base context in which the view will be converted to the model.\n\t * See: {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#convert}.\n\t * @returns Output document fragment.\n\t */ toModel(viewElementOrFragment, context = '$root') {\n        return this.model.change((writer)=>{\n            return this.upcastDispatcher.convert(viewElementOrFragment, writer, context);\n        });\n    }\n    /**\n\t * Adds the style processor normalization rules.\n\t *\n\t * You can implement your own rules as well as use one of the available processor rules:\n\t *\n\t * * background: {@link module:engine/view/styles/background~addBackgroundRules}\n\t * * border: {@link module:engine/view/styles/border~addBorderRules}\n\t * * margin: {@link module:engine/view/styles/margin~addMarginRules}\n\t * * padding: {@link module:engine/view/styles/padding~addPaddingRules}\n\t */ addStyleProcessorRules(callback) {\n        callback(this.stylesProcessor);\n    }\n    /**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} on an {@link #htmlProcessor htmlProcessor}\n\t * and a {@link #processor processor} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from DOM to view elements.\n\t *\n\t * The raw data can be later accessed by the {@link module:engine/view/element~Element#getCustomProperty view element custom property}\n\t * `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching all view elements whose content should be treated as a raw data.\n\t */ registerRawContentMatcher(pattern) {\n        // No need to register the pattern if both the `htmlProcessor` and `processor` are the same instances.\n        if (this.processor && this.processor !== this.htmlProcessor) {\n            this.processor.registerRawContentMatcher(pattern);\n        }\n        this.htmlProcessor.registerRawContentMatcher(pattern);\n    }\n    /**\n\t * Removes all event listeners set by the DataController.\n\t */ destroy() {\n        this.stopListening();\n    }\n    /**\n\t * Checks whether all provided root names are actually existing editor roots.\n\t *\n\t * @param rootNames Root names to check.\n\t * @returns Whether all provided root names are existing editor roots.\n\t */ _checkIfRootsExists(rootNames) {\n        for (const rootName of rootNames){\n            if (!this.model.document.getRoot(rootName)) {\n                return false;\n            }\n        }\n        return true;\n    }\n}\n/**\n * Helper function for downcast conversion.\n *\n * Takes a document element (element that is added to a model document) and checks which markers are inside it. If the marker is collapsed\n * at element boundary, it is considered as contained inside the element and marker range is returned. Otherwise, if the marker is\n * intersecting with the element, the intersection is returned.\n */ function _getMarkersRelativeToElement(element) {\n    const result = [];\n    const doc = element.root.document;\n    if (!doc) {\n        return new Map();\n    }\n    const elementRange = Range._createIn(element);\n    for (const marker of doc.model.markers){\n        const markerRange = marker.getRange();\n        const isMarkerCollapsed = markerRange.isCollapsed;\n        const isMarkerAtElementBoundary = markerRange.start.isEqual(elementRange.start) || markerRange.end.isEqual(elementRange.end);\n        if (isMarkerCollapsed && isMarkerAtElementBoundary) {\n            result.push([\n                marker.name,\n                markerRange\n            ]);\n        } else {\n            const updatedMarkerRange = elementRange.getIntersection(markerRange);\n            if (updatedMarkerRange) {\n                result.push([\n                    marker.name,\n                    updatedMarkerRange\n                ]);\n            }\n        }\n    }\n    // Sort the markers in a stable fashion to ensure that the order in which they are\n    // added to the model's marker collection does not affect how they are\n    // downcast. One particular use case that we are targeting here, is one where\n    // two markers are adjacent but not overlapping, such as an insertion/deletion\n    // suggestion pair representing the replacement of a range of text. In this\n    // case, putting the markers in DOM order causes the first marker's end to be\n    // serialized right after the second marker's start, while putting the markers\n    // in reverse DOM order causes it to be right before the second marker's\n    // start. So, we sort these in a way that ensures non-intersecting ranges are in\n    // reverse DOM order, and intersecting ranges are in something approximating\n    // reverse DOM order (since reverse DOM order doesn't have a precise meaning\n    // when working with intersecting ranges).\n    result.sort(([n1, r1], [n2, r2])=>{\n        if (r1.end.compareWith(r2.start) !== 'after') {\n            // m1.end <= m2.start -- m1 is entirely <= m2\n            return 1;\n        } else if (r1.start.compareWith(r2.end) !== 'before') {\n            // m1.start >= m2.end -- m1 is entirely >= m2\n            return -1;\n        } else {\n            // they overlap, so use their start positions as the primary sort key and\n            // end positions as the secondary sort key\n            switch(r1.start.compareWith(r2.start)){\n                case 'before':\n                    return 1;\n                case 'after':\n                    return -1;\n                default:\n                    switch(r1.end.compareWith(r2.end)){\n                        case 'before':\n                            return 1;\n                        case 'after':\n                            return -1;\n                        default:\n                            return n2.localeCompare(n1);\n                    }\n            }\n        }\n    });\n    return new Map(result);\n}\n\n/**\n * A utility class that helps add converters to upcast and downcast dispatchers.\n *\n * We recommend reading the {@glink framework/deep-dive/conversion/intro editor conversion} guide first to\n * understand the core concepts of the conversion mechanisms.\n *\n * An instance of the conversion manager is available in the\n * {@link module:core/editor/editor~Editor#conversion `editor.conversion`} property\n * and by default has the following groups of dispatchers (i.e. directions of conversion):\n *\n * * `downcast` (editing and data downcasts)\n * * `editingDowncast`\n * * `dataDowncast`\n * * `upcast`\n *\n * # One-way converters\n *\n * To add a converter to a specific group, use the {@link module:engine/conversion/conversion~Conversion#for `for()`}\n * method:\n *\n * ```ts\n * // Add a converter to editing downcast and data downcast.\n * editor.conversion.for( 'downcast' ).elementToElement( config ) );\n *\n * // Add a converter to the data pipepline only:\n * editor.conversion.for( 'dataDowncast' ).elementToElement( dataConversionConfig ) );\n *\n * // And a slightly different one for the editing pipeline:\n * editor.conversion.for( 'editingDowncast' ).elementToElement( editingConversionConfig ) );\n * ```\n *\n * See {@link module:engine/conversion/conversion~Conversion#for `for()`} method documentation to learn more about\n * available conversion helpers and how to use your custom ones.\n *\n * # Two-way converters\n *\n * Besides using one-way converters via the `for()` method, you can also use other methods available in this\n * class to add two-way converters (upcast and downcast):\n *\n * * {@link module:engine/conversion/conversion~Conversion#elementToElement `elementToElement()`} &ndash;\n * Model element to view element and vice versa.\n * * {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement()`} &ndash;\n * Model attribute to view element and vice versa.\n * * {@link module:engine/conversion/conversion~Conversion#attributeToAttribute `attributeToAttribute()`} &ndash;\n * Model attribute to view attribute and vice versa.\n */ class Conversion {\n    /**\n\t * Maps dispatchers group name to ConversionHelpers instances.\n\t */ _helpers = new Map();\n    _downcast;\n    _upcast;\n    /**\n\t * Creates a new conversion instance.\n\t */ constructor(downcastDispatchers, upcastDispatchers){\n        // Define default 'downcast' & 'upcast' dispatchers groups. Those groups are always available as two-way converters needs them.\n        this._downcast = toArray(downcastDispatchers);\n        this._createConversionHelpers({\n            name: 'downcast',\n            dispatchers: this._downcast,\n            isDowncast: true\n        });\n        this._upcast = toArray(upcastDispatchers);\n        this._createConversionHelpers({\n            name: 'upcast',\n            dispatchers: this._upcast,\n            isDowncast: false\n        });\n    }\n    /**\n\t * Define an alias for registered dispatcher.\n\t *\n\t * ```ts\n\t * const conversion = new Conversion(\n\t * \t[ dataDowncastDispatcher, editingDowncastDispatcher ],\n\t * \tupcastDispatcher\n\t * );\n\t *\n\t * conversion.addAlias( 'dataDowncast', dataDowncastDispatcher );\n\t * ```\n\t *\n\t * @param alias An alias of a dispatcher.\n\t * @param dispatcher Dispatcher which should have an alias.\n\t */ addAlias(alias, dispatcher) {\n        const isDowncast = this._downcast.includes(dispatcher);\n        const isUpcast = this._upcast.includes(dispatcher);\n        if (!isUpcast && !isDowncast) {\n            /**\n\t\t\t * Trying to register an alias for a dispatcher that nas not been registered.\n\t\t\t *\n\t\t\t * @error conversion-add-alias-dispatcher-not-registered\n\t\t\t */ throw new CKEditorError('conversion-add-alias-dispatcher-not-registered', this);\n        }\n        this._createConversionHelpers({\n            name: alias,\n            dispatchers: [\n                dispatcher\n            ],\n            isDowncast\n        });\n    }\n    /**\n\t * Provides a chainable API to assign converters to a conversion dispatchers group.\n\t *\n\t * If the given group name has not been registered, the\n\t * {@link module:utils/ckeditorerror~CKEditorError `conversion-for-unknown-group` error} is thrown.\n\t *\n\t * You can use conversion helpers available directly in the `for()` chain or your custom ones via\n\t * the {@link module:engine/conversion/conversionhelpers~ConversionHelpers#add `add()`} method.\n\t *\n\t * # Using built-in conversion helpers\n\t *\n\t * The `for()` chain comes with a set of conversion helpers which you can use like this:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'downcast' )\n\t * \t.elementToElement( config1 )        // Adds an element-to-element downcast converter.\n\t * \t.attributeToElement( config2 );     // Adds an attribute-to-element downcast converter.\n\t *\n\t * editor.conversion.for( 'upcast' )\n\t * \t.elementToAttribute( config3 );     // Adds an element-to-attribute upcast converter.\n\t * ```\n\t *\n\t * Refer to the documentation of built-in conversion helpers to learn about their configuration options.\n\t *\n\t * * downcast (model-to-view) conversion helpers:\n\t *\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`},\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement `attributeToElement()`},\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToElement `markerToElement()`}.\n\t *\t* {@link module:engine/conversion/downcasthelpers~DowncastHelpers#markerToHighlight `markerToHighlight()`}.\n\t *\n\t * * upcast (view-to-model) conversion helpers:\n\t *\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToElement `elementToElement()`},\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToAttribute `elementToAttribute()`},\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#attributeToAttribute `attributeToAttribute()`}.\n\t *\t* {@link module:engine/conversion/upcasthelpers~UpcastHelpers#elementToMarker `elementToMarker()`}.\n\t *\n\t * # Using custom conversion helpers\n\t *\n\t * If you need to implement an atypical converter, you can do so by calling:\n\t *\n\t * ```ts\n\t * editor.conversion.for( direction ).add( customHelper );\n\t * ```\n\t *\n\t * The `.add()` method takes exactly one parameter, which is a function. This function should accept one parameter that\n\t * is a dispatcher instance. The function should add an actual converter to the passed dispatcher instance.\n\t *\n\t * Example:\n\t *\n\t * ```ts\n\t * editor.conversion.for( 'upcast' ).add( dispatcher => {\n\t * \tdispatcher.on( 'element:a',  ( evt, data, conversionApi ) => {\n\t * \t\t// Do something with a view <a> element.\n\t * \t} );\n\t * } );\n\t * ```\n\t *\n\t * Refer to the documentation of {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher}\n\t * and {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} to learn how to write\n\t * custom converters.\n\t *\n\t * @param groupName The name of dispatchers group to add the converters to.\n\t */ for(groupName) {\n        if (!this._helpers.has(groupName)) {\n            /**\n\t\t\t * Trying to add a converter to an unknown dispatchers group.\n\t\t\t *\n\t\t\t * @error conversion-for-unknown-group\n\t\t\t */ throw new CKEditorError('conversion-for-unknown-group', this);\n        }\n        return this._helpers.get(groupName);\n    }\n    /**\n\t * Sets up converters between the model and the view that convert a model element to a view element (and vice versa).\n\t * For example, the model `<paragraph>Foo</paragraph>` is turned into `<p>Foo</p>` in the view.\n\t *\n\t * ```ts\n\t * // A simple conversion from the `paragraph` model element to the `<p>` view element (and vice versa).\n\t * editor.conversion.elementToElement( { model: 'paragraph', view: 'p' } );\n\t *\n\t * // Override other converters by specifying a converter definition with a higher priority.\n\t * editor.conversion.elementToElement( { model: 'paragraph', view: 'div', converterPriority: 'high' } );\n\t *\n\t * // View specified as an object instead of a string.\n\t * editor.conversion.elementToElement( {\n\t * \tmodel: 'fancyParagraph',\n\t * \tview: {\n\t * \t\tname: 'p',\n\t * \t\tclasses: 'fancy'\n\t * \t}\n\t * } );\n\t *\n\t * // Use `upcastAlso` to define other view elements that should also be converted to a `paragraph` element.\n\t * editor.conversion.elementToElement( {\n\t * \tmodel: 'paragraph',\n\t * \tview: 'p',\n\t * \tupcastAlso: [\n\t * \t\t'div',\n\t * \t\t{\n\t * \t\t\t// Any element with the `display: block` style.\n\t * \t\t\tstyles: {\n\t * \t\t\t\tdisplay: 'block'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t]\n\t * } );\n\t *\n\t * // `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t * editor.conversion.elementToElement( {\n\t * \tmodel: 'heading',\n\t * \tview: 'h2',\n\t * \t// Convert \"heading-like\" paragraphs to headings.\n\t * \tupcastAlso: viewElement => {\n\t * \t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t * \t\tif ( !fontSize ) {\n\t * \t\t\treturn null;\n\t * \t\t}\n\t *\n\t * \t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t * \t\tif ( !match ) {\n\t * \t\t\treturn null;\n\t * \t\t}\n\t *\n\t * \t\tconst size = Number( match[ 1 ] );\n\t *\n\t * \t\tif ( size > 26 ) {\n\t * \t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t * \t\t}\n\t *\n\t * \t\treturn null;\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * `definition.model` is a `String` with a model element name to convert from or to.\n\t *\n\t * @param definition The converter definition.\n\t */ elementToElement(definition) {\n        // Set up downcast converter.\n        this.for('downcast').elementToElement(definition);\n        // Set up upcast converter.\n        for (const { model, view } of _getAllUpcastDefinitions(definition)){\n            this.for('upcast').elementToElement({\n                model,\n                view,\n                converterPriority: definition.converterPriority\n            });\n        }\n    }\n    /**\n\t * Sets up converters between the model and the view that convert a model attribute to a view element (and vice versa).\n\t * For example, a model text node with `\"Foo\"` as data and the `bold` attribute will be turned to `<strong>Foo</strong>` in the view.\n\t *\n\t * ```ts\n\t * // A simple conversion from the `bold=true` attribute to the `<strong>` view element (and vice versa).\n\t * editor.conversion.attributeToElement( { model: 'bold', view: 'strong' } );\n\t *\n\t * // Override other converters by specifying a converter definition with a higher priority.\n\t * editor.conversion.attributeToElement( { model: 'bold', view: 'b', converterPriority: 'high' } );\n\t *\n\t * // View specified as an object instead of a string.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: {\n\t * \t\tname: 'span',\n\t * \t\tclasses: 'bold'\n\t * \t}\n\t * } );\n\t *\n\t * // Use `config.model.name` to define the conversion only from a given node type, `$text` in this case.\n\t * // The same attribute on different elements may then be handled by a different converter.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'textDecoration',\n\t * \t\tvalues: [ 'underline', 'lineThrough' ],\n\t * \t\tname: '$text'\n\t * \t},\n\t * \tview: {\n\t * \t\tunderline: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-decoration': 'underline'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tlineThrough: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-decoration': 'line-through'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * // Use `upcastAlso` to define other view elements that should also be converted to the `bold` attribute.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: 'bold',\n\t * \tview: 'strong',\n\t * \tupcastAlso: [\n\t * \t\t'b',\n\t * \t\t{\n\t * \t\t\tname: 'span',\n\t * \t\t\tclasses: 'bold'\n\t * \t\t},\n\t * \t\t{\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-weight': 'bold'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tviewElement => {\n\t * \t\t\tconst fontWeight = viewElement.getStyle( 'font-weight' );\n\t *\n\t * \t\t\tif ( viewElement.is( 'element', 'span' ) && fontWeight && /\\d+/.test() && Number( fontWeight ) > 500 ) {\n\t * \t\t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\t\treturn {\n\t * \t\t\t\t\tname: true,\n\t * \t\t\t\t\tstyles: [ 'font-weight' ]\n\t * \t\t\t\t};\n\t * \t\t\t}\n\t * \t\t}\n\t * \t]\n\t * } );\n\t *\n\t * // Conversion from and to a model attribute key whose value is an enum (`fontSize=big|small`).\n\t * // `upcastAlso` set as callback enables a conversion of a wide range of different view elements.\n\t * editor.conversion.attributeToElement( {\n\t * \tmodel: {\n\t * \t\tkey: 'fontSize',\n\t * \t\tvalues: [ 'big', 'small' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tbig: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '1.2em'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tsmall: {\n\t * \t\t\tname: 'span',\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'font-size': '0.8em'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t},\n\t * \tupcastAlso: {\n\t * \t\tbig: viewElement => {\n\t * \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t * \t\t\tif ( !fontSize ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t * \t\t\tif ( !match ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst size = Number( match[ 1 ] );\n\t *\n\t * \t\t\tif ( viewElement.is( 'element', 'span' ) && size > 10 ) {\n\t * \t\t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t * \t\t\t}\n\t *\n\t * \t\t\treturn null;\n\t * \t\t},\n\t * \t\tsmall: viewElement => {\n\t * \t\t\tconst fontSize = viewElement.getStyle( 'font-size' );\n\t *\n\t * \t\t\tif ( !fontSize ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst match = fontSize.match( /(\\d+)\\s*px/ );\n\t *\n\t * \t\t\tif ( !match ) {\n\t * \t\t\t\treturn null;\n\t * \t\t\t}\n\t *\n\t * \t\t\tconst size = Number( match[ 1 ] );\n\t *\n\t * \t\t\tif ( viewElement.is( 'element', 'span' ) && size < 10 ) {\n\t * \t\t\t\t// Returned value can be an object with the matched properties.\n\t * \t\t\t\t// These properties will be \"consumed\" during the conversion.\n\t * \t\t\t\t// See `engine.view.Matcher~MatcherPattern` and `engine.view.Matcher#match` for more details.\n\t *\n\t * \t\t\t\treturn { name: true, styles: [ 'font-size' ] };\n\t * \t\t\t}\n\t *\n\t * \t\t\treturn null;\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * The `definition.model` parameter specifies which model attribute should be converted from or to. It can be a `{ key, value }` object\n\t * describing the attribute key and value to convert or a `String` specifying just the attribute key (in such a case\n\t * `value` is set to `true`).\n\t *\n\t * @param definition The converter definition.\n\t */ attributeToElement(definition) {\n        // Set up downcast converter.\n        this.for('downcast').attributeToElement(definition);\n        // Set up upcast converter.\n        for (const { model, view } of _getAllUpcastDefinitions(definition)){\n            this.for('upcast').elementToAttribute({\n                view,\n                model,\n                converterPriority: definition.converterPriority\n            });\n        }\n    }\n    /**\n\t * Sets up converters between the model and the view that convert a model attribute to a view attribute (and vice versa). For example,\n\t * `<imageBlock src='foo.jpg'></imageBlock>` is converted to `<img src='foo.jpg'></img>` (the same attribute key and value).\n\t * This type of converters is intended to be used with {@link module:engine/model/element~Element model element} nodes.\n\t * To convert the text attributes,\n\t * the {@link module:engine/conversion/conversion~Conversion#attributeToElement `attributeToElement converter`}should be set up.\n\t *\n\t * ```ts\n\t * // A simple conversion from the `source` model attribute to the `src` view attribute (and vice versa).\n\t * editor.conversion.attributeToAttribute( { model: 'source', view: 'src' } );\n\t *\n\t * // Attribute values are strictly specified.\n\t * editor.conversion.attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'imageInline',\n\t * \t\tkey: 'aside',\n\t * \t\tvalues: [ 'aside' ]\n\t * \t},\n\t * \tview: {\n\t * \t\taside: {\n\t * \t\t\tname: 'img',\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: [ 'aside', 'half-size' ]\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * // Set the style attribute.\n\t * editor.conversion.attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tname: 'imageInline',\n\t * \t\tkey: 'aside',\n\t * \t\tvalues: [ 'aside' ]\n\t * \t},\n\t * \tview: {\n\t * \t\taside: {\n\t * \t\t\tname: 'img',\n\t * \t\t\tkey: 'style',\n\t * \t\t\tvalue: {\n\t * \t\t\t\tfloat: 'right',\n\t * \t\t\t\twidth: '50%',\n\t * \t\t\t\tmargin: '5px'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t *\n\t * // Conversion from and to a model attribute key whose value is an enum (`align=right|center`).\n\t * // Use `upcastAlso` to define other view elements that should also be converted to the `align=right` attribute.\n\t * editor.conversion.attributeToAttribute( {\n\t * \tmodel: {\n\t * \t\tkey: 'align',\n\t * \t\tvalues: [ 'right', 'center' ]\n\t * \t},\n\t * \tview: {\n\t * \t\tright: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: 'align-right'\n\t * \t\t},\n\t * \t\tcenter: {\n\t * \t\t\tkey: 'class',\n\t * \t\t\tvalue: 'align-center'\n\t * \t\t}\n\t * \t},\n\t * \tupcastAlso: {\n\t * \t\tright: {\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-align': 'right'\n\t * \t\t\t}\n\t * \t\t},\n\t * \t\tcenter: {\n\t * \t\t\tstyles: {\n\t * \t\t\t\t'text-align': 'center'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * The `definition.model` parameter specifies which model attribute should be converted from and to.\n\t * It can be a `{ key, [ values ], [ name ] }` object or a `String`, which will be treated like `{ key: definition.model }`.\n\t * The `key` property is the model attribute key to convert from and to.\n\t * The `values` are the possible model attribute values. If the `values` parameter is not set, the model attribute value\n\t * will be the same as the view attribute value.\n\t * If `name` is set, the conversion will be set up only for model elements with the given name.\n\t *\n\t * The `definition.view` parameter specifies which view attribute should be converted from and to.\n\t * It can be a `{ key, value, [ name ] }` object or a `String`, which will be treated like `{ key: definition.view }`.\n\t * The `key` property is the view attribute key to convert from and to.\n\t * The `value` is the view attribute value to convert from and to. If `definition.value` is not set, the view attribute value will be\n\t * the same as the model attribute value.\n\t * If `key` is `'class'`, `value` can be a `String` or an array of `String`s.\n\t * If `key` is `'style'`, `value` is an object with key-value pairs.\n\t * In other cases, `value` is a `String`.\n\t * If `name` is set, the conversion will be set up only for model elements with the given name.\n\t * If `definition.model.values` is set, `definition.view` is an object that assigns values from `definition.model.values`\n\t * to `{ key, value, [ name ] }` objects.\n\t *\n\t * `definition.upcastAlso` specifies which other matching view elements should also be upcast to the given model configuration.\n\t * If `definition.model.values` is set, `definition.upcastAlso` should be an object assigning values from `definition.model.values`\n\t * to {@link module:engine/view/matcher~MatcherPattern}s or arrays of {@link module:engine/view/matcher~MatcherPattern}s.\n\t *\n\t * **Note:** `definition.model` and `definition.view` form should be mirrored, so the same types of parameters should\n\t * be given in both parameters.\n\t *\n\t * @param definition The converter definition.\n\t * @param definition.model The model attribute to convert from and to.\n\t * @param definition.view The view attribute to convert from and to.\n\t * @param definition.upcastAlso Any view element matching `definition.upcastAlso` will also be converted to the given model attribute.\n\t * `definition.upcastAlso` is used only if `config.model.values` is specified.\n\t */ attributeToAttribute(definition) {\n        // Set up downcast converter.\n        this.for('downcast').attributeToAttribute(definition);\n        // Set up upcast converter.\n        for (const { model, view } of _getAllUpcastDefinitions(definition)){\n            this.for('upcast').attributeToAttribute({\n                view,\n                model\n            });\n        }\n    }\n    /**\n\t * Creates and caches conversion helpers for given dispatchers group.\n\t *\n\t * @param options.name Group name.\n\t */ _createConversionHelpers({ name, dispatchers, isDowncast }) {\n        if (this._helpers.has(name)) {\n            /**\n\t\t\t * Trying to register a group name that has already been registered.\n\t\t\t *\n\t\t\t * @error conversion-group-exists\n\t\t\t */ throw new CKEditorError('conversion-group-exists', this);\n        }\n        const helpers = isDowncast ? new DowncastHelpers(dispatchers) : new UpcastHelpers(dispatchers);\n        this._helpers.set(name, helpers);\n    }\n}\n/**\n * Helper function that creates a joint array out of an item passed in `definition.view` and items passed in\n * `definition.upcastAlso`.\n */ function* _getAllUpcastDefinitions(definition) {\n    if (definition.model.values) {\n        for (const value of definition.model.values){\n            const model = {\n                key: definition.model.key,\n                value\n            };\n            const view = definition.view[value];\n            const upcastAlso = definition.upcastAlso ? definition.upcastAlso[value] : undefined;\n            yield* _getUpcastDefinition(model, view, upcastAlso);\n        }\n    } else {\n        yield* _getUpcastDefinition(definition.model, definition.view, definition.upcastAlso);\n    }\n}\nfunction* _getUpcastDefinition(model, view, upcastAlso) {\n    yield {\n        model,\n        view\n    };\n    if (upcastAlso) {\n        for (const upcastAlsoItem of toArray(upcastAlso)){\n            yield {\n                model,\n                view: upcastAlsoItem\n            };\n        }\n    }\n}\n\n/**\n * The XML data processor class.\n * This data processor implementation uses XML as input and output data.\n * This class is needed because unlike HTML, XML allows to use any tag with any value.\n * For example, `<link>Text</link>` is a valid XML but invalid HTML.\n */ class XmlDataProcessor {\n    /**\n\t * A list of namespaces allowed to use in the XML input.\n\t *\n\t * For example, registering namespaces [ 'attribute', 'container' ] allows to use `<attirbute:tagName></attribute:tagName>`\n\t * and `<container:tagName></container:tagName>` input. It is mainly for debugging.\n\t */ namespaces;\n    /**\n\t * DOM parser instance used to parse an XML string to an XML document.\n\t */ domParser;\n    /**\n\t * DOM converter used to convert DOM elements to view elements.\n\t */ domConverter;\n    /**\n\t * A basic HTML writer instance used to convert DOM elements to an XML string.\n\t * There is no need to use a dedicated XML writer because the basic HTML writer works well in this case.\n\t */ htmlWriter;\n    skipComments = true;\n    /**\n\t * Creates a new instance of the XML data processor class.\n\t *\n\t * @param document The view document instance.\n\t * @param options Configuration options.\n\t * @param options.namespaces A list of namespaces allowed to use in the XML input.\n\t */ constructor(document, options = {}){\n        this.namespaces = options.namespaces || [];\n        this.domParser = new DOMParser();\n        this.domConverter = new DomConverter(document, {\n            renderingMode: 'data'\n        });\n        this.htmlWriter = new BasicHtmlWriter();\n    }\n    /**\n\t * Converts the provided {@link module:engine/view/documentfragment~DocumentFragment document fragment}\n\t * to data format &ndash; in this case an XML string.\n\t *\n\t * @returns An XML string.\n\t */ toData(viewFragment) {\n        // Convert view DocumentFragment to DOM DocumentFragment.\n        const domFragment = this.domConverter.viewToDom(viewFragment);\n        // Convert DOM DocumentFragment to XML output.\n        // There is no need to use dedicated for XML serializing method because BasicHtmlWriter works well in this case.\n        return this.htmlWriter.getHtml(domFragment);\n    }\n    /**\n\t * Converts the provided XML string to a view tree.\n\t *\n\t * @param data An XML string.\n\t * @returns A converted view element.\n\t */ toView(data) {\n        // Convert input XML data to DOM DocumentFragment.\n        const domFragment = this._toDom(data);\n        // Convert DOM DocumentFragment to view DocumentFragment.\n        return this.domConverter.domToView(domFragment, {\n            keepOriginalCase: true,\n            skipComments: this.skipComments\n        });\n    }\n    /**\n\t * Registers a {@link module:engine/view/matcher~MatcherPattern} for view elements whose content should be treated as raw data\n\t * and not processed during the conversion from XML to view elements.\n\t *\n\t * The raw data can be later accessed by a\n\t * {@link module:engine/view/element~Element#getCustomProperty custom property of a view element} called `\"$rawContent\"`.\n\t *\n\t * @param pattern Pattern matching all view elements whose content should be treated as raw data.\n\t */ registerRawContentMatcher(pattern) {\n        this.domConverter.registerRawContentMatcher(pattern);\n    }\n    /**\n\t * If the processor is set to use marked fillers, it will insert `&nbsp;` fillers wrapped in `<span>` elements\n\t * (`<span data-cke-filler=\"true\">&nbsp;</span>`) instead of regular `&nbsp;` characters.\n\t *\n\t * This mode allows for a more precise handling of block fillers (so they do not leak into editor content) but\n\t * bloats the editor data with additional markup.\n\t *\n\t * This mode may be required by some features and will be turned on by them automatically.\n\t *\n\t * @param type Whether to use the default or the marked `&nbsp;` block fillers.\n\t */ useFillerType(type) {\n        this.domConverter.blockFillerMode = type == 'marked' ? 'markedNbsp' : 'nbsp';\n    }\n    /**\n\t * Converts an XML string to its DOM representation. Returns a document fragment containing nodes parsed from\n\t * the provided data.\n\t */ _toDom(data) {\n        // Stringify namespaces.\n        const namespaces = this.namespaces.map((nsp)=>`xmlns:${nsp}=\"nsp\"`).join(' ');\n        // Wrap data into root element with optional namespace definitions.\n        data = `<xml ${namespaces}>${data}</xml>`;\n        const parsedDocument = this.domParser.parseFromString(data, 'text/xml');\n        // Parse validation.\n        const parserError = parsedDocument.querySelector('parsererror');\n        if (parserError) {\n            throw new Error('Parse error - ' + parserError.textContent);\n        }\n        const fragment = parsedDocument.createDocumentFragment();\n        const nodes = parsedDocument.documentElement.childNodes;\n        while(nodes.length > 0){\n            fragment.appendChild(nodes[0]);\n        }\n        return fragment;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /* eslint-disable @typescript-eslint/no-unused-vars */ /**\n * @module engine/model/operation/operation\n */ /**\n * Abstract base operation class.\n */ class Operation {\n    /**\n\t * {@link module:engine/model/document~Document#version} on which operation can be applied. If you try to\n\t * {@link module:engine/model/model~Model#applyOperation apply} operation with different base version than the\n\t * {@link module:engine/model/document~Document#version document version} the\n\t * {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.\n\t */ baseVersion;\n    /**\n\t * Defines whether operation is executed on attached or detached {@link module:engine/model/item~Item items}.\n\t */ isDocumentOperation;\n    /**\n\t * {@link module:engine/model/batch~Batch Batch} to which the operation is added or `null` if the operation is not\n\t * added to any batch yet.\n\t */ batch;\n    /**\n\t * Base operation constructor.\n\t *\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(baseVersion){\n        this.baseVersion = baseVersion;\n        this.isDocumentOperation = this.baseVersion !== null;\n        this.batch = null;\n    }\n    /**\n\t * Checks whether the operation's parameters are correct and the operation can be correctly executed. Throws\n\t * an error if operation is not valid.\n\t *\n\t * @internal\n\t */ _validate() {}\n    /**\n\t * Custom toJSON method to solve child-parent circular dependencies.\n\t *\n\t * @returns Clone of this object with the operation property replaced with string.\n\t */ toJSON() {\n        // This method creates only a shallow copy, all nested objects should be defined separately.\n        // See https://github.com/ckeditor/ckeditor5-engine/issues/1477.\n        const json = Object.assign({}, this);\n        json.__className = this.constructor.className;\n        // Remove reference to the parent `Batch` to avoid circular dependencies.\n        delete json.batch;\n        // Only document operations are shared with other clients so it is not necessary to keep this information.\n        delete json.isDocumentOperation;\n        return json;\n    }\n    /**\n\t * Name of the operation class used for serialization.\n\t */ static get className() {\n        return 'Operation';\n    }\n    /**\n\t * Creates `Operation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param doc Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        return new this(json.baseVersion);\n    }\n}\n\n/**\n * Inserts given nodes at given position.\n *\n * @internal\n * @param position Position at which nodes should be inserted.\n * @param normalizedNodes Nodes to insert.\n * @returns Range spanning over inserted elements.\n */ function _insert(position, nodes) {\n    const normalizedNodes = _normalizeNodes(nodes);\n    // We have to count offset before inserting nodes because they can get merged and we would get wrong offsets.\n    const offset = normalizedNodes.reduce((sum, node)=>sum + node.offsetSize, 0);\n    const parent = position.parent;\n    // Insertion might be in a text node, we should split it if that's the case.\n    _splitNodeAtPosition(position);\n    const index = position.index;\n    // Insert nodes at given index. After splitting we have a proper index and insertion is between nodes,\n    // using basic `Element` API.\n    parent._insertChild(index, normalizedNodes);\n    // Merge text nodes, if possible. Merging is needed only at points where inserted nodes \"touch\" \"old\" nodes.\n    _mergeNodesAtIndex(parent, index + normalizedNodes.length);\n    _mergeNodesAtIndex(parent, index);\n    return new Range(position, position.getShiftedBy(offset));\n}\n/**\n * Removed nodes in given range. Only {@link module:engine/model/range~Range#isFlat flat} ranges are accepted.\n *\n * @internal\n * @param range Range containing nodes to remove.\n */ function _remove(range) {\n    if (!range.isFlat) {\n        /**\n\t\t * Trying to remove a range which starts and ends in different element.\n\t\t *\n\t\t * @error operation-utils-remove-range-not-flat\n\t\t */ throw new CKEditorError('operation-utils-remove-range-not-flat', this);\n    }\n    const parent = range.start.parent;\n    // Range may be inside text nodes, we have to split them if that's the case.\n    _splitNodeAtPosition(range.start);\n    _splitNodeAtPosition(range.end);\n    // Remove the text nodes using basic `Element` API.\n    const removed = parent._removeChildren(range.start.index, range.end.index - range.start.index);\n    // Merge text nodes, if possible. After some nodes were removed, node before and after removed range will be\n    // touching at the position equal to the removed range beginning. We check merging possibility there.\n    _mergeNodesAtIndex(parent, range.start.index);\n    return removed;\n}\n/**\n * Moves nodes in given range to given target position. Only {@link module:engine/model/range~Range#isFlat flat} ranges are accepted.\n *\n * @internal\n * @param sourceRange Range containing nodes to move.\n * @param targetPosition Position to which nodes should be moved.\n * @returns Range containing moved nodes.\n */ function _move(sourceRange, targetPosition) {\n    if (!sourceRange.isFlat) {\n        /**\n\t\t * Trying to move a range which starts and ends in different element.\n\t\t *\n\t\t * @error operation-utils-move-range-not-flat\n\t\t */ throw new CKEditorError('operation-utils-move-range-not-flat', this);\n    }\n    const nodes = _remove(sourceRange);\n    // We have to fix `targetPosition` because model changed after nodes from `sourceRange` got removed and\n    // that change might have an impact on `targetPosition`.\n    targetPosition = targetPosition._getTransformedByDeletion(sourceRange.start, sourceRange.end.offset - sourceRange.start.offset);\n    return _insert(targetPosition, nodes);\n}\n/**\n * Sets given attribute on nodes in given range. The attributes are only set on top-level nodes of the range, not on its children.\n *\n * @internal\n * @param range Range containing nodes that should have the attribute set. Must be a flat range.\n * @param key Key of attribute to set.\n * @param value Attribute value.\n */ function _setAttribute(range, key, value) {\n    // Range might start or end in text nodes, so we have to split them.\n    _splitNodeAtPosition(range.start);\n    _splitNodeAtPosition(range.end);\n    // Iterate over all items in the range.\n    for (const item of range.getItems({\n        shallow: true\n    })){\n        // Iterator will return `TextProxy` instances but we know that those text proxies will\n        // always represent full text nodes (this is guaranteed thanks to splitting we did before).\n        // So, we can operate on those text proxies' text nodes.\n        const node = item.is('$textProxy') ? item.textNode : item;\n        if (value !== null) {\n            node._setAttribute(key, value);\n        } else {\n            node._removeAttribute(key);\n        }\n        // After attributes changing it may happen that some text nodes can be merged. Try to merge with previous node.\n        _mergeNodesAtIndex(node.parent, node.index);\n    }\n    // Try to merge last changed node with it's previous sibling (not covered by the loop above).\n    _mergeNodesAtIndex(range.end.parent, range.end.index);\n}\n/**\n * Normalizes given object or an array of objects to an array of {@link module:engine/model/node~Node nodes}. See\n * {@link ~NodeSet NodeSet} for details on how normalization is performed.\n *\n * @internal\n * @param nodes Objects to normalize.\n * @returns Normalized nodes.\n */ function _normalizeNodes(nodes) {\n    const normalized = [];\n    function convert(nodes) {\n        if (typeof nodes == 'string') {\n            normalized.push(new Text(nodes));\n        } else if (nodes instanceof TextProxy) {\n            normalized.push(new Text(nodes.data, nodes.getAttributes()));\n        } else if (nodes instanceof Node$1) {\n            normalized.push(nodes);\n        } else if (isIterable(nodes)) {\n            for (const node of nodes){\n                convert(node);\n            }\n        } else ;\n    }\n    convert(nodes);\n    // Merge text nodes.\n    for(let i = 1; i < normalized.length; i++){\n        const node = normalized[i];\n        const prev = normalized[i - 1];\n        if (node instanceof Text && prev instanceof Text && _haveSameAttributes(node, prev)) {\n            // Doing this instead changing `prev.data` because `data` is readonly.\n            normalized.splice(i - 1, 2, new Text(prev.data + node.data, prev.getAttributes()));\n            i--;\n        }\n    }\n    return normalized;\n}\n/**\n * Checks if nodes before and after given index in given element are {@link module:engine/model/text~Text text nodes} and\n * merges them into one node if they have same attributes.\n *\n * Merging is done by removing two text nodes and inserting a new text node containing data from both merged text nodes.\n *\n * @param element Parent element of nodes to merge.\n * @param index Index between nodes to merge.\n */ function _mergeNodesAtIndex(element, index) {\n    const nodeBefore = element.getChild(index - 1);\n    const nodeAfter = element.getChild(index);\n    // Check if both of those nodes are text objects with same attributes.\n    if (nodeBefore && nodeAfter && nodeBefore.is('$text') && nodeAfter.is('$text') && _haveSameAttributes(nodeBefore, nodeAfter)) {\n        // Append text of text node after index to the before one.\n        const mergedNode = new Text(nodeBefore.data + nodeAfter.data, nodeBefore.getAttributes());\n        // Remove separate text nodes.\n        element._removeChildren(index - 1, 2);\n        // Insert merged text node.\n        element._insertChild(index - 1, mergedNode);\n    }\n}\n/**\n * Checks if given position is in a text node, and if so, splits the text node in two text nodes, each of them\n * containing a part of original text node.\n *\n * @param position Position at which node should be split.\n */ function _splitNodeAtPosition(position) {\n    const textNode = position.textNode;\n    const element = position.parent;\n    if (textNode) {\n        const offsetDiff = position.offset - textNode.startOffset;\n        const index = textNode.index;\n        element._removeChildren(index, 1);\n        const firstPart = new Text(textNode.data.substr(0, offsetDiff), textNode.getAttributes());\n        const secondPart = new Text(textNode.data.substr(offsetDiff), textNode.getAttributes());\n        element._insertChild(index, [\n            firstPart,\n            secondPart\n        ]);\n    }\n}\n/**\n * Checks whether two given nodes have same attributes.\n *\n * @param nodeA Node to check.\n * @param nodeB Node to check.\n * @returns `true` if nodes have same attributes, `false` otherwise.\n */ function _haveSameAttributes(nodeA, nodeB) {\n    const iteratorA = nodeA.getAttributes();\n    const iteratorB = nodeB.getAttributes();\n    for (const attr of iteratorA){\n        if (attr[1] !== nodeB.getAttribute(attr[0])) {\n            return false;\n        }\n        iteratorB.next();\n    }\n    return iteratorB.next().done;\n}\n\n// @if CK_DEBUG_ENGINE // const ModelRange = require( '../range' ).default;\n/**\n * Operation to move a range of {@link module:engine/model/item~Item model items}\n * to given {@link module:engine/model/position~Position target position}.\n */ class MoveOperation extends Operation {\n    /**\n\t * Position before the first {@link module:engine/model/item~Item model item} to move.\n\t */ sourcePosition;\n    /**\n\t * Offset size of moved range.\n\t */ howMany;\n    /**\n\t * Position at which moved nodes will be inserted.\n\t */ targetPosition;\n    /**\n\t * Creates a move operation.\n\t *\n\t * @param sourcePosition Position before the first {@link module:engine/model/item~Item model item} to move.\n\t * @param howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t * `sourcePosition` with offset shifted by `howMany`.\n\t * @param targetPosition Position at which moved nodes will be inserted.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(sourcePosition, howMany, targetPosition, baseVersion){\n        super(baseVersion);\n        this.sourcePosition = sourcePosition.clone();\n        // `'toNext'` because `sourcePosition` is a bit like a start of the moved range.\n        this.sourcePosition.stickiness = 'toNext';\n        this.howMany = howMany;\n        this.targetPosition = targetPosition.clone();\n        this.targetPosition.stickiness = 'toNone';\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        if (this.targetPosition.root.rootName == '$graveyard') {\n            return 'remove';\n        } else if (this.sourcePosition.root.rootName == '$graveyard') {\n            return 'reinsert';\n        }\n        return 'move';\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return [\n            Range._createFromPositionAndShift(this.sourcePosition, this.howMany),\n            Range._createFromPositionAndShift(this.targetPosition, 0)\n        ];\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */ clone() {\n        return new MoveOperation(this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion);\n    }\n    /**\n\t * Returns the start position of the moved range after it got moved. This may be different than\n\t * {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition} in some cases, i.e. when a range is moved\n\t * inside the same parent but {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition targetPosition}\n\t * is after {@link module:engine/model/operation/moveoperation~MoveOperation#sourcePosition sourcePosition}.\n\t *\n\t * ```\n\t *  vv              vv\n\t * abcdefg ===> adefbcg\n\t *      ^          ^\n\t *      targetPos  movedRangeStart\n\t *      offset 6   offset 4\n\t *```\n\t */ getMovedRangeStart() {\n        return this.targetPosition._getTransformedByDeletion(this.sourcePosition, this.howMany);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        const newTargetPosition = this.sourcePosition._getTransformedByInsertion(this.targetPosition, this.howMany);\n        return new MoveOperation(this.getMovedRangeStart(), this.howMany, newTargetPosition, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        const sourceElement = this.sourcePosition.parent;\n        const targetElement = this.targetPosition.parent;\n        const sourceOffset = this.sourcePosition.offset;\n        const targetOffset = this.targetPosition.offset;\n        // Validate whether move operation has correct parameters.\n        // Validation is pretty complex but move operation is one of the core ways to manipulate the document state.\n        // We expect that many errors might be connected with one of scenarios described below.\n        if (sourceOffset + this.howMany > sourceElement.maxOffset) {\n            /**\n\t\t\t * The nodes which should be moved do not exist.\n\t\t\t *\n\t\t\t * @error move-operation-nodes-do-not-exist\n\t\t\t */ throw new CKEditorError('move-operation-nodes-do-not-exist', this);\n        } else if (sourceElement === targetElement && sourceOffset < targetOffset && targetOffset < sourceOffset + this.howMany) {\n            /**\n\t\t\t * Trying to move a range of nodes into the middle of that range.\n\t\t\t *\n\t\t\t * @error move-operation-range-into-itself\n\t\t\t */ throw new CKEditorError('move-operation-range-into-itself', this);\n        } else if (this.sourcePosition.root == this.targetPosition.root) {\n            if (compareArrays(this.sourcePosition.getParentPath(), this.targetPosition.getParentPath()) == 'prefix') {\n                const i = this.sourcePosition.path.length - 1;\n                if (this.targetPosition.path[i] >= sourceOffset && this.targetPosition.path[i] < sourceOffset + this.howMany) {\n                    /**\n\t\t\t\t\t * Trying to move a range of nodes into one of nodes from that range.\n\t\t\t\t\t *\n\t\t\t\t\t * @error move-operation-node-into-itself\n\t\t\t\t\t */ throw new CKEditorError('move-operation-node-into-itself', this);\n                }\n            }\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        _move(Range._createFromPositionAndShift(this.sourcePosition, this.howMany), this.targetPosition);\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.sourcePosition = this.sourcePosition.toJSON();\n        json.targetPosition = this.targetPosition.toJSON();\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'MoveOperation';\n    }\n    /**\n\t * Creates `MoveOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        const sourcePosition = Position.fromJSON(json.sourcePosition, document);\n        const targetPosition = Position.fromJSON(json.targetPosition, document);\n        return new this(sourcePosition, json.howMany, targetPosition, json.baseVersion);\n    }\n}\n\n/**\n * Operation to insert one or more nodes at given position in the model.\n */ class InsertOperation extends Operation {\n    /**\n\t * Position of insertion.\n\t *\n\t * @readonly\n\t */ position;\n    /**\n\t * List of nodes to insert.\n\t *\n\t * @readonly\n\t */ nodes;\n    /**\n\t * Flag deciding how the operation should be transformed. If set to `true`, nodes might get additional attributes\n\t * during operational transformation. This happens when the operation insertion position is inside of a range\n\t * where attributes have changed.\n\t */ shouldReceiveAttributes;\n    /**\n\t * Creates an insert operation.\n\t *\n\t * @param position Position of insertion.\n\t * @param nodes The list of nodes to be inserted.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(position, nodes, baseVersion){\n        super(baseVersion);\n        this.position = position.clone();\n        this.position.stickiness = 'toNone';\n        this.nodes = new NodeList(_normalizeNodes(nodes));\n        this.shouldReceiveAttributes = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        return 'insert';\n    }\n    /**\n\t * Total offset size of inserted nodes.\n\t */ get howMany() {\n        return this.nodes.maxOffset;\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return this.position.clone();\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */ clone() {\n        const nodes = new NodeList([\n            ...this.nodes\n        ].map((node)=>node._clone(true)));\n        const insert = new InsertOperation(this.position, nodes, this.baseVersion);\n        insert.shouldReceiveAttributes = this.shouldReceiveAttributes;\n        return insert;\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        const graveyard = this.position.root.document.graveyard;\n        const gyPosition = new Position(graveyard, [\n            0\n        ]);\n        return new MoveOperation(this.position, this.nodes.maxOffset, gyPosition, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        const targetElement = this.position.parent;\n        if (!targetElement || targetElement.maxOffset < this.position.offset) {\n            /**\n\t\t\t * Insertion position is invalid.\n\t\t\t *\n\t\t\t * @error insert-operation-position-invalid\n\t\t\t */ throw new CKEditorError('insert-operation-position-invalid', this);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        // What happens here is that we want original nodes be passed to writer because we want original nodes\n        // to be inserted to the model. But in InsertOperation, we want to keep those nodes as they were added\n        // to the operation, not modified. For example, text nodes can get merged or cropped while Elements can\n        // get children. It is important that InsertOperation has the copy of original nodes in intact state.\n        const originalNodes = this.nodes;\n        this.nodes = new NodeList([\n            ...originalNodes\n        ].map((node)=>node._clone(true)));\n        _insert(this.position, originalNodes);\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.position = this.position.toJSON();\n        json.nodes = this.nodes.toJSON();\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'InsertOperation';\n    }\n    /**\n\t * Creates `InsertOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        const children = [];\n        for (const child of json.nodes){\n            if (child.name) {\n                // If child has name property, it is an Element.\n                children.push(Element.fromJSON(child));\n            } else {\n                // Otherwise, it is a Text node.\n                children.push(Text.fromJSON(child));\n            }\n        }\n        const insert = new InsertOperation(Position.fromJSON(json.position, document), children, json.baseVersion);\n        insert.shouldReceiveAttributes = json.shouldReceiveAttributes;\n        return insert;\n    }\n}\n\n/**\n * Operation to split {@link module:engine/model/element~Element an element} at given\n * {@link module:engine/model/operation/splitoperation~SplitOperation#splitPosition split position} into two elements,\n * both containing a part of the element's original content.\n */ class SplitOperation extends Operation {\n    /**\n\t * Position at which an element should be split.\n\t */ splitPosition;\n    /**\n\t * Total offset size of elements that are in the split element after `position`.\n\t */ howMany;\n    /**\n\t * Position at which the clone of split element (or element from graveyard) will be inserted.\n\t */ insertionPosition;\n    /**\n\t * Position in the graveyard root before the element which should be used as a parent of the nodes after `position`.\n\t * If it is not set, a copy of the the `position` parent will be used.\n\t *\n\t * The default behavior is to clone the split element. Element from graveyard is used during undo.\n\t */ graveyardPosition;\n    /**\n\t * Creates a split operation.\n\t *\n\t * @param splitPosition Position at which an element should be split.\n\t * @param howMany Total offset size of elements that are in the split element after `position`.\n\t * @param insertionPosition Position at which the clone of split element (or element from graveyard) will be inserted.\n\t * @param graveyardPosition Position in the graveyard root before the element which\n\t * should be used as a parent of the nodes after `position`. If it is not set, a copy of the the `position` parent will be used.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(splitPosition, howMany, insertionPosition, graveyardPosition, baseVersion){\n        super(baseVersion);\n        this.splitPosition = splitPosition.clone();\n        // Keep position sticking to the next node. This way any new content added at the place where the element is split\n        // will be left in the original element.\n        this.splitPosition.stickiness = 'toNext';\n        this.howMany = howMany;\n        this.insertionPosition = insertionPosition;\n        this.graveyardPosition = graveyardPosition ? graveyardPosition.clone() : null;\n        if (this.graveyardPosition) {\n            this.graveyardPosition.stickiness = 'toNext';\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        return 'split';\n    }\n    /**\n\t * Position inside the new clone of a split element.\n\t *\n\t * This is a position where nodes that are after the split position will be moved to.\n\t */ get moveTargetPosition() {\n        const path = this.insertionPosition.path.slice();\n        path.push(0);\n        return new Position(this.insertionPosition.root, path);\n    }\n    /**\n\t * Artificial range that contains all the nodes from the split element that will be moved to the new element.\n\t * The range starts at {@link #splitPosition} and ends in the same parent, at `POSITIVE_INFINITY` offset.\n\t */ get movedRange() {\n        const end = this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);\n        return new Range(this.splitPosition, end);\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        // These could be positions but `Selectable` type only supports `Iterable<Range>`.\n        const ranges = [\n            Range._createFromPositionAndShift(this.splitPosition, 0),\n            Range._createFromPositionAndShift(this.insertionPosition, 0)\n        ];\n        if (this.graveyardPosition) {\n            ranges.push(Range._createFromPositionAndShift(this.graveyardPosition, 0));\n        }\n        return ranges;\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns Clone of this operation.\n\t */ clone() {\n        return new SplitOperation(this.splitPosition, this.howMany, this.insertionPosition, this.graveyardPosition, this.baseVersion);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        const graveyard = this.splitPosition.root.document.graveyard;\n        const graveyardPosition = new Position(graveyard, [\n            0\n        ]);\n        return new MergeOperation(this.moveTargetPosition, this.howMany, this.splitPosition, graveyardPosition, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        const element = this.splitPosition.parent;\n        const offset = this.splitPosition.offset;\n        // Validate whether split operation has correct parameters.\n        if (!element || element.maxOffset < offset) {\n            /**\n\t\t\t * Split position is invalid.\n\t\t\t *\n\t\t\t * @error split-operation-position-invalid\n\t\t\t */ throw new CKEditorError('split-operation-position-invalid', this);\n        } else if (!element.parent) {\n            /**\n\t\t\t * Cannot split root element.\n\t\t\t *\n\t\t\t * @error split-operation-split-in-root\n\t\t\t */ throw new CKEditorError('split-operation-split-in-root', this);\n        } else if (this.howMany != element.maxOffset - this.splitPosition.offset) {\n            /**\n\t\t\t * Split operation specifies wrong number of nodes to move.\n\t\t\t *\n\t\t\t * @error split-operation-how-many-invalid\n\t\t\t */ throw new CKEditorError('split-operation-how-many-invalid', this);\n        } else if (this.graveyardPosition && !this.graveyardPosition.nodeAfter) {\n            /**\n\t\t\t * Graveyard position invalid.\n\t\t\t *\n\t\t\t * @error split-operation-graveyard-position-invalid\n\t\t\t */ throw new CKEditorError('split-operation-graveyard-position-invalid', this);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        const splitElement = this.splitPosition.parent;\n        if (this.graveyardPosition) {\n            _move(Range._createFromPositionAndShift(this.graveyardPosition, 1), this.insertionPosition);\n        } else {\n            const newElement = splitElement._clone();\n            _insert(this.insertionPosition, newElement);\n        }\n        const sourceRange = new Range(Position._createAt(splitElement, this.splitPosition.offset), Position._createAt(splitElement, splitElement.maxOffset));\n        _move(sourceRange, this.moveTargetPosition);\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.splitPosition = this.splitPosition.toJSON();\n        json.insertionPosition = this.insertionPosition.toJSON();\n        if (this.graveyardPosition) {\n            json.graveyardPosition = this.graveyardPosition.toJSON();\n        }\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'SplitOperation';\n    }\n    /**\n\t * Helper function that returns a default insertion position basing on given `splitPosition`. The default insertion\n\t * position is after the split element.\n\t */ static getInsertionPosition(splitPosition) {\n        const path = splitPosition.path.slice(0, -1);\n        path[path.length - 1]++;\n        return new Position(splitPosition.root, path, 'toPrevious');\n    }\n    /**\n\t * Creates `SplitOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        const splitPosition = Position.fromJSON(json.splitPosition, document);\n        const insertionPosition = Position.fromJSON(json.insertionPosition, document);\n        const graveyardPosition = json.graveyardPosition ? Position.fromJSON(json.graveyardPosition, document) : null;\n        return new this(splitPosition, json.howMany, insertionPosition, graveyardPosition, json.baseVersion);\n    }\n}\n\n/**\n * Operation to merge two {@link module:engine/model/element~Element elements}.\n *\n * The merged element is the parent of {@link ~MergeOperation#sourcePosition} and it is merged into the parent of\n * {@link ~MergeOperation#targetPosition}. All nodes from the merged element are moved to {@link ~MergeOperation#targetPosition}.\n *\n * The merged element is moved to the graveyard at {@link ~MergeOperation#graveyardPosition}.\n */ class MergeOperation extends Operation {\n    /**\n\t * Position inside the merged element. All nodes from that element after that position will be moved to {@link #targetPosition}.\n\t */ sourcePosition;\n    /**\n\t * Summary offset size of nodes which will be moved from the merged element to the new parent.\n\t */ howMany;\n    /**\n\t * Position which the nodes from the merged elements will be moved to.\n\t */ targetPosition;\n    /**\n\t * Position in graveyard to which the merged element will be moved.\n\t */ graveyardPosition;\n    /**\n\t * Creates a merge operation.\n\t *\n\t * @param sourcePosition Position inside the merged element. All nodes from that\n\t * element after that position will be moved to {@link #targetPosition}.\n\t * @param howMany Summary offset size of nodes which will be moved from the merged element to the new parent.\n\t * @param targetPosition Position which the nodes from the merged elements will be moved to.\n\t * @param graveyardPosition Position in graveyard to which the merged element will be moved.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(sourcePosition, howMany, targetPosition, graveyardPosition, baseVersion){\n        super(baseVersion);\n        this.sourcePosition = sourcePosition.clone();\n        // This is, and should always remain, the first position in its parent.\n        this.sourcePosition.stickiness = 'toPrevious';\n        this.howMany = howMany;\n        this.targetPosition = targetPosition.clone();\n        // Except of a rare scenario in `MergeOperation` x `MergeOperation` transformation,\n        // this is, and should always remain, the last position in its parent.\n        this.targetPosition.stickiness = 'toNext';\n        this.graveyardPosition = graveyardPosition.clone();\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        return 'merge';\n    }\n    /**\n\t * Position before the merged element (which will be deleted).\n\t */ get deletionPosition() {\n        return new Position(this.sourcePosition.root, this.sourcePosition.path.slice(0, -1));\n    }\n    /**\n\t * Artificial range that contains all the nodes from the merged element that will be moved to {@link ~MergeOperation#sourcePosition}.\n\t * The range starts at {@link ~MergeOperation#sourcePosition} and ends in the same parent, at `POSITIVE_INFINITY` offset.\n\t */ get movedRange() {\n        const end = this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);\n        return new Range(this.sourcePosition, end);\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        const mergedElement = this.sourcePosition.parent;\n        return [\n            Range._createOn(mergedElement),\n            // These could be positions but `Selectable` type only supports `Iterable<Range>`.\n            Range._createFromPositionAndShift(this.targetPosition, 0),\n            Range._createFromPositionAndShift(this.graveyardPosition, 0)\n        ];\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */ clone() {\n        return new MergeOperation(this.sourcePosition, this.howMany, this.targetPosition, this.graveyardPosition, this.baseVersion);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        // Positions in this method are transformed by this merge operation because the split operation bases on\n        // the context after this merge operation happened (because split operation reverses it).\n        // So we need to acknowledge that the merge operation happened and those positions changed a little.\n        const targetPosition = this.targetPosition._getTransformedByMergeOperation(this);\n        const path = this.sourcePosition.path.slice(0, -1);\n        const insertionPosition = new Position(this.sourcePosition.root, path)._getTransformedByMergeOperation(this);\n        return new SplitOperation(targetPosition, this.howMany, insertionPosition, this.graveyardPosition, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        const sourceElement = this.sourcePosition.parent;\n        const targetElement = this.targetPosition.parent;\n        // Validate whether merge operation has correct parameters.\n        if (!sourceElement.parent) {\n            /**\n\t\t\t * Merge source position is invalid. The element to be merged must have a parent node.\n\t\t\t *\n\t\t\t * @error merge-operation-source-position-invalid\n\t\t\t */ throw new CKEditorError('merge-operation-source-position-invalid', this);\n        } else if (!targetElement.parent) {\n            /**\n\t\t\t * Merge target position is invalid. The element to be merged must have a parent node.\n\t\t\t *\n\t\t\t * @error merge-operation-target-position-invalid\n\t\t\t */ throw new CKEditorError('merge-operation-target-position-invalid', this);\n        } else if (this.howMany != sourceElement.maxOffset) {\n            /**\n\t\t\t * Merge operation specifies wrong number of nodes to move.\n\t\t\t *\n\t\t\t * @error merge-operation-how-many-invalid\n\t\t\t */ throw new CKEditorError('merge-operation-how-many-invalid', this);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        const mergedElement = this.sourcePosition.parent;\n        const sourceRange = Range._createIn(mergedElement);\n        _move(sourceRange, this.targetPosition);\n        _move(Range._createOn(mergedElement), this.graveyardPosition);\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.sourcePosition = json.sourcePosition.toJSON();\n        json.targetPosition = json.targetPosition.toJSON();\n        json.graveyardPosition = json.graveyardPosition.toJSON();\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'MergeOperation';\n    }\n    /**\n\t * Creates `MergeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        const sourcePosition = Position.fromJSON(json.sourcePosition, document);\n        const targetPosition = Position.fromJSON(json.targetPosition, document);\n        const graveyardPosition = Position.fromJSON(json.graveyardPosition, document);\n        return new this(sourcePosition, json.howMany, targetPosition, graveyardPosition, json.baseVersion);\n    }\n}\n\nclass MarkerOperation extends Operation {\n    /**\n\t * Marker name.\n\t *\n\t * @readonly\n\t */ name;\n    /**\n\t * Marker range before the change.\n\t *\n\t * @readonly\n\t */ oldRange;\n    /**\n\t * Marker range after the change.\n\t *\n\t * @readonly\n\t */ newRange;\n    /**\n\t * Specifies whether the marker operation affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t *\n\t * @readonly\n\t */ affectsData;\n    /**\n\t * Marker collection on which change should be executed.\n\t */ _markers;\n    /**\n\t * @param name Marker name.\n\t * @param oldRange Marker range before the change.\n\t * @param newRange Marker range after the change.\n\t * @param markers Marker collection on which change should be executed.\n\t * @param affectsData Specifies whether the marker operation affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(name, oldRange, newRange, markers, affectsData, baseVersion){\n        super(baseVersion);\n        this.name = name;\n        this.oldRange = oldRange ? oldRange.clone() : null;\n        this.newRange = newRange ? newRange.clone() : null;\n        this.affectsData = affectsData;\n        this._markers = markers;\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        return 'marker';\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        const ranges = [];\n        if (this.oldRange) {\n            ranges.push(this.oldRange.clone());\n        }\n        if (this.newRange) {\n            if (this.oldRange) {\n                ranges.push(...this.newRange.getDifference(this.oldRange));\n            } else {\n                ranges.push(this.newRange.clone());\n            }\n        }\n        return ranges;\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */ clone() {\n        return new MarkerOperation(this.name, this.oldRange, this.newRange, this._markers, this.affectsData, this.baseVersion);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        return new MarkerOperation(this.name, this.newRange, this.oldRange, this._markers, this.affectsData, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        if (this.newRange) {\n            this._markers._set(this.name, this.newRange, true, this.affectsData);\n        } else {\n            this._markers._remove(this.name);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ toJSON() {\n        const json = super.toJSON();\n        if (this.oldRange) {\n            json.oldRange = this.oldRange.toJSON();\n        }\n        if (this.newRange) {\n            json.newRange = this.newRange.toJSON();\n        }\n        delete json._markers;\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'MarkerOperation';\n    }\n    /**\n\t * Creates `MarkerOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        return new MarkerOperation(json.name, json.oldRange ? Range.fromJSON(json.oldRange, document) : null, json.newRange ? Range.fromJSON(json.newRange, document) : null, document.model.markers, json.affectsData, json.baseVersion);\n    }\n}\n\n/**\n * Operation to change nodes' attribute.\n *\n * Using this class you can add, remove or change value of the attribute.\n */ class AttributeOperation extends Operation {\n    /**\n\t * Range on which operation should be applied.\n\t *\n\t * @readonly\n\t */ range;\n    /**\n\t * Key of an attribute to change or remove.\n\t *\n\t * @readonly\n\t */ key;\n    /**\n\t * Old value of the attribute with given key or `null`, if attribute was not set before.\n\t *\n\t * @readonly\n\t */ oldValue;\n    /**\n\t * New value of the attribute with given key or `null`, if operation should remove attribute.\n\t *\n\t * @readonly\n\t */ newValue;\n    /**\n\t * Creates an operation that changes, removes or adds attributes.\n\t *\n\t * If only `newValue` is set, attribute will be added on a node. Note that all nodes in operation's range must not\n\t * have an attribute with the same key as the added attribute.\n\t *\n\t * If only `oldValue` is set, then attribute with given key will be removed. Note that all nodes in operation's range\n\t * must have an attribute with that key added.\n\t *\n\t * If both `newValue` and `oldValue` are set, then the operation will change the attribute value. Note that all nodes in\n\t * operation's ranges must already have an attribute with given key and `oldValue` as value\n\t *\n\t * @param range Range on which the operation should be applied. Must be a flat range.\n\t * @param key Key of an attribute to change or remove.\n\t * @param oldValue Old value of the attribute with given key or `null`, if attribute was not set before.\n\t * @param newValue New value of the attribute with given key or `null`, if operation should remove attribute.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(range, key, oldValue, newValue, baseVersion){\n        super(baseVersion);\n        this.range = range.clone();\n        this.key = key;\n        this.oldValue = oldValue === undefined ? null : oldValue;\n        this.newValue = newValue === undefined ? null : newValue;\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        if (this.oldValue === null) {\n            return 'addAttribute';\n        } else if (this.newValue === null) {\n            return 'removeAttribute';\n        } else {\n            return 'changeAttribute';\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return this.range.clone();\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */ clone() {\n        return new AttributeOperation(this.range, this.key, this.oldValue, this.newValue, this.baseVersion);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        return new AttributeOperation(this.range, this.key, this.newValue, this.oldValue, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.range = this.range.toJSON();\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        if (!this.range.isFlat) {\n            /**\n\t\t\t * The range to change is not flat.\n\t\t\t *\n\t\t\t * @error attribute-operation-range-not-flat\n\t\t\t */ throw new CKEditorError('attribute-operation-range-not-flat', this);\n        }\n        for (const item of this.range.getItems({\n            shallow: true\n        })){\n            if (this.oldValue !== null && !isEqual(item.getAttribute(this.key), this.oldValue)) {\n                /**\n\t\t\t\t * Changed node has different attribute value than operation's old attribute value.\n\t\t\t\t *\n\t\t\t\t * @error attribute-operation-wrong-old-value\n\t\t\t\t * @param item\n\t\t\t\t * @param key\n\t\t\t\t * @param value\n\t\t\t\t */ throw new CKEditorError('attribute-operation-wrong-old-value', this, {\n                    item,\n                    key: this.key,\n                    value: this.oldValue\n                });\n            }\n            if (this.oldValue === null && this.newValue !== null && item.hasAttribute(this.key)) {\n                /**\n\t\t\t\t * The attribute with given key already exists for the given node.\n\t\t\t\t *\n\t\t\t\t * @error attribute-operation-attribute-exists\n\t\t\t\t * @param node\n\t\t\t\t * @param key\n\t\t\t\t */ throw new CKEditorError('attribute-operation-attribute-exists', this, {\n                    node: item,\n                    key: this.key\n                });\n            }\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        // If value to set is same as old value, don't do anything.\n        if (!isEqual(this.oldValue, this.newValue)) {\n            // Execution.\n            _setAttribute(this.range, this.key, this.newValue);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'AttributeOperation';\n    }\n    /**\n\t * Creates `AttributeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        return new AttributeOperation(Range.fromJSON(json.range, document), json.key, json.oldValue, json.newValue, json.baseVersion);\n    }\n}\n\n/**\n * Operation which is doing nothing (\"empty operation\", \"do-nothing operation\", \"noop\"). This is an operation,\n * which when executed does not change the tree model. It still has some parameters defined for transformation purposes.\n *\n * In most cases this operation is a result of transforming operations. When transformation returns\n * {@link module:engine/model/operation/nooperation~NoOperation} it means that changes done by the transformed operation\n * have already been applied.\n */ class NoOperation extends Operation {\n    get type() {\n        return 'noop';\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return null;\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t */ clone() {\n        return new NoOperation(this.baseVersion);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        return new NoOperation(this.baseVersion + 1);\n    }\n    /** @internal */ _execute() {}\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'NoOperation';\n    }\n}\n\n/**\n * Operation to change element's name.\n *\n * Using this class you can change element's name.\n */ class RenameOperation extends Operation {\n    /**\n\t * Position before an element to change.\n\t */ position;\n    /**\n\t * Current name of the element.\n\t */ oldName;\n    /**\n\t * New name for the element.\n\t */ newName;\n    /**\n\t * Creates an operation that changes element's name.\n\t *\n\t * @param position Position before an element to change.\n\t * @param oldName Current name of the element.\n\t * @param newName New name for the element.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(position, oldName, newName, baseVersion){\n        super(baseVersion);\n        this.position = position;\n        // This position sticks to the next node because it is a position before the node that we want to change.\n        this.position.stickiness = 'toNext';\n        this.oldName = oldName;\n        this.newName = newName;\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        return 'rename';\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return this.position.nodeAfter;\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns Clone of this operation.\n\t */ clone() {\n        return new RenameOperation(this.position.clone(), this.oldName, this.newName, this.baseVersion);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        return new RenameOperation(this.position.clone(), this.newName, this.oldName, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        const element = this.position.nodeAfter;\n        if (!(element instanceof Element)) {\n            /**\n\t\t\t * Given position is invalid or node after it is not instance of Element.\n\t\t\t *\n\t\t\t * @error rename-operation-wrong-position\n\t\t\t */ throw new CKEditorError('rename-operation-wrong-position', this);\n        } else if (element.name !== this.oldName) {\n            /**\n\t\t\t * Element to change has different name than operation's old name.\n\t\t\t *\n\t\t\t * @error rename-operation-wrong-name\n\t\t\t */ throw new CKEditorError('rename-operation-wrong-name', this);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        const element = this.position.nodeAfter;\n        element.name = this.newName;\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.position = this.position.toJSON();\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'RenameOperation';\n    }\n    /**\n\t * Creates `RenameOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        return new RenameOperation(Position.fromJSON(json.position, document), json.oldName, json.newName, json.baseVersion);\n    }\n}\n\n/**\n * Operation to change root element's attribute. Using this class you can add, remove or change value of the attribute.\n *\n * This operation is needed, because root elements can't be changed through\n * {@link module:engine/model/operation/attributeoperation~AttributeOperation}.\n * It is because {@link module:engine/model/operation/attributeoperation~AttributeOperation}\n * requires a range to change and root element can't\n * be a part of range because every {@link module:engine/model/position~Position} has to be inside a root.\n * {@link module:engine/model/position~Position} can't be created before a root element.\n */ class RootAttributeOperation extends Operation {\n    /**\n\t * Root element to change.\n\t */ root;\n    /**\n\t * Key of an attribute to change or remove.\n\t */ key;\n    /**\n\t * Old value of the attribute with given key or `null`, if attribute was not set before.\n\t *\n\t * @readonly\n\t */ oldValue;\n    /**\n\t * New value of the attribute with given key or `null`, if operation should remove attribute.\n\t *\n\t * @readonly\n\t */ newValue;\n    /**\n\t * Creates an operation that changes, removes or adds attributes on root element.\n\t *\n\t * @see module:engine/model/operation/attributeoperation~AttributeOperation\n\t * @param root Root element to change.\n\t * @param key Key of an attribute to change or remove.\n\t * @param oldValue Old value of the attribute with given key or `null`, if attribute was not set before.\n\t * @param newValue New value of the attribute with given key or `null`, if operation should remove attribute.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation\n\t * can be applied or `null` if the operation operates on detached (non-document) tree.\n\t */ constructor(root, key, oldValue, newValue, baseVersion){\n        super(baseVersion);\n        this.root = root;\n        this.key = key;\n        this.oldValue = oldValue === undefined ? null : oldValue;\n        this.newValue = newValue === undefined ? null : newValue;\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        if (this.oldValue === null) {\n            return 'addRootAttribute';\n        } else if (this.newValue === null) {\n            return 'removeRootAttribute';\n        } else {\n            return 'changeRootAttribute';\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return this.root;\n    }\n    /**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns Clone of this operation.\n\t */ clone() {\n        return new RootAttributeOperation(this.root, this.key, this.oldValue, this.newValue, this.baseVersion);\n    }\n    /**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t */ getReversed() {\n        return new RootAttributeOperation(this.root, this.key, this.newValue, this.oldValue, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        if (this.root != this.root.root || this.root.is('documentFragment')) {\n            /**\n\t\t\t * The element to change is not a root element.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-not-a-root\n\t\t\t * @param root\n\t\t\t * @param key\n\t\t\t * @param value\n\t\t\t */ throw new CKEditorError('rootattribute-operation-not-a-root', this, {\n                root: this.root,\n                key: this.key\n            });\n        }\n        if (this.oldValue !== null && this.root.getAttribute(this.key) !== this.oldValue) {\n            /**\n\t\t\t * The attribute which should be removed does not exist for the given node.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-wrong-old-value\n\t\t\t * @param root\n\t\t\t * @param key\n\t\t\t * @param value\n\t\t\t */ throw new CKEditorError('rootattribute-operation-wrong-old-value', this, {\n                root: this.root,\n                key: this.key\n            });\n        }\n        if (this.oldValue === null && this.newValue !== null && this.root.hasAttribute(this.key)) {\n            /**\n\t\t\t * The attribute with given key already exists for the given node.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-attribute-exists\n\t\t\t * @param root\n\t\t\t * @param key\n\t\t\t */ throw new CKEditorError('rootattribute-operation-attribute-exists', this, {\n                root: this.root,\n                key: this.key\n            });\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        if (this.newValue !== null) {\n            this.root._setAttribute(this.key, this.newValue);\n        } else {\n            this.root._removeAttribute(this.key);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.root = this.root.toJSON();\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'RootAttributeOperation';\n    }\n    /**\n\t * Creates `RootAttributeOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        if (!document.getRoot(json.root)) {\n            /**\n\t\t\t * Cannot create RootAttributeOperation for document. Root with specified name does not exist.\n\t\t\t *\n\t\t\t * @error rootattribute-operation-fromjson-no-root\n\t\t\t * @param rootName\n\t\t\t */ throw new CKEditorError('rootattribute-operation-fromjson-no-root', this, {\n                rootName: json.root\n            });\n        }\n        return new RootAttributeOperation(document.getRoot(json.root), json.key, json.oldValue, json.newValue, json.baseVersion);\n    }\n}\n\n/**\n * Operation that creates (or attaches) or detaches a root element.\n */ class RootOperation extends Operation {\n    /**\n\t * Root name to create or detach.\n\t */ rootName;\n    /**\n\t * Root element name.\n\t */ elementName;\n    /**\n\t * Specifies whether the operation adds (`true`) or detaches the root (`false`).\n\t */ isAdd;\n    /**\n\t * Document which owns the root.\n\t */ _document;\n    /**\n\t * Creates an operation that creates or removes a root element.\n\t *\n\t * @param rootName Root name to create or detach.\n\t * @param elementName Root element name.\n\t * @param isAdd Specifies whether the operation adds (`true`) or detaches the root (`false`).\n\t * @param document Document which owns the root.\n\t * @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation can be applied.\n\t */ constructor(rootName, elementName, isAdd, document, baseVersion){\n        super(baseVersion);\n        this.rootName = rootName;\n        this.elementName = elementName;\n        this.isAdd = isAdd;\n        this._document = document;\n        // Make sure that the root exists ASAP, this is important for RTC.\n        // If the root was dynamically added, there will be more operations that operate on/in this root.\n        // These operations will require root element instance (in operation property or in position instance).\n        // If the root is not created ahead of time, instantiating such operations may fail.\n        if (!this._document.getRoot(this.rootName)) {\n            const root = this._document.createRoot(this.elementName, this.rootName);\n            root._isAttached = false;\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        return this.isAdd ? 'addRoot' : 'detachRoot';\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return this._document.getRoot(this.rootName);\n    }\n    /**\n\t * @inheritDoc\n\t */ clone() {\n        return new RootOperation(this.rootName, this.elementName, this.isAdd, this._document, this.baseVersion);\n    }\n    /**\n\t * @inheritDoc\n\t */ getReversed() {\n        return new RootOperation(this.rootName, this.elementName, !this.isAdd, this._document, this.baseVersion + 1);\n    }\n    /**\n\t * @inheritDoc\n\t */ _execute() {\n        this._document.getRoot(this.rootName)._isAttached = this.isAdd;\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        delete json._document;\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'RootOperation';\n    }\n    /**\n\t * Creates `RootOperation` object from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        return new RootOperation(json.rootName, json.elementName, json.isAdd, document, json.baseVersion);\n    }\n}\n\nconst operations = {};\noperations[AttributeOperation.className] = AttributeOperation;\noperations[InsertOperation.className] = InsertOperation;\noperations[MarkerOperation.className] = MarkerOperation;\noperations[MoveOperation.className] = MoveOperation;\noperations[NoOperation.className] = NoOperation;\noperations[Operation.className] = Operation;\noperations[RenameOperation.className] = RenameOperation;\noperations[RootAttributeOperation.className] = RootAttributeOperation;\noperations[RootOperation.className] = RootOperation;\noperations[SplitOperation.className] = SplitOperation;\noperations[MergeOperation.className] = MergeOperation;\n/**\n * A factory class for creating operations.\n */ class OperationFactory {\n    /**\n\t * Creates an operation instance from a JSON object (parsed JSON string).\n\t *\n\t * @param json Deserialized JSON object.\n\t * @param document Document on which this operation will be applied.\n\t */ static fromJSON(json, document) {\n        return operations[json.__className].fromJSON(json, document);\n    }\n}\n\nconst transformations = new Map();\n/**\n * Sets a transformation function to be be used to transform instances of class `OperationA` by instances of class `OperationB`.\n *\n * The `transformationFunction` is passed three parameters:\n *\n * * `a` - operation to be transformed, an instance of `OperationA`,\n * * `b` - operation to be transformed by, an instance of `OperationB`,\n * * {@link module:engine/model/operation/transform~TransformationContext `context`} - object with additional information about\n * transformation context.\n *\n * The `transformationFunction` should return transformation result, which is an array with one or multiple\n * {@link module:engine/model/operation/operation~Operation operation} instances.\n *\n * @param transformationFunction Function to use for transforming.\n */ function setTransformation(OperationA, OperationB, transformationFunction) {\n    let aGroup = transformations.get(OperationA);\n    if (!aGroup) {\n        aGroup = new Map();\n        transformations.set(OperationA, aGroup);\n    }\n    aGroup.set(OperationB, transformationFunction);\n}\n/**\n * Returns a previously set transformation function for transforming an instance of `OperationA` by an instance of `OperationB`.\n *\n * If no transformation was set for given pair of operations, {@link module:engine/model/operation/transform~noUpdateTransformation}\n * is returned. This means that if no transformation was set, the `OperationA` instance will not change when transformed\n * by the `OperationB` instance.\n *\n * @returns Function set to transform an instance of `OperationA` by an instance of `OperationB`.\n */ function getTransformation(OperationA, OperationB) {\n    const aGroup = transformations.get(OperationA);\n    if (aGroup && aGroup.has(OperationB)) {\n        return aGroup.get(OperationB);\n    }\n    return noUpdateTransformation;\n}\n/**\n * A transformation function that only clones operation to transform, without changing it.\n */ function noUpdateTransformation(a) {\n    return [\n        a\n    ];\n}\n/**\n * Transforms operation `a` by operation `b`.\n *\n * @param a Operation to be transformed.\n * @param b Operation to transform by.\n * @param context Transformation context for this transformation.\n * @returns Transformation result.\n */ function transform$1(a, b, context = {}) {\n    const transformationFunction = getTransformation(a.constructor, b.constructor);\n    /* eslint-disable no-useless-catch */ try {\n        a = a.clone();\n        return transformationFunction(a, b, context);\n    } catch (e) {\n        // @if CK_DEBUG // console.warn( 'Error during operation transformation!', e.message );\n        // @if CK_DEBUG // console.warn( 'Transformed operation', a );\n        // @if CK_DEBUG // console.warn( 'Operation transformed by', b );\n        // @if CK_DEBUG // console.warn( 'context.aIsStrong', context.aIsStrong );\n        // @if CK_DEBUG // console.warn( 'context.aWasUndone', context.aWasUndone );\n        // @if CK_DEBUG // console.warn( 'context.bWasUndone', context.bWasUndone );\n        // @if CK_DEBUG // console.warn( 'context.abRelation', context.abRelation );\n        // @if CK_DEBUG // console.warn( 'context.baRelation', context.baRelation );\n        throw e;\n    }\n/* eslint-enable no-useless-catch */ }\n/**\n * Performs a transformation of two sets of operations - `operationsA` and `operationsB`. The transformation is two-way -\n * both transformed `operationsA` and transformed `operationsB` are returned.\n *\n * Note, that the first operation in each set should base on the same document state (\n * {@link module:engine/model/document~Document#version document version}).\n *\n * It is assumed that `operationsA` are \"more important\" during conflict resolution between two operations.\n *\n * New copies of both passed arrays and operations inside them are returned. Passed arguments are not altered.\n *\n * Base versions of the transformed operations sets are updated accordingly. For example, assume that base versions are `4`\n * and there are `3` operations in `operationsA` and `5` operations in `operationsB`. Then:\n *\n * * transformed `operationsA` will start from base version `9` (`4` base version + `5` operations B),\n * * transformed `operationsB` will start from base version `7` (`4` base version + `3` operations A).\n *\n * If no operation was broken into two during transformation, then both sets will end up with an operation that bases on version `11`:\n *\n * * transformed `operationsA` start from `9` and there are `3` of them, so the last will have `baseVersion` equal to `11`,\n * * transformed `operationsB` start from `7` and there are `5` of them, so the last will have `baseVersion` equal to `11`.\n *\n * @param operationsA\n * @param operationsB\n * @param options Additional transformation options.\n * @param options.document Document which the operations change.\n * @param options.useRelations Whether during transformation relations should be used (used during undo for better conflict resolution).\n * @param options.padWithNoOps Whether additional {@link module:engine/model/operation/nooperation~NoOperation}s\n * should be added to the transformation results to force the same last base version for both transformed sets (in case\n * if some operations got broken into multiple operations during transformation).\n * @param options.forceWeakRemove If set to `false`, remove operation will be always stronger than move operation,\n * so the removed nodes won't end up back in the document root. When set to `true`, context data will be used.\n * @returns Transformation result.\n */ function transformSets(operationsA, operationsB, options) {\n    // Create new arrays so the originally passed arguments are not changed.\n    // No need to clone operations, they are cloned as they are transformed.\n    operationsA = operationsA.slice();\n    operationsB = operationsB.slice();\n    const contextFactory = new ContextFactory(options.document, options.useRelations, options.forceWeakRemove);\n    contextFactory.setOriginalOperations(operationsA);\n    contextFactory.setOriginalOperations(operationsB);\n    const originalOperations = contextFactory.originalOperations;\n    // If one of sets is empty there is simply nothing to transform, so return sets as they are.\n    if (operationsA.length == 0 || operationsB.length == 0) {\n        return {\n            operationsA,\n            operationsB,\n            originalOperations\n        };\n    }\n    //\n    // Following is a description of transformation process:\n    //\n    // There are `operationsA` and `operationsB` to be transformed, both by both.\n    //\n    // So, suppose we have sets of two operations each: `operationsA` = `[ a1, a2 ]`, `operationsB` = `[ b1, b2 ]`.\n    //\n    // Remember, that we can only transform operations that base on the same context. We assert that `a1` and `b1` base on\n    // the same context and we transform them. Then, we get `a1'` and `b1'`. `a2` bases on a context with `a1` -- `a2`\n    // is an operation that followed `a1`. Similarly, `b2` bases on a context with `b1`.\n    //\n    // However, since `a1'` is a result of transformation by `b1`, `a1'` now also has a context with `b1`. This means that\n    // we can safely transform `a1'` by `b2`. As we finish transforming `a1`, we also transformed all `operationsB`.\n    // All `operationsB` also have context including `a1`. Now, we can properly transform `a2` by those operations.\n    //\n    // The transformation process can be visualized on a transformation diagram (\"diamond diagram\"):\n    //\n    //          [the initial state]\n    //         [common for a1 and b1]\n    //\n    //                   *\n    //                  / \\\n    //                 /   \\\n    //               b1     a1\n    //               /       \\\n    //              /         \\\n    //             *           *\n    //            / \\         / \\\n    //           /   \\       /   \\\n    //         b2    a1'   b1'    a2\n    //         /       \\   /       \\\n    //        /         \\ /         \\\n    //       *           *           *\n    //        \\         / \\         /\n    //         \\       /   \\       /\n    //        a1''   b2'   a2'   b1''\n    //           \\   /       \\   /\n    //            \\ /         \\ /\n    //             *           *\n    //              \\         /\n    //               \\       /\n    //              a2''   b2''\n    //                 \\   /\n    //                  \\ /\n    //                   *\n    //\n    //           [the final state]\n    //\n    // The final state can be reached from the initial state by applying `a1`, `a2`, `b1''` and `b2''`, as well as by\n    // applying `b1`, `b2`, `a1''`, `a2''`. Note how the operations get to a proper common state before each pair is\n    // transformed.\n    //\n    // Another thing to consider is that an operation during transformation can be broken into multiple operations.\n    // Suppose that `a1` * `b1` = `[ a11', a12' ]` (instead of `a1'` that we considered previously).\n    //\n    // In that case, we leave `a12'` for later and we continue transforming `a11'` until it is transformed by all `operationsB`\n    // (in our case it is just `b2`). At this point, `b1` is transformed by \"whole\" `a1`, while `b2` is only transformed\n    // by `a11'`. Similarly, `a12'` is only transformed by `b1`. This leads to a conclusion that we need to start transforming `a12'`\n    // from the moment just after it was broken. So, `a12'` is transformed by `b2`. Now, \"the whole\" `a1` is transformed\n    // by `operationsB`, while all `operationsB` are transformed by \"the whole\" `a1`. This means that we can continue with\n    // following `operationsA` (in our case it is just `a2`).\n    //\n    // Of course, also `operationsB` can be broken. However, since we focus on transforming operation `a` to the end,\n    // the only thing to do is to store both pieces of operation `b`, so that the next transformed operation `a` will\n    // be transformed by both of them.\n    //\n    //                       *\n    //                      / \\\n    //                     /   \\\n    //                    /     \\\n    //                  b1       a1\n    //                  /         \\\n    //                 /           \\\n    //                /             \\\n    //               *               *\n    //              / \\             / \\\n    //             /  a11'         /   \\\n    //            /     \\         /     \\\n    //          b2       *      b1'      a2\n    //          /       / \\     /         \\\n    //         /       /  a12' /           \\\n    //        /       /     \\ /             \\\n    //       *       b2'     *               *\n    //        \\     /       / \\             /\n    //       a11'' /     b21'' \\           /\n    //          \\ /       /     \\         /\n    //           *       *      a2'     b1''\n    //            \\     / \\       \\     /\n    //          a12'' b22''\\       \\   /\n    //              \\ /     \\       \\ /\n    //               *      a2''     *\n    //                \\       \\     /\n    //                 \\       \\  b21'''\n    //                  \\       \\ /\n    //                a2'''      *\n    //                    \\     /\n    //                     \\  b22'''\n    //                      \\ /\n    //                       *\n    //\n    // Note, how `a1` is broken and transformed into `a11'` and `a12'`, while `b2'` got broken and transformed into `b21''` and `b22''`.\n    //\n    // Having all that on mind, here is an outline for the transformation process algorithm:\n    //\n    // 1. We have `operationsA` and `operationsB` array, which we dynamically update as the transformation process goes.\n    //\n    // 2. We take next (or first) operation from `operationsA` and check from which operation `b` we need to start transforming it.\n    // All original `operationsA` are set to be transformed starting from the first operation `b`.\n    //\n    // 3. We take operations from `operationsB`, one by one, starting from the correct one, and transform operation `a`\n    // by operation `b` (and vice versa). We update `operationsA` and `operationsB` by replacing the original operations\n    // with the transformation results.\n    //\n    // 4. If operation is broken into multiple operations, we save all the new operations in the place of the\n    // original operation.\n    //\n    // 5. Additionally, if operation `a` was broken, for the \"new\" operation, we remember from which operation `b` it should\n    // be transformed by.\n    //\n    // 6. We continue transforming \"current\" operation `a` until it is transformed by all `operationsB`. Then, go to 2.\n    // unless the last operation `a` was transformed.\n    //\n    // The actual implementation of the above algorithm is slightly different, as only one loop (while) is used.\n    // The difference is that we have \"current\" `a` operation to transform and we store the index of the next `b` operation\n    // to transform by. Each loop operates on two indexes then: index pointing to currently processed `a` operation and\n    // index pointing to next `b` operation. Each loop is just one `a * b` + `b * a` transformation. After each loop\n    // operation `b` index is updated. If all `b` operations were visited for the current `a` operation, we change\n    // current `a` operation index to the next one.\n    //\n    // For each operation `a`, keeps information what is the index in `operationsB` from which the transformation should start.\n    const nextTransformIndex = new WeakMap();\n    // For all the original `operationsA`, set that they should be transformed starting from the first of `operationsB`.\n    for (const op of operationsA){\n        nextTransformIndex.set(op, 0);\n    }\n    // Additional data that is used for some postprocessing after the main transformation process is done.\n    const data = {\n        nextBaseVersionA: operationsA[operationsA.length - 1].baseVersion + 1,\n        nextBaseVersionB: operationsB[operationsB.length - 1].baseVersion + 1,\n        originalOperationsACount: operationsA.length,\n        originalOperationsBCount: operationsB.length\n    };\n    // Index of currently transformed operation `a`.\n    let i = 0;\n    // While not all `operationsA` are transformed...\n    while(i < operationsA.length){\n        // Get \"current\" operation `a`.\n        const opA = operationsA[i];\n        // For the \"current\" operation `a`, get the index of the next operation `b` to transform by.\n        const indexB = nextTransformIndex.get(opA);\n        // If operation `a` was already transformed by every operation `b`, change \"current\" operation `a` to the next one.\n        if (indexB == operationsB.length) {\n            i++;\n            continue;\n        }\n        const opB = operationsB[indexB];\n        // Transform `a` by `b` and `b` by `a`.\n        const newOpsA = transform$1(opA, opB, contextFactory.getContext(opA, opB, true));\n        const newOpsB = transform$1(opB, opA, contextFactory.getContext(opB, opA, false));\n        // As a result we get one or more `newOpsA` and one or more `newOpsB` operations.\n        // Update contextual information about operations.\n        contextFactory.updateRelation(opA, opB);\n        contextFactory.setOriginalOperations(newOpsA, opA);\n        contextFactory.setOriginalOperations(newOpsB, opB);\n        // For new `a` operations, update their index of the next operation `b` to transform them by.\n        //\n        // This is needed even if there was only one result (`a` was not broken) because that information is used\n        // at the beginning of this loop every time.\n        for (const newOpA of newOpsA){\n            // Acknowledge, that operation `b` also might be broken into multiple operations.\n            //\n            // This is why we raise `indexB` not just by 1. If `newOpsB` are multiple operations, they will be\n            // spliced in the place of `opB`. So we need to change `transformBy` accordingly, so that an operation won't\n            // be transformed by the same operation (part of it) again.\n            nextTransformIndex.set(newOpA, indexB + newOpsB.length);\n        }\n        // Update `operationsA` and `operationsB` with the transformed versions.\n        operationsA.splice(i, 1, ...newOpsA);\n        operationsB.splice(indexB, 1, ...newOpsB);\n    }\n    if (options.padWithNoOps) {\n        // If no-operations padding is enabled, count how many extra `a` and `b` operations were generated.\n        const brokenOperationsACount = operationsA.length - data.originalOperationsACount;\n        const brokenOperationsBCount = operationsB.length - data.originalOperationsBCount;\n        // Then, if that number is not the same, pad `operationsA` or `operationsB` with correct number of no-ops so\n        // that the base versions are equalled.\n        //\n        // Note that only one array will be updated, as only one of those subtractions can be greater than zero.\n        padWithNoOps(operationsA, brokenOperationsBCount - brokenOperationsACount);\n        padWithNoOps(operationsB, brokenOperationsACount - brokenOperationsBCount);\n    }\n    // Finally, update base versions of transformed operations.\n    updateBaseVersions(operationsA, data.nextBaseVersionB);\n    updateBaseVersions(operationsB, data.nextBaseVersionA);\n    return {\n        operationsA,\n        operationsB,\n        originalOperations\n    };\n}\n/**\n * Gathers additional data about operations processed during transformation. Can be used to obtain contextual information\n * about two operations that are about to be transformed. This contextual information can be used for better conflict resolution.\n */ class ContextFactory {\n    originalOperations;\n    _history;\n    _useRelations;\n    _forceWeakRemove;\n    _relations;\n    /**\n\t * Creates `ContextFactory` instance.\n\t *\n\t * @param document Document which the operations change.\n\t * @param useRelations Whether during transformation relations should be used (used during undo for\n\t * better conflict resolution).\n\t * @param forceWeakRemove If set to `false`, remove operation will be always stronger than move operation,\n\t * so the removed nodes won't end up back in the document root. When set to `true`, context data will be used.\n\t */ constructor(document, useRelations, forceWeakRemove = false){\n        // For each operation that is created during transformation process, we keep a reference to the original operation\n        // which it comes from. The original operation works as a kind of \"identifier\". Every contextual information\n        // gathered during transformation that we want to save for given operation, is actually saved for the original operation.\n        // This way no matter if operation `a` is cloned, then transformed, even breaks, we still have access to the previously\n        // gathered data through original operation reference.\n        this.originalOperations = new Map();\n        // `model.History` instance which information about undone operations will be taken from.\n        this._history = document.history;\n        // Whether additional context should be used.\n        this._useRelations = useRelations;\n        this._forceWeakRemove = !!forceWeakRemove;\n        // Relations is a double-map structure (maps in map) where for two operations we store how those operations were related\n        // to each other. Those relations are evaluated during transformation process. For every transformated pair of operations\n        // we keep relations between them.\n        this._relations = new Map();\n    }\n    /**\n\t * Sets \"original operation\" for given operations.\n\t *\n\t * During transformation process, operations are cloned, then changed, then processed again, sometimes broken into two\n\t * or multiple operations. When gathering additional data it is important that all operations can be somehow linked\n\t * so a cloned and transformed \"version\" still kept track of the data assigned earlier to it.\n\t *\n\t * The original operation object will be used as such an universal linking id. Throughout the transformation process\n\t * all cloned operations will refer to \"the original operation\" when storing and reading additional data.\n\t *\n\t * If `takeFrom` is not set, each operation from `operations` array will be assigned itself as \"the original operation\".\n\t * This should be used as an initialization step.\n\t *\n\t * If `takeFrom` is set, each operation from `operations` will be assigned the same original operation as assigned\n\t * for `takeFrom` operation. This should be used to update original operations. It should be used in a way that\n\t * `operations` are the result of `takeFrom` transformation to ensure proper \"original operation propagation\".\n\t */ setOriginalOperations(operations, takeFrom = null) {\n        const originalOperation = takeFrom ? this.originalOperations.get(takeFrom) : null;\n        for (const operation of operations){\n            this.originalOperations.set(operation, originalOperation || operation);\n        }\n    }\n    /**\n\t * Saves a relation between operations `opA` and `opB`.\n\t *\n\t * Relations are then later used to help solve conflicts when operations are transformed.\n\t */ updateRelation(opA, opB) {\n        // The use of relations is described in a bigger detail in transformation functions.\n        //\n        // In brief, this function, for specified pairs of operation types, checks how positions defined in those operations relate.\n        // Then those relations are saved. For example, for two move operations, it is saved if one of those operations target\n        // position is before the other operation source position. This kind of information gives contextual information when\n        // transformation is used during undo. Similar checks are done for other pairs of operations.\n        //\n        if (opA instanceof MoveOperation) {\n            if (opB instanceof MergeOperation) {\n                if (opA.targetPosition.isEqual(opB.sourcePosition) || opB.movedRange.containsPosition(opA.targetPosition)) {\n                    this._setRelation(opA, opB, 'insertAtSource');\n                } else if (opA.targetPosition.isEqual(opB.deletionPosition)) {\n                    this._setRelation(opA, opB, 'insertBetween');\n                } else if (opA.targetPosition.isAfter(opB.sourcePosition)) {\n                    this._setRelation(opA, opB, 'moveTargetAfter');\n                }\n            } else if (opB instanceof MoveOperation) {\n                if (opA.targetPosition.isEqual(opB.sourcePosition) || opA.targetPosition.isBefore(opB.sourcePosition)) {\n                    this._setRelation(opA, opB, 'insertBefore');\n                } else {\n                    this._setRelation(opA, opB, 'insertAfter');\n                }\n            }\n        } else if (opA instanceof SplitOperation) {\n            if (opB instanceof MergeOperation) {\n                if (opA.splitPosition.isBefore(opB.sourcePosition)) {\n                    this._setRelation(opA, opB, 'splitBefore');\n                }\n            } else if (opB instanceof MoveOperation) {\n                if (opA.splitPosition.isEqual(opB.sourcePosition) || opA.splitPosition.isBefore(opB.sourcePosition)) {\n                    this._setRelation(opA, opB, 'splitBefore');\n                } else {\n                    const range = Range._createFromPositionAndShift(opB.sourcePosition, opB.howMany);\n                    if (opA.splitPosition.hasSameParentAs(opB.sourcePosition) && range.containsPosition(opA.splitPosition)) {\n                        const howMany = range.end.offset - opA.splitPosition.offset;\n                        const offset = opA.splitPosition.offset - range.start.offset;\n                        this._setRelation(opA, opB, {\n                            howMany,\n                            offset\n                        });\n                    }\n                }\n            }\n        } else if (opA instanceof MergeOperation) {\n            if (opB instanceof MergeOperation) {\n                if (!opA.targetPosition.isEqual(opB.sourcePosition)) {\n                    this._setRelation(opA, opB, 'mergeTargetNotMoved');\n                }\n                if (opA.sourcePosition.isEqual(opB.targetPosition)) {\n                    this._setRelation(opA, opB, 'mergeSourceNotMoved');\n                }\n                if (opA.sourcePosition.isEqual(opB.sourcePosition)) {\n                    this._setRelation(opA, opB, 'mergeSameElement');\n                }\n            } else if (opB instanceof SplitOperation) {\n                if (opA.sourcePosition.isEqual(opB.splitPosition)) {\n                    this._setRelation(opA, opB, 'splitAtSource');\n                }\n            } else if (opB instanceof MoveOperation && opB.howMany > 0) {\n                if (opA.sourcePosition.isEqual(opB.sourcePosition.getShiftedBy(opB.howMany))) {\n                    this._setRelation(opA, opB, 'mergeSourceAffected');\n                }\n                if (opA.targetPosition.isEqual(opB.sourcePosition)) {\n                    this._setRelation(opA, opB, 'mergeTargetWasBefore');\n                }\n            }\n        } else if (opA instanceof MarkerOperation) {\n            const markerRange = opA.newRange;\n            if (!markerRange) {\n                return;\n            }\n            if (opB instanceof MoveOperation) {\n                const movedRange = Range._createFromPositionAndShift(opB.sourcePosition, opB.howMany);\n                const affectedLeft = movedRange.containsPosition(markerRange.start) || movedRange.start.isEqual(markerRange.start);\n                const affectedRight = movedRange.containsPosition(markerRange.end) || movedRange.end.isEqual(markerRange.end);\n                if ((affectedLeft || affectedRight) && !movedRange.containsRange(markerRange)) {\n                    this._setRelation(opA, opB, {\n                        side: affectedLeft ? 'left' : 'right',\n                        path: affectedLeft ? markerRange.start.path.slice() : markerRange.end.path.slice()\n                    });\n                }\n            } else if (opB instanceof MergeOperation) {\n                const wasInLeftElement = markerRange.start.isEqual(opB.targetPosition);\n                const wasStartBeforeMergedElement = markerRange.start.isEqual(opB.deletionPosition);\n                const wasEndBeforeMergedElement = markerRange.end.isEqual(opB.deletionPosition);\n                const wasInRightElement = markerRange.end.isEqual(opB.sourcePosition);\n                if (wasInLeftElement || wasStartBeforeMergedElement || wasEndBeforeMergedElement || wasInRightElement) {\n                    this._setRelation(opA, opB, {\n                        wasInLeftElement,\n                        wasStartBeforeMergedElement,\n                        wasEndBeforeMergedElement,\n                        wasInRightElement\n                    });\n                }\n            }\n        }\n    }\n    /**\n\t * Evaluates and returns contextual information about two given operations `opA` and `opB` which are about to be transformed.\n\t */ getContext(opA, opB, aIsStrong) {\n        return {\n            aIsStrong,\n            aWasUndone: this._wasUndone(opA),\n            bWasUndone: this._wasUndone(opB),\n            abRelation: this._useRelations ? this._getRelation(opA, opB) : null,\n            baRelation: this._useRelations ? this._getRelation(opB, opA) : null,\n            forceWeakRemove: this._forceWeakRemove\n        };\n    }\n    /**\n\t * Returns whether given operation `op` has already been undone.\n\t *\n\t * Information whether an operation was undone gives more context when making a decision when two operations are in conflict.\n\t */ _wasUndone(op) {\n        // For `op`, get its original operation. After all, if `op` is a clone (or even transformed clone) of another\n        // operation, literally `op` couldn't be undone. It was just generated. If anything, it was the operation it origins\n        // from which was undone. So get that original operation.\n        const originalOp = this.originalOperations.get(op);\n        // And check with the document if the original operation was undone.\n        return originalOp.wasUndone || this._history.isUndoneOperation(originalOp);\n    }\n    /**\n\t * Returns a relation between `opA` and an operation which is undone by `opB`. This can be `String` value if a relation\n\t * was set earlier or `null` if there was no relation between those operations.\n\t *\n\t * This is a little tricky to understand, so let's compare it to `ContextFactory#_wasUndone`.\n\t *\n\t * When `wasUndone( opB )` is used, we check if the `opB` has already been undone. It is obvious, that the\n\t * undoing operation must happen after the undone operation. So, essentially, we have `opB`, we take document history,\n\t * we look forward in the future and ask if in that future `opB` was undone.\n\t *\n\t * Relations is a backward process to `wasUndone()`.\n\t *\n\t * Long story short - using relations is asking what happened in the past. Looking back. This time we have an undoing\n\t * operation `opB` which has undone some other operation. When there is a transformation `opA` x `opB` and there is\n\t * a conflict to solve and `opB` is an undoing operation, we can look back in the history and see what was a relation\n\t * between `opA` and the operation which `opB` undone. Basing on that relation from the past, we can now make\n\t * a better decision when resolving a conflict between two operations, because we know more about the context of\n\t * those two operations.\n\t *\n\t * This is why this function does not return a relation directly between `opA` and `opB` because we need to look\n\t * back to search for a meaningful contextual information.\n\t */ _getRelation(opA, opB) {\n        // Get the original operation. Similarly as in `wasUndone()` it is used as an universal identifier for stored data.\n        const origB = this.originalOperations.get(opB);\n        const undoneB = this._history.getUndoneOperation(origB);\n        // If `opB` is not undoing any operation, there is no relation.\n        if (!undoneB) {\n            return null;\n        }\n        const origA = this.originalOperations.get(opA);\n        const relationsA = this._relations.get(origA);\n        // Get all relations for `opA`, and check if there is a relation with `opB`-undone-counterpart. If so, return it.\n        if (relationsA) {\n            return relationsA.get(undoneB) || null;\n        }\n        return null;\n    }\n    /**\n\t * Helper function for `ContextFactory#updateRelations`.\n\t */ _setRelation(opA, opB, relation) {\n        // As always, setting is for original operations, not the clones/transformed operations.\n        const origA = this.originalOperations.get(opA);\n        const origB = this.originalOperations.get(opB);\n        let relationsA = this._relations.get(origA);\n        if (!relationsA) {\n            relationsA = new Map();\n            this._relations.set(origA, relationsA);\n        }\n        relationsA.set(origB, relation);\n    }\n}\n/**\n * An utility function that updates {@link module:engine/model/operation/operation~Operation#baseVersion base versions}\n * of passed operations.\n *\n * The function simply sets `baseVersion` as a base version of the first passed operation and then increments it for\n * each following operation in `operations`.\n *\n * @param operations Operations to update.\n * @param baseVersion Base version to set for the first operation in `operations`.\n */ function updateBaseVersions(operations, baseVersion) {\n    for (const operation of operations){\n        operation.baseVersion = baseVersion++;\n    }\n}\n/**\n * Adds `howMany` instances of {@link module:engine/model/operation/nooperation~NoOperation} to `operations` set.\n */ function padWithNoOps(operations, howMany) {\n    for(let i = 0; i < howMany; i++){\n        operations.push(new NoOperation(0));\n    }\n}\n// -----------------------\nsetTransformation(AttributeOperation, AttributeOperation, (a, b, context)=>{\n    // If operations in conflict, check if their ranges intersect and manage them properly.\n    //\n    // Operations can be in conflict only if:\n    //\n    // * their key is the same (they change the same attribute), and\n    // * they are in the same parent (operations for ranges [ 1 ] - [ 3 ] and [ 2, 0 ] - [ 2, 5 ] change different\n    // elements and can't be in conflict).\n    if (a.key === b.key && a.range.start.hasSameParentAs(b.range.start)) {\n        // First, we want to apply change to the part of a range that has not been changed by the other operation.\n        const operations = a.range.getDifference(b.range).map((range)=>{\n            return new AttributeOperation(range, a.key, a.oldValue, a.newValue, 0);\n        });\n        // Then we take care of the common part of ranges.\n        const common = a.range.getIntersection(b.range);\n        if (common) {\n            // If this operation is more important, we also want to apply change to the part of the\n            // original range that has already been changed by the other operation. Since that range\n            // got changed we also have to update `oldValue`.\n            if (context.aIsStrong) {\n                operations.push(new AttributeOperation(common, b.key, b.newValue, a.newValue, 0));\n            }\n        }\n        if (operations.length == 0) {\n            return [\n                new NoOperation(0)\n            ];\n        }\n        return operations;\n    } else {\n        // If operations don't conflict, simply return an array containing just a clone of this operation.\n        return [\n            a\n        ];\n    }\n});\nsetTransformation(AttributeOperation, InsertOperation, (a, b)=>{\n    // Case 1:\n    //\n    // The attribute operation range includes the position where nodes were inserted.\n    // There are two possible scenarios: the inserted nodes were text and they should receive attributes or\n    // the inserted nodes were elements and they should not receive attributes.\n    //\n    if (a.range.start.hasSameParentAs(b.position) && a.range.containsPosition(b.position)) {\n        // If new nodes should not receive attributes, two separated ranges will be returned.\n        // Otherwise, one expanded range will be returned.\n        const range = a.range._getTransformedByInsertion(b.position, b.howMany, !b.shouldReceiveAttributes);\n        const result = range.map((r)=>{\n            return new AttributeOperation(r, a.key, a.oldValue, a.newValue, a.baseVersion);\n        });\n        if (b.shouldReceiveAttributes) {\n            // `AttributeOperation#range` includes some newly inserted text.\n            // The operation should also change the attribute of that text. An example:\n            //\n            // Bold should be applied on the following range:\n            // <p>Fo[zb]ar</p>\n            //\n            // In meantime, new text is typed:\n            // <p>Fozxxbar</p>\n            //\n            // Bold should be applied also on the new text:\n            // <p>Fo[zxxb]ar</p>\n            // <p>Fo<$text bold=\"true\">zxxb</$text>ar</p>\n            //\n            // There is a special case to consider here to consider.\n            //\n            // Consider setting an attribute with multiple possible values, for example `highlight`. The inserted text might\n            // have already an attribute value applied and the `oldValue` property of the attribute operation might be wrong:\n            //\n            // Attribute `highlight=\"yellow\"` should be applied on the following range:\n            // <p>Fo[zb]ar<p>\n            //\n            // In meantime, character `x` with `highlight=\"red\"` is typed:\n            // <p>Fo[z<$text highlight=\"red\">x</$text>b]ar</p>\n            //\n            // In this case we cannot simply apply operation changing the attribute value from `null` to `\"yellow\"` for the whole range\n            // because that would lead to an exception (`oldValue` is incorrect for `x`).\n            //\n            // We also cannot break the original range as this would mess up a scenario when there are multiple following\n            // insert operations, because then only the first inserted character is included in those ranges:\n            // <p>Fo[z][x][b]ar</p>   -->   <p>Fo[z][x]x[b]ar</p>   -->   <p>Fo[z][x]xx[b]ar</p>\n            //\n            // So, the attribute range needs be expanded, no matter what attributes are set on the inserted nodes:\n            //\n            // <p>Fo[z<$text highlight=\"red\">x</$text>b]ar</p>      <--- Change from `null` to `yellow`, throwing an exception.\n            //\n            // But before that operation would be applied, we will add an additional attribute operation that will change\n            // attributes on the inserted nodes in a way which would make the original operation correct:\n            //\n            // <p>Fo[z{<$text highlight=\"red\">}x</$text>b]ar</p>    <--- Change range `{}` from `red` to `null`.\n            // <p>Fo[zxb]ar</p>                                     <--- Now change from `null` to `yellow` is completely fine.\n            //\n            // Generate complementary attribute operation. Be sure to add it before the original operation.\n            const op = _getComplementaryAttributeOperations(b, a.key, a.oldValue);\n            if (op) {\n                result.unshift(op);\n            }\n        }\n        // If nodes should not receive new attribute, we are done here.\n        return result;\n    }\n    // If insert operation is not expanding the attribute operation range, simply transform the range.\n    a.range = a.range._getTransformedByInsertion(b.position, b.howMany, false)[0];\n    return [\n        a\n    ];\n});\n/**\n * Helper function for `AttributeOperation` x `InsertOperation` (and reverse) transformation.\n *\n * For given `insertOperation` it checks the inserted node if it has an attribute `key` set to a value different\n * than `newValue`. If so, it generates an `AttributeOperation` which changes the value of `key` attribute to `newValue`.\n */ function _getComplementaryAttributeOperations(insertOperation, key, newValue) {\n    const nodes = insertOperation.nodes;\n    // At the beginning we store the attribute value from the first node.\n    const insertValue = nodes.getNode(0).getAttribute(key);\n    if (insertValue == newValue) {\n        return null;\n    }\n    const range = new Range(insertOperation.position, insertOperation.position.getShiftedBy(insertOperation.howMany));\n    return new AttributeOperation(range, key, insertValue, newValue, 0);\n}\nsetTransformation(AttributeOperation, MergeOperation, (a, b)=>{\n    const ranges = [];\n    // Case 1:\n    //\n    // Attribute change on the merged element. In this case, the merged element was moved to the graveyard.\n    // An additional attribute operation that will change the (re)moved element needs to be generated.\n    //\n    if (a.range.start.hasSameParentAs(b.deletionPosition)) {\n        if (a.range.containsPosition(b.deletionPosition) || a.range.start.isEqual(b.deletionPosition)) {\n            ranges.push(Range._createFromPositionAndShift(b.graveyardPosition, 1));\n        }\n    }\n    const range = a.range._getTransformedByMergeOperation(b);\n    // Do not add empty (collapsed) ranges to the result. `range` may be collapsed if it contained only the merged element.\n    if (!range.isCollapsed) {\n        ranges.push(range);\n    }\n    // Create `AttributeOperation`s out of the ranges.\n    return ranges.map((range)=>{\n        return new AttributeOperation(range, a.key, a.oldValue, a.newValue, a.baseVersion);\n    });\n});\nsetTransformation(AttributeOperation, MoveOperation, (a, b)=>{\n    const ranges = _breakRangeByMoveOperation(a.range, b);\n    // Create `AttributeOperation`s out of the ranges.\n    return ranges.map((range)=>new AttributeOperation(range, a.key, a.oldValue, a.newValue, a.baseVersion));\n});\n/**\n * Helper function for `AttributeOperation` x `MoveOperation` transformation.\n *\n * Takes the passed `range` and transforms it by move operation `moveOp` in a specific way. Only top-level nodes of `range`\n * are considered to be in the range. If move operation moves nodes deep from inside of the range, those nodes won't\n * be included in the result. In other words, top-level nodes of the ranges from the result are exactly the same as\n * top-level nodes of the original `range`.\n *\n * This is important for `AttributeOperation` because, for its range, it changes only the top-level nodes. So we need to\n * track only how those nodes have been affected by `MoveOperation`.\n */ function _breakRangeByMoveOperation(range, moveOp) {\n    const moveRange = Range._createFromPositionAndShift(moveOp.sourcePosition, moveOp.howMany);\n    // We are transforming `range` (original range) by `moveRange` (range moved by move operation). As usual when it comes to\n    // transforming a ranges, we may have a common part of the ranges and we may have a difference part (zero to two ranges).\n    let common = null;\n    let difference = [];\n    // Let's compare the ranges.\n    if (moveRange.containsRange(range, true)) {\n        // If the whole original range is moved, treat it whole as a common part. There's also no difference part.\n        common = range;\n    } else if (range.start.hasSameParentAs(moveRange.start)) {\n        // If the ranges are \"on the same level\" (in the same parent) then move operation may move exactly those nodes\n        // that are changed by the attribute operation. In this case we get common part and difference part in the usual way.\n        difference = range.getDifference(moveRange);\n        common = range.getIntersection(moveRange);\n    } else {\n        // In any other situation we assume that original range is different than move range, that is that move operation\n        // moves other nodes that attribute operation change. Even if the moved range is deep inside in the original range.\n        //\n        // Note that this is different than in `.getIntersection` (we would get a common part in that case) and different\n        // than `.getDifference` (we would get two ranges).\n        difference = [\n            range\n        ];\n    }\n    const result = [];\n    // The default behaviour of `_getTransformedByMove` might get wrong results for difference part, though, so\n    // we do it by hand.\n    for (let diff of difference){\n        // First, transform the range by removing moved nodes. Since this is a difference, this is safe, `null` won't be returned\n        // as the range is different than the moved range.\n        diff = diff._getTransformedByDeletion(moveOp.sourcePosition, moveOp.howMany);\n        // Transform also `targetPosition`.\n        const targetPosition = moveOp.getMovedRangeStart();\n        // Spread the range only if moved nodes are inserted only between the top-level nodes of the `diff` range.\n        const spread = diff.start.hasSameParentAs(targetPosition);\n        // Transform by insertion of moved nodes.\n        const diffs = diff._getTransformedByInsertion(targetPosition, moveOp.howMany, spread);\n        result.push(...diffs);\n    }\n    // Common part can be simply transformed by the move operation. This is because move operation will not target to\n    // that common part (the operation would have to target inside its own moved range).\n    if (common) {\n        result.push(common._getTransformedByMove(moveOp.sourcePosition, moveOp.targetPosition, moveOp.howMany, false)[0]);\n    }\n    return result;\n}\nsetTransformation(AttributeOperation, SplitOperation, (a, b)=>{\n    // Case 1:\n    //\n    // Split node is the last node in `AttributeOperation#range`.\n    // `AttributeOperation#range` needs to be expanded to include the new (split) node.\n    //\n    // Attribute `type` to be changed to `numbered` but the `listItem` is split.\n    // <listItem type=\"bulleted\">foobar</listItem>\n    //\n    // After split:\n    // <listItem type=\"bulleted\">foo</listItem><listItem type=\"bulleted\">bar</listItem>\n    //\n    // After attribute change:\n    // <listItem type=\"numbered\">foo</listItem><listItem type=\"numbered\">foo</listItem>\n    //\n    if (a.range.end.isEqual(b.insertionPosition)) {\n        if (!b.graveyardPosition) {\n            a.range.end.offset++;\n        }\n        return [\n            a\n        ];\n    }\n    // Case 2:\n    //\n    // Split position is inside `AttributeOperation#range`, at the same level, so the nodes to change are\n    // not going to make a flat range.\n    //\n    // Content with range-to-change and split position:\n    // <p>Fo[zb^a]r</p>\n    //\n    // After split:\n    // <p>Fozb</p><p>ar</p>\n    //\n    // Make two separate ranges containing all nodes to change:\n    // <p>Fo[zb]</p><p>[a]r</p>\n    //\n    if (a.range.start.hasSameParentAs(b.splitPosition) && a.range.containsPosition(b.splitPosition)) {\n        const secondPart = a.clone();\n        secondPart.range = new Range(b.moveTargetPosition.clone(), a.range.end._getCombined(b.splitPosition, b.moveTargetPosition));\n        a.range.end = b.splitPosition.clone();\n        a.range.end.stickiness = 'toPrevious';\n        return [\n            a,\n            secondPart\n        ];\n    }\n    // The default case.\n    //\n    a.range = a.range._getTransformedBySplitOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(InsertOperation, AttributeOperation, (a, b)=>{\n    const result = [\n        a\n    ];\n    // Case 1:\n    //\n    // The attribute operation range includes the position where nodes were inserted.\n    // There are two possible scenarios: the inserted nodes were text and they should receive attributes or\n    // the inserted nodes were elements and they should not receive attributes.\n    //\n    // This is a mirror scenario to the one described in `AttributeOperation` x `InsertOperation` transformation,\n    // although this case is a little less complicated. In this case we simply need to change attributes of the\n    // inserted nodes and that's it.\n    //\n    if (a.shouldReceiveAttributes && a.position.hasSameParentAs(b.range.start) && b.range.containsPosition(a.position)) {\n        const op = _getComplementaryAttributeOperations(a, b.key, b.newValue);\n        if (op) {\n            result.push(op);\n        }\n    }\n    // The default case is: do nothing.\n    // `AttributeOperation` does not change the model tree structure so `InsertOperation` does not need to be changed.\n    //\n    return result;\n});\nsetTransformation(InsertOperation, InsertOperation, (a, b, context)=>{\n    // Case 1:\n    //\n    // Two insert operations insert nodes at the same position. Since they are the same, it needs to be decided\n    // what will be the order of inserted nodes. However, there is no additional information to help in that\n    // decision. Also, when `b` will be transformed by `a`, the same order must be maintained.\n    //\n    // To achieve that, we will check if the operation is strong.\n    // If it is, it won't get transformed. If it is not, it will be moved.\n    //\n    if (a.position.isEqual(b.position) && context.aIsStrong) {\n        return [\n            a\n        ];\n    }\n    // The default case.\n    //\n    a.position = a.position._getTransformedByInsertOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(InsertOperation, MoveOperation, (a, b)=>{\n    // The default case.\n    //\n    a.position = a.position._getTransformedByMoveOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(InsertOperation, SplitOperation, (a, b)=>{\n    // The default case.\n    //\n    a.position = a.position._getTransformedBySplitOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(InsertOperation, MergeOperation, (a, b)=>{\n    a.position = a.position._getTransformedByMergeOperation(b);\n    return [\n        a\n    ];\n});\n// -----------------------\nsetTransformation(MarkerOperation, InsertOperation, (a, b)=>{\n    if (a.oldRange) {\n        a.oldRange = a.oldRange._getTransformedByInsertOperation(b)[0];\n    }\n    if (a.newRange) {\n        a.newRange = a.newRange._getTransformedByInsertOperation(b)[0];\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(MarkerOperation, MarkerOperation, (a, b, context)=>{\n    if (a.name == b.name) {\n        if (context.aIsStrong) {\n            a.oldRange = b.newRange ? b.newRange.clone() : null;\n        } else {\n            return [\n                new NoOperation(0)\n            ];\n        }\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(MarkerOperation, MergeOperation, (a, b)=>{\n    if (a.oldRange) {\n        a.oldRange = a.oldRange._getTransformedByMergeOperation(b);\n    }\n    if (a.newRange) {\n        a.newRange = a.newRange._getTransformedByMergeOperation(b);\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(MarkerOperation, MoveOperation, (a, b, context)=>{\n    if (a.oldRange) {\n        a.oldRange = Range._createFromRanges(a.oldRange._getTransformedByMoveOperation(b));\n    }\n    if (a.newRange) {\n        if (context.abRelation) {\n            const aNewRange = Range._createFromRanges(a.newRange._getTransformedByMoveOperation(b));\n            if (context.abRelation.side == 'left' && b.targetPosition.isEqual(a.newRange.start)) {\n                a.newRange.end = aNewRange.end;\n                a.newRange.start.path = context.abRelation.path;\n                return [\n                    a\n                ];\n            } else if (context.abRelation.side == 'right' && b.targetPosition.isEqual(a.newRange.end)) {\n                a.newRange.start = aNewRange.start;\n                a.newRange.end.path = context.abRelation.path;\n                return [\n                    a\n                ];\n            }\n        }\n        a.newRange = Range._createFromRanges(a.newRange._getTransformedByMoveOperation(b));\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(MarkerOperation, SplitOperation, (a, b, context)=>{\n    if (a.oldRange) {\n        a.oldRange = a.oldRange._getTransformedBySplitOperation(b);\n    }\n    if (a.newRange) {\n        if (context.abRelation) {\n            const aNewRange = a.newRange._getTransformedBySplitOperation(b);\n            if (a.newRange.start.isEqual(b.splitPosition) && context.abRelation.wasStartBeforeMergedElement) {\n                a.newRange.start = Position._createAt(b.insertionPosition);\n            } else if (a.newRange.start.isEqual(b.splitPosition) && !context.abRelation.wasInLeftElement) {\n                a.newRange.start = Position._createAt(b.moveTargetPosition);\n            }\n            if (a.newRange.end.isEqual(b.splitPosition) && context.abRelation.wasInRightElement) {\n                a.newRange.end = Position._createAt(b.moveTargetPosition);\n            } else if (a.newRange.end.isEqual(b.splitPosition) && context.abRelation.wasEndBeforeMergedElement) {\n                a.newRange.end = Position._createAt(b.insertionPosition);\n            } else {\n                a.newRange.end = aNewRange.end;\n            }\n            return [\n                a\n            ];\n        }\n        a.newRange = a.newRange._getTransformedBySplitOperation(b);\n    }\n    return [\n        a\n    ];\n});\n// -----------------------\nsetTransformation(MergeOperation, InsertOperation, (a, b)=>{\n    if (a.sourcePosition.hasSameParentAs(b.position)) {\n        a.howMany += b.howMany;\n    }\n    a.sourcePosition = a.sourcePosition._getTransformedByInsertOperation(b);\n    a.targetPosition = a.targetPosition._getTransformedByInsertOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(MergeOperation, MergeOperation, (a, b, context)=>{\n    // Case 1:\n    //\n    // Same merge operations.\n    //\n    // Both operations have same source and target positions. So the element already got merged and there is\n    // theoretically nothing to do.\n    //\n    if (a.sourcePosition.isEqual(b.sourcePosition) && a.targetPosition.isEqual(b.targetPosition)) {\n        // There are two ways that we can provide a do-nothing operation.\n        //\n        // First is simply a NoOperation instance. We will use it if `b` operation was not undone.\n        //\n        // Second is a merge operation that has the source operation in the merged element - in the graveyard -\n        // same target position and `howMany` equal to `0`. So it is basically merging an empty element from graveyard\n        // which is almost the same as NoOperation.\n        //\n        // This way the merge operation can be later transformed by split operation\n        // to provide correct undo. This will be used if `b` operation was undone (only then it is correct).\n        //\n        if (!context.bWasUndone) {\n            return [\n                new NoOperation(0)\n            ];\n        } else {\n            const path = b.graveyardPosition.path.slice();\n            path.push(0);\n            a.sourcePosition = new Position(b.graveyardPosition.root, path);\n            a.howMany = 0;\n            return [\n                a\n            ];\n        }\n    }\n    // Case 2:\n    //\n    // Same merge source position but different target position.\n    //\n    // This can happen during collaboration. For example, if one client merged a paragraph to the previous paragraph\n    // and the other person removed that paragraph and merged the same paragraph to something before:\n    //\n    // Client A:\n    // <p>Foo</p><p>Bar</p><p>[]Xyz</p>\n    // <p>Foo</p><p>BarXyz</p>\n    //\n    // Client B:\n    // <p>Foo</p>[<p>Bar</p>]<p>Xyz</p>\n    // <p>Foo</p><p>[]Xyz</p>\n    // <p>FooXyz</p>\n    //\n    // In this case we need to decide where finally \"Xyz\" will land:\n    //\n    // <p>FooXyz</p>               graveyard: <p>Bar</p>\n    // <p>Foo</p>                  graveyard: <p>BarXyz</p>\n    //\n    // Let's move it in a way so that a merge operation that does not target to graveyard is more important so that\n    // nodes does not end up in the graveyard. It makes sense. Both for Client A and for Client B \"Xyz\" finally did not\n    // end up in the graveyard (see above).\n    //\n    // If neither or both operations point to graveyard, then let `aIsStrong` decide.\n    //\n    if (a.sourcePosition.isEqual(b.sourcePosition) && !a.targetPosition.isEqual(b.targetPosition) && !context.bWasUndone && context.abRelation != 'splitAtSource') {\n        const aToGraveyard = a.targetPosition.root.rootName == '$graveyard';\n        const bToGraveyard = b.targetPosition.root.rootName == '$graveyard';\n        // If `aIsWeak` it means that `a` points to graveyard while `b` doesn't. Don't move nodes then.\n        const aIsWeak = aToGraveyard && !bToGraveyard;\n        // If `bIsWeak` it means that `b` points to graveyard while `a` doesn't. Force moving nodes then.\n        const bIsWeak = bToGraveyard && !aToGraveyard;\n        // Force move if `b` is weak or neither operation is weak but `a` is stronger through `context.aIsStrong`.\n        const forceMove = bIsWeak || !aIsWeak && context.aIsStrong;\n        if (forceMove) {\n            const sourcePosition = b.targetPosition._getTransformedByMergeOperation(b);\n            const targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n            return [\n                new MoveOperation(sourcePosition, a.howMany, targetPosition, 0)\n            ];\n        } else {\n            return [\n                new NoOperation(0)\n            ];\n        }\n    }\n    // The default case.\n    //\n    if (a.sourcePosition.hasSameParentAs(b.targetPosition)) {\n        a.howMany += b.howMany;\n    }\n    a.sourcePosition = a.sourcePosition._getTransformedByMergeOperation(b);\n    a.targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n    // Handle positions in graveyard.\n    // If graveyard positions are same and `a` operation is strong - do not transform.\n    if (!a.graveyardPosition.isEqual(b.graveyardPosition) || !context.aIsStrong) {\n        a.graveyardPosition = a.graveyardPosition._getTransformedByMergeOperation(b);\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(MergeOperation, MoveOperation, (a, b, context)=>{\n    // Case 1:\n    //\n    // The element to merge got removed.\n    //\n    // Merge operation does support merging elements which are not siblings. So it would not be a problem\n    // from technical point of view. However, if the element was removed, the intention of the user deleting it\n    // was to have it all deleted, together with its children. From user experience point of view, moving back the\n    // removed nodes might be unexpected. This means that in this scenario we will block the merging.\n    //\n    // The exception of this rule would be if the remove operation was later undone.\n    //\n    const removedRange = Range._createFromPositionAndShift(b.sourcePosition, b.howMany);\n    if (b.type == 'remove' && !context.bWasUndone && !context.forceWeakRemove) {\n        if (a.deletionPosition.hasSameParentAs(b.sourcePosition) && removedRange.containsPosition(a.sourcePosition)) {\n            return [\n                new NoOperation(0)\n            ];\n        }\n    }\n    // In most cases we want `sourcePosition` to stick to previous and `targetPosition` to stick to next.\n    // Usually, `sourcePosition` is at the beginning of the merged element and `targetPosition` is at the end of the merge-target element.\n    //\n    // However, `sourcePosition` and `targetPosition` may end up in the middle of an element due to some OT magic that happens during undo.\n    // It is expected and used in `MergeOperation` x `SplitOperation` transformation.\n    //\n    // But when these positions are in the middle, it messes up the regular `MergeOperation` x `MoveOperation` transformation because\n    // these positions may \"follow\" some moved elements. And we want them stick in the original elements.\n    //\n    // This is why we add two extra cases: (1) and (2).\n    //\n    // But after this `MergeOperation` is transformed by \"this\" move (which is undone), we also need to define extra cases for\n    // the operation undoing previous move. These are (3) and (4).\n    //\n    // (1). Note that this case is also added to `updateRelations()` and sets `mergeSourceAffected` relation.\n    //\n    // [] is move operation, } is merge source position (sticks to previous by default):\n    // <p>A[b]}c</p>  ->  <p>A}c</p>\n    //\n    if (b.sourcePosition.getShiftedBy(b.howMany).isEqual(a.sourcePosition)) {\n        a.sourcePosition.stickiness = 'toNone';\n    } else if (b.targetPosition.isEqual(a.sourcePosition) && context.abRelation == 'mergeSourceAffected') {\n        a.sourcePosition.stickiness = 'toNext';\n    } else if (b.sourcePosition.isEqual(a.targetPosition)) {\n        a.targetPosition.stickiness = 'toNone';\n        a.howMany -= b.howMany;\n    } else if (b.targetPosition.isEqual(a.targetPosition) && context.abRelation == 'mergeTargetWasBefore') {\n        a.targetPosition.stickiness = 'toPrevious';\n        a.howMany += b.howMany;\n    } else {\n        if (a.sourcePosition.hasSameParentAs(b.targetPosition)) {\n            a.howMany += b.howMany;\n        }\n        if (a.sourcePosition.hasSameParentAs(b.sourcePosition)) {\n            a.howMany -= b.howMany;\n        }\n    }\n    a.sourcePosition = a.sourcePosition._getTransformedByMoveOperation(b);\n    a.targetPosition = a.targetPosition._getTransformedByMoveOperation(b);\n    // After transformations are done, make sure to revert stickiness in case if (1) - (4) scenario happened.\n    a.sourcePosition.stickiness = 'toPrevious';\n    a.targetPosition.stickiness = 'toNext';\n    // `MergeOperation` graveyard position is like `MoveOperation` target position. It is a position where element(s) will\n    // be moved. Like in other similar cases, we need to consider the scenario when those positions are same.\n    // Here, we will treat `MergeOperation` like it is always strong (see `InsertOperation` x `InsertOperation` for comparison).\n    // This means that we won't transform graveyard position if it is equal to move operation target position.\n    if (!a.graveyardPosition.isEqual(b.targetPosition)) {\n        a.graveyardPosition = a.graveyardPosition._getTransformedByMoveOperation(b);\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(MergeOperation, SplitOperation, (a, b, context)=>{\n    if (b.graveyardPosition) {\n        // If `b` operation defines graveyard position, a node from graveyard will be moved. This means that we need to\n        // transform `a.graveyardPosition` accordingly.\n        a.graveyardPosition = a.graveyardPosition._getTransformedByDeletion(b.graveyardPosition, 1);\n        // This is a scenario foreseen in `MergeOperation` x `MergeOperation`, with two identical merge operations.\n        //\n        // So, there was `MergeOperation` x `MergeOperation` transformation earlier. Now, `a` is a merge operation which\n        // source position is in graveyard. Interestingly, split operation wants to use the node to be merged by `a`. This\n        // means that `b` is undoing that merge operation from earlier, which caused `a` to be in graveyard.\n        //\n        // If that's the case, at this point, we will only \"fix\" `a.howMany`. It was earlier set to `0` in\n        // `MergeOperation` x `MergeOperation` transformation. Later transformations in this function will change other\n        // properties.\n        //\n        if (a.deletionPosition.isEqual(b.graveyardPosition)) {\n            a.howMany = b.howMany;\n        }\n    }\n    // Case 1:\n    //\n    // Merge operation moves nodes to the place where split happens.\n    // This is a classic situation when there are two paragraphs, and there is a split (enter) after the first\n    // paragraph and there is a merge (delete) at the beginning of the second paragraph:\n    //\n    // <p>Foo{}</p><p>[]Bar</p>.\n    //\n    // Split is after `Foo`, while merge is from `Bar` to the end of `Foo`.\n    //\n    // State after split:\n    // <p>Foo</p><p></p><p>Bar</p>\n    //\n    // Now, `Bar` should be merged to the new paragraph:\n    // <p>Foo</p><p>Bar</p>\n    //\n    // Instead of merging it to the original paragraph:\n    // <p>FooBar</p><p></p>\n    //\n    // This means that `targetPosition` needs to be transformed. This is the default case though.\n    // For example, if the split would be after `F`, `targetPosition` should also be transformed.\n    //\n    // There are three exceptions, though, when we want to keep `targetPosition` as it was.\n    //\n    // First exception is when the merge target position is inside an element (not at the end, as usual). This\n    // happens when the merge operation earlier was transformed by \"the same\" merge operation. If merge operation\n    // targets inside the element we want to keep the original target position (and not transform it) because\n    // we have additional context telling us that we want to merge to the original element. We can check if the\n    // merge operation points inside element by checking what is `SplitOperation#howMany`. Since merge target position\n    // is same as split position, if `howMany` is non-zero, it means that the merge target position is inside an element.\n    //\n    // Second exception is when the element to merge is in the graveyard and split operation uses it. In that case\n    // if target position would be transformed, the merge operation would target at the source position:\n    //\n    // root: <p>Foo</p>\t\t\t\tgraveyard: <p></p>\n    //\n    // SplitOperation: root [ 0, 3 ] using graveyard [ 0 ] (howMany = 0)\n    // MergeOperation: graveyard [ 0, 0 ] -> root [ 0, 3 ] (howMany = 0)\n    //\n    // Since split operation moves the graveyard node back to the root, the merge operation source position changes.\n    // We would like to merge from the empty <p> to the \"Foo\" <p>:\n    //\n    // root: <p>Foo</p><p></p>\t\t\tgraveyard:\n    //\n    // MergeOperation#sourcePosition = root [ 1, 0 ]\n    //\n    // If `targetPosition` is transformed, it would become root [ 1, 0 ] as well. It has to be kept as it was.\n    //\n    // Third exception is connected with relations. If this happens during undo and we have explicit information\n    // that target position has not been affected by the operation which is undone by this split then this split should\n    // not move the target position either.\n    //\n    if (a.targetPosition.isEqual(b.splitPosition)) {\n        const mergeInside = b.howMany != 0;\n        const mergeSplittingElement = b.graveyardPosition && a.deletionPosition.isEqual(b.graveyardPosition);\n        if (mergeInside || mergeSplittingElement || context.abRelation == 'mergeTargetNotMoved') {\n            a.sourcePosition = a.sourcePosition._getTransformedBySplitOperation(b);\n            return [\n                a\n            ];\n        }\n    }\n    // Case 2:\n    //\n    // Merge source is at the same position as split position. This sometimes happen, mostly during undo.\n    // The decision here is mostly to choose whether merge source position should stay where it is (so it will be at the end of the\n    // split element) or should be move to the beginning of the new element.\n    //\n    if (a.sourcePosition.isEqual(b.splitPosition)) {\n        // Use context to check if `SplitOperation` is not undoing a merge operation, that didn't change the `a` operation.\n        // This scenario happens the undone merge operation moved nodes at the source position of `a` operation.\n        // In that case `a` operation source position should stay where it is.\n        if (context.abRelation == 'mergeSourceNotMoved') {\n            a.howMany = 0;\n            a.targetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n            return [\n                a\n            ];\n        }\n        // This merge operation might have been earlier transformed by a merge operation which both merged the same element.\n        // See that case in `MergeOperation` x `MergeOperation` transformation. In that scenario, if the merge operation has been undone,\n        // the special case is not applied.\n        //\n        // Now, the merge operation is transformed by the split which has undone that previous merge operation.\n        // So now we are fixing situation which was skipped in `MergeOperation` x `MergeOperation` case.\n        //\n        if (context.abRelation == 'mergeSameElement' || a.sourcePosition.offset > 0) {\n            a.sourcePosition = b.moveTargetPosition.clone();\n            a.targetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n            return [\n                a\n            ];\n        }\n    }\n    // The default case.\n    //\n    if (a.sourcePosition.hasSameParentAs(b.splitPosition)) {\n        a.howMany = b.splitPosition.offset;\n    }\n    a.sourcePosition = a.sourcePosition._getTransformedBySplitOperation(b);\n    a.targetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n    return [\n        a\n    ];\n});\n// -----------------------\nsetTransformation(MoveOperation, InsertOperation, (a, b)=>{\n    const moveRange = Range._createFromPositionAndShift(a.sourcePosition, a.howMany);\n    const transformed = moveRange._getTransformedByInsertOperation(b, false)[0];\n    a.sourcePosition = transformed.start;\n    a.howMany = transformed.end.offset - transformed.start.offset;\n    // See `InsertOperation` x `MoveOperation` transformation for details on this case.\n    //\n    // In summary, both operations point to the same place, so the order of nodes needs to be decided.\n    // `MoveOperation` is considered weaker, so it is always transformed, unless there was a certain relation\n    // between operations.\n    //\n    if (!a.targetPosition.isEqual(b.position)) {\n        a.targetPosition = a.targetPosition._getTransformedByInsertOperation(b);\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(MoveOperation, MoveOperation, (a, b, context)=>{\n    //\n    // Setting and evaluating some variables that will be used in special cases and default algorithm.\n    //\n    // Create ranges from `MoveOperations` properties.\n    const rangeA = Range._createFromPositionAndShift(a.sourcePosition, a.howMany);\n    const rangeB = Range._createFromPositionAndShift(b.sourcePosition, b.howMany);\n    // Assign `context.aIsStrong` to a different variable, because the value may change during execution of\n    // this algorithm and we do not want to override original `context.aIsStrong` that will be used in later transformations.\n    let aIsStrong = context.aIsStrong;\n    // This will be used to decide the order of nodes if both operations target at the same position.\n    // By default, use strong/weak operation mechanism.\n    let insertBefore = !context.aIsStrong;\n    // If the relation is set, then use it to decide nodes order.\n    if (context.abRelation == 'insertBefore' || context.baRelation == 'insertAfter') {\n        insertBefore = true;\n    } else if (context.abRelation == 'insertAfter' || context.baRelation == 'insertBefore') {\n        insertBefore = false;\n    }\n    // `a.targetPosition` could be affected by the `b` operation. We will transform it.\n    let newTargetPosition;\n    if (a.targetPosition.isEqual(b.targetPosition) && insertBefore) {\n        newTargetPosition = a.targetPosition._getTransformedByDeletion(b.sourcePosition, b.howMany);\n    } else {\n        newTargetPosition = a.targetPosition._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n    }\n    //\n    // Special case #1 + mirror.\n    //\n    // Special case when both move operations' target positions are inside nodes that are\n    // being moved by the other move operation. So in other words, we move ranges into inside of each other.\n    // This case can't be solved reasonably (on the other hand, it should not happen often).\n    if (_moveTargetIntoMovedRange(a, b) && _moveTargetIntoMovedRange(b, a)) {\n        // Instead of transforming operation, we return a reverse of the operation that we transform by.\n        // So when the results of this \"transformation\" will be applied, `b` MoveOperation will get reversed.\n        return [\n            b.getReversed()\n        ];\n    }\n    //\n    // End of special case #1.\n    //\n    //\n    // Special case #2.\n    //\n    // Check if `b` operation targets inside `rangeA`.\n    const bTargetsToA = rangeA.containsPosition(b.targetPosition);\n    // If `b` targets to `rangeA` and `rangeA` contains `rangeB`, `b` operation has no influence on `a` operation.\n    // You might say that operation `b` is captured inside operation `a`.\n    if (bTargetsToA && rangeA.containsRange(rangeB, true)) {\n        // There is a mini-special case here, where `rangeB` is on other level than `rangeA`. That's why\n        // we need to transform `a` operation anyway.\n        rangeA.start = rangeA.start._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n        rangeA.end = rangeA.end._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n        return _makeMoveOperationsFromRanges([\n            rangeA\n        ], newTargetPosition);\n    }\n    //\n    // Special case #2 mirror.\n    //\n    const aTargetsToB = rangeB.containsPosition(a.targetPosition);\n    if (aTargetsToB && rangeB.containsRange(rangeA, true)) {\n        // `a` operation is \"moved together\" with `b` operation.\n        // Here, just move `rangeA` \"inside\" `rangeB`.\n        rangeA.start = rangeA.start._getCombined(b.sourcePosition, b.getMovedRangeStart());\n        rangeA.end = rangeA.end._getCombined(b.sourcePosition, b.getMovedRangeStart());\n        return _makeMoveOperationsFromRanges([\n            rangeA\n        ], newTargetPosition);\n    }\n    //\n    // End of special case #2.\n    //\n    //\n    // Special case #3 + mirror.\n    //\n    // `rangeA` has a node which is an ancestor of `rangeB`. In other words, `rangeB` is inside `rangeA`\n    // but not on the same tree level. In such case ranges have common part but we have to treat it\n    // differently, because in such case those ranges are not really conflicting and should be treated like\n    // two separate ranges. Also we have to discard two difference parts.\n    const aCompB = compareArrays(a.sourcePosition.getParentPath(), b.sourcePosition.getParentPath());\n    if (aCompB == 'prefix' || aCompB == 'extension') {\n        // Transform `rangeA` by `b` operation and make operation out of it, and that's all.\n        // Note that this is a simplified version of default case, but here we treat the common part (whole `rangeA`)\n        // like a one difference part.\n        rangeA.start = rangeA.start._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n        rangeA.end = rangeA.end._getTransformedByMove(b.sourcePosition, b.targetPosition, b.howMany);\n        return _makeMoveOperationsFromRanges([\n            rangeA\n        ], newTargetPosition);\n    }\n    //\n    // End of special case #3.\n    //\n    //\n    // Default case - ranges are on the same level or are not connected with each other.\n    //\n    // Modifier for default case.\n    // Modifies `aIsStrong` flag in certain conditions.\n    //\n    // If only one of operations is a remove operation, we force remove operation to be the \"stronger\" one\n    // to provide more expected results.\n    if (a.type == 'remove' && b.type != 'remove' && !context.aWasUndone && !context.forceWeakRemove) {\n        aIsStrong = true;\n    } else if (a.type != 'remove' && b.type == 'remove' && !context.bWasUndone && !context.forceWeakRemove) {\n        aIsStrong = false;\n    }\n    // Handle operation's source ranges - check how `rangeA` is affected by `b` operation.\n    // This will aggregate transformed ranges.\n    const ranges = [];\n    // Get the \"difference part\" of `a` operation source range.\n    // This is an array with one or two ranges. Two ranges if `rangeB` is inside `rangeA`.\n    const difference = rangeA.getDifference(rangeB);\n    for (const range of difference){\n        // Transform those ranges by `b` operation. For example if `b` moved range from before those ranges, fix those ranges.\n        range.start = range.start._getTransformedByDeletion(b.sourcePosition, b.howMany);\n        range.end = range.end._getTransformedByDeletion(b.sourcePosition, b.howMany);\n        // If `b` operation targets into `rangeA` on the same level, spread `rangeA` into two ranges.\n        const shouldSpread = compareArrays(range.start.getParentPath(), b.getMovedRangeStart().getParentPath()) == 'same';\n        const newRanges = range._getTransformedByInsertion(b.getMovedRangeStart(), b.howMany, shouldSpread);\n        ranges.push(...newRanges);\n    }\n    // Then, we have to manage the \"common part\" of both move ranges.\n    const common = rangeA.getIntersection(rangeB);\n    if (common !== null && aIsStrong) {\n        // Calculate the new position of that part of original range.\n        common.start = common.start._getCombined(b.sourcePosition, b.getMovedRangeStart());\n        common.end = common.end._getCombined(b.sourcePosition, b.getMovedRangeStart());\n        // Take care of proper range order.\n        //\n        // Put `common` at appropriate place. Keep in mind that we are interested in original order.\n        // Basically there are only three cases: there is zero, one or two difference ranges.\n        //\n        // If there is zero difference ranges, just push `common` in the array.\n        if (ranges.length === 0) {\n            ranges.push(common);\n        } else if (ranges.length == 1) {\n            if (rangeB.start.isBefore(rangeA.start) || rangeB.start.isEqual(rangeA.start)) {\n                ranges.unshift(common);\n            } else {\n                ranges.push(common);\n            }\n        } else {\n            ranges.splice(1, 0, common);\n        }\n    }\n    if (ranges.length === 0) {\n        // If there are no \"source ranges\", nothing should be changed.\n        // Note that this can happen only if `aIsStrong == false` and `rangeA.isEqual( rangeB )`.\n        return [\n            new NoOperation(a.baseVersion)\n        ];\n    }\n    return _makeMoveOperationsFromRanges(ranges, newTargetPosition);\n});\nsetTransformation(MoveOperation, SplitOperation, (a, b, context)=>{\n    let newTargetPosition = a.targetPosition.clone();\n    // Do not transform if target position is same as split insertion position and this split comes from undo.\n    // This should be done on relations but it is too much work for now as it would require relations working in collaboration.\n    // We need to make a decision how we will resolve such conflict and this is less harmful way.\n    if (!a.targetPosition.isEqual(b.insertionPosition) || !b.graveyardPosition || context.abRelation == 'moveTargetAfter') {\n        newTargetPosition = a.targetPosition._getTransformedBySplitOperation(b);\n    }\n    // Case 1:\n    //\n    // Last element in the moved range got split.\n    //\n    // In this case the default range transformation will not work correctly as the element created by\n    // split operation would be outside the range. The range to move needs to be fixed manually.\n    //\n    const moveRange = Range._createFromPositionAndShift(a.sourcePosition, a.howMany);\n    if (moveRange.end.isEqual(b.insertionPosition)) {\n        // Do it only if this is a \"natural\" split, not a one that comes from undo.\n        // If this is undo split, only `targetPosition` needs to be changed (if the move is a remove).\n        if (!b.graveyardPosition) {\n            a.howMany++;\n        }\n        a.targetPosition = newTargetPosition;\n        return [\n            a\n        ];\n    }\n    // Case 2:\n    //\n    // Split happened between the moved nodes. In this case two ranges to move need to be generated.\n    //\n    // Characters `ozba` are moved to the end of paragraph `Xyz` but split happened.\n    // <p>F[oz|ba]r</p><p>Xyz</p>\n    //\n    // After split:\n    // <p>F[oz</p><p>ba]r</p><p>Xyz</p>\n    //\n    // Correct ranges:\n    // <p>F[oz]</p><p>[ba]r</p><p>Xyz</p>\n    //\n    // After move:\n    // <p>F</p><p>r</p><p>Xyzozba</p>\n    //\n    if (moveRange.start.hasSameParentAs(b.splitPosition) && moveRange.containsPosition(b.splitPosition)) {\n        let rightRange = new Range(b.splitPosition, moveRange.end);\n        rightRange = rightRange._getTransformedBySplitOperation(b);\n        const ranges = [\n            new Range(moveRange.start, b.splitPosition),\n            rightRange\n        ];\n        return _makeMoveOperationsFromRanges(ranges, newTargetPosition);\n    }\n    // Case 3:\n    //\n    // Move operation targets at the split position. We need to decide if the nodes should be inserted\n    // at the end of the split element or at the beginning of the new element.\n    //\n    if (a.targetPosition.isEqual(b.splitPosition) && context.abRelation == 'insertAtSource') {\n        newTargetPosition = b.moveTargetPosition;\n    }\n    // Case 4:\n    //\n    // Move operation targets just after the split element. We need to decide if the nodes should be inserted\n    // between two parts of split element, or after the new element.\n    //\n    // Split at `|`, while move operation moves `<p>Xyz</p>` and targets at `^`:\n    // <p>Foo|bar</p>^<p>baz</p>\n    // <p>Foo</p>^<p>bar</p><p>baz</p> or <p>Foo</p><p>bar</p>^<p>baz</p>?\n    //\n    // If there is no contextual information between operations (for example, they come from collaborative\n    // editing), we don't want to put some unrelated content (move) between parts of related content (split parts).\n    // However, if the split is from undo, in the past, the moved content might be targeting between the\n    // split parts, meaning that was exactly user's intention:\n    //\n    // <p>Foo</p>^<p>bar</p>\t\t<--- original situation, in \"past\".\n    // <p>Foobar</p>^\t\t\t\t<--- after merge target position is transformed.\n    // <p>Foo|bar</p>^\t\t\t\t<--- then the merge is undone, and split happens, which leads us to current situation.\n    //\n    // In this case it is pretty clear that the intention was to put new paragraph between those nodes,\n    // so we need to transform accordingly. We can detect this scenario thanks to relations.\n    //\n    if (a.targetPosition.isEqual(b.insertionPosition) && context.abRelation == 'insertBetween') {\n        newTargetPosition = a.targetPosition;\n    }\n    // The default case.\n    //\n    const transformed = moveRange._getTransformedBySplitOperation(b);\n    const ranges = [\n        transformed\n    ];\n    // Case 5:\n    //\n    // Moved range contains graveyard element used by split operation. Add extra move operation to the result.\n    //\n    if (b.graveyardPosition) {\n        const movesGraveyardElement = moveRange.start.isEqual(b.graveyardPosition) || moveRange.containsPosition(b.graveyardPosition);\n        if (a.howMany > 1 && movesGraveyardElement && !context.aWasUndone) {\n            ranges.push(Range._createFromPositionAndShift(b.insertionPosition, 1));\n        }\n    }\n    return _makeMoveOperationsFromRanges(ranges, newTargetPosition);\n});\nsetTransformation(MoveOperation, MergeOperation, (a, b, context)=>{\n    const movedRange = Range._createFromPositionAndShift(a.sourcePosition, a.howMany);\n    if (b.deletionPosition.hasSameParentAs(a.sourcePosition) && movedRange.containsPosition(b.sourcePosition)) {\n        if (a.type == 'remove' && !context.forceWeakRemove) {\n            // Case 1:\n            //\n            // The element to remove got merged.\n            //\n            // Merge operation does support merging elements which are not siblings. So it would not be a problem\n            // from technical point of view. However, if the element was removed, the intention of the user\n            // deleting it was to have it all deleted. From user experience point of view, moving back the\n            // removed nodes might be unexpected. This means that in this scenario we will reverse merging and remove the element.\n            //\n            if (!context.aWasUndone) {\n                const results = [];\n                let gyMoveSource = b.graveyardPosition.clone();\n                let splitNodesMoveSource = b.targetPosition._getTransformedByMergeOperation(b);\n                if (a.howMany > 1) {\n                    results.push(new MoveOperation(a.sourcePosition, a.howMany - 1, a.targetPosition, 0));\n                    gyMoveSource = gyMoveSource._getTransformedByMove(a.sourcePosition, a.targetPosition, a.howMany - 1);\n                    splitNodesMoveSource = splitNodesMoveSource._getTransformedByMove(a.sourcePosition, a.targetPosition, a.howMany - 1);\n                }\n                const gyMoveTarget = b.deletionPosition._getCombined(a.sourcePosition, a.targetPosition);\n                const gyMove = new MoveOperation(gyMoveSource, 1, gyMoveTarget, 0);\n                const splitNodesMoveTargetPath = gyMove.getMovedRangeStart().path.slice();\n                splitNodesMoveTargetPath.push(0);\n                const splitNodesMoveTarget = new Position(gyMove.targetPosition.root, splitNodesMoveTargetPath);\n                splitNodesMoveSource = splitNodesMoveSource._getTransformedByMove(gyMoveSource, gyMoveTarget, 1);\n                const splitNodesMove = new MoveOperation(splitNodesMoveSource, b.howMany, splitNodesMoveTarget, 0);\n                results.push(gyMove);\n                results.push(splitNodesMove);\n                return results;\n            }\n        } else {\n            // Case 2:\n            //\n            // The element to move got merged and it was the only element to move.\n            // In this case just don't do anything, leave the node in the graveyard. Without special case\n            // it would be a move operation that moves 0 nodes, so maybe it is better just to return no-op.\n            //\n            if (a.howMany == 1) {\n                if (!context.bWasUndone) {\n                    return [\n                        new NoOperation(0)\n                    ];\n                } else {\n                    a.sourcePosition = b.graveyardPosition.clone();\n                    a.targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n                    return [\n                        a\n                    ];\n                }\n            }\n        }\n    }\n    // The default case.\n    //\n    const moveRange = Range._createFromPositionAndShift(a.sourcePosition, a.howMany);\n    const transformed = moveRange._getTransformedByMergeOperation(b);\n    a.sourcePosition = transformed.start;\n    a.howMany = transformed.end.offset - transformed.start.offset;\n    a.targetPosition = a.targetPosition._getTransformedByMergeOperation(b);\n    return [\n        a\n    ];\n});\n// -----------------------\nsetTransformation(RenameOperation, InsertOperation, (a, b)=>{\n    a.position = a.position._getTransformedByInsertOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(RenameOperation, MergeOperation, (a, b)=>{\n    // Case 1:\n    //\n    // Element to rename got merged, so it was moved to `b.graveyardPosition`.\n    //\n    if (a.position.isEqual(b.deletionPosition)) {\n        a.position = b.graveyardPosition.clone();\n        a.position.stickiness = 'toNext';\n        return [\n            a\n        ];\n    }\n    a.position = a.position._getTransformedByMergeOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(RenameOperation, MoveOperation, (a, b)=>{\n    a.position = a.position._getTransformedByMoveOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(RenameOperation, RenameOperation, (a, b, context)=>{\n    if (a.position.isEqual(b.position)) {\n        if (context.aIsStrong) {\n            a.oldName = b.newName;\n        } else {\n            return [\n                new NoOperation(0)\n            ];\n        }\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(RenameOperation, SplitOperation, (a, b)=>{\n    // Case 1:\n    //\n    // The element to rename has been split. In this case, the new element should be also renamed.\n    //\n    // User decides to change the paragraph to a list item:\n    // <paragraph>Foobar</paragraph>\n    //\n    // However, in meantime, split happens:\n    // <paragraph>Foo</paragraph><paragraph>bar</paragraph>\n    //\n    // As a result, rename both elements:\n    // <listItem>Foo</listItem><listItem>bar</listItem>\n    //\n    const renamePath = a.position.path;\n    const splitPath = b.splitPosition.getParentPath();\n    if (compareArrays(renamePath, splitPath) == 'same' && !b.graveyardPosition) {\n        const extraRename = new RenameOperation(a.position.getShiftedBy(1), a.oldName, a.newName, 0);\n        return [\n            a,\n            extraRename\n        ];\n    }\n    // The default case.\n    //\n    a.position = a.position._getTransformedBySplitOperation(b);\n    return [\n        a\n    ];\n});\n// -----------------------\nsetTransformation(RootAttributeOperation, RootAttributeOperation, (a, b, context)=>{\n    if (a.root === b.root && a.key === b.key) {\n        if (!context.aIsStrong || a.newValue === b.newValue) {\n            return [\n                new NoOperation(0)\n            ];\n        } else {\n            a.oldValue = b.newValue;\n        }\n    }\n    return [\n        a\n    ];\n});\n// -----------------------\nsetTransformation(RootOperation, RootOperation, (a, b)=>{\n    if (a.rootName === b.rootName && a.isAdd === b.isAdd) {\n        return [\n            new NoOperation(0)\n        ];\n    }\n    return [\n        a\n    ];\n});\n// -----------------------\nsetTransformation(SplitOperation, InsertOperation, (a, b)=>{\n    // The default case.\n    //\n    if (a.splitPosition.hasSameParentAs(b.position) && a.splitPosition.offset < b.position.offset) {\n        a.howMany += b.howMany;\n    }\n    a.splitPosition = a.splitPosition._getTransformedByInsertOperation(b);\n    a.insertionPosition = a.insertionPosition._getTransformedByInsertOperation(b);\n    return [\n        a\n    ];\n});\nsetTransformation(SplitOperation, MergeOperation, (a, b, context)=>{\n    // Case 1:\n    //\n    // Split element got merged. If two different elements were merged, clients will have different content.\n    //\n    // Example. Merge at `{}`, split at `[]`:\n    // <heading>Foo</heading>{}<paragraph>B[]ar</paragraph>\n    //\n    // On merge side it will look like this:\n    // <heading>FooB[]ar</heading>\n    // <heading>FooB</heading><heading>ar</heading>\n    //\n    // On split side it will look like this:\n    // <heading>Foo</heading>{}<paragraph>B</paragraph><paragraph>ar</paragraph>\n    // <heading>FooB</heading><paragraph>ar</paragraph>\n    //\n    // Clearly, the second element is different for both clients.\n    //\n    // We could use the removed merge element from graveyard as a split element but then clients would have a different\n    // model state (in graveyard), because the split side client would still have an element in graveyard (removed by merge).\n    //\n    // To overcome this, in `SplitOperation` x `MergeOperation` transformation we will add additional `SplitOperation`\n    // in the graveyard, which will actually clone the merged-and-deleted element. Then, that cloned element will be\n    // used for splitting. Example below.\n    //\n    // Original state:\n    // <heading>Foo</heading>{}<paragraph>B[]ar</paragraph>\n    //\n    // Merge side client:\n    //\n    // After merge:\n    // <heading>FooB[]ar</heading>                                 graveyard: <paragraph></paragraph>\n    //\n    // Extra split:\n    // <heading>FooB[]ar</heading>                                 graveyard: <paragraph></paragraph><paragraph></paragraph>\n    //\n    // Use the \"cloned\" element from graveyard:\n    // <heading>FooB</heading><paragraph>ar</paragraph>            graveyard: <paragraph></paragraph>\n    //\n    // Split side client:\n    //\n    // After split:\n    // <heading>Foo</heading>{}<paragraph>B</paragraph><paragraph>ar</paragraph>\n    //\n    // After merge:\n    // <heading>FooB</heading><paragraph>ar</paragraph>            graveyard: <paragraph></paragraph>\n    //\n    // This special case scenario only applies if the original split operation clones the split element.\n    // If the original split operation has `graveyardPosition` set, it all doesn't have sense because split operation\n    // knows exactly which element it should use. So there would be no original problem with different contents.\n    //\n    // Additionally, the special case applies only if the merge wasn't already undone.\n    //\n    if (!a.graveyardPosition && !context.bWasUndone && a.splitPosition.hasSameParentAs(b.sourcePosition)) {\n        const splitPath = b.graveyardPosition.path.slice();\n        splitPath.push(0);\n        const splitPosition = new Position(b.graveyardPosition.root, splitPath);\n        const insertionPosition = SplitOperation.getInsertionPosition(new Position(b.graveyardPosition.root, splitPath));\n        const additionalSplit = new SplitOperation(splitPosition, 0, insertionPosition, null, 0);\n        a.splitPosition = a.splitPosition._getTransformedByMergeOperation(b);\n        a.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n        a.graveyardPosition = additionalSplit.insertionPosition.clone();\n        a.graveyardPosition.stickiness = 'toNext';\n        return [\n            additionalSplit,\n            a\n        ];\n    }\n    // The default case.\n    //\n    if (a.splitPosition.hasSameParentAs(b.deletionPosition) && !a.splitPosition.isAfter(b.deletionPosition)) {\n        a.howMany--;\n    }\n    if (a.splitPosition.hasSameParentAs(b.targetPosition)) {\n        a.howMany += b.howMany;\n    }\n    a.splitPosition = a.splitPosition._getTransformedByMergeOperation(b);\n    a.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n    if (a.graveyardPosition) {\n        a.graveyardPosition = a.graveyardPosition._getTransformedByMergeOperation(b);\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(SplitOperation, MoveOperation, (a, b, context)=>{\n    const rangeToMove = Range._createFromPositionAndShift(b.sourcePosition, b.howMany);\n    if (a.graveyardPosition) {\n        // Case 1:\n        //\n        // Split operation graveyard node was moved. In this case move operation is stronger. Since graveyard element\n        // is already moved to the correct position, we need to only move the nodes after the split position.\n        // This will be done by `MoveOperation` instead of `SplitOperation`.\n        //\n        const gyElementMoved = rangeToMove.start.isEqual(a.graveyardPosition) || rangeToMove.containsPosition(a.graveyardPosition);\n        if (!context.bWasUndone && gyElementMoved) {\n            const sourcePosition = a.splitPosition._getTransformedByMoveOperation(b);\n            const newParentPosition = a.graveyardPosition._getTransformedByMoveOperation(b);\n            const newTargetPath = newParentPosition.path.slice();\n            newTargetPath.push(0);\n            const newTargetPosition = new Position(newParentPosition.root, newTargetPath);\n            const moveOp = new MoveOperation(sourcePosition, a.howMany, newTargetPosition, 0);\n            return [\n                moveOp\n            ];\n        }\n        a.graveyardPosition = a.graveyardPosition._getTransformedByMoveOperation(b);\n    }\n    // Case 2:\n    //\n    // Split is at a position where nodes were moved.\n    //\n    // This is a scenario described in `MoveOperation` x `SplitOperation` transformation but from the\n    // \"split operation point of view\".\n    //\n    const splitAtTarget = a.splitPosition.isEqual(b.targetPosition);\n    if (splitAtTarget && (context.baRelation == 'insertAtSource' || context.abRelation == 'splitBefore')) {\n        a.howMany += b.howMany;\n        a.splitPosition = a.splitPosition._getTransformedByDeletion(b.sourcePosition, b.howMany);\n        a.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n        return [\n            a\n        ];\n    }\n    if (splitAtTarget && context.abRelation && context.abRelation.howMany) {\n        const { howMany, offset } = context.abRelation;\n        a.howMany += howMany;\n        a.splitPosition = a.splitPosition.getShiftedBy(offset);\n        return [\n            a\n        ];\n    }\n    // Case 3:\n    //\n    // If the split position is inside the moved range, we need to shift the split position to a proper place.\n    // The position cannot be moved together with moved range because that would result in splitting of an incorrect element.\n    //\n    // Characters `bc` should be moved to the second paragraph while split position is between them:\n    // <paragraph>A[b|c]d</paragraph><paragraph>Xyz</paragraph>\n    //\n    // After move, new split position is incorrect:\n    // <paragraph>Ad</paragraph><paragraph>Xb|cyz</paragraph>\n    //\n    // Correct split position:\n    // <paragraph>A|d</paragraph><paragraph>Xbcyz</paragraph>\n    //\n    // After split:\n    // <paragraph>A</paragraph><paragraph>d</paragraph><paragraph>Xbcyz</paragraph>\n    //\n    if (a.splitPosition.hasSameParentAs(b.sourcePosition) && rangeToMove.containsPosition(a.splitPosition)) {\n        const howManyRemoved = b.howMany - (a.splitPosition.offset - b.sourcePosition.offset);\n        a.howMany -= howManyRemoved;\n        if (a.splitPosition.hasSameParentAs(b.targetPosition) && a.splitPosition.offset < b.targetPosition.offset) {\n            a.howMany += b.howMany;\n        }\n        a.splitPosition = b.sourcePosition.clone();\n        a.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n        return [\n            a\n        ];\n    }\n    // The default case.\n    // Don't change `howMany` if move operation does not really move anything.\n    //\n    if (!b.sourcePosition.isEqual(b.targetPosition)) {\n        if (a.splitPosition.hasSameParentAs(b.sourcePosition) && a.splitPosition.offset <= b.sourcePosition.offset) {\n            a.howMany -= b.howMany;\n        }\n        if (a.splitPosition.hasSameParentAs(b.targetPosition) && a.splitPosition.offset < b.targetPosition.offset) {\n            a.howMany += b.howMany;\n        }\n    }\n    // Change position stickiness to force a correct transformation.\n    a.splitPosition.stickiness = 'toNone';\n    a.splitPosition = a.splitPosition._getTransformedByMoveOperation(b);\n    a.splitPosition.stickiness = 'toNext';\n    if (a.graveyardPosition) {\n        a.insertionPosition = a.insertionPosition._getTransformedByMoveOperation(b);\n    } else {\n        a.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n    }\n    return [\n        a\n    ];\n});\nsetTransformation(SplitOperation, SplitOperation, (a, b, context)=>{\n    // Case 1:\n    //\n    // Split at the same position.\n    //\n    // If there already was a split at the same position as in `a` operation, it means that the intention\n    // conveyed by `a` operation has already been fulfilled and `a` should not do anything (to avoid double split).\n    //\n    // However, there is a difference if these are new splits or splits created by undo. These have different\n    // intentions. Also splits moving back different elements from graveyard have different intentions. They\n    // are just different operations.\n    //\n    // So we cancel split operation only if it was really identical.\n    //\n    // Also, there is additional case, where split operations aren't identical and should not be cancelled, however the\n    // default transformation is incorrect too.\n    //\n    if (a.splitPosition.isEqual(b.splitPosition)) {\n        if (!a.graveyardPosition && !b.graveyardPosition) {\n            return [\n                new NoOperation(0)\n            ];\n        }\n        if (a.graveyardPosition && b.graveyardPosition && a.graveyardPosition.isEqual(b.graveyardPosition)) {\n            return [\n                new NoOperation(0)\n            ];\n        }\n        // Use context to know that the `a.splitPosition` should stay where it is.\n        // This happens during undo when first a merge operation moved nodes to `a.splitPosition` and now `b` operation undoes that merge.\n        if (context.abRelation == 'splitBefore') {\n            // Since split is at the same position, there are no nodes left to split.\n            a.howMany = 0;\n            // Note: there was `if ( a.graveyardPosition )` here but it was uncovered in tests and I couldn't find any scenarios for now.\n            // That would have to be a `SplitOperation` that didn't come from undo but is transformed by operations that were undone.\n            // It could happen if `context` is enabled in collaboration.\n            a.graveyardPosition = a.graveyardPosition._getTransformedBySplitOperation(b);\n            return [\n                a\n            ];\n        }\n    }\n    // Case 2:\n    //\n    // Same node is using to split different elements. This happens in undo when previously same element was merged to\n    // two different elements. This is described in `MergeOperation` x `MergeOperation` transformation.\n    //\n    // In this case we will follow the same logic. We will assume that `insertionPosition` is same for both\n    // split operations. This might not always be true but in the real cases that were experienced it was. After all,\n    // if these splits are reverses of merge operations that were merging the same element, then the `insertionPosition`\n    // should be same for both of those splits.\n    //\n    // Again, we will decide which operation is stronger by checking if split happens in graveyard or in non-graveyard root.\n    //\n    if (a.graveyardPosition && b.graveyardPosition && a.graveyardPosition.isEqual(b.graveyardPosition)) {\n        const aInGraveyard = a.splitPosition.root.rootName == '$graveyard';\n        const bInGraveyard = b.splitPosition.root.rootName == '$graveyard';\n        // If `aIsWeak` it means that `a` points to graveyard while `b` doesn't. Don't move nodes then.\n        const aIsWeak = aInGraveyard && !bInGraveyard;\n        // If `bIsWeak` it means that `b` points to graveyard while `a` doesn't. Force moving nodes then.\n        const bIsWeak = bInGraveyard && !aInGraveyard;\n        // Force move if `b` is weak or neither operation is weak but `a` is stronger through `context.aIsStrong`.\n        const forceMove = bIsWeak || !aIsWeak && context.aIsStrong;\n        if (forceMove) {\n            const result = [];\n            // First we need to move any nodes split by `b` back to where they were.\n            // Do it only if `b` actually moved something.\n            if (b.howMany) {\n                result.push(new MoveOperation(b.moveTargetPosition, b.howMany, b.splitPosition, 0));\n            }\n            // Then we need to move nodes from `a` split position to their new element.\n            // Do it only if `a` actually should move something.\n            if (a.howMany) {\n                result.push(new MoveOperation(a.splitPosition, a.howMany, a.moveTargetPosition, 0));\n            }\n            return result;\n        } else {\n            return [\n                new NoOperation(0)\n            ];\n        }\n    }\n    if (a.graveyardPosition) {\n        a.graveyardPosition = a.graveyardPosition._getTransformedBySplitOperation(b);\n    }\n    // Case 3:\n    //\n    // Position where operation `b` inserted a new node after split is the same as the operation `a` split position.\n    // As in similar cases, there is ambiguity if the split should be before the new node (created by `b`) or after.\n    //\n    if (a.splitPosition.isEqual(b.insertionPosition) && context.abRelation == 'splitBefore') {\n        a.howMany++;\n        return [\n            a\n        ];\n    }\n    // Case 4:\n    //\n    // This is a mirror to the case 2. above.\n    //\n    if (b.splitPosition.isEqual(a.insertionPosition) && context.baRelation == 'splitBefore') {\n        const newPositionPath = b.insertionPosition.path.slice();\n        newPositionPath.push(0);\n        const newPosition = new Position(b.insertionPosition.root, newPositionPath);\n        const moveOp = new MoveOperation(a.insertionPosition, 1, newPosition, 0);\n        return [\n            a,\n            moveOp\n        ];\n    }\n    // The default case.\n    //\n    if (a.splitPosition.hasSameParentAs(b.splitPosition) && a.splitPosition.offset < b.splitPosition.offset) {\n        a.howMany -= b.howMany;\n    }\n    a.splitPosition = a.splitPosition._getTransformedBySplitOperation(b);\n    a.insertionPosition = SplitOperation.getInsertionPosition(a.splitPosition);\n    return [\n        a\n    ];\n});\n/**\n * Checks whether `MoveOperation` `targetPosition` is inside a node from the moved range of the other `MoveOperation`.\n */ function _moveTargetIntoMovedRange(a, b) {\n    return a.targetPosition._getTransformedByDeletion(b.sourcePosition, b.howMany) === null;\n}\n/**\n * Helper function for `MoveOperation` x `MoveOperation` transformation. Converts given ranges and target position to\n * move operations and returns them.\n *\n * Ranges and target position will be transformed on-the-fly when generating operations.\n *\n * Given `ranges` should be in the order of how they were in the original transformed operation.\n *\n * Given `targetPosition` is the target position of the first range from `ranges`.\n */ function _makeMoveOperationsFromRanges(ranges, targetPosition) {\n    // At this moment we have some ranges and a target position, to which those ranges should be moved.\n    // Order in `ranges` array is the go-to order of after transformation.\n    //\n    // We are almost done. We have `ranges` and `targetPosition` to make operations from.\n    // Unfortunately, those operations may affect each other. Precisely, first operation after move\n    // may affect source range and target position of second and third operation. Same with second\n    // operation affecting third.\n    //\n    // We need to fix those source ranges and target positions once again, before converting `ranges` to operations.\n    const operations = [];\n    // Keep in mind that nothing will be transformed if there is just one range in `ranges`.\n    for(let i = 0; i < ranges.length; i++){\n        // Create new operation out of a range and target position.\n        const range = ranges[i];\n        const op = new MoveOperation(range.start, range.end.offset - range.start.offset, targetPosition, 0);\n        operations.push(op);\n        // Transform other ranges by the generated operation.\n        for(let j = i + 1; j < ranges.length; j++){\n            // All ranges in `ranges` array should be:\n            //\n            // * non-intersecting (these are part of original operation source range), and\n            // * `targetPosition` does not target into them (opposite would mean that transformed operation targets \"inside itself\").\n            //\n            // This means that the transformation will be \"clean\" and always return one result.\n            ranges[j] = ranges[j]._getTransformedByMove(op.sourcePosition, op.targetPosition, op.howMany)[0];\n        }\n        targetPosition = targetPosition._getTransformedByMove(op.sourcePosition, op.targetPosition, op.howMany);\n    }\n    return operations;\n}\n\n/**\n * `LivePosition` is a type of {@link module:engine/model/position~Position Position}\n * that updates itself as {@link module:engine/model/document~Document document}\n * is changed through operations. It may be used as a bookmark.\n *\n * **Note:** Contrary to {@link module:engine/model/position~Position}, `LivePosition` works only in roots that are\n * {@link module:engine/model/rootelement~RootElement}.\n * If {@link module:engine/model/documentfragment~DocumentFragment} is passed, error will be thrown.\n *\n * **Note:** Be very careful when dealing with `LivePosition`. Each `LivePosition` instance bind events that might\n * have to be unbound.\n * Use {@link module:engine/model/liveposition~LivePosition#detach} whenever you don't need `LivePosition` anymore.\n */ class LivePosition extends /* #__PURE__ */ EmitterMixin(Position) {\n    /**\n\t * Creates a live position.\n\t *\n\t * @see module:engine/model/position~Position\n\t */ constructor(root, path, stickiness = 'toNone'){\n        super(root, path, stickiness);\n        if (!this.root.is('rootElement')) {\n            /**\n\t\t\t * LivePosition's root has to be an instance of RootElement.\n\t\t\t *\n\t\t\t * @error model-liveposition-root-not-rootelement\n\t\t\t */ throw new CKEditorError('model-liveposition-root-not-rootelement', root);\n        }\n        bindWithDocument.call(this);\n    }\n    /**\n\t * Unbinds all events previously bound by `LivePosition`. Use it whenever you don't need `LivePosition` instance\n\t * anymore (i.e. when leaving scope in which it was declared or before re-assigning variable that was\n\t * referring to it).\n\t */ detach() {\n        this.stopListening();\n    }\n    /**\n\t * Creates a {@link module:engine/model/position~Position position instance}, which is equal to this live position.\n\t */ toPosition() {\n        return new Position(this.root, this.path.slice(), this.stickiness);\n    }\n    /**\n\t * Creates a `LivePosition` instance that is equal to position.\n\t */ static fromPosition(position, stickiness) {\n        return new this(position.root, position.path.slice(), stickiness ? stickiness : position.stickiness);\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nLivePosition.prototype.is = function(type) {\n    return type === 'livePosition' || type === 'model:livePosition' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n    type == 'position' || type === 'model:position';\n};\n/**\n * Binds this `LivePosition` to the {@link module:engine/model/document~Document document} that owns\n * this position's {@link module:engine/model/position~Position#root root}.\n */ function bindWithDocument() {\n    this.listenTo(this.root.document.model, 'applyOperation', (event, args)=>{\n        const operation = args[0];\n        if (!operation.isDocumentOperation) {\n            return;\n        }\n        transform.call(this, operation);\n    }, {\n        priority: 'low'\n    });\n}\n/**\n * Updates this position accordingly to the updates applied to the model. Bases on change events.\n */ function transform(operation) {\n    const result = this.getTransformedByOperation(operation);\n    if (!this.isEqual(result)) {\n        const oldPosition = this.toPosition();\n        this.path = result.path;\n        this.root = result.root;\n        this.fire('change', oldPosition);\n    }\n}\n\n/**\n * A batch instance groups model changes ({@link module:engine/model/operation/operation~Operation operations}). All operations\n * grouped in a single batch can be reverted together, so you can also think about a batch as of a single undo step. If you want\n * to extend a given undo step, you can add more changes to the batch using {@link module:engine/model/model~Model#enqueueChange}:\n *\n * ```ts\n * model.enqueueChange( batch, writer => {\n * \twriter.insertText( 'foo', paragraph, 'end' );\n * } );\n * ```\n *\n * @see module:engine/model/model~Model#enqueueChange\n * @see module:engine/model/model~Model#change\n */ class Batch {\n    /**\n\t * An array of operations that compose this batch.\n\t */ operations;\n    /**\n\t * Whether the batch can be undone through the undo feature.\n\t */ isUndoable;\n    /**\n\t * Whether the batch includes operations created locally (`true`) or operations created on other, remote editors (`false`).\n\t */ isLocal;\n    /**\n\t * Whether the batch was created by the undo feature and undoes other operations.\n\t */ isUndo;\n    /**\n\t * Whether the batch includes operations connected with typing.\n\t */ isTyping;\n    /**\n\t * Creates a batch instance.\n\t *\n\t * @see module:engine/model/model~Model#enqueueChange\n\t * @see module:engine/model/model~Model#change\n\t * @param type A set of flags that specify the type of the batch. Batch type can alter how some of the features work\n\t * when encountering a given `Batch` instance (for example, when a feature listens to applied operations).\n\t */ constructor(type = {}){\n        if (typeof type === 'string') {\n            type = type === 'transparent' ? {\n                isUndoable: false\n            } : {};\n            /**\n\t\t\t * The string value for a `type` property of the `Batch` constructor has been deprecated and will be removed in the near future.\n\t\t\t * Please refer to the {@link module:engine/model/batch~Batch#constructor `Batch` constructor API documentation} for more\n\t\t\t * information.\n\t\t\t *\n\t\t\t * @error batch-constructor-deprecated-string-type\n\t\t\t */ logWarning('batch-constructor-deprecated-string-type');\n        }\n        const { isUndoable = true, isLocal = true, isUndo = false, isTyping = false } = type;\n        this.operations = [];\n        this.isUndoable = isUndoable;\n        this.isLocal = isLocal;\n        this.isUndo = isUndo;\n        this.isTyping = isTyping;\n    }\n    /**\n\t * The type of the batch.\n\t *\n\t * **This property has been deprecated and is always set to the `'default'` value.**\n\t *\n\t * It can be one of the following values:\n\t * * `'default'` &ndash; All \"normal\" batches. This is the most commonly used type.\n\t * * `'transparent'` &ndash; A batch that should be ignored by other features, i.e. an initial batch or collaborative editing\n\t * changes.\n\t *\n\t * @deprecated\n\t */ get type() {\n        /**\n\t\t * The {@link module:engine/model/batch~Batch#type `Batch#type` } property has been deprecated and will be removed in the near\n\t\t * future. Use `Batch#isLocal`, `Batch#isUndoable`, `Batch#isUndo` and `Batch#isTyping` instead.\n\t\t *\n\t\t * @error batch-type-deprecated\n\t\t */ logWarning('batch-type-deprecated');\n        return 'default';\n    }\n    /**\n\t * Returns the base version of this batch, which is equal to the base version of the first operation in the batch.\n\t * If there are no operations in the batch or neither operation has the base version set, it returns `null`.\n\t */ get baseVersion() {\n        for (const op of this.operations){\n            if (op.baseVersion !== null) {\n                return op.baseVersion;\n            }\n        }\n        return null;\n    }\n    /**\n\t * Adds an operation to the batch instance.\n\t *\n\t * @param operation An operation to add.\n\t * @returns The added operation.\n\t */ addOperation(operation) {\n        operation.batch = this;\n        this.operations.push(operation);\n        return operation;\n    }\n}\n\n/**\n * Calculates the difference between two model states.\n *\n * Receives operations that are to be applied on the model document. Marks parts of the model document tree which\n * are changed and saves the state of these elements before the change. Then, it compares saved elements with the\n * changed elements, after all changes are applied on the model document. Calculates the diff between saved\n * elements and new ones and returns a change set.\n */ class Differ {\n    /**\n\t * Priority of the {@link ~Differ#_elementState element states}. States on higher indexes of the array can overwrite states on the lower\n\t * indexes.\n\t */ static _statesPriority = [\n        undefined,\n        'refresh',\n        'rename',\n        'move'\n    ];\n    /**\n\t * Reference to the model's marker collection.\n\t */ _markerCollection;\n    /**\n\t * A map that stores changes that happened in a given element.\n\t *\n\t * The keys of the map are references to the model elements.\n\t * The values of the map are arrays with changes that were done on this element.\n\t */ _changesInElement = new Map();\n    /**\n\t * Stores a snapshot for these model nodes that might have changed.\n\t *\n\t * This complements {@link ~Differ#_elementChildrenSnapshots `_elementChildrenSnapshots`}.\n\t *\n\t * See also {@link ~DifferSnapshot}.\n\t */ _elementsSnapshots = new Map();\n    /**\n\t * For each element or document fragment inside which there was a change, it stores a snapshot of the child nodes list (an array\n\t * of children snapshots that represent the state in the element / fragment before any change has happened).\n\t *\n\t * This complements {@link ~Differ#_elementsSnapshots `_elementsSnapshots`}.\n\t *\n\t * See also {@link ~DifferSnapshot}.\n\t */ _elementChildrenSnapshots = new Map();\n    /**\n\t * Keeps the state for a given element, describing how the element was changed so far. It is used to evaluate the `action` property\n\t * of diff items returned by {@link ~Differ#getChanges}.\n\t *\n\t * Possible values, in the order from the lowest priority to the highest priority:\n\t *\n\t * * `'refresh'` - element was refreshed,\n\t * * `'rename'` - element was renamed,\n\t * * `'move'` - element was moved (or, usually, removed, that is moved to the graveyard).\n\t *\n\t * Element that was refreshed, may change its state to `'rename'` if it was later renamed, or to `'move'` if it was removed.\n\t * But the element cannot change its state from `'move'` to `'rename'`, or from `'rename'` to `'refresh'`.\n\t *\n\t * Only already existing elements are registered in `_elementState`. If a new element was inserted as a result of a buffered operation,\n\t * it is not be registered in `_elementState`.\n\t */ _elementState = new Map();\n    /**\n\t * A map that stores all changed markers.\n\t *\n\t * The keys of the map are marker names.\n\t *\n\t * The values of the map are objects with the following properties:\n\t *\n\t * * `oldMarkerData`,\n\t * * `newMarkerData`.\n\t */ _changedMarkers = new Map();\n    /**\n\t * A map that stores all roots that have been changed.\n\t *\n\t * The keys are the names of the roots while value represents the changes.\n\t */ _changedRoots = new Map();\n    /**\n\t * Stores the number of changes that were processed. Used to order the changes chronologically. It is important\n\t * when changes are sorted.\n\t */ _changeCount = 0;\n    /**\n\t * For efficiency purposes, `Differ` stores the change set returned by the differ after {@link #getChanges} call.\n\t * Cache is reset each time a new operation is buffered. If the cache has not been reset, {@link #getChanges} will\n\t * return the cached value instead of calculating it again.\n\t *\n\t * This property stores those changes that did not take place in graveyard root.\n\t */ _cachedChanges = null;\n    /**\n\t * For efficiency purposes, `Differ` stores the change set returned by the differ after the {@link #getChanges} call.\n\t * The cache is reset each time a new operation is buffered. If the cache has not been reset, {@link #getChanges} will\n\t * return the cached value instead of calculating it again.\n\t *\n\t * This property stores all changes evaluated by `Differ`, including those that took place in the graveyard.\n\t */ _cachedChangesWithGraveyard = null;\n    /**\n\t * Set of model items that were marked to get refreshed in {@link #_refreshItem}.\n\t */ _refreshedItems = new Set();\n    /**\n\t * Creates a `Differ` instance.\n\t *\n\t * @param markerCollection Model's marker collection.\n\t */ constructor(markerCollection){\n        this._markerCollection = markerCollection;\n    }\n    /**\n\t * Informs whether there are any changes buffered in `Differ`.\n\t */ get isEmpty() {\n        return this._changesInElement.size == 0 && this._changedMarkers.size == 0 && this._changedRoots.size == 0;\n    }\n    /**\n\t * Buffers the given operation. **An operation has to be buffered before it is executed.**\n\t *\n\t * @param operationToBuffer An operation to buffer.\n\t */ bufferOperation(operationToBuffer) {\n        // Below we take an operation, check its type, then use its parameters in marking (private) methods.\n        // The general rule is to not mark elements inside inserted element. All inserted elements are re-rendered.\n        // Marking changes in them would cause a \"double\" changing then.\n        //\n        const operation = operationToBuffer;\n        // Note: an operation that happens inside a non-loaded root will be ignored. If the operation happens partially inside\n        // a non-loaded root, that part will be ignored (this may happen for move or marker operations).\n        //\n        switch(operation.type){\n            case 'insert':\n                {\n                    if (this._isInInsertedElement(operation.position.parent)) {\n                        return;\n                    }\n                    this._markInsert(operation.position.parent, operation.position.offset, operation.nodes.maxOffset);\n                    break;\n                }\n            case 'addAttribute':\n            case 'removeAttribute':\n            case 'changeAttribute':\n                {\n                    for (const item of operation.range.getItems({\n                        shallow: true\n                    })){\n                        if (this._isInInsertedElement(item.parent)) {\n                            continue;\n                        }\n                        this._markAttribute(item);\n                    }\n                    break;\n                }\n            case 'remove':\n            case 'move':\n            case 'reinsert':\n                {\n                    // When range is moved to the same position then not mark it as a change.\n                    // See: https://github.com/ckeditor/ckeditor5-engine/issues/1664.\n                    if (operation.sourcePosition.isEqual(operation.targetPosition) || operation.sourcePosition.getShiftedBy(operation.howMany).isEqual(operation.targetPosition)) {\n                        return;\n                    }\n                    const sourceParentInserted = this._isInInsertedElement(operation.sourcePosition.parent);\n                    const targetParentInserted = this._isInInsertedElement(operation.targetPosition.parent);\n                    if (!sourceParentInserted) {\n                        this._markRemove(operation.sourcePosition.parent, operation.sourcePosition.offset, operation.howMany);\n                    }\n                    if (!targetParentInserted) {\n                        this._markInsert(operation.targetPosition.parent, operation.getMovedRangeStart().offset, operation.howMany);\n                    }\n                    // Remember -- operation is buffered before it is executed. So, it was not executed yet.\n                    const range = Range._createFromPositionAndShift(operation.sourcePosition, operation.howMany);\n                    for (const node of range.getItems({\n                        shallow: true\n                    })){\n                        this._setElementState(node, 'move');\n                    }\n                    break;\n                }\n            case 'rename':\n                {\n                    if (this._isInInsertedElement(operation.position.parent)) {\n                        return;\n                    }\n                    this._markRemove(operation.position.parent, operation.position.offset, 1);\n                    this._markInsert(operation.position.parent, operation.position.offset, 1);\n                    const range = Range._createFromPositionAndShift(operation.position, 1);\n                    for (const marker of this._markerCollection.getMarkersIntersectingRange(range)){\n                        const markerData = marker.getData();\n                        this.bufferMarkerChange(marker.name, markerData, markerData);\n                    }\n                    this._setElementState(operation.position.nodeAfter, 'rename');\n                    break;\n                }\n            case 'split':\n                {\n                    const splitElement = operation.splitPosition.parent;\n                    // Mark that children of the split element were removed.\n                    if (!this._isInInsertedElement(splitElement)) {\n                        this._markRemove(splitElement, operation.splitPosition.offset, operation.howMany);\n                        // Remember -- operation is buffered before it is executed. So, it was not executed yet.\n                        const range = Range._createFromPositionAndShift(operation.splitPosition, operation.howMany);\n                        for (const node of range.getItems({\n                            shallow: true\n                        })){\n                            this._setElementState(node, 'move');\n                        }\n                    }\n                    // Mark that the new element (split copy) was inserted.\n                    if (!this._isInInsertedElement(operation.insertionPosition.parent)) {\n                        this._markInsert(operation.insertionPosition.parent, operation.insertionPosition.offset, 1);\n                    }\n                    // If the split took the element from the graveyard, mark that the element from the graveyard was removed.\n                    if (operation.graveyardPosition) {\n                        this._markRemove(operation.graveyardPosition.parent, operation.graveyardPosition.offset, 1);\n                        this._setElementState(operation.graveyardPosition.nodeAfter, 'move');\n                    }\n                    break;\n                }\n            case 'merge':\n                {\n                    // Mark that the merged element was removed.\n                    const mergedElement = operation.sourcePosition.parent;\n                    if (!this._isInInsertedElement(mergedElement.parent)) {\n                        this._markRemove(mergedElement.parent, mergedElement.startOffset, 1);\n                    }\n                    // Mark that the merged element was inserted into graveyard.\n                    const graveyardParent = operation.graveyardPosition.parent;\n                    this._markInsert(graveyardParent, operation.graveyardPosition.offset, 1);\n                    this._setElementState(mergedElement, 'move');\n                    // Mark that children of merged element were inserted at new parent.\n                    const mergedIntoElement = operation.targetPosition.parent;\n                    if (!this._isInInsertedElement(mergedIntoElement)) {\n                        this._markInsert(mergedIntoElement, operation.targetPosition.offset, mergedElement.maxOffset);\n                        // Remember -- operation is buffered before it is executed. So, it was not executed yet.\n                        const range = Range._createFromPositionAndShift(operation.sourcePosition, operation.howMany);\n                        for (const node of range.getItems({\n                            shallow: true\n                        })){\n                            this._setElementState(node, 'move');\n                        }\n                    }\n                    break;\n                }\n            case 'detachRoot':\n            case 'addRoot':\n                {\n                    const root = operation.affectedSelectable;\n                    if (!root._isLoaded) {\n                        return;\n                    }\n                    // Don't buffer if the root state does not change.\n                    if (root.isAttached() == operation.isAdd) {\n                        return;\n                    }\n                    this._bufferRootStateChange(operation.rootName, operation.isAdd);\n                    break;\n                }\n            case 'addRootAttribute':\n            case 'removeRootAttribute':\n            case 'changeRootAttribute':\n                {\n                    if (!operation.root._isLoaded) {\n                        return;\n                    }\n                    const rootName = operation.root.rootName;\n                    this._bufferRootAttributeChange(rootName, operation.key, operation.oldValue, operation.newValue);\n                    break;\n                }\n        }\n        // Clear cache after each buffered operation as it is no longer valid.\n        this._cachedChanges = null;\n    }\n    /**\n\t * Buffers a marker change.\n\t *\n\t * @param markerName The name of the marker that changed.\n\t * @param oldMarkerData Marker data before the change.\n\t * @param newMarkerData Marker data after the change.\n\t */ bufferMarkerChange(markerName, oldMarkerData, newMarkerData) {\n        if (oldMarkerData.range && oldMarkerData.range.root.is('rootElement') && !oldMarkerData.range.root._isLoaded) {\n            oldMarkerData.range = null;\n        }\n        if (newMarkerData.range && newMarkerData.range.root.is('rootElement') && !newMarkerData.range.root._isLoaded) {\n            newMarkerData.range = null;\n        }\n        let buffered = this._changedMarkers.get(markerName);\n        if (!buffered) {\n            buffered = {\n                newMarkerData,\n                oldMarkerData\n            };\n            this._changedMarkers.set(markerName, buffered);\n        } else {\n            buffered.newMarkerData = newMarkerData;\n        }\n        if (buffered.oldMarkerData.range == null && newMarkerData.range == null) {\n            // The marker is going to be removed (`newMarkerData.range == null`) but it did not exist before the first buffered change\n            // (`buffered.oldMarkerData.range == null`). In this case, do not keep the marker in buffer at all.\n            this._changedMarkers.delete(markerName);\n        }\n    }\n    /**\n\t * Returns all markers that should be removed as a result of buffered changes.\n\t *\n\t * @returns Markers to remove. Each array item is an object containing the `name` and `range` properties.\n\t */ getMarkersToRemove() {\n        const result = [];\n        for (const [name, change] of this._changedMarkers){\n            if (change.oldMarkerData.range != null) {\n                result.push({\n                    name,\n                    range: change.oldMarkerData.range\n                });\n            }\n        }\n        return result;\n    }\n    /**\n\t * Returns all markers which should be added as a result of buffered changes.\n\t *\n\t * @returns Markers to add. Each array item is an object containing the `name` and `range` properties.\n\t */ getMarkersToAdd() {\n        const result = [];\n        for (const [name, change] of this._changedMarkers){\n            if (change.newMarkerData.range != null) {\n                result.push({\n                    name,\n                    range: change.newMarkerData.range\n                });\n            }\n        }\n        return result;\n    }\n    /**\n\t * Returns all markers which changed.\n\t */ getChangedMarkers() {\n        return Array.from(this._changedMarkers).map(([name, change])=>({\n                name,\n                data: {\n                    oldRange: change.oldMarkerData.range,\n                    newRange: change.newMarkerData.range\n                }\n            }));\n    }\n    /**\n\t * Checks whether some of the buffered changes affect the editor data.\n\t *\n\t * Types of changes which affect the editor data:\n\t *\n\t * * model structure changes,\n\t * * attribute changes,\n\t * * a root is added or detached,\n\t * * changes of markers which were defined as `affectsData`,\n\t * * changes of markers' `affectsData` property.\n\t */ hasDataChanges() {\n        if (this.getChanges().length) {\n            return true;\n        }\n        if (this._changedRoots.size > 0) {\n            return true;\n        }\n        for (const { newMarkerData, oldMarkerData } of this._changedMarkers.values()){\n            if (newMarkerData.affectsData !== oldMarkerData.affectsData) {\n                return true;\n            }\n            if (newMarkerData.affectsData) {\n                const markerAdded = newMarkerData.range && !oldMarkerData.range;\n                const markerRemoved = !newMarkerData.range && oldMarkerData.range;\n                const markerChanged = newMarkerData.range && oldMarkerData.range && !newMarkerData.range.isEqual(oldMarkerData.range);\n                if (markerAdded || markerRemoved || markerChanged) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n    /**\n\t * Calculates the diff between the old model tree state (the state before the first buffered operations since the last {@link #reset}\n\t * call) and the new model tree state (actual one). It should be called after all buffered operations are executed.\n\t *\n\t * The diff set is returned as an array of {@link module:engine/model/differ~DiffItem diff items}, each describing a change done\n\t * on the model. The items are sorted by the position on which the change happened. If a position\n\t * {@link module:engine/model/position~Position#isBefore is before} another one, it will be on an earlier index in the diff set.\n\t *\n\t * **Note**: Elements inside inserted element will not have a separate diff item, only the top most element change will be reported.\n\t *\n\t * Because calculating the diff is a costly operation, the result is cached. If no new operation was buffered since the\n\t * previous {@link #getChanges} call, the next call will return the cached value.\n\t *\n\t * @param options Additional options.\n\t * @param options.includeChangesInGraveyard If set to `true`, also changes that happened\n\t * in the graveyard root will be returned. By default, changes in the graveyard root are not returned.\n\t * @returns Diff between the old and the new model tree state.\n\t */ getChanges(options = {}) {\n        // If there are cached changes, just return them instead of calculating changes again.\n        if (this._cachedChanges) {\n            if (options.includeChangesInGraveyard) {\n                return this._cachedChangesWithGraveyard.slice();\n            } else {\n                return this._cachedChanges.slice();\n            }\n        }\n        // Will contain returned results.\n        let diffSet = [];\n        // Check all changed elements/roots.\n        for (const element of this._changesInElement.keys()){\n            // Get changes inside this element/root and sort them.\n            const changes = this._changesInElement.get(element).sort((a, b)=>{\n                if (a.offset === b.offset) {\n                    if (a.type != b.type) {\n                        // If there are multiple changes at the same position, \"remove\" change should be first.\n                        // If the order is different, for example, we would first add some nodes and then removed them\n                        // (instead of the nodes that we should remove).\n                        return a.type == 'remove' ? -1 : 1;\n                    }\n                    return 0;\n                }\n                return a.offset < b.offset ? -1 : 1;\n            });\n            // Get children of this element before any change was applied on it.\n            const childrenBefore = this._elementChildrenSnapshots.get(element);\n            // Get snapshot of current element's children.\n            const childrenAfter = _getChildrenSnapshots(element.getChildren());\n            // Generate diff instructions based on changes done in the element/root.\n            const diffInstructions = _generateDiffInstructionsFromChanges(childrenBefore.length, changes);\n            let i = 0; // Iterator in `childrenAfter` array -- iterates through current children of element.\n            let j = 0; // Iterator in `childrenBefore` array -- iterates through old children of element.\n            // Process every action.\n            for (const instruction of diffInstructions){\n                if (instruction === 'i') {\n                    const action = this._getDiffActionForNode(childrenAfter[i].node, 'insert');\n                    const childSnapshotBefore = this._elementsSnapshots.get(childrenAfter[i].node);\n                    const diffItem = this._getInsertDiff(element, i, action, childrenAfter[i], childSnapshotBefore);\n                    diffSet.push(diffItem);\n                    i++;\n                } else if (instruction === 'r') {\n                    const action = this._getDiffActionForNode(childrenBefore[j].node, 'remove');\n                    const diffItem = this._getRemoveDiff(element, i, action, childrenBefore[j]);\n                    diffSet.push(diffItem);\n                    j++;\n                } else if (instruction === 'a') {\n                    // Take attributes from saved and current children.\n                    const beforeAttributes = childrenBefore[j].attributes;\n                    const afterAttributes = childrenAfter[i].attributes;\n                    let range;\n                    if (childrenAfter[i].name == '$text') {\n                        range = new Range(Position._createAt(element, i), Position._createAt(element, i + 1));\n                    } else {\n                        const index = element.offsetToIndex(i);\n                        range = new Range(Position._createAt(element, i), Position._createAt(element.getChild(index), 0));\n                    }\n                    // Generate diff items for this change (there might be multiple attributes changed and\n                    // there is a single diff for each of them) and insert them into the diff set.\n                    const diffItems = this._getAttributesDiff(range, beforeAttributes, afterAttributes);\n                    diffSet.push(...diffItems);\n                    i++;\n                    j++;\n                } else {\n                    // `action` is 'equal'. Child not changed.\n                    i++;\n                    j++;\n                }\n            }\n        }\n        // Then, sort the changes by the position (change at position before other changes is first).\n        diffSet.sort((a, b)=>{\n            // If the change is in different root, we don't care much, but we'd like to have all changes in given\n            // root \"together\" in the array. So let's just sort them by the root name. It does not matter which root\n            // will be processed first.\n            if (a.position.root != b.position.root) {\n                return a.position.root.rootName < b.position.root.rootName ? -1 : 1;\n            }\n            // If change happens at the same position...\n            if (a.position.isEqual(b.position)) {\n                // Keep chronological order of operations.\n                return a.changeCount - b.changeCount;\n            }\n            // If positions differ, position \"on the left\" should be earlier in the result.\n            return a.position.isBefore(b.position) ? -1 : 1;\n        });\n        // Glue together multiple changes (mostly on text nodes).\n        for(let i = 1, prevIndex = 0; i < diffSet.length; i++){\n            const prevDiff = diffSet[prevIndex];\n            const thisDiff = diffSet[i];\n            // Glue remove changes if they happen on text on same position.\n            const isConsecutiveTextRemove = prevDiff.type == 'remove' && thisDiff.type == 'remove' && prevDiff.name == '$text' && thisDiff.name == '$text' && prevDiff.position.isEqual(thisDiff.position);\n            // Glue insert changes if they happen on text on consecutive fragments.\n            const isConsecutiveTextAdd = prevDiff.type == 'insert' && thisDiff.type == 'insert' && prevDiff.name == '$text' && thisDiff.name == '$text' && prevDiff.position.parent == thisDiff.position.parent && prevDiff.position.offset + prevDiff.length == thisDiff.position.offset;\n            // Glue attribute changes if they happen on consecutive fragments and have same key, old value and new value.\n            const isConsecutiveAttributeChange = prevDiff.type == 'attribute' && thisDiff.type == 'attribute' && prevDiff.position.parent == thisDiff.position.parent && prevDiff.range.isFlat && thisDiff.range.isFlat && prevDiff.position.offset + prevDiff.length == thisDiff.position.offset && prevDiff.attributeKey == thisDiff.attributeKey && prevDiff.attributeOldValue == thisDiff.attributeOldValue && prevDiff.attributeNewValue == thisDiff.attributeNewValue;\n            if (isConsecutiveTextRemove || isConsecutiveTextAdd || isConsecutiveAttributeChange) {\n                prevDiff.length++;\n                if (isConsecutiveAttributeChange) {\n                    prevDiff.range.end = prevDiff.range.end.getShiftedBy(1);\n                }\n                diffSet[i] = null;\n            } else {\n                prevIndex = i;\n            }\n        }\n        diffSet = diffSet.filter((v)=>v);\n        // Remove `changeCount` property from diff items. It is used only for sorting and is internal thing.\n        for (const item of diffSet){\n            delete item.changeCount;\n            if (item.type == 'attribute') {\n                delete item.position;\n                delete item.length;\n            }\n        }\n        this._changeCount = 0;\n        // Cache changes.\n        this._cachedChangesWithGraveyard = diffSet;\n        this._cachedChanges = diffSet.filter(_changesInGraveyardFilter);\n        if (options.includeChangesInGraveyard) {\n            return this._cachedChangesWithGraveyard.slice();\n        } else {\n            return this._cachedChanges.slice();\n        }\n    }\n    /**\n\t * Returns all roots that have changed (either were attached, or detached, or their attributes changed).\n\t *\n\t * @returns Diff between the old and the new roots state.\n\t */ getChangedRoots() {\n        return Array.from(this._changedRoots.values()).map((diffItem)=>{\n            const entry = {\n                ...diffItem\n            };\n            if (entry.state !== undefined) {\n                // The root was attached or detached -- do not return its attributes changes.\n                // If the root was attached, it should be handled as a whole, together with its attributes, the same way as model nodes.\n                // If the root was detached, its attributes should be discarded anyway.\n                //\n                // Keep in mind that filtering must happen on this stage (when retrieving changes). If filtering happens on-the-fly as\n                // the attributes change, it may lead to incorrect situation, e.g.: detach root, change attribute, re-attach root.\n                // In this case, attribute change cannot be filtered. After the root is re-attached, the attribute change must be kept.\n                delete entry.attributes;\n            }\n            return entry;\n        });\n    }\n    /**\n\t * Returns a set of model items that were marked to get refreshed.\n\t */ getRefreshedItems() {\n        return new Set(this._refreshedItems);\n    }\n    /**\n\t * Resets `Differ`. Removes all buffered changes.\n\t */ reset() {\n        this._changesInElement.clear();\n        this._elementChildrenSnapshots.clear();\n        this._elementsSnapshots.clear();\n        this._elementState.clear();\n        this._changedMarkers.clear();\n        this._changedRoots.clear();\n        this._refreshedItems.clear();\n        this._cachedChanges = null;\n    }\n    /**\n\t * Marks the given `item` in differ to be \"refreshed\". It means that the item will be marked as removed and inserted\n\t * in the differ changes set, so it will be effectively re-converted when the differ changes are handled by a dispatcher.\n\t *\n\t * @internal\n\t * @param item Item to refresh.\n\t */ _refreshItem(item) {\n        if (this._isInInsertedElement(item.parent)) {\n            return;\n        }\n        this._markRemove(item.parent, item.startOffset, item.offsetSize);\n        this._markInsert(item.parent, item.startOffset, item.offsetSize);\n        this._refreshedItems.add(item);\n        this._setElementState(item, 'refresh');\n        const range = Range._createOn(item);\n        for (const marker of this._markerCollection.getMarkersIntersectingRange(range)){\n            const markerData = marker.getData();\n            this.bufferMarkerChange(marker.name, markerData, markerData);\n        }\n        // Clear cache after each buffered operation as it is no longer valid.\n        this._cachedChanges = null;\n    }\n    /**\n\t * Buffers all the data related to given root like it was all just added to the editor.\n\t *\n\t * Following changes are buffered:\n\t *\n\t * * root is attached,\n\t * * all root content is inserted,\n\t * * all root attributes are added,\n\t * * all markers inside the root are added.\n\t *\n\t * @internal\n\t */ _bufferRootLoad(root) {\n        if (!root.isAttached()) {\n            return;\n        }\n        this._bufferRootStateChange(root.rootName, true);\n        this._markInsert(root, 0, root.maxOffset);\n        // Buffering root attribute changes makes sense and is actually needed, even though we buffer root state change above.\n        // Because the root state change is buffered, the root attributes changes are not returned by the differ.\n        // But, if the root attribute is removed in the same change block, or the root is detached, then the differ results would be wrong.\n        //\n        for (const key of root.getAttributeKeys()){\n            this._bufferRootAttributeChange(root.rootName, key, null, root.getAttribute(key));\n        }\n        for (const marker of this._markerCollection){\n            if (marker.getRange().root == root) {\n                const markerData = marker.getData();\n                this.bufferMarkerChange(marker.name, {\n                    ...markerData,\n                    range: null\n                }, markerData);\n            }\n        }\n    }\n    /**\n\t * Buffers the root state change after the root was attached or detached\n\t */ _bufferRootStateChange(rootName, isAttached) {\n        if (!this._changedRoots.has(rootName)) {\n            this._changedRoots.set(rootName, {\n                name: rootName,\n                state: isAttached ? 'attached' : 'detached'\n            });\n            return;\n        }\n        const diffItem = this._changedRoots.get(rootName);\n        if (diffItem.state !== undefined) {\n            // Root `state` can only toggle between one of the values and no value. It cannot be any other way,\n            // because if the root was originally attached it can only become detached. Then, if it is re-attached in the same batch of\n            // changes, it gets back to \"no change\" (which means no value). Same if the root was originally detached.\n            delete diffItem.state;\n            if (diffItem.attributes === undefined) {\n                // If there is no `state` change and no `attributes` change, remove the entry.\n                this._changedRoots.delete(rootName);\n            }\n        } else {\n            diffItem.state = isAttached ? 'attached' : 'detached';\n        }\n    }\n    /**\n\t * Buffers a root attribute change.\n\t */ _bufferRootAttributeChange(rootName, key, oldValue, newValue) {\n        const diffItem = this._changedRoots.get(rootName) || {\n            name: rootName\n        };\n        const attrs = diffItem.attributes || {};\n        if (attrs[key]) {\n            // If this attribute or metadata was already changed earlier and is changed again, check to what value it is changed.\n            const attrEntry = attrs[key];\n            if (newValue === attrEntry.oldValue) {\n                // If it was changed back to the old value, remove the entry.\n                delete attrs[key];\n            } else {\n                // If it was changed to a different value, update the entry.\n                attrEntry.newValue = newValue;\n            }\n        } else {\n            // If this attribute or metadata was not set earlier, add an entry.\n            attrs[key] = {\n                oldValue,\n                newValue\n            };\n        }\n        if (Object.entries(attrs).length === 0) {\n            // If attributes or metadata changes set became empty, remove it from the diff item.\n            delete diffItem.attributes;\n            if (diffItem.state === undefined) {\n                // If there is no `state` change and no `attributes` change, remove the entry.\n                this._changedRoots.delete(rootName);\n            }\n        } else {\n            // Make sure that, if a new object in the structure was created, it gets set.\n            diffItem.attributes = attrs;\n            this._changedRoots.set(rootName, diffItem);\n        }\n    }\n    /**\n\t * Saves and handles an insert change.\n\t */ _markInsert(parent, offset, howMany) {\n        if (parent.root.is('rootElement') && !parent.root._isLoaded) {\n            return;\n        }\n        const changeItem = {\n            type: 'insert',\n            offset,\n            howMany,\n            count: this._changeCount++\n        };\n        this._markChange(parent, changeItem);\n    }\n    /**\n\t * Saves and handles a remove change.\n\t */ _markRemove(parent, offset, howMany) {\n        if (parent.root.is('rootElement') && !parent.root._isLoaded) {\n            return;\n        }\n        const changeItem = {\n            type: 'remove',\n            offset,\n            howMany,\n            count: this._changeCount++\n        };\n        this._markChange(parent, changeItem);\n        this._removeAllNestedChanges(parent, offset, howMany);\n    }\n    /**\n\t * Saves and handles an attribute change.\n\t */ _markAttribute(item) {\n        if (item.root.is('rootElement') && !item.root._isLoaded) {\n            return;\n        }\n        const changeItem = {\n            type: 'attribute',\n            offset: item.startOffset,\n            howMany: item.offsetSize,\n            count: this._changeCount++\n        };\n        this._markChange(item.parent, changeItem);\n    }\n    /**\n\t * Saves and handles a model change.\n\t */ _markChange(parent, changeItem) {\n        // First, make a snapshot of the parent and its children (it will be made only if it was not made before).\n        this._makeSnapshots(parent);\n        // Then, get all changes that already were done on the element (empty array if this is the first change).\n        const changes = this._getChangesForElement(parent);\n        // Then, look through all the changes, and transform them or the new change.\n        this._handleChange(changeItem, changes);\n        // Add the new change.\n        changes.push(changeItem);\n        // Remove incorrect changes. During transformation some change might be, for example, included in another.\n        // In that case, the change will have `howMany` property set to `0` or less. We need to remove those changes.\n        for(let i = 0; i < changes.length; i++){\n            if (changes[i].howMany < 1) {\n                changes.splice(i, 1);\n                i--;\n            }\n        }\n    }\n    /**\n\t * Tries to set given state for given item.\n\t *\n\t * This method does simple validation (it sets the state only for model elements, not for text proxy nodes). It also follows state\n\t * setting rules, that is, `'refresh'` cannot overwrite `'rename'`, and `'rename'` cannot overwrite `'move'`.\n\t */ _setElementState(node, state) {\n        if (!node.is('element')) {\n            return;\n        }\n        const currentStatePriority = Differ._statesPriority.indexOf(this._elementState.get(node));\n        const newStatePriority = Differ._statesPriority.indexOf(state);\n        if (newStatePriority > currentStatePriority) {\n            this._elementState.set(node, state);\n        }\n    }\n    /**\n\t * Returns a value for {@link ~DifferItemAction `action`} property for diff items returned by {@link ~Differ#getChanges}.\n\t * This method aims to return `'rename'` or `'refresh'` when it should, and `diffItemType` (\"default action\") in all other cases.\n\t *\n\t * It bases on a few factors:\n\t *\n\t * * for text nodes, the method always returns `diffItemType`,\n\t * * for newly inserted element, the method returns `diffItemType`,\n\t * * if {@link ~Differ#_elementState element state} was not recorded, the method returns `diffItemType`,\n\t * * if state was recorded, and it was `'move'` (default action), the method returns `diffItemType`,\n\t * * finally, if state was `'refresh'` or `'rename'`, the method returns the state value.\n\t */ _getDiffActionForNode(node, diffItemType) {\n        if (!node.is('element')) {\n            // Text node.\n            return diffItemType;\n        }\n        if (!this._elementsSnapshots.has(node)) {\n            // Newly inserted element.\n            return diffItemType;\n        }\n        const state = this._elementState.get(node);\n        if (!state || state == 'move') {\n            return diffItemType;\n        }\n        return state;\n    }\n    /**\n\t * Gets an array of changes that have already been saved for a given element.\n\t */ _getChangesForElement(element) {\n        let changes;\n        if (this._changesInElement.has(element)) {\n            changes = this._changesInElement.get(element);\n        } else {\n            changes = [];\n            this._changesInElement.set(element, changes);\n        }\n        return changes;\n    }\n    /**\n\t * Creates and saves a snapshot for all children of the given element.\n\t */ _makeSnapshots(element) {\n        if (this._elementChildrenSnapshots.has(element)) {\n            return;\n        }\n        const childrenSnapshots = _getChildrenSnapshots(element.getChildren());\n        this._elementChildrenSnapshots.set(element, childrenSnapshots);\n        for (const snapshot of childrenSnapshots){\n            this._elementsSnapshots.set(snapshot.node, snapshot);\n        }\n    }\n    /**\n\t * For a given newly saved change, compares it with a change already done on the element and modifies the incoming\n\t * change and/or the old change.\n\t *\n\t * @param inc Incoming (new) change.\n\t * @param changes An array containing all the changes done on that element.\n\t */ _handleChange(inc, changes) {\n        // We need a helper variable that will store how many nodes are to be still handled for this change item.\n        // `nodesToHandle` (how many nodes still need to be handled) and `howMany` (how many nodes were affected)\n        // needs to be differentiated.\n        //\n        // This comes up when there are multiple changes that are affected by `inc` change item.\n        //\n        // For example: assume two insert changes: `{ offset: 2, howMany: 1 }` and `{ offset: 5, howMany: 1 }`.\n        // Assume that `inc` change is remove `{ offset: 2, howMany: 2, nodesToHandle: 2 }`.\n        //\n        // Then, we:\n        // - \"forget\" about first insert change (it is \"eaten\" by remove),\n        // - because of that, at the end we will want to remove only one node (`nodesToHandle = 1`),\n        // - but still we have to change offset of the second insert change from `5` to `3`!\n        //\n        // So, `howMany` does not change throughout items transformation and keeps information about how many nodes were affected,\n        // while `nodesToHandle` means how many nodes need to be handled after the change item is transformed by other changes.\n        inc.nodesToHandle = inc.howMany;\n        for (const old of changes){\n            const incEnd = inc.offset + inc.howMany;\n            const oldEnd = old.offset + old.howMany;\n            if (inc.type == 'insert') {\n                if (old.type == 'insert') {\n                    if (inc.offset <= old.offset) {\n                        old.offset += inc.howMany;\n                    } else if (inc.offset < oldEnd) {\n                        old.howMany += inc.nodesToHandle;\n                        inc.nodesToHandle = 0;\n                    }\n                }\n                if (old.type == 'remove') {\n                    if (inc.offset < old.offset) {\n                        old.offset += inc.howMany;\n                    }\n                }\n                if (old.type == 'attribute') {\n                    if (inc.offset <= old.offset) {\n                        old.offset += inc.howMany;\n                    } else if (inc.offset < oldEnd) {\n                        // This case is more complicated, because attribute change has to be split into two.\n                        // Example (assume that uppercase and lowercase letters mean different attributes):\n                        //\n                        // initial state:\t\tabcxyz\n                        // attribute change:\taBCXYz\n                        // incoming insert:\t\taBCfooXYz\n                        //\n                        // Change ranges cannot intersect because each item has to be described exactly (it was either\n                        // not changed, inserted, removed, or its attribute was changed). That's why old attribute\n                        // change has to be split and both parts has to be handled separately from now on.\n                        const howMany = old.howMany;\n                        old.howMany = inc.offset - old.offset;\n                        // Add the second part of attribute change to the beginning of processed array so it won't\n                        // be processed again in this loop.\n                        changes.unshift({\n                            type: 'attribute',\n                            offset: incEnd,\n                            howMany: howMany - old.howMany,\n                            count: this._changeCount++\n                        });\n                    }\n                }\n            }\n            if (inc.type == 'remove') {\n                if (old.type == 'insert') {\n                    if (incEnd <= old.offset) {\n                        old.offset -= inc.howMany;\n                    } else if (incEnd <= oldEnd) {\n                        if (inc.offset < old.offset) {\n                            const intersectionLength = incEnd - old.offset;\n                            old.offset = inc.offset;\n                            old.howMany -= intersectionLength;\n                            inc.nodesToHandle -= intersectionLength;\n                        } else {\n                            old.howMany -= inc.nodesToHandle;\n                            inc.nodesToHandle = 0;\n                        }\n                    } else {\n                        if (inc.offset <= old.offset) {\n                            inc.nodesToHandle -= old.howMany;\n                            old.howMany = 0;\n                        } else if (inc.offset < oldEnd) {\n                            const intersectionLength = oldEnd - inc.offset;\n                            old.howMany -= intersectionLength;\n                            inc.nodesToHandle -= intersectionLength;\n                        }\n                    }\n                }\n                if (old.type == 'remove') {\n                    if (incEnd <= old.offset) {\n                        old.offset -= inc.howMany;\n                    } else if (inc.offset < old.offset) {\n                        inc.nodesToHandle += old.howMany;\n                        old.howMany = 0;\n                    }\n                }\n                if (old.type == 'attribute') {\n                    if (incEnd <= old.offset) {\n                        old.offset -= inc.howMany;\n                    } else if (inc.offset < old.offset) {\n                        const intersectionLength = incEnd - old.offset;\n                        old.offset = inc.offset;\n                        old.howMany -= intersectionLength;\n                    } else if (inc.offset < oldEnd) {\n                        if (incEnd <= oldEnd) {\n                            // On first sight in this case we don't need to split attribute operation into two.\n                            // However the changes set is later converted to actions (see `_generateActionsFromChanges`).\n                            // For that reason, no two changes may intersect.\n                            // So we cannot have an attribute change that \"contains\" remove change.\n                            // Attribute change needs to be split.\n                            const howMany = old.howMany;\n                            old.howMany = inc.offset - old.offset;\n                            const howManyAfter = howMany - old.howMany - inc.nodesToHandle;\n                            // Add the second part of attribute change to the beginning of processed array so it won't\n                            // be processed again in this loop.\n                            changes.unshift({\n                                type: 'attribute',\n                                offset: inc.offset,\n                                howMany: howManyAfter,\n                                count: this._changeCount++\n                            });\n                        } else {\n                            old.howMany -= oldEnd - inc.offset;\n                        }\n                    }\n                }\n            }\n            if (inc.type == 'attribute') {\n                // In case of attribute change, `howMany` should be kept same as `nodesToHandle`. It's not an error.\n                if (old.type == 'insert') {\n                    if (inc.offset < old.offset && incEnd > old.offset) {\n                        if (incEnd > oldEnd) {\n                            // This case is similar to a case described when incoming change was insert and old change was attribute.\n                            // See comment above.\n                            //\n                            // This time incoming change is attribute. We need to split incoming change in this case too.\n                            // However this time, the second part of the attribute change needs to be processed further\n                            // because there might be other changes that it collides with.\n                            const attributePart = {\n                                type: 'attribute',\n                                offset: oldEnd,\n                                howMany: incEnd - oldEnd,\n                                count: this._changeCount++\n                            };\n                            this._handleChange(attributePart, changes);\n                            changes.push(attributePart);\n                        }\n                        inc.nodesToHandle = old.offset - inc.offset;\n                        inc.howMany = inc.nodesToHandle;\n                    } else if (inc.offset >= old.offset && inc.offset < oldEnd) {\n                        if (incEnd > oldEnd) {\n                            inc.nodesToHandle = incEnd - oldEnd;\n                            inc.offset = oldEnd;\n                        } else {\n                            inc.nodesToHandle = 0;\n                        }\n                    }\n                }\n                if (old.type == 'remove') {\n                    // This is a case when attribute change \"contains\" remove change.\n                    // The attribute change needs to be split into two because changes cannot intersect.\n                    if (inc.offset < old.offset && incEnd > old.offset) {\n                        const attributePart = {\n                            type: 'attribute',\n                            offset: old.offset,\n                            howMany: incEnd - old.offset,\n                            count: this._changeCount++\n                        };\n                        this._handleChange(attributePart, changes);\n                        changes.push(attributePart);\n                        inc.nodesToHandle = old.offset - inc.offset;\n                        inc.howMany = inc.nodesToHandle;\n                    }\n                }\n                if (old.type == 'attribute') {\n                    // There are only two conflicting scenarios possible here:\n                    if (inc.offset >= old.offset && incEnd <= oldEnd) {\n                        // `old` change includes `inc` change, or they are the same.\n                        inc.nodesToHandle = 0;\n                        inc.howMany = 0;\n                        inc.offset = 0;\n                    } else if (inc.offset <= old.offset && incEnd >= oldEnd) {\n                        // `inc` change includes `old` change.\n                        old.howMany = 0;\n                    }\n                }\n            }\n        }\n        inc.howMany = inc.nodesToHandle;\n        delete inc.nodesToHandle;\n    }\n    /**\n\t * Returns an object with a single insert change description.\n\t *\n\t * @param parent The element in which the change happened.\n\t * @param offset The offset at which change happened.\n\t * @param action Further specifies what kind of action led to generating this change.\n\t * @param elementSnapshot Snapshot of the inserted node after changes.\n\t * @param elementSnapshotBefore Snapshot of the inserted node before changes.\n\t * @returns The diff item.\n\t */ _getInsertDiff(parent, offset, action, elementSnapshot, elementSnapshotBefore) {\n        const diffItem = {\n            type: 'insert',\n            position: Position._createAt(parent, offset),\n            name: elementSnapshot.name,\n            attributes: new Map(elementSnapshot.attributes),\n            length: 1,\n            changeCount: this._changeCount++,\n            action\n        };\n        if (action != 'insert' && elementSnapshotBefore) {\n            diffItem.before = {\n                name: elementSnapshotBefore.name,\n                attributes: new Map(elementSnapshotBefore.attributes)\n            };\n        }\n        return diffItem;\n    }\n    /**\n\t * Returns an object with a single remove change description.\n\t *\n\t * @param parent The element in which change happened.\n\t * @param offset The offset at which change happened.\n\t * @param action Further specifies what kind of action led to generating this change.\n\t * @param elementSnapshot The snapshot of the removed node before changes.\n\t * @returns The diff item.\n\t */ _getRemoveDiff(parent, offset, action, elementSnapshot) {\n        return {\n            type: 'remove',\n            action,\n            position: Position._createAt(parent, offset),\n            name: elementSnapshot.name,\n            attributes: new Map(elementSnapshot.attributes),\n            length: 1,\n            changeCount: this._changeCount++\n        };\n    }\n    /**\n\t * Returns an array of objects where each one is a single attribute change description.\n\t *\n\t * @param range The range where the change happened.\n\t * @param oldAttributes A map, map iterator or compatible object that contains attributes before the change.\n\t * @param newAttributes A map, map iterator or compatible object that contains attributes after the change.\n\t * @returns An array containing one or more diff items.\n\t */ _getAttributesDiff(range, oldAttributes, newAttributes) {\n        // Results holder.\n        const diffs = [];\n        // Clone new attributes as we will be performing changes on this object.\n        newAttributes = new Map(newAttributes);\n        // Look through old attributes.\n        for (const [key, oldValue] of oldAttributes){\n            // Check what is the new value of the attribute (or if it was removed).\n            const newValue = newAttributes.has(key) ? newAttributes.get(key) : null;\n            // If values are different (or attribute was removed)...\n            if (newValue !== oldValue) {\n                // Add diff item.\n                diffs.push({\n                    type: 'attribute',\n                    position: range.start,\n                    range: range.clone(),\n                    length: 1,\n                    attributeKey: key,\n                    attributeOldValue: oldValue,\n                    attributeNewValue: newValue,\n                    changeCount: this._changeCount++\n                });\n            }\n            // Prevent returning two diff items for the same change.\n            newAttributes.delete(key);\n        }\n        // Look through new attributes that weren't handled above.\n        for (const [key, newValue] of newAttributes){\n            // Each of them is a new attribute. Add diff item.\n            diffs.push({\n                type: 'attribute',\n                position: range.start,\n                range: range.clone(),\n                length: 1,\n                attributeKey: key,\n                attributeOldValue: null,\n                attributeNewValue: newValue,\n                changeCount: this._changeCount++\n            });\n        }\n        return diffs;\n    }\n    /**\n\t * Checks whether given element or any of its parents is an element that is buffered as an inserted element.\n\t */ _isInInsertedElement(element) {\n        const parent = element.parent;\n        if (!parent) {\n            return false;\n        }\n        const changes = this._changesInElement.get(parent);\n        const offset = element.startOffset;\n        if (changes) {\n            for (const change of changes){\n                if (change.type == 'insert' && offset >= change.offset && offset < change.offset + change.howMany) {\n                    return true;\n                }\n            }\n        }\n        return this._isInInsertedElement(parent);\n    }\n    /**\n\t * Removes deeply all buffered changes that are registered in elements from range specified by `parent`, `offset`\n\t * and `howMany`.\n\t */ _removeAllNestedChanges(parent, offset, howMany) {\n        const range = new Range(Position._createAt(parent, offset), Position._createAt(parent, offset + howMany));\n        for (const item of range.getItems({\n            shallow: true\n        })){\n            if (item.is('element')) {\n                this._changesInElement.delete(item);\n                this._removeAllNestedChanges(item, 0, item.maxOffset);\n            }\n        }\n    }\n}\n/**\n * Returns a snapshot for the specified child node. Text node snapshots have the `name` property set to `$text`.\n */ function _getSingleNodeSnapshot(node) {\n    return {\n        node,\n        name: node.is('$text') ? '$text' : node.name,\n        attributes: new Map(node.getAttributes())\n    };\n}\n/**\n * Returns an array that is a copy of passed child list with the exception that text nodes are split to one or more\n * objects, each representing one character and attributes set on that character.\n */ function _getChildrenSnapshots(children) {\n    const snapshots = [];\n    for (const child of children){\n        if (child.is('$text')) {\n            for(let i = 0; i < child.data.length; ++i){\n                snapshots.push(_getSingleNodeSnapshot(child));\n            }\n        } else {\n            snapshots.push(_getSingleNodeSnapshot(child));\n        }\n    }\n    return snapshots;\n}\n/**\n * Generates array of diff instructions for given changes set.\n *\n * Generated actions are:\n *\n * - 'e' for 'equal' - when item at that position did not change,\n * - 'i' for 'insert' - when item at that position was inserted,\n * - 'r' for 'remove' - when item at that position was removed,\n * - 'a' for 'attribute' - when item at that position has it attributes changed.\n *\n * Example (assume that uppercase letters have bold attribute, compare with function code):\n *\n * children before:\tfooBAR\n * children after:\tfoxybAR\n *\n * changes: type: remove, offset: 1, howMany: 1\n *\t\t\ttype: insert, offset: 2, howMany: 2\n *\t\t\ttype: attribute, offset: 4, howMany: 1\n *\n * Expected actions: equal (f), remove (o), equal (o), insert (x), insert (y), attribute (b), equal (A), equal (R)\n *\n * Steps taken by the script:\n *\n * 1. change = \"type: remove, offset: 1, howMany: 1\"; offset = 0; oldChildrenHandled = 0\n *    1.1 between this change and the beginning is one not-changed node, fill with one equal action, one old child has been handled\n *    1.2 this change removes one node, add one remove action\n *    1.3 change last visited `offset` to 1\n *    1.4 since an old child has been removed, one more old child has been handled\n *    1.5 actions at this point are: equal, remove\n *\n * 2. change = \"type: insert, offset: 2, howMany: 2\"; offset = 1; oldChildrenHandled = 2\n *    2.1 between this change and previous change is one not-changed node, add equal action, another one old children has been handled\n *    2.2 this change inserts two nodes, add two insert actions\n *    2.3 change last visited offset to the end of the inserted range, that is 4\n *    2.4 actions at this point are: equal, remove, equal, insert, insert\n *\n * 3. change = \"type: attribute, offset: 4, howMany: 1\"; offset = 4, oldChildrenHandled = 3\n *    3.1 between this change and previous change are no not-changed nodes\n *    3.2 this change changes one node, add one attribute action\n *    3.3 change last visited `offset` to the end of change range, that is 5\n *    3.4 since an old child has been changed, one more old child has been handled\n *    3.5 actions at this point are: equal, remove, equal, insert, insert, attribute\n *\n * 4. after loop oldChildrenHandled = 4, oldChildrenLength = 6 (fooBAR is 6 characters)\n *    4.1 fill up with two equal actions\n *\n * The result actions are: equal, remove, equal, insert, insert, attribute, equal, equal.\n */ function _generateDiffInstructionsFromChanges(oldChildrenLength, changes) {\n    const diff = [];\n    let offset = 0;\n    let oldChildrenHandled = 0;\n    // Go through all buffered changes.\n    for (const change of changes){\n        // First, fill \"holes\" between changes with \"equal\" actions.\n        if (change.offset > offset) {\n            for(let i = 0; i < change.offset - offset; i++){\n                diff.push('e');\n            }\n            oldChildrenHandled += change.offset - offset;\n        }\n        // Then, fill up actions accordingly to change type.\n        if (change.type == 'insert') {\n            for(let i = 0; i < change.howMany; i++){\n                diff.push('i');\n            }\n            // The last handled offset is after inserted range.\n            offset = change.offset + change.howMany;\n        } else if (change.type == 'remove') {\n            for(let i = 0; i < change.howMany; i++){\n                diff.push('r');\n            }\n            // The last handled offset is at the position where the nodes were removed.\n            offset = change.offset;\n            // We removed `howMany` old nodes, update `oldChildrenHandled`.\n            oldChildrenHandled += change.howMany;\n        } else {\n            // Total maximum amount of arguments that can be passed to `Array.prototype.push` may be limited so we need to\n            // add them manually one by one to avoid this limit. However loop might be a bit slower than `push` method on\n            // smaller changesets so we need to decide which method to use based on the size of the change.\n            // See: https://github.com/ckeditor/ckeditor5/issues/16819\n            if (change.howMany > 1500) {\n                for(let i = 0; i < change.howMany; i++){\n                    diff.push('a');\n                }\n            } else {\n                diff.push(...'a'.repeat(change.howMany).split(''));\n            }\n            // The last handled offset is at the position after the changed range.\n            offset = change.offset + change.howMany;\n            // We changed `howMany` old nodes, update `oldChildrenHandled`.\n            oldChildrenHandled += change.howMany;\n        }\n    }\n    // Fill \"equal\" actions at the end of actions set. Use `oldChildrenHandled` to see how many children\n    // has not been changed / removed at the end of their parent.\n    if (oldChildrenHandled < oldChildrenLength) {\n        for(let i = 0; i < oldChildrenLength - oldChildrenHandled - offset; i++){\n            diff.push('e');\n        }\n    }\n    return diff;\n}\n/**\n * Filter callback for `Array.filter` that filters out change entries that are in graveyard.\n */ function _changesInGraveyardFilter(entry) {\n    const posInGy = 'position' in entry && entry.position.root.rootName == '$graveyard';\n    const rangeInGy = 'range' in entry && entry.range.root.rootName == '$graveyard';\n    return !posInGy && !rangeInGy;\n}\n\n/**\n * @module engine/model/history\n */ /**\n * `History` keeps the track of all the operations applied to the {@link module:engine/model/document~Document document}.\n */ class History {\n    /**\n\t * Operations added to the history.\n\t */ _operations = [];\n    /**\n\t * Holds an information which {@link module:engine/model/operation/operation~Operation operation} undoes which\n\t * {@link module:engine/model/operation/operation~Operation operation}.\n\t *\n\t * Keys of the map are \"undoing operations\", that is operations that undone some other operations. For each key, the\n\t * value is an operation that has been undone by the \"undoing operation\".\n\t */ _undoPairs = new Map();\n    /**\n\t * Holds all undone operations.\n\t */ _undoneOperations = new Set();\n    /**\n\t * A map that allows retrieving the operations fast based on the given base version.\n\t */ _baseVersionToOperationIndex = new Map();\n    /**\n\t * The history version.\n\t */ _version = 0;\n    /**\n\t * The gap pairs kept in the <from,to> format.\n\t *\n\t * Anytime the `history.version` is set to a version larger than `history.version + 1`,\n\t * a new <lastHistoryVersion, newHistoryVersion> entry is added to the map.\n\t */ _gaps = new Map();\n    /**\n\t * The version of the last operation in the history.\n\t *\n\t * The history version is incremented automatically when a new operation is added to the history.\n\t * Setting the version manually should be done only in rare circumstances when a gap is planned\n\t * between history versions. When doing so, a gap will be created and the history will accept adding\n\t * an operation with base version equal to the new history version.\n\t */ get version() {\n        return this._version;\n    }\n    set version(version) {\n        // Store a gap if there are some operations already in the history and the\n        // new version does not increment the latest one.\n        if (this._operations.length && version > this._version + 1) {\n            this._gaps.set(this._version, version);\n        }\n        this._version = version;\n    }\n    /**\n\t * The last history operation.\n\t */ get lastOperation() {\n        return this._operations[this._operations.length - 1];\n    }\n    /**\n\t * Adds an operation to the history and increments the history version.\n\t *\n\t * The operation's base version should be equal to the history version. Otherwise an error is thrown.\n\t */ addOperation(operation) {\n        if (operation.baseVersion !== this.version) {\n            /**\n\t\t\t * Only operations with matching versions can be added to the history.\n\t\t\t *\n\t\t\t * @error model-document-history-addoperation-incorrect-version\n\t\t\t * @param errorData The operation and the current document history version.\n\t\t\t */ throw new CKEditorError('model-document-history-addoperation-incorrect-version', this, {\n                operation,\n                historyVersion: this.version\n            });\n        }\n        this._operations.push(operation);\n        this._version++;\n        this._baseVersionToOperationIndex.set(operation.baseVersion, this._operations.length - 1);\n    }\n    /**\n\t * Returns operations from the given range of operation base versions that were added to the history.\n\t *\n\t * Note that there may be gaps in operations base versions.\n\t *\n\t * @param fromBaseVersion Base version from which operations should be returned (inclusive).\n\t * @param toBaseVersion Base version up to which operations should be returned (exclusive).\n     * @returns History operations for the given range, in chronological order.\n\t */ getOperations(fromBaseVersion, toBaseVersion = this.version) {\n        // When there is no operation in the history, return an empty array.\n        // After that we can be sure that `firstOperation`, `lastOperation` are not nullish.\n        if (!this._operations.length) {\n            return [];\n        }\n        const firstOperation = this._operations[0];\n        if (fromBaseVersion === undefined) {\n            fromBaseVersion = firstOperation.baseVersion;\n        }\n        // Change exclusive `toBaseVersion` to inclusive, so it will refer to the actual index.\n        // Thanks to that mapping from base versions to operation indexes are possible.\n        let inclusiveTo = toBaseVersion - 1;\n        // Check if \"from\" or \"to\" point to a gap between versions.\n        // If yes, then change the incorrect position to the proper side of the gap.\n        // Thanks to it, it will be possible to get index of the operation.\n        for (const [gapFrom, gapTo] of this._gaps){\n            if (fromBaseVersion > gapFrom && fromBaseVersion < gapTo) {\n                fromBaseVersion = gapTo;\n            }\n            if (inclusiveTo > gapFrom && inclusiveTo < gapTo) {\n                inclusiveTo = gapFrom - 1;\n            }\n        }\n        // If the whole range is outside of the operation versions, then return an empty array.\n        if (inclusiveTo < firstOperation.baseVersion || fromBaseVersion > this.lastOperation.baseVersion) {\n            return [];\n        }\n        let fromIndex = this._baseVersionToOperationIndex.get(fromBaseVersion);\n        // If the range starts before the first operation, then use the first operation as the range's start.\n        if (fromIndex === undefined) {\n            fromIndex = 0;\n        }\n        let toIndex = this._baseVersionToOperationIndex.get(inclusiveTo);\n        // If the range ends after the last operation, then use the last operation as the range's end.\n        if (toIndex === undefined) {\n            toIndex = this._operations.length - 1;\n        }\n        // Return the part of the history operations based on the calculated start index and end index.\n        return this._operations.slice(fromIndex, // The `toIndex` should be included in the returned operations, so add `1`.\n        toIndex + 1);\n    }\n    /**\n\t * Returns operation from the history that bases on given `baseVersion`.\n\t *\n\t * @param baseVersion Base version of the operation to get.\n\t * @returns Operation with given base version or `undefined` if there is no such operation in history.\n\t */ getOperation(baseVersion) {\n        const operationIndex = this._baseVersionToOperationIndex.get(baseVersion);\n        if (operationIndex === undefined) {\n            return;\n        }\n        return this._operations[operationIndex];\n    }\n    /**\n\t * Marks in history that one operation is an operation that is undoing the other operation. By marking operation this way,\n\t * history is keeping more context information about operations, which helps in operational transformation.\n\t *\n\t * @param undoneOperation Operation which is undone by `undoingOperation`.\n\t * @param undoingOperation Operation which undoes `undoneOperation`.\n\t */ setOperationAsUndone(undoneOperation, undoingOperation) {\n        this._undoPairs.set(undoingOperation, undoneOperation);\n        this._undoneOperations.add(undoneOperation);\n    }\n    /**\n\t * Checks whether given `operation` is undoing any other operation.\n\t *\n\t * @param operation Operation to check.\n\t * @returns `true` if given `operation` is undoing any other operation, `false` otherwise.\n\t */ isUndoingOperation(operation) {\n        return this._undoPairs.has(operation);\n    }\n    /**\n\t * Checks whether given `operation` has been undone by any other operation.\n\t *\n\t * @param operation Operation to check.\n\t * @returns `true` if given `operation` has been undone any other operation, `false` otherwise.\n\t */ isUndoneOperation(operation) {\n        return this._undoneOperations.has(operation);\n    }\n    /**\n\t * For given `undoingOperation`, returns the operation which has been undone by it.\n\t *\n\t * @returns Operation that has been undone by given `undoingOperation` or `undefined`\n\t * if given `undoingOperation` is not undoing any other operation.\n\t */ getUndoneOperation(undoingOperation) {\n        return this._undoPairs.get(undoingOperation);\n    }\n    /**\n\t * Resets the history of operations.\n\t */ reset() {\n        this._version = 0;\n        this._undoPairs = new Map();\n        this._operations = [];\n        this._undoneOperations = new Set();\n        this._gaps = new Map();\n        this._baseVersionToOperationIndex = new Map();\n    }\n}\n\n/**\n * Type of {@link module:engine/model/element~Element} that is a root of a model tree.\n */ class RootElement extends Element {\n    /**\n\t * Unique root name used to identify this root element by {@link module:engine/model/document~Document}.\n\t */ rootName;\n    /**\n\t * Document that is an owner of this root.\n\t */ _document;\n    /**\n\t * @internal\n\t */ _isAttached = true;\n    /**\n\t * Informs if the root element is loaded (default).\n\t *\n\t * @internal\n\t */ _isLoaded = true;\n    /**\n\t * Creates root element.\n\t *\n\t * @param document Document that is an owner of this root.\n\t * @param name Node name.\n\t * @param rootName Unique root name used to identify this root element by {@link module:engine/model/document~Document}.\n\t */ constructor(document, name, rootName = 'main'){\n        super(name);\n        this._document = document;\n        this.rootName = rootName;\n    }\n    /**\n\t * {@link module:engine/model/document~Document Document} that owns this root element.\n\t */ get document() {\n        return this._document;\n    }\n    /**\n\t * Informs if the root element is currently attached to the document, or not.\n\t *\n\t * A detached root is equivalent to being removed and cannot contain any children or markers.\n\t *\n\t * By default, a newly added root is attached. It can be detached using\n\t * {@link module:engine/model/writer~Writer#detachRoot `Writer#detachRoot`}. A detached root can be re-attached again using\n\t * {@link module:engine/model/writer~Writer#addRoot `Writer#addRoot`}.\n\t */ isAttached() {\n        return this._isAttached;\n    }\n    /**\n\t * Converts `RootElement` instance to `string` containing its name.\n\t *\n\t * @returns `RootElement` instance converted to `string`.\n\t */ toJSON() {\n        return this.rootName;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nRootElement.prototype.is = function(type, name) {\n    if (!name) {\n        return type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n        type === 'element' || type === 'model:element' || type === 'node' || type === 'model:node';\n    }\n    return name === this.name && (type === 'rootElement' || type === 'model:rootElement' || // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.\n    type === 'element' || type === 'model:element');\n};\n\n// @if CK_DEBUG_ENGINE // const { logDocument } = require( '../dev-utils/utils' );\nconst graveyardName = '$graveyard';\n/**\n * Data model's document. It contains the model's structure, its selection and the history of changes.\n *\n * Read more about working with the model in\n * {@glink framework/architecture/editing-engine#model introduction to the the editing engine's architecture}.\n *\n * Usually, the document contains just one {@link module:engine/model/document~Document#roots root element}, so\n * you can retrieve it by just calling {@link module:engine/model/document~Document#getRoot} without specifying its name:\n *\n * ```ts\n * model.document.getRoot(); // -> returns the main root\n * ```\n *\n * However, the document may contain multiple roots – e.g. when the editor has multiple editable areas\n * (e.g. a title and a body of a message).\n */ class Document extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * The {@link module:engine/model/model~Model model} that the document is a part of.\n\t */ model;\n    /**\n\t * The document's history.\n\t */ history;\n    /**\n\t * The selection in this document.\n\t */ selection;\n    /**\n\t * A list of roots that are owned and managed by this document. Use {@link #createRoot}, {@link #getRoot} and\n\t * {@link #getRootNames} to manipulate it.\n\t */ roots;\n    /**\n\t * The model differ object. Its role is to buffer changes done on the model document and then calculate a diff of those changes.\n\t */ differ;\n    /**\n\t * Defines whether the document is in a read-only mode.\n\t *\n\t * The user should not be able to change the data of a document that is read-only.\n\t *\n\t * @readonly\n\t */ isReadOnly;\n    /**\n\t * Post-fixer callbacks registered to the model document.\n\t */ _postFixers;\n    /**\n\t * A flag that indicates whether the selection has changed since last change block.\n\t */ _hasSelectionChangedFromTheLastChangeBlock;\n    /**\n\t * Creates an empty document instance with no {@link #roots} (other than\n\t * the {@link #graveyard graveyard root}).\n\t */ constructor(model){\n        super();\n        this.model = model;\n        this.history = new History();\n        this.selection = new DocumentSelection(this);\n        this.roots = new Collection({\n            idProperty: 'rootName'\n        });\n        this.differ = new Differ(model.markers);\n        this.isReadOnly = false;\n        this._postFixers = new Set();\n        this._hasSelectionChangedFromTheLastChangeBlock = false;\n        // Graveyard tree root. Document always have a graveyard root, which stores removed nodes.\n        this.createRoot('$root', graveyardName);\n        // Then, still before an operation is applied on model, buffer the change in differ.\n        this.listenTo(model, 'applyOperation', (evt, args)=>{\n            const operation = args[0];\n            if (operation.isDocumentOperation) {\n                this.differ.bufferOperation(operation);\n            }\n        }, {\n            priority: 'high'\n        });\n        // After the operation is applied, bump document's version and add the operation to the history.\n        this.listenTo(model, 'applyOperation', (evt, args)=>{\n            const operation = args[0];\n            if (operation.isDocumentOperation) {\n                this.history.addOperation(operation);\n            }\n        }, {\n            priority: 'low'\n        });\n        // Listen to selection changes. If selection changed, mark it.\n        this.listenTo(this.selection, 'change', ()=>{\n            this._hasSelectionChangedFromTheLastChangeBlock = true;\n        });\n        // Buffer marker changes.\n        // This is not covered in buffering operations because markers may change outside of them (when they\n        // are modified using `model.markers` collection, not through `MarkerOperation`).\n        this.listenTo(model.markers, 'update', (evt, marker, oldRange, newRange, oldMarkerData)=>{\n            // Copy the `newRange` to the new marker data as during the marker removal the range is not updated.\n            const newMarkerData = {\n                ...marker.getData(),\n                range: newRange\n            };\n            // Whenever marker is updated, buffer that change.\n            this.differ.bufferMarkerChange(marker.name, oldMarkerData, newMarkerData);\n            if (oldRange === null) {\n                // If this is a new marker, add a listener that will buffer change whenever marker changes.\n                marker.on('change', (evt, oldRange)=>{\n                    const markerData = marker.getData();\n                    this.differ.bufferMarkerChange(marker.name, {\n                        ...markerData,\n                        range: oldRange\n                    }, markerData);\n                });\n            }\n        });\n        // This is a solution for a problem that may occur during real-time editing. If one client detached a root and another added\n        // something there at the same moment, the OT does not solve this problem currently. In such situation, the added elements would\n        // stay in the detached root.\n        //\n        // This is incorrect, a detached root should be empty and all elements from it should be removed. To solve this, the post-fixer will\n        // remove any element that is left in a detached root.\n        //\n        // Similarly, markers that are created at the beginning or at the end of the detached root will not be removed as well.\n        //\n        // The drawback of this solution over the OT solution is that the elements removed by the post-fixer will never be brought back.\n        // If the root detachment gets undone (and the root is brought back), the removed elements will not be there.\n        this.registerPostFixer((writer)=>{\n            let result = false;\n            for (const root of this.roots){\n                if (!root.isAttached() && !root.isEmpty) {\n                    writer.remove(writer.createRangeIn(root));\n                    result = true;\n                }\n            }\n            for (const marker of this.model.markers){\n                if (!marker.getRange().root.isAttached()) {\n                    writer.removeMarker(marker);\n                    result = true;\n                }\n            }\n            return result;\n        });\n    }\n    /**\n\t * The document version. Every applied operation increases the version number. It is used to\n\t * ensure that operations are applied on a proper document version.\n\t *\n\t * This property is equal to {@link module:engine/model/history~History#version `model.Document#history#version`}.\n\t *\n\t * If the {@link module:engine/model/operation/operation~Operation#baseVersion base version} does not match the document version,\n\t * a {@link module:utils/ckeditorerror~CKEditorError model-document-applyoperation-wrong-version} error is thrown.\n\t */ get version() {\n        return this.history.version;\n    }\n    set version(version) {\n        this.history.version = version;\n    }\n    /**\n\t * The graveyard tree root. A document always has a graveyard root that stores removed nodes.\n\t */ get graveyard() {\n        return this.getRoot(graveyardName);\n    }\n    /**\n\t * Creates a new root.\n\t *\n\t * **Note:** do not use this method after the editor has been initialized! If you want to dynamically add a root, use\n\t * {@link module:engine/model/writer~Writer#addRoot `model.Writer#addRoot`} instead.\n\t *\n\t * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined\n\t * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.\n\t * @param rootName A unique root name.\n\t * @returns The created root.\n\t */ createRoot(elementName = '$root', rootName = 'main') {\n        if (this.roots.get(rootName)) {\n            /**\n\t\t\t * A root with the specified name already exists.\n\t\t\t *\n\t\t\t * @error model-document-createroot-name-exists\n\t\t\t */ throw new CKEditorError('model-document-createroot-name-exists', this, {\n                name: rootName\n            });\n        }\n        const root = new RootElement(this, elementName, rootName);\n        this.roots.add(root);\n        return root;\n    }\n    /**\n\t * Removes all event listeners set by the document instance.\n\t */ destroy() {\n        this.selection.destroy();\n        this.stopListening();\n    }\n    /**\n\t * Returns a root by its name.\n\t *\n\t * Detached roots are returned by this method. This is to be able to operate on the detached root (for example, to be able to create\n\t * a position inside such a root for undo feature purposes).\n\t *\n\t * @param name The root name of the root to return.\n\t * @returns The root registered under a given name or `null` when there is no root with the given name.\n\t */ getRoot(name = 'main') {\n        return this.roots.get(name);\n    }\n    /**\n\t * Returns an array with names of all roots added to the document (except the {@link #graveyard graveyard root}).\n\t *\n\t * Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate\n\t * on the document data know which roots are still a part of the document and should be processed.\n\t *\n\t * @param includeDetached Specified whether detached roots should be returned as well.\n\t */ getRootNames(includeDetached = false) {\n        return this.getRoots(includeDetached).map((root)=>root.rootName);\n    }\n    /**\n\t * Returns an array with all roots added to the document (except the {@link #graveyard graveyard root}).\n\t *\n\t * Detached roots **are not** returned by this method by default. This is to make sure that all features or algorithms that operate\n\t * on the document data know which roots are still a part of the document and should be processed.\n\t *\n\t * @param includeDetached Specified whether detached roots should be returned as well.\n\t */ getRoots(includeDetached = false) {\n        return this.roots.filter((root)=>root != this.graveyard && (includeDetached || root.isAttached()) && root._isLoaded);\n    }\n    /**\n\t * Used to register a post-fixer callback. A post-fixer mechanism guarantees that the features\n\t * will operate on a correct model state.\n\t *\n\t * An execution of a feature may lead to an incorrect document tree state. The callbacks are used to fix the document tree after\n\t * it has changed. Post-fixers are fired just after all changes from the outermost change block were applied but\n\t * before the {@link module:engine/model/document~Document#event:change change event} is fired. If a post-fixer callback made\n\t * a change, it should return `true`. When this happens, all post-fixers are fired again to check if something else should\n\t * not be fixed in the new document tree state.\n\t *\n\t * As a parameter, a post-fixer callback receives a {@link module:engine/model/writer~Writer writer} instance connected with the\n\t * executed changes block. Thanks to that, all changes done by the callback will be added to the same\n\t * {@link module:engine/model/batch~Batch batch} (and undo step) as the original changes. This makes post-fixer changes transparent\n\t * for the user.\n\t *\n\t * An example of a post-fixer is a callback that checks if all the data were removed from the editor. If so, the\n\t * callback should add an empty paragraph so that the editor is never empty:\n\t *\n\t * ```ts\n\t * document.registerPostFixer( writer => {\n\t * \tconst changes = document.differ.getChanges();\n\t *\n\t * \t// Check if the changes lead to an empty root in the editor.\n\t * \tfor ( const entry of changes ) {\n\t * \t\tif ( entry.type == 'remove' && entry.position.root.isEmpty ) {\n\t * \t\t\twriter.insertElement( 'paragraph', entry.position.root, 0 );\n\t *\n\t * \t\t\t// It is fine to return early, even if multiple roots would need to be fixed.\n\t * \t\t\t// All post-fixers will be fired again, so if there are more empty roots, those will be fixed, too.\n\t * \t\t\treturn true;\n\t * \t\t}\n\t * \t}\n\t *\n\t * \treturn false;\n\t * } );\n\t * ```\n\t */ registerPostFixer(postFixer) {\n        this._postFixers.add(postFixer);\n    }\n    /**\n\t * A custom `toJSON()` method to solve child-parent circular dependencies.\n\t *\n\t * @returns A clone of this object with the document property changed to a string.\n\t */ toJSON() {\n        const json = clone(this);\n        // Due to circular references we need to remove parent reference.\n        json.selection = '[engine.model.DocumentSelection]';\n        json.model = '[engine.model.Model]';\n        return json;\n    }\n    /**\n\t * Check if there were any changes done on document, and if so, call post-fixers,\n\t * fire `change` event for features and conversion and then reset the differ.\n\t * Fire `change:data` event when at least one operation or buffered marker changes the data.\n\t *\n\t * @internal\n\t * @fires change\n\t * @fires change:data\n\t * @param writer The writer on which post-fixers will be called.\n\t */ _handleChangeBlock(writer) {\n        if (this._hasDocumentChangedFromTheLastChangeBlock()) {\n            this._callPostFixers(writer);\n            // Refresh selection attributes according to the final position in the model after the change.\n            this.selection.refresh();\n            if (this.differ.hasDataChanges()) {\n                this.fire('change:data', writer.batch);\n            } else {\n                this.fire('change', writer.batch);\n            }\n            // Theoretically, it is not necessary to refresh selection after change event because\n            // post-fixers are the last who should change the model, but just in case...\n            this.selection.refresh();\n            this.differ.reset();\n        }\n        this._hasSelectionChangedFromTheLastChangeBlock = false;\n    }\n    /**\n\t * Returns whether there is a buffered change or if the selection has changed from the last\n\t * {@link module:engine/model/model~Model#enqueueChange `enqueueChange()` block}\n\t * or {@link module:engine/model/model~Model#change `change()` block}.\n\t *\n\t * @returns Returns `true` if document has changed from the last `change()` or `enqueueChange()` block.\n\t */ _hasDocumentChangedFromTheLastChangeBlock() {\n        return !this.differ.isEmpty || this._hasSelectionChangedFromTheLastChangeBlock;\n    }\n    /**\n\t * Returns the default root for this document which is either the first root that was added to the document using\n\t * {@link #createRoot} or the {@link #graveyard graveyard root} if no other roots were created.\n\t *\n\t * @returns The default root for this document.\n\t */ _getDefaultRoot() {\n        const roots = this.getRoots();\n        return roots.length ? roots[0] : this.graveyard;\n    }\n    /**\n\t * Returns the default range for this selection. The default range is a collapsed range that starts and ends\n\t * at the beginning of this selection's document {@link #_getDefaultRoot default root}.\n\t *\n\t * @internal\n\t */ _getDefaultRange() {\n        const defaultRoot = this._getDefaultRoot();\n        const model = this.model;\n        const schema = model.schema;\n        // Find the first position where the selection can be put.\n        const position = model.createPositionFromPath(defaultRoot, [\n            0\n        ]);\n        const nearestRange = schema.getNearestSelectionRange(position);\n        // If valid selection range is not found - return range collapsed at the beginning of the root.\n        return nearestRange || model.createRange(position);\n    }\n    /**\n\t * Checks whether a given {@link module:engine/model/range~Range range} is a valid range for\n\t * the {@link #selection document's selection}.\n\t *\n\t * @internal\n\t * @param range A range to check.\n\t * @returns `true` if `range` is valid, `false` otherwise.\n\t */ _validateSelectionRange(range) {\n        return validateTextNodePosition(range.start) && validateTextNodePosition(range.end);\n    }\n    /**\n\t * Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.\n\t *\n\t * @param writer The writer on which post-fixer callbacks will be called.\n\t */ _callPostFixers(writer) {\n        let wasFixed = false;\n        do {\n            for (const callback of this._postFixers){\n                // Ensure selection attributes are up to date before each post-fixer.\n                // https://github.com/ckeditor/ckeditor5-engine/issues/1673.\n                //\n                // It might be good to refresh the selection after each operation but at the moment it leads\n                // to losing attributes for composition or and spell checking\n                // https://github.com/ckeditor/ckeditor5-typing/issues/188\n                this.selection.refresh();\n                wasFixed = callback(writer);\n                if (wasFixed) {\n                    break;\n                }\n            }\n        }while (wasFixed)\n    }\n}\n/**\n * Checks whether given range boundary position is valid for document selection, meaning that is not between\n * unicode surrogate pairs or base character and combining marks.\n */ function validateTextNodePosition(rangeBoundary) {\n    const textNode = rangeBoundary.textNode;\n    if (textNode) {\n        const data = textNode.data;\n        const offset = rangeBoundary.offset - textNode.startOffset;\n        return !isInsideSurrogatePair(data, offset) && !isInsideCombinedSymbol(data, offset);\n    }\n    return true;\n}\n\n/**\n * The collection of all {@link module:engine/model/markercollection~Marker markers} attached to the document.\n * It lets you {@link module:engine/model/markercollection~MarkerCollection#get get} markers or track them using\n * {@link module:engine/model/markercollection~MarkerCollection#event:update} event.\n *\n * To create, change or remove makers use {@link module:engine/model/writer~Writer model writers'} methods:\n * {@link module:engine/model/writer~Writer#addMarker} or {@link module:engine/model/writer~Writer#removeMarker}. Since\n * the writer is the only proper way to change the data model it is not possible to change markers directly using this\n * collection. All markers created by the writer will be automatically added to this collection.\n *\n * By default there is one marker collection available as {@link module:engine/model/model~Model#markers model property}.\n *\n * @see module:engine/model/markercollection~Marker\n */ class MarkerCollection extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * Stores {@link ~Marker markers} added to the collection.\n\t */ _markers = new Map();\n    /**\n\t * Iterable interface.\n\t *\n\t * Iterates over all {@link ~Marker markers} added to the collection.\n\t */ [Symbol.iterator]() {\n        return this._markers.values();\n    }\n    /**\n\t * Checks if given {@link ~Marker marker} or marker name is in the collection.\n\t *\n\t * @param markerOrName Name of marker or marker instance to check.\n\t * @returns `true` if marker is in the collection, `false` otherwise.\n\t */ has(markerOrName) {\n        const markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n        return this._markers.has(markerName);\n    }\n    /**\n\t * Returns {@link ~Marker marker} with given `markerName`.\n\t *\n\t * @param markerName Name of marker to get.\n\t * @returns Marker with given name or `null` if such marker was\n\t * not added to the collection.\n\t */ get(markerName) {\n        return this._markers.get(markerName) || null;\n    }\n    /**\n\t * Creates and adds a {@link ~Marker marker} to the `MarkerCollection` with given name on given\n\t * {@link module:engine/model/range~Range range}.\n\t *\n\t * If `MarkerCollection` already had a marker with given name (or {@link ~Marker marker} was passed), the marker in\n\t * collection is updated and {@link module:engine/model/markercollection~MarkerCollection#event:update} event is fired\n\t * but only if there was a change (marker range or {@link module:engine/model/markercollection~Marker#managedUsingOperations}\n\t * flag has changed.\n\t *\n\t * @internal\n\t * @fires update\n\t * @param markerOrName Name of marker to set or marker instance to update.\n\t * @param range Marker range.\n\t * @param managedUsingOperations Specifies whether the marker is managed using operations.\n\t * @param affectsData Specifies whether the marker affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t * @returns `Marker` instance which was added or updated.\n\t */ _set(markerOrName, range, managedUsingOperations = false, affectsData = false) {\n        const markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n        if (markerName.includes(',')) {\n            /**\n\t\t\t * Marker name cannot contain the \",\" character.\n\t\t\t *\n\t\t\t * @error markercollection-incorrect-marker-name\n\t\t\t */ throw new CKEditorError('markercollection-incorrect-marker-name', this);\n        }\n        const oldMarker = this._markers.get(markerName);\n        if (oldMarker) {\n            const oldMarkerData = oldMarker.getData();\n            const oldRange = oldMarker.getRange();\n            let hasChanged = false;\n            if (!oldRange.isEqual(range)) {\n                oldMarker._attachLiveRange(LiveRange.fromRange(range));\n                hasChanged = true;\n            }\n            if (managedUsingOperations != oldMarker.managedUsingOperations) {\n                oldMarker._managedUsingOperations = managedUsingOperations;\n                hasChanged = true;\n            }\n            if (typeof affectsData === 'boolean' && affectsData != oldMarker.affectsData) {\n                oldMarker._affectsData = affectsData;\n                hasChanged = true;\n            }\n            if (hasChanged) {\n                this.fire(`update:${markerName}`, oldMarker, oldRange, range, oldMarkerData);\n            }\n            return oldMarker;\n        }\n        const liveRange = LiveRange.fromRange(range);\n        const marker = new Marker(markerName, liveRange, managedUsingOperations, affectsData);\n        this._markers.set(markerName, marker);\n        this.fire(`update:${markerName}`, marker, null, range, {\n            ...marker.getData(),\n            range: null\n        });\n        return marker;\n    }\n    /**\n\t * Removes given {@link ~Marker marker} or a marker with given name from the `MarkerCollection`.\n\t *\n\t * @internal\n\t * @fires update\n\t * @param markerOrName Marker or name of a marker to remove.\n\t * @returns `true` if marker was found and removed, `false` otherwise.\n\t */ _remove(markerOrName) {\n        const markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n        const oldMarker = this._markers.get(markerName);\n        if (oldMarker) {\n            this._markers.delete(markerName);\n            this.fire(`update:${markerName}`, oldMarker, oldMarker.getRange(), null, oldMarker.getData());\n            this._destroyMarker(oldMarker);\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Fires an {@link module:engine/model/markercollection~MarkerCollection#event:update} event for the given {@link ~Marker marker}\n\t * but does not change the marker. Useful to force {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher downcast\n\t * conversion} for the marker.\n\t *\n\t * @internal\n\t * @fires update\n\t * @param markerOrName Marker or name of a marker to refresh.\n\t */ _refresh(markerOrName) {\n        const markerName = markerOrName instanceof Marker ? markerOrName.name : markerOrName;\n        const marker = this._markers.get(markerName);\n        if (!marker) {\n            /**\n\t\t\t * Marker with provided name does not exists.\n\t\t\t *\n\t\t\t * @error markercollection-refresh-marker-not-exists\n\t\t\t */ throw new CKEditorError('markercollection-refresh-marker-not-exists', this);\n        }\n        const range = marker.getRange();\n        this.fire(`update:${markerName}`, marker, range, range, marker.getData());\n    }\n    /**\n\t * Returns iterator that iterates over all markers, which ranges contain given {@link module:engine/model/position~Position position}.\n\t */ *getMarkersAtPosition(position) {\n        for (const marker of this){\n            if (marker.getRange().containsPosition(position)) {\n                yield marker;\n            }\n        }\n    }\n    /**\n\t * Returns iterator that iterates over all markers, which intersects with given {@link module:engine/model/range~Range range}.\n\t */ *getMarkersIntersectingRange(range) {\n        for (const marker of this){\n            if (marker.getRange().getIntersection(range) !== null) {\n                yield marker;\n            }\n        }\n    }\n    /**\n\t * Destroys marker collection and all markers inside it.\n\t */ destroy() {\n        for (const marker of this._markers.values()){\n            this._destroyMarker(marker);\n        }\n        this._markers = null;\n        this.stopListening();\n    }\n    /**\n\t * Iterates over all markers that starts with given `prefix`.\n\t *\n\t * ```ts\n\t * const markerFooA = markersCollection._set( 'foo:a', rangeFooA );\n\t * const markerFooB = markersCollection._set( 'foo:b', rangeFooB );\n\t * const markerBarA = markersCollection._set( 'bar:a', rangeBarA );\n\t * const markerFooBarA = markersCollection._set( 'foobar:a', rangeFooBarA );\n\t * Array.from( markersCollection.getMarkersGroup( 'foo' ) ); // [ markerFooA, markerFooB ]\n\t * Array.from( markersCollection.getMarkersGroup( 'a' ) ); // []\n\t * ```\n\t */ *getMarkersGroup(prefix) {\n        for (const marker of this._markers.values()){\n            if (marker.name.startsWith(prefix + ':')) {\n                yield marker;\n            }\n        }\n    }\n    /**\n\t * Destroys the marker.\n\t */ _destroyMarker(marker) {\n        marker.stopListening();\n        marker._detachLiveRange();\n    }\n}\n/**\n * `Marker` is a continuous part of the model (like a range), is named and represents some kind of information about the\n * marked part of the model document. In contrary to {@link module:engine/model/node~Node nodes}, which are building blocks of\n * the model document tree, markers are not stored directly in the document tree but in the\n * {@link module:engine/model/model~Model#markers model markers' collection}. Still, they are document data, by giving\n * additional meaning to the part of a model document between marker start and marker end.\n *\n * In this sense, markers are similar to adding and converting attributes on nodes. The difference is that attribute is\n * connected with a given node (e.g. a character is bold no matter if it gets moved or content around it changes).\n * Markers on the other hand are continuous ranges and are characterized by their start and end position. This means that\n * any character in the marker is marked by the marker. For example, if a character is moved outside of marker it stops being\n * \"special\" and the marker is shrunk. Similarly, when a character is moved into the marker from other place in document\n * model, it starts being \"special\" and the marker is enlarged.\n *\n * Another upside of markers is that finding marked part of document is fast and easy. Using attributes to mark some nodes\n * and then trying to find that part of document would require traversing whole document tree. Marker gives instant access\n * to the range which it is marking at the moment.\n *\n * Markers are built from a name and a range.\n *\n * Range of the marker is updated automatically when document changes, using\n * {@link module:engine/model/liverange~LiveRange live range} mechanism.\n *\n * Name is used to group and identify markers. Names have to be unique, but markers can be grouped by\n * using common prefixes, separated with `:`, for example: `user:john` or `search:3`. That's useful in term of creating\n * namespaces for custom elements (e.g. comments, highlights). You can use this prefixes in\n * {@link module:engine/model/markercollection~MarkerCollection#event:update} listeners to listen on changes in a group of markers.\n * For instance: `model.markers.on( 'update:user', callback );` will be called whenever any `user:*` markers changes.\n *\n * There are two types of markers.\n *\n * 1. Markers managed directly, without using operations. They are added directly by {@link module:engine/model/writer~Writer}\n * to the {@link module:engine/model/markercollection~MarkerCollection} without any additional mechanism. They can be used\n * as bookmarks or visual markers. They are great for showing results of the find, or select link when the focus is in the input.\n *\n * 1. Markers managed using operations. These markers are also stored in {@link module:engine/model/markercollection~MarkerCollection}\n * but changes in these markers is managed the same way all other changes in the model structure - using operations.\n * Therefore, they are handled in the undo stack and synchronized between clients if the collaboration plugin is enabled.\n * This type of markers is useful for solutions like spell checking or comments.\n *\n * Both type of them should be added / updated by {@link module:engine/model/writer~Writer#addMarker}\n * and removed by {@link module:engine/model/writer~Writer#removeMarker} methods.\n *\n * ```ts\n * model.change( ( writer ) => {\n * \tconst marker = writer.addMarker( name, { range, usingOperation: true } );\n *\n * \t// ...\n *\n * \twriter.removeMarker( marker );\n * } );\n * ```\n *\n * See {@link module:engine/model/writer~Writer} to find more examples.\n *\n * Since markers need to track change in the document, for efficiency reasons, it is best to create and keep as little\n * markers as possible and remove them as soon as they are not needed anymore.\n *\n * Markers can be downcasted and upcasted.\n *\n * Markers downcast happens on {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:addMarker} and\n * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:removeMarker} events.\n * Use {@link module:engine/conversion/downcasthelpers downcast converters} or attach a custom converter to mentioned events.\n * For {@link module:engine/controller/datacontroller~DataController data pipeline}, marker should be downcasted to an element.\n * Then, it can be upcasted back to a marker. Again, use {@link module:engine/conversion/upcasthelpers upcast converters} or\n * attach a custom converter to {@link module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element}.\n *\n * `Marker` instances are created and destroyed only by {@link ~MarkerCollection MarkerCollection}.\n */ class Marker extends /* #__PURE__ */ EmitterMixin(TypeCheckable) {\n    /**\n\t * Marker's name.\n\t */ name;\n    /**\n\t * Flag indicates if the marker is managed using operations or not.\n\t *\n\t * @internal\n\t */ _managedUsingOperations;\n    /**\n\t * Specifies whether the marker affects the data produced by the data pipeline\n\t * (is persisted in the editor's data).\n\t *\n\t * @internal\n\t */ _affectsData;\n    /**\n\t * Range marked by the marker.\n\t */ _liveRange;\n    /**\n\t * Creates a marker instance.\n\t *\n\t * @param name Marker name.\n\t * @param liveRange Range marked by the marker.\n\t * @param managedUsingOperations Specifies whether the marker is managed using operations.\n\t * @param affectsData Specifies whether the marker affects the data produced by the data pipeline (is persisted in the editor's data).\n\t */ constructor(name, liveRange, managedUsingOperations, affectsData){\n        super();\n        this.name = name;\n        this._liveRange = this._attachLiveRange(liveRange);\n        this._managedUsingOperations = managedUsingOperations;\n        this._affectsData = affectsData;\n    }\n    /**\n\t * A value indicating if the marker is managed using operations.\n\t * See {@link ~Marker marker class description} to learn more about marker types.\n\t * See {@link module:engine/model/writer~Writer#addMarker}.\n\t */ get managedUsingOperations() {\n        if (!this._liveRange) {\n            throw new CKEditorError('marker-destroyed', this);\n        }\n        return this._managedUsingOperations;\n    }\n    /**\n\t * A value indicating if the marker changes the data.\n\t */ get affectsData() {\n        if (!this._liveRange) {\n            throw new CKEditorError('marker-destroyed', this);\n        }\n        return this._affectsData;\n    }\n    /**\n\t * Returns the marker data (properties defining the marker).\n\t */ getData() {\n        return {\n            range: this.getRange(),\n            affectsData: this.affectsData,\n            managedUsingOperations: this.managedUsingOperations\n        };\n    }\n    /**\n\t * Returns current marker start position.\n\t */ getStart() {\n        if (!this._liveRange) {\n            throw new CKEditorError('marker-destroyed', this);\n        }\n        return this._liveRange.start.clone();\n    }\n    /**\n\t * Returns current marker end position.\n\t */ getEnd() {\n        if (!this._liveRange) {\n            throw new CKEditorError('marker-destroyed', this);\n        }\n        return this._liveRange.end.clone();\n    }\n    /**\n\t * Returns a range that represents the current state of the marker.\n\t *\n\t * Keep in mind that returned value is a {@link module:engine/model/range~Range Range}, not a\n\t * {@link module:engine/model/liverange~LiveRange LiveRange}. This means that it is up-to-date and relevant only\n\t * until next model document change. Do not store values returned by this method. Instead, store {@link ~Marker#name}\n\t * and get `Marker` instance from {@link module:engine/model/markercollection~MarkerCollection MarkerCollection} every\n\t * time there is a need to read marker properties. This will guarantee that the marker has not been removed and\n\t * that it's data is up-to-date.\n\t */ getRange() {\n        if (!this._liveRange) {\n            throw new CKEditorError('marker-destroyed', this);\n        }\n        return this._liveRange.toRange();\n    }\n    /**\n\t * Binds new live range to the marker and detach the old one if is attached.\n\t *\n\t * @internal\n\t * @param liveRange Live range to attach\n\t * @returns Attached live range.\n\t */ _attachLiveRange(liveRange) {\n        if (this._liveRange) {\n            this._detachLiveRange();\n        }\n        // Delegating does not work with namespaces. Alternatively, we could delegate all events (using `*`).\n        liveRange.delegate('change:range').to(this);\n        liveRange.delegate('change:content').to(this);\n        this._liveRange = liveRange;\n        return liveRange;\n    }\n    /**\n\t * Unbinds and destroys currently attached live range.\n\t *\n\t * @internal\n\t */ _detachLiveRange() {\n        this._liveRange.stopDelegating('change:range', this);\n        this._liveRange.stopDelegating('change:content', this);\n        this._liveRange.detach();\n        this._liveRange = null;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nMarker.prototype.is = function(type) {\n    return type === 'marker' || type === 'model:marker';\n};\n /**\n * Cannot use a {@link module:engine/model/markercollection~MarkerCollection#destroy destroyed marker} instance.\n *\n * @error marker-destroyed\n */\n\n// @if CK_DEBUG_ENGINE // const ModelRange = require( '../range' ).default;\n/**\n * Operation to permanently remove node from detached root.\n * Note this operation is only a local operation and won't be send to the other clients.\n */ class DetachOperation extends Operation {\n    /**\n\t * Position before the first {@link module:engine/model/item~Item model item} to detach.\n\t */ sourcePosition;\n    /**\n\t * Offset size of moved range.\n\t */ howMany;\n    /**\n\t * Creates an insert operation.\n\t *\n\t * @param sourcePosition Position before the first {@link module:engine/model/item~Item model item} to move.\n\t * @param howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t * `sourcePosition` with offset shifted by `howMany`.\n\t */ constructor(sourcePosition, howMany){\n        super(null);\n        this.sourcePosition = sourcePosition.clone();\n        this.howMany = howMany;\n    }\n    /**\n\t * @inheritDoc\n\t */ get type() {\n        return 'detach';\n    }\n    /**\n\t * @inheritDoc\n\t */ get affectedSelectable() {\n        return null;\n    }\n    /**\n\t * @inheritDoc\n\t */ toJSON() {\n        const json = super.toJSON();\n        json.sourcePosition = this.sourcePosition.toJSON();\n        return json;\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _validate() {\n        if (this.sourcePosition.root.document) {\n            /**\n\t\t\t * Cannot detach document node.\n\t\t\t *\n\t\t\t * @error detach-operation-on-document-node\n\t\t\t */ throw new CKEditorError('detach-operation-on-document-node', this);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t * @internal\n\t */ _execute() {\n        _remove(Range._createFromPositionAndShift(this.sourcePosition, this.howMany));\n    }\n    /**\n\t * @inheritDoc\n\t */ static get className() {\n        return 'DetachOperation';\n    }\n}\n\n// @if CK_DEBUG_ENGINE // const { stringifyMap } = require( '../dev-utils/utils' );\n/**\n * DocumentFragment represents a part of model which does not have a common root but its top-level nodes\n * can be seen as siblings. In other words, it is a detached part of model tree, without a root.\n *\n * DocumentFragment has own {@link module:engine/model/markercollection~MarkerCollection}. Markers from this collection\n * will be set to the {@link module:engine/model/model~Model#markers model markers} by a\n * {@link module:engine/model/writer~Writer#insert} function.\n */ class DocumentFragment extends TypeCheckable {\n    /**\n\t * DocumentFragment static markers map. This is a list of names and {@link module:engine/model/range~Range ranges}\n\t * which will be set as Markers to {@link module:engine/model/model~Model#markers model markers collection}\n\t * when DocumentFragment will be inserted to the document.\n\t */ markers = new Map();\n    /**\n\t * List of nodes contained inside the document fragment.\n\t */ _children = new NodeList();\n    /**\n\t * Creates an empty `DocumentFragment`.\n\t *\n\t * **Note:** Constructor of this class shouldn't be used directly in the code.\n\t * Use the {@link module:engine/model/writer~Writer#createDocumentFragment} method instead.\n\t *\n\t * @internal\n\t * @param children Nodes to be contained inside the `DocumentFragment`.\n\t */ constructor(children){\n        super();\n        if (children) {\n            this._insertChild(0, children);\n        }\n    }\n    /**\n\t * Returns an iterator that iterates over all nodes contained inside this document fragment.\n\t */ [Symbol.iterator]() {\n        return this.getChildren();\n    }\n    /**\n\t * Number of this document fragment's children.\n\t */ get childCount() {\n        return this._children.length;\n    }\n    /**\n\t * Sum of {@link module:engine/model/node~Node#offsetSize offset sizes} of all of this document fragment's children.\n\t */ get maxOffset() {\n        return this._children.maxOffset;\n    }\n    /**\n\t * Is `true` if there are no nodes inside this document fragment, `false` otherwise.\n\t */ get isEmpty() {\n        return this.childCount === 0;\n    }\n    /**\n\t * Artificial next sibling. Returns `null`. Added for compatibility reasons.\n\t */ get nextSibling() {\n        return null;\n    }\n    /**\n\t * Artificial previous sibling. Returns `null`. Added for compatibility reasons.\n\t */ get previousSibling() {\n        return null;\n    }\n    /**\n\t * Artificial root of `DocumentFragment`. Returns itself. Added for compatibility reasons.\n\t */ get root() {\n        return this;\n    }\n    /**\n\t * Artificial parent of `DocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t */ get parent() {\n        return null;\n    }\n    /**\n\t * Artificial owner of `DocumentFragment`. Returns `null`. Added for compatibility reasons.\n\t */ get document() {\n        return null;\n    }\n    /**\n\t * Returns `false` as `DocumentFragment` by definition is not attached to a document. Added for compatibility reasons.\n\t */ isAttached() {\n        return false;\n    }\n    /**\n\t * Returns empty array. Added for compatibility reasons.\n\t */ getAncestors() {\n        return [];\n    }\n    /**\n\t * Gets the child at the given index. Returns `null` if incorrect index was passed.\n\t *\n\t * @param index Index of child.\n\t * @returns Child node.\n\t */ getChild(index) {\n        return this._children.getNode(index);\n    }\n    /**\n\t * Returns an iterator that iterates over all of this document fragment's children.\n\t */ getChildren() {\n        return this._children[Symbol.iterator]();\n    }\n    /**\n\t * Returns an index of the given child node. Returns `null` if given node is not a child of this document fragment.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's index.\n\t */ getChildIndex(node) {\n        return this._children.getNodeIndex(node);\n    }\n    /**\n\t * Returns the starting offset of given child. Starting offset is equal to the sum of\n\t * {@link module:engine/model/node~Node#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t * given node is not a child of this document fragment.\n\t *\n\t * @param node Child node to look for.\n\t * @returns Child node's starting offset.\n\t */ getChildStartOffset(node) {\n        return this._children.getNodeStartOffset(node);\n    }\n    /**\n\t * Returns path to a `DocumentFragment`, which is an empty array. Added for compatibility reasons.\n\t */ getPath() {\n        return [];\n    }\n    /**\n\t * Returns a descendant node by its path relative to this element.\n\t *\n\t * ```ts\n\t * // <this>a<b>c</b></this>\n\t * this.getNodeByPath( [ 0 ] );     // -> \"a\"\n\t * this.getNodeByPath( [ 1 ] );     // -> <b>\n\t * this.getNodeByPath( [ 1, 0 ] );  // -> \"c\"\n\t * ```\n\t *\n\t * @param relativePath Path of the node to find, relative to this element.\n\t */ getNodeByPath(relativePath) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n        let node = this;\n        for (const index of relativePath){\n            node = node.getChild(node.offsetToIndex(index));\n        }\n        return node;\n    }\n    /**\n\t * Converts offset \"position\" to index \"position\".\n\t *\n\t * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t * too high, returns index after last child.\n\t *\n\t * ```ts\n\t * const textNode = new Text( 'foo' );\n\t * const pElement = new Element( 'p' );\n\t * const docFrag = new DocumentFragment( [ textNode, pElement ] );\n\t * docFrag.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t * docFrag.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t * docFrag.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t * docFrag.offsetToIndex( 2 ); // Returns 0.\n\t * docFrag.offsetToIndex( 3 ); // Returns 1.\n\t * docFrag.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t * ```\n\t *\n\t * @param offset Offset to look for.\n\t * @returns Index of a node that occupies given offset.\n\t */ offsetToIndex(offset) {\n        return this._children.offsetToIndex(offset);\n    }\n    /**\n\t * Converts `DocumentFragment` instance to plain object and returns it.\n\t * Takes care of converting all of this document fragment's children.\n\t *\n\t * @returns `DocumentFragment` instance converted to plain object.\n\t */ toJSON() {\n        const json = [];\n        for (const node of this._children){\n            json.push(node.toJSON());\n        }\n        return json;\n    }\n    /**\n\t * Creates a `DocumentFragment` instance from given plain object (i.e. parsed JSON string).\n\t * Converts `DocumentFragment` children to proper nodes.\n\t *\n\t * @param json Plain object to be converted to `DocumentFragment`.\n\t * @returns `DocumentFragment` instance created using given plain object.\n\t */ static fromJSON(json) {\n        const children = [];\n        for (const child of json){\n            if (child.name) {\n                // If child has name property, it is an Element.\n                children.push(Element.fromJSON(child));\n            } else {\n                // Otherwise, it is a Text node.\n                children.push(Text.fromJSON(child));\n            }\n        }\n        return new DocumentFragment(children);\n    }\n    /**\n\t * {@link #_insertChild Inserts} one or more nodes at the end of this document fragment.\n\t *\n\t * @internal\n\t * @param items Items to be inserted.\n\t */ _appendChild(items) {\n        this._insertChild(this.childCount, items);\n    }\n    /**\n\t * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~Node#parent parent} of these nodes\n\t * to this document fragment.\n\t *\n\t * @internal\n\t * @param index Index at which nodes should be inserted.\n\t * @param items Items to be inserted.\n\t */ _insertChild(index, items) {\n        const nodes = normalize(items);\n        for (const node of nodes){\n            // If node that is being added to this element is already inside another element, first remove it from the old parent.\n            if (node.parent !== null) {\n                node._remove();\n            }\n            node.parent = this;\n        }\n        this._children._insertNodes(index, nodes);\n    }\n    /**\n\t * Removes one or more nodes starting at the given index\n\t * and sets {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.\n\t *\n\t * @internal\n\t * @param index Index of the first node to remove.\n\t * @param howMany Number of nodes to remove.\n\t * @returns Array containing removed nodes.\n\t */ _removeChildren(index, howMany = 1) {\n        const nodes = this._children._removeNodes(index, howMany);\n        for (const node of nodes){\n            node.parent = null;\n        }\n        return nodes;\n    }\n}\n// The magic of type inference using `is` method is centralized in `TypeCheckable` class.\n// Proper overload would interfere with that.\nDocumentFragment.prototype.is = function(type) {\n    return type === 'documentFragment' || type === 'model:documentFragment';\n};\n/**\n * Converts strings to Text and non-iterables to arrays.\n */ function normalize(nodes) {\n    // Separate condition because string is iterable.\n    if (typeof nodes == 'string') {\n        return [\n            new Text(nodes)\n        ];\n    }\n    if (!isIterable(nodes)) {\n        nodes = [\n            nodes\n        ];\n    }\n    // Array.from to enable .map() on non-arrays.\n    return Array.from(nodes).map((node)=>{\n        if (typeof node == 'string') {\n            return new Text(node);\n        }\n        if (node instanceof TextProxy) {\n            return new Text(node.data, node.getAttributes());\n        }\n        return node;\n    });\n}\n\n/**\n * The model can only be modified by using the writer. It should be used whenever you want to create a node, modify\n * child nodes, attributes or text, set the selection's position and its attributes.\n *\n * The instance of the writer is only available in the {@link module:engine/model/model~Model#change `change()`} or\n * {@link module:engine/model/model~Model#enqueueChange `enqueueChange()`}.\n *\n * ```ts\n * model.change( writer => {\n * \twriter.insertText( 'foo', paragraph, 'end' );\n * } );\n * ```\n *\n * Note that the writer should never be stored and used outside of the `change()` and\n * `enqueueChange()` blocks.\n *\n * Note that writer's methods do not check the {@link module:engine/model/schema~Schema}. It is possible\n * to create incorrect model structures by using the writer. Read more about in\n * {@glink framework/deep-dive/schema#who-checks-the-schema \"Who checks the schema?\"}.\n *\n * @see module:engine/model/model~Model#change\n * @see module:engine/model/model~Model#enqueueChange\n */ class Writer {\n    /**\n\t * Instance of the model on which this writer operates.\n\t */ model;\n    /**\n\t * The batch to which this writer will add changes.\n\t */ batch;\n    /**\n\t * Creates a writer instance.\n\t *\n\t * **Note:** It is not recommended to use it directly. Use {@link module:engine/model/model~Model#change `Model#change()`} or\n\t * {@link module:engine/model/model~Model#enqueueChange `Model#enqueueChange()`} instead.\n\t *\n\t * @internal\n\t */ constructor(model, batch){\n        this.model = model;\n        this.batch = batch;\n    }\n    /**\n\t * Creates a new {@link module:engine/model/text~Text text node}.\n\t *\n\t * ```ts\n\t * writer.createText( 'foo' );\n\t * writer.createText( 'foo', { bold: true } );\n\t * ```\n\t *\n\t * @param data Text data.\n\t * @param attributes Text attributes.\n\t * @returns {module:engine/model/text~Text} Created text node.\n\t */ createText(data, attributes) {\n        return new Text(data, attributes);\n    }\n    /**\n\t * Creates a new {@link module:engine/model/element~Element element}.\n\t *\n\t * ```ts\n\t * writer.createElement( 'paragraph' );\n\t * writer.createElement( 'paragraph', { alignment: 'center' } );\n\t * ```\n\t *\n\t * @param name Name of the element.\n\t * @param attributes Elements attributes.\n\t * @returns Created element.\n\t */ createElement(name, attributes) {\n        return new Element(name, attributes);\n    }\n    /**\n\t * Creates a new {@link module:engine/model/documentfragment~DocumentFragment document fragment}.\n\t *\n\t * @returns Created document fragment.\n\t */ createDocumentFragment() {\n        return new DocumentFragment();\n    }\n    /**\n\t * Creates a copy of the element and returns it. Created element has the same name and attributes as the original element.\n\t * If clone is deep, the original element's children are also cloned. If not, then empty element is returned.\n\t *\n\t * @param element The element to clone.\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any child.\n\t */ cloneElement(element, deep = true) {\n        return element._clone(deep);\n    }\n    /**\n\t * Inserts item on given position.\n\t *\n\t * ```ts\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * writer.insert( paragraph, position );\n\t * ```\n\t *\n\t * Instead of using position you can use parent and offset:\n\t *\n\t * ```ts\n\t * const text = writer.createText( 'foo' );\n\t * writer.insert( text, paragraph, 5 );\n\t * ```\n\t *\n\t * You can also use `end` instead of the offset to insert at the end:\n\t *\n\t * ```ts\n\t * const text = writer.createText( 'foo' );\n\t * writer.insert( text, paragraph, 'end' );\n\t * ```\n\t *\n\t * Or insert before or after another element:\n\t *\n\t * ```ts\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * writer.insert( paragraph, anotherParagraph, 'after' );\n\t * ```\n\t *\n\t * These parameters works the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * Note that if the item already has parent it will be removed from the previous parent.\n\t *\n\t * Note that you cannot re-insert a node from a document to a different document or a document fragment. In this case,\n\t * `model-writer-insert-forbidden-move` is thrown.\n\t *\n\t * If you want to move {@link module:engine/model/range~Range range} instead of an\n\t * {@link module:engine/model/item~Item item} use {@link module:engine/model/writer~Writer#move `Writer#move()`}.\n\t *\n\t * **Note:** For a paste-like content insertion mechanism see\n\t * {@link module:engine/model/model~Model#insertContent `model.insertContent()`}.\n\t *\n\t * @param item Item or document fragment to insert.\n\t * @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~Item model item}.\n\t */ insert(item, itemOrPosition, offset = 0) {\n        this._assertWriterUsedCorrectly();\n        if (item instanceof Text && item.data == '') {\n            return;\n        }\n        const position = Position._createAt(itemOrPosition, offset);\n        // If item has a parent already.\n        if (item.parent) {\n            // We need to check if item is going to be inserted within the same document.\n            if (isSameTree(item.root, position.root)) {\n                // If it's we just need to move it.\n                this.move(Range._createOn(item), position);\n                return;\n            } else {\n                if (item.root.document) {\n                    /**\n\t\t\t\t\t * Cannot move a node from a document to a different tree.\n\t\t\t\t\t * It is forbidden to move a node that was already in a document outside of it.\n\t\t\t\t\t *\n\t\t\t\t\t * @error model-writer-insert-forbidden-move\n\t\t\t\t\t */ throw new CKEditorError('model-writer-insert-forbidden-move', this);\n                } else {\n                    // Move between two different document fragments or from document fragment to a document is possible.\n                    // In that case, remove the item from it's original parent.\n                    this.remove(item);\n                }\n            }\n        }\n        const version = position.root.document ? position.root.document.version : null;\n        const insert = new InsertOperation(position, item, version);\n        if (item instanceof Text) {\n            insert.shouldReceiveAttributes = true;\n        }\n        this.batch.addOperation(insert);\n        this.model.applyOperation(insert);\n        // When element is a DocumentFragment we need to move its markers to Document#markers.\n        if (item instanceof DocumentFragment) {\n            for (const [markerName, markerRange] of item.markers){\n                // We need to migrate marker range from DocumentFragment to Document.\n                const rangeRootPosition = Position._createAt(markerRange.root, 0);\n                const range = new Range(markerRange.start._getCombined(rangeRootPosition, position), markerRange.end._getCombined(rangeRootPosition, position));\n                const options = {\n                    range,\n                    usingOperation: true,\n                    affectsData: true\n                };\n                if (this.model.markers.has(markerName)) {\n                    this.updateMarker(markerName, options);\n                } else {\n                    this.addMarker(markerName, options);\n                }\n            }\n        }\n    }\n    insertText(text, attributes, itemOrPosition, offset// Too complicated when not using `any`.\n    ) {\n        if (attributes instanceof DocumentFragment || attributes instanceof Element || attributes instanceof Position) {\n            this.insert(this.createText(text), attributes, itemOrPosition);\n        } else {\n            this.insert(this.createText(text, attributes), itemOrPosition, offset);\n        }\n    }\n    insertElement(name, attributes, itemOrPositionOrOffset, offset// Too complicated when not using `any`.\n    ) {\n        if (attributes instanceof DocumentFragment || attributes instanceof Element || attributes instanceof Position) {\n            this.insert(this.createElement(name), attributes, itemOrPositionOrOffset);\n        } else {\n            this.insert(this.createElement(name, attributes), itemOrPositionOrOffset, offset);\n        }\n    }\n    /**\n\t * Inserts item at the end of the given parent.\n\t *\n\t * ```ts\n\t * const paragraph = writer.createElement( 'paragraph' );\n\t * writer.append( paragraph, root );\n\t * ```\n\t *\n\t * Note that if the item already has parent it will be removed from the previous parent.\n\t *\n\t * If you want to move {@link module:engine/model/range~Range range} instead of an\n\t * {@link module:engine/model/item~Item item} use {@link module:engine/model/writer~Writer#move `Writer#move()`}.\n\t *\n\t * @param item Item or document fragment to insert.\n\t */ append(item, parent) {\n        this.insert(item, parent, 'end');\n    }\n    appendText(text, attributes, parent) {\n        if (attributes instanceof DocumentFragment || attributes instanceof Element) {\n            this.insert(this.createText(text), attributes, 'end');\n        } else {\n            this.insert(this.createText(text, attributes), parent, 'end');\n        }\n    }\n    appendElement(name, attributes, parent) {\n        if (attributes instanceof DocumentFragment || attributes instanceof Element) {\n            this.insert(this.createElement(name), attributes, 'end');\n        } else {\n            this.insert(this.createElement(name, attributes), parent, 'end');\n        }\n    }\n    /**\n\t * Sets value of the attribute with given key on a {@link module:engine/model/item~Item model item}\n\t * or on a {@link module:engine/model/range~Range range}.\n\t *\n\t * @param key Attribute key.\n\t * @param value Attribute new value.\n\t * @param itemOrRange Model item or range on which the attribute will be set.\n\t */ setAttribute(key, value, itemOrRange) {\n        this._assertWriterUsedCorrectly();\n        if (itemOrRange instanceof Range) {\n            const ranges = itemOrRange.getMinimalFlatRanges();\n            for (const range of ranges){\n                setAttributeOnRange(this, key, value, range);\n            }\n        } else {\n            setAttributeOnItem(this, key, value, itemOrRange);\n        }\n    }\n    /**\n\t * Sets values of attributes on a {@link module:engine/model/item~Item model item}\n\t * or on a {@link module:engine/model/range~Range range}.\n\t *\n\t * ```ts\n\t * writer.setAttributes( {\n\t * \tbold: true,\n\t * \titalic: true\n\t * }, range );\n\t * ```\n\t *\n\t * @param attributes Attributes keys and values.\n\t * @param itemOrRange Model item or range on which the attributes will be set.\n\t */ setAttributes(attributes, itemOrRange) {\n        for (const [key, val] of toMap(attributes)){\n            this.setAttribute(key, val, itemOrRange);\n        }\n    }\n    /**\n\t * Removes an attribute with given key from a {@link module:engine/model/item~Item model item}\n\t * or from a {@link module:engine/model/range~Range range}.\n\t *\n\t * @param key Attribute key.\n\t * @param itemOrRange Model item or range from which the attribute will be removed.\n\t */ removeAttribute(key, itemOrRange) {\n        this._assertWriterUsedCorrectly();\n        if (itemOrRange instanceof Range) {\n            const ranges = itemOrRange.getMinimalFlatRanges();\n            for (const range of ranges){\n                setAttributeOnRange(this, key, null, range);\n            }\n        } else {\n            setAttributeOnItem(this, key, null, itemOrRange);\n        }\n    }\n    /**\n\t * Removes all attributes from all elements in the range or from the given item.\n\t *\n\t * @param itemOrRange Model item or range from which all attributes will be removed.\n\t */ clearAttributes(itemOrRange) {\n        this._assertWriterUsedCorrectly();\n        const removeAttributesFromItem = (item)=>{\n            for (const attribute of item.getAttributeKeys()){\n                this.removeAttribute(attribute, item);\n            }\n        };\n        if (!(itemOrRange instanceof Range)) {\n            removeAttributesFromItem(itemOrRange);\n        } else {\n            for (const item of itemOrRange.getItems()){\n                removeAttributesFromItem(item);\n            }\n        }\n    }\n    /**\n\t * Moves all items in the source range to the target position.\n\t *\n\t * ```ts\n\t * writer.move( sourceRange, targetPosition );\n\t * ```\n\t *\n\t * Instead of the target position you can use parent and offset or define that range should be moved to the end\n\t * or before or after chosen item:\n\t *\n\t * ```ts\n\t * // Moves all items in the range to the paragraph at offset 5:\n\t * writer.move( sourceRange, paragraph, 5 );\n\t * // Moves all items in the range to the end of a blockquote:\n\t * writer.move( sourceRange, blockquote, 'end' );\n\t * // Moves all items in the range to a position after an image:\n\t * writer.move( sourceRange, image, 'after' );\n\t * ```\n\t *\n\t * These parameters work the same way as {@link #createPositionAt `writer.createPositionAt()`}.\n\t *\n\t * Note that items can be moved only within the same tree. It means that you can move items within the same root\n\t * (element or document fragment) or between {@link module:engine/model/document~Document#roots documents roots},\n\t * but you can not move items from document fragment to the document or from one detached element to another. Use\n\t * {@link module:engine/model/writer~Writer#insert} in such cases.\n\t *\n\t * @param range Source range.\n\t * @param offset Offset or one of the flags. Used only when second parameter is a {@link module:engine/model/item~Item model item}.\n\t */ move(range, itemOrPosition, offset) {\n        this._assertWriterUsedCorrectly();\n        if (!(range instanceof Range)) {\n            /**\n\t\t\t * Invalid range to move.\n\t\t\t *\n\t\t\t * @error writer-move-invalid-range\n\t\t\t */ throw new CKEditorError('writer-move-invalid-range', this);\n        }\n        if (!range.isFlat) {\n            /**\n\t\t\t * Range to move is not flat.\n\t\t\t *\n\t\t\t * @error writer-move-range-not-flat\n\t\t\t */ throw new CKEditorError('writer-move-range-not-flat', this);\n        }\n        const position = Position._createAt(itemOrPosition, offset);\n        // Do not move anything if the move target is same as moved range start.\n        if (position.isEqual(range.start)) {\n            return;\n        }\n        // If part of the marker is removed, create additional marker operation for undo purposes.\n        this._addOperationForAffectedMarkers('move', range);\n        if (!isSameTree(range.root, position.root)) {\n            /**\n\t\t\t * Range is going to be moved within not the same document. Please use\n\t\t\t * {@link module:engine/model/writer~Writer#insert insert} instead.\n\t\t\t *\n\t\t\t * @error writer-move-different-document\n\t\t\t */ throw new CKEditorError('writer-move-different-document', this);\n        }\n        const version = range.root.document ? range.root.document.version : null;\n        const operation = new MoveOperation(range.start, range.end.offset - range.start.offset, position, version);\n        this.batch.addOperation(operation);\n        this.model.applyOperation(operation);\n    }\n    /**\n\t * Removes given model {@link module:engine/model/item~Item item} or {@link module:engine/model/range~Range range}.\n\t *\n\t * @param itemOrRange Model item or range to remove.\n\t */ remove(itemOrRange) {\n        this._assertWriterUsedCorrectly();\n        const rangeToRemove = itemOrRange instanceof Range ? itemOrRange : Range._createOn(itemOrRange);\n        const ranges = rangeToRemove.getMinimalFlatRanges().reverse();\n        for (const flat of ranges){\n            // If part of the marker is removed, create additional marker operation for undo purposes.\n            this._addOperationForAffectedMarkers('move', flat);\n            applyRemoveOperation(flat.start, flat.end.offset - flat.start.offset, this.batch, this.model);\n        }\n    }\n    /**\n\t * Merges two siblings at the given position.\n\t *\n\t * Node before and after the position have to be an element. Otherwise `writer-merge-no-element-before` or\n\t * `writer-merge-no-element-after` error will be thrown.\n\t *\n\t * @param position Position between merged elements.\n\t */ merge(position) {\n        this._assertWriterUsedCorrectly();\n        const nodeBefore = position.nodeBefore;\n        const nodeAfter = position.nodeAfter;\n        // If part of the marker is removed, create additional marker operation for undo purposes.\n        this._addOperationForAffectedMarkers('merge', position);\n        if (!(nodeBefore instanceof Element)) {\n            /**\n\t\t\t * Node before merge position must be an element.\n\t\t\t *\n\t\t\t * @error writer-merge-no-element-before\n\t\t\t */ throw new CKEditorError('writer-merge-no-element-before', this);\n        }\n        if (!(nodeAfter instanceof Element)) {\n            /**\n\t\t\t * Node after merge position must be an element.\n\t\t\t *\n\t\t\t * @error writer-merge-no-element-after\n\t\t\t */ throw new CKEditorError('writer-merge-no-element-after', this);\n        }\n        if (!position.root.document) {\n            this._mergeDetached(position);\n        } else {\n            this._merge(position);\n        }\n    }\n    /**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionFromPath `Model#createPositionFromPath()`}.\n\t *\n\t * @param root Root of the position.\n\t * @param path Position path. See {@link module:engine/model/position~Position#path}.\n\t * @param stickiness Position stickiness. See {@link module:engine/model/position~PositionStickiness}.\n\t */ createPositionFromPath(root, path, stickiness) {\n        return this.model.createPositionFromPath(root, path, stickiness);\n    }\n    /**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionAt `Model#createPositionAt()`}.\n\t *\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~Item model item}.\n\t */ createPositionAt(itemOrPosition, offset) {\n        return this.model.createPositionAt(itemOrPosition, offset);\n    }\n    /**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionAfter `Model#createPositionAfter()`}.\n\t *\n\t * @param item Item after which the position should be placed.\n\t */ createPositionAfter(item) {\n        return this.model.createPositionAfter(item);\n    }\n    /**\n\t * Shortcut for {@link module:engine/model/model~Model#createPositionBefore `Model#createPositionBefore()`}.\n\t *\n\t * @param item Item after which the position should be placed.\n\t */ createPositionBefore(item) {\n        return this.model.createPositionBefore(item);\n    }\n    /**\n\t * Shortcut for {@link module:engine/model/model~Model#createRange `Model#createRange()`}.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */ createRange(start, end) {\n        return this.model.createRange(start, end);\n    }\n    /**\n\t * Shortcut for {@link module:engine/model/model~Model#createRangeIn `Model#createRangeIn()`}.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */ createRangeIn(element) {\n        return this.model.createRangeIn(element);\n    }\n    /**\n\t * Shortcut for {@link module:engine/model/model~Model#createRangeOn `Model#createRangeOn()`}.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */ createRangeOn(element) {\n        return this.model.createRangeOn(element);\n    }\n    createSelection(...args) {\n        return this.model.createSelection(...args);\n    }\n    /**\n\t * Performs merge action in a detached tree.\n\t *\n\t * @param position Position between merged elements.\n\t */ _mergeDetached(position) {\n        const nodeBefore = position.nodeBefore;\n        const nodeAfter = position.nodeAfter;\n        this.move(Range._createIn(nodeAfter), Position._createAt(nodeBefore, 'end'));\n        this.remove(nodeAfter);\n    }\n    /**\n\t * Performs merge action in a non-detached tree.\n\t *\n\t * @param position Position between merged elements.\n\t */ _merge(position) {\n        const targetPosition = Position._createAt(position.nodeBefore, 'end');\n        const sourcePosition = Position._createAt(position.nodeAfter, 0);\n        const graveyard = position.root.document.graveyard;\n        const graveyardPosition = new Position(graveyard, [\n            0\n        ]);\n        const version = position.root.document.version;\n        const merge = new MergeOperation(sourcePosition, position.nodeAfter.maxOffset, targetPosition, graveyardPosition, version);\n        this.batch.addOperation(merge);\n        this.model.applyOperation(merge);\n    }\n    /**\n\t * Renames the given element.\n\t *\n\t * @param element The element to rename.\n\t * @param newName New element name.\n\t */ rename(element, newName) {\n        this._assertWriterUsedCorrectly();\n        if (!(element instanceof Element)) {\n            /**\n\t\t\t * Trying to rename an object which is not an instance of Element.\n\t\t\t *\n\t\t\t * @error writer-rename-not-element-instance\n\t\t\t */ throw new CKEditorError('writer-rename-not-element-instance', this);\n        }\n        const version = element.root.document ? element.root.document.version : null;\n        const renameOperation = new RenameOperation(Position._createBefore(element), element.name, newName, version);\n        this.batch.addOperation(renameOperation);\n        this.model.applyOperation(renameOperation);\n    }\n    /**\n\t * Splits elements starting from the given position and going to the top of the model tree as long as given\n\t * `limitElement` is reached. When `limitElement` is not defined then only the parent of the given position will be split.\n\t *\n\t * The element needs to have a parent. It cannot be a root element nor a document fragment.\n\t * The `writer-split-element-no-parent` error will be thrown if you try to split an element with no parent.\n\t *\n\t * @param position Position of split.\n\t * @param limitElement Stop splitting when this element will be reached.\n\t * @returns Split result with properties:\n\t * * `position` - Position between split elements.\n\t * * `range` - Range that stars from the end of the first split element and ends at the beginning of the first copy element.\n\t */ split(position, limitElement) {\n        this._assertWriterUsedCorrectly();\n        let splitElement = position.parent;\n        if (!splitElement.parent) {\n            /**\n\t\t\t * Element with no parent can not be split.\n\t\t\t *\n\t\t\t * @error writer-split-element-no-parent\n\t\t\t */ throw new CKEditorError('writer-split-element-no-parent', this);\n        }\n        // When limit element is not defined lets set splitElement parent as limit.\n        if (!limitElement) {\n            limitElement = splitElement.parent;\n        }\n        if (!position.parent.getAncestors({\n            includeSelf: true\n        }).includes(limitElement)) {\n            /**\n\t\t\t * Limit element is not a position ancestor.\n\t\t\t *\n\t\t\t * @error writer-split-invalid-limit-element\n\t\t\t */ throw new CKEditorError('writer-split-invalid-limit-element', this);\n        }\n        // We need to cache elements that will be created as a result of the first split because\n        // we need to create a range from the end of the first split element to the beginning of the\n        // first copy element. This should be handled by LiveRange but it doesn't work on detached nodes.\n        let firstSplitElement;\n        let firstCopyElement;\n        do {\n            const version = splitElement.root.document ? splitElement.root.document.version : null;\n            const howMany = splitElement.maxOffset - position.offset;\n            const insertionPosition = SplitOperation.getInsertionPosition(position);\n            const split = new SplitOperation(position, howMany, insertionPosition, null, version);\n            this.batch.addOperation(split);\n            this.model.applyOperation(split);\n            // Cache result of the first split.\n            if (!firstSplitElement && !firstCopyElement) {\n                firstSplitElement = splitElement;\n                firstCopyElement = position.parent.nextSibling;\n            }\n            position = this.createPositionAfter(position.parent);\n            splitElement = position.parent;\n        }while (splitElement !== limitElement)\n        return {\n            position,\n            range: new Range(Position._createAt(firstSplitElement, 'end'), Position._createAt(firstCopyElement, 0))\n        };\n    }\n    /**\n\t * Wraps the given range with the given element or with a new element (if a string was passed).\n\t *\n\t * **Note:** range to wrap should be a \"flat range\" (see {@link module:engine/model/range~Range#isFlat `Range#isFlat`}).\n\t * If not, an error will be thrown.\n\t *\n\t * @param range Range to wrap.\n\t * @param elementOrString Element or name of element to wrap the range with.\n\t */ wrap(range, elementOrString) {\n        this._assertWriterUsedCorrectly();\n        if (!range.isFlat) {\n            /**\n\t\t\t * Range to wrap is not flat.\n\t\t\t *\n\t\t\t * @error writer-wrap-range-not-flat\n\t\t\t */ throw new CKEditorError('writer-wrap-range-not-flat', this);\n        }\n        const element = elementOrString instanceof Element ? elementOrString : new Element(elementOrString);\n        if (element.childCount > 0) {\n            /**\n\t\t\t * Element to wrap with is not empty.\n\t\t\t *\n\t\t\t * @error writer-wrap-element-not-empty\n\t\t\t */ throw new CKEditorError('writer-wrap-element-not-empty', this);\n        }\n        if (element.parent !== null) {\n            /**\n\t\t\t * Element to wrap with is already attached to a tree model.\n\t\t\t *\n\t\t\t * @error writer-wrap-element-attached\n\t\t\t */ throw new CKEditorError('writer-wrap-element-attached', this);\n        }\n        this.insert(element, range.start);\n        // Shift the range-to-wrap because we just inserted an element before that range.\n        const shiftedRange = new Range(range.start.getShiftedBy(1), range.end.getShiftedBy(1));\n        this.move(shiftedRange, Position._createAt(element, 0));\n    }\n    /**\n\t * Unwraps children of the given element – all its children are moved before it and then the element is removed.\n\t * Throws error if you try to unwrap an element which does not have a parent.\n\t *\n\t * @param element Element to unwrap.\n\t */ unwrap(element) {\n        this._assertWriterUsedCorrectly();\n        if (element.parent === null) {\n            /**\n\t\t\t * Trying to unwrap an element which has no parent.\n\t\t\t *\n\t\t\t * @error writer-unwrap-element-no-parent\n\t\t\t */ throw new CKEditorError('writer-unwrap-element-no-parent', this);\n        }\n        this.move(Range._createIn(element), this.createPositionAfter(element));\n        this.remove(element);\n    }\n    /**\n\t * Adds a {@link module:engine/model/markercollection~Marker marker}. Marker is a named range, which tracks\n\t * changes in the document and updates its range automatically, when model tree changes.\n\t *\n\t * As the first parameter you can set marker name.\n\t *\n\t * The required `options.usingOperation` parameter lets you decide if the marker should be managed by operations or not. See\n\t * {@link module:engine/model/markercollection~Marker marker class description} to learn about the difference between\n\t * markers managed by operations and not-managed by operations.\n\t *\n\t * The `options.affectsData` parameter, which defaults to `false`, allows you to define if a marker affects the data. It should be\n\t * `true` when the marker change changes the data returned by the\n\t * {@link module:core/editor/editor~Editor#getData `editor.getData()`} method.\n\t * When set to `true` it fires the {@link module:engine/model/document~Document#event:change:data `change:data`} event.\n\t * When set to `false` it fires the {@link module:engine/model/document~Document#event:change `change`} event.\n\t *\n\t * Create marker directly base on marker's name:\n\t *\n\t * ```ts\n\t * addMarker( markerName, { range, usingOperation: false } );\n\t * ```\n\t *\n\t * Create marker using operation:\n\t *\n\t * ```ts\n\t * addMarker( markerName, { range, usingOperation: true } );\n\t * ```\n\t *\n\t * Create marker that affects the editor data:\n\t *\n\t * ```ts\n\t * addMarker( markerName, { range, usingOperation: false, affectsData: true } );\n\t * ```\n\t *\n\t * Note: For efficiency reasons, it's best to create and keep as little markers as possible.\n\t *\n\t * @see module:engine/model/markercollection~Marker\n\t * @param name Name of a marker to create - must be unique.\n\t * @param options.usingOperation Flag indicating that the marker should be added by MarkerOperation.\n\t * See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.\n\t * @param options.range Marker range.\n\t * @param options.affectsData Flag indicating that the marker changes the editor data.\n\t * @returns Marker that was set.\n\t */ addMarker(name, options) {\n        this._assertWriterUsedCorrectly();\n        if (!options || typeof options.usingOperation != 'boolean') {\n            /**\n\t\t\t * The `options.usingOperation` parameter is required when adding a new marker.\n\t\t\t *\n\t\t\t * @error writer-addmarker-no-usingoperation\n\t\t\t */ throw new CKEditorError('writer-addmarker-no-usingoperation', this);\n        }\n        const usingOperation = options.usingOperation;\n        const range = options.range;\n        const affectsData = options.affectsData === undefined ? false : options.affectsData;\n        if (this.model.markers.has(name)) {\n            /**\n\t\t\t * Marker with provided name already exists.\n\t\t\t *\n\t\t\t * @error writer-addmarker-marker-exists\n\t\t\t */ throw new CKEditorError('writer-addmarker-marker-exists', this);\n        }\n        if (!range) {\n            /**\n\t\t\t * Range parameter is required when adding a new marker.\n\t\t\t *\n\t\t\t * @error writer-addmarker-no-range\n\t\t\t */ throw new CKEditorError('writer-addmarker-no-range', this);\n        }\n        if (!usingOperation) {\n            return this.model.markers._set(name, range, usingOperation, affectsData);\n        }\n        applyMarkerOperation(this, name, null, range, affectsData);\n        return this.model.markers.get(name);\n    }\n    /**\n\t * Adds, updates or refreshes a {@link module:engine/model/markercollection~Marker marker}. Marker is a named range, which tracks\n\t * changes in the document and updates its range automatically, when model tree changes. Still, it is possible to change the\n\t * marker's range directly using this method.\n\t *\n\t * As the first parameter you can set marker name or instance. If none of them is provided, new marker, with a unique\n\t * name is created and returned.\n\t *\n\t * **Note**: If you want to change the {@link module:engine/view/element~Element view element} of the marker while its data in the model\n\t * remains the same, use the dedicated {@link module:engine/controller/editingcontroller~EditingController#reconvertMarker} method.\n\t *\n\t * The `options.usingOperation` parameter lets you change if the marker should be managed by operations or not. See\n\t * {@link module:engine/model/markercollection~Marker marker class description} to learn about the difference between\n\t * markers managed by operations and not-managed by operations. It is possible to change this option for an existing marker.\n\t *\n\t * The `options.affectsData` parameter, which defaults to `false`, allows you to define if a marker affects the data. It should be\n\t * `true` when the marker change changes the data returned by\n\t * the {@link module:core/editor/editor~Editor#getData `editor.getData()`} method.\n\t * When set to `true` it fires the {@link module:engine/model/document~Document#event:change:data `change:data`} event.\n\t * When set to `false` it fires the {@link module:engine/model/document~Document#event:change `change`} event.\n\t *\n\t * Update marker directly base on marker's name:\n\t *\n\t * ```ts\n\t * updateMarker( markerName, { range } );\n\t * ```\n\t *\n\t * Update marker using operation:\n\t *\n\t * ```ts\n\t * updateMarker( marker, { range, usingOperation: true } );\n\t * updateMarker( markerName, { range, usingOperation: true } );\n\t * ```\n\t *\n\t * Change marker's option (start using operations to manage it):\n\t *\n\t * ```ts\n\t * updateMarker( marker, { usingOperation: true } );\n\t * ```\n\t *\n\t * Change marker's option (inform the engine, that the marker does not affect the data anymore):\n\t *\n\t * ```ts\n\t * updateMarker( markerName, { affectsData: false } );\n\t * ```\n\t *\n\t * @see module:engine/model/markercollection~Marker\n\t * @param markerOrName Name of a marker to update, or a marker instance.\n\t * @param options If options object is not defined then marker will be refreshed by triggering\n\t * downcast conversion for this marker with the same data.\n\t * @param options.range Marker range to update.\n\t * @param options.usingOperation Flag indicated whether the marker should be added by MarkerOperation.\n\t * See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.\n\t * @param options.affectsData Flag indicating that the marker changes the editor data.\n\t */ updateMarker(markerOrName, options) {\n        this._assertWriterUsedCorrectly();\n        const markerName = typeof markerOrName == 'string' ? markerOrName : markerOrName.name;\n        const currentMarker = this.model.markers.get(markerName);\n        if (!currentMarker) {\n            /**\n\t\t\t * Marker with provided name does not exist and will not be updated.\n\t\t\t *\n\t\t\t * @error writer-updatemarker-marker-not-exists\n\t\t\t */ throw new CKEditorError('writer-updatemarker-marker-not-exists', this);\n        }\n        if (!options) {\n            /**\n\t\t\t * The usage of `writer.updateMarker()` only to reconvert (refresh) a\n\t\t\t * {@link module:engine/model/markercollection~Marker model marker} was deprecated and may not work in the future.\n\t\t\t * Please update your code to use\n\t\t\t * {@link module:engine/controller/editingcontroller~EditingController#reconvertMarker `editor.editing.reconvertMarker()`}\n\t\t\t * instead.\n\t\t\t *\n\t\t\t * @error writer-updatemarker-reconvert-using-editingcontroller\n\t\t\t * @param markerName The name of the updated marker.\n\t\t\t */ logWarning('writer-updatemarker-reconvert-using-editingcontroller', {\n                markerName\n            });\n            this.model.markers._refresh(currentMarker);\n            return;\n        }\n        const hasUsingOperationDefined = typeof options.usingOperation == 'boolean';\n        const affectsDataDefined = typeof options.affectsData == 'boolean';\n        // Use previously defined marker's affectsData if the property is not provided.\n        const affectsData = affectsDataDefined ? options.affectsData : currentMarker.affectsData;\n        if (!hasUsingOperationDefined && !options.range && !affectsDataDefined) {\n            /**\n\t\t\t * One of the options is required - provide range, usingOperations or affectsData.\n\t\t\t *\n\t\t\t * @error writer-updatemarker-wrong-options\n\t\t\t */ throw new CKEditorError('writer-updatemarker-wrong-options', this);\n        }\n        const currentRange = currentMarker.getRange();\n        const updatedRange = options.range ? options.range : currentRange;\n        if (hasUsingOperationDefined && options.usingOperation !== currentMarker.managedUsingOperations) {\n            // The marker type is changed so it's necessary to create proper operations.\n            if (options.usingOperation) {\n                // If marker changes to a managed one treat this as synchronizing existing marker.\n                // Create `MarkerOperation` with `oldRange` set to `null`, so reverse operation will remove the marker.\n                applyMarkerOperation(this, markerName, null, updatedRange, affectsData);\n            } else {\n                // If marker changes to a marker that do not use operations then we need to create additional operation\n                // that removes that marker first.\n                applyMarkerOperation(this, markerName, currentRange, null, affectsData);\n                // Although not managed the marker itself should stay in model and its range should be preserver or changed to passed range.\n                this.model.markers._set(markerName, updatedRange, undefined, affectsData);\n            }\n            return;\n        }\n        // Marker's type doesn't change so update it accordingly.\n        if (currentMarker.managedUsingOperations) {\n            applyMarkerOperation(this, markerName, currentRange, updatedRange, affectsData);\n        } else {\n            this.model.markers._set(markerName, updatedRange, undefined, affectsData);\n        }\n    }\n    /**\n\t * Removes given {@link module:engine/model/markercollection~Marker marker} or marker with given name.\n\t * The marker is removed accordingly to how it has been created, so if the marker was created using operation,\n\t * it will be destroyed using operation.\n\t *\n\t * @param markerOrName Marker or marker name to remove.\n\t */ removeMarker(markerOrName) {\n        this._assertWriterUsedCorrectly();\n        const name = typeof markerOrName == 'string' ? markerOrName : markerOrName.name;\n        if (!this.model.markers.has(name)) {\n            /**\n\t\t\t * Trying to remove marker which does not exist.\n\t\t\t *\n\t\t\t * @error writer-removemarker-no-marker\n\t\t\t */ throw new CKEditorError('writer-removemarker-no-marker', this);\n        }\n        const marker = this.model.markers.get(name);\n        if (!marker.managedUsingOperations) {\n            this.model.markers._remove(name);\n            return;\n        }\n        const oldRange = marker.getRange();\n        applyMarkerOperation(this, name, oldRange, null, marker.affectsData);\n    }\n    /**\n\t * Adds a new root to the document (or re-attaches a {@link #detachRoot detached root}).\n\t *\n\t * Throws an error, if trying to add a root that is already added and attached.\n\t *\n\t * @param rootName Name of the added root.\n\t * @param elementName The element name. Defaults to `'$root'` which also has some basic schema defined\n\t * (e.g. `$block` elements are allowed inside the `$root`). Make sure to define a proper schema if you use a different name.\n\t * @returns The added root element.\n\t */ addRoot(rootName, elementName = '$root') {\n        this._assertWriterUsedCorrectly();\n        const root = this.model.document.getRoot(rootName);\n        if (root && root.isAttached()) {\n            /**\n\t\t\t * Root with provided name already exists and is attached.\n\t\t\t *\n\t\t\t * @error writer-addroot-root-exists\n\t\t\t */ throw new CKEditorError('writer-addroot-root-exists', this);\n        }\n        const document = this.model.document;\n        const operation = new RootOperation(rootName, elementName, true, document, document.version);\n        this.batch.addOperation(operation);\n        this.model.applyOperation(operation);\n        return this.model.document.getRoot(rootName);\n    }\n    /**\n\t * Detaches the root from the document.\n\t *\n\t * All content and markers are removed from the root upon detaching. New content and new markers cannot be added to the root, as long\n\t * as it is detached.\n\t *\n\t * A root cannot be fully removed from the document, it can be only detached. A root is permanently removed only after you\n\t * re-initialize the editor and do not specify the root in the initial data.\n\t *\n\t * A detached root can be re-attached using {@link #addRoot}.\n\t *\n\t * Throws an error if the root does not exist or the root is already detached.\n\t *\n\t * @param rootOrName Name of the detached root.\n\t */ detachRoot(rootOrName) {\n        this._assertWriterUsedCorrectly();\n        const root = typeof rootOrName == 'string' ? this.model.document.getRoot(rootOrName) : rootOrName;\n        if (!root || !root.isAttached()) {\n            /**\n\t\t\t * Root with provided name does not exist or is already detached.\n\t\t\t *\n\t\t\t * @error writer-detachroot-no-root\n\t\t\t */ throw new CKEditorError('writer-detachroot-no-root', this);\n        }\n        // First, remove all markers from the root. It is better to do it before removing stuff for undo purposes.\n        // However, looking through all the markers may not be the best performance wise. But there's no better solution for now.\n        for (const marker of this.model.markers){\n            if (marker.getRange().root === root) {\n                this.removeMarker(marker);\n            }\n        }\n        // Remove all attributes from the root.\n        for (const key of root.getAttributeKeys()){\n            this.removeAttribute(key, root);\n        }\n        // Remove all contents of the root.\n        this.remove(this.createRangeIn(root));\n        // Finally, detach the root.\n        const document = this.model.document;\n        const operation = new RootOperation(root.rootName, root.name, false, document, document.version);\n        this.batch.addOperation(operation);\n        this.model.applyOperation(operation);\n    }\n    setSelection(...args) {\n        this._assertWriterUsedCorrectly();\n        this.model.document.selection._setTo(...args);\n    }\n    /**\n\t * Moves {@link module:engine/model/documentselection~DocumentSelection#focus} to the specified location.\n\t *\n\t * The location can be specified in the same form as\n\t * {@link #createPositionAt `writer.createPositionAt()`} parameters.\n\t *\n\t * @param itemOrPosition\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~Item model item}.\n\t */ setSelectionFocus(itemOrPosition, offset) {\n        this._assertWriterUsedCorrectly();\n        this.model.document.selection._setFocus(itemOrPosition, offset);\n    }\n    setSelectionAttribute(keyOrObjectOrIterable, value) {\n        this._assertWriterUsedCorrectly();\n        if (typeof keyOrObjectOrIterable === 'string') {\n            this._setSelectionAttribute(keyOrObjectOrIterable, value);\n        } else {\n            for (const [key, value] of toMap(keyOrObjectOrIterable)){\n                this._setSelectionAttribute(key, value);\n            }\n        }\n    }\n    /**\n\t * Removes attribute(s) with given key(s) from the selection.\n\t *\n\t * Remove one attribute:\n\t *\n\t * ```ts\n\t * writer.removeSelectionAttribute( 'italic' );\n\t * ```\n\t *\n\t * Remove multiple attributes:\n\t *\n\t * ```ts\n\t * writer.removeSelectionAttribute( [ 'italic', 'bold' ] );\n\t * ```\n\t *\n\t * @param keyOrIterableOfKeys Key of the attribute to remove or an iterable of attribute keys to remove.\n\t */ removeSelectionAttribute(keyOrIterableOfKeys) {\n        this._assertWriterUsedCorrectly();\n        if (typeof keyOrIterableOfKeys === 'string') {\n            this._removeSelectionAttribute(keyOrIterableOfKeys);\n        } else {\n            for (const key of keyOrIterableOfKeys){\n                this._removeSelectionAttribute(key);\n            }\n        }\n    }\n    /**\n\t * Temporarily changes the {@link module:engine/model/documentselection~DocumentSelection#isGravityOverridden gravity}\n\t * of the selection from left to right.\n\t *\n\t * The gravity defines from which direction the selection inherits its attributes. If it's the default left gravity,\n\t * then the selection (after being moved by the user) inherits attributes from its left-hand side.\n\t * This method allows to temporarily override this behavior by forcing the gravity to the right.\n\t *\n\t * For the following model fragment:\n\t *\n\t * ```xml\n\t * <$text bold=\"true\" linkHref=\"url\">bar[]</$text><$text bold=\"true\">biz</$text>\n\t * ```\n\t *\n\t * * Default gravity: selection will have the `bold` and `linkHref` attributes.\n\t * * Overridden gravity: selection will have `bold` attribute.\n\t *\n\t * **Note**: It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry\n\t * of the process.\n\t *\n\t * @returns The unique id which allows restoring the gravity.\n\t */ overrideSelectionGravity() {\n        return this.model.document.selection._overrideGravity();\n    }\n    /**\n\t * Restores {@link ~Writer#overrideSelectionGravity} gravity to default.\n\t *\n\t * Restoring the gravity is only possible using the unique identifier returned by\n\t * {@link ~Writer#overrideSelectionGravity}. Note that the gravity remains overridden as long as won't be restored\n\t * the same number of times it was overridden.\n\t *\n\t * @param uid The unique id returned by {@link ~Writer#overrideSelectionGravity}.\n\t */ restoreSelectionGravity(uid) {\n        this.model.document.selection._restoreGravity(uid);\n    }\n    /**\n\t * @param key Key of the attribute to remove.\n\t * @param value Attribute value.\n\t */ _setSelectionAttribute(key, value) {\n        const selection = this.model.document.selection;\n        // Store attribute in parent element if the selection is collapsed in an empty node.\n        if (selection.isCollapsed && selection.anchor.parent.isEmpty) {\n            const storeKey = DocumentSelection._getStoreAttributeKey(key);\n            this.setAttribute(storeKey, value, selection.anchor.parent);\n        }\n        selection._setAttribute(key, value);\n    }\n    /**\n\t * @param key Key of the attribute to remove.\n\t */ _removeSelectionAttribute(key) {\n        const selection = this.model.document.selection;\n        // Remove stored attribute from parent element if the selection is collapsed in an empty node.\n        if (selection.isCollapsed && selection.anchor.parent.isEmpty) {\n            const storeKey = DocumentSelection._getStoreAttributeKey(key);\n            this.removeAttribute(storeKey, selection.anchor.parent);\n        }\n        selection._removeAttribute(key);\n    }\n    /**\n\t * Throws `writer-detached-writer-tries-to-modify-model` error when the writer is used outside of the `change()` block.\n\t */ _assertWriterUsedCorrectly() {\n        /**\n\t\t * Trying to use a writer outside a {@link module:engine/model/model~Model#change `change()`} or\n\t\t * {@link module:engine/model/model~Model#enqueueChange `enqueueChange()`} blocks.\n\t\t *\n\t\t * The writer can only be used inside these blocks which ensures that the model\n\t\t * can only be changed during such \"sessions\".\n\t\t *\n\t\t * @error writer-incorrect-use\n\t\t */ if (this.model._currentWriter !== this) {\n            throw new CKEditorError('writer-incorrect-use', this);\n        }\n    }\n    /**\n\t * For given action `type` and `positionOrRange` where the action happens, this function finds all affected markers\n\t * and applies a marker operation with the new marker range equal to the current range. Thanks to this, the marker range\n\t * can be later correctly processed during undo.\n\t *\n\t * @param type Writer action type.\n\t * @param positionOrRange Position or range where the writer action happens.\n\t */ _addOperationForAffectedMarkers(type, positionOrRange) {\n        for (const marker of this.model.markers){\n            if (!marker.managedUsingOperations) {\n                continue;\n            }\n            const markerRange = marker.getRange();\n            let isAffected = false;\n            if (type === 'move') {\n                const range = positionOrRange;\n                isAffected = range.containsPosition(markerRange.start) || range.start.isEqual(markerRange.start) || range.containsPosition(markerRange.end) || range.end.isEqual(markerRange.end);\n            } else {\n                // if type === 'merge'.\n                const position = positionOrRange;\n                const elementBefore = position.nodeBefore;\n                const elementAfter = position.nodeAfter;\n                //               Start:  <p>Foo[</p><p>Bar]</p>\n                //         After merge:  <p>Foo[Bar]</p>\n                // After undoing split:  <p>Foo</p><p>[Bar]</p>     <-- incorrect, needs remembering for undo.\n                //\n                const affectedInLeftElement = markerRange.start.parent == elementBefore && markerRange.start.isAtEnd;\n                //               Start:  <p>[Foo</p><p>]Bar</p>\n                //         After merge:  <p>[Foo]Bar</p>\n                // After undoing split:  <p>[Foo]</p><p>Bar</p>     <-- incorrect, needs remembering for undo.\n                //\n                const affectedInRightElement = markerRange.end.parent == elementAfter && markerRange.end.offset == 0;\n                //               Start:  <p>[Foo</p>]<p>Bar</p>\n                //         After merge:  <p>[Foo]Bar</p>\n                // After undoing split:  <p>[Foo]</p><p>Bar</p>     <-- incorrect, needs remembering for undo.\n                //\n                const affectedAfterLeftElement = markerRange.end.nodeAfter == elementAfter;\n                //               Start:  <p>Foo</p>[<p>Bar]</p>\n                //         After merge:  <p>Foo[Bar]</p>\n                // After undoing split:  <p>Foo</p><p>[Bar]</p>     <-- incorrect, needs remembering for undo.\n                //\n                const affectedBeforeRightElement = markerRange.start.nodeAfter == elementAfter;\n                isAffected = affectedInLeftElement || affectedInRightElement || affectedAfterLeftElement || affectedBeforeRightElement;\n            }\n            if (isAffected) {\n                this.updateMarker(marker.name, {\n                    range: markerRange\n                });\n            }\n        }\n    }\n}\n/**\n * Sets given attribute to each node in given range. When attribute value is null then attribute will be removed.\n *\n * Because attribute operation needs to have the same attribute value on the whole range, this function splits\n * the range into smaller parts.\n *\n * Given `range` must be flat.\n */ function setAttributeOnRange(writer, key, value, range) {\n    const model = writer.model;\n    const doc = model.document;\n    // Position of the last split, the beginning of the new range.\n    let lastSplitPosition = range.start;\n    // Currently position in the scanning range. Because we need value after the position, it is not a current\n    // position of the iterator but the previous one (we need to iterate one more time to get the value after).\n    let position;\n    // Value before the currently position.\n    let valueBefore;\n    // Value after the currently position.\n    let valueAfter;\n    for (const val of range.getWalker({\n        shallow: true\n    })){\n        valueAfter = val.item.getAttribute(key);\n        // At the first run of the iterator the position in undefined. We also do not have a valueBefore, but\n        // because valueAfter may be null, valueBefore may be equal valueAfter ( undefined == null ).\n        if (position && valueBefore != valueAfter) {\n            // if valueBefore == value there is nothing to change, so we add operation only if these values are different.\n            if (valueBefore != value) {\n                addOperation();\n            }\n            lastSplitPosition = position;\n        }\n        position = val.nextPosition;\n        valueBefore = valueAfter;\n    }\n    // Because position in the loop is not the iterator position (see let position comment), the last position in\n    // the while loop will be last but one position in the range. We need to check the last position manually.\n    if (position instanceof Position && position != lastSplitPosition && valueBefore != value) {\n        addOperation();\n    }\n    function addOperation() {\n        const range = new Range(lastSplitPosition, position);\n        const version = range.root.document ? doc.version : null;\n        const operation = new AttributeOperation(range, key, valueBefore, value, version);\n        writer.batch.addOperation(operation);\n        model.applyOperation(operation);\n    }\n}\n/**\n * Sets given attribute to the given node. When attribute value is null then attribute will be removed.\n */ function setAttributeOnItem(writer, key, value, item) {\n    const model = writer.model;\n    const doc = model.document;\n    const previousValue = item.getAttribute(key);\n    let range, operation;\n    if (previousValue != value) {\n        const isRootChanged = item.root === item;\n        if (isRootChanged) {\n            // If we change attributes of root element, we have to use `RootAttributeOperation`.\n            const version = item.document ? doc.version : null;\n            operation = new RootAttributeOperation(item, key, previousValue, value, version);\n        } else {\n            range = new Range(Position._createBefore(item), writer.createPositionAfter(item));\n            const version = range.root.document ? doc.version : null;\n            operation = new AttributeOperation(range, key, previousValue, value, version);\n        }\n        writer.batch.addOperation(operation);\n        model.applyOperation(operation);\n    }\n}\n/**\n * Creates and applies marker operation to {@link module:engine/model/operation/operation~Operation operation}.\n */ function applyMarkerOperation(writer, name, oldRange, newRange, affectsData) {\n    const model = writer.model;\n    const doc = model.document;\n    const operation = new MarkerOperation(name, oldRange, newRange, model.markers, !!affectsData, doc.version);\n    writer.batch.addOperation(operation);\n    model.applyOperation(operation);\n}\n/**\n * Creates `MoveOperation` or `DetachOperation` that removes `howMany` nodes starting from `position`.\n * The operation will be applied on given model instance and added to given operation instance.\n *\n * @param position Position from which nodes are removed.\n * @param howMany Number of nodes to remove.\n * @param batch Batch to which the operation will be added.\n * @param model Model instance on which operation will be applied.\n */ function applyRemoveOperation(position, howMany, batch, model) {\n    let operation;\n    if (position.root.document) {\n        const doc = model.document;\n        const graveyardPosition = new Position(doc.graveyard, [\n            0\n        ]);\n        operation = new MoveOperation(position, howMany, graveyardPosition, doc.version);\n    } else {\n        operation = new DetachOperation(position, howMany);\n    }\n    batch.addOperation(operation);\n    model.applyOperation(operation);\n}\n/**\n * Returns `true` if both root elements are the same element or both are documents root elements.\n *\n * Elements in the same tree can be moved (for instance you can move element form one documents root to another, or\n * within the same document fragment), but when element supposed to be moved from document fragment to the document, or\n * to another document it should be removed and inserted to avoid problems with OT. This is because features like undo or\n * collaboration may track changes on the document but ignore changes on detached fragments and should not get\n * unexpected `move` operation.\n */ function isSameTree(rootA, rootB) {\n    // If it is the same root this is the same tree.\n    if (rootA === rootB) {\n        return true;\n    }\n    // If both roots are documents root it is operation within the document what we still treat as the same tree.\n    if (rootA instanceof RootElement && rootB instanceof RootElement) {\n        return true;\n    }\n    return false;\n}\n\n/**\n * Deletes content of the selection and merge siblings. The resulting selection is always collapsed.\n *\n * **Note:** Use {@link module:engine/model/model~Model#deleteContent} instead of this function.\n * This function is only exposed to be reusable in algorithms\n * which change the {@link module:engine/model/model~Model#deleteContent}\n * method's behavior.\n *\n * @param model The model in context of which the insertion should be performed.\n * @param selection Selection of which the content should be deleted.\n * @param options.leaveUnmerged Whether to merge elements after removing the content of the selection.\n *\n * For example `<heading>x[x</heading><paragraph>y]y</paragraph>` will become:\n *\n * * `<heading>x^y</heading>` with the option disabled (`leaveUnmerged == false`)\n * * `<heading>x^</heading><paragraph>y</paragraph>` with enabled (`leaveUnmerged == true`).\n *\n * Note: {@link module:engine/model/schema~Schema#isObject object} and {@link module:engine/model/schema~Schema#isLimit limit}\n * elements will not be merged.\n *\n * @param options.doNotResetEntireContent Whether to skip replacing the entire content with a\n * paragraph when the entire content was selected.\n *\n * For example `<heading>[x</heading><paragraph>y]</paragraph>` will become:\n *\n * * `<paragraph>^</paragraph>` with the option disabled (`doNotResetEntireContent == false`)\n * * `<heading>^</heading>` with enabled (`doNotResetEntireContent == true`).\n *\n * @param options.doNotAutoparagraph Whether to create a paragraph if after content deletion selection is moved\n * to a place where text cannot be inserted.\n *\n * For example `<paragraph>x</paragraph>[<imageBlock src=\"foo.jpg\"></imageBlock>]` will become:\n *\n * * `<paragraph>x</paragraph><paragraph>[]</paragraph>` with the option disabled (`doNotAutoparagraph == false`)\n * * `<paragraph>x</paragraph>[]` with the option enabled (`doNotAutoparagraph == true`).\n *\n * If you use this option you need to make sure to handle invalid selections yourself or leave\n * them to the selection post-fixer (may not always work).\n *\n * **Note:** If there is no valid position for the selection, the paragraph will always be created:\n *\n * `[<imageBlock src=\"foo.jpg\"></imageBlock>]` -> `<paragraph>[]</paragraph>`.\n */ function deleteContent(model, selection, options = {}) {\n    if (selection.isCollapsed) {\n        return;\n    }\n    const selRange = selection.getFirstRange();\n    // If the selection is already removed, don't do anything.\n    if (selRange.root.rootName == '$graveyard') {\n        return;\n    }\n    const schema = model.schema;\n    model.change((writer)=>{\n        // 1. Replace the entire content with paragraph.\n        // See: https://github.com/ckeditor/ckeditor5-engine/issues/1012#issuecomment-315017594.\n        if (!options.doNotResetEntireContent && shouldEntireContentBeReplacedWithParagraph(schema, selection)) {\n            replaceEntireContentWithParagraph(writer, selection);\n            return;\n        }\n        // Collect attributes to copy in case of autoparagraphing.\n        const attributesForAutoparagraph = {};\n        if (!options.doNotAutoparagraph) {\n            const selectedElement = selection.getSelectedElement();\n            if (selectedElement) {\n                Object.assign(attributesForAutoparagraph, schema.getAttributesWithProperty(selectedElement, 'copyOnReplace', true));\n            }\n        }\n        // Get the live positions for the range adjusted to span only blocks selected from the user perspective.\n        const [startPosition, endPosition] = getLivePositionsForSelectedBlocks(selRange);\n        // 2. Remove the content if there is any.\n        if (!startPosition.isTouching(endPosition)) {\n            writer.remove(writer.createRange(startPosition, endPosition));\n        }\n        // 3. Merge elements in the right branch to the elements in the left branch.\n        // The only reasonable (in terms of data and selection correctness) case in which we need to do that is:\n        //\n        // <heading type=1>Fo[</heading><paragraph>]ar</paragraph> => <heading type=1>Fo^ar</heading>\n        //\n        // However, the algorithm supports also merging deeper structures (up to the depth of the shallower branch),\n        // as it's hard to imagine what should actually be the default behavior. Usually, specific features will\n        // want to override that behavior anyway.\n        if (!options.leaveUnmerged) {\n            mergeBranches(writer, startPosition, endPosition);\n            // TMP this will be replaced with a postfixer.\n            // We need to check and strip disallowed attributes in all nested nodes because after merge\n            // some attributes could end up in a path where are disallowed.\n            //\n            // e.g. bold is disallowed for <H1>\n            // <h1>Fo{o</h1><p>b}a<b>r</b><p> -> <h1>Fo{}a<b>r</b><h1> -> <h1>Fo{}ar<h1>.\n            schema.removeDisallowedAttributes(startPosition.parent.getChildren(), writer);\n        }\n        collapseSelectionAt(writer, selection, startPosition);\n        // 4. Add a paragraph to set selection in it.\n        // Check if a text is allowed in the new container. If not, try to create a new paragraph (if it's allowed here).\n        // If autoparagraphing is off, we assume that you know what you do so we leave the selection wherever it was.\n        if (!options.doNotAutoparagraph && shouldAutoparagraph(schema, startPosition)) {\n            insertParagraph(writer, startPosition, selection, attributesForAutoparagraph);\n        }\n        startPosition.detach();\n        endPosition.detach();\n    });\n}\n/**\n * Returns the live positions for the range adjusted to span only blocks selected from the user perspective. Example:\n *\n * ```\n * <heading1>[foo</heading1>\n * <paragraph>bar</paragraph>\n * <heading1>]abc</heading1>  <-- this block is not considered as selected\n * ```\n *\n * This is the same behavior as in Selection#getSelectedBlocks() \"special case\".\n */ function getLivePositionsForSelectedBlocks(range) {\n    const model = range.root.document.model;\n    const startPosition = range.start;\n    let endPosition = range.end;\n    // If the end of selection is at the start position of last block in the selection, then\n    // shrink it to not include that trailing block. Note that this should happen only for not empty selection.\n    if (model.hasContent(range, {\n        ignoreMarkers: true\n    })) {\n        const endBlock = getParentBlock(endPosition);\n        if (endBlock && endPosition.isTouching(model.createPositionAt(endBlock, 0))) {\n            // Create forward selection as a probe to find a valid position after excluding last block from the range.\n            const selection = model.createSelection(range);\n            // Modify the forward selection in backward direction to shrink it and remove first position of following block from it.\n            // This is how modifySelection works and here we are making use of it.\n            model.modifySelection(selection, {\n                direction: 'backward'\n            });\n            const newEndPosition = selection.getLastPosition();\n            // For such a model and selection:\n            //     <paragraph>A[</paragraph><imageBlock></imageBlock><paragraph>]B</paragraph>\n            //\n            // After modifySelection(), we would end up with this:\n            //     <paragraph>A[</paragraph>]<imageBlock></imageBlock><paragraph>B</paragraph>\n            //\n            // So we need to check if there is no content in the skipped range (because we want to include the <imageBlock>).\n            const skippedRange = model.createRange(newEndPosition, endPosition);\n            if (!model.hasContent(skippedRange, {\n                ignoreMarkers: true\n            })) {\n                endPosition = newEndPosition;\n            }\n        }\n    }\n    return [\n        LivePosition.fromPosition(startPosition, 'toPrevious'),\n        LivePosition.fromPosition(endPosition, 'toNext')\n    ];\n}\n/**\n * Finds the lowest element in position's ancestors which is a block.\n * Returns null if a limit element is encountered before reaching a block element.\n */ function getParentBlock(position) {\n    const element = position.parent;\n    const schema = element.root.document.model.schema;\n    const ancestors = element.getAncestors({\n        parentFirst: true,\n        includeSelf: true\n    });\n    for (const element of ancestors){\n        if (schema.isLimit(element)) {\n            return null;\n        }\n        if (schema.isBlock(element)) {\n            return element;\n        }\n    }\n}\n/**\n * This function is a result of reaching the Ballmer's peak for just the right amount of time.\n * Even I had troubles documenting it after a while and after reading it again I couldn't believe that it really works.\n */ function mergeBranches(writer, startPosition, endPosition) {\n    const model = writer.model;\n    // Verify if there is a need and possibility to merge.\n    if (!checkShouldMerge(writer.model.schema, startPosition, endPosition)) {\n        return;\n    }\n    // If the start element on the common ancestor level is empty, and the end element on the same level is not empty\n    // then merge those to the right element so that it's properties are preserved (name, attributes).\n    // Because of OT merging is used instead of removing elements.\n    //\n    // Merge left:\n    //     <heading1>foo[</heading1>    ->  <heading1>foo[]bar</heading1>\n    //     <paragraph>]bar</paragraph>  ->               --^\n    //\n    // Merge right:\n    //     <heading1>[</heading1>       ->\n    //     <paragraph>]bar</paragraph>  ->  <paragraph>[]bar</paragraph>\n    //\n    // Merge left:\n    //     <blockQuote>                     ->  <blockQuote>\n    //         <heading1>foo[</heading1>    ->      <heading1>foo[]bar</heading1>\n    //         <paragraph>]bar</paragraph>  ->                   --^\n    //     </blockQuote>                    ->  </blockQuote>\n    //\n    // Merge right:\n    //     <blockQuote>                     ->  <blockQuote>\n    //         <heading1>[</heading1>       ->\n    //         <paragraph>]bar</paragraph>  ->      <paragraph>[]bar</paragraph>\n    //     </blockQuote>                    ->  </blockQuote>\n    // Merging should not go deeper than common ancestor.\n    const [startAncestor, endAncestor] = getAncestorsJustBelowCommonAncestor(startPosition, endPosition);\n    // Branches can't be merged if one of the positions is directly inside a common ancestor.\n    //\n    // Example:\n    //     <blockQuote>\n    //         <paragraph>[foo</paragraph>]\n    //         <table> ... </table>\n    //     <blockQuote>\n    //\n    if (!startAncestor || !endAncestor) {\n        return;\n    }\n    if (!model.hasContent(startAncestor, {\n        ignoreMarkers: true\n    }) && model.hasContent(endAncestor, {\n        ignoreMarkers: true\n    })) {\n        mergeBranchesRight(writer, startPosition, endPosition, startAncestor.parent);\n    } else {\n        mergeBranchesLeft(writer, startPosition, endPosition, startAncestor.parent);\n    }\n}\n/**\n * Merging blocks to the left (properties of the left block are preserved).\n * Simple example:\n *\n * ```\n * <heading1>foo[</heading1>    ->  <heading1>foo[bar</heading1>]\n * <paragraph>]bar</paragraph>  ->              --^\n * ```\n *\n * Nested example:\n *\n * ```\n * <blockQuote>                     ->  <blockQuote>\n *     <heading1>foo[</heading1>    ->      <heading1>foo[bar</heading1>\n * </blockQuote>                    ->  </blockQuote>]    ^\n * <blockBlock>                     ->                    |\n *     <paragraph>]bar</paragraph>  ->                 ---\n * </blockBlock>                    ->\n * ```\n */ function mergeBranchesLeft(writer, startPosition, endPosition, commonAncestor) {\n    const startElement = startPosition.parent;\n    const endElement = endPosition.parent;\n    // Merging reached the common ancestor element, stop here.\n    if (startElement == commonAncestor || endElement == commonAncestor) {\n        return;\n    }\n    // Remember next positions to merge in next recursive step (also used as modification points pointers).\n    startPosition = writer.createPositionAfter(startElement);\n    endPosition = writer.createPositionBefore(endElement);\n    // Move endElement just after startElement if they aren't siblings.\n    if (!endPosition.isEqual(startPosition)) {\n        //\n        //     <blockQuote>                     ->  <blockQuote>\n        //         <heading1>foo[</heading1>    ->      <heading1>foo</heading1>[<paragraph>bar</paragraph>\n        //     </blockQuote>                    ->  </blockQuote>                ^\n        //     <blockBlock>                     ->  <blockBlock>                 |\n        //         <paragraph>]bar</paragraph>  ->      ]                     ---\n        //     </blockBlock>                    ->  </blockBlock>\n        //\n        writer.insert(endElement, startPosition);\n    }\n    // Merge two siblings (nodes on sides of startPosition):\n    //\n    //     <blockQuote>                                             ->  <blockQuote>\n    //         <heading1>foo</heading1>[<paragraph>bar</paragraph>  ->      <heading1>foo[bar</heading1>\n    //     </blockQuote>                                            ->  </blockQuote>\n    //     <blockBlock>                                             ->  <blockBlock>\n    //         ]                                                    ->      ]\n    //     </blockBlock>                                            ->  </blockBlock>\n    //\n    // Or in simple case (without moving elements in above if):\n    //     <heading1>foo</heading1>[<paragraph>bar</paragraph>]  ->  <heading1>foo[bar</heading1>]\n    //\n    writer.merge(startPosition);\n    // Remove empty end ancestors:\n    //\n    //     <blockQuote>                      ->  <blockQuote>\n    //         <heading1>foo[bar</heading1>  ->      <heading1>foo[bar</heading1>\n    //     </blockQuote>                     ->  </blockQuote>\n    //     <blockBlock>                      ->\n    //         ]                             ->  ]\n    //     </blockBlock>                     ->\n    //\n    while(endPosition.parent.isEmpty){\n        const parentToRemove = endPosition.parent;\n        endPosition = writer.createPositionBefore(parentToRemove);\n        writer.remove(parentToRemove);\n    }\n    // Verify if there is a need and possibility to merge next level.\n    if (!checkShouldMerge(writer.model.schema, startPosition, endPosition)) {\n        return;\n    }\n    // Continue merging next level (blockQuote with blockBlock in the examples above if it would not be empty and got removed).\n    mergeBranchesLeft(writer, startPosition, endPosition, commonAncestor);\n}\n/**\n * Merging blocks to the right (properties of the right block are preserved).\n * Simple example:\n *\n * ```\n * <heading1>foo[</heading1>    ->            --v\n * <paragraph>]bar</paragraph>  ->  [<paragraph>foo]bar</paragraph>\n * ```\n *\n * Nested example:\n *\n * ```\n * <blockQuote>                     ->\n *     <heading1>foo[</heading1>    ->              ---\n * </blockQuote>                    ->                 |\n * <blockBlock>                     ->  [<blockBlock>  v\n *     <paragraph>]bar</paragraph>  ->      <paragraph>foo]bar</paragraph>\n * </blockBlock>                    ->  </blockBlock>\n * ```\n */ function mergeBranchesRight(writer, startPosition, endPosition, commonAncestor) {\n    const startElement = startPosition.parent;\n    const endElement = endPosition.parent;\n    // Merging reached the common ancestor element, stop here.\n    if (startElement == commonAncestor || endElement == commonAncestor) {\n        return;\n    }\n    // Remember next positions to merge in next recursive step (also used as modification points pointers).\n    startPosition = writer.createPositionAfter(startElement);\n    endPosition = writer.createPositionBefore(endElement);\n    // Move startElement just before endElement if they aren't siblings.\n    if (!endPosition.isEqual(startPosition)) {\n        //\n        //     <blockQuote>                     ->  <blockQuote>\n        //         <heading1>foo[</heading1>    ->      [                   ---\n        //     </blockQuote>                    ->  </blockQuote>              |\n        //     <blockBlock>                     ->  <blockBlock>               v\n        //         <paragraph>]bar</paragraph>  ->      <heading1>foo</heading1>]<paragraph>bar</paragraph>\n        //     </blockBlock>                    ->  </blockBlock>\n        //\n        writer.insert(startElement, endPosition);\n    }\n    // Remove empty end ancestors:\n    //\n    //     <blockQuote>                                             ->\n    //         [                                                    ->  [\n    //     </blockQuote>                                            ->\n    //     <blockBlock>                                             ->  <blockBlock>\n    //         <heading1>foo</heading1>]<paragraph>bar</paragraph>  ->      <heading1>foo</heading1>]<paragraph>bar</paragraph>\n    //     </blockBlock>                                            ->  </blockBlock>\n    //\n    while(startPosition.parent.isEmpty){\n        const parentToRemove = startPosition.parent;\n        startPosition = writer.createPositionBefore(parentToRemove);\n        writer.remove(parentToRemove);\n    }\n    // Update endPosition after inserting and removing elements.\n    endPosition = writer.createPositionBefore(endElement);\n    // Merge right two siblings (nodes on sides of endPosition):\n    //                                                              ->\n    //     [                                                        ->  [\n    //                                                              ->\n    //     <blockBlock>                                             ->  <blockBlock>\n    //         <heading1>foo</heading1>]<paragraph>bar</paragraph>  ->      <paragraph>foo]bar</paragraph>\n    //     </blockBlock>                                            ->  </blockBlock>\n    //\n    // Or in simple case (without moving elements in above if):\n    //     [<heading1>foo</heading1>]<paragraph>bar</paragraph>  ->  [<heading1>foo]bar</heading1>\n    //\n    mergeRight(writer, endPosition);\n    // Verify if there is a need and possibility to merge next level.\n    if (!checkShouldMerge(writer.model.schema, startPosition, endPosition)) {\n        return;\n    }\n    // Continue merging next level (blockQuote with blockBlock in the examples above if it would not be empty and got removed).\n    mergeBranchesRight(writer, startPosition, endPosition, commonAncestor);\n}\n/**\n * There is no right merge operation so we need to simulate it.\n */ function mergeRight(writer, position) {\n    const startElement = position.nodeBefore;\n    const endElement = position.nodeAfter;\n    if (startElement.name != endElement.name) {\n        writer.rename(startElement, endElement.name);\n    }\n    writer.clearAttributes(startElement);\n    writer.setAttributes(Object.fromEntries(endElement.getAttributes()), startElement);\n    writer.merge(position);\n}\n/**\n * Verifies if merging is needed and possible. It's not needed if both positions are in the same element\n * and it's not possible if some element is a limit or the range crosses a limit element.\n */ function checkShouldMerge(schema, startPosition, endPosition) {\n    const startElement = startPosition.parent;\n    const endElement = endPosition.parent;\n    // If both positions ended up in the same parent, then there's nothing more to merge:\n    // <$root><p>x[</p><p>]y</p></$root> => <$root><p>xy</p>[]</$root>\n    if (startElement == endElement) {\n        return false;\n    }\n    // If one of the positions is a limit element, then there's nothing to merge because we don't want to cross the limit boundaries.\n    if (schema.isLimit(startElement) || schema.isLimit(endElement)) {\n        return false;\n    }\n    // Check if operations we'll need to do won't need to cross object or limit boundaries.\n    // E.g., we can't merge endElement into startElement in this case:\n    // <limit><startElement>x[</startElement></limit><endElement>]</endElement>\n    return isCrossingLimitElement(startPosition, endPosition, schema);\n}\n/**\n * Returns the elements that are the ancestors of the provided positions that are direct children of the common ancestor.\n */ function getAncestorsJustBelowCommonAncestor(positionA, positionB) {\n    const ancestorsA = positionA.getAncestors();\n    const ancestorsB = positionB.getAncestors();\n    let i = 0;\n    while(ancestorsA[i] && ancestorsA[i] == ancestorsB[i]){\n        i++;\n    }\n    return [\n        ancestorsA[i],\n        ancestorsB[i]\n    ];\n}\nfunction shouldAutoparagraph(schema, position) {\n    const isTextAllowed = schema.checkChild(position, '$text');\n    const isParagraphAllowed = schema.checkChild(position, 'paragraph');\n    return !isTextAllowed && isParagraphAllowed;\n}\n/**\n * Check if parents of two positions can be merged by checking if there are no limit/object\n * boundaries between those two positions.\n *\n * E.g. in <bQ><p>x[]</p></bQ><widget><caption>{}</caption></widget>\n * we'll check <p>, <bQ>, <widget> and <caption>.\n * Usually, widget and caption are marked as objects/limits in the schema, so in this case merging will be blocked.\n */ function isCrossingLimitElement(leftPos, rightPos, schema) {\n    const rangeToCheck = new Range(leftPos, rightPos);\n    for (const value of rangeToCheck.getWalker()){\n        if (schema.isLimit(value.item)) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction insertParagraph(writer, position, selection, attributes = {}) {\n    const paragraph = writer.createElement('paragraph');\n    writer.model.schema.setAllowedAttributes(paragraph, attributes, writer);\n    writer.insert(paragraph, position);\n    collapseSelectionAt(writer, selection, writer.createPositionAt(paragraph, 0));\n}\nfunction replaceEntireContentWithParagraph(writer, selection) {\n    const limitElement = writer.model.schema.getLimitElement(selection);\n    writer.remove(writer.createRangeIn(limitElement));\n    insertParagraph(writer, writer.createPositionAt(limitElement, 0), selection);\n}\n/**\n * We want to replace the entire content with a paragraph when:\n * * the entire content is selected,\n * * selection contains at least two elements,\n * * whether the paragraph is allowed in schema in the common ancestor.\n */ function shouldEntireContentBeReplacedWithParagraph(schema, selection) {\n    const limitElement = schema.getLimitElement(selection);\n    if (!selection.containsEntireContent(limitElement)) {\n        return false;\n    }\n    const range = selection.getFirstRange();\n    if (range.start.parent == range.end.parent) {\n        return false;\n    }\n    return schema.checkChild(limitElement, 'paragraph');\n}\n/**\n * Helper function that sets the selection. Depending whether given `selection` is a document selection or not,\n * uses a different method to set it.\n */ function collapseSelectionAt(writer, selection, positionOrRange) {\n    if (selection instanceof DocumentSelection) {\n        writer.setSelection(positionOrRange);\n    } else {\n        selection.setTo(positionOrRange);\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module engine/model/utils/getselectedcontent\n */ /**\n * Gets a clone of the selected content.\n *\n * For example, for the following selection:\n *\n * ```html\n * <p>x</p><quote><p>y</p><h>fir[st</h></quote><p>se]cond</p><p>z</p>\n * ```\n *\n * It will return a document fragment with such a content:\n *\n * ```html\n * <quote><h>st</h></quote><p>se</p>\n * ```\n *\n * @param model The model in context of which the selection modification should be performed.\n * @param selection The selection of which content will be returned.\n */ function getSelectedContent(model, selection) {\n    return model.change((writer)=>{\n        const frag = writer.createDocumentFragment();\n        const range = selection.getFirstRange();\n        if (!range || range.isCollapsed) {\n            return frag;\n        }\n        const root = range.start.root;\n        const commonPath = range.start.getCommonPath(range.end);\n        const commonParent = root.getNodeByPath(commonPath);\n        // ## 1st step\n        //\n        // First, we'll clone a fragment represented by a minimal flat range\n        // containing the original range to be cloned.\n        // E.g. let's consider such a range:\n        //\n        // <p>x</p><quote><p>y</p><h>fir[st</h></quote><p>se]cond</p><p>z</p>\n        //\n        // A minimal flat range containing this one is:\n        //\n        // <p>x</p>[<quote><p>y</p><h>first</h></quote><p>second</p>]<p>z</p>\n        //\n        // We can easily clone this structure, preserving e.g. the <quote> element.\n        let flatSubtreeRange;\n        if (range.start.parent == range.end.parent) {\n            // The original range is flat, so take it.\n            flatSubtreeRange = range;\n        } else {\n            flatSubtreeRange = writer.createRange(writer.createPositionAt(commonParent, range.start.path[commonPath.length]), writer.createPositionAt(commonParent, range.end.path[commonPath.length] + 1));\n        }\n        const howMany = flatSubtreeRange.end.offset - flatSubtreeRange.start.offset;\n        // Clone the whole contents.\n        for (const item of flatSubtreeRange.getItems({\n            shallow: true\n        })){\n            if (item.is('$textProxy')) {\n                writer.appendText(item.data, item.getAttributes(), frag);\n            } else {\n                writer.append(writer.cloneElement(item, true), frag);\n            }\n        }\n        // ## 2nd step\n        //\n        // If the original range wasn't flat, then we need to remove the excess nodes from the both ends of the cloned fragment.\n        //\n        // For example, for the range shown in the 1st step comment, we need to remove these pieces:\n        //\n        // <quote>[<p>y</p>]<h>[fir]st</h></quote><p>se[cond]</p>\n        //\n        // So this will be the final copied content:\n        //\n        // <quote><h>st</h></quote><p>se</p>\n        //\n        // In order to do that, we remove content from these two ranges:\n        //\n        // [<quote><p>y</p><h>fir]st</h></quote><p>se[cond</p>]\n        if (flatSubtreeRange != range) {\n            // Find the position of the original range in the cloned fragment.\n            const newRange = range._getTransformedByMove(flatSubtreeRange.start, writer.createPositionAt(frag, 0), howMany)[0];\n            const leftExcessRange = writer.createRange(writer.createPositionAt(frag, 0), newRange.start);\n            const rightExcessRange = writer.createRange(newRange.end, writer.createPositionAt(frag, 'end'));\n            removeRangeContent(rightExcessRange, writer);\n            removeRangeContent(leftExcessRange, writer);\n        }\n        return frag;\n    });\n}\n// After https://github.com/ckeditor/ckeditor5-engine/issues/690 is fixed,\n// this function will, most likely, be able to rewritten using getMinimalFlatRanges().\nfunction removeRangeContent(range, writer) {\n    const parentsToCheck = [];\n    Array.from(range.getItems({\n        direction: 'backward'\n    }))// We should better store ranges because text proxies will lose integrity\n    // with the text nodes when we'll start removing content.\n    .map((item)=>writer.createRangeOn(item))// Filter only these items which are fully contained in the passed range.\n    //\n    // E.g. for the following range: [<quote><p>y</p><h>fir]st</h>\n    // the walker will return the entire <h> element, when only the \"fir\" item inside it is fully contained.\n    .filter((itemRange)=>{\n        // We should be able to use Range.containsRange, but https://github.com/ckeditor/ckeditor5-engine/issues/691.\n        const contained = (itemRange.start.isAfter(range.start) || itemRange.start.isEqual(range.start)) && (itemRange.end.isBefore(range.end) || itemRange.end.isEqual(range.end));\n        return contained;\n    }).forEach((itemRange)=>{\n        parentsToCheck.push(itemRange.start.parent);\n        writer.remove(itemRange);\n    });\n    // Remove ancestors of the removed items if they turned to be empty now\n    // (their whole content was contained in the range).\n    parentsToCheck.forEach((parentToCheck)=>{\n        let parent = parentToCheck;\n        while(parent.parent && parent.isEmpty){\n            const removeRange = writer.createRangeOn(parent);\n            parent = parent.parent;\n            writer.remove(removeRange);\n        }\n    });\n}\n\n/**\n * Inserts content into the editor (specified selection) as one would expect the paste functionality to work.\n *\n * It takes care of removing the selected content, splitting elements (if needed), inserting elements and merging elements appropriately.\n *\n * Some examples:\n *\n * ```html\n * <p>x^</p> + <p>y</p> => <p>x</p><p>y</p> => <p>xy[]</p>\n * <p>x^y</p> + <p>z</p> => <p>x</p>^<p>y</p> + <p>z</p> => <p>x</p><p>z</p><p>y</p> => <p>xz[]y</p>\n * <p>x^y</p> + <img /> => <p>x</p>^<p>y</p> + <img /> => <p>x</p><img /><p>y</p>\n * <p>x</p><p>^</p><p>z</p> + <p>y</p> => <p>x</p><p>y[]</p><p>z</p> (no merging)\n * <p>x</p>[<img />]<p>z</p> + <p>y</p> => <p>x</p>^<p>z</p> + <p>y</p> => <p>x</p><p>y[]</p><p>z</p>\n * ```\n *\n * If an instance of {@link module:engine/model/selection~Selection} is passed as `selectable` it will be modified\n * to the insertion selection (equal to a range to be selected after insertion).\n *\n * If `selectable` is not passed, the content will be inserted using the current selection of the model document.\n *\n * **Note:** Use {@link module:engine/model/model~Model#insertContent} instead of this function.\n * This function is only exposed to be reusable in algorithms which change the {@link module:engine/model/model~Model#insertContent}\n * method's behavior.\n *\n * @param model The model in context of which the insertion should be performed.\n * @param content The content to insert.\n * @param selectable Selection into which the content should be inserted.\n * @param placeOrOffset Sets place or offset of the selection.\n * @returns Range which contains all the performed changes. This is a range that, if removed,\n * would return the model to the state before the insertion. If no changes were preformed by `insertContent`, returns a range collapsed\n * at the insertion position.\n */ function insertContent(model, content, selectable) {\n    return model.change((writer)=>{\n        const selection = selectable ? selectable : model.document.selection;\n        if (!selection.isCollapsed) {\n            model.deleteContent(selection, {\n                doNotAutoparagraph: true\n            });\n        }\n        const insertion = new Insertion(model, writer, selection.anchor);\n        const fakeMarkerElements = [];\n        let nodesToInsert;\n        if (content.is('documentFragment')) {\n            // If document fragment has any markers, these markers should be inserted into the model as well.\n            if (content.markers.size) {\n                const markersPosition = [];\n                for (const [name, range] of content.markers){\n                    const { start, end } = range;\n                    const isCollapsed = start.isEqual(end);\n                    markersPosition.push({\n                        position: start,\n                        name,\n                        isCollapsed\n                    }, {\n                        position: end,\n                        name,\n                        isCollapsed\n                    });\n                }\n                // Markers position is sorted backwards to ensure that the insertion of fake markers will not change\n                // the position of the next markers.\n                markersPosition.sort(({ position: posA }, { position: posB })=>posA.isBefore(posB) ? 1 : -1);\n                for (const { position, name, isCollapsed } of markersPosition){\n                    let fakeElement = null;\n                    let collapsed = null;\n                    const isAtBeginning = position.parent === content && position.isAtStart;\n                    const isAtEnd = position.parent === content && position.isAtEnd;\n                    // We have two ways of handling markers. In general, we want to add temporary <$marker> model elements to\n                    // represent marker boundaries. These elements will be inserted into content together with the rest\n                    // of the document fragment. After insertion is done, positions for these elements will be read\n                    // and proper, actual markers will be created in the model and fake elements will be removed.\n                    //\n                    // However, if the <$marker> element is at the beginning or at the end of the document fragment,\n                    // it may affect how the inserted content is merged with current model, impacting the insertion\n                    // result. To avoid that, we don't add <$marker> elements at these positions. Instead, we will use\n                    // `Insertion#getAffectedRange()` to figure out new positions for these marker boundaries.\n                    if (!isAtBeginning && !isAtEnd) {\n                        fakeElement = writer.createElement('$marker');\n                        writer.insert(fakeElement, position);\n                    } else if (isCollapsed) {\n                        // Save whether the collapsed marker was at the beginning or at the end of document fragment\n                        // to know where to create it after the insertion is done.\n                        collapsed = isAtBeginning ? 'start' : 'end';\n                    }\n                    fakeMarkerElements.push({\n                        name,\n                        element: fakeElement,\n                        collapsed\n                    });\n                }\n            }\n            nodesToInsert = content.getChildren();\n        } else {\n            nodesToInsert = [\n                content\n            ];\n        }\n        insertion.handleNodes(nodesToInsert);\n        let newRange = insertion.getSelectionRange();\n        if (content.is('documentFragment') && fakeMarkerElements.length) {\n            // After insertion was done, the selection was set but the model contains fake <$marker> elements.\n            // These <$marker> elements will be now removed. Because of that, we will need to fix the selection.\n            // We will create a live range that will automatically be update as <$marker> elements are removed.\n            const selectionLiveRange = newRange ? LiveRange.fromRange(newRange) : null;\n            // Marker name -> [ start position, end position ].\n            const markersData = {};\n            // Note: `fakeMarkerElements` are sorted backwards. However, now, we want to handle the markers\n            // from the beginning, so that existing <$marker> elements do not affect markers positions.\n            // This is why we iterate from the end to the start.\n            for(let i = fakeMarkerElements.length - 1; i >= 0; i--){\n                const { name, element, collapsed } = fakeMarkerElements[i];\n                const isStartBoundary = !markersData[name];\n                if (isStartBoundary) {\n                    markersData[name] = [];\n                }\n                if (element) {\n                    // Read fake marker element position to learn where the marker should be created.\n                    const elementPosition = writer.createPositionAt(element, 'before');\n                    markersData[name].push(elementPosition);\n                    writer.remove(element);\n                } else {\n                    // If the fake marker element does not exist, it means that the marker boundary was at the beginning or at the end.\n                    const rangeOnInsertion = insertion.getAffectedRange();\n                    if (!rangeOnInsertion) {\n                        // If affected range is `null` it means that nothing was in the document fragment or all content was filtered out.\n                        // Some markers that were in the filtered content may be removed (partially or totally).\n                        // Let's handle only those markers that were at the beginning or at the end of the document fragment.\n                        if (collapsed) {\n                            markersData[name].push(insertion.position);\n                        }\n                        continue;\n                    }\n                    if (collapsed) {\n                        // If the marker was collapsed at the beginning or at the end of the document fragment,\n                        // put both boundaries at the beginning or at the end of inserted range (to keep the marker collapsed).\n                        markersData[name].push(rangeOnInsertion[collapsed]);\n                    } else {\n                        markersData[name].push(isStartBoundary ? rangeOnInsertion.start : rangeOnInsertion.end);\n                    }\n                }\n            }\n            for (const [name, [start, end]] of Object.entries(markersData)){\n                // For now, we ignore markers if they are included in the filtered-out content.\n                // In the future implementation we will improve that case to create markers that are not filtered out completely.\n                if (start && end && start.root === end.root && start.root.document && !writer.model.markers.has(name)) {\n                    writer.addMarker(name, {\n                        usingOperation: true,\n                        affectsData: true,\n                        range: new Range(start, end)\n                    });\n                }\n            }\n            if (selectionLiveRange) {\n                newRange = selectionLiveRange.toRange();\n                selectionLiveRange.detach();\n            }\n        }\n        /* istanbul ignore else -- @preserve */ if (newRange) {\n            if (selection instanceof DocumentSelection) {\n                writer.setSelection(newRange);\n            } else {\n                selection.setTo(newRange);\n            }\n        }\n        const affectedRange = insertion.getAffectedRange() || model.createRange(selection.anchor);\n        insertion.destroy();\n        return affectedRange;\n    });\n}\n/**\n * Utility class for performing content insertion.\n */ class Insertion {\n    /**\n\t * The model in context of which the insertion should be performed.\n\t */ model;\n    /**\n\t * Batch to which operations will be added.\n\t */ writer;\n    /**\n\t * The position at which (or near which) the next node will be inserted.\n\t */ position;\n    /**\n\t * Elements with which the inserted elements can be merged.\n\t *\n\t * ```html\n\t * <p>x^</p><p>y</p> + <p>z</p> (can merge to <p>x</p>)\n\t * <p>x</p><p>^y</p> + <p>z</p> (can merge to <p>y</p>)\n\t * <p>x^y</p> + <p>z</p> (can merge to <p>xy</p> which will be split during the action,\n\t * \t\t\t\t\t\tso both its pieces will be added to this set)\n\t * ```\n\t */ canMergeWith;\n    /**\n\t * Schema of the model.\n\t */ schema;\n    /**\n\t * The temporary DocumentFragment used for grouping multiple nodes for single insert operation.\n\t */ _documentFragment;\n    /**\n\t * The current position in the temporary DocumentFragment.\n\t */ _documentFragmentPosition;\n    /**\n\t * The reference to the first inserted node.\n\t */ _firstNode = null;\n    /**\n\t * The reference to the last inserted node.\n\t */ _lastNode = null;\n    /**\n\t * The reference to the last auto paragraph node.\n\t */ _lastAutoParagraph = null;\n    /**\n\t * The array of nodes that should be cleaned of not allowed attributes.\n\t */ _filterAttributesOf = [];\n    /**\n\t * Beginning of the affected range. See {@link module:engine/model/utils/insertcontent~Insertion#getAffectedRange}.\n\t */ _affectedStart = null;\n    /**\n\t * End of the affected range. See {@link module:engine/model/utils/insertcontent~Insertion#getAffectedRange}.\n\t */ _affectedEnd = null;\n    _nodeToSelect = null;\n    constructor(model, writer, position){\n        this.model = model;\n        this.writer = writer;\n        this.position = position;\n        this.canMergeWith = new Set([\n            this.position.parent\n        ]);\n        this.schema = model.schema;\n        this._documentFragment = writer.createDocumentFragment();\n        this._documentFragmentPosition = writer.createPositionAt(this._documentFragment, 0);\n    }\n    /**\n\t * Handles insertion of a set of nodes.\n\t *\n\t * @param nodes Nodes to insert.\n\t */ handleNodes(nodes) {\n        for (const node of Array.from(nodes)){\n            this._handleNode(node);\n        }\n        // Insert nodes collected in temporary DocumentFragment.\n        this._insertPartialFragment();\n        // If there was an auto paragraph then we might need to adjust the end of insertion.\n        if (this._lastAutoParagraph) {\n            this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph);\n        }\n        // After the content was inserted we may try to merge it with its next sibling if the selection was in it initially.\n        // Merging with the previous sibling was performed just after inserting the first node to the document.\n        this._mergeOnRight();\n        // TMP this will become a post-fixer.\n        this.schema.removeDisallowedAttributes(this._filterAttributesOf, this.writer);\n        this._filterAttributesOf = [];\n    }\n    /**\n\t * Updates the last node after the auto paragraphing.\n\t *\n\t * @param node The last auto paragraphing node.\n\t */ _updateLastNodeFromAutoParagraph(node) {\n        const positionAfterLastNode = this.writer.createPositionAfter(this._lastNode);\n        const positionAfterNode = this.writer.createPositionAfter(node);\n        // If the real end was after the last auto paragraph then update relevant properties.\n        if (positionAfterNode.isAfter(positionAfterLastNode)) {\n            this._lastNode = node;\n            /* istanbul ignore if -- @preserve */ if (this.position.parent != node || !this.position.isAtEnd) {\n                // Algorithm's correctness check. We should never end up here but it's good to know that we did.\n                // At this point the insertion position should be at the end of the last auto paragraph.\n                // Note: This error is documented in other place in this file.\n                throw new CKEditorError('insertcontent-invalid-insertion-position', this);\n            }\n            this.position = positionAfterNode;\n            this._setAffectedBoundaries(this.position);\n        }\n    }\n    /**\n\t * Returns range to be selected after insertion.\n\t * Returns `null` if there is no valid range to select after insertion.\n\t */ getSelectionRange() {\n        if (this._nodeToSelect) {\n            return Range._createOn(this._nodeToSelect);\n        }\n        return this.model.schema.getNearestSelectionRange(this.position);\n    }\n    /**\n\t * Returns a range which contains all the performed changes. This is a range that, if removed, would return the model to the state\n\t * before the insertion. Returns `null` if no changes were done.\n\t */ getAffectedRange() {\n        if (!this._affectedStart) {\n            return null;\n        }\n        return new Range(this._affectedStart, this._affectedEnd);\n    }\n    /**\n\t * Destroys `Insertion` instance.\n\t */ destroy() {\n        if (this._affectedStart) {\n            this._affectedStart.detach();\n        }\n        if (this._affectedEnd) {\n            this._affectedEnd.detach();\n        }\n    }\n    /**\n\t * Handles insertion of a single node.\n\t */ _handleNode(node) {\n        // Split the position.parent's branch up to a point where the node can be inserted.\n        // If it isn't allowed in the whole branch, then of course don't split anything.\n        if (!this._checkAndSplitToAllowedPosition(node)) {\n            // Handle element children if it's not an object (strip container).\n            if (!this.schema.isObject(node)) {\n                this._handleDisallowedNode(node);\n            }\n            return;\n        }\n        // Add node to the current temporary DocumentFragment.\n        this._appendToFragment(node);\n        // Store the first and last nodes for easy access for merging with sibling nodes.\n        if (!this._firstNode) {\n            this._firstNode = node;\n        }\n        this._lastNode = node;\n    }\n    /**\n\t * Inserts the temporary DocumentFragment into the model.\n\t */ _insertPartialFragment() {\n        if (this._documentFragment.isEmpty) {\n            return;\n        }\n        const livePosition = LivePosition.fromPosition(this.position, 'toNext');\n        this._setAffectedBoundaries(this.position);\n        // If the very first node of the whole insertion process is inserted, insert it separately for OT reasons (undo).\n        // Note: there can be multiple calls to `_insertPartialFragment()` during one insertion process.\n        // Note: only the very first node can be merged so we have to do separate operation only for it.\n        if (this._documentFragment.getChild(0) == this._firstNode) {\n            this.writer.insert(this._firstNode, this.position);\n            // We must merge the first node just after inserting it to avoid problems with OT.\n            // (See: https://github.com/ckeditor/ckeditor5/pull/8773#issuecomment-760945652).\n            this._mergeOnLeft();\n            this.position = livePosition.toPosition();\n        }\n        // Insert the remaining nodes from document fragment.\n        if (!this._documentFragment.isEmpty) {\n            this.writer.insert(this._documentFragment, this.position);\n        }\n        this._documentFragmentPosition = this.writer.createPositionAt(this._documentFragment, 0);\n        this.position = livePosition.toPosition();\n        livePosition.detach();\n    }\n    /**\n\t * @param node The disallowed node which needs to be handled.\n\t */ _handleDisallowedNode(node) {\n        // If the node is an element, try inserting its children (strip the parent).\n        if (node.is('element')) {\n            this.handleNodes(node.getChildren());\n        }\n    }\n    /**\n\t * Append a node to the temporary DocumentFragment.\n\t *\n\t * @param node The node to insert.\n\t */ _appendToFragment(node) {\n        /* istanbul ignore if -- @preserve */ if (!this.schema.checkChild(this.position, node)) {\n            // Algorithm's correctness check. We should never end up here but it's good to know that we did.\n            // Note that it would often be a silent issue if we insert node in a place where it's not allowed.\n            /**\n\t\t\t * Given node cannot be inserted on the given position.\n\t\t\t *\n\t\t\t * @error insertcontent-wrong-position\n\t\t\t * @param node Node to insert.\n\t\t\t * @param position Position to insert the node at.\n\t\t\t */ throw new CKEditorError('insertcontent-wrong-position', this, {\n                node,\n                position: this.position\n            });\n        }\n        this.writer.insert(node, this._documentFragmentPosition);\n        this._documentFragmentPosition = this._documentFragmentPosition.getShiftedBy(node.offsetSize);\n        // The last inserted object should be selected because we can't put a collapsed selection after it.\n        if (this.schema.isObject(node) && !this.schema.checkChild(this.position, '$text')) {\n            this._nodeToSelect = node;\n        } else {\n            this._nodeToSelect = null;\n        }\n        this._filterAttributesOf.push(node);\n    }\n    /**\n\t * Sets `_affectedStart` and `_affectedEnd` to the given `position`. Should be used before a change is done during insertion process to\n\t * mark the affected range.\n\t *\n\t * This method is used before inserting a node or splitting a parent node. `_affectedStart` and `_affectedEnd` are also changed\n\t * during merging, but the logic there is more complicated so it is left out of this function.\n\t */ _setAffectedBoundaries(position) {\n        // Set affected boundaries stickiness so that those position will \"expand\" when something is inserted in between them:\n        // <paragraph>Foo][bar</paragraph> -> <paragraph>Foo]xx[bar</paragraph>\n        // This is why it cannot be a range but two separate positions.\n        if (!this._affectedStart) {\n            this._affectedStart = LivePosition.fromPosition(position, 'toPrevious');\n        }\n        // If `_affectedEnd` is before the new boundary position, expand `_affectedEnd`. This can happen if first inserted node was\n        // inserted into the parent but the next node is moved-out of that parent:\n        // (1) <paragraph>Foo][</paragraph> -> <paragraph>Foo]xx[</paragraph>\n        // (2) <paragraph>Foo]xx[</paragraph> -> <paragraph>Foo]xx</paragraph><widget></widget>[\n        if (!this._affectedEnd || this._affectedEnd.isBefore(position)) {\n            if (this._affectedEnd) {\n                this._affectedEnd.detach();\n            }\n            this._affectedEnd = LivePosition.fromPosition(position, 'toNext');\n        }\n    }\n    /**\n\t * Merges the previous sibling of the first node if it should be merged.\n\t *\n\t * After the content was inserted we may try to merge it with its siblings.\n\t * This should happen only if the selection was in those elements initially.\n\t */ _mergeOnLeft() {\n        const node = this._firstNode;\n        if (!(node instanceof Element)) {\n            return;\n        }\n        if (!this._canMergeLeft(node)) {\n            return;\n        }\n        const mergePosLeft = LivePosition._createBefore(node);\n        mergePosLeft.stickiness = 'toNext';\n        const livePosition = LivePosition.fromPosition(this.position, 'toNext');\n        // If `_affectedStart` is sames as merge position, it means that the element \"marked\" by `_affectedStart` is going to be\n        // removed and its contents will be moved. This won't transform `LivePosition` so `_affectedStart` needs to be moved\n        // by hand to properly reflect affected range. (Due to `_affectedStart` and `_affectedEnd` stickiness, the \"range\" is\n        // shown as `][`).\n        //\n        // Example - insert `<paragraph>Abc</paragraph><paragraph>Xyz</paragraph>` at the end of `<paragraph>Foo^</paragraph>`:\n        //\n        // <paragraph>Foo</paragraph><paragraph>Bar</paragraph>   -->\n        // <paragraph>Foo</paragraph>]<paragraph>Abc</paragraph><paragraph>Xyz</paragraph>[<paragraph>Bar</paragraph>   -->\n        // <paragraph>Foo]Abc</paragraph><paragraph>Xyz</paragraph>[<paragraph>Bar</paragraph>\n        //\n        // Note, that if we are here then something must have been inserted, so `_affectedStart` and `_affectedEnd` have to be set.\n        if (this._affectedStart.isEqual(mergePosLeft)) {\n            this._affectedStart.detach();\n            this._affectedStart = LivePosition._createAt(mergePosLeft.nodeBefore, 'end', 'toPrevious');\n        }\n        // We need to update the references to the first and last nodes if they will be merged into the previous sibling node\n        // because the reference would point to the removed node.\n        //\n        // <p>A^A</p> + <p>X</p>\n        //\n        // <p>A</p>^<p>A</p>\n        // <p>A</p><p>X</p><p>A</p>\n        // <p>AX</p><p>A</p>\n        // <p>AXA</p>\n        if (this._firstNode === this._lastNode) {\n            this._firstNode = mergePosLeft.nodeBefore;\n            this._lastNode = mergePosLeft.nodeBefore;\n        }\n        this.writer.merge(mergePosLeft);\n        // If only one element (the merged one) is in the \"affected range\", also move the affected range end appropriately.\n        //\n        // Example - insert `<paragraph>Abc</paragraph>` at the of `<paragraph>Foo^</paragraph>`:\n        //\n        // <paragraph>Foo</paragraph><paragraph>Bar</paragraph>   -->\n        // <paragraph>Foo</paragraph>]<paragraph>Abc</paragraph>[<paragraph>Bar</paragraph>   -->\n        // <paragraph>Foo]Abc</paragraph>[<paragraph>Bar</paragraph>   -->\n        // <paragraph>Foo]Abc[</paragraph><paragraph>Bar</paragraph>\n        if (mergePosLeft.isEqual(this._affectedEnd) && this._firstNode === this._lastNode) {\n            this._affectedEnd.detach();\n            this._affectedEnd = LivePosition._createAt(mergePosLeft.nodeBefore, 'end', 'toNext');\n        }\n        this.position = livePosition.toPosition();\n        livePosition.detach();\n        // After merge elements that were marked by _insert() to be filtered might be gone so\n        // we need to mark the new container.\n        this._filterAttributesOf.push(this.position.parent);\n        mergePosLeft.detach();\n    }\n    /**\n\t * Merges the next sibling of the last node if it should be merged.\n\t *\n\t * After the content was inserted we may try to merge it with its siblings.\n\t * This should happen only if the selection was in those elements initially.\n\t */ _mergeOnRight() {\n        const node = this._lastNode;\n        if (!(node instanceof Element)) {\n            return;\n        }\n        if (!this._canMergeRight(node)) {\n            return;\n        }\n        const mergePosRight = LivePosition._createAfter(node);\n        mergePosRight.stickiness = 'toNext';\n        /* istanbul ignore if -- @preserve */ if (!this.position.isEqual(mergePosRight)) {\n            // Algorithm's correctness check. We should never end up here but it's good to know that we did.\n            // At this point the insertion position should be after the node we'll merge. If it isn't,\n            // it should need to be secured as in the left merge case.\n            /**\n\t\t\t * An internal error occurred when merging inserted content with its siblings.\n\t\t\t * The insertion position should equal the merge position.\n\t\t\t *\n\t\t\t * If you encountered this error, report it back to the CKEditor 5 team\n\t\t\t * with as many details as possible regarding the content being inserted and the insertion position.\n\t\t\t *\n\t\t\t * @error insertcontent-invalid-insertion-position\n\t\t\t */ throw new CKEditorError('insertcontent-invalid-insertion-position', this);\n        }\n        // Move the position to the previous node, so it isn't moved to the graveyard on merge.\n        // <p>x</p>[]<p>y</p> => <p>x[]</p><p>y</p>\n        this.position = Position._createAt(mergePosRight.nodeBefore, 'end');\n        // Explanation of setting position stickiness to `'toPrevious'`:\n        // OK:  <p>xx[]</p> + <p>yy</p> => <p>xx[]yy</p> (when sticks to previous)\n        // NOK: <p>xx[]</p> + <p>yy</p> => <p>xxyy[]</p> (when sticks to next)\n        const livePosition = LivePosition.fromPosition(this.position, 'toPrevious');\n        // See comment in `_mergeOnLeft()` on moving `_affectedStart`.\n        if (this._affectedEnd.isEqual(mergePosRight)) {\n            this._affectedEnd.detach();\n            this._affectedEnd = LivePosition._createAt(mergePosRight.nodeBefore, 'end', 'toNext');\n        }\n        // We need to update the references to the first and last nodes if they will be merged into the previous sibling node\n        // because the reference would point to the removed node.\n        //\n        // <p>A^A</p> + <p>X</p>\n        //\n        // <p>A</p>^<p>A</p>\n        // <p>A</p><p>X</p><p>A</p>\n        // <p>AX</p><p>A</p>\n        // <p>AXA</p>\n        if (this._firstNode === this._lastNode) {\n            this._firstNode = mergePosRight.nodeBefore;\n            this._lastNode = mergePosRight.nodeBefore;\n        }\n        this.writer.merge(mergePosRight);\n        // See comment in `_mergeOnLeft()` on moving `_affectedStart`.\n        if (mergePosRight.getShiftedBy(-1).isEqual(this._affectedStart) && this._firstNode === this._lastNode) {\n            this._affectedStart.detach();\n            this._affectedStart = LivePosition._createAt(mergePosRight.nodeBefore, 0, 'toPrevious');\n        }\n        this.position = livePosition.toPosition();\n        livePosition.detach();\n        // After merge elements that were marked by _insert() to be filtered might be gone so\n        // we need to mark the new container.\n        this._filterAttributesOf.push(this.position.parent);\n        mergePosRight.detach();\n    }\n    /**\n\t * Checks whether specified node can be merged with previous sibling element.\n\t *\n\t * @param node The node which could potentially be merged.\n\t */ _canMergeLeft(node) {\n        const previousSibling = node.previousSibling;\n        return previousSibling instanceof Element && this.canMergeWith.has(previousSibling) && this.model.schema.checkMerge(previousSibling, node);\n    }\n    /**\n\t * Checks whether specified node can be merged with next sibling element.\n\t *\n\t * @param node The node which could potentially be merged.\n\t */ _canMergeRight(node) {\n        const nextSibling = node.nextSibling;\n        return nextSibling instanceof Element && this.canMergeWith.has(nextSibling) && this.model.schema.checkMerge(node, nextSibling);\n    }\n    /**\n\t * Inserts a paragraph and moves the insertion position into it.\n\t */ _insertAutoParagraph() {\n        // Insert nodes collected in temporary DocumentFragment if the position parent needs change to process further nodes.\n        this._insertPartialFragment();\n        // Insert a paragraph and move insertion position to it.\n        const paragraph = this.writer.createElement('paragraph');\n        this.writer.insert(paragraph, this.position);\n        this._setAffectedBoundaries(this.position);\n        this._lastAutoParagraph = paragraph;\n        this.position = this.writer.createPositionAt(paragraph, 0);\n    }\n    /**\n\t * @returns Whether an allowed position was found.\n\t * `false` is returned if the node isn't allowed at any position up in the tree, `true` if was.\n\t */ _checkAndSplitToAllowedPosition(node) {\n        const allowedIn = this._getAllowedIn(this.position.parent, node);\n        if (!allowedIn) {\n            return false;\n        }\n        // Insert nodes collected in temporary DocumentFragment if the position parent needs change to process further nodes.\n        if (allowedIn != this.position.parent) {\n            this._insertPartialFragment();\n        }\n        while(allowedIn != this.position.parent){\n            if (this.position.isAtStart) {\n                // If insertion position is at the beginning of the parent, move it out instead of splitting.\n                // <p>^Foo</p> -> ^<p>Foo</p>\n                const parent = this.position.parent;\n                this.position = this.writer.createPositionBefore(parent);\n                // Special case – parent is empty (<p>^</p>).\n                //\n                // 1. parent.isEmpty\n                // We can remove the element after moving insertion position out of it.\n                //\n                // 2. parent.parent === allowedIn\n                // However parent should remain in place when allowed element is above limit element in document tree.\n                // For example there shouldn't be allowed to remove empty paragraph from tableCell, when is pasted\n                // content allowed in $root.\n                if (parent.isEmpty && parent.parent === allowedIn) {\n                    this.writer.remove(parent);\n                }\n            } else if (this.position.isAtEnd) {\n                // If insertion position is at the end of the parent, move it out instead of splitting.\n                // <p>Foo^</p> -> <p>Foo</p>^\n                this.position = this.writer.createPositionAfter(this.position.parent);\n            } else {\n                const tempPos = this.writer.createPositionAfter(this.position.parent);\n                this._setAffectedBoundaries(this.position);\n                this.writer.split(this.position);\n                this.position = tempPos;\n                this.canMergeWith.add(this.position.nodeAfter);\n            }\n        }\n        // At this point, we split elements up to the parent in which `node` is allowed.\n        // Note that `_getAllowedIn()` checks if the `node` is allowed either directly, or when auto-paragraphed.\n        // So, let's check if the `node` is allowed directly. If not, we need to auto-paragraph it.\n        if (!this.schema.checkChild(this.position.parent, node)) {\n            this._insertAutoParagraph();\n        }\n        return true;\n    }\n    /**\n\t * Gets the element in which the given node is allowed. It checks the passed element and all its ancestors.\n\t *\n\t * It also verifies if auto-paragraphing could help.\n\t *\n\t * @param contextElement The element in which context the node should be checked.\n\t * @param childNode The node to check.\n\t */ _getAllowedIn(contextElement, childNode) {\n        // Check if a node can be inserted in the given context...\n        if (this.schema.checkChild(contextElement, childNode)) {\n            return contextElement;\n        }\n        // ...or it would be accepted if a paragraph would be inserted.\n        if (this.schema.checkChild(contextElement, 'paragraph') && this.schema.checkChild('paragraph', childNode)) {\n            return contextElement;\n        }\n        // If the child wasn't allowed in the context element and the element is a limit there's no point in\n        // checking any further towards the root. This is it: the limit is unsplittable and there's nothing\n        // we can do about it. Without this check, the algorithm will analyze parent of the limit and may create\n        // an illusion of the child being allowed. There's no way to insert it down there, though. It results in\n        // infinite loops.\n        if (this.schema.isLimit(contextElement)) {\n            return null;\n        }\n        return this._getAllowedIn(contextElement.parent, childNode);\n    }\n}\n\n/**\n * Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.\n *\n * **Note:** Use {@link module:engine/model/model~Model#insertObject} instead of this function.\n * This function is only exposed to be reusable in algorithms which change the {@link module:engine/model/model~Model#insertObject}\n * method's behavior.\n *\n * **Note**: For more documentation and examples, see {@link module:engine/model/model~Model#insertObject}.\n *\n * @param model The model in context of which the insertion should be performed.\n * @param object An object to be inserted into the model document.\n * @param selectable A selectable where the content should be inserted. If not specified, the current\n * {@link module:engine/model/document~Document#selection document selection} will be used instead.\n * @param placeOrOffset Specifies the exact place or offset for the insertion to take place, relative to `selectable`.\n * @param options Additional options.\n * @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to\n * `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).\n * * When `'auto'`, the algorithm will decide whether to insert the object before or after `selectable` to avoid content splitting.\n * * When `'before'`, the closest position before `selectable` will be used that will not result in content splitting.\n * * When `'after'`, the closest position after `selectable` will be used that will not result in content splitting.\n *\n * Note that this option works only for block objects. Inline objects are inserted into text and do not split blocks.\n * @param options.setSelection An option that, when set, moves the\n * {@link module:engine/model/document~Document#selection document selection} after inserting the object.\n * * When `'on'`, the document selection will be set on the inserted object.\n * * When `'after'`, the document selection will move to the closest text node after the inserted object. If there is no\n * such text node, a paragraph will be created and the document selection will be moved inside it.\n * @returns A range which contains all the performed changes. This is a range that, if removed,\n * would return the model to the state before the insertion. If no changes were preformed by `insertObject()`, returns a range collapsed\n * at the insertion position.\n */ function insertObject(model, object, selectable, options = {}) {\n    if (!model.schema.isObject(object)) {\n        /**\n\t\t * Tried to insert an element with {@link module:engine/model/utils/insertobject insertObject()} function\n\t\t * that is not defined as an object in schema.\n\t\t * See {@link module:engine/model/schema~SchemaItemDefinition#isObject `SchemaItemDefinition`}.\n\t\t * If you want to insert content that is not an object you might want to use\n\t\t * {@link module:engine/model/utils/insertcontent insertContent()} function.\n\t\t * @error insertobject-element-not-an-object\n\t\t */ throw new CKEditorError('insertobject-element-not-an-object', model, {\n            object\n        });\n    }\n    // Normalize selectable to a selection instance.\n    const originalSelection = selectable ? selectable : model.document.selection;\n    // Adjust the insertion selection.\n    let insertionSelection = originalSelection;\n    if (options.findOptimalPosition && model.schema.isBlock(object)) {\n        insertionSelection = model.createSelection(model.schema.findOptimalInsertionRange(originalSelection, options.findOptimalPosition));\n    }\n    // Collect attributes to be copied on the inserted object.\n    const firstSelectedBlock = first(originalSelection.getSelectedBlocks());\n    const attributesToCopy = {};\n    if (firstSelectedBlock) {\n        Object.assign(attributesToCopy, model.schema.getAttributesWithProperty(firstSelectedBlock, 'copyOnReplace', true));\n    }\n    return model.change((writer)=>{\n        // Remove the selected content to find out what the parent of the inserted object would be.\n        // It would be removed inside model.insertContent() anyway.\n        if (!insertionSelection.isCollapsed) {\n            model.deleteContent(insertionSelection, {\n                doNotAutoparagraph: true\n            });\n        }\n        let elementToInsert = object;\n        const insertionPositionParent = insertionSelection.anchor.parent;\n        // Autoparagraphing of an inline objects.\n        if (!model.schema.checkChild(insertionPositionParent, object) && model.schema.checkChild(insertionPositionParent, 'paragraph') && model.schema.checkChild('paragraph', object)) {\n            elementToInsert = writer.createElement('paragraph');\n            writer.insert(object, elementToInsert);\n        }\n        // Apply attributes that are allowed on the inserted object (or paragraph if autoparagraphed).\n        model.schema.setAllowedAttributes(elementToInsert, attributesToCopy, writer);\n        // Insert the prepared content at the optionally adjusted selection.\n        const affectedRange = model.insertContent(elementToInsert, insertionSelection);\n        // Nothing got inserted.\n        if (affectedRange.isCollapsed) {\n            return affectedRange;\n        }\n        if (options.setSelection) {\n            updateSelection(writer, object, options.setSelection, attributesToCopy);\n        }\n        return affectedRange;\n    });\n}\n/**\n * Updates document selection based on given `place` parameter in relation to `contextElement` element.\n *\n * @param writer An instance of the model writer.\n * @param contextElement An element to set the attributes on.\n * @param place The place where selection should be set in relation to the `contextElement` element.\n * Value `on` will set selection on the passed `contextElement`. Value `after` will set selection after `contextElement`.\n * @param attributes Attributes keys and values to set on a paragraph that this function can create when\n * `place` parameter is equal to `after` but there is no element with `$text` node to set selection in.\n */ function updateSelection(writer, contextElement, place, paragraphAttributes) {\n    const model = writer.model;\n    if (place == 'on') {\n        writer.setSelection(contextElement, 'on');\n        return;\n    }\n    if (place != 'after') {\n        /**\n\t\t * The unsupported `options.setSelection` parameter was passed\n\t\t * to the {@link module:engine/model/utils/insertobject insertObject()} function.\n\t\t * Check the {@link module:engine/model/utils/insertobject insertObject()} API documentation for allowed\n\t\t * `options.setSelection` parameter values.\n\t\t *\n\t\t * @error insertobject-invalid-place-parameter-value\n\t\t */ throw new CKEditorError('insertobject-invalid-place-parameter-value', model);\n    }\n    let nextElement = contextElement.nextSibling;\n    if (model.schema.isInline(contextElement)) {\n        writer.setSelection(contextElement, 'after');\n        return;\n    }\n    // Check whether an element next to the inserted element is defined and can contain a text.\n    const canSetSelection = nextElement && model.schema.checkChild(nextElement, '$text');\n    // If the element is missing, but a paragraph could be inserted next to the element, let's add it.\n    if (!canSetSelection && model.schema.checkChild(contextElement.parent, 'paragraph')) {\n        nextElement = writer.createElement('paragraph');\n        model.schema.setAllowedAttributes(nextElement, paragraphAttributes, writer);\n        model.insertContent(nextElement, writer.createPositionAfter(contextElement));\n    }\n    // Put the selection inside the element, at the beginning.\n    if (nextElement) {\n        writer.setSelection(nextElement, 0);\n    }\n}\n\nconst wordBoundaryCharacters = ' ,.?!:;\"-()';\n/**\n * Modifies the selection. Currently, the supported modifications are:\n *\n * * Extending. The selection focus is moved in the specified `options.direction` with a step specified in `options.unit`.\n * Possible values for `unit` are:\n *  * `'character'` (default) - moves selection by one user-perceived character. In most cases this means moving by one\n *  character in `String` sense. However, unicode also defines \"combing marks\". These are special symbols, that combines\n *  with a symbol before it (\"base character\") to create one user-perceived character. For example, `q̣̇` is a normal\n *  letter `q` with two \"combining marks\": upper dot (`Ux0307`) and lower dot (`Ux0323`). For most actions, i.e. extending\n *  selection by one position, it is correct to include both \"base character\" and all of it's \"combining marks\". That is\n *  why `'character'` value is most natural and common method of modifying selection.\n *  * `'codePoint'` - moves selection by one unicode code point. In contrary to, `'character'` unit, this will insert\n *  selection between \"base character\" and \"combining mark\", because \"combining marks\" have their own unicode code points.\n *  However, for technical reasons, unicode code points with values above `UxFFFF` are represented in native `String` by\n *  two characters, called \"surrogate pairs\". Halves of \"surrogate pairs\" have a meaning only when placed next to each other.\n *  For example `𨭎` is represented in `String` by `\\uD862\\uDF4E`. Both `\\uD862` and `\\uDF4E` do not have any meaning\n *  outside the pair (are rendered as ? when alone). Position between them would be incorrect. In this case, selection\n *  extension will include whole \"surrogate pair\".\n *  * `'word'` - moves selection by a whole word.\n *\n * **Note:** if you extend a forward selection in a backward direction you will in fact shrink it.\n *\n * **Note:** Use {@link module:engine/model/model~Model#modifySelection} instead of this function.\n * This function is only exposed to be reusable in algorithms\n * which change the {@link module:engine/model/model~Model#modifySelection}\n * method's behavior.\n *\n * @param model The model in context of which the selection modification should be performed.\n * @param selection The selection to modify.\n * @param options.direction The direction in which the selection should be modified. Default 'forward'.\n * @param options.unit The unit by which selection should be modified. Default 'character'.\n * @param options.treatEmojiAsSingleUnit Whether multi-characer emoji sequences should be handled as single unit.\n */ function modifySelection(model, selection, options = {}) {\n    const schema = model.schema;\n    const isForward = options.direction != 'backward';\n    const unit = options.unit ? options.unit : 'character';\n    const treatEmojiAsSingleUnit = !!options.treatEmojiAsSingleUnit;\n    const focus = selection.focus;\n    const walker = new TreeWalker({\n        boundaries: getSearchRange(focus, isForward),\n        singleCharacters: true,\n        direction: isForward ? 'forward' : 'backward'\n    });\n    const data = {\n        walker,\n        schema,\n        isForward,\n        unit,\n        treatEmojiAsSingleUnit\n    };\n    let next;\n    while(next = walker.next()){\n        if (next.done) {\n            return;\n        }\n        const position = tryExtendingTo(data, next.value);\n        if (position) {\n            if (selection instanceof DocumentSelection) {\n                model.change((writer)=>{\n                    writer.setSelectionFocus(position);\n                });\n            } else {\n                selection.setFocus(position);\n            }\n            return;\n        }\n    }\n}\n/**\n * Checks whether the selection can be extended to the the walker's next value (next position).\n */ function tryExtendingTo(data, value) {\n    const { isForward, walker, unit, schema, treatEmojiAsSingleUnit } = data;\n    const { type, item, nextPosition } = value;\n    // If found text, we can certainly put the focus in it. Let's just find a correct position\n    // based on the unit.\n    if (type == 'text') {\n        if (data.unit === 'word') {\n            return getCorrectWordBreakPosition(walker, isForward);\n        }\n        return getCorrectPosition(walker, unit, treatEmojiAsSingleUnit);\n    }\n    // Entering an element.\n    if (type == (isForward ? 'elementStart' : 'elementEnd')) {\n        // If it's a selectable, we can select it now.\n        if (schema.isSelectable(item)) {\n            return Position._createAt(item, isForward ? 'after' : 'before');\n        }\n        // If text allowed on this position, extend to this place.\n        if (schema.checkChild(nextPosition, '$text')) {\n            return nextPosition;\n        }\n    } else {\n        // If leaving a limit element, stop.\n        if (schema.isLimit(item)) {\n            // NOTE: Fast-forward the walker until the end.\n            walker.skip(()=>true);\n            return;\n        }\n        // If text allowed on this position, extend to this place.\n        if (schema.checkChild(nextPosition, '$text')) {\n            return nextPosition;\n        }\n    }\n}\n/**\n * Finds a correct position by walking in a text node and checking whether selection can be extended to given position\n * or should be extended further.\n */ function getCorrectPosition(walker, unit, treatEmojiAsSingleUnit) {\n    const textNode = walker.position.textNode;\n    if (textNode) {\n        const data = textNode.data;\n        let offset = walker.position.offset - textNode.startOffset;\n        while(isInsideSurrogatePair(data, offset) || unit == 'character' && isInsideCombinedSymbol(data, offset) || treatEmojiAsSingleUnit && isInsideEmojiSequence(data, offset)){\n            walker.next();\n            offset = walker.position.offset - textNode.startOffset;\n        }\n    }\n    return walker.position;\n}\n/**\n * Finds a correct position of a word break by walking in a text node and checking whether selection can be extended to given position\n * or should be extended further.\n */ function getCorrectWordBreakPosition(walker, isForward) {\n    let textNode = walker.position.textNode;\n    if (!textNode) {\n        textNode = isForward ? walker.position.nodeAfter : walker.position.nodeBefore;\n    }\n    while(textNode && textNode.is('$text')){\n        const offset = walker.position.offset - textNode.startOffset;\n        // Check of adjacent text nodes with different attributes (like BOLD).\n        // Example          : 'foofoo []bar<$text bold=\"true\">bar</$text> bazbaz'\n        // should expand to : 'foofoo [bar<$text bold=\"true\">bar</$text>] bazbaz'.\n        if (isAtNodeBoundary(textNode, offset, isForward)) {\n            textNode = isForward ? walker.position.nodeAfter : walker.position.nodeBefore;\n        } else if (isAtWordBoundary(textNode.data, offset, isForward)) {\n            break;\n        } else {\n            walker.next();\n        }\n    }\n    return walker.position;\n}\nfunction getSearchRange(start, isForward) {\n    const root = start.root;\n    const searchEnd = Position._createAt(root, isForward ? 'end' : 0);\n    if (isForward) {\n        return new Range(start, searchEnd);\n    } else {\n        return new Range(searchEnd, start);\n    }\n}\n/**\n * Checks if selection is on word boundary.\n */ function isAtWordBoundary(data, offset, isForward) {\n    // The offset to check depends on direction.\n    const offsetToCheck = offset + (isForward ? 0 : -1);\n    return wordBoundaryCharacters.includes(data.charAt(offsetToCheck));\n}\n/**\n * Checks if selection is on node boundary.\n */ function isAtNodeBoundary(textNode, offset, isForward) {\n    return offset === (isForward ? textNode.offsetSize : 0);\n}\n\n// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' );\n// @if CK_DEBUG_ENGINE // const { OperationReplayer } = require( '../dev-utils/operationreplayer' ).default;\n/**\n * Editor's data model. Read about the model in the\n * {@glink framework/architecture/editing-engine engine architecture} guide.\n */ class Model extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * Model's marker collection.\n\t */ markers;\n    /**\n\t * Model's document.\n\t */ document;\n    /**\n\t * Model's schema.\n\t */ schema;\n    /**\n\t * All callbacks added by {@link module:engine/model/model~Model#change} or\n\t * {@link module:engine/model/model~Model#enqueueChange} methods waiting to be executed.\n\t */ _pendingChanges;\n    /**\n\t * The last created and currently used writer instance.\n\t */ _currentWriter;\n    // @if CK_DEBUG_ENGINE // private _operationLogs: Array<string>;\n    // @if CK_DEBUG_ENGINE // private _appliedOperations: Array<Operation>;\n    constructor(){\n        super();\n        this.markers = new MarkerCollection();\n        this.document = new Document(this);\n        this.schema = new Schema();\n        this._pendingChanges = [];\n        this._currentWriter = null;\n        [\n            'deleteContent',\n            'modifySelection',\n            'getSelectedContent',\n            'applyOperation'\n        ].forEach((methodName)=>this.decorate(methodName));\n        // Adding operation validation with `highest` priority, so it is called before any other feature would like\n        // to do anything with the operation. If the operation has incorrect parameters it should throw on the earliest occasion.\n        this.on('applyOperation', (evt, args)=>{\n            const operation = args[0];\n            operation._validate();\n        }, {\n            priority: 'highest'\n        });\n        // Register some default abstract entities.\n        this.schema.register('$root', {\n            isLimit: true\n        });\n        this.schema.register('$container', {\n            allowIn: [\n                '$root',\n                '$container'\n            ]\n        });\n        this.schema.register('$block', {\n            allowIn: [\n                '$root',\n                '$container'\n            ],\n            isBlock: true\n        });\n        this.schema.register('$blockObject', {\n            allowWhere: '$block',\n            isBlock: true,\n            isObject: true\n        });\n        this.schema.register('$inlineObject', {\n            allowWhere: '$text',\n            allowAttributesOf: '$text',\n            isInline: true,\n            isObject: true\n        });\n        this.schema.register('$text', {\n            allowIn: '$block',\n            isInline: true,\n            isContent: true\n        });\n        this.schema.register('$clipboardHolder', {\n            allowContentOf: '$root',\n            allowChildren: '$text',\n            isLimit: true\n        });\n        this.schema.register('$documentFragment', {\n            allowContentOf: '$root',\n            allowChildren: '$text',\n            isLimit: true\n        });\n        // An element needed by the `upcastElementToMarker` converter.\n        // This element temporarily represents a marker boundary during the conversion process and is removed\n        // at the end of the conversion. `UpcastDispatcher` or at least `Conversion` class looks like a\n        // better place for this registration but both know nothing about `Schema`.\n        this.schema.register('$marker');\n        this.schema.addChildCheck(()=>true, '$marker'); // Allow everywhere.\n        injectSelectionPostFixer(this);\n        // Post-fixer which takes care of adding empty paragraph elements to the empty roots.\n        this.document.registerPostFixer(autoParagraphEmptyRoots);\n        // The base implementation for \"decorated\" method with remapped arguments.\n        this.on('insertContent', (evt, [content, selectable])=>{\n            evt.return = insertContent(this, content, selectable);\n        });\n        // The base implementation for \"decorated\" method with remapped arguments.\n        this.on('insertObject', (evt, [element, selection, options])=>{\n            evt.return = insertObject(this, element, selection, options);\n        });\n        // The base implementation for \"decorated\" method with remapped arguments.\n        this.on('canEditAt', (evt)=>{\n            const canEditAt = !this.document.isReadOnly;\n            evt.return = canEditAt;\n            if (!canEditAt) {\n                // Prevent further processing if the selection is at non-editable place.\n                evt.stop();\n            }\n        });\n    // @if CK_DEBUG_ENGINE // initDocumentDumping( this.document );\n    // @if CK_DEBUG_ENGINE // this.on( 'applyOperation', () => {\n    // @if CK_DEBUG_ENGINE // \tdumpTrees( this.document, this.document.version );\n    // @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } );\n    // @if CK_DEBUG_ENGINE // this._operationLogs = [];\n    // @if CK_DEBUG_ENGINE // this._appliedOperations = [];\n    }\n    /**\n\t * The `change()` method is the primary way of changing the model. You should use it to modify all document nodes\n\t * (including detached nodes – i.e. nodes not added to the {@link module:engine/model/model~Model#document model document}),\n\t * the {@link module:engine/model/document~Document#selection document's selection}, and\n\t * {@link module:engine/model/model~Model#markers model markers}.\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \twriter.insertText( 'foo', paragraph, 'end' );\n\t * } );\n\t * ```\n\t *\n\t * All changes inside the change block use the same {@link module:engine/model/batch~Batch} so they are combined\n\t * into a single undo step.\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \twriter.insertText( 'foo', paragraph, 'end' ); // foo.\n\t *\n\t * \tmodel.change( writer => {\n\t * \t\twriter.insertText( 'bar', paragraph, 'end' ); // foobar.\n\t * \t} );\n\t *\n\t * \twriter.insertText( 'bom', paragraph, 'end' ); // foobarbom.\n\t * } );\n\t * ```\n\t *\n\t * The callback of the `change()` block is executed synchronously.\n\t *\n\t * You can also return a value from the change block.\n\t *\n\t * ```ts\n\t * const img = model.change( writer => {\n\t * \treturn writer.createElement( 'img' );\n\t * } );\n\t * ```\n\t *\n\t * @see #enqueueChange\n\t * @typeParam TReturn The return type of the provided callback.\n\t * @param callback Callback function which may modify the model.\n\t */ change(callback) {\n        try {\n            if (this._pendingChanges.length === 0) {\n                // If this is the outermost block, create a new batch and start `_runPendingChanges` execution flow.\n                this._pendingChanges.push({\n                    batch: new Batch(),\n                    callback\n                });\n                return this._runPendingChanges()[0];\n            } else {\n                // If this is not the outermost block, just execute the callback.\n                return callback(this._currentWriter);\n            }\n        } catch (err) {\n            // @if CK_DEBUG // throw err;\n            /* istanbul ignore next -- @preserve */ CKEditorError.rethrowUnexpectedError(err, this);\n        }\n    }\n    enqueueChange(batchOrType, callback) {\n        try {\n            if (!batchOrType) {\n                batchOrType = new Batch();\n            } else if (typeof batchOrType === 'function') {\n                callback = batchOrType;\n                batchOrType = new Batch();\n            } else if (!(batchOrType instanceof Batch)) {\n                batchOrType = new Batch(batchOrType);\n            }\n            this._pendingChanges.push({\n                batch: batchOrType,\n                callback\n            });\n            if (this._pendingChanges.length == 1) {\n                this._runPendingChanges();\n            }\n        } catch (err) {\n            // @if CK_DEBUG // throw err;\n            /* istanbul ignore next -- @preserve */ CKEditorError.rethrowUnexpectedError(err, this);\n        }\n    }\n    /**\n\t * {@link module:utils/observablemixin~Observable#decorate Decorated} function for applying\n\t * {@link module:engine/model/operation/operation~Operation operations} to the model.\n\t *\n\t * This is a low-level way of changing the model. It is exposed for very specific use cases (like the undo feature).\n\t * Normally, to modify the model, you will want to use {@link module:engine/model/writer~Writer `Writer`}.\n\t * See also {@glink framework/architecture/editing-engine#changing-the-model Changing the model} section\n\t * of the {@glink framework/architecture/editing-engine Editing architecture} guide.\n\t *\n\t * @param operation The operation to apply.\n\t */ applyOperation(operation) {\n        // @if CK_DEBUG_ENGINE // console.log( 'Applying ' + operation );\n        // @if CK_DEBUG_ENGINE // this._operationLogs.push( JSON.stringify( operation ) );\n        // @if CK_DEBUG_ENGINE // this._appliedOperations.push( operation );\n        operation._execute();\n    }\n    // @if CK_DEBUG_ENGINE // public getAppliedOperation(): string {\n    // @if CK_DEBUG_ENGINE // \tif ( !this._appliedOperations ) {\n    // @if CK_DEBUG_ENGINE // \t\treturn '';\n    // @if CK_DEBUG_ENGINE // \t}\n    // @if CK_DEBUG_ENGINE // \treturn this._appliedOperations.map( operation => JSON.stringify( operation ) ).join( '-------' );\n    // @if CK_DEBUG_ENGINE // }\n    // @if CK_DEBUG_ENGINE // public createReplayer( stringifiedOperations: string ): typeof OperationReplayer {\n    // @if CK_DEBUG_ENGINE // \treturn new OperationReplayer( this, '-------', stringifiedOperations );\n    // @if CK_DEBUG_ENGINE // }\n    /**\n\t * Inserts content at the position in the editor specified by the selection, as one would expect the paste\n\t * functionality to work.\n\t *\n\t * **Note**: If you want to insert an {@glink framework/deep-dive/schema#object-elements object element}\n\t * (e.g. a {@link module:widget/utils~toWidget widget}), see {@link #insertObject} instead.\n\t *\n\t * This is a high-level method. It takes the {@link #schema schema} into consideration when inserting\n\t * the content, clears the given selection's content before inserting nodes and moves the selection\n\t * to its target position at the end of the process.\n\t * It can split elements, merge them, wrap bare text nodes with paragraphs, etc. &ndash; just like the\n\t * pasting feature should do.\n\t *\n\t * For lower-level methods see {@link module:engine/model/writer~Writer `Writer`}.\n\t *\n\t * This method, unlike {@link module:engine/model/writer~Writer `Writer`}'s methods, does not have to be used\n\t * inside a {@link #change `change()` block}.\n\t *\n\t * # Conversion and schema\n\t *\n\t * Inserting elements and text nodes into the model is not enough to make CKEditor 5 render that content\n\t * to the user. CKEditor 5 implements a model-view-controller architecture and what `model.insertContent()` does\n\t * is only adding nodes to the model. Additionally, you need to define\n\t * {@glink framework/architecture/editing-engine#conversion converters} between the model and view\n\t * and define those nodes in the {@glink framework/architecture/editing-engine#schema schema}.\n\t *\n\t * So, while this method may seem similar to CKEditor 4 `editor.insertHtml()` (in fact, both methods\n\t * are used for paste-like content insertion), the CKEditor 5 method cannot be use to insert arbitrary HTML\n\t * unless converters are defined for all elements and attributes in that HTML.\n\t *\n\t * # Examples\n\t *\n\t * Using `insertContent()` with a manually created model structure:\n\t *\n\t * ```ts\n\t * // Let's create a document fragment containing such content as:\n\t * //\n\t * // <paragraph>foo</paragraph>\n\t * // <blockQuote>\n\t * //    <paragraph>bar</paragraph>\n\t * // </blockQuote>\n\t * const docFrag = editor.model.change( writer => {\n\t * \tconst p1 = writer.createElement( 'paragraph' );\n\t * \tconst p2 = writer.createElement( 'paragraph' );\n\t * \tconst blockQuote = writer.createElement( 'blockQuote' );\n\t * \tconst docFrag = writer.createDocumentFragment();\n\t *\n\t * \twriter.append( p1, docFrag );\n\t * \twriter.append( blockQuote, docFrag );\n\t * \twriter.append( p2, blockQuote );\n\t * \twriter.insertText( 'foo', p1 );\n\t * \twriter.insertText( 'bar', p2 );\n\t *\n\t * \treturn docFrag;\n\t * } );\n\t *\n\t * // insertContent() does not have to be used in a change() block. It can, though,\n\t * // so this code could be moved to the callback defined above.\n\t * editor.model.insertContent( docFrag );\n\t * ```\n\t *\n\t * Using `insertContent()` with an HTML string converted to a model document fragment (similar to the pasting mechanism):\n\t *\n\t * ```ts\n\t * // You can create your own HtmlDataProcessor instance or use editor.data.processor\n\t * // if you have not overridden the default one (which is the HtmlDataProcessor instance).\n\t * const htmlDP = new HtmlDataProcessor( viewDocument );\n\t *\n\t * // Convert an HTML string to a view document fragment:\n\t * const viewFragment = htmlDP.toView( htmlString );\n\t *\n\t * // Convert the view document fragment to a model document fragment\n\t * // in the context of $root. This conversion takes the schema into\n\t * // account so if, for example, the view document fragment contained a bare text node,\n\t * // this text node cannot be a child of $root, so it will be automatically\n\t * // wrapped with a <paragraph>. You can define the context yourself (in the second parameter),\n\t * // and e.g. convert the content like it would happen in a <paragraph>.\n\t * // Note: The clipboard feature uses a custom context called $clipboardHolder\n\t * // which has a loosened schema.\n\t * const modelFragment = editor.data.toModel( viewFragment );\n\t *\n\t * editor.model.insertContent( modelFragment );\n\t * ```\n\t *\n\t * By default this method will use the document selection but it can also be used with a position, range or selection instance.\n\t *\n\t * ```ts\n\t * // Insert text at the current document selection position.\n\t * editor.model.change( writer => {\n\t * \teditor.model.insertContent( writer.createText( 'x' ) );\n\t * } );\n\t *\n\t * // Insert text at a given position - the document selection will not be modified.\n\t * editor.model.change( writer => {\n\t * \teditor.model.insertContent( writer.createText( 'x' ), doc.getRoot(), 2 );\n\t *\n\t * \t// Which is a shorthand for:\n\t * \teditor.model.insertContent( writer.createText( 'x' ), writer.createPositionAt( doc.getRoot(), 2 ) );\n\t * } );\n\t * ```\n\t *\n\t * If you want the document selection to be moved to the inserted content, use the\n\t * {@link module:engine/model/writer~Writer#setSelection `setSelection()`} method of the writer after inserting\n\t * the content:\n\t *\n\t * ```ts\n\t * editor.model.change( writer => {\n\t * \tconst paragraph = writer.createElement( 'paragraph' );\n\t *\n\t * \t// Insert an empty paragraph at the beginning of the root.\n\t * \teditor.model.insertContent( paragraph, writer.createPositionAt( editor.model.document.getRoot(), 0 ) );\n\t *\n\t * \t// Move the document selection to the inserted paragraph.\n\t * \twriter.setSelection( paragraph, 'in' );\n\t * } );\n\t * ```\n\t *\n\t * If an instance of the {@link module:engine/model/selection~Selection model selection} is passed as `selectable`,\n\t * the new content will be inserted at the passed selection (instead of document selection):\n\t *\n\t * ```ts\n\t * editor.model.change( writer => {\n\t * \t// Create a selection in a paragraph that will be used as a place of insertion.\n\t * \tconst selection = writer.createSelection( paragraph, 'in' );\n\t *\n\t * \t// Insert the new text at the created selection.\n\t * \teditor.model.insertContent( writer.createText( 'x' ), selection );\n\t *\n\t * \t// insertContent() modifies the passed selection instance so it can be used to set the document selection.\n\t * \t// Note: This is not necessary when you passed the document selection to insertContent().\n\t * \twriter.setSelection( selection );\n\t * } );\n\t * ```\n\t *\n\t * @fires insertContent\n\t * @param content The content to insert.\n\t * @param selectable The selection into which the content should be inserted.\n\t * If not provided the current model document selection will be used.\n\t * @param placeOrOffset To be used when a model item was passed as `selectable`.\n\t * This param defines a position in relation to that item.\n\t * at the insertion position.\n\t */ insertContent(content, selectable, placeOrOffset, ...rest) {\n        const selection = normalizeSelectable(selectable, placeOrOffset);\n        // Passing all call arguments so it acts like decorated method.\n        return this.fire('insertContent', [\n            content,\n            selection,\n            placeOrOffset,\n            ...rest\n        ]);\n    }\n    /**\n\t * Inserts an {@glink framework/deep-dive/schema#object-elements object element} at a specific position in the editor content.\n\t *\n\t * This is a high-level API:\n\t * * It takes the {@link #schema schema} into consideration,\n\t * * It clears the content of passed `selectable` before inserting,\n\t * * It can move the selection at the end of the process,\n\t * * It will copy the selected block's attributes to preserve them upon insertion,\n\t * * It can split elements or wrap inline objects with paragraphs if they are not allowed in target position,\n\t * * etc.\n\t *\n\t * # Notes\n\t *\n\t * * If you want to insert a non-object content, see {@link #insertContent} instead.\n\t * * For lower-level API, see {@link module:engine/model/writer~Writer `Writer`}.\n\t * * Unlike {@link module:engine/model/writer~Writer `Writer`}, this method does not have to be used inside\n\t * a {@link #change `change()` block}.\n\t * * Inserting object into the model is not enough to make CKEditor 5 render that content to the user.\n\t * CKEditor 5 implements a model-view-controller architecture and what `model.insertObject()` does\n\t * is only adding nodes to the model. Additionally, you need to define\n\t * {@glink framework/architecture/editing-engine#conversion converters} between the model and view\n\t * and define those nodes in the {@glink framework/architecture/editing-engine#schema schema}.\n\t *\n\t * # Examples\n\t *\n\t * Use the following code to insert an object at the current selection and keep the selection on the inserted element:\n\t *\n\t * ```ts\n\t * const rawHtmlEmbedElement = writer.createElement( 'rawHtml' );\n\t *\n\t * model.insertObject( rawHtmlEmbedElement, null, null, {\n\t * \tsetSelection: 'on'\n\t * } );\n\t * ```\n\t *\n\t * Use the following code to insert an object at the current selection and nudge the selection after the inserted object:\n\t *\n\t * ```ts\n\t * const pageBreakElement = writer.createElement( 'pageBreak' );\n \t *\n\t * model.insertObject( pageBreakElement, null, null, {\n\t * \tsetSelection: 'after'\n\t * } );\n\t * ```\n\t *\n\t * Use the following code to insert an object at the current selection and avoid splitting the content (non-destructive insertion):\n\t *\n\t * ```ts\n\t * const tableElement = writer.createElement( 'table' );\n \t *\n\t * model.insertObject( tableElement, null, null, {\n\t * \tfindOptimalPosition: 'auto'\n\t * } );\n\t * ```\n\t *\n\t * Use the following code to insert an object at the specific range (also: replace the content of the range):\n\t *\n\t * ```ts\n\t * const tableElement = writer.createElement( 'table' );\n\t * const range = model.createRangeOn( model.document.getRoot().getChild( 1 ) );\n \t *\n\t * model.insertObject( tableElement, range );\n\t * ```\n\t *\n\t * @param element An object to be inserted into the model document.\n\t * @param selectable A selectable where the content should be inserted. If not specified, the current\n\t * {@link module:engine/model/document~Document#selection document selection} will be used instead.\n\t * @param placeOrOffset Specifies the exact place or offset for the insertion to take place, relative to `selectable`.\n\t * @param options Additional options.\n\t * @param options.findOptimalPosition An option that, when set, adjusts the insertion position (relative to\n\t * `selectable` and `placeOrOffset`) so that the content of `selectable` is not split upon insertion (a.k.a. non-destructive insertion).\n\t * * When `'auto'`, the algorithm will decide whether to insert the object before or after `selectable` to avoid content splitting.\n\t * * When `'before'`, the closest position before `selectable` will be used that will not result in content splitting.\n\t * * When `'after'`, the closest position after `selectable` will be used that will not result in content splitting.\n\t *\n\t * Note that this option only works for block objects. Inline objects are inserted into text and do not split blocks.\n\t * @param options.setSelection An option that, when set, moves the\n\t * {@link module:engine/model/document~Document#selection document selection} after inserting the object.\n\t * * When `'on'`, the document selection will be set on the inserted object.\n\t * * When `'after'`, the document selection will move to the closest text node after the inserted object. If there is no\n\t * such text node, a paragraph will be created and the document selection will be moved inside it.\n\t * at the insertion position.\n\t */ insertObject(element, selectable, placeOrOffset, options, ...rest) {\n        const selection = normalizeSelectable(selectable, placeOrOffset);\n        // Note that options are fired as 2 arguments for backward compatibility with the decorated method.\n        // Passing all call arguments so it acts like decorated method.\n        return this.fire('insertObject', [\n            element,\n            selection,\n            options,\n            options,\n            ...rest\n        ]);\n    }\n    /**\n\t * Deletes content of the selection and merge siblings. The resulting selection is always collapsed.\n\t *\n\t * **Note:** For the sake of predictability, the resulting selection should always be collapsed.\n\t * In cases where a feature wants to modify deleting behavior so selection isn't collapsed\n\t * (e.g. a table feature may want to keep row selection after pressing <kbd>Backspace</kbd>),\n\t * then that behavior should be implemented in the view's listener. At the same time, the table feature\n\t * will need to modify this method's behavior too, e.g. to \"delete contents and then collapse\n\t * the selection inside the last selected cell\" or \"delete the row and collapse selection somewhere near\".\n\t * That needs to be done in order to ensure that other features which use `deleteContent()` will work well with tables.\n\t *\n\t * @fires deleteContent\n\t * @param selection Selection of which the content should be deleted.\n\t * @param options.leaveUnmerged Whether to merge elements after removing the content of the selection.\n\t *\n\t * For example `<heading1>x[x</heading1><paragraph>y]y</paragraph>` will become:\n\t *\n\t * * `<heading1>x^y</heading1>` with the option disabled (`leaveUnmerged == false`)\n\t * * `<heading1>x^</heading1><paragraph>y</paragraph>` with enabled (`leaveUnmerged == true`).\n\t *\n\t * Note: {@link module:engine/model/schema~Schema#isObject object} and {@link module:engine/model/schema~Schema#isLimit limit}\n\t * elements will not be merged.\n\t *\n\t * @param options.doNotResetEntireContent Whether to skip replacing the entire content with a\n\t * paragraph when the entire content was selected.\n\t *\n\t * For example `<heading1>[x</heading1><paragraph>y]</paragraph>` will become:\n\t *\n\t * * `<paragraph>^</paragraph>` with the option disabled (`doNotResetEntireContent == false`)\n\t * * `<heading1>^</heading1>` with enabled (`doNotResetEntireContent == true`)\n\t *\n\t * @param options.doNotAutoparagraph Whether to create a paragraph if after content deletion selection is moved\n\t * to a place where text cannot be inserted.\n\t *\n\t * For example `<paragraph>x</paragraph>[<imageBlock src=\"foo.jpg\"></imageBlock>]` will become:\n\t *\n\t * * `<paragraph>x</paragraph><paragraph>[]</paragraph>` with the option disabled (`doNotAutoparagraph == false`)\n\t * * `<paragraph>x[]</paragraph>` with the option enabled (`doNotAutoparagraph == true`).\n\t *\n\t * **Note:** if there is no valid position for the selection, the paragraph will always be created:\n\t *\n\t * `[<imageBlock src=\"foo.jpg\"></imageBlock>]` -> `<paragraph>[]</paragraph>`.\n\t *\n\t * @param options.direction The direction in which the content is being consumed.\n\t * Deleting backward corresponds to using the <kbd>Backspace</kbd> key, while deleting content forward corresponds to\n\t * the <kbd>Shift</kbd>+<kbd>Backspace</kbd> keystroke.\n\t */ deleteContent(selection, options) {\n        deleteContent(this, selection, options);\n    }\n    /**\n\t * Modifies the selection. Currently, the supported modifications are:\n\t *\n\t * * Extending. The selection focus is moved in the specified `options.direction` with a step specified in `options.unit`.\n\t * Possible values for `unit` are:\n\t *  * `'character'` (default) - moves selection by one user-perceived character. In most cases this means moving by one\n\t *  character in `String` sense. However, unicode also defines \"combing marks\". These are special symbols, that combines\n\t *  with a symbol before it (\"base character\") to create one user-perceived character. For example, `q̣̇` is a normal\n\t *  letter `q` with two \"combining marks\": upper dot (`Ux0307`) and lower dot (`Ux0323`). For most actions, i.e. extending\n\t *  selection by one position, it is correct to include both \"base character\" and all of it's \"combining marks\". That is\n\t *  why `'character'` value is most natural and common method of modifying selection.\n\t *  * `'codePoint'` - moves selection by one unicode code point. In contrary to, `'character'` unit, this will insert\n\t *  selection between \"base character\" and \"combining mark\", because \"combining marks\" have their own unicode code points.\n\t *  However, for technical reasons, unicode code points with values above `UxFFFF` are represented in native `String` by\n\t *  two characters, called \"surrogate pairs\". Halves of \"surrogate pairs\" have a meaning only when placed next to each other.\n\t *  For example `𨭎` is represented in `String` by `\\uD862\\uDF4E`. Both `\\uD862` and `\\uDF4E` do not have any meaning\n\t *  outside the pair (are rendered as ? when alone). Position between them would be incorrect. In this case, selection\n\t *  extension will include whole \"surrogate pair\".\n\t *  * `'word'` - moves selection by a whole word.\n\t *\n\t * **Note:** if you extend a forward selection in a backward direction you will in fact shrink it.\n\t *\n\t * @fires modifySelection\n\t * @param selection The selection to modify.\n\t * @param options.direction The direction in which the selection should be modified.\n\t * @param options.unit The unit by which selection should be modified.\n\t * @param options.treatEmojiAsSingleUnit Whether multi-characer emoji sequences should be handled as single unit.\n\t */ modifySelection(selection, options) {\n        modifySelection(this, selection, options);\n    }\n    /**\n\t * Gets a clone of the selected content.\n\t *\n\t * For example, for the following selection:\n\t *\n\t * ```html\n\t * <paragraph>x</paragraph>\n\t * <blockQuote>\n\t * \t<paragraph>y</paragraph>\n\t * \t<heading1>fir[st</heading1>\n\t * </blockQuote>\n\t * <paragraph>se]cond</paragraph>\n\t * <paragraph>z</paragraph>\n\t * ```\n\t *\n\t * It will return a document fragment with such a content:\n\t *\n\t * ```html\n\t * <blockQuote>\n\t * \t<heading1>st</heading1>\n\t * </blockQuote>\n\t * <paragraph>se</paragraph>\n\t * ```\n\t *\n\t * @fires getSelectedContent\n\t * @param selection The selection of which content will be returned.\n\t */ getSelectedContent(selection) {\n        return getSelectedContent(this, selection);\n    }\n    /**\n\t * Checks whether the given {@link module:engine/model/range~Range range} or\n\t * {@link module:engine/model/element~Element element} has any meaningful content.\n\t *\n\t * Meaningful content is:\n\t *\n\t * * any text node (`options.ignoreWhitespaces` allows controlling whether this text node must also contain\n\t * any non-whitespace characters),\n\t * * or any {@link module:engine/model/schema~Schema#isContent content element},\n\t * * or any {@link module:engine/model/markercollection~Marker marker} which\n\t * {@link module:engine/model/markercollection~Marker#_affectsData affects data}.\n\t *\n\t * This means that a range containing an empty `<paragraph></paragraph>` is not considered to have a meaningful content.\n\t * However, a range containing an `<imageBlock></imageBlock>` (which would normally be marked in the schema as an object element)\n\t * is considered non-empty.\n\t *\n\t * @param rangeOrElement Range or element to check.\n\t * @param options.ignoreWhitespaces Whether text node with whitespaces only should be considered empty.\n\t * @param options.ignoreMarkers Whether markers should be ignored.\n\t */ hasContent(rangeOrElement, options = {}) {\n        const range = rangeOrElement instanceof Range ? rangeOrElement : Range._createIn(rangeOrElement);\n        if (range.isCollapsed) {\n            return false;\n        }\n        const { ignoreWhitespaces = false, ignoreMarkers = false } = options;\n        // Check if there are any markers which affects data in this given range.\n        if (!ignoreMarkers) {\n            for (const intersectingMarker of this.markers.getMarkersIntersectingRange(range)){\n                if (intersectingMarker.affectsData) {\n                    return true;\n                }\n            }\n        }\n        for (const item of range.getItems()){\n            if (this.schema.isContent(item)) {\n                if (item.is('$textProxy')) {\n                    if (!ignoreWhitespaces) {\n                        return true;\n                    } else if (item.data.search(/\\S/) !== -1) {\n                        return true;\n                    }\n                } else {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n    /**\n\t * Check whether given selectable is at a place in the model where it can be edited (returns `true`) or not (returns `false`).\n\t *\n\t * Should be used instead of {@link module:core/editor/editor~Editor#isReadOnly} to check whether a user action can happen at\n\t * given selectable. It may be decorated and used differently in different environment (e.g. multi-root editor can disable\n\t * a particular root).\n\t *\n\t * This method is decorated. Although this method accepts any parameter of `Selectable` type, the\n\t * {@link ~Model#event:canEditAt `canEditAt` event} is fired with `selectable` normalized to an instance of\n\t * {@link module:engine/model/selection~Selection} or {@link module:engine/model/documentselection~DocumentSelection}\n\t *\n\t * @fires canEditAt\n\t */ canEditAt(selectable) {\n        const selection = normalizeSelectable(selectable);\n        return this.fire('canEditAt', [\n            selection\n        ]);\n    }\n    /**\n\t * Creates a position from the given root and path in that root.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~Writer#createPositionFromPath `Writer#createPositionFromPath()`}.\n\t *\n\t * @param root Root of the position.\n\t * @param path Position path. See {@link module:engine/model/position~Position#path}.\n\t * @param stickiness Position stickiness. See {@link module:engine/model/position~PositionStickiness}.\n\t */ createPositionFromPath(root, path, stickiness) {\n        return new Position(root, path, stickiness);\n    }\n    /**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/model/position~Position position},\n\t * * a parent element and offset in that element,\n\t * * a parent element and `'end'` (the position will be set at the end of that element),\n\t * * a {@link module:engine/model/item~Item model item} and `'before'` or `'after'`\n\t * (the position will be set before or after the given model item).\n\t *\n\t * This method is a shortcut to other factory methods such as:\n\t *\n\t * * {@link module:engine/model/model~Model#createPositionBefore `createPositionBefore()`},\n\t * * {@link module:engine/model/model~Model#createPositionAfter `createPositionAfter()`}.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~Writer#createPositionAt `Writer#createPositionAt()`},\n\t *\n\t * @param itemOrPosition\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/model/item~Item model item}.\n\t */ createPositionAt(itemOrPosition, offset) {\n        return Position._createAt(itemOrPosition, offset);\n    }\n    /**\n\t * Creates a new position after the given {@link module:engine/model/item~Item model item}.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~Writer#createPositionAfter `Writer#createPositionAfter()`}.\n\t *\n\t * @param item Item after which the position should be placed.\n\t */ createPositionAfter(item) {\n        return Position._createAfter(item);\n    }\n    /**\n\t * Creates a new position before the given {@link module:engine/model/item~Item model item}.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~Writer#createPositionBefore `Writer#createPositionBefore()`}.\n\t *\n\t * @param item Item before which the position should be placed.\n\t */ createPositionBefore(item) {\n        return Position._createBefore(item);\n    }\n    /**\n\t * Creates a range spanning from the `start` position to the `end` position.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~Writer#createRange `Writer#createRange()`}:\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \tconst range = writer.createRange( start, end );\n\t * } );\n\t * ```\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, the range will be collapsed to the `start` position.\n\t */ createRange(start, end) {\n        return new Range(start, end);\n    }\n    /**\n\t * Creates a range inside the given element which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * Note: This method is also available as\n\t * {@link module:engine/model/writer~Writer#createRangeIn `Writer#createRangeIn()`}:\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \tconst range = writer.createRangeIn( paragraph );\n\t * } );\n\t * ```\n\t *\n\t * @param element Element which is a parent for the range.\n\t */ createRangeIn(element) {\n        return Range._createIn(element);\n    }\n    /**\n\t * Creates a range that starts before the given {@link module:engine/model/item~Item model item} and ends after it.\n\t *\n\t * Note: This method is also available on `writer` instance as\n\t * {@link module:engine/model/writer~Writer#createRangeOn `Writer.createRangeOn()`}:\n\t *\n\t * ```ts\n\t * model.change( writer => {\n\t * \tconst range = writer.createRangeOn( paragraph );\n\t * } );\n\t * ```\n\t *\n\t * @param item\n\t */ createRangeOn(item) {\n        return Range._createOn(item);\n    }\n    createSelection(...args) {\n        return new Selection(...args);\n    }\n    /**\n\t * Creates a {@link module:engine/model/batch~Batch} instance.\n\t *\n\t * **Note:** In most cases creating a batch instance is not necessary as they are created when using:\n\t *\n\t * * {@link #change `change()`},\n\t * * {@link #enqueueChange `enqueueChange()`}.\n\t *\n\t * @param type {@link module:engine/model/batch~Batch#constructor The type} of the batch.\n\t */ createBatch(type) {\n        return new Batch(type);\n    }\n    /**\n\t * Creates an operation instance from a JSON object (parsed JSON string).\n\t *\n\t * This is an alias for {@link module:engine/model/operation/operationfactory~OperationFactory.fromJSON `OperationFactory.fromJSON()`}.\n\t *\n\t * @param json Deserialized JSON object.\n\t */ createOperationFromJSON(json) {\n        return OperationFactory.fromJSON(json, this.document);\n    }\n    /**\n\t * Removes all events listeners set by model instance and destroys {@link module:engine/model/document~Document}.\n\t */ destroy() {\n        this.document.destroy();\n        this.stopListening();\n    }\n    /**\n\t * Common part of {@link module:engine/model/model~Model#change} and {@link module:engine/model/model~Model#enqueueChange}\n\t * which calls callbacks and returns array of values returned by these callbacks.\n\t */ _runPendingChanges() {\n        const ret = [];\n        this.fire('_beforeChanges');\n        try {\n            while(this._pendingChanges.length){\n                // Create a new writer using batch instance created for this chain of changes.\n                const currentBatch = this._pendingChanges[0].batch;\n                this._currentWriter = new Writer(this, currentBatch);\n                // Execute changes callback and gather the returned value.\n                const callbackReturnValue = this._pendingChanges[0].callback(this._currentWriter);\n                ret.push(callbackReturnValue);\n                this.document._handleChangeBlock(this._currentWriter);\n                this._pendingChanges.shift();\n                this._currentWriter = null;\n            }\n        } finally{\n            this._pendingChanges.length = 0;\n            this._currentWriter = null;\n            this.fire('_afterChanges');\n        }\n        return ret;\n    }\n}\n/**\n * Normalizes a selectable to a Selection or DocumentSelection.\n */ function normalizeSelectable(selectable, placeOrOffset) {\n    if (!selectable) {\n        return;\n    }\n    if (selectable instanceof Selection || selectable instanceof DocumentSelection) {\n        return selectable;\n    }\n    if (selectable instanceof Node$1) {\n        if (placeOrOffset || placeOrOffset === 0) {\n            return new Selection(selectable, placeOrOffset);\n        } else if (selectable.is('rootElement')) {\n            return new Selection(selectable, 'in');\n        } else {\n            return new Selection(selectable, 'on');\n        }\n    }\n    return new Selection(selectable);\n}\n\n/**\n * {@link module:engine/view/document~Document#event:click Click} event observer.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~View view controller} by a {@link module:engine/view/view~View#addObserver} method.\n */ class ClickObserver extends DomEventObserver {\n    /**\n\t * @inheritDoc\n\t */ domEventType = 'click';\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvent) {\n        this.fire(domEvent.type, domEvent);\n    }\n}\n\n/**\n * Mouse events observer.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~View} by {@link module:engine/view/view~View#addObserver} method.\n */ class MouseObserver extends DomEventObserver {\n    /**\n\t * @inheritDoc\n\t */ domEventType = [\n        'mousedown',\n        'mouseup',\n        'mouseover',\n        'mouseout'\n    ];\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvent) {\n        this.fire(domEvent.type, domEvent);\n    }\n}\n\n/**\n * View upcast writer. It provides a set of methods used to manipulate non-semantic view trees.\n *\n * It should be used only while working on a non-semantic view\n * (e.g. a view created from HTML string on paste).\n * To manipulate a view which was or is being downcasted from the the model use the\n * {@link module:engine/view/downcastwriter~DowncastWriter downcast writer}.\n *\n * Read more about changing the view in the {@glink framework/architecture/editing-engine#changing-the-view Changing the view}\n * section of the {@glink framework/architecture/editing-engine Editing engine architecture} guide.\n *\n * Unlike `DowncastWriter`, which is available in the {@link module:engine/view/view~View#change `View#change()`} block,\n * `UpcastWriter` can be created wherever you need it:\n *\n * ```ts\n * const writer = new UpcastWriter( viewDocument );\n * const text = writer.createText( 'foo!' );\n *\n * writer.appendChild( text, someViewElement );\n * ```\n */ class UpcastWriter {\n    /**\n\t * The view document instance in which this upcast writer operates.\n\t */ document;\n    /**\n\t * @param document The view document instance in which this upcast writer operates.\n\t */ constructor(document){\n        this.document = document;\n    }\n    /**\n\t * Creates a new {@link module:engine/view/documentfragment~DocumentFragment} instance.\n\t *\n\t * @param children A list of nodes to be inserted into the created document fragment.\n\t * @returns The created document fragment.\n\t */ createDocumentFragment(children) {\n        return new DocumentFragment$1(this.document, children);\n    }\n    /**\n\t * Creates a new {@link module:engine/view/element~Element} instance.\n\t *\n\t * Attributes can be passed in various formats:\n\t *\n\t * ```ts\n\t * upcastWriter.createElement( 'div', { class: 'editor', contentEditable: 'true' } ); // object\n\t * upcastWriter.createElement( 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t * upcastWriter.createElement( 'div', mapOfAttributes ); // map\n\t * ```\n\t *\n\t * @param name Node name.\n\t * @param attrs Collection of attributes.\n\t * @param children A list of nodes to be inserted into created element.\n\t * @returns Created element.\n\t */ createElement(name, attrs, children) {\n        return new Element$1(this.document, name, attrs, children);\n    }\n    /**\n\t * Creates a new {@link module:engine/view/text~Text} instance.\n\t *\n\t * @param data The text's data.\n\t * @returns The created text node.\n\t */ createText(data) {\n        return new Text$1(this.document, data);\n    }\n    /**\n\t * Clones the provided element.\n\t *\n\t * @see module:engine/view/element~Element#_clone\n\t * @param element Element to be cloned.\n\t * @param deep If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns Clone of this element.\n\t */ clone(element, deep = false) {\n        return element._clone(deep);\n    }\n    /**\n\t * Appends a child node or a list of child nodes at the end of this node\n\t * and sets the parent of these nodes to this element.\n\t *\n\t * @see module:engine/view/element~Element#_appendChild\n\t * @param items Items to be inserted.\n\t * @param element Element to which items will be appended.\n\t * @returns Number of appended nodes.\n\t */ appendChild(items, element) {\n        return element._appendChild(items);\n    }\n    /**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this element.\n\t *\n\t * @see module:engine/view/element~Element#_insertChild\n\t * @param index Offset at which nodes should be inserted.\n\t * @param items Items to be inserted.\n\t * @param element Element to which items will be inserted.\n\t * @returns Number of inserted nodes.\n\t */ insertChild(index, items, element) {\n        return element._insertChild(index, items);\n    }\n    /**\n\t * Removes the given number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @see module:engine/view/element~Element#_removeChildren\n\t * @param index Offset from which nodes will be removed.\n\t * @param howMany Number of nodes to remove.\n\t * @param element Element which children will be removed.\n\t * @returns The array containing removed nodes.\n\t */ removeChildren(index, howMany, element) {\n        return element._removeChildren(index, howMany);\n    }\n    /**\n\t * Removes given element from the view structure. Will not have effect on detached elements.\n\t *\n\t * @param element Element which will be removed.\n\t * @returns The array containing removed nodes.\n\t */ remove(element) {\n        const parent = element.parent;\n        if (parent) {\n            return this.removeChildren(parent.getChildIndex(element), 1, parent);\n        }\n        return [];\n    }\n    /**\n\t * Replaces given element with the new one in the view structure. Will not have effect on detached elements.\n\t *\n\t * @param oldElement Element which will be replaced.\n\t * @param newElement Element which will be inserted in the place of the old element.\n\t * @returns Whether old element was successfully replaced.\n\t */ replace(oldElement, newElement) {\n        const parent = oldElement.parent;\n        if (parent) {\n            const index = parent.getChildIndex(oldElement);\n            this.removeChildren(index, 1, parent);\n            this.insertChild(index, newElement, parent);\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Removes given element from view structure and places its children in its position.\n\t * It does nothing if element has no parent.\n\t *\n\t * @param element Element to unwrap.\n\t */ unwrapElement(element) {\n        const parent = element.parent;\n        if (parent) {\n            const index = parent.getChildIndex(element);\n            this.remove(element);\n            this.insertChild(index, element.getChildren(), parent);\n        }\n    }\n    /**\n\t * Renames element by creating a copy of a given element but with its name changed and then moving contents of the\n\t * old element to the new one.\n\t *\n\t * Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n\t *\n\t * @param newName New element name.\n\t * @param  element Element to be renamed.\n\t * @returns New element or null if the old element was not replaced (happens for detached elements).\n\t */ rename(newName, element) {\n        const newElement = new Element$1(this.document, newName, element.getAttributes(), element.getChildren());\n        return this.replace(element, newElement) ? newElement : null;\n    }\n    /**\n\t * Adds or overwrites element's attribute with a specified key and value.\n\t *\n\t * ```ts\n\t * writer.setAttribute( 'href', 'http://ckeditor.com', linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~Element#_setAttribute\n\t * @param key Attribute key.\n\t * @param value Attribute value.\n\t * @param element Element for which attribute will be set.\n\t */ setAttribute(key, value, element) {\n        element._setAttribute(key, value);\n    }\n    /**\n\t * Removes attribute from the element.\n\t *\n\t * ```ts\n\t * writer.removeAttribute( 'href', linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~Element#_removeAttribute\n\t * @param key Attribute key.\n\t * @param element Element from which attribute will be removed.\n\t */ removeAttribute(key, element) {\n        element._removeAttribute(key);\n    }\n    /**\n\t * Adds specified class to the element.\n\t *\n\t * ```ts\n\t * writer.addClass( 'foo', linkElement );\n\t * writer.addClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~Element#_addClass\n\t * @param className Single class name or array of class names which will be added.\n\t * @param element Element for which class will be added.\n\t */ addClass(className, element) {\n        element._addClass(className);\n    }\n    /**\n\t * Removes specified class from the element.\n\t *\n\t * ```ts\n\t * writer.removeClass( 'foo', linkElement );\n\t * writer.removeClass( [ 'foo', 'bar' ], linkElement );\n\t * ```\n\t *\n\t * @see module:engine/view/element~Element#_removeClass\n\t * @param className Single class name or array of class names which will be removed.\n\t * @param element Element from which class will be removed.\n\t */ removeClass(className, element) {\n        element._removeClass(className);\n    }\n    setStyle(property, valueOrElement, element) {\n        if (isPlainObject(property) && element === undefined) {\n            valueOrElement._setStyle(property);\n        } else {\n            element._setStyle(property, valueOrElement);\n        }\n    }\n    /**\n\t * Removes specified style from the element.\n\t *\n\t * ```ts\n\t * writer.removeStyle( 'color', element );  // Removes 'color' style.\n\t * writer.removeStyle( [ 'color', 'border-top' ], element ); // Removes both 'color' and 'border-top' styles.\n\t * ```\n\t *\n\t * **Note**: This method can work with normalized style names if\n\t * {@link module:engine/controller/datacontroller~DataController#addStyleProcessorRules a particular style processor rule is enabled}.\n\t * See {@link module:engine/view/stylesmap~StylesMap#remove `StylesMap#remove()`} for details.\n\t *\n\t * @see module:engine/view/element~Element#_removeStyle\n\t * @param property Style property name or names to be removed.\n\t * @param element Element from which style will be removed.\n\t */ removeStyle(property, element) {\n        element._removeStyle(property);\n    }\n    /**\n\t * Sets a custom property on element. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t *\n\t * @see module:engine/view/element~Element#_setCustomProperty\n\t * @param key Custom property name/key.\n\t * @param value Custom property value to be stored.\n\t * @param element Element for which custom property will be set.\n\t */ setCustomProperty(key, value, element) {\n        element._setCustomProperty(key, value);\n    }\n    /**\n\t * Removes a custom property stored under the given key.\n\t *\n\t * @see module:engine/view/element~Element#_removeCustomProperty\n\t * @param key Name/key of the custom property to be removed.\n\t * @param element Element from which the custom property will be removed.\n\t * @returns Returns true if property was removed.\n\t */ removeCustomProperty(key, element) {\n        return element._removeCustomProperty(key);\n    }\n    /**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link #createPositionBefore},\n\t * * {@link #createPositionAfter},\n\t *\n\t * @param offset Offset or one of the flags. Used only when first parameter is a {@link module:engine/view/item~Item view item}.\n\t */ createPositionAt(itemOrPosition, offset) {\n        return Position$1._createAt(itemOrPosition, offset);\n    }\n    /**\n\t * Creates a new position after given view item.\n\t *\n\t * @param item View item after which the position should be located.\n\t */ createPositionAfter(item) {\n        return Position$1._createAfter(item);\n    }\n    /**\n\t * Creates a new position before given view item.\n\t *\n\t * @param item View item before which the position should be located.\n\t */ createPositionBefore(item) {\n        return Position$1._createBefore(item);\n    }\n    /**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** This factory method creates it's own {@link module:engine/view/position~Position} instances basing on passed values.\n\t *\n\t * @param start Start position.\n\t * @param end End position. If not set, range will be collapsed at `start` position.\n\t */ createRange(start, end) {\n        return new Range$1(start, end);\n    }\n    /**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t */ createRangeOn(item) {\n        return Range$1._createOn(item);\n    }\n    /**\n\t * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param element Element which is a parent for the range.\n\t */ createRangeIn(element) {\n        return Range$1._createIn(element);\n    }\n    createSelection(...args) {\n        return new Selection$1(...args);\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module engine/view/styles/utils\n */ const HEX_COLOR_REGEXP = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;\nconst RGB_COLOR_REGEXP = /^rgb\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\\)$/i;\nconst RGBA_COLOR_REGEXP = /^rgba\\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;\nconst HSL_COLOR_REGEXP = /^hsl\\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\\.?[0-9]+)?\\)$/i;\nconst HSLA_COLOR_REGEXP = /^hsla\\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\\.?[0-9]+)\\)$/i;\n// Note: This regexp hardcodes a single level of nested () for values such as `calc( var( ...) + ...)`.\n// If this gets more complex, a proper parser should be used instead.\nconst CSS_SHORTHAND_VALUE_REGEXP = /\\w+\\((?:[^()]|\\([^()]*\\))*\\)|\\S+/gi;\nconst COLOR_NAMES = new Set([\n    // CSS Level 1\n    'black',\n    'silver',\n    'gray',\n    'white',\n    'maroon',\n    'red',\n    'purple',\n    'fuchsia',\n    'green',\n    'lime',\n    'olive',\n    'yellow',\n    'navy',\n    'blue',\n    'teal',\n    'aqua',\n    // CSS Level 2 (Revision 1)\n    'orange',\n    // CSS Color Module Level 3\n    'aliceblue',\n    'antiquewhite',\n    'aquamarine',\n    'azure',\n    'beige',\n    'bisque',\n    'blanchedalmond',\n    'blueviolet',\n    'brown',\n    'burlywood',\n    'cadetblue',\n    'chartreuse',\n    'chocolate',\n    'coral',\n    'cornflowerblue',\n    'cornsilk',\n    'crimson',\n    'cyan',\n    'darkblue',\n    'darkcyan',\n    'darkgoldenrod',\n    'darkgray',\n    'darkgreen',\n    'darkgrey',\n    'darkkhaki',\n    'darkmagenta',\n    'darkolivegreen',\n    'darkorange',\n    'darkorchid',\n    'darkred',\n    'darksalmon',\n    'darkseagreen',\n    'darkslateblue',\n    'darkslategray',\n    'darkslategrey',\n    'darkturquoise',\n    'darkviolet',\n    'deeppink',\n    'deepskyblue',\n    'dimgray',\n    'dimgrey',\n    'dodgerblue',\n    'firebrick',\n    'floralwhite',\n    'forestgreen',\n    'gainsboro',\n    'ghostwhite',\n    'gold',\n    'goldenrod',\n    'greenyellow',\n    'grey',\n    'honeydew',\n    'hotpink',\n    'indianred',\n    'indigo',\n    'ivory',\n    'khaki',\n    'lavender',\n    'lavenderblush',\n    'lawngreen',\n    'lemonchiffon',\n    'lightblue',\n    'lightcoral',\n    'lightcyan',\n    'lightgoldenrodyellow',\n    'lightgray',\n    'lightgreen',\n    'lightgrey',\n    'lightpink',\n    'lightsalmon',\n    'lightseagreen',\n    'lightskyblue',\n    'lightslategray',\n    'lightslategrey',\n    'lightsteelblue',\n    'lightyellow',\n    'limegreen',\n    'linen',\n    'magenta',\n    'mediumaquamarine',\n    'mediumblue',\n    'mediumorchid',\n    'mediumpurple',\n    'mediumseagreen',\n    'mediumslateblue',\n    'mediumspringgreen',\n    'mediumturquoise',\n    'mediumvioletred',\n    'midnightblue',\n    'mintcream',\n    'mistyrose',\n    'moccasin',\n    'navajowhite',\n    'oldlace',\n    'olivedrab',\n    'orangered',\n    'orchid',\n    'palegoldenrod',\n    'palegreen',\n    'paleturquoise',\n    'palevioletred',\n    'papayawhip',\n    'peachpuff',\n    'peru',\n    'pink',\n    'plum',\n    'powderblue',\n    'rosybrown',\n    'royalblue',\n    'saddlebrown',\n    'salmon',\n    'sandybrown',\n    'seagreen',\n    'seashell',\n    'sienna',\n    'skyblue',\n    'slateblue',\n    'slategray',\n    'slategrey',\n    'snow',\n    'springgreen',\n    'steelblue',\n    'tan',\n    'thistle',\n    'tomato',\n    'turquoise',\n    'violet',\n    'wheat',\n    'whitesmoke',\n    'yellowgreen',\n    // CSS Color Module Level 3 (System Colors)\n    'activeborder',\n    'activecaption',\n    'appworkspace',\n    'background',\n    'buttonface',\n    'buttonhighlight',\n    'buttonshadow',\n    'buttontext',\n    'captiontext',\n    'graytext',\n    'highlight',\n    'highlighttext',\n    'inactiveborder',\n    'inactivecaption',\n    'inactivecaptiontext',\n    'infobackground',\n    'infotext',\n    'menu',\n    'menutext',\n    'scrollbar',\n    'threeddarkshadow',\n    'threedface',\n    'threedhighlight',\n    'threedlightshadow',\n    'threedshadow',\n    'window',\n    'windowframe',\n    'windowtext',\n    // CSS Color Module Level 4\n    'rebeccapurple',\n    // Keywords\n    'currentcolor',\n    'transparent'\n]);\n/**\n * Checks if string contains [color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) CSS value.\n *\n * ```ts\n * isColor( '#f00' );\t\t\t\t\t\t// true\n * isColor( '#AA00BB33' );\t\t\t\t\t// true\n * isColor( 'rgb(0, 0, 250)' );\t\t\t\t// true\n * isColor( 'hsla(240, 100%, 50%, .7)' );\t// true\n * isColor( 'deepskyblue' );\t\t\t\t// true\n * ```\n *\n * **Note**: It does not support CSS Level 4 whitespace syntax, system colors and radius values for HSL colors.\n */ function isColor(string) {\n    // As far as I was able to test checking some pre-conditions is faster than joining each test with ||.\n    if (string.startsWith('#')) {\n        return HEX_COLOR_REGEXP.test(string);\n    }\n    if (string.startsWith('rgb')) {\n        return RGB_COLOR_REGEXP.test(string) || RGBA_COLOR_REGEXP.test(string);\n    }\n    if (string.startsWith('hsl')) {\n        return HSL_COLOR_REGEXP.test(string) || HSLA_COLOR_REGEXP.test(string);\n    }\n    // Array check > RegExp test.\n    return COLOR_NAMES.has(string.toLowerCase());\n}\nconst lineStyleValues = [\n    'none',\n    'hidden',\n    'dotted',\n    'dashed',\n    'solid',\n    'double',\n    'groove',\n    'ridge',\n    'inset',\n    'outset'\n];\n/**\n * Checks if string contains [line style](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style) CSS value.\n */ function isLineStyle(string) {\n    return lineStyleValues.includes(string);\n}\nconst lengthRegExp = /^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;\n/**\n * Checks if string contains [length](https://developer.mozilla.org/en-US/docs/Web/CSS/length) CSS value.\n */ function isLength(string) {\n    return lengthRegExp.test(string);\n}\nconst PERCENTAGE_VALUE_REGEXP = /^[+-]?[0-9]*([.][0-9]+)?%$/;\n/**\n * Checks if string contains [percentage](https://developer.mozilla.org/en-US/docs/Web/CSS/percentage) CSS value.\n */ function isPercentage(string) {\n    return PERCENTAGE_VALUE_REGEXP.test(string);\n}\nconst repeatValues = [\n    'repeat-x',\n    'repeat-y',\n    'repeat',\n    'space',\n    'round',\n    'no-repeat'\n];\n/**\n * Checks if string contains [background repeat](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) CSS value.\n */ function isRepeat(string) {\n    return repeatValues.includes(string);\n}\nconst positionValues = [\n    'center',\n    'top',\n    'bottom',\n    'left',\n    'right'\n];\n/**\n * Checks if string contains [background position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) CSS value.\n */ function isPosition(string) {\n    return positionValues.includes(string);\n}\nconst attachmentValues = [\n    'fixed',\n    'scroll',\n    'local'\n];\n/**\n * Checks if string contains [background attachment](https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment) CSS value.\n */ function isAttachment(string) {\n    return attachmentValues.includes(string);\n}\nconst urlRegExp = /^url\\(/;\n/**\n * Checks if string contains [URL](https://developer.mozilla.org/en-US/docs/Web/CSS/url) CSS value.\n */ function isURL(string) {\n    return urlRegExp.test(string);\n}\n/**\n * Parses box sides as individual values.\n */ function getBoxSidesValues(value = '') {\n    if (value === '') {\n        return {\n            top: undefined,\n            right: undefined,\n            bottom: undefined,\n            left: undefined\n        };\n    }\n    const values = getShorthandValues(value);\n    const top = values[0];\n    const bottom = values[2] || top;\n    const right = values[1] || top;\n    const left = values[3] || right;\n    return {\n        top,\n        bottom,\n        right,\n        left\n    };\n}\n/**\n * Default reducer for CSS properties that concerns edges of a box\n * [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notations:\n *\n * ```ts\n * stylesProcessor.setReducer( 'padding', getBoxSidesValueReducer( 'padding' ) );\n * ```\n */ function getBoxSidesValueReducer(styleShorthand) {\n    return (value)=>{\n        const { top, right, bottom, left } = value;\n        const reduced = [];\n        if (![\n            top,\n            right,\n            left,\n            bottom\n        ].every((value)=>!!value)) {\n            if (top) {\n                reduced.push([\n                    styleShorthand + '-top',\n                    top\n                ]);\n            }\n            if (right) {\n                reduced.push([\n                    styleShorthand + '-right',\n                    right\n                ]);\n            }\n            if (bottom) {\n                reduced.push([\n                    styleShorthand + '-bottom',\n                    bottom\n                ]);\n            }\n            if (left) {\n                reduced.push([\n                    styleShorthand + '-left',\n                    left\n                ]);\n            }\n        } else {\n            reduced.push([\n                styleShorthand,\n                getBoxSidesShorthandValue(value)\n            ]);\n        }\n        return reduced;\n    };\n}\n/**\n * Returns a [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) notation\n * of a CSS property value.\n *\n * ```ts\n * getBoxSidesShorthandValue( { top: '1px', right: '1px', bottom: '2px', left: '1px' } );\n * // will return '1px 1px 2px'\n * ```\n */ function getBoxSidesShorthandValue({ top, right, bottom, left }) {\n    const out = [];\n    if (left !== right) {\n        out.push(top, right, bottom, left);\n    } else if (bottom !== top) {\n        out.push(top, right, bottom);\n    } else if (right !== top) {\n        out.push(top, right);\n    } else {\n        out.push(top);\n    }\n    return out.join(' ');\n}\n/**\n * Creates a normalizer for a [shorthand](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) 1-to-4 value.\n *\n * ```ts\n * stylesProcessor.setNormalizer( 'margin', getPositionShorthandNormalizer( 'margin' ) );\n * ```\n */ function getPositionShorthandNormalizer(shorthand) {\n    return (value)=>{\n        return {\n            path: shorthand,\n            value: getBoxSidesValues(value)\n        };\n    };\n}\n/**\n * Parses parts of a 1-to-4 value notation - handles some CSS values with spaces (like RGB()).\n *\n * ```ts\n * getShorthandValues( 'red blue RGB(0, 0, 0)');\n * // will return [ 'red', 'blue', 'RGB(0, 0, 0)' ]\n * ```\n */ function getShorthandValues(string) {\n    const matches = string.matchAll(CSS_SHORTHAND_VALUE_REGEXP);\n    return Array.from(matches).map((i)=>i[0]);\n}\n\n/**\n * Adds a background CSS styles processing rules.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addBackgroundRules );\n * ```\n *\n * The normalized value is stored as:\n *\n * ```ts\n * const styles = {\n * \tbackground: {\n * \t\tcolor,\n * \t\trepeat,\n * \t\tposition,\n * \t\tattachment,\n * \t\timage\n * \t}\n * };\n * ````\n *\n * **Note**: Currently only `'background-color'` longhand value is parsed besides `'background'` shorthand. The reducer also supports only\n * `'background-color'` value.\n */ function addBackgroundRules(stylesProcessor) {\n    stylesProcessor.setNormalizer('background', getBackgroundNormalizer());\n    stylesProcessor.setNormalizer('background-color', getBackgroundColorNormalizer());\n    stylesProcessor.setReducer('background', getBackgroundReducer());\n    stylesProcessor.setStyleRelation('background', [\n        'background-color'\n    ]);\n}\nfunction getBackgroundNormalizer() {\n    return (value)=>{\n        const background = {};\n        const parts = getShorthandValues(value);\n        for (const part of parts){\n            if (isRepeat(part)) {\n                background.repeat = background.repeat || [];\n                background.repeat.push(part);\n            } else if (isPosition(part)) {\n                background.position = background.position || [];\n                background.position.push(part);\n            } else if (isAttachment(part)) {\n                background.attachment = part;\n            } else if (isColor(part)) {\n                background.color = part;\n            } else if (isURL(part)) {\n                background.image = part;\n            }\n        }\n        return {\n            path: 'background',\n            value: background\n        };\n    };\n}\nfunction getBackgroundColorNormalizer() {\n    return (value)=>({\n            path: 'background.color',\n            value\n        });\n}\nfunction getBackgroundReducer() {\n    return (value)=>{\n        const ret = [];\n        ret.push([\n            'background-color',\n            value.color\n        ]);\n        return ret;\n    };\n}\n\n/**\n * Adds a border CSS styles processing rules.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addBorderRules );\n * ```\n *\n * This rules merges all [border](https://developer.mozilla.org/en-US/docs/Web/CSS/border) styles notation shorthands:\n *\n * - border\n * - border-top\n * - border-right\n * - border-bottom\n * - border-left\n * - border-color\n * - border-style\n * - border-width\n *\n * and all corresponding longhand forms (like `border-top-color`, `border-top-style`, etc).\n *\n * It does not handle other shorthands (like `border-radius` or `border-image`).\n *\n * The normalized model stores border values as:\n *\n * ```ts\n * const styles = {\n * \tborder: {\n * \t\tcolor: { top, right, bottom, left },\n * \t\tstyle: { top, right, bottom, left },\n * \t\twidth: { top, right, bottom, left },\n * \t}\n * };\n * ```\n */ function addBorderRules(stylesProcessor) {\n    stylesProcessor.setNormalizer('border', getBorderNormalizer());\n    // Border-position shorthands.\n    stylesProcessor.setNormalizer('border-top', getBorderPositionNormalizer('top'));\n    stylesProcessor.setNormalizer('border-right', getBorderPositionNormalizer('right'));\n    stylesProcessor.setNormalizer('border-bottom', getBorderPositionNormalizer('bottom'));\n    stylesProcessor.setNormalizer('border-left', getBorderPositionNormalizer('left'));\n    // Border-property shorthands.\n    stylesProcessor.setNormalizer('border-color', getBorderPropertyNormalizer('color'));\n    stylesProcessor.setNormalizer('border-width', getBorderPropertyNormalizer('width'));\n    stylesProcessor.setNormalizer('border-style', getBorderPropertyNormalizer('style'));\n    // Border longhands.\n    stylesProcessor.setNormalizer('border-top-color', getBorderPropertyPositionNormalizer('color', 'top'));\n    stylesProcessor.setNormalizer('border-top-style', getBorderPropertyPositionNormalizer('style', 'top'));\n    stylesProcessor.setNormalizer('border-top-width', getBorderPropertyPositionNormalizer('width', 'top'));\n    stylesProcessor.setNormalizer('border-right-color', getBorderPropertyPositionNormalizer('color', 'right'));\n    stylesProcessor.setNormalizer('border-right-style', getBorderPropertyPositionNormalizer('style', 'right'));\n    stylesProcessor.setNormalizer('border-right-width', getBorderPropertyPositionNormalizer('width', 'right'));\n    stylesProcessor.setNormalizer('border-bottom-color', getBorderPropertyPositionNormalizer('color', 'bottom'));\n    stylesProcessor.setNormalizer('border-bottom-style', getBorderPropertyPositionNormalizer('style', 'bottom'));\n    stylesProcessor.setNormalizer('border-bottom-width', getBorderPropertyPositionNormalizer('width', 'bottom'));\n    stylesProcessor.setNormalizer('border-left-color', getBorderPropertyPositionNormalizer('color', 'left'));\n    stylesProcessor.setNormalizer('border-left-style', getBorderPropertyPositionNormalizer('style', 'left'));\n    stylesProcessor.setNormalizer('border-left-width', getBorderPropertyPositionNormalizer('width', 'left'));\n    stylesProcessor.setExtractor('border-top', getBorderPositionExtractor('top'));\n    stylesProcessor.setExtractor('border-right', getBorderPositionExtractor('right'));\n    stylesProcessor.setExtractor('border-bottom', getBorderPositionExtractor('bottom'));\n    stylesProcessor.setExtractor('border-left', getBorderPositionExtractor('left'));\n    stylesProcessor.setExtractor('border-top-color', 'border.color.top');\n    stylesProcessor.setExtractor('border-right-color', 'border.color.right');\n    stylesProcessor.setExtractor('border-bottom-color', 'border.color.bottom');\n    stylesProcessor.setExtractor('border-left-color', 'border.color.left');\n    stylesProcessor.setExtractor('border-top-width', 'border.width.top');\n    stylesProcessor.setExtractor('border-right-width', 'border.width.right');\n    stylesProcessor.setExtractor('border-bottom-width', 'border.width.bottom');\n    stylesProcessor.setExtractor('border-left-width', 'border.width.left');\n    stylesProcessor.setExtractor('border-top-style', 'border.style.top');\n    stylesProcessor.setExtractor('border-right-style', 'border.style.right');\n    stylesProcessor.setExtractor('border-bottom-style', 'border.style.bottom');\n    stylesProcessor.setExtractor('border-left-style', 'border.style.left');\n    stylesProcessor.setReducer('border-color', getBoxSidesValueReducer('border-color'));\n    stylesProcessor.setReducer('border-style', getBoxSidesValueReducer('border-style'));\n    stylesProcessor.setReducer('border-width', getBoxSidesValueReducer('border-width'));\n    stylesProcessor.setReducer('border-top', getBorderPositionReducer('top'));\n    stylesProcessor.setReducer('border-right', getBorderPositionReducer('right'));\n    stylesProcessor.setReducer('border-bottom', getBorderPositionReducer('bottom'));\n    stylesProcessor.setReducer('border-left', getBorderPositionReducer('left'));\n    stylesProcessor.setReducer('border', getBorderReducer());\n    stylesProcessor.setStyleRelation('border', [\n        'border-color',\n        'border-style',\n        'border-width',\n        'border-top',\n        'border-right',\n        'border-bottom',\n        'border-left',\n        'border-top-color',\n        'border-right-color',\n        'border-bottom-color',\n        'border-left-color',\n        'border-top-style',\n        'border-right-style',\n        'border-bottom-style',\n        'border-left-style',\n        'border-top-width',\n        'border-right-width',\n        'border-bottom-width',\n        'border-left-width'\n    ]);\n    stylesProcessor.setStyleRelation('border-color', [\n        'border-top-color',\n        'border-right-color',\n        'border-bottom-color',\n        'border-left-color'\n    ]);\n    stylesProcessor.setStyleRelation('border-style', [\n        'border-top-style',\n        'border-right-style',\n        'border-bottom-style',\n        'border-left-style'\n    ]);\n    stylesProcessor.setStyleRelation('border-width', [\n        'border-top-width',\n        'border-right-width',\n        'border-bottom-width',\n        'border-left-width'\n    ]);\n    stylesProcessor.setStyleRelation('border-top', [\n        'border-top-color',\n        'border-top-style',\n        'border-top-width'\n    ]);\n    stylesProcessor.setStyleRelation('border-right', [\n        'border-right-color',\n        'border-right-style',\n        'border-right-width'\n    ]);\n    stylesProcessor.setStyleRelation('border-bottom', [\n        'border-bottom-color',\n        'border-bottom-style',\n        'border-bottom-width'\n    ]);\n    stylesProcessor.setStyleRelation('border-left', [\n        'border-left-color',\n        'border-left-style',\n        'border-left-width'\n    ]);\n}\nfunction getBorderNormalizer() {\n    return (value)=>{\n        const { color, style, width } = normalizeBorderShorthand(value);\n        return {\n            path: 'border',\n            value: {\n                color: getBoxSidesValues(color),\n                style: getBoxSidesValues(style),\n                width: getBoxSidesValues(width)\n            }\n        };\n    };\n}\nfunction getBorderPositionNormalizer(side) {\n    return (value)=>{\n        const { color, style, width } = normalizeBorderShorthand(value);\n        const border = {};\n        if (color !== undefined) {\n            border.color = {\n                [side]: color\n            };\n        }\n        if (style !== undefined) {\n            border.style = {\n                [side]: style\n            };\n        }\n        if (width !== undefined) {\n            border.width = {\n                [side]: width\n            };\n        }\n        return {\n            path: 'border',\n            value: border\n        };\n    };\n}\nfunction getBorderPropertyNormalizer(propertyName) {\n    return (value)=>{\n        return {\n            path: 'border',\n            value: toBorderPropertyShorthand(value, propertyName)\n        };\n    };\n}\nfunction toBorderPropertyShorthand(value, property) {\n    return {\n        [property]: getBoxSidesValues(value)\n    };\n}\nfunction getBorderPropertyPositionNormalizer(property, side) {\n    return (value)=>{\n        return {\n            path: 'border',\n            value: {\n                [property]: {\n                    [side]: value\n                }\n            }\n        };\n    };\n}\nfunction getBorderPositionExtractor(which) {\n    return (name, styles)=>{\n        if (styles.border) {\n            return extractBorderPosition(styles.border, which);\n        }\n    };\n}\nfunction extractBorderPosition(border, which) {\n    const value = {};\n    if (border.width && border.width[which]) {\n        value.width = border.width[which];\n    }\n    if (border.style && border.style[which]) {\n        value.style = border.style[which];\n    }\n    if (border.color && border.color[which]) {\n        value.color = border.color[which];\n    }\n    return value;\n}\nfunction normalizeBorderShorthand(string) {\n    const result = {};\n    const parts = getShorthandValues(string);\n    for (const part of parts){\n        if (isLength(part) || /thin|medium|thick/.test(part)) {\n            result.width = part;\n        } else if (isLineStyle(part)) {\n            result.style = part;\n        } else {\n            result.color = part;\n        }\n    }\n    return result;\n}\n/**\n * The border reducer factory.\n *\n * It tries to produce the most optimal output for the specified styles.\n *\n * For a border style:\n *\n * ```css\n * style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n * ```\n *\n * It will produce: `border-style: solid`.\n * For a border style and color:\n *\n * ```css\n * color: {top: \"#ff0\", bottom: \"#ff0\", right: \"#ff0\", left: \"#ff0\"}\n * style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n * ```\n *\n * It will produce: `border-color: #ff0; border-style: solid`.\n * If all border parameters are specified:\n *\n * ```css\n * color: {top: \"#ff0\", bottom: \"#ff0\", right: \"#ff0\", left: \"#ff0\"}\n * style: {top: \"solid\", bottom: \"solid\", right: \"solid\", left: \"solid\"}\n * width: {top: \"2px\", bottom: \"2px\", right: \"2px\", left: \"2px\"}\n * ```\n *\n * It will combine everything into a single property: `border: 2px solid #ff0`.\n *\n * The definitions are merged only if all border selectors have the same values.\n */ function getBorderReducer() {\n    return (value)=>{\n        const topStyles = extractBorderPosition(value, 'top');\n        const rightStyles = extractBorderPosition(value, 'right');\n        const bottomStyles = extractBorderPosition(value, 'bottom');\n        const leftStyles = extractBorderPosition(value, 'left');\n        const borderStyles = [\n            topStyles,\n            rightStyles,\n            bottomStyles,\n            leftStyles\n        ];\n        const borderStylesByType = {\n            width: getReducedStyleValueForType(borderStyles, 'width'),\n            style: getReducedStyleValueForType(borderStyles, 'style'),\n            color: getReducedStyleValueForType(borderStyles, 'color')\n        };\n        // Try reducing to a single `border:` property.\n        const reducedBorderStyle = reduceBorderPosition(borderStylesByType, 'all');\n        if (reducedBorderStyle.length) {\n            return reducedBorderStyle;\n        }\n        // Try reducing to `border-style:`, `border-width:`, `border-color:` properties.\n        const reducedStyleTypes = Object.entries(borderStylesByType).reduce((reducedStyleTypes, [type, value])=>{\n            if (value) {\n                reducedStyleTypes.push([\n                    `border-${type}`,\n                    value\n                ]);\n                // Remove it from the full set to not include it in the most specific properties later.\n                borderStyles.forEach((style)=>delete style[type]);\n            }\n            return reducedStyleTypes;\n        }, []);\n        // The reduced properties (by type) and all that remains that could not be reduced.\n        return [\n            ...reducedStyleTypes,\n            ...reduceBorderPosition(topStyles, 'top'),\n            ...reduceBorderPosition(rightStyles, 'right'),\n            ...reduceBorderPosition(bottomStyles, 'bottom'),\n            ...reduceBorderPosition(leftStyles, 'left')\n        ];\n    };\n    /**\n\t * @param styles The array of objects with `style`, `color`, `width` properties.\n\t */ function getReducedStyleValueForType(styles, type) {\n        return styles.map((style)=>style[type]).reduce((result, style)=>result == style ? result : null);\n    }\n}\nfunction getBorderPositionReducer(which) {\n    return (value)=>reduceBorderPosition(value, which);\n}\n/**\n * Returns an array with reduced border styles depending on the specified values.\n *\n * If all border properties (width, style, color) are specified, the returned selector will be\n * merged into a group: `border-*: [width] [style] [color]`.\n *\n * Otherwise, the specific definitions will be returned: `border-(width|style|color)-*: [value]`.\n *\n * @param value Styles if defined.\n * @param which The border position.\n */ function reduceBorderPosition(value, which) {\n    const borderTypes = [];\n    if (value && value.width) {\n        borderTypes.push('width');\n    }\n    if (value && value.style) {\n        borderTypes.push('style');\n    }\n    if (value && value.color) {\n        borderTypes.push('color');\n    }\n    if (borderTypes.length == 3) {\n        const borderValue = borderTypes.map((item)=>value[item]).join(' ');\n        return [\n            which == 'all' ? [\n                'border',\n                borderValue\n            ] : [\n                `border-${which}`,\n                borderValue\n            ]\n        ];\n    }\n    // We are unable to reduce to a single `border:` property.\n    if (which == 'all') {\n        return [];\n    }\n    return borderTypes.map((type)=>{\n        return [\n            `border-${which}-${type}`,\n            value[type]\n        ];\n    });\n}\n\n/**\n * Adds a margin CSS styles processing rules.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addMarginRules );\n * ```\n *\n * The normalized value is stored as:\n *\n * ```ts\n * const styles = {\n * \tmargin: {\n * \t\ttop,\n * \t\tright,\n * \t\tbottom,\n * \t\tleft\n * \t}\n * };\n * ```\n */ function addMarginRules(stylesProcessor) {\n    stylesProcessor.setNormalizer('margin', getPositionShorthandNormalizer('margin'));\n    stylesProcessor.setNormalizer('margin-top', (value)=>({\n            path: 'margin.top',\n            value\n        }));\n    stylesProcessor.setNormalizer('margin-right', (value)=>({\n            path: 'margin.right',\n            value\n        }));\n    stylesProcessor.setNormalizer('margin-bottom', (value)=>({\n            path: 'margin.bottom',\n            value\n        }));\n    stylesProcessor.setNormalizer('margin-left', (value)=>({\n            path: 'margin.left',\n            value\n        }));\n    stylesProcessor.setReducer('margin', getBoxSidesValueReducer('margin'));\n    stylesProcessor.setStyleRelation('margin', [\n        'margin-top',\n        'margin-right',\n        'margin-bottom',\n        'margin-left'\n    ]);\n}\n\n/**\n * Adds a padding CSS styles processing rules.\n *\n * ```ts\n * editor.data.addStyleProcessorRules( addPaddingRules );\n * ```\n *\n * The normalized value is stored as:\n *\n * ```ts\n * const styles = {\n * \tpadding: {\n * \t\ttop,\n * \t\tright,\n * \t\tbottom,\n * \t\tleft\n * \t}\n * };\n * ```\n */ function addPaddingRules(stylesProcessor) {\n    stylesProcessor.setNormalizer('padding', getPositionShorthandNormalizer('padding'));\n    stylesProcessor.setNormalizer('padding-top', (value)=>({\n            path: 'padding.top',\n            value\n        }));\n    stylesProcessor.setNormalizer('padding-right', (value)=>({\n            path: 'padding.right',\n            value\n        }));\n    stylesProcessor.setNormalizer('padding-bottom', (value)=>({\n            path: 'padding.bottom',\n            value\n        }));\n    stylesProcessor.setNormalizer('padding-left', (value)=>({\n            path: 'padding.left',\n            value\n        }));\n    stylesProcessor.setReducer('padding', getBoxSidesValueReducer('padding'));\n    stylesProcessor.setStyleRelation('padding', [\n        'padding-top',\n        'padding-right',\n        'padding-bottom',\n        'padding-left'\n    ]);\n}\n\nconst ELEMENT_RANGE_START_TOKEN = '[';\nconst ELEMENT_RANGE_END_TOKEN = ']';\nconst TEXT_RANGE_START_TOKEN = '{';\nconst TEXT_RANGE_END_TOKEN = '}';\nconst allowedTypes = {\n    'container': ContainerElement,\n    'attribute': AttributeElement,\n    'empty': EmptyElement,\n    'ui': UIElement,\n    'raw': RawElement\n};\n// Returns simplified implementation of {@link module:engine/view/domconverter~DomConverter#setContentOf DomConverter.setContentOf} method.\n// Used to render UIElement and RawElement.\nconst domConverterStub = {\n    setContentOf: (node, html)=>{\n        node.innerHTML = html;\n    }\n};\n/**\n * Writes the content of the {@link module:engine/view/document~Document document} to an HTML-like string.\n *\n * @param options.withoutSelection Whether to write the selection. When set to `true`, the selection will\n * not be included in the returned string.\n * @param options.rootName The name of the root from which the data should be stringified. If not provided,\n * the default `main` name will be used.\n * @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n * instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n * @param options.showPriority When set to `true`, the attribute element's priority will be printed\n * (`<span view-priority=\"12\">`, `<b view-priority=\"10\">`).\n * @param options.showAttributeElementId When set to `true`, the attribute element's ID will be printed\n * (`<span id=\"marker:foo\">`).\n * @param options.renderUIElements When set to `true`, the inner content of each\n * {@link module:engine/view/uielement~UIElement} will be printed.\n * @param options.renderRawElements When set to `true`, the inner content of each\n * {@link module:engine/view/rawelement~RawElement} will be printed.\n * @param options.domConverter When set to an actual {@link module:engine/view/domconverter~DomConverter DomConverter}\n * instance, it lets the conversion go through exactly the same flow the editing view is going through,\n * i.e. with view data filtering. Otherwise the simple stub is used.\n * @returns The stringified data.\n */ function getData$1(view, options = {}) {\n    if (!(view instanceof View)) {\n        throw new TypeError('View needs to be an instance of module:engine/view/view~View.');\n    }\n    const document1 = view.document;\n    const withoutSelection = !!options.withoutSelection;\n    const rootName = options.rootName || 'main';\n    const root = document1.getRoot(rootName);\n    const stringifyOptions = {\n        showType: options.showType,\n        showPriority: options.showPriority,\n        renderUIElements: options.renderUIElements,\n        renderRawElements: options.renderRawElements,\n        ignoreRoot: true,\n        domConverter: options.domConverter\n    };\n    return withoutSelection ? getData$1._stringify(root, null, stringifyOptions) : getData$1._stringify(root, document1.selection, stringifyOptions);\n}\n// Set stringify as getData private method - needed for testing/spying.\ngetData$1._stringify = stringify$1;\n/**\n * Sets the content of a view {@link module:engine/view/document~Document document} provided as an HTML-like string.\n *\n * @param data An HTML-like string to write into the document.\n * @param options.rootName The root name where parsed data will be stored. If not provided,\n * the default `main` name will be used.\n */ function setData$1(view, data, options = {}) {\n    if (!(view instanceof View)) {\n        throw new TypeError('View needs to be an instance of module:engine/view/view~View.');\n    }\n    const document1 = view.document;\n    const rootName = options.rootName || 'main';\n    const root = document1.getRoot(rootName);\n    view.change((writer)=>{\n        const result = setData$1._parse(data, {\n            rootElement: root\n        });\n        if (result.view && result.selection) {\n            writer.setSelection(result.selection);\n        }\n    });\n}\n// Set parse as setData private method - needed for testing/spying.\nsetData$1._parse = parse$1;\n/**\n * Converts view elements to HTML-like string representation.\n *\n * A root element can be provided as {@link module:engine/view/text~Text text}:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * stringify( text ); // 'foobar'\n * ```\n *\n * or as an {@link module:engine/view/element~Element element}:\n *\n * ```ts\n * const element = downcastWriter.createElement( 'p', null, downcastWriter.createText( 'foobar' ) );\n * stringify( element ); // '<p>foobar</p>'\n * ```\n *\n * or as a {@link module:engine/view/documentfragment~DocumentFragment document fragment}:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const b = downcastWriter.createElement( 'b', { name: 'test' }, text );\n * const p = downcastWriter.createElement( 'p', { style: 'color:red;' } );\n * const fragment = downcastWriter.createDocumentFragment( [ p, b ] );\n *\n * stringify( fragment ); // '<p style=\"color:red;\"></p><b name=\"test\">foobar</b>'\n * ```\n *\n * Additionally, a {@link module:engine/view/documentselection~DocumentSelection selection} instance can be provided.\n * Ranges from the selection will then be included in the output data.\n * If a range position is placed inside the element node, it will be represented with `[` and `]`:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const b = downcastWriter.createElement( 'b', null, text );\n * const p = downcastWriter.createElement( 'p', null, b );\n * const selection = downcastWriter.createSelection(\n * \tdowncastWriter.createRangeIn( p )\n * );\n *\n * stringify( p, selection ); // '<p>[<b>foobar</b>]</p>'\n * ```\n *\n * If a range is placed inside the text node, it will be represented with `{` and `}`:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const b = downcastWriter.createElement( 'b', null, text );\n * const p = downcastWriter.createElement( 'p', null, b );\n * const selection = downcastWriter.createSelection(\n * \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 1 ), downcastWriter.createPositionAt( text, 5 ) )\n * );\n *\n * stringify( p, selection ); // '<p><b>f{ooba}r</b></p>'\n * ```\n *\n * ** Note: **\n * It is possible to unify selection markers to `[` and `]` for both (inside and outside text)\n * by setting the `sameSelectionCharacters=true` option. It is mainly used when the view stringify option is used by\n * model utilities.\n *\n * Multiple ranges are supported:\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const selection = downcastWriter.createSelection( [\n * \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 0 ), downcastWriter.createPositionAt( text, 1 ) ),\n * \tdowncastWriter.createRange( downcastWriter.createPositionAt( text, 3 ), downcastWriter.createPositionAt( text, 5 ) )\n * ] );\n *\n * stringify( text, selection ); // '{f}oo{ba}r'\n * ```\n *\n * A {@link module:engine/view/range~Range range} or {@link module:engine/view/position~Position position} instance can be provided\n * instead of the {@link module:engine/view/documentselection~DocumentSelection selection} instance. If a range instance\n * is provided, it will be converted to a selection containing this range. If a position instance is provided, it will\n * be converted to a selection containing one range collapsed at this position.\n *\n * ```ts\n * const text = downcastWriter.createText( 'foobar' );\n * const range = downcastWriter.createRange( downcastWriter.createPositionAt( text, 0 ), downcastWriter.createPositionAt( text, 1 ) );\n * const position = downcastWriter.createPositionAt( text, 3 );\n *\n * stringify( text, range ); // '{f}oobar'\n * stringify( text, position ); // 'foo{}bar'\n * ```\n *\n * An additional `options` object can be provided.\n * If `options.showType` is set to `true`, element's types will be\n * presented for {@link module:engine/view/attributeelement~AttributeElement attribute elements},\n * {@link module:engine/view/containerelement~ContainerElement container elements}\n * {@link module:engine/view/emptyelement~EmptyElement empty elements}\n * and {@link module:engine/view/uielement~UIElement UI elements}:\n *\n * ```ts\n * const attribute = downcastWriter.createAttributeElement( 'b' );\n * const container = downcastWriter.createContainerElement( 'p' );\n * const empty = downcastWriter.createEmptyElement( 'img' );\n * const ui = downcastWriter.createUIElement( 'span' );\n * getData( attribute, null, { showType: true } ); // '<attribute:b></attribute:b>'\n * getData( container, null, { showType: true } ); // '<container:p></container:p>'\n * getData( empty, null, { showType: true } ); // '<empty:img></empty:img>'\n * getData( ui, null, { showType: true } ); // '<ui:span></ui:span>'\n * ```\n *\n * If `options.showPriority` is set to `true`, a priority will be displayed for all\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements}.\n *\n * ```ts\n * const attribute = downcastWriter.createAttributeElement( 'b' );\n * attribute._priority = 20;\n * getData( attribute, null, { showPriority: true } ); // <b view-priority=\"20\"></b>\n * ```\n *\n * If `options.showAttributeElementId` is set to `true`, the attribute element's id will be displayed for all\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements} that have it set.\n *\n * ```ts\n * const attribute = downcastWriter.createAttributeElement( 'span' );\n * attribute._id = 'marker:foo';\n * getData( attribute, null, { showAttributeElementId: true } ); // <span view-id=\"marker:foo\"></span>\n * ```\n *\n * @param node The node to stringify.\n * @param selectionOrPositionOrRange A selection instance whose ranges will be included in the returned string data.\n * If a range instance is provided, it will be converted to a selection containing this range. If a position instance\n * is provided, it will be converted to a selection containing one range collapsed at this position.\n * @param options An object with additional options.\n * @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n * instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n * @param options.showPriority When set to `true`,  the attribute element's priority will be printed\n * (`<span view-priority=\"12\">`, `<b view-priority=\"10\">`).\n * @param options.showAttributeElementId When set to `true`, attribute element's id will be printed\n * (`<span id=\"marker:foo\">`).\n * @param options.ignoreRoot When set to `true`, the root's element opening and closing will not be printed.\n * Mainly used by the `getData` function to ignore the {@link module:engine/view/document~Document document's} root element.\n * @param options.sameSelectionCharacters When set to `true`, the selection inside the text will be marked as\n *  `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both will be marked as `[` and `]` only.\n * @param options.renderUIElements When set to `true`, the inner content of each\n * {@link module:engine/view/uielement~UIElement} will be printed.\n * @param options.renderRawElements When set to `true`, the inner content of each\n * {@link module:engine/view/rawelement~RawElement} will be printed.\n * @param options.domConverter When set to an actual {@link module:engine/view/domconverter~DomConverter DomConverter}\n * instance, it lets the conversion go through exactly the same flow the editing view is going through,\n * i.e. with view data filtering. Otherwise the simple stub is used.\n * @returns An HTML-like string representing the view.\n */ function stringify$1(node, selectionOrPositionOrRange = null, options = {}) {\n    let selection;\n    if (selectionOrPositionOrRange instanceof Position$1 || selectionOrPositionOrRange instanceof Range$1) {\n        selection = new DocumentSelection$1(selectionOrPositionOrRange);\n    } else {\n        selection = selectionOrPositionOrRange;\n    }\n    const viewStringify = new ViewStringify(node, selection, options);\n    return viewStringify.stringify();\n}\n/**\n * Parses an HTML-like string and returns a view tree.\n * A simple string will be converted to a {@link module:engine/view/text~Text text} node:\n *\n * ```ts\n * parse( 'foobar' ); // Returns an instance of text.\n * ```\n *\n * {@link module:engine/view/element~Element Elements} will be parsed with attributes as children:\n *\n * ```ts\n * parse( '<b name=\"baz\">foobar</b>' ); // Returns an instance of element with the `baz` attribute and a text child node.\n * ```\n *\n * Multiple nodes provided on root level will be converted to a\n * {@link module:engine/view/documentfragment~DocumentFragment document fragment}:\n *\n * ```ts\n * parse( '<b>foo</b><i>bar</i>' ); // Returns a document fragment with two child elements.\n * ```\n *\n * The method can parse multiple {@link module:engine/view/range~Range ranges} provided in string data and return a\n * {@link module:engine/view/documentselection~DocumentSelection selection} instance containing these ranges. Ranges placed inside\n * {@link module:engine/view/text~Text text} nodes should be marked using `{` and `}` brackets:\n *\n * ```ts\n * const { text, selection } = parse( 'f{ooba}r' );\n * ```\n *\n * Ranges placed outside text nodes should be marked using `[` and `]` brackets:\n *\n * ```ts\n * const { root, selection } = parse( '<p>[<b>foobar</b>]</p>' );\n * ```\n *\n * ** Note: **\n * It is possible to unify selection markers to `[` and `]` for both (inside and outside text)\n * by setting `sameSelectionCharacters=true` option. It is mainly used when the view parse option is used by model utilities.\n *\n * Sometimes there is a need for defining the order of ranges inside the created selection. This can be achieved by providing\n * the range order array as an additional parameter:\n *\n * ```ts\n * const { root, selection } = parse( '{fo}ob{ar}{ba}z', { order: [ 2, 3, 1 ] } );\n * ```\n *\n * In the example above, the first range (`{fo}`) will be added to the selection as the second one, the second range (`{ar}`) will be\n * added as the third and the third range (`{ba}`) will be added as the first one.\n *\n * If the selection's last range should be added as a backward one\n * (so the {@link module:engine/view/documentselection~DocumentSelection#anchor selection anchor} is represented\n * by the `end` position and {@link module:engine/view/documentselection~DocumentSelection#focus selection focus} is\n * represented by the `start` position), use the `lastRangeBackward` flag:\n *\n * ```ts\n * const { root, selection } = parse( `{foo}bar{baz}`, { lastRangeBackward: true } );\n * ```\n *\n * Some more examples and edge cases:\n *\n * ```ts\n * // Returns an empty document fragment.\n * parse( '' );\n *\n * // Returns an empty document fragment and a collapsed selection.\n * const { root, selection } = parse( '[]' );\n *\n * // Returns an element and a selection that is placed inside the document fragment containing that element.\n * const { root, selection } = parse( '[<a></a>]' );\n * ```\n *\n * @param data An HTML-like string to be parsed.\n * @param options.order An array with the order of parsed ranges added to the returned\n * {@link module:engine/view/documentselection~DocumentSelection Selection} instance. Each element should represent the\n * desired position of each range in the selection instance. For example: `[2, 3, 1]` means that the first range will be\n * placed as the second, the second as the third and the third as the first.\n * @param options.lastRangeBackward If set to `true`, the last range will be added as backward to the returned\n * {@link module:engine/view/documentselection~DocumentSelection selection} instance.\n * @param options.rootElement The default root to use when parsing elements.\n * When set to `null`, the root element will be created automatically. If set to\n * {@link module:engine/view/element~Element Element} or {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment},\n * this node will be used as the root for all parsed nodes.\n * @param options.sameSelectionCharacters When set to `false`, the selection inside the text should be marked using\n * `{` and `}` and the selection outside the ext using `[` and `]`. When set to `true`, both should be marked with `[` and `]` only.\n * @param options.stylesProcessor Styles processor.\n * @returns Returns the parsed view node or an object with two fields: `view` and `selection` when selection ranges were included in the\n * data to parse.\n */ function parse$1(data, options = {}) {\n    const viewDocument = new Document$1(new StylesProcessor());\n    options.order = options.order || [];\n    const rangeParser = new RangeParser({\n        sameSelectionCharacters: options.sameSelectionCharacters\n    });\n    const processor = new XmlDataProcessor(viewDocument, {\n        namespaces: Object.keys(allowedTypes)\n    });\n    if (options.inlineObjectElements) {\n        processor.domConverter.inlineObjectElements.push(...options.inlineObjectElements);\n    }\n    // Convert data to view.\n    let view = processor.toView(data);\n    // At this point we have a view tree with Elements that could have names like `attribute:b:1`. In the next step\n    // we need to parse Element's names and convert them to AttributeElements and ContainerElements.\n    view = _convertViewElements(view);\n    // If custom root is provided - move all nodes there.\n    if (options.rootElement) {\n        const root = options.rootElement;\n        const nodes = view._removeChildren(0, view.childCount);\n        root._removeChildren(0, root.childCount);\n        root._appendChild(nodes);\n        view = root;\n    }\n    // Parse ranges included in view text nodes.\n    const ranges = rangeParser.parse(view, options.order);\n    // If only one element is returned inside DocumentFragment - return that element.\n    if (view.is('documentFragment') && view.childCount === 1) {\n        view = view.getChild(0);\n    }\n    // When ranges are present - return object containing view, and selection.\n    if (ranges.length) {\n        const selection = new DocumentSelection$1(ranges, {\n            backward: !!options.lastRangeBackward\n        });\n        return {\n            view,\n            selection\n        };\n    }\n    // If single element is returned without selection - remove it from parent and return detached element.\n    if (view.parent) {\n        view._remove();\n    }\n    return view;\n}\n/**\n * Private helper class used for converting ranges represented as text inside view {@link module:engine/view/text~Text text nodes}.\n */ class RangeParser {\n    sameSelectionCharacters;\n    _positions;\n    /**\n\t * Creates a range parser instance.\n\t *\n\t * @param options The range parser configuration.\n\t * @param options.sameSelectionCharacters When set to `true`, the selection inside the text is marked as\n\t * `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both are marked as `[` and `]`.\n\t */ constructor(options){\n        this.sameSelectionCharacters = !!options.sameSelectionCharacters;\n    }\n    /**\n\t * Parses the view and returns ranges represented inside {@link module:engine/view/text~Text text nodes}.\n\t * The method will remove all occurrences of `{`, `}`, `[` and `]` from found text nodes. If a text node is empty after\n\t * the process, it will be removed, too.\n\t *\n\t * @param node The starting node.\n\t * @param order The order of ranges. Each element should represent the desired position of the range after\n\t * sorting. For example: `[2, 3, 1]` means that the first range will be placed as the second, the second as the third and the third\n\t * as the first.\n\t * @returns An array with ranges found.\n\t */ parse(node, order) {\n        this._positions = [];\n        // Remove all range brackets from view nodes and save their positions.\n        this._getPositions(node);\n        // Create ranges using gathered positions.\n        let ranges = this._createRanges();\n        // Sort ranges if needed.\n        if (order.length) {\n            if (order.length != ranges.length) {\n                throw new Error(`Parse error - there are ${ranges.length} ranges found, but ranges order array contains ${order.length} elements.`);\n            }\n            ranges = this._sortRanges(ranges, order);\n        }\n        return ranges;\n    }\n    /**\n\t * Gathers positions of brackets inside the view tree starting from the provided node. The method will remove all occurrences of\n\t * `{`, `}`, `[` and `]` from found text nodes. If a text node is empty after the process, it will be removed, too.\n\t *\n\t * @param node Staring node.\n\t */ _getPositions(node) {\n        if (node.is('documentFragment') || node.is('element')) {\n            // Copy elements into the array, when nodes will be removed from parent node this array will still have all the\n            // items needed for iteration.\n            const children = [\n                ...node.getChildren()\n            ];\n            for (const child of children){\n                this._getPositions(child);\n            }\n        }\n        if (node.is('$text')) {\n            const regexp = new RegExp(`[${TEXT_RANGE_START_TOKEN}${TEXT_RANGE_END_TOKEN}\\\\${ELEMENT_RANGE_END_TOKEN}\\\\${ELEMENT_RANGE_START_TOKEN}]`, 'g');\n            let text = node.data;\n            let match;\n            let offset = 0;\n            const brackets = [];\n            // Remove brackets from text and store info about offset inside text node.\n            while(match = regexp.exec(text)){\n                const index = match.index;\n                const bracket = match[0];\n                brackets.push({\n                    bracket,\n                    textOffset: index - offset\n                });\n                offset++;\n            }\n            text = text.replace(regexp, '');\n            node._data = text;\n            const index = node.index;\n            const parent = node.parent;\n            // Remove empty text nodes.\n            if (!text) {\n                node._remove();\n            }\n            for (const item of brackets){\n                // Non-empty text node.\n                if (text) {\n                    if (this.sameSelectionCharacters || !this.sameSelectionCharacters && (item.bracket == TEXT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN)) {\n                        // Store information about text range delimiter.\n                        this._positions.push({\n                            bracket: item.bracket,\n                            position: new Position$1(node, item.textOffset)\n                        });\n                    } else {\n                        // Check if element range delimiter is not placed inside text node.\n                        if (!this.sameSelectionCharacters && item.textOffset !== 0 && item.textOffset !== text.length) {\n                            throw new Error(`Parse error - range delimiter '${item.bracket}' is placed inside text node.`);\n                        }\n                        // If bracket is placed at the end of the text node - it should be positioned after it.\n                        const offset = item.textOffset === 0 ? index : index + 1;\n                        // Store information about element range delimiter.\n                        this._positions.push({\n                            bracket: item.bracket,\n                            position: new Position$1(parent, offset)\n                        });\n                    }\n                } else {\n                    if (!this.sameSelectionCharacters && item.bracket == TEXT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN) {\n                        throw new Error(`Parse error - text range delimiter '${item.bracket}' is placed inside empty text node. `);\n                    }\n                    // Store information about element range delimiter.\n                    this._positions.push({\n                        bracket: item.bracket,\n                        position: new Position$1(parent, index)\n                    });\n                }\n            }\n        }\n    }\n    /**\n\t * Sorts ranges in a given order. Range order should be an array and each element should represent the desired position\n\t * of the range after sorting.\n\t * For example: `[2, 3, 1]` means that the first range will be placed as the second, the second as the third and the third\n\t * as the first.\n\t *\n\t * @param ranges Ranges to sort.\n\t * @param rangesOrder An array with new range order.\n\t * @returns Sorted ranges array.\n\t */ _sortRanges(ranges, rangesOrder) {\n        const sortedRanges = [];\n        let index = 0;\n        for (const newPosition of rangesOrder){\n            if (ranges[newPosition - 1] === undefined) {\n                throw new Error('Parse error - provided ranges order is invalid.');\n            }\n            sortedRanges[newPosition - 1] = ranges[index];\n            index++;\n        }\n        return sortedRanges;\n    }\n    /**\n\t * Uses all found bracket positions to create ranges from them.\n\t */ _createRanges() {\n        const ranges = [];\n        let range = null;\n        for (const item of this._positions){\n            // When end of range is found without opening.\n            if (!range && (item.bracket == ELEMENT_RANGE_END_TOKEN || item.bracket == TEXT_RANGE_END_TOKEN)) {\n                throw new Error(`Parse error - end of range was found '${item.bracket}' but range was not started before.`);\n            }\n            // When second start of range is found when one is already opened - selection does not allow intersecting\n            // ranges.\n            if (range && (item.bracket == ELEMENT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_START_TOKEN)) {\n                throw new Error(`Parse error - start of range was found '${item.bracket}' but one range is already started.`);\n            }\n            if (item.bracket == ELEMENT_RANGE_START_TOKEN || item.bracket == TEXT_RANGE_START_TOKEN) {\n                range = new Range$1(item.position, item.position);\n            } else {\n                range.end = item.position;\n                ranges.push(range);\n                range = null;\n            }\n        }\n        // Check if all ranges have proper ending.\n        if (range !== null) {\n            throw new Error('Parse error - range was started but no end delimiter was found.');\n        }\n        return ranges;\n    }\n}\n/**\n * Private helper class used for converting the view tree to a string.\n */ class ViewStringify {\n    root;\n    selection;\n    ranges;\n    showType;\n    showPriority;\n    showAttributeElementId;\n    ignoreRoot;\n    sameSelectionCharacters;\n    renderUIElements;\n    renderRawElements;\n    domConverter;\n    /**\n\t * Creates a view stringify instance.\n\t *\n\t * @param selection A selection whose ranges should also be converted to a string.\n\t * @param options An options object.\n\t * @param options.showType When set to `true`, the type of elements will be printed (`<container:p>`\n\t * instead of `<p>`, `<attribute:b>` instead of `<b>` and `<empty:img>` instead of `<img>`).\n\t * @param options.showPriority When set to `true`, the attribute element's priority will be printed.\n\t * @param options.ignoreRoot When set to `true`, the root's element opening and closing tag will not\n\t * be outputted.\n\t * @param options.sameSelectionCharacters When set to `true`, the selection inside the text is marked as\n\t * `{` and `}` and the selection outside the text as `[` and `]`. When set to `false`, both are marked as `[` and `]`.\n\t * @param options.renderUIElements When set to `true`, the inner content of each\n\t * {@link module:engine/view/uielement~UIElement} will be printed.\n\t * @param options.renderRawElements When set to `true`, the inner content of each\n\t * @param options.domConverter When set to an actual {@link module:engine/view/domconverter~DomConverter DomConverter}\n\t * instance, it lets the conversion go through exactly the same flow the editing view is going through,\n\t * i.e. with view data filtering. Otherwise the simple stub is used.\n\t * {@link module:engine/view/rawelement~RawElement} will be printed.\n\t */ constructor(root, selection, options){\n        this.root = root;\n        this.selection = selection;\n        this.ranges = [];\n        if (selection) {\n            this.ranges = [\n                ...selection.getRanges()\n            ];\n        }\n        this.showType = !!options.showType;\n        this.showPriority = !!options.showPriority;\n        this.showAttributeElementId = !!options.showAttributeElementId;\n        this.ignoreRoot = !!options.ignoreRoot;\n        this.sameSelectionCharacters = !!options.sameSelectionCharacters;\n        this.renderUIElements = !!options.renderUIElements;\n        this.renderRawElements = !!options.renderRawElements;\n        this.domConverter = options.domConverter || domConverterStub;\n    }\n    /**\n\t * Converts the view to a string.\n\t *\n\t * @returns String representation of the view elements.\n\t */ stringify() {\n        let result = '';\n        this._walkView(this.root, (chunk)=>{\n            result += chunk;\n        });\n        return result;\n    }\n    /**\n\t * Executes a simple walker that iterates over all elements in the view tree starting from the root element.\n\t * Calls the `callback` with parsed chunks of string data.\n\t */ _walkView(root, callback) {\n        const ignore = this.ignoreRoot && this.root === root;\n        if (root.is('element') || root.is('documentFragment')) {\n            if (root.is('element') && !ignore) {\n                callback(this._stringifyElementOpen(root));\n            }\n            if (this.renderUIElements && root.is('uiElement')) {\n                callback(root.render(document, this.domConverter).innerHTML);\n            } else if (this.renderRawElements && root.is('rawElement')) {\n                // There's no DOM element for \"root\" to pass to render(). Creating\n                // a surrogate container to render the children instead.\n                const rawContentContainer = document.createElement('div');\n                root.render(rawContentContainer, this.domConverter);\n                callback(rawContentContainer.innerHTML);\n            } else {\n                let offset = 0;\n                callback(this._stringifyElementRanges(root, offset));\n                for (const child of root.getChildren()){\n                    this._walkView(child, callback);\n                    offset++;\n                    callback(this._stringifyElementRanges(root, offset));\n                }\n            }\n            if (root.is('element') && !ignore) {\n                callback(this._stringifyElementClose(root));\n            }\n        }\n        if (root.is('$text')) {\n            callback(this._stringifyTextRanges(root));\n        }\n    }\n    /**\n\t * Checks if a given {@link module:engine/view/element~Element element} has a {@link module:engine/view/range~Range#start range start}\n\t * or a {@link module:engine/view/range~Range#start range end} placed at a given offset and returns its string representation.\n\t */ _stringifyElementRanges(element, offset) {\n        let start = '';\n        let end = '';\n        let collapsed = '';\n        for (const range of this.ranges){\n            if (range.start.parent == element && range.start.offset === offset) {\n                if (range.isCollapsed) {\n                    collapsed += ELEMENT_RANGE_START_TOKEN + ELEMENT_RANGE_END_TOKEN;\n                } else {\n                    start += ELEMENT_RANGE_START_TOKEN;\n                }\n            }\n            if (range.end.parent === element && range.end.offset === offset && !range.isCollapsed) {\n                end += ELEMENT_RANGE_END_TOKEN;\n            }\n        }\n        return end + collapsed + start;\n    }\n    /**\n\t * Checks if a given {@link module:engine/view/element~Element Text node} has a\n\t * {@link module:engine/view/range~Range#start range start} or a\n\t * {@link module:engine/view/range~Range#start range end} placed somewhere inside. Returns a string representation of text\n\t * with range delimiters placed inside.\n\t */ _stringifyTextRanges(node) {\n        const length = node.data.length;\n        const data = node.data.split('');\n        let rangeStartToken, rangeEndToken;\n        if (this.sameSelectionCharacters) {\n            rangeStartToken = ELEMENT_RANGE_START_TOKEN;\n            rangeEndToken = ELEMENT_RANGE_END_TOKEN;\n        } else {\n            rangeStartToken = TEXT_RANGE_START_TOKEN;\n            rangeEndToken = TEXT_RANGE_END_TOKEN;\n        }\n        // Add one more element for ranges ending after last character in text.\n        data[length] = '';\n        // Represent each letter as object with information about opening/closing ranges at each offset.\n        const result = data.map((letter)=>{\n            return {\n                letter,\n                start: '',\n                end: '',\n                collapsed: ''\n            };\n        });\n        for (const range of this.ranges){\n            const start = range.start;\n            const end = range.end;\n            if (start.parent == node && start.offset >= 0 && start.offset <= length) {\n                if (range.isCollapsed) {\n                    result[end.offset].collapsed += rangeStartToken + rangeEndToken;\n                } else {\n                    result[start.offset].start += rangeStartToken;\n                }\n            }\n            if (end.parent == node && end.offset >= 0 && end.offset <= length && !range.isCollapsed) {\n                result[end.offset].end += rangeEndToken;\n            }\n        }\n        return result.map((item)=>item.end + item.collapsed + item.start + item.letter).join('');\n    }\n    /**\n\t * Converts the passed {@link module:engine/view/element~Element element} to an opening tag.\n\t *\n\t * Depending on the current configuration, the opening tag can be simple (`<a>`), contain a type prefix (`<container:p>`,\n\t * `<attribute:a>` or `<empty:img>`), contain priority information ( `<attribute:a view-priority=\"20\">` ),\n\t * or contain element id ( `<attribute:span view-id=\"foo\">` ). Element attributes will also be included\n\t * (`<a href=\"https://ckeditor.com\" name=\"foobar\">`).\n\t */ _stringifyElementOpen(element) {\n        const priority = this._stringifyElementPriority(element);\n        const id = this._stringifyElementId(element);\n        const type = this._stringifyElementType(element);\n        const name = [\n            type,\n            element.name\n        ].filter((i)=>i !== '').join(':');\n        const attributes = this._stringifyElementAttributes(element);\n        const parts = [\n            name,\n            priority,\n            id,\n            attributes\n        ];\n        return `<${parts.filter((i)=>i !== '').join(' ')}>`;\n    }\n    /**\n\t * Converts the passed {@link module:engine/view/element~Element element} to a closing tag.\n\t * Depending on the current configuration, the closing tag can be simple (`</a>`) or contain a type prefix (`</container:p>`,\n\t * `</attribute:a>` or `</empty:img>`).\n\t */ _stringifyElementClose(element) {\n        const type = this._stringifyElementType(element);\n        const name = [\n            type,\n            element.name\n        ].filter((i)=>i !== '').join(':');\n        return `</${name}>`;\n    }\n    /**\n\t * Converts the passed {@link module:engine/view/element~Element element's} type to its string representation\n\t *\n\t * Returns:\n\t * * 'attribute' for {@link module:engine/view/attributeelement~AttributeElement attribute elements},\n\t * * 'container' for {@link module:engine/view/containerelement~ContainerElement container elements},\n\t * * 'empty' for {@link module:engine/view/emptyelement~EmptyElement empty elements},\n\t * * 'ui' for {@link module:engine/view/uielement~UIElement UI elements},\n\t * * 'raw' for {@link module:engine/view/rawelement~RawElement raw elements},\n\t * * an empty string when the current configuration is preventing showing elements' types.\n\t */ _stringifyElementType(element) {\n        if (this.showType) {\n            for(const type in allowedTypes){\n                if (element instanceof allowedTypes[type]) {\n                    return type;\n                }\n            }\n        }\n        return '';\n    }\n    /**\n\t * Converts the passed {@link module:engine/view/element~Element element} to its priority representation.\n\t *\n\t * The priority string representation will be returned when the passed element is an instance of\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute element} and the current configuration allows to show the\n\t * priority. Otherwise returns an empty string.\n\t */ _stringifyElementPriority(element) {\n        if (this.showPriority && element.is('attributeElement')) {\n            return `view-priority=\"${element.priority}\"`;\n        }\n        return '';\n    }\n    /**\n\t * Converts the passed {@link module:engine/view/element~Element element} to its id representation.\n\t *\n\t * The id string representation will be returned when the passed element is an instance of\n\t * {@link module:engine/view/attributeelement~AttributeElement attribute element}, the element has an id\n\t * and the current configuration allows to show the id. Otherwise returns an empty string.\n\t */ _stringifyElementId(element) {\n        if (this.showAttributeElementId && element.is('attributeElement') && element.id) {\n            return `view-id=\"${element.id}\"`;\n        }\n        return '';\n    }\n    /**\n\t * Converts the passed {@link module:engine/view/element~Element element} attributes to their string representation.\n\t * If an element has no attributes, an empty string is returned.\n\t */ _stringifyElementAttributes(element) {\n        const attributes = [];\n        const keys = [\n            ...element.getAttributeKeys()\n        ].sort();\n        for (const attribute of keys){\n            let attributeValue;\n            if (attribute === 'class') {\n                attributeValue = [\n                    ...element.getClassNames()\n                ].sort().join(' ');\n            } else if (attribute === 'style') {\n                attributeValue = [\n                    ...element.getStyleNames()\n                ].sort().map((style)=>`${style}:${element.getStyle(style).replace(/\"/g, '&quot;')}`).join(';');\n            } else {\n                attributeValue = element.getAttribute(attribute);\n            }\n            attributes.push(`${attribute}=\"${attributeValue}\"`);\n        }\n        return attributes.join(' ');\n    }\n}\n/**\n * Converts {@link module:engine/view/element~Element elements} to\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements},\n * {@link module:engine/view/containerelement~ContainerElement container elements},\n * {@link module:engine/view/emptyelement~EmptyElement empty elements} or\n * {@link module:engine/view/uielement~UIElement UI elements}.\n * It converts the whole tree starting from the `rootNode`. The conversion is based on element names.\n * See the `_convertElement` method for more details.\n *\n * @param rootNode The root node to convert.\n * @returns The root node of converted elements.\n */ function _convertViewElements(rootNode) {\n    if (rootNode.is('element') || rootNode.is('documentFragment')) {\n        // Convert element or leave document fragment.\n        const convertedElement = rootNode.is('documentFragment') ? new DocumentFragment$1(rootNode.document) : _convertElement(rootNode.document, rootNode);\n        // Convert all child nodes.\n        // Cache the nodes in array. Otherwise, we would skip some nodes because during iteration we move nodes\n        // from `rootNode` to `convertedElement`. This would interfere with iteration.\n        for (const child of [\n            ...rootNode.getChildren()\n        ]){\n            if (convertedElement.is('emptyElement')) {\n                throw new Error('Parse error - cannot parse inside EmptyElement.');\n            } else if (convertedElement.is('uiElement')) {\n                throw new Error('Parse error - cannot parse inside UIElement.');\n            } else if (convertedElement.is('rawElement')) {\n                throw new Error('Parse error - cannot parse inside RawElement.');\n            }\n            convertedElement._appendChild(_convertViewElements(child));\n        }\n        return convertedElement;\n    }\n    return rootNode;\n}\n/**\n * Converts an {@link module:engine/view/element~Element element} to\n * {@link module:engine/view/attributeelement~AttributeElement attribute element},\n * {@link module:engine/view/containerelement~ContainerElement container element},\n * {@link module:engine/view/emptyelement~EmptyElement empty element} or\n * {@link module:engine/view/uielement~UIElement UI element}.\n * If the element's name is in the format of `attribute:b`, it will be converted to\n * an {@link module:engine/view/attributeelement~AttributeElement attribute element} with a priority of 11.\n * Additionally, attribute elements may have specified priority (for example `view-priority=\"11\"`) and/or\n * id (for example `view-id=\"foo\"`).\n * If the element's name is in the format of `container:p`, it will be converted to\n * a {@link module:engine/view/containerelement~ContainerElement container element}.\n * If the element's name is in the format of `empty:img`, it will be converted to\n * an {@link module:engine/view/emptyelement~EmptyElement empty element}.\n * If the element's name is in the format of `ui:span`, it will be converted to\n * a {@link module:engine/view/uielement~UIElement UI element}.\n * If the element's name does not contain any additional information, a {@link module:engine/view/element~Element view Element} will be\n * returned.\n *\n * @param viewElement A view element to convert.\n * @returns A tree view element converted according to its name.\n */ function _convertElement(viewDocument, viewElement) {\n    const info = _convertElementNameAndInfo(viewElement);\n    const ElementConstructor = allowedTypes[info.type];\n    const newElement = ElementConstructor ? new ElementConstructor(viewDocument, info.name) : new Element$1(viewDocument, info.name);\n    if (newElement.is('attributeElement')) {\n        if (info.priority !== null) {\n            newElement._priority = info.priority;\n        }\n        if (info.id !== null) {\n            newElement._id = info.id;\n        }\n    }\n    // Move attributes.\n    for (const attributeKey of viewElement.getAttributeKeys()){\n        newElement._setAttribute(attributeKey, viewElement.getAttribute(attributeKey));\n    }\n    return newElement;\n}\n/**\n * Converts the `view-priority` attribute and the {@link module:engine/view/element~Element#name element's name} information needed for\n * creating {@link module:engine/view/attributeelement~AttributeElement attribute element},\n * {@link module:engine/view/containerelement~ContainerElement container element},\n * {@link module:engine/view/emptyelement~EmptyElement empty element} or\n * {@link module:engine/view/uielement~UIElement UI element}.\n * The name can be provided in two formats: as a simple element's name (`div`), or as a type and name (`container:div`,\n * `attribute:span`, `empty:img`, `ui:span`);\n *\n * @param viewElement The element whose name should be converted.\n * @returns An object with parsed information:\n * * `name` The parsed name of the element.\n * * `type` The parsed type of the element. It can be `attribute`, `container` or `empty`.\n * * `priority` The parsed priority of the element.\n */ function _convertElementNameAndInfo(viewElement) {\n    const parts = viewElement.name.split(':');\n    const priority = _convertPriority(viewElement.getAttribute('view-priority'));\n    const id = viewElement.hasAttribute('view-id') ? viewElement.getAttribute('view-id') : null;\n    viewElement._removeAttribute('view-priority');\n    viewElement._removeAttribute('view-id');\n    if (parts.length == 1) {\n        return {\n            name: parts[0],\n            type: priority !== null ? 'attribute' : null,\n            priority,\n            id\n        };\n    }\n    // Check if type and name: container:div.\n    const type = _convertType(parts[0]);\n    if (type) {\n        return {\n            name: parts[1],\n            type,\n            priority,\n            id\n        };\n    }\n    throw new Error(`Parse error - cannot parse element's name: ${viewElement.name}.`);\n}\n/**\n * Checks if the element's type is allowed. Returns `attribute`, `container`, `empty` or `null`.\n */ function _convertType(type) {\n    return type in allowedTypes ? type : null;\n}\n/**\n * Checks if a given priority is allowed. Returns null if the priority cannot be converted.\n */ function _convertPriority(priorityString) {\n    const priority = parseInt(priorityString, 10);\n    if (!isNaN(priority)) {\n        return priority;\n    }\n    return null;\n}\n\n/**\n * Writes the content of a model {@link module:engine/model/document~Document document} to an HTML-like string.\n *\n * ```ts\n * getData( editor.model ); // -> '<paragraph>Foo![]</paragraph>'\n * ```\n *\n * **Note:** A {@link module:engine/model/text~Text text} node that contains attributes will be represented as:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * **Note:** Using this tool in production-grade code is not recommended. It was designed for development, prototyping,\n * debugging and testing.\n *\n * @param options.withoutSelection Whether to write the selection. When set to `true`, the selection will\n * not be included in the returned string.\n * @param options.rootName The name of the root from which the data should be stringified. If not provided,\n * the default `main` name will be used.\n * @param options.convertMarkers Whether to include markers in the returned string.\n * @returns The stringified data.\n */ function getData(model, options = {}) {\n    if (!(model instanceof Model)) {\n        throw new TypeError('Model needs to be an instance of module:engine/model/model~Model.');\n    }\n    const rootName = options.rootName || 'main';\n    const root = model.document.getRoot(rootName);\n    return getData._stringify(root, options.withoutSelection ? null : model.document.selection, options.convertMarkers ? model.markers : null);\n}\n// Set stringify as getData private method - needed for testing/spying.\ngetData._stringify = stringify;\n/**\n * Sets the content of a model {@link module:engine/model/document~Document document} provided as an HTML-like string.\n *\n * ```ts\n * setData( editor.model, '<paragraph>Foo![]</paragraph>' );\n * ```\n *\n * **Note:** Remember to register elements in the {@link module:engine/model/model~Model#schema model's schema} before\n * trying to use them.\n *\n * **Note:** To create a {@link module:engine/model/text~Text text} node that contains attributes use:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * **Note:** Using this tool in production-grade code is not recommended. It was designed for development, prototyping,\n * debugging and testing.\n *\n * @param data HTML-like string to write into the document.\n * @param options.rootName Root name where parsed data will be stored. If not provided, the default `main`\n * name will be used.\n * @param options.selectionAttributes A list of attributes which will be passed to the selection.\n * @param options.lastRangeBackward If set to `true`, the last range will be added as backward.\n * @param options.batchType Batch type used for inserting elements. See {@link module:engine/model/batch~Batch#constructor}.\n * See {@link module:engine/model/batch~Batch#type}.\n */ function setData(model, data, options = {}) {\n    if (!(model instanceof Model)) {\n        throw new TypeError('Model needs to be an instance of module:engine/model/model~Model.');\n    }\n    let modelDocumentFragment;\n    let selection = null;\n    const modelRoot = model.document.getRoot(options.rootName || 'main');\n    // Parse data string to model.\n    const parsedResult = setData._parse(data, model.schema, {\n        lastRangeBackward: options.lastRangeBackward,\n        selectionAttributes: options.selectionAttributes,\n        context: [\n            modelRoot.name\n        ],\n        inlineObjectElements: options.inlineObjectElements\n    });\n    // Retrieve DocumentFragment and Selection from parsed model.\n    if ('model' in parsedResult) {\n        modelDocumentFragment = parsedResult.model;\n        selection = parsedResult.selection;\n    } else {\n        modelDocumentFragment = parsedResult;\n    }\n    if (options.batchType !== undefined) {\n        model.enqueueChange(options.batchType, writeToModel);\n    } else {\n        model.change(writeToModel);\n    }\n    function writeToModel(writer) {\n        // Replace existing model in document by new one.\n        writer.remove(writer.createRangeIn(modelRoot));\n        writer.insert(modelDocumentFragment, modelRoot);\n        // Clean up previous document selection.\n        writer.setSelection(null);\n        writer.removeSelectionAttribute(model.document.selection.getAttributeKeys());\n        // Update document selection if specified.\n        if (selection) {\n            const ranges = [];\n            for (const range of selection.getRanges()){\n                const start = new Position(modelRoot, range.start.path);\n                const end = new Position(modelRoot, range.end.path);\n                ranges.push(new Range(start, end));\n            }\n            writer.setSelection(ranges, {\n                backward: selection.isBackward\n            });\n            if (options.selectionAttributes) {\n                writer.setSelectionAttribute(selection.getAttributes());\n            }\n        }\n    }\n}\n// Set parse as setData private method - needed for testing/spying.\nsetData._parse = parse;\n/**\n * Converts model nodes to HTML-like string representation.\n *\n * **Note:** A {@link module:engine/model/text~Text text} node that contains attributes will be represented as:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * @param node A node to stringify.\n * @param selectionOrPositionOrRange A selection instance whose ranges will be included in the returned string data.\n * If a range instance is provided, it will be converted to a selection containing this range. If a position instance\n * is provided, it will be converted to a selection containing one range collapsed at this position.\n * @param markers Markers to include.\n * @returns An HTML-like string representing the model.\n */ function stringify(node, selectionOrPositionOrRange = null, markers = null) {\n    const model = new Model();\n    const mapper = new Mapper();\n    let selection = null;\n    let range;\n    // Create a range witch wraps passed node.\n    if (node instanceof RootElement || node instanceof DocumentFragment) {\n        range = model.createRangeIn(node);\n    } else {\n        // Node is detached - create new document fragment.\n        if (!node.parent) {\n            const fragment = new DocumentFragment(node);\n            range = model.createRangeIn(fragment);\n        } else {\n            range = new Range(model.createPositionBefore(node), model.createPositionAfter(node));\n        }\n    }\n    // Get selection from passed selection or position or range if at least one is specified.\n    if (selectionOrPositionOrRange instanceof Selection) {\n        selection = selectionOrPositionOrRange;\n    } else if (selectionOrPositionOrRange instanceof DocumentSelection) {\n        selection = selectionOrPositionOrRange;\n    } else if (selectionOrPositionOrRange instanceof Range) {\n        selection = new Selection(selectionOrPositionOrRange);\n    } else if (selectionOrPositionOrRange instanceof Position) {\n        selection = new Selection(selectionOrPositionOrRange);\n    }\n    // Set up conversion.\n    // Create a temporary view controller.\n    const stylesProcessor = new StylesProcessor();\n    const view = new View(stylesProcessor);\n    const viewDocument = view.document;\n    const viewRoot = new RootEditableElement(viewDocument, 'div');\n    // Create a temporary root element in view document.\n    viewRoot.rootName = 'main';\n    viewDocument.roots.add(viewRoot);\n    // Create and setup downcast dispatcher.\n    const downcastDispatcher = new DowncastDispatcher({\n        mapper,\n        schema: model.schema\n    });\n    // Bind root elements.\n    mapper.bindElements(node.root, viewRoot);\n    downcastDispatcher.on('insert:$text', insertText());\n    downcastDispatcher.on('insert', insertAttributesAndChildren(), {\n        priority: 'lowest'\n    });\n    downcastDispatcher.on('attribute', (evt, data, conversionApi)=>{\n        if (data.item instanceof Selection || data.item instanceof DocumentSelection || data.item.is('$textProxy')) {\n            const converter = wrap((modelAttributeValue, { writer })=>{\n                return writer.createAttributeElement('model-text-with-attributes', {\n                    [data.attributeKey]: stringifyAttributeValue(modelAttributeValue)\n                });\n            });\n            converter(evt, data, conversionApi);\n        }\n    });\n    downcastDispatcher.on('insert', insertElement((modelItem)=>{\n        // Stringify object types values for properly display as an output string.\n        const attributes = convertAttributes(modelItem.getAttributes(), stringifyAttributeValue);\n        return new ContainerElement(viewDocument, modelItem.name, attributes);\n    }));\n    downcastDispatcher.on('selection', convertRangeSelection());\n    downcastDispatcher.on('selection', convertCollapsedSelection());\n    downcastDispatcher.on('addMarker', insertUIElement((data, { writer })=>{\n        const name = data.markerName + ':' + (data.isOpening ? 'start' : 'end');\n        return writer.createUIElement(name);\n    }));\n    const markersMap = new Map();\n    if (markers) {\n        // To provide stable results, sort markers by name.\n        for (const marker of Array.from(markers).sort((a, b)=>a.name < b.name ? 1 : -1)){\n            markersMap.set(marker.name, marker.getRange());\n        }\n    }\n    // Convert model to view.\n    const writer = view._writer;\n    downcastDispatcher.convert(range, markersMap, writer);\n    // Convert model selection to view selection.\n    if (selection) {\n        downcastDispatcher.convertSelection(selection, markers || model.markers, writer);\n    }\n    // Parse view to data string.\n    let data = stringify$1(viewRoot, viewDocument.selection, {\n        sameSelectionCharacters: true\n    });\n    // Removing unnecessary <div> and </div> added because `viewRoot` was also stringified alongside input data.\n    data = data.substr(5, data.length - 11);\n    view.destroy();\n    // Replace valid XML `model-text-with-attributes` element name to `$text`.\n    return data.replace(new RegExp('model-text-with-attributes', 'g'), '$text');\n}\n/**\n * Parses an HTML-like string and returns the model {@link module:engine/model/rootelement~RootElement rootElement}.\n *\n * **Note:** To create a {@link module:engine/model/text~Text text} node that contains attributes use:\n *\n * ```xml\n * <$text attribute=\"value\">Text data</$text>\n * ```\n *\n * @param data HTML-like string to be parsed.\n * @param schema A schema instance used by converters for element validation.\n * @param options Additional configuration.\n * @param options.selectionAttributes A list of attributes which will be passed to the selection.\n * @param options.lastRangeBackward If set to `true`, the last range will be added as backward.\n * @param options.context The conversion context. If not provided, the default `'$root'` will be used.\n * @returns Returns the parsed model node or an object with two fields: `model` and `selection`,\n * when selection ranges were included in the data to parse.\n */ function parse(data, schema, options = {}) {\n    const mapper = new Mapper();\n    // Replace not accepted by XML `$text` tag name by valid one `model-text-with-attributes`.\n    data = data.replace(new RegExp('\\\\$text', 'g'), 'model-text-with-attributes');\n    // Parse data to view using view utils.\n    const parsedResult = parse$1(data, {\n        sameSelectionCharacters: true,\n        lastRangeBackward: !!options.lastRangeBackward,\n        inlineObjectElements: options.inlineObjectElements\n    });\n    // Retrieve DocumentFragment and Selection from parsed view.\n    let viewDocumentFragment;\n    let viewSelection = null;\n    let selection = null;\n    if ('view' in parsedResult && 'selection' in parsedResult) {\n        viewDocumentFragment = parsedResult.view;\n        viewSelection = parsedResult.selection;\n    } else {\n        viewDocumentFragment = parsedResult;\n    }\n    // Set up upcast dispatcher.\n    const modelController = new Model();\n    const upcastDispatcher = new UpcastDispatcher({\n        schema\n    });\n    upcastDispatcher.on('documentFragment', convertToModelFragment(mapper));\n    upcastDispatcher.on('element:model-text-with-attributes', convertToModelText());\n    upcastDispatcher.on('element', convertToModelElement(mapper));\n    upcastDispatcher.on('text', convertToModelText());\n    // Convert view to model.\n    let model = modelController.change((writer)=>upcastDispatcher.convert(viewDocumentFragment.root, writer, options.context || '$root'));\n    mapper.bindElements(model, viewDocumentFragment.root);\n    // If root DocumentFragment contains only one element - return that element.\n    if (model.childCount == 1) {\n        model = model.getChild(0);\n    }\n    // Convert view selection to model selection.\n    if (viewSelection) {\n        const ranges = [];\n        // Convert ranges.\n        for (const viewRange of viewSelection.getRanges()){\n            ranges.push(mapper.toModelRange(viewRange));\n        }\n        // Create new selection.\n        selection = new Selection(ranges, {\n            backward: viewSelection.isBackward\n        });\n        // Set attributes to selection if specified.\n        for (const [key, value] of toMap(options.selectionAttributes || [])){\n            selection.setAttribute(key, value);\n        }\n    }\n    // Return model end selection when selection was specified.\n    if (selection) {\n        return {\n            model,\n            selection\n        };\n    }\n    // Otherwise return model only.\n    return model;\n}\n// -- Converters view -> model -----------------------------------------------------\nfunction convertToModelFragment(mapper) {\n    return (evt, data, conversionApi)=>{\n        const childrenResult = conversionApi.convertChildren(data.viewItem, data.modelCursor);\n        mapper.bindElements(data.modelCursor.parent, data.viewItem);\n        data = Object.assign(data, childrenResult);\n        evt.stop();\n    };\n}\nfunction convertToModelElement(mapper) {\n    return (evt, data, conversionApi)=>{\n        const elementName = data.viewItem.name;\n        if (!conversionApi.schema.checkChild(data.modelCursor, elementName)) {\n            throw new Error(`Element '${elementName}' was not allowed in given position.`);\n        }\n        // View attribute value is a string so we want to typecast it to the original type.\n        // E.g. `bold=\"true\"` - value will be parsed from string `\"true\"` to boolean `true`.\n        const attributes = convertAttributes(data.viewItem.getAttributes(), parseAttributeValue);\n        const element = conversionApi.writer.createElement(data.viewItem.name, attributes);\n        conversionApi.writer.insert(element, data.modelCursor);\n        mapper.bindElements(element, data.viewItem);\n        conversionApi.convertChildren(data.viewItem, element);\n        data.modelRange = Range._createOn(element);\n        data.modelCursor = data.modelRange.end;\n        evt.stop();\n    };\n}\nfunction convertToModelText() {\n    return (evt, data, conversionApi)=>{\n        if (!conversionApi.schema.checkChild(data.modelCursor, '$text')) {\n            throw new Error('Text was not allowed in given position.');\n        }\n        let node;\n        if (data.viewItem.is('element')) {\n            // View attribute value is a string so we want to typecast it to the original type.\n            // E.g. `bold=\"true\"` - value will be parsed from string `\"true\"` to boolean `true`.\n            const attributes = convertAttributes(data.viewItem.getAttributes(), parseAttributeValue);\n            const viewText = data.viewItem.getChild(0);\n            node = conversionApi.writer.createText(viewText.data, attributes);\n        } else {\n            node = conversionApi.writer.createText(data.viewItem.data);\n        }\n        conversionApi.writer.insert(node, data.modelCursor);\n        data.modelRange = Range._createFromPositionAndShift(data.modelCursor, node.offsetSize);\n        data.modelCursor = data.modelRange.end;\n        evt.stop();\n    };\n}\n// Tries to get original type of attribute value using JSON parsing:\n//\n//\t\t`'true'` => `true`\n//\t\t`'1'` => `1`\n//\t\t`'{\"x\":1,\"y\":2}'` => `{ x: 1, y: 2 }`\n//\n// Parse error means that value should be a string:\n//\n//\t\t`'foobar'` => `'foobar'`\nfunction parseAttributeValue(attribute) {\n    try {\n        return JSON.parse(attribute);\n    } catch (e) {\n        return attribute;\n    }\n}\n// When value is an Object stringify it.\nfunction stringifyAttributeValue(data) {\n    if (isPlainObject(data)) {\n        return JSON.stringify(data);\n    }\n    return data;\n}\n// Loop trough attributes map and converts each value by passed converter.\nfunction* convertAttributes(attributes, converter) {\n    for (const [key, value] of attributes){\n        yield [\n            key,\n            converter(value)\n        ];\n    }\n}\n\nexport { AttributeElement, AttributeOperation, BubblingEventInfo, ClickObserver, Conversion, DataController, DataTransfer, DocumentFragment, DocumentSelection, DomConverter, DomEventData, DomEventObserver, DowncastWriter, EditingController, View as EditingView, Element, FocusObserver, History, HtmlDataProcessor, InsertOperation, LivePosition, LiveRange, MarkerOperation, Matcher, MergeOperation, Model, MouseObserver, MoveOperation, NoOperation, Observer, OperationFactory, Position, Range, RenameOperation, Renderer, RootAttributeOperation, RootOperation, SplitOperation, StylesMap, StylesProcessor, TabObserver, Text, TextProxy, TreeWalker, UpcastWriter, AttributeElement as ViewAttributeElement, ContainerElement as ViewContainerElement, Document$1 as ViewDocument, DocumentFragment$1 as ViewDocumentFragment, EditableElement as ViewEditableElement, Element$1 as ViewElement, EmptyElement as ViewEmptyElement, RawElement as ViewRawElement, RootEditableElement as ViewRootEditableElement, Text$1 as ViewText, TreeWalker$1 as ViewTreeWalker, UIElement as ViewUIElement, XmlDataProcessor, getData as _getModelData, getData$1 as _getViewData, parse as _parseModel, parse$1 as _parseView, setData as _setModelData, setData$1 as _setViewData, stringify as _stringifyModel, stringify$1 as _stringifyView, addBackgroundRules, addBorderRules, addMarginRules, addPaddingRules, autoParagraphEmptyRoots, disablePlaceholder, enablePlaceholder, getBoxSidesShorthandValue, getBoxSidesValueReducer, getBoxSidesValues, getFillerOffset$4 as getFillerOffset, getPositionShorthandNormalizer, getShorthandValues, hidePlaceholder, isAttachment, isColor, isLength, isLineStyle, isParagraphable, isPercentage, isPosition, isRepeat, isURL, needsPlaceholder, showPlaceholder, transformSets, wrapInParagraph };\n//# sourceMappingURL=index.js.map\n","import baseUnset from './_baseUnset.js';\n\n/**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\nfunction unset(object, path) {\n  return object == null ? true : baseUnset(object, path);\n}\n\nexport default unset;\n","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n *   return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n *   if (isGreeting(objValue) && isGreeting(othValue)) {\n *     return true;\n *   }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\nfunction isEqualWith(value, other, customizer) {\n  customizer = typeof customizer == 'function' ? customizer : undefined;\n  var result = customizer ? customizer(value, other) : undefined;\n  return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n}\n\nexport default isEqualWith;\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\nexport default throttle;\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { throttle, isElement, cloneDeepWith } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module watchdog/watchdog\n */ /* globals window */ // eslint-disable-next-line ckeditor5-rules/no-cross-package-imports\n/**\n * An abstract watchdog class that handles most of the error handling process and the state of the underlying component.\n *\n * See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and how to use it.\n *\n * @internal\n */ class Watchdog {\n    /**\n\t * An array of crashes saved as an object with the following properties:\n\t *\n\t * * `message`: `String`,\n\t * * `stack`: `String`,\n\t * * `date`: `Number`,\n\t * * `filename`: `String | undefined`,\n\t * * `lineno`: `Number | undefined`,\n\t * * `colno`: `Number | undefined`,\n\t */ crashes = [];\n    /**\n\t * Specifies the state of the item watched by the watchdog. The state can be one of the following values:\n\t *\n\t * * `initializing` &ndash; Before the first initialization, and after crashes, before the item is ready.\n\t * * `ready` &ndash; A state when the user can interact with the item.\n\t * * `crashed` &ndash; A state when an error occurs. It quickly changes to `initializing` or `crashedPermanently`\n\t * depending on how many and how frequent errors have been caught recently.\n\t * * `crashedPermanently` &ndash; A state when the watchdog stops reacting to errors and keeps the item it is watching crashed,\n\t * * `destroyed` &ndash; A state when the item is manually destroyed by the user after calling `watchdog.destroy()`.\n\t */ state = 'initializing';\n    /**\n\t * @see module:watchdog/watchdog~WatchdogConfig\n\t */ _crashNumberLimit;\n    /**\n\t * Returns the result of the `Date.now()` call. It can be overridden in tests to mock time as some popular\n\t * approaches like `sinon.useFakeTimers()` do not work well with error handling.\n\t */ _now = Date.now;\n    /**\n\t * @see module:watchdog/watchdog~WatchdogConfig\n\t */ _minimumNonErrorTimePeriod;\n    /**\n\t * Checks if the event error comes from the underlying item and restarts the item.\n\t */ _boundErrorHandler;\n    /**\n\t * A dictionary of event emitter listeners.\n\t */ _listeners;\n    /**\n\t * @param {module:watchdog/watchdog~WatchdogConfig} config The watchdog plugin configuration.\n\t */ constructor(config){\n        this.crashes = [];\n        this._crashNumberLimit = typeof config.crashNumberLimit === 'number' ? config.crashNumberLimit : 3;\n        this._minimumNonErrorTimePeriod = typeof config.minimumNonErrorTimePeriod === 'number' ? config.minimumNonErrorTimePeriod : 5000;\n        this._boundErrorHandler = (evt)=>{\n            // `evt.error` is exposed by EventError while `evt.reason` is available in PromiseRejectionEvent.\n            const error = 'error' in evt ? evt.error : evt.reason;\n            // Note that `evt.reason` might be everything that is in the promise rejection.\n            // Similarly everything that is thrown lands in `evt.error`.\n            if (error instanceof Error) {\n                this._handleError(error, evt);\n            }\n        };\n        this._listeners = {};\n        if (!this._restart) {\n            throw new Error('The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. ' + 'Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.');\n        }\n    }\n    /**\n\t * Destroys the watchdog and releases the resources.\n\t */ destroy() {\n        this._stopErrorHandling();\n        this._listeners = {};\n    }\n    /**\n\t * Starts listening to a specific event name by registering a callback that will be executed\n\t * whenever an event with a given name fires.\n\t *\n\t * Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t *\n\t * @param eventName The event name.\n\t * @param callback A callback which will be added to event listeners.\n\t */ on(eventName, callback) {\n        if (!this._listeners[eventName]) {\n            this._listeners[eventName] = [];\n        }\n        this._listeners[eventName].push(callback);\n    }\n    /**\n\t * Stops listening to the specified event name by removing the callback from event listeners.\n\t *\n\t * Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t *\n\t * @param eventName The event name.\n\t * @param callback A callback which will be removed from event listeners.\n\t */ off(eventName, callback) {\n        this._listeners[eventName] = this._listeners[eventName].filter((cb)=>cb !== callback);\n    }\n    /**\n\t * Fires an event with a given event name and arguments.\n\t *\n\t * Note that this method differs from the CKEditor 5's default `EventEmitterMixin` implementation.\n\t */ _fire(eventName, ...args) {\n        const callbacks = this._listeners[eventName] || [];\n        for (const callback of callbacks){\n            callback.apply(this, [\n                null,\n                ...args\n            ]);\n        }\n    }\n    /**\n\t * Starts error handling by attaching global error handlers.\n\t */ _startErrorHandling() {\n        window.addEventListener('error', this._boundErrorHandler);\n        window.addEventListener('unhandledrejection', this._boundErrorHandler);\n    }\n    /**\n\t * Stops error handling by detaching global error handlers.\n\t */ _stopErrorHandling() {\n        window.removeEventListener('error', this._boundErrorHandler);\n        window.removeEventListener('unhandledrejection', this._boundErrorHandler);\n    }\n    /**\n\t * Checks if an error comes from the watched item and restarts it.\n\t * It reacts to {@link module:utils/ckeditorerror~CKEditorError `CKEditorError` errors} only.\n\t *\n\t * @fires error\n\t * @param error Error.\n\t * @param evt An error event.\n\t */ _handleError(error, evt) {\n        // @if CK_DEBUG // const err = error as CKEditorError;\n        // @if CK_DEBUG // if ( err.is && err.is( 'CKEditorError' ) && err.context === undefined ) {\n        // @if CK_DEBUG // console.warn( 'The error is missing its context and Watchdog cannot restart the proper item.' );\n        // @if CK_DEBUG // }\n        if (this._shouldReactToError(error)) {\n            this.crashes.push({\n                message: error.message,\n                stack: error.stack,\n                // `evt.filename`, `evt.lineno` and `evt.colno` are available only in ErrorEvent events\n                filename: evt instanceof ErrorEvent ? evt.filename : undefined,\n                lineno: evt instanceof ErrorEvent ? evt.lineno : undefined,\n                colno: evt instanceof ErrorEvent ? evt.colno : undefined,\n                date: this._now()\n            });\n            const causesRestart = this._shouldRestart();\n            this.state = 'crashed';\n            this._fire('stateChange');\n            this._fire('error', {\n                error,\n                causesRestart\n            });\n            if (causesRestart) {\n                this._restart();\n            } else {\n                this.state = 'crashedPermanently';\n                this._fire('stateChange');\n            }\n        }\n    }\n    /**\n\t * Checks whether an error should be handled by the watchdog.\n\t *\n\t * @param error An error that was caught by the error handling process.\n\t */ _shouldReactToError(error) {\n        return error.is && error.is('CKEditorError') && error.context !== undefined && // In some cases the watched item should not be restarted - e.g. during the item initialization.\n        // That's why the `null` was introduced as a correct error context which does cause restarting.\n        error.context !== null && // Do not react to errors if the watchdog is in states other than `ready`.\n        this.state === 'ready' && this._isErrorComingFromThisItem(error);\n    }\n    /**\n\t * Checks if the watchdog should restart the underlying item.\n\t */ _shouldRestart() {\n        if (this.crashes.length <= this._crashNumberLimit) {\n            return true;\n        }\n        const lastErrorTime = this.crashes[this.crashes.length - 1].date;\n        const firstMeaningfulErrorTime = this.crashes[this.crashes.length - 1 - this._crashNumberLimit].date;\n        const averageNonErrorTimePeriod = (lastErrorTime - firstMeaningfulErrorTime) / this._crashNumberLimit;\n        return averageNonErrorTimePeriod > this._minimumNonErrorTimePeriod;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module watchdog/utils/getsubnodes\n */ /* globals EventTarget, Event */ function getSubNodes(head, excludedProperties = new Set()) {\n    const nodes = [\n        head\n    ];\n    // @if CK_DEBUG_WATCHDOG // const prevNodeMap = new Map();\n    // Nodes are stored to prevent infinite looping.\n    const subNodes = new Set();\n    let nodeIndex = 0;\n    while(nodes.length > nodeIndex){\n        // Incrementing the iterator is much faster than changing size of the array with Array.prototype.shift().\n        const node = nodes[nodeIndex++];\n        if (subNodes.has(node) || !shouldNodeBeIncluded(node) || excludedProperties.has(node)) {\n            continue;\n        }\n        subNodes.add(node);\n        // Handle arrays, maps, sets, custom collections that implements `[ Symbol.iterator ]()`, etc.\n        if (Symbol.iterator in node) {\n            // The custom editor iterators might cause some problems if the editor is crashed.\n            try {\n                for (const n of node){\n                    nodes.push(n);\n                // @if CK_DEBUG_WATCHDOG // if ( !prevNodeMap.has( n ) ) {\n                // @if CK_DEBUG_WATCHDOG // \tprevNodeMap.set( n, node );\n                // @if CK_DEBUG_WATCHDOG // }\n                }\n            } catch (err) {\n            // Do not log errors for broken structures\n            // since we are in the error handling process already.\n            // eslint-disable-line no-empty\n            }\n        } else {\n            for(const key in node){\n                // We share a reference via the protobuf library within the editors,\n                // hence the shared value should be skipped. Although, it's not a perfect\n                // solution since new places like that might occur in the future.\n                if (key === 'defaultValue') {\n                    continue;\n                }\n                nodes.push(node[key]);\n            // @if CK_DEBUG_WATCHDOG // if ( !prevNodeMap.has( node[ key ] ) ) {\n            // @if CK_DEBUG_WATCHDOG // \tprevNodeMap.set( node[ key ], node );\n            // @if CK_DEBUG_WATCHDOG // }\n            }\n        }\n    }\n    // @if CK_DEBUG_WATCHDOG // return { subNodes, prevNodeMap } as any;\n    return subNodes;\n}\nfunction shouldNodeBeIncluded(node) {\n    const type = Object.prototype.toString.call(node);\n    const typeOfNode = typeof node;\n    return !(typeOfNode === 'number' || typeOfNode === 'boolean' || typeOfNode === 'string' || typeOfNode === 'symbol' || typeOfNode === 'function' || type === '[object Date]' || type === '[object RegExp]' || type === '[object Module]' || node === undefined || node === null || // This flag is meant to exclude singletons shared across editor instances. So when an error is thrown in one editor,\n    // the other editors connected through the reference to the same singleton are not restarted. This is a temporary workaround\n    // until a better solution is found.\n    // More in https://github.com/ckeditor/ckeditor5/issues/12292.\n    node._watchdogExcluded || // Skip native DOM objects, e.g. Window, nodes, events, etc.\n    node instanceof EventTarget || node instanceof Event);\n}\n\n/**\n * Traverses both structures to find out whether there is a reference that is shared between both structures.\n */ function areConnectedThroughProperties(target1, target2, excludedNodes = new Set()) {\n    if (target1 === target2 && isObject(target1)) {\n        return true;\n    }\n    // @if CK_DEBUG_WATCHDOG // return checkConnectionBetweenProps( target1, target2, excludedNodes );\n    const subNodes1 = getSubNodes(target1, excludedNodes);\n    const subNodes2 = getSubNodes(target2, excludedNodes);\n    for (const node of subNodes1){\n        if (subNodes2.has(node)) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction isObject(structure) {\n    return typeof structure === 'object' && structure !== null;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module watchdog/editorwatchdog\n */ /* globals console */ // eslint-disable-next-line ckeditor5-rules/no-cross-package-imports\n/**\n * A watchdog for CKEditor 5 editors.\n *\n * See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and\n * how to use it.\n */ class EditorWatchdog extends Watchdog {\n    /**\n\t * The current editor instance.\n\t */ _editor = null;\n    /**\n\t * A promise associated with the life cycle of the editor (creation or destruction processes).\n\t *\n\t * It is used to prevent the initialization of the editor if the previous instance has not been destroyed yet,\n\t * and conversely, to prevent the destruction of the editor if it has not been initialized.\n\t */ _lifecyclePromise = null;\n    /**\n\t * Throttled save method. The `save()` method is called the specified `saveInterval` after `throttledSave()` is called,\n\t * unless a new action happens in the meantime.\n\t */ _throttledSave;\n    /**\n\t * The latest saved editor data represented as a root name -> root data object.\n\t */ _data;\n    /**\n\t * The last document version.\n\t */ _lastDocumentVersion;\n    /**\n\t * The editor source element or data.\n\t */ _elementOrData;\n    /**\n\t * Specifies whether the editor was initialized using document data (`true`) or HTML elements (`false`).\n\t */ _initUsingData = true;\n    /**\n\t * The latest record of the editor editable elements. Used to restart the editor.\n\t */ _editables = {};\n    /**\n\t * The editor configuration.\n\t */ _config;\n    _excludedProps;\n    /**\n\t * @param Editor The editor class.\n\t * @param watchdogConfig The watchdog plugin configuration.\n\t */ constructor(Editor, watchdogConfig = {}){\n        super(watchdogConfig);\n        // this._editorClass = Editor;\n        this._throttledSave = throttle(this._save.bind(this), typeof watchdogConfig.saveInterval === 'number' ? watchdogConfig.saveInterval : 5000);\n        // Set default creator and destructor functions:\n        if (Editor) {\n            this._creator = (elementOrData, config)=>Editor.create(elementOrData, config);\n        }\n        this._destructor = (editor)=>editor.destroy();\n    }\n    /**\n\t * The current editor instance.\n\t */ get editor() {\n        return this._editor;\n    }\n    /**\n\t * @internal\n\t */ get _item() {\n        return this._editor;\n    }\n    /**\n\t * Sets the function that is responsible for the editor creation.\n\t * It expects a function that should return a promise.\n\t *\n\t * ```ts\n\t * watchdog.setCreator( ( element, config ) => ClassicEditor.create( element, config ) );\n\t * ```\n\t */ setCreator(creator) {\n        this._creator = creator;\n    }\n    /**\n\t * Sets the function that is responsible for the editor destruction.\n\t * Overrides the default destruction function, which destroys only the editor instance.\n\t * It expects a function that should return a promise or `undefined`.\n\t *\n\t * ```ts\n\t * watchdog.setDestructor( editor => {\n\t * \t// Do something before the editor is destroyed.\n\t *\n\t * \treturn editor\n\t * \t\t.destroy()\n\t * \t\t.then( () => {\n\t * \t\t\t// Do something after the editor is destroyed.\n\t * \t\t} );\n\t * } );\n\t * ```\n\t */ setDestructor(destructor) {\n        this._destructor = destructor;\n    }\n    /**\n\t * Restarts the editor instance. This method is called whenever an editor error occurs. It fires the `restart` event and changes\n\t * the state to `initializing`.\n\t *\n\t * @fires restart\n\t */ _restart() {\n        return Promise.resolve().then(()=>{\n            this.state = 'initializing';\n            this._fire('stateChange');\n            return this._destroy();\n        }).catch((err)=>{\n            console.error('An error happened during the editor destroying.', err);\n        }).then(()=>{\n            // Pre-process some data from the original editor config.\n            // Our goal here is to make sure that the restarted editor will be reinitialized with correct set of roots.\n            // We are not interested in any data set in config or in `.create()` first parameter. It will be replaced anyway.\n            // But we need to set them correctly to make sure that proper roots are created.\n            //\n            // Since a different set of roots will be created, `lazyRoots` and `rootsAttributes` properties must be managed too.\n            // Keys are root names, values are ''. Used when the editor was initialized by setting the first parameter to document data.\n            const existingRoots = {};\n            // Keeps lazy roots. They may be different when compared to initial config if some of the roots were loaded.\n            const lazyRoots = [];\n            // Roots attributes from the old config. Will be referred when setting new attributes.\n            const oldRootsAttributes = this._config.rootsAttributes || {};\n            // New attributes to be set. Is filled only for roots that still exist in the document.\n            const rootsAttributes = {};\n            // Traverse through the roots saved when the editor crashed and set up the discussed values.\n            for (const [rootName, rootData] of Object.entries(this._data.roots)){\n                if (rootData.isLoaded) {\n                    existingRoots[rootName] = '';\n                    rootsAttributes[rootName] = oldRootsAttributes[rootName] || {};\n                } else {\n                    lazyRoots.push(rootName);\n                }\n            }\n            const updatedConfig = {\n                ...this._config,\n                extraPlugins: this._config.extraPlugins || [],\n                lazyRoots,\n                rootsAttributes,\n                _watchdogInitialData: this._data\n            };\n            // Delete `initialData` as it is not needed. Data will be set by the watchdog based on `_watchdogInitialData`.\n            // First parameter of the editor `.create()` will be used to set up initial roots.\n            delete updatedConfig.initialData;\n            updatedConfig.extraPlugins.push(EditorWatchdogInitPlugin);\n            if (this._initUsingData) {\n                return this.create(existingRoots, updatedConfig, updatedConfig.context);\n            } else {\n                // Set correct editables to make sure that proper roots are created and linked with DOM elements.\n                // No need to set initial data, as it would be discarded anyway.\n                //\n                // If one element was initially set in `elementOrData`, then use that original element to restart the editor.\n                // This is for compatibility purposes with single-root editor types.\n                if (isElement(this._elementOrData)) {\n                    return this.create(this._elementOrData, updatedConfig, updatedConfig.context);\n                } else {\n                    return this.create(this._editables, updatedConfig, updatedConfig.context);\n                }\n            }\n        }).then(()=>{\n            this._fire('restart');\n        });\n    }\n    /**\n\t * Creates the editor instance and keeps it running, using the defined creator and destructor.\n\t *\n\t * @param elementOrData The editor source element or the editor data.\n\t * @param config The editor configuration.\n\t * @param context A context for the editor.\n\t */ create(elementOrData = this._elementOrData, config = this._config, context) {\n        this._lifecyclePromise = Promise.resolve(this._lifecyclePromise).then(()=>{\n            super._startErrorHandling();\n            this._elementOrData = elementOrData;\n            // Use document data in the first parameter of the editor `.create()` call only if it was used like this originally.\n            // Use document data if a string or object with strings was passed.\n            this._initUsingData = typeof elementOrData == 'string' || Object.keys(elementOrData).length > 0 && typeof Object.values(elementOrData)[0] == 'string';\n            // Clone configuration because it might be shared within multiple watchdog instances. Otherwise,\n            // when an error occurs in one of these editors, the watchdog will restart all of them.\n            this._config = this._cloneEditorConfiguration(config) || {};\n            this._config.context = context;\n            return this._creator(elementOrData, this._config);\n        }).then((editor)=>{\n            this._editor = editor;\n            editor.model.document.on('change:data', this._throttledSave);\n            this._lastDocumentVersion = editor.model.document.version;\n            this._data = this._getData();\n            if (!this._initUsingData) {\n                this._editables = this._getEditables();\n            }\n            this.state = 'ready';\n            this._fire('stateChange');\n        }).finally(()=>{\n            this._lifecyclePromise = null;\n        });\n        return this._lifecyclePromise;\n    }\n    /**\n\t * Destroys the watchdog and the current editor instance. It fires the callback\n\t * registered in {@link #setDestructor `setDestructor()`} and uses it to destroy the editor instance.\n\t * It also sets the state to `destroyed`.\n\t */ destroy() {\n        this._lifecyclePromise = Promise.resolve(this._lifecyclePromise).then(()=>{\n            this.state = 'destroyed';\n            this._fire('stateChange');\n            super.destroy();\n            return this._destroy();\n        }).finally(()=>{\n            this._lifecyclePromise = null;\n        });\n        return this._lifecyclePromise;\n    }\n    _destroy() {\n        return Promise.resolve().then(()=>{\n            this._stopErrorHandling();\n            this._throttledSave.cancel();\n            const editor = this._editor;\n            this._editor = null;\n            // Remove the `change:data` listener before destroying the editor.\n            // Incorrectly written plugins may trigger firing `change:data` events during the editor destruction phase\n            // causing the watchdog to call `editor.getData()` when some parts of editor are already destroyed.\n            editor.model.document.off('change:data', this._throttledSave);\n            return this._destructor(editor);\n        });\n    }\n    /**\n\t * Saves the editor data, so it can be restored after the crash even if the data cannot be fetched at\n\t * the moment of the crash.\n\t */ _save() {\n        const version = this._editor.model.document.version;\n        try {\n            this._data = this._getData();\n            if (!this._initUsingData) {\n                this._editables = this._getEditables();\n            }\n            this._lastDocumentVersion = version;\n        } catch (err) {\n            console.error(err, 'An error happened during restoring editor data. ' + 'Editor will be restored from the previously saved data.');\n        }\n    }\n    /**\n\t * @internal\n\t */ _setExcludedProperties(props) {\n        this._excludedProps = props;\n    }\n    /**\n\t * Gets all data that is required to reinitialize editor instance.\n\t */ _getData() {\n        const editor = this._editor;\n        const roots = editor.model.document.roots.filter((root)=>root.isAttached() && root.rootName != '$graveyard');\n        const { plugins } = editor;\n        // `as any` to avoid linking from external private repo.\n        const commentsRepository = plugins.has('CommentsRepository') && plugins.get('CommentsRepository');\n        const trackChanges = plugins.has('TrackChanges') && plugins.get('TrackChanges');\n        const data = {\n            roots: {},\n            markers: {},\n            commentThreads: JSON.stringify([]),\n            suggestions: JSON.stringify([])\n        };\n        roots.forEach((root)=>{\n            data.roots[root.rootName] = {\n                content: JSON.stringify(Array.from(root.getChildren())),\n                attributes: JSON.stringify(Array.from(root.getAttributes())),\n                isLoaded: root._isLoaded\n            };\n        });\n        for (const marker of editor.model.markers){\n            if (!marker._affectsData) {\n                continue;\n            }\n            data.markers[marker.name] = {\n                rangeJSON: marker.getRange().toJSON(),\n                usingOperation: marker._managedUsingOperations,\n                affectsData: marker._affectsData\n            };\n        }\n        if (commentsRepository) {\n            data.commentThreads = JSON.stringify(commentsRepository.getCommentThreads({\n                toJSON: true,\n                skipNotAttached: true\n            }));\n        }\n        if (trackChanges) {\n            data.suggestions = JSON.stringify(trackChanges.getSuggestions({\n                toJSON: true,\n                skipNotAttached: true\n            }));\n        }\n        return data;\n    }\n    /**\n\t * For each attached model root, returns its HTML editable element (if available).\n\t */ _getEditables() {\n        const editables = {};\n        for (const rootName of this.editor.model.document.getRootNames()){\n            const editable = this.editor.ui.getEditableElement(rootName);\n            if (editable) {\n                editables[rootName] = editable;\n            }\n        }\n        return editables;\n    }\n    /**\n\t * Traverses the error context and the current editor to find out whether these structures are connected\n\t * to each other via properties.\n\t *\n\t * @internal\n\t */ _isErrorComingFromThisItem(error) {\n        return areConnectedThroughProperties(this._editor, error.context, this._excludedProps);\n    }\n    /**\n\t * Clones the editor configuration.\n\t */ _cloneEditorConfiguration(config) {\n        return cloneDeepWith(config, (value, key)=>{\n            // Leave DOM references.\n            if (isElement(value)) {\n                return value;\n            }\n            if (key === 'context') {\n                return value;\n            }\n        });\n    }\n}\n/**\n * Internal plugin that is used to stop the default editor initialization and restoring the editor state\n * based on the `editor.config._watchdogInitialData` data.\n */ class EditorWatchdogInitPlugin {\n    editor;\n    _data;\n    constructor(editor){\n        this.editor = editor;\n        this._data = editor.config.get('_watchdogInitialData');\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        // Stops the default editor initialization and use the saved data to restore the editor state.\n        // Some of data could not be initialize as a config properties. It is important to keep the data\n        // in the same form as it was before the restarting.\n        this.editor.data.on('init', (evt)=>{\n            evt.stop();\n            this.editor.model.enqueueChange({\n                isUndoable: false\n            }, (writer)=>{\n                this._restoreCollaborationData();\n                this._restoreEditorData(writer);\n            });\n            this.editor.data.fire('ready');\n        // Keep priority `'high' - 1` to be sure that RTC initialization will be first.\n        }, {\n            priority: 1000 - 1\n        });\n    }\n    /**\n\t * Creates a model node (element or text) based on provided JSON.\n\t */ _createNode(writer, jsonNode) {\n        if ('name' in jsonNode) {\n            // If child has name property, it is an Element.\n            const element = writer.createElement(jsonNode.name, jsonNode.attributes);\n            if (jsonNode.children) {\n                for (const child of jsonNode.children){\n                    element._appendChild(this._createNode(writer, child));\n                }\n            }\n            return element;\n        } else {\n            // Otherwise, it is a Text node.\n            return writer.createText(jsonNode.data, jsonNode.attributes);\n        }\n    }\n    /**\n\t * Restores the editor by setting the document data, roots attributes and markers.\n\t */ _restoreEditorData(writer) {\n        const editor = this.editor;\n        Object.entries(this._data.roots).forEach(([rootName, { content, attributes }])=>{\n            const parsedNodes = JSON.parse(content);\n            const parsedAttributes = JSON.parse(attributes);\n            const rootElement = editor.model.document.getRoot(rootName);\n            for (const [key, value] of parsedAttributes){\n                writer.setAttribute(key, value, rootElement);\n            }\n            for (const child of parsedNodes){\n                const node = this._createNode(writer, child);\n                writer.insert(node, rootElement, 'end');\n            }\n        });\n        Object.entries(this._data.markers).forEach(([markerName, markerOptions])=>{\n            const { document } = editor.model;\n            const { rangeJSON: { start, end }, ...options } = markerOptions;\n            const root = document.getRoot(start.root);\n            const startPosition = writer.createPositionFromPath(root, start.path, start.stickiness);\n            const endPosition = writer.createPositionFromPath(root, end.path, end.stickiness);\n            const range = writer.createRange(startPosition, endPosition);\n            writer.addMarker(markerName, {\n                range,\n                ...options\n            });\n        });\n    }\n    /**\n\t * Restores the editor collaboration data - comment threads and suggestions.\n\t */ _restoreCollaborationData() {\n        // `as any` to avoid linking from external private repo.\n        const parsedCommentThreads = JSON.parse(this._data.commentThreads);\n        const parsedSuggestions = JSON.parse(this._data.suggestions);\n        parsedCommentThreads.forEach((commentThreadData)=>{\n            const channelId = this.editor.config.get('collaboration.channelId');\n            const commentsRepository = this.editor.plugins.get('CommentsRepository');\n            if (commentsRepository.hasCommentThread(commentThreadData.threadId)) {\n                const commentThread = commentsRepository.getCommentThread(commentThreadData.threadId);\n                commentThread.remove();\n            }\n            commentsRepository.addCommentThread({\n                channelId,\n                ...commentThreadData\n            });\n        });\n        parsedSuggestions.forEach((suggestionData)=>{\n            const trackChangesEditing = this.editor.plugins.get('TrackChangesEditing');\n            if (trackChangesEditing.hasSuggestion(suggestionData.id)) {\n                const suggestion = trackChangesEditing.getSuggestion(suggestionData.id);\n                suggestion.attributes = suggestionData.attributes;\n            } else {\n                trackChangesEditing.addSuggestionData(suggestionData);\n            }\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module watchdog/contextwatchdog\n */ /* globals console */ // eslint-disable-next-line ckeditor5-rules/no-cross-package-imports\nconst mainQueueId = Symbol('MainQueueId');\n/**\n * A watchdog for the {@link module:core/context~Context} class.\n *\n * See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and\n * how to use it.\n */ class ContextWatchdog extends Watchdog {\n    /**\n\t * A map of internal watchdogs for added items.\n\t */ _watchdogs = new Map();\n    /**\n\t * The watchdog configuration.\n\t */ _watchdogConfig;\n    /**\n\t * The current context instance.\n\t */ _context = null;\n    /**\n\t * Context properties (nodes/references) that are gathered during the initial context creation\n\t * and are used to distinguish the origin of an error.\n\t */ _contextProps = new Set();\n    /**\n\t * An action queue, which is used to handle async functions queuing.\n\t */ _actionQueues = new ActionQueues();\n    /**\n\t * The configuration for the {@link module:core/context~Context}.\n\t */ _contextConfig;\n    /**\n\t * The watched item.\n\t */ _item;\n    /**\n\t * The context watchdog class constructor.\n\t *\n\t * ```ts\n\t * const watchdog = new ContextWatchdog( Context );\n\t *\n\t * await watchdog.create( contextConfiguration );\n\t *\n\t * await watchdog.add( item );\n\t * ```\n\t *\n\t * See the {@glink features/watchdog Watchdog feature guide} to learn more how to use this feature.\n\t *\n\t * @param Context The {@link module:core/context~Context} class.\n\t * @param watchdogConfig The watchdog configuration.\n\t */ constructor(Context, watchdogConfig = {}){\n        super(watchdogConfig);\n        this._watchdogConfig = watchdogConfig;\n        // Default creator and destructor.\n        this._creator = (contextConfig)=>Context.create(contextConfig);\n        this._destructor = (context)=>context.destroy();\n        this._actionQueues.onEmpty(()=>{\n            if (this.state === 'initializing') {\n                this.state = 'ready';\n                this._fire('stateChange');\n            }\n        });\n    }\n    /**\n\t * Sets the function that is responsible for the context creation.\n\t * It expects a function that should return a promise (or `undefined`).\n\t *\n\t * ```ts\n\t * watchdog.setCreator( config => Context.create( config ) );\n\t * ```\n\t */ setCreator(creator) {\n        this._creator = creator;\n    }\n    /**\n\t * Sets the function that is responsible for the context destruction.\n\t * Overrides the default destruction function, which destroys only the context instance.\n\t * It expects a function that should return a promise (or `undefined`).\n\t *\n\t * ```ts\n\t * watchdog.setDestructor( context => {\n\t * \t// Do something before the context is destroyed.\n\t *\n\t * \treturn context\n\t * \t\t.destroy()\n\t * \t\t.then( () => {\n\t * \t\t\t// Do something after the context is destroyed.\n\t * \t\t} );\n\t * } );\n\t * ```\n\t */ setDestructor(destructor) {\n        this._destructor = destructor;\n    }\n    /**\n\t * The context instance. Keep in mind that this property might be changed when the context watchdog restarts,\n\t * so do not keep this instance internally. Always operate on the `ContextWatchdog#context` property.\n\t */ get context() {\n        return this._context;\n    }\n    /**\n\t * Initializes the context watchdog. Once it is created, the watchdog takes care about\n\t * recreating the context and the provided items, and starts the error handling mechanism.\n\t *\n\t * ```ts\n\t * await watchdog.create( {\n\t * \tplugins: []\n\t * } );\n\t * ```\n\t *\n\t * @param contextConfig The context configuration. See {@link module:core/context~Context}.\n\t */ create(contextConfig = {}) {\n        return this._actionQueues.enqueue(mainQueueId, ()=>{\n            this._contextConfig = contextConfig;\n            return this._create();\n        });\n    }\n    /**\n\t * Returns an item instance with the given `itemId`.\n\t *\n\t * ```ts\n\t * const editor1 = watchdog.getItem( 'editor1' );\n\t * ```\n\t *\n\t * @param itemId The item ID.\n\t * @returns The item instance or `undefined` if an item with a given ID has not been found.\n\t */ getItem(itemId) {\n        const watchdog = this._getWatchdog(itemId);\n        return watchdog._item;\n    }\n    /**\n\t * Gets the state of the given item. See {@link #state} for a list of available states.\n\t *\n\t * ```ts\n\t * const editor1State = watchdog.getItemState( 'editor1' );\n\t * ```\n\t *\n\t * @param itemId Item ID.\n\t * @returns The state of the item.\n\t */ getItemState(itemId) {\n        const watchdog = this._getWatchdog(itemId);\n        return watchdog.state;\n    }\n    /**\n\t * Adds items to the watchdog. Once created, instances of these items will be available using the {@link #getItem} method.\n\t *\n\t * Items can be passed together as an array of objects:\n\t *\n\t * ```ts\n\t * await watchdog.add( [ {\n\t * \tid: 'editor1',\n\t * \ttype: 'editor',\n\t * \tsourceElementOrData: document.querySelector( '#editor' ),\n\t * \tconfig: {\n\t * \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t * \t\ttoolbar: [ 'bold', 'italic', 'alignment' ]\n\t * \t},\n\t * \tcreator: ( element, config ) => ClassicEditor.create( element, config )\n\t * } ] );\n\t * ```\n\t *\n\t * Or one by one as objects:\n\t *\n\t * ```ts\n\t * await watchdog.add( {\n\t * \tid: 'editor1',\n\t * \ttype: 'editor',\n\t * \tsourceElementOrData: document.querySelector( '#editor' ),\n\t * \tconfig: {\n\t * \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n\t * \t\ttoolbar: [ 'bold', 'italic', 'alignment' ]\n\t * \t},\n\t * \tcreator: ( element, config ) => ClassicEditor.create( element, config )\n\t * ] );\n\t * ```\n\t *\n\t * Then an instance can be retrieved using the {@link #getItem} method:\n\t *\n\t * ```ts\n\t * const editor1 = watchdog.getItem( 'editor1' );\n\t * ```\n\t *\n\t * Note that this method can be called multiple times, but for performance reasons it is better\n\t * to pass all items together.\n\t *\n\t * @param itemConfigurationOrItemConfigurations An item configuration object or an array of item configurations.\n\t */ add(itemConfigurationOrItemConfigurations) {\n        const itemConfigurations = toArray(itemConfigurationOrItemConfigurations);\n        return Promise.all(itemConfigurations.map((item)=>{\n            return this._actionQueues.enqueue(item.id, ()=>{\n                if (this.state === 'destroyed') {\n                    throw new Error('Cannot add items to destroyed watchdog.');\n                }\n                if (!this._context) {\n                    throw new Error('Context was not created yet. You should call the `ContextWatchdog#create()` method first.');\n                }\n                let watchdog;\n                if (this._watchdogs.has(item.id)) {\n                    throw new Error(`Item with the given id is already added: '${item.id}'.`);\n                }\n                if (item.type === 'editor') {\n                    watchdog = new EditorWatchdog(null, this._watchdogConfig);\n                    watchdog.setCreator(item.creator);\n                    watchdog._setExcludedProperties(this._contextProps);\n                    if (item.destructor) {\n                        watchdog.setDestructor(item.destructor);\n                    }\n                    this._watchdogs.set(item.id, watchdog);\n                    // Enqueue the internal watchdog errors within the main queue.\n                    // And propagate the internal `error` events as `itemError` event.\n                    watchdog.on('error', (evt, { error, causesRestart })=>{\n                        this._fire('itemError', {\n                            itemId: item.id,\n                            error\n                        });\n                        // Do not enqueue the item restart action if the item will not restart.\n                        if (!causesRestart) {\n                            return;\n                        }\n                        this._actionQueues.enqueue(item.id, ()=>new Promise((res)=>{\n                                const rethrowRestartEventOnce = ()=>{\n                                    watchdog.off('restart', rethrowRestartEventOnce);\n                                    this._fire('itemRestart', {\n                                        itemId: item.id\n                                    });\n                                    res();\n                                };\n                                watchdog.on('restart', rethrowRestartEventOnce);\n                            }));\n                    });\n                    return watchdog.create(item.sourceElementOrData, item.config, this._context);\n                } else {\n                    throw new Error(`Not supported item type: '${item.type}'.`);\n                }\n            });\n        }));\n    }\n    /**\n\t * Removes and destroys item(s) with given ID(s).\n\t *\n\t * ```ts\n\t * await watchdog.remove( 'editor1' );\n\t * ```\n\t *\n\t * Or\n\t *\n\t * ```ts\n\t * await watchdog.remove( [ 'editor1', 'editor2' ] );\n\t * ```\n\t *\n\t * @param itemIdOrItemIds Item ID or an array of item IDs.\n\t */ remove(itemIdOrItemIds) {\n        const itemIds = toArray(itemIdOrItemIds);\n        return Promise.all(itemIds.map((itemId)=>{\n            return this._actionQueues.enqueue(itemId, ()=>{\n                const watchdog = this._getWatchdog(itemId);\n                this._watchdogs.delete(itemId);\n                return watchdog.destroy();\n            });\n        }));\n    }\n    /**\n\t * Destroys the context watchdog and all added items.\n\t * Once the context watchdog is destroyed, new items cannot be added.\n\t *\n\t * ```ts\n\t * await watchdog.destroy();\n\t * ```\n\t */ destroy() {\n        return this._actionQueues.enqueue(mainQueueId, ()=>{\n            this.state = 'destroyed';\n            this._fire('stateChange');\n            super.destroy();\n            return this._destroy();\n        });\n    }\n    /**\n\t * Restarts the context watchdog.\n\t */ _restart() {\n        return this._actionQueues.enqueue(mainQueueId, ()=>{\n            this.state = 'initializing';\n            this._fire('stateChange');\n            return this._destroy().catch((err)=>{\n                console.error('An error happened during destroying the context or items.', err);\n            }).then(()=>this._create()).then(()=>this._fire('restart'));\n        });\n    }\n    /**\n\t * Initializes the context watchdog.\n\t */ _create() {\n        return Promise.resolve().then(()=>{\n            this._startErrorHandling();\n            return this._creator(this._contextConfig);\n        }).then((context)=>{\n            this._context = context;\n            this._contextProps = getSubNodes(this._context);\n            return Promise.all(Array.from(this._watchdogs.values()).map((watchdog)=>{\n                watchdog._setExcludedProperties(this._contextProps);\n                return watchdog.create(undefined, undefined, this._context);\n            }));\n        });\n    }\n    /**\n\t * Destroys the context instance and all added items.\n\t */ _destroy() {\n        return Promise.resolve().then(()=>{\n            this._stopErrorHandling();\n            const context = this._context;\n            this._context = null;\n            this._contextProps = new Set();\n            return Promise.all(Array.from(this._watchdogs.values()).map((watchdog)=>watchdog.destroy()))// Context destructor destroys each editor.\n            .then(()=>this._destructor(context));\n        });\n    }\n    /**\n\t * Returns the watchdog for a given item ID.\n\t *\n\t * @param itemId Item ID.\n\t */ _getWatchdog(itemId) {\n        const watchdog = this._watchdogs.get(itemId);\n        if (!watchdog) {\n            throw new Error(`Item with the given id was not registered: ${itemId}.`);\n        }\n        return watchdog;\n    }\n    /**\n\t * Checks whether an error comes from the context instance and not from the item instances.\n\t *\n\t * @internal\n\t */ _isErrorComingFromThisItem(error) {\n        for (const watchdog of this._watchdogs.values()){\n            if (watchdog._isErrorComingFromThisItem(error)) {\n                return false;\n            }\n        }\n        return areConnectedThroughProperties(this._context, error.context);\n    }\n}\n/**\n * Manager of action queues that allows queuing async functions.\n */ class ActionQueues {\n    _onEmptyCallbacks = [];\n    _queues = new Map();\n    _activeActions = 0;\n    /**\n\t * Used to register callbacks that will be run when the queue becomes empty.\n\t *\n\t * @param onEmptyCallback A callback that will be run whenever the queue becomes empty.\n\t */ onEmpty(onEmptyCallback) {\n        this._onEmptyCallbacks.push(onEmptyCallback);\n    }\n    /**\n\t * It adds asynchronous actions (functions) to the proper queue and runs them one by one.\n\t *\n\t * @param queueId The action queue ID.\n\t * @param action A function that should be enqueued.\n\t */ enqueue(queueId, action) {\n        const isMainAction = queueId === mainQueueId;\n        this._activeActions++;\n        if (!this._queues.get(queueId)) {\n            this._queues.set(queueId, Promise.resolve());\n        }\n        // List all sources of actions that the current action needs to await for.\n        // For the main action wait for all other actions.\n        // For the item action wait only for the item queue and the main queue.\n        const awaitedActions = isMainAction ? Promise.all(this._queues.values()) : Promise.all([\n            this._queues.get(mainQueueId),\n            this._queues.get(queueId)\n        ]);\n        const queueWithAction = awaitedActions.then(action);\n        // Catch all errors in the main queue to stack promises even if an error occurred in the past.\n        const nonErrorQueue = queueWithAction.catch(()=>{});\n        this._queues.set(queueId, nonErrorQueue);\n        return queueWithAction.finally(()=>{\n            this._activeActions--;\n            if (this._queues.get(queueId) === nonErrorQueue && this._activeActions === 0) {\n                this._onEmptyCallbacks.forEach((cb)=>cb());\n            }\n        });\n    }\n}\n/**\n * Transforms any value to an array. If the provided value is already an array, it is returned unchanged.\n *\n * @param elementOrArray The value to transform to an array.\n * @returns An array created from data.\n */ function toArray(elementOrArray) {\n    return Array.isArray(elementOrArray) ? elementOrArray : [\n        elementOrArray\n    ];\n}\n\nexport { ContextWatchdog, EditorWatchdog, Watchdog };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { ObservableMixin, insertToPriorityArray, EmitterMixin, CKEditorError, Config, Locale, Collection, KeystrokeHandler, setDataInElement } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { Model, StylesProcessor, DataController, EditingController, Conversion } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { EditorWatchdog, ContextWatchdog } from '@ckeditor/ckeditor5-watchdog/dist/index.js';\nimport { isFunction } from 'lodash-es';\n\n/**\n * The base class for CKEditor plugin classes.\n */ class Plugin extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * The editor instance.\n\t *\n\t * Note that most editors implement the {@link module:core/editor/editor~Editor#ui} property.\n\t * However, editors with an external UI (i.e. Bootstrap-based) or a headless editor may not have this property or\n\t * throw an error when accessing it.\n\t *\n\t * Because of above, to make plugins more universal, it is recommended to split features into:\n\t *  - The \"editing\" part that uses the {@link module:core/editor/editor~Editor} class without `ui` property.\n\t *  - The \"UI\" part that uses the {@link module:core/editor/editor~Editor} class and accesses `ui` property.\n\t */ editor;\n    /**\n\t * Holds identifiers for {@link #forceDisabled} mechanism.\n\t */ _disableStack = new Set();\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super();\n        this.editor = editor;\n        this.set('isEnabled', true);\n    }\n    /**\n\t * Disables the plugin.\n\t *\n\t * Plugin may be disabled by multiple features or algorithms (at once). When disabling a plugin, unique id should be passed\n\t * (e.g. feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the plugin.\n\t * The plugin becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t *\n\t * Disabling and enabling a plugin:\n\t *\n\t * ```ts\n\t * plugin.isEnabled; // -> true\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> false\n\t * plugin.clearForceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> true\n\t * ```\n\t *\n\t * Plugin disabled by multiple features:\n\t *\n\t * ```ts\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.forceDisabled( 'OtherFeature' );\n\t * plugin.clearForceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> false\n\t * plugin.clearForceDisabled( 'OtherFeature' );\n\t * plugin.isEnabled; // -> true\n\t * ```\n\t *\n\t * Multiple disabling with the same identifier is redundant:\n\t *\n\t * ```ts\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.forceDisabled( 'MyFeature' );\n\t * plugin.clearForceDisabled( 'MyFeature' );\n\t * plugin.isEnabled; // -> true\n\t * ```\n\t *\n\t * **Note:** some plugins or algorithms may have more complex logic when it comes to enabling or disabling certain plugins,\n\t * so the plugin might be still disabled after {@link #clearForceDisabled} was used.\n\t *\n\t * @param id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the plugin.\n\t */ forceDisabled(id) {\n        this._disableStack.add(id);\n        if (this._disableStack.size == 1) {\n            this.on('set:isEnabled', forceDisable$1, {\n                priority: 'highest'\n            });\n            this.isEnabled = false;\n        }\n    }\n    /**\n\t * Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t *\n\t * @param id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t */ clearForceDisabled(id) {\n        this._disableStack.delete(id);\n        if (this._disableStack.size == 0) {\n            this.off('set:isEnabled', forceDisable$1);\n            this.isEnabled = true;\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this.stopListening();\n    }\n    /**\n\t * @inheritDoc\n\t */ static get isContextPlugin() {\n        return false;\n    }\n}\n/**\n * Helper function that forces plugin to be disabled.\n */ function forceDisable$1(evt) {\n    evt.return = false;\n    evt.stop();\n}\n\n/**\n * Base class for the CKEditor commands.\n *\n * Commands are the main way to manipulate the editor contents and state. They are mostly used by UI elements (or by other\n * commands) to make changes in the model. Commands are available in every part of the code that has access to\n * the {@link module:core/editor/editor~Editor editor} instance.\n *\n * Instances of registered commands can be retrieved from {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n * The easiest way to execute a command is through {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n *\n * By default, commands are disabled when the editor is in the {@link module:core/editor/editor~Editor#isReadOnly read-only} mode\n * but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.\n */ class Command extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * The editor on which this command will be used.\n\t */ editor;\n    /**\n\t * A flag indicating whether a command's `isEnabled` state should be changed depending on where the document\n\t * selection is placed.\n\t *\n\t * By default, it is set to `true`. If the document selection is placed in a\n\t * {@link module:engine/model/model~Model#canEditAt non-editable} place (such as non-editable root), the command becomes disabled.\n\t *\n\t * The flag should be changed to `false` in a concrete command's constructor if the command should not change its `isEnabled`\n\t * accordingly to the document selection.\n\t */ _isEnabledBasedOnSelection;\n    /**\n\t * A flag indicating whether a command execution changes the editor data or not.\n\t *\n\t * @see #affectsData\n\t */ _affectsData;\n    /**\n\t * Holds identifiers for {@link #forceDisabled} mechanism.\n\t */ _disableStack;\n    /**\n\t * Creates a new `Command` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t */ constructor(editor){\n        super();\n        this.editor = editor;\n        this.set('value', undefined);\n        this.set('isEnabled', false);\n        this._affectsData = true;\n        this._isEnabledBasedOnSelection = true;\n        this._disableStack = new Set();\n        this.decorate('execute');\n        // By default, every command is refreshed when changes are applied to the model.\n        this.listenTo(this.editor.model.document, 'change', ()=>{\n            this.refresh();\n        });\n        this.listenTo(editor, 'change:isReadOnly', ()=>{\n            this.refresh();\n        });\n        // By default, commands are disabled if the selection is in non-editable place or editor is in read-only mode.\n        this.on('set:isEnabled', (evt)=>{\n            if (!this.affectsData) {\n                return;\n            }\n            const selection = editor.model.document.selection;\n            const selectionInGraveyard = selection.getFirstPosition().root.rootName == '$graveyard';\n            const canEditAtSelection = !selectionInGraveyard && editor.model.canEditAt(selection);\n            // Disable if editor is read only, or when selection is in a place which cannot be edited.\n            //\n            // Checking `editor.isReadOnly` is needed for all commands that have `_isEnabledBasedOnSelection == false`.\n            // E.g. undo does not base on selection, but affects data and should be disabled when the editor is in read-only mode.\n            if (editor.isReadOnly || this._isEnabledBasedOnSelection && !canEditAtSelection) {\n                evt.return = false;\n                evt.stop();\n            }\n        }, {\n            priority: 'highest'\n        });\n        this.on('execute', (evt)=>{\n            if (!this.isEnabled) {\n                evt.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * A flag indicating whether a command execution changes the editor data or not.\n\t *\n\t * Commands with `affectsData` set to `false` will not be automatically disabled in\n\t * the {@link module:core/editor/editor~Editor#isReadOnly read-only mode} and\n\t * {@glink features/read-only#related-features other editor modes} with restricted user write permissions.\n\t *\n\t * **Note:** You do not have to set it for your every command. It is `true` by default.\n\t *\n\t * @default true\n\t */ get affectsData() {\n        return this._affectsData;\n    }\n    set affectsData(affectsData) {\n        this._affectsData = affectsData;\n    }\n    /**\n\t * Refreshes the command. The command should update its {@link #isEnabled} and {@link #value} properties\n\t * in this method.\n\t *\n\t * This method is automatically called when\n\t * {@link module:engine/model/document~Document#event:change any changes are applied to the document}.\n\t */ refresh() {\n        this.isEnabled = true;\n    }\n    /**\n\t * Disables the command.\n\t *\n\t * Command may be disabled by multiple features or algorithms (at once). When disabling a command, unique id should be passed\n\t * (e.g. the feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the command.\n\t * The command becomes enabled only after all features {@link #clearForceDisabled enabled it back}.\n\t *\n\t * Disabling and enabling a command:\n\t *\n\t * ```ts\n\t * command.isEnabled; // -> true\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> false\n\t * command.clearForceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> true\n\t * ```\n\t *\n\t * Command disabled by multiple features:\n\t *\n\t * ```ts\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.forceDisabled( 'OtherFeature' );\n\t * command.clearForceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> false\n\t * command.clearForceDisabled( 'OtherFeature' );\n\t * command.isEnabled; // -> true\n\t * ```\n\t *\n\t * Multiple disabling with the same identifier is redundant:\n\t *\n\t * ```ts\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.forceDisabled( 'MyFeature' );\n\t * command.clearForceDisabled( 'MyFeature' );\n\t * command.isEnabled; // -> true\n\t * ```\n\t *\n\t * **Note:** some commands or algorithms may have more complex logic when it comes to enabling or disabling certain commands,\n\t * so the command might be still disabled after {@link #clearForceDisabled} was used.\n\t *\n\t * @param id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the command.\n\t */ forceDisabled(id) {\n        this._disableStack.add(id);\n        if (this._disableStack.size == 1) {\n            this.on('set:isEnabled', forceDisable, {\n                priority: 'highest'\n            });\n            this.isEnabled = false;\n        }\n    }\n    /**\n\t * Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.\n\t *\n\t * @param id Unique identifier, equal to the one passed in {@link #forceDisabled} call.\n\t */ clearForceDisabled(id) {\n        this._disableStack.delete(id);\n        if (this._disableStack.size == 0) {\n            this.off('set:isEnabled', forceDisable);\n            this.refresh();\n        }\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * A command may accept parameters. They will be passed from {@link module:core/editor/editor~Editor#execute `editor.execute()`}\n\t * to the command.\n\t *\n\t * The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).\n\t * This behavior is implemented by a high priority listener to the {@link #event:execute} event.\n\t *\n\t * In order to see how to disable a command from \"outside\" see the {@link #isEnabled} documentation.\n\t *\n\t * This method may return a value, which would be forwarded all the way down to the\n\t * {@link module:core/editor/editor~Editor#execute `editor.execute()`}.\n\t *\n\t * @fires execute\n\t */ execute(...args) {\n        return undefined;\n    }\n    /**\n\t * Destroys the command.\n\t */ destroy() {\n        this.stopListening();\n    }\n}\n/**\n * Helper function that forces command to be disabled.\n */ function forceDisable(evt) {\n    evt.return = false;\n    evt.stop();\n}\n\n/**\n * A CKEditor command that aggregates other commands.\n *\n * This command is used to proxy multiple commands. The multi-command is enabled when\n * at least one of its registered child commands is enabled.\n * When executing a multi-command, the first enabled command with highest priority will be executed.\n *\n * ```ts\n * const multiCommand = new MultiCommand( editor );\n *\n * const commandFoo = new Command( editor );\n * const commandBar = new Command( editor );\n *\n * // Register a child command.\n * multiCommand.registerChildCommand( commandFoo );\n * // Register a child command with a low priority.\n * multiCommand.registerChildCommand( commandBar, { priority: 'low' } );\n *\n * // Enable one of the commands.\n * commandBar.isEnabled = true;\n *\n * multiCommand.execute(); // Will execute commandBar.\n * ```\n */ class MultiCommand extends Command {\n    /**\n\t * Registered child commands definitions.\n\t */ _childCommandsDefinitions = [];\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n    // Override base command refresh(): the command's state is changed when one of child commands changes states.\n    }\n    /**\n\t * Executes the first enabled command which has the highest priority of all registered child commands.\n\t *\n\t * @returns The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t */ execute(...args) {\n        const command = this._getFirstEnabledCommand();\n        return !!command && command.execute(args);\n    }\n    /**\n\t * Registers a child command.\n\t *\n\t * @param options An object with configuration options.\n\t * @param options.priority Priority of a command to register.\n\t */ registerChildCommand(command, options = {}) {\n        insertToPriorityArray(this._childCommandsDefinitions, {\n            command,\n            priority: options.priority || 'normal'\n        });\n        // Change multi-command enabled state when one of registered commands changes state.\n        command.on('change:isEnabled', ()=>this._checkEnabled());\n        this._checkEnabled();\n    }\n    /**\n\t * Checks if any of child commands is enabled.\n\t */ _checkEnabled() {\n        this.isEnabled = !!this._getFirstEnabledCommand();\n    }\n    /**\n\t * Returns a first enabled command with the highest priority or `undefined` if none of them is enabled.\n\t */ _getFirstEnabledCommand() {\n        const commandDefinition = this._childCommandsDefinitions.find(({ command })=>command.isEnabled);\n        return commandDefinition && commandDefinition.command;\n    }\n}\n\n/**\n * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.\n */ class PluginCollection extends /* #__PURE__ */ EmitterMixin() {\n    _context;\n    _plugins = new Map();\n    /**\n\t * A map of plugin constructors that can be retrieved by their names.\n\t */ _availablePlugins;\n    /**\n\t * Map of {@link module:core/contextplugin~ContextPlugin context plugins} which can be retrieved by their constructors or instances.\n\t */ _contextPlugins;\n    /**\n\t * Creates an instance of the plugin collection class.\n\t * Allows loading and initializing plugins and their dependencies.\n\t * Allows providing a list of already loaded plugins. These plugins will not be destroyed along with this collection.\n\t *\n\t * @param availablePlugins Plugins (constructors) which the collection will be able to use\n\t * when {@link module:core/plugincollection~PluginCollection#init} is used with the plugin names (strings, instead of constructors).\n\t * Usually, the editor will pass its built-in plugins to the collection so they can later be\n\t * used in `config.plugins` or `config.removePlugins` by names.\n\t * @param contextPlugins A list of already initialized plugins represented by a `[ PluginConstructor, pluginInstance ]` pair.\n\t */ constructor(context, availablePlugins = [], contextPlugins = []){\n        super();\n        this._context = context;\n        this._availablePlugins = new Map();\n        for (const PluginConstructor of availablePlugins){\n            if (PluginConstructor.pluginName) {\n                this._availablePlugins.set(PluginConstructor.pluginName, PluginConstructor);\n            }\n        }\n        this._contextPlugins = new Map();\n        for (const [PluginConstructor, pluginInstance] of contextPlugins){\n            this._contextPlugins.set(PluginConstructor, pluginInstance);\n            this._contextPlugins.set(pluginInstance, PluginConstructor);\n            // To make it possible to require a plugin by its name.\n            if (PluginConstructor.pluginName) {\n                this._availablePlugins.set(PluginConstructor.pluginName, PluginConstructor);\n            }\n        }\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * Returns `[ PluginConstructor, pluginInstance ]` pairs.\n\t */ *[Symbol.iterator]() {\n        for (const entry of this._plugins){\n            if (typeof entry[0] == 'function') {\n                yield entry;\n            }\n        }\n    }\n    /**\n\t * Gets the plugin instance by its constructor or name.\n\t *\n\t * ```ts\n\t * // Check if 'Clipboard' plugin was loaded.\n\t * if ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t * \t// Get clipboard plugin instance\n\t * \tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t *\n\t * \tthis.listenTo( clipboard, 'inputTransformation', ( evt, data ) => {\n\t * \t\t// Do something on clipboard input.\n\t * \t} );\n\t * }\n\t * ```\n\t *\n\t * **Note**: This method will throw an error if a plugin is not loaded. Use `{@link #has editor.plugins.has()}`\n\t * to check if a plugin is available.\n\t *\n\t * @param key The plugin constructor or {@link module:core/plugin~PluginStaticMembers#pluginName name}.\n\t */ get(key) {\n        const plugin = this._plugins.get(key);\n        if (!plugin) {\n            let pluginName = key;\n            if (typeof key == 'function') {\n                pluginName = key.pluginName || key.name;\n            }\n            /**\n\t\t\t * The plugin is not loaded and could not be obtained.\n\t\t\t *\n\t\t\t * Plugin classes (constructors) need to be provided to the editor and must be loaded before they can be obtained from\n\t\t\t * the plugin collection.\n\t\t\t *\n\t\t\t * **Note**: You can use `{@link module:core/plugincollection~PluginCollection#has editor.plugins.has()}`\n\t\t\t * to check if a plugin was loaded.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-not-loaded\n\t\t\t * @param plugin The name of the plugin which is not loaded.\n\t\t\t */ throw new CKEditorError('plugincollection-plugin-not-loaded', this._context, {\n                plugin: pluginName\n            });\n        }\n        return plugin;\n    }\n    /**\n\t * Checks if a plugin is loaded.\n\t *\n\t * ```ts\n\t * // Check if the 'Clipboard' plugin was loaded.\n\t * if ( editor.plugins.has( 'ClipboardPipeline' ) ) {\n\t * \t// Now use the clipboard plugin instance:\n\t * \tconst clipboard = editor.plugins.get( 'ClipboardPipeline' );\n\t *\n\t * \t// ...\n\t * }\n\t * ```\n\t *\n\t * @param key The plugin constructor or {@link module:core/plugin~PluginStaticMembers#pluginName name}.\n\t */ has(key) {\n        return this._plugins.has(key);\n    }\n    /**\n\t * Initializes a set of plugins and adds them to the collection.\n\t *\n\t * @param plugins An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t * or {@link module:core/plugin~PluginStaticMembers#pluginName plugin names}.\n\t * @param pluginsToRemove Names of the plugins or plugin constructors\n\t * that should not be loaded (despite being specified in the `plugins` array).\n\t * @param pluginsSubstitutions An array of {@link module:core/plugin~PluginInterface plugin constructors}\n\t * that will be used to replace plugins of the same names that were passed in `plugins` or that are in their dependency tree.\n\t * A useful option for replacing built-in plugins while creating tests (for mocking their APIs). Plugins that will be replaced\n\t * must follow these rules:\n\t *   * The new plugin must be a class.\n\t *   * The new plugin must be named.\n\t *   * Both plugins must not depend on other plugins.\n\t * @returns A promise which gets resolved once all plugins are loaded and available in the collection.\n\t */ init(plugins, pluginsToRemove = [], pluginsSubstitutions = []) {\n        // Plugin initialization procedure consists of 2 main steps:\n        // 1) collecting all available plugin constructors,\n        // 2) verification whether all required plugins can be instantiated.\n        //\n        // In the first step, all plugin constructors, available in the provided `plugins` array and inside\n        // plugin's dependencies (from the `Plugin.requires` array), are recursively collected and added to the existing\n        // `this._availablePlugins` map, but without any verification at the given moment. Performing the verification\n        // at this point (during the plugin constructor searching) would cause false errors to occur, that some plugin\n        // is missing but in fact it may be defined further in the array as the dependency of other plugin. After\n        // traversing the entire dependency tree, it will be checked if all required \"top level\" plugins are available.\n        //\n        // In the second step, the list of plugins that have not been explicitly removed is traversed to get all the\n        // plugin constructors to be instantiated in the correct order and to validate against some rules. Finally, if\n        // no plugin is missing and no other error has been found, they all will be instantiated.\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const that = this;\n        const context = this._context;\n        findAvailablePluginConstructors(plugins);\n        validatePlugins(plugins);\n        const pluginsToLoad = plugins.filter((plugin)=>!isPluginRemoved(plugin, pluginsToRemove));\n        const pluginConstructors = [\n            ...getPluginConstructors(pluginsToLoad)\n        ];\n        substitutePlugins(pluginConstructors, pluginsSubstitutions);\n        const pluginInstances = loadPlugins(pluginConstructors);\n        return initPlugins(pluginInstances, 'init').then(()=>initPlugins(pluginInstances, 'afterInit')).then(()=>pluginInstances);\n        function isPluginConstructor(plugin) {\n            return typeof plugin === 'function';\n        }\n        function isContextPlugin(plugin) {\n            return isPluginConstructor(plugin) && !!plugin.isContextPlugin;\n        }\n        function isPluginRemoved(plugin, pluginsToRemove) {\n            return pluginsToRemove.some((removedPlugin)=>{\n                if (removedPlugin === plugin) {\n                    return true;\n                }\n                if (getPluginName(plugin) === removedPlugin) {\n                    return true;\n                }\n                if (getPluginName(removedPlugin) === plugin) {\n                    return true;\n                }\n                return false;\n            });\n        }\n        function getPluginName(plugin) {\n            return isPluginConstructor(plugin) ? plugin.pluginName || plugin.name : plugin;\n        }\n        function findAvailablePluginConstructors(plugins, processed = new Set()) {\n            plugins.forEach((plugin)=>{\n                if (!isPluginConstructor(plugin)) {\n                    return;\n                }\n                if (processed.has(plugin)) {\n                    return;\n                }\n                processed.add(plugin);\n                if (plugin.pluginName && !that._availablePlugins.has(plugin.pluginName)) {\n                    that._availablePlugins.set(plugin.pluginName, plugin);\n                }\n                if (plugin.requires) {\n                    findAvailablePluginConstructors(plugin.requires, processed);\n                }\n            });\n        }\n        function getPluginConstructors(plugins, processed = new Set()) {\n            return plugins.map((plugin)=>{\n                return isPluginConstructor(plugin) ? plugin : that._availablePlugins.get(plugin);\n            }).reduce((result, plugin)=>{\n                if (processed.has(plugin)) {\n                    return result;\n                }\n                processed.add(plugin);\n                if (plugin.requires) {\n                    validatePlugins(plugin.requires, plugin);\n                    getPluginConstructors(plugin.requires, processed).forEach((plugin)=>result.add(plugin));\n                }\n                return result.add(plugin);\n            }, new Set());\n        }\n        function validatePlugins(plugins, parentPluginConstructor = null) {\n            plugins.map((plugin)=>{\n                return isPluginConstructor(plugin) ? plugin : that._availablePlugins.get(plugin) || plugin;\n            }).forEach((plugin)=>{\n                checkMissingPlugin(plugin, parentPluginConstructor);\n                checkContextPlugin(plugin, parentPluginConstructor);\n                checkRemovedPlugin(plugin, parentPluginConstructor);\n            });\n        }\n        function checkMissingPlugin(plugin, parentPluginConstructor) {\n            if (isPluginConstructor(plugin)) {\n                return;\n            }\n            if (parentPluginConstructor) {\n                /**\n\t\t\t\t * A required \"soft\" dependency was not found on the plugin list.\n\t\t\t\t *\n\t\t\t\t * When configuring the editor, either prior to building (via\n\t\t\t\t * {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}) or when\n\t\t\t\t * creating a new instance of the editor (e.g. via\n\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`}), you need to provide\n\t\t\t\t * some of the dependencies for other plugins that you used.\n\t\t\t\t *\n\t\t\t\t * This error is thrown when one of these dependencies was not provided. The name of the missing plugin\n\t\t\t\t * can be found in `missingPlugin` and the plugin that required it in `requiredBy`.\n\t\t\t\t *\n\t\t\t\t * In order to resolve it, you need to import the missing plugin and add it to the\n\t\t\t\t * current list of plugins (`Editor.builtinPlugins` or `config.plugins`/`config.extraPlugins`).\n\t\t\t\t *\n\t\t\t\t * Soft requirements were introduced in version 26.0.0. If you happen to stumble upon this error\n\t\t\t\t * when upgrading to version 26.0.0, read also the\n\t\t\t\t * {@glink updating/guides/update-to-26 Migration to 26.0.0} guide.\n\t\t\t\t *\n\t\t\t\t * @error plugincollection-soft-required\n\t\t\t\t * @param missingPlugin The name of the required plugin.\n\t\t\t\t * @param requiredBy The name of the plugin that requires the other plugin.\n\t\t\t\t */ throw new CKEditorError('plugincollection-soft-required', context, {\n                    missingPlugin: plugin,\n                    requiredBy: getPluginName(parentPluginConstructor)\n                });\n            }\n            /**\n\t\t\t * A plugin is not available and could not be loaded.\n\t\t\t *\n\t\t\t * Plugin classes (constructors) need to be provided to the editor before they can be loaded by name.\n\t\t\t * This is usually done in CKEditor 5 builds by setting the {@link module:core/editor/editor~Editor.builtinPlugins}\n\t\t\t * property.\n\t\t\t *\n\t\t\t * **If you see this warning when using one of the CKEditor 5 Builds},\n\t\t\t * it means that you try to enable a plugin which was not included in that build. This may be due to a typo\n\t\t\t * in the plugin name or simply because that plugin is not a part of this build.\n\t\t\t *\n\t\t\t * Predefined builds are a deprecated solution and we strongly advise\n\t\t\t * {@glink updating/nim-migration/migration-to-new-installation-methods migrating to new installation methods}.\n\t\t\t *\n\t\t\t * **If you see this warning when using one of the editor creators directly** (not a build), then it means\n\t\t\t * that you tried loading plugins by name. However, unlike CKEditor 4, CKEditor 5 does not implement a \"plugin loader\".\n\t\t\t * This means that CKEditor 5 does not know where to load the plugin modules from. Therefore, you need to\n\t\t\t * provide each plugin through a reference (as a constructor function). Check out the examples in the\n\t\t\t * {@glink getting-started/installation/quick-start Quick start} guide.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-not-found\n\t\t\t * @param plugin The name of the plugin which could not be loaded.\n\t\t\t */ throw new CKEditorError('plugincollection-plugin-not-found', context, {\n                plugin\n            });\n        }\n        function checkContextPlugin(plugin, parentPluginConstructor) {\n            if (!isContextPlugin(parentPluginConstructor)) {\n                return;\n            }\n            if (isContextPlugin(plugin)) {\n                return;\n            }\n            /**\n\t\t\t * If a plugin is a context plugin, all plugins it requires should also be context plugins\n\t\t\t * instead of plugins. In other words, if one plugin can be used in the context,\n\t\t\t * all its requirements should also be ready to be used in the context. Note that the context\n\t\t\t * provides only a part of the API provided by the editor. If one plugin needs a full\n\t\t\t * editor API, all plugins which require it are considered as plugins that need a full\n\t\t\t * editor API.\n\t\t\t *\n\t\t\t * @error plugincollection-context-required\n\t\t\t * @param plugin The name of the required plugin.\n\t\t\t * @param requiredBy The name of the parent plugin.\n\t\t\t */ throw new CKEditorError('plugincollection-context-required', context, {\n                plugin: getPluginName(plugin),\n                requiredBy: getPluginName(parentPluginConstructor)\n            });\n        }\n        function checkRemovedPlugin(plugin, parentPluginConstructor) {\n            if (!parentPluginConstructor) {\n                return;\n            }\n            if (!isPluginRemoved(plugin, pluginsToRemove)) {\n                return;\n            }\n            /**\n\t\t\t * Cannot load a plugin because one of its dependencies is listed in the `removePlugins` option.\n\t\t\t *\n\t\t\t * @error plugincollection-required\n\t\t\t * @param plugin The name of the required plugin.\n\t\t\t * @param requiredBy The name of the parent plugin.\n\t\t\t */ throw new CKEditorError('plugincollection-required', context, {\n                plugin: getPluginName(plugin),\n                requiredBy: getPluginName(parentPluginConstructor)\n            });\n        }\n        function loadPlugins(pluginConstructors) {\n            return pluginConstructors.map((PluginConstructor)=>{\n                let pluginInstance = that._contextPlugins.get(PluginConstructor);\n                pluginInstance = pluginInstance || new PluginConstructor(context);\n                that._add(PluginConstructor, pluginInstance);\n                return pluginInstance;\n            });\n        }\n        function initPlugins(pluginInstances, method) {\n            return pluginInstances.reduce((promise, plugin)=>{\n                if (!plugin[method]) {\n                    return promise;\n                }\n                if (that._contextPlugins.has(plugin)) {\n                    return promise;\n                }\n                return promise.then(plugin[method].bind(plugin));\n            }, Promise.resolve());\n        }\n        /**\n\t\t * Replaces plugin constructors with the specified set of plugins.\n\t\t */ function substitutePlugins(pluginConstructors, pluginsSubstitutions) {\n            for (const pluginItem of pluginsSubstitutions){\n                if (typeof pluginItem != 'function') {\n                    /**\n\t\t\t\t\t * The plugin replacing an existing plugin must be a function.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replace-plugin-invalid-type\n\t\t\t\t\t */ throw new CKEditorError('plugincollection-replace-plugin-invalid-type', null, {\n                        pluginItem\n                    });\n                }\n                const pluginName = pluginItem.pluginName;\n                if (!pluginName) {\n                    /**\n\t\t\t\t\t * The plugin replacing an existing plugin must have a name.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replace-plugin-missing-name\n\t\t\t\t\t */ throw new CKEditorError('plugincollection-replace-plugin-missing-name', null, {\n                        pluginItem\n                    });\n                }\n                if (pluginItem.requires && pluginItem.requires.length) {\n                    /**\n\t\t\t\t\t * The plugin replacing an existing plugin cannot depend on other plugins.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-cannot-have-dependencies\n\t\t\t\t\t */ throw new CKEditorError('plugincollection-plugin-for-replacing-cannot-have-dependencies', null, {\n                        pluginName\n                    });\n                }\n                const pluginToReplace = that._availablePlugins.get(pluginName);\n                if (!pluginToReplace) {\n                    /**\n\t\t\t\t\t * The replaced plugin does not exist in the\n\t\t\t\t\t * {@link module:core/plugincollection~PluginCollection available plugins} collection.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-not-exist\n\t\t\t\t\t */ throw new CKEditorError('plugincollection-plugin-for-replacing-not-exist', null, {\n                        pluginName\n                    });\n                }\n                const indexInPluginConstructors = pluginConstructors.indexOf(pluginToReplace);\n                if (indexInPluginConstructors === -1) {\n                    // The Context feature can substitute plugins as well.\n                    // It may happen that the editor will be created with the given context, where the plugin for substitute\n                    // was already replaced. In such a case, we don't want to do it again.\n                    if (that._contextPlugins.has(pluginToReplace)) {\n                        return;\n                    }\n                    /**\n\t\t\t\t\t * The replaced plugin will not be loaded so it cannot be replaced.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-plugin-for-replacing-not-loaded\n\t\t\t\t\t */ throw new CKEditorError('plugincollection-plugin-for-replacing-not-loaded', null, {\n                        pluginName\n                    });\n                }\n                if (pluginToReplace.requires && pluginToReplace.requires.length) {\n                    /**\n\t\t\t\t\t * The replaced plugin cannot depend on other plugins.\n\t\t\t\t\t *\n\t\t\t\t\t * @error plugincollection-replaced-plugin-cannot-have-dependencies\n\t\t\t\t\t */ throw new CKEditorError('plugincollection-replaced-plugin-cannot-have-dependencies', null, {\n                        pluginName\n                    });\n                }\n                pluginConstructors.splice(indexInPluginConstructors, 1, pluginItem);\n                that._availablePlugins.set(pluginName, pluginItem);\n            }\n        }\n    }\n    /**\n\t * Destroys all loaded plugins.\n\t */ destroy() {\n        const promises = [];\n        for (const [, pluginInstance] of this){\n            if (typeof pluginInstance.destroy == 'function' && !this._contextPlugins.has(pluginInstance)) {\n                promises.push(pluginInstance.destroy());\n            }\n        }\n        return Promise.all(promises);\n    }\n    /**\n\t * Adds the plugin to the collection. Exposed mainly for testing purposes.\n\t *\n\t * @param PluginConstructor The plugin constructor.\n\t * @param plugin The instance of the plugin.\n\t */ _add(PluginConstructor, plugin) {\n        this._plugins.set(PluginConstructor, plugin);\n        const pluginName = PluginConstructor.pluginName;\n        if (!pluginName) {\n            return;\n        }\n        if (this._plugins.has(pluginName)) {\n            /**\n\t\t\t * Two plugins with the same {@link module:core/plugin~PluginStaticMembers#pluginName} were loaded.\n\t\t\t * This will lead to runtime conflicts between these plugins.\n\t\t\t *\n\t\t\t * In practice, this warning usually means that new plugins were added to an existing CKEditor 5 build.\n\t\t\t * Plugins should always be added to a source version of the editor (`@ckeditor/ckeditor5-editor-*`),\n\t\t\t * not to an editor imported from one of the `@ckeditor/ckeditor5-build-*` packages.\n\t\t\t *\n\t\t\t * Check your import paths and the list of plugins passed to\n\t\t\t * {@link module:core/editor/editor~Editor.create `Editor.create()`}\n\t\t\t * or specified in {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n\t\t\t *\n\t\t\t * Predefined builds are a deprecated solution and we strongly advise\n\t\t\t * {@glink updating/nim-migration/migration-to-new-installation-methods migrating to new installation methods}.\n\t\t\t *\n\t\t\t * The second option is that your `node_modules/` directory contains duplicated versions of the same\n\t\t\t * CKEditor 5 packages. Normally, on clean installations, npm deduplicates packages in `node_modules/`, so\n\t\t\t * it may be enough to call `rm -rf node_modules && npm i`. However, if you installed conflicting versions\n\t\t\t * of some packages, their dependencies may need to be installed in more than one version which may lead to this\n\t\t\t * warning.\n\t\t\t *\n\t\t\t * Technically speaking, this error occurs because after adding a plugin to an existing editor build\n\t\t\t * the dependencies of this plugin are being duplicated.\n\t\t\t * They are already built into that editor build and now get added for the second time as dependencies\n\t\t\t * of the plugin you are installing.\n\t\t\t *\n\t\t\t * @error plugincollection-plugin-name-conflict\n\t\t\t * @param pluginName The duplicated plugin name.\n\t\t\t * @param plugin1 The first plugin constructor.\n\t\t\t * @param plugin2 The second plugin constructor.\n\t\t\t */ throw new CKEditorError('plugincollection-plugin-name-conflict', null, {\n                pluginName,\n                plugin1: this._plugins.get(pluginName).constructor,\n                plugin2: PluginConstructor\n            });\n        }\n        this._plugins.set(pluginName, plugin);\n    }\n}\n\n/**\n * Provides a common, higher-level environment for solutions that use multiple {@link module:core/editor/editor~Editor editors}\n * or plugins that work outside the editor. Use it instead of {@link module:core/editor/editor~Editor.create `Editor.create()`}\n * in advanced application integrations.\n *\n * All configuration options passed to a context will be used as default options for the editor instances initialized in that context.\n *\n * {@link module:core/contextplugin~ContextPlugin Context plugins} passed to a context instance will be shared among all\n * editor instances initialized in this context. These will be the same plugin instances for all the editors.\n *\n * **Note:** The context can only be initialized with {@link module:core/contextplugin~ContextPlugin context plugins}\n * (e.g. [comments](https://ckeditor.com/collaboration/comments/)). Regular {@link module:core/plugin~Plugin plugins} require an\n * editor instance to work and cannot be added to a context.\n *\n * **Note:** You can add a context plugin to an editor instance, though.\n *\n * If you are using multiple editor instances on one page and use any context plugins, create a context to share the configuration and\n * plugins among these editors. Some plugins will use the information about all existing editors to better integrate between them.\n *\n * If you are using plugins that do not require an editor to work (e.g. [comments](https://ckeditor.com/collaboration/comments/)),\n * enable and configure them using the context.\n *\n * If you are using only a single editor on each page, use {@link module:core/editor/editor~Editor.create `Editor.create()`} instead.\n * In such a case, a context instance will be created by the editor instance in a transparent way.\n *\n * See {@link ~Context.create `Context.create()`} for usage examples.\n */ class Context {\n    /**\n\t * Stores all the configurations specific to this context instance.\n\t */ config;\n    /**\n\t * The plugins loaded and in use by this context instance.\n\t */ plugins;\n    locale;\n    /**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t */ t;\n    /**\n\t * A list of editors that this context instance is injected to.\n\t */ editors;\n    /**\n\t * The default configuration which is built into the `Context` class.\n\t *\n\t * It is used in CKEditor 5 builds featuring `Context` to provide the default configuration options which are later used during the\n\t * context initialization.\n\t *\n\t * ```ts\n\t * Context.defaultConfig = {\n\t * \tfoo: 1,\n\t * \tbar: 2\n\t * };\n\t *\n\t * Context\n\t * \t.create()\n\t * \t.then( context => {\n\t * \t\tcontext.config.get( 'foo' ); // -> 1\n\t * \t\tcontext.config.get( 'bar' ); // -> 2\n\t * \t} );\n\t *\n\t * // The default options can be overridden by the configuration passed to create().\n\t * Context\n\t * \t.create( { bar: 3 } )\n\t * \t.then( context => {\n\t * \t\tcontext.config.get( 'foo' ); // -> 1\n\t * \t\tcontext.config.get( 'bar' ); // -> 3\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/context~Context.builtinPlugins `Context.builtinPlugins`}\n\t * and {@link module:core/editor/editor~Editor.defaultConfig `Editor.defaultConfig`}.\n\t */ static defaultConfig;\n    /**\n\t * An array of plugins built into the `Context` class.\n\t *\n\t * It is used in CKEditor 5 builds featuring `Context` to provide a list of context plugins which are later automatically initialized\n\t * during the context initialization.\n\t *\n\t * They will be automatically initialized by `Context` unless `config.plugins` is passed.\n\t *\n\t * ```ts\n\t * // Build some context plugins into the Context class first.\n\t * Context.builtinPlugins = [ FooPlugin, BarPlugin ];\n\t *\n\t * // Normally, you need to define config.plugins, but since Context.builtinPlugins was\n\t * // defined, now you can call create() without any configuration.\n\t * Context\n\t * \t.create()\n\t * \t.then( context => {\n\t * \t\tcontext.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t * \t\tcontext.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/context~Context.defaultConfig `Context.defaultConfig`}\n\t * and {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.\n\t */ static builtinPlugins;\n    /**\n\t * Reference to the editor which created the context.\n\t * Null when the context was created outside of the editor.\n\t *\n\t * It is used to destroy the context when removing the editor that has created the context.\n\t */ _contextOwner = null;\n    /**\n\t * Creates a context instance with a given configuration.\n\t *\n\t * Usually not to be used directly. See the static {@link module:core/context~Context.create `create()`} method.\n\t *\n\t * @param config The context configuration.\n\t */ constructor(config){\n        // We don't pass translations to the config, because its behavior of splitting keys\n        // with dots (e.g. `resize.width` => `resize: { width }`) breaks the translations.\n        const { translations, ...rest } = config || {};\n        this.config = new Config(rest, this.constructor.defaultConfig);\n        const availablePlugins = this.constructor.builtinPlugins;\n        this.config.define('plugins', availablePlugins);\n        this.plugins = new PluginCollection(this, availablePlugins);\n        const languageConfig = this.config.get('language') || {};\n        this.locale = new Locale({\n            uiLanguage: typeof languageConfig === 'string' ? languageConfig : languageConfig.ui,\n            contentLanguage: this.config.get('language.content'),\n            translations\n        });\n        this.t = this.locale.t;\n        this.editors = new Collection();\n    }\n    /**\n\t * Loads and initializes plugins specified in the configuration.\n\t *\n\t * @returns A promise which resolves once the initialization is completed, providing an array of loaded plugins.\n\t */ initPlugins() {\n        const plugins = this.config.get('plugins') || [];\n        const substitutePlugins = this.config.get('substitutePlugins') || [];\n        // Plugins for substitution should be checked as well.\n        for (const Plugin of plugins.concat(substitutePlugins)){\n            if (typeof Plugin != 'function') {\n                /**\n\t\t\t\t * Only a constructor function is allowed as a {@link module:core/contextplugin~ContextPlugin context plugin}.\n\t\t\t\t *\n\t\t\t\t * @error context-initplugins-constructor-only\n\t\t\t\t */ throw new CKEditorError('context-initplugins-constructor-only', null, {\n                    Plugin\n                });\n            }\n            if (Plugin.isContextPlugin !== true) {\n                /**\n\t\t\t\t * Only a plugin marked as a {@link module:core/contextplugin~ContextPlugin.isContextPlugin context plugin}\n\t\t\t\t * is allowed to be used with a context.\n\t\t\t\t *\n\t\t\t\t * @error context-initplugins-invalid-plugin\n\t\t\t\t */ throw new CKEditorError('context-initplugins-invalid-plugin', null, {\n                    Plugin\n                });\n            }\n        }\n        return this.plugins.init(plugins, [], substitutePlugins);\n    }\n    /**\n\t * Destroys the context instance and all editors used with the context,\n\t * releasing all resources used by the context.\n\t *\n\t * @returns A promise that resolves once the context instance is fully destroyed.\n\t */ destroy() {\n        return Promise.all(Array.from(this.editors, (editor)=>editor.destroy())).then(()=>this.plugins.destroy());\n    }\n    /**\n\t * Adds a reference to the editor which is used with this context.\n\t *\n\t * When the given editor has created the context, the reference to this editor will be stored\n\t * as a {@link ~Context#_contextOwner}.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @internal\n\t * @param isContextOwner Stores the given editor as a context owner.\n\t */ _addEditor(editor, isContextOwner) {\n        if (this._contextOwner) {\n            /**\n\t\t\t * Cannot add multiple editors to the context which is created by the editor.\n\t\t\t *\n\t\t\t * @error context-addeditor-private-context\n\t\t\t */ throw new CKEditorError('context-addeditor-private-context');\n        }\n        this.editors.add(editor);\n        if (isContextOwner) {\n            this._contextOwner = editor;\n        }\n    }\n    /**\n\t * Removes a reference to the editor which was used with this context.\n\t * When the context was created by the given editor, the context will be destroyed.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @internal\n\t * @return A promise that resolves once the editor is removed from the context or when the context was destroyed.\n\t */ _removeEditor(editor) {\n        if (this.editors.has(editor)) {\n            this.editors.remove(editor);\n        }\n        if (this._contextOwner === editor) {\n            return this.destroy();\n        }\n        return Promise.resolve();\n    }\n    /**\n\t * Returns the context configuration which will be copied to the editors created using this context.\n\t *\n\t * The configuration returned by this method has the plugins configuration removed &ndash; plugins are shared with all editors\n\t * through another mechanism.\n\t *\n\t * This method should only be used by the editor.\n\t *\n\t * @internal\n\t * @returns Configuration as a plain object.\n\t */ _getEditorConfig() {\n        const result = {};\n        for (const name of this.config.names()){\n            if (![\n                'plugins',\n                'removePlugins',\n                'extraPlugins'\n            ].includes(name)) {\n                result[name] = this.config.get(name);\n            }\n        }\n        return result;\n    }\n    /**\n\t * Creates and initializes a new context instance.\n\t *\n\t * ```ts\n\t * const commonConfig = { ... }; // Configuration for all the plugins and editors.\n\t * const editorPlugins = [ ... ]; // Regular plugins here.\n\t *\n\t * Context\n\t * \t.create( {\n\t * \t\t// Only context plugins here.\n\t * \t\tplugins: [ ... ],\n\t *\n\t * \t\t// Configure the language for all the editors (it cannot be overwritten).\n\t * \t\tlanguage: { ... },\n\t *\n\t * \t\t// Configuration for context plugins.\n\t * \t\tcomments: { ... },\n\t * \t\t...\n\t *\n\t * \t\t// Default configuration for editor plugins.\n\t * \t\ttoolbar: { ... },\n\t * \t\timage: { ... },\n\t * \t\t...\n\t * \t} )\n\t * \t.then( context => {\n\t * \t\tconst promises = [];\n\t *\n\t * \t\tpromises.push( ClassicEditor.create(\n\t * \t\t\tdocument.getElementById( 'editor1' ),\n\t * \t\t\t{\n\t * \t\t\t\teditorPlugins,\n\t * \t\t\t\tcontext\n\t * \t\t\t}\n\t * \t\t) );\n\t *\n\t * \t\tpromises.push( ClassicEditor.create(\n\t * \t\t\tdocument.getElementById( 'editor2' ),\n\t * \t\t\t{\n\t * \t\t\t\teditorPlugins,\n\t * \t\t\t\tcontext,\n\t * \t\t\t\ttoolbar: { ... } // You can overwrite the configuration of the context.\n\t * \t\t\t}\n\t * \t\t) );\n\t *\n\t * \t\treturn Promise.all( promises );\n\t * \t} );\n\t * ```\n\t *\n\t * @param config The context configuration.\n\t * @returns A promise resolved once the context is ready. The promise resolves with the created context instance.\n\t */ static create(config) {\n        return new Promise((resolve)=>{\n            const context = new this(config);\n            resolve(context.initPlugins().then(()=>context));\n        });\n    }\n}\n\n/**\n * The base class for {@link module:core/context~Context} plugin classes.\n *\n * A context plugin can either be initialized for an {@link module:core/editor/editor~Editor editor} or for\n * a {@link module:core/context~Context context}. In other words, it can either\n * work within one editor instance or with one or more editor instances that use a single context.\n * It is the context plugin's role to implement handling for both modes.\n *\n * There are a few rules for interaction between the editor plugins and context plugins:\n *\n * * A context plugin can require another context plugin.\n * * An {@link module:core/plugin~Plugin editor plugin} can require a context plugin.\n * * A context plugin MUST NOT require an {@link module:core/plugin~Plugin editor plugin}.\n */ class ContextPlugin extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * The context or editor instance.\n\t */ context;\n    /**\n\t * Creates a new plugin instance.\n\t */ constructor(context){\n        super();\n        this.context = context;\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this.stopListening();\n    }\n    /**\n\t * @inheritDoc\n\t */ static get isContextPlugin() {\n        return true;\n    }\n}\n\n/**\n * Collection of commands. Its instance is available in {@link module:core/editor/editor~Editor#commands `editor.commands`}.\n */ class CommandCollection {\n    /**\n\t * Command map.\n\t */ _commands;\n    /**\n\t * Creates collection instance.\n\t */ constructor(){\n        this._commands = new Map();\n    }\n    /**\n\t * Registers a new command.\n\t *\n\t * @param commandName The name of the command.\n\t */ add(commandName, command) {\n        this._commands.set(commandName, command);\n    }\n    /**\n\t * Retrieves a command from the collection.\n\t *\n\t * @param commandName The name of the command.\n\t */ get(commandName) {\n        return this._commands.get(commandName);\n    }\n    /**\n\t * Executes a command.\n\t *\n\t * @param commandName The name of the command.\n\t * @param commandParams Command parameters.\n\t * @returns The value returned by the {@link module:core/command~Command#execute `command.execute()`}.\n\t */ execute(commandName, ...commandParams) {\n        const command = this.get(commandName);\n        if (!command) {\n            /**\n\t\t\t * Command does not exist.\n\t\t\t *\n\t\t\t * @error commandcollection-command-not-found\n\t\t\t * @param commandName Name of the command.\n\t\t\t */ throw new CKEditorError('commandcollection-command-not-found', this, {\n                commandName\n            });\n        }\n        return command.execute(...commandParams);\n    }\n    /**\n\t * Returns iterator of command names.\n\t */ *names() {\n        yield* this._commands.keys();\n    }\n    /**\n\t * Returns iterator of command instances.\n\t */ *commands() {\n        yield* this._commands.values();\n    }\n    /**\n\t * Iterable interface.\n\t *\n\t * Returns `[ commandName, commandInstance ]` pairs.\n\t */ [Symbol.iterator]() {\n        return this._commands[Symbol.iterator]();\n    }\n    /**\n\t * Destroys all collection commands.\n\t */ destroy() {\n        for (const command of this.commands()){\n            command.destroy();\n        }\n    }\n}\n\n/**\n * A keystroke handler for editor editing. Its instance is available\n * in {@link module:core/editor/editor~Editor#keystrokes} so plugins\n * can register their keystrokes.\n *\n * E.g. an undo plugin would do this:\n *\n * ```ts\n * editor.keystrokes.set( 'Ctrl+Z', 'undo' );\n * editor.keystrokes.set( 'Ctrl+Shift+Z', 'redo' );\n * editor.keystrokes.set( 'Ctrl+Y', 'redo' );\n * ```\n */ class EditingKeystrokeHandler extends KeystrokeHandler {\n    /**\n\t * The editor instance.\n\t */ editor;\n    /**\n\t * Creates an instance of the keystroke handler.\n\t */ constructor(editor){\n        super();\n        this.editor = editor;\n    }\n    /**\n\t * Registers a handler for the specified keystroke.\n\t *\n\t * The handler can be specified as a command name or a callback.\n\t *\n\t * @param keystroke Keystroke defined in a format accepted by\n\t * the {@link module:utils/keyboard~parseKeystroke} function.\n\t * @param callback If a string is passed, then the keystroke will\n\t * {@link module:core/editor/editor~Editor#execute execute a command}.\n\t * If a function, then it will be called with the\n\t * {@link module:engine/view/observer/keyobserver~KeyEventData key event data} object and\n\t * a `cancel()` helper to both `preventDefault()` and `stopPropagation()` of the event.\n\t * @param options Additional options.\n\t * @param options.priority The priority of the keystroke callback. The higher the priority value\n\t * the sooner the callback will be executed. Keystrokes having the same priority\n\t * are called in the order they were added.\n\t */ set(keystroke, callback, options = {}) {\n        if (typeof callback == 'string') {\n            const commandName = callback;\n            callback = (evtData, cancel)=>{\n                this.editor.execute(commandName);\n                cancel();\n            };\n        }\n        super.set(keystroke, callback, options);\n    }\n}\n\nconst DEFAULT_CATEGORY_ID = 'contentEditing';\nconst DEFAULT_GROUP_ID = 'common';\n/**\n * A common namespace for various accessibility features of the editor.\n *\n * **Information about editor keystrokes**\n *\n * * The information about keystrokes available in the editor is stored in the {@link #keystrokeInfos} property.\n * * New info entries can be added using the {@link #addKeystrokeInfoCategory}, {@link #addKeystrokeInfoGroup},\n * and {@link #addKeystrokeInfos} methods.\n */ class Accessibility {\n    /**\n\t * Stores information about keystrokes brought by editor features for the users to interact with the editor, mainly\n\t * keystroke combinations and their accessible labels.\n\t *\n\t * This information is particularly useful for screen reader and other assistive technology users. It gets displayed\n\t * by the {@link module:ui/editorui/accessibilityhelp/accessibilityhelp~AccessibilityHelp Accessibility help} dialog.\n\t *\n\t * Keystrokes are organized in categories and groups. They can be added using ({@link #addKeystrokeInfoCategory},\n\t * {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}) methods.\n\t *\n\t * Please note that:\n\t * * two categories are always available:\n\t *   * `'contentEditing'` for keystrokes related to content creation,\n\t *   * `'navigation'` for keystrokes related to navigation in the UI and the content.\n\t * * unless specified otherwise, new keystrokes are added into the `'contentEditing'` category and the `'common'`\n\t * keystroke group within that category while using the {@link #addKeystrokeInfos} method.\n\t */ keystrokeInfos = new Map();\n    /**\n\t * The editor instance.\n\t */ _editor;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        this._editor = editor;\n        const isMenuBarVisible = editor.config.get('menuBar.isVisible');\n        const t = editor.locale.t;\n        this.addKeystrokeInfoCategory({\n            id: DEFAULT_CATEGORY_ID,\n            label: t('Content editing keystrokes'),\n            description: t('These keyboard shortcuts allow for quick access to content editing features.')\n        });\n        const navigationKeystrokes = [\n            {\n                label: t('Close contextual balloons, dropdowns, and dialogs'),\n                keystroke: 'Esc'\n            },\n            {\n                label: t('Open the accessibility help dialog'),\n                keystroke: 'Alt+0'\n            },\n            {\n                label: t('Move focus between form fields (inputs, buttons, etc.)'),\n                keystroke: [\n                    [\n                        'Tab'\n                    ],\n                    [\n                        'Shift+Tab'\n                    ]\n                ]\n            },\n            {\n                label: t('Move focus to the toolbar, navigate between toolbars'),\n                keystroke: 'Alt+F10',\n                mayRequireFn: true\n            },\n            {\n                label: t('Navigate through the toolbar or menu bar'),\n                keystroke: [\n                    [\n                        'arrowup'\n                    ],\n                    [\n                        'arrowright'\n                    ],\n                    [\n                        'arrowdown'\n                    ],\n                    [\n                        'arrowleft'\n                    ]\n                ]\n            },\n            {\n                // eslint-disable-next-line max-len\n                label: t('Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.'),\n                keystroke: [\n                    [\n                        'Enter'\n                    ],\n                    [\n                        'Space'\n                    ]\n                ]\n            }\n        ];\n        if (isMenuBarVisible) {\n            navigationKeystrokes.push({\n                label: t('Move focus to the menu bar, navigate between menu bars'),\n                keystroke: 'Alt+F9',\n                mayRequireFn: true\n            });\n        }\n        this.addKeystrokeInfoCategory({\n            id: 'navigation',\n            label: t('User interface and content navigation keystrokes'),\n            description: t('Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.'),\n            groups: [\n                {\n                    id: 'common',\n                    keystrokes: navigationKeystrokes\n                }\n            ]\n        });\n    }\n    /**\n\t * Adds a top-level category in the {@link #keystrokeInfos keystroke information database} with a label and optional description.\n\t *\n\t * Categories organize keystrokes and help users to find the right keystroke. Each category can have multiple groups\n\t * of keystrokes that narrow down the context in which the keystrokes are available. Every keystroke category comes\n\t * with a `'common'` group by default.\n\t *\n\t * By default, two categories are available:\n\t * * `'contentEditing'` for keystrokes related to content creation,\n\t * * `'navigation'` for keystrokes related to navigation in the UI and the content.\n\t *\n\t * To create a new keystroke category with new groups, use the following code:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfoCategory( {\n\t * \t\t\tid: 'myCategory',\n\t * \t\t\tlabel: t( 'My category' ),\n\t * \t\t\tdescription: t( 'My category description.' ),\n\t * \t\t\tgroups: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tid: 'myGroup',\n\t * \t\t\t\t\tlabel: t( 'My keystroke group' ),\n\t * \t\t\t\t\tkeystrokes: [\n\t * \t\t\t\t\t\t{\n\t * \t\t\t\t\t\t\tlabel: t( 'Keystroke label 1' ),\n\t * \t\t\t\t\t\t\tkeystroke: 'Ctrl+Shift+N'\n\t * \t\t\t\t\t\t},\n\t * \t\t\t\t\t\t{\n\t * \t\t\t\t\t\t\tlabel: t( 'Keystroke label 2' ),\n\t * \t\t\t\t\t\t\tkeystroke: 'Ctrl+Shift+M'\n\t * \t\t\t\t\t\t}\n\t * \t\t\t\t\t]\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t};\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}.\n\t */ addKeystrokeInfoCategory({ id, label, description, groups }) {\n        this.keystrokeInfos.set(id, {\n            id,\n            label,\n            description,\n            groups: new Map()\n        });\n        this.addKeystrokeInfoGroup({\n            categoryId: id,\n            id: DEFAULT_GROUP_ID\n        });\n        if (groups) {\n            groups.forEach((group)=>{\n                this.addKeystrokeInfoGroup({\n                    categoryId: id,\n                    ...group\n                });\n            });\n        }\n    }\n    /**\n\t * Adds a group of keystrokes in a specific category to the {@link #keystrokeInfos keystroke information database}.\n\t *\n\t * Groups narrow down the context in which the keystrokes are available. When `categoryId` is not specified,\n\t * the group goes to the `'contentEditing'` category (default).\n\t *\n\t * To create a new group within an existing category, use the following code:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfoGroup( {\n\t * \t\t\tid: 'myGroup',\n\t * \t\t\tcategoryId: 'navigation',\n\t * \t\t\tlabel: t( 'My keystroke group' ),\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label 1' ),\n\t * \t\t\t\t\tkeystroke: 'Ctrl+Shift+N'\n\t * \t\t\t\t},\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label 2' ),\n\t * \t\t\t\t\tkeystroke: 'Ctrl+Shift+M'\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoCategory}, and {@link #addKeystrokeInfos}.\n\t */ addKeystrokeInfoGroup({ categoryId = DEFAULT_CATEGORY_ID, id, label, keystrokes }) {\n        const category = this.keystrokeInfos.get(categoryId);\n        if (!category) {\n            throw new CKEditorError('accessibility-unknown-keystroke-info-category', this._editor, {\n                groupId: id,\n                categoryId\n            });\n        }\n        category.groups.set(id, {\n            id,\n            label,\n            keystrokes: keystrokes || []\n        });\n    }\n    /**\n\t * Adds information about keystrokes to the {@link #keystrokeInfos keystroke information database}.\n\t *\n\t * Keystrokes without specified `groupId` or `categoryId` go to the `'common'` group in the `'contentEditing'` category (default).\n\t *\n\t * To add a keystroke brought by your plugin (using default group and category), use the following code:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfos( {\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label' ),\n\t * \t\t\t\t\tkeystroke: 'CTRL+B'\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t * To add a keystroke in a specific existing `'widget'` group in the default `'contentEditing'` category:\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfos( {\n\t * \t\t\t// Add a keystroke to the existing \"widget\" group.\n\t * \t\t\tgroupId: 'widget',\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'A an action on a selected widget' ),\n\t * \t\t\t\t\tkeystroke: 'Ctrl+D',\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * To add a keystroke to another existing category (using default group):\n\t *\n\t * ```js\n\t * class MyPlugin extends Plugin {\n\t * \t// ...\n\t * \tinit() {\n\t * \t\tconst editor = this.editor;\n\t * \t\tconst t = editor.t;\n\t *\n\t * \t\t// ...\n\t *\n\t * \t\teditor.accessibility.addKeystrokeInfos( {\n\t * \t\t\t// Add keystrokes to the \"navigation\" category (one of defaults).\n\t * \t\t\tcategoryId: 'navigation',\n\t * \t\t\tkeystrokes: [\n\t * \t\t\t\t{\n\t * \t\t\t\t\tlabel: t( 'Keystroke label' ),\n\t * \t\t\t\t\tkeystroke: 'CTRL+B'\n\t * \t\t\t\t}\n\t * \t\t\t]\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfoCategory}.\n\t */ addKeystrokeInfos({ categoryId = DEFAULT_CATEGORY_ID, groupId = DEFAULT_GROUP_ID, keystrokes }) {\n        if (!this.keystrokeInfos.has(categoryId)) {\n            /**\n\t\t\t * Cannot add keystrokes in an unknown category. Use\n\t\t\t * {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory}\n\t\t\t * to add a new category or make sure the specified category exists.\n\t\t\t *\n\t\t\t * @error accessibility-unknown-keystroke-info-category\n\t\t\t * @param categoryId The id of the unknown keystroke category.\n\t\t\t * @param keystrokes Keystroke definitions about to be added.\n\t\t\t */ throw new CKEditorError('accessibility-unknown-keystroke-info-category', this._editor, {\n                categoryId,\n                keystrokes\n            });\n        }\n        const category = this.keystrokeInfos.get(categoryId);\n        if (!category.groups.has(groupId)) {\n            /**\n\t\t\t * Cannot add keystrokes to an unknown group.\n\t\t\t *\n\t\t\t * Use {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup}\n\t\t\t * to add a new group or make sure the specified group exists.\n\t\t\t *\n\t\t\t * @error accessibility-unknown-keystroke-info-group\n\t\t\t * @param groupId The id of the unknown keystroke group.\n\t\t\t * @param categoryId The id of category the unknown group should belong to.\n\t\t\t * @param keystrokes Keystroke definitions about to be added.\n\t\t\t */ throw new CKEditorError('accessibility-unknown-keystroke-info-group', this._editor, {\n                groupId,\n                categoryId,\n                keystrokes\n            });\n        }\n        category.groups.get(groupId).keystrokes.push(...keystrokes);\n    }\n}\n\n/**\n * The class representing a basic, generic editor.\n *\n * Check out the list of its subclasses to learn about specific editor implementations.\n *\n * All editor implementations (like {@link module:editor-classic/classiceditor~ClassicEditor} or\n * {@link module:editor-inline/inlineeditor~InlineEditor}) should extend this class. They can add their\n * own methods and properties.\n *\n * When you are implementing a plugin, this editor represents the API\n * which your plugin can expect to get when using its {@link module:core/plugin~Plugin#editor} property.\n *\n * This API should be sufficient in order to implement the \"editing\" part of your feature\n * (schema definition, conversion, commands, keystrokes, etc.).\n * It does not define the editor UI, which is available only if\n * the specific editor implements also the {@link ~Editor#ui} property\n * (as most editor implementations do).\n */ class Editor extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * A namespace for the accessibility features of the editor.\n\t */ accessibility;\n    /**\n\t * Commands registered to the editor.\n\t *\n\t * Use the shorthand {@link #execute `editor.execute()`} method to execute commands:\n\t *\n\t * ```ts\n\t * // Execute the bold command:\n\t * editor.execute( 'bold' );\n\t *\n\t * // Check the state of the bold command:\n\t * editor.commands.get( 'bold' ).value;\n\t * ```\n\t */ commands;\n    /**\n\t * Stores all configurations specific to this editor instance.\n\t *\n\t * ```ts\n\t * editor.config.get( 'image.toolbar' );\n\t * // -> [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ]\n\t * ```\n\t */ config;\n    /**\n\t * Conversion manager through which you can register model-to-view and view-to-model converters.\n\t *\n\t * See the {@link module:engine/conversion/conversion~Conversion} documentation to learn how to add converters.\n\t */ conversion;\n    /**\n\t * The {@link module:engine/controller/datacontroller~DataController data controller}.\n\t * Used e.g. for setting and retrieving the editor data.\n\t */ data;\n    /**\n\t * The {@link module:engine/controller/editingcontroller~EditingController editing controller}.\n\t * Controls user input and rendering the content for editing.\n\t */ editing;\n    /**\n\t * The locale instance.\n\t */ locale;\n    /**\n\t * The editor's model.\n\t *\n\t * The central point of the editor's abstract data model.\n\t */ model;\n    /**\n\t * The plugins loaded and in use by this editor instance.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'ClipboardPipeline' ); // -> An instance of the clipboard pipeline plugin.\n\t * ```\n\t */ plugins;\n    /**\n\t * An instance of the {@link module:core/editingkeystrokehandler~EditingKeystrokeHandler}.\n\t *\n\t * It allows setting simple keystrokes:\n\t *\n\t * ```ts\n\t * // Execute the bold command on Ctrl+E:\n\t * editor.keystrokes.set( 'Ctrl+E', 'bold' );\n\t *\n\t * // Execute your own callback:\n\t * editor.keystrokes.set( 'Ctrl+E', ( data, cancel ) => {\n\t * \tconsole.log( data.keyCode );\n\t *\n\t * \t// Prevent the default (native) action and stop the underlying keydown event\n\t * \t// so no other editor feature will interfere.\n\t * \tcancel();\n\t * } );\n\t * ```\n\t *\n\t * Note: Certain typing-oriented keystrokes (like <kbd>Backspace</kbd> or <kbd>Enter</kbd>) are handled\n\t * by a low-level mechanism and trying to listen to them via the keystroke handler will not work reliably.\n\t * To handle these specific keystrokes, see the events fired by the\n\t * {@link module:engine/view/document~Document editing view document} (`editor.editing.view.document`).\n\t */ keystrokes;\n    /**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t *\n\t * @see module:utils/locale~Locale#t\n\t */ t;\n    /**\n\t * The default configuration which is built into the editor class.\n\t *\n\t * It is used in CKEditor 5 builds to provide the default configuration options which are later used during the editor initialization.\n\t *\n\t * ```ts\n\t * ClassicEditor.defaultConfig = {\n\t * \tfoo: 1,\n\t * \tbar: 2\n\t * };\n\t *\n\t * ClassicEditor\n\t * \t.create( sourceElement )\n\t * \t.then( editor => {\n\t * \t\teditor.config.get( 'foo' ); // -> 1\n\t * \t\teditor.config.get( 'bar' ); // -> 2\n\t * \t} );\n\t *\n\t * // The default options can be overridden by the configuration passed to create().\n\t * ClassicEditor\n\t * \t.create( sourceElement, { bar: 3 } )\n\t * \t.then( editor => {\n\t * \t\teditor.config.get( 'foo' ); // -> 1\n\t * \t\teditor.config.get( 'bar' ); // -> 3\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/editor/editor~Editor.builtinPlugins}.\n\t */ static defaultConfig;\n    /**\n\t * An array of plugins built into this editor class.\n\t *\n\t * It is used in CKEditor 5 builds to provide a list of plugins which are later automatically initialized\n\t * during the editor initialization.\n\t *\n\t * They will be automatically initialized by the editor, unless listed in `config.removePlugins` and\n\t * unless `config.plugins` is passed.\n\t *\n\t * ```ts\n\t * // Build some plugins into the editor class first.\n\t * ClassicEditor.builtinPlugins = [ FooPlugin, BarPlugin ];\n\t *\n\t * // Normally, you need to define config.plugins, but since ClassicEditor.builtinPlugins was\n\t * // defined, now you can call create() without any configuration.\n\t * ClassicEditor\n\t * \t.create( sourceElement )\n\t * \t.then( editor => {\n\t * \t\teditor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t * \t\teditor.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t * \t} );\n\t *\n\t * ClassicEditor\n\t * \t.create( sourceElement, {\n\t * \t\t// Do not initialize these plugins (note: it is defined by a string):\n\t * \t\tremovePlugins: [ 'Foo' ]\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\teditor.plugins.get( FooPlugin ); // -> Undefined.\n\t * \t\teditor.config.get( BarPlugin ); // -> An instance of the Bar plugin.\n\t * \t} );\n\t *\n\t * ClassicEditor\n\t * \t.create( sourceElement, {\n\t * \t\t// Load only this plugin. It can also be defined by a string if\n\t * \t\t// this plugin was built into the editor class.\n\t * \t\tplugins: [ FooPlugin ]\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\teditor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.\n\t * \t\teditor.config.get( BarPlugin ); // -> Undefined.\n\t * \t} );\n\t * ```\n\t *\n\t * See also {@link module:core/editor/editor~Editor.defaultConfig}.\n\t */ static builtinPlugins;\n    /**\n\t * The editor context.\n\t * When it is not provided through the configuration, the editor creates it.\n\t */ _context;\n    /**\n\t * A set of lock IDs for the {@link #isReadOnly} getter.\n\t */ _readOnlyLocks;\n    /**\n\t * Creates a new instance of the editor class.\n\t *\n\t * Usually, not to be used directly. See the static {@link module:core/editor/editor~Editor.create `create()`} method.\n\t *\n\t * @param config The editor configuration.\n\t */ constructor(config = {}){\n        super();\n        if ('sanitizeHtml' in config) {\n            /**\n\t\t\t * Configuration property `config.sanitizeHtml` was removed in CKEditor version 43.1.0 and is no longer supported.\n\t\t\t *\n\t\t\t * Please use `config.htmlEmbed.sanitizeHtml` and/or `config.mergeFields.sanitizeHtml` instead.\n\t\t\t *\n\t\t\t * @error editor-config-sanitizehtml-not-supported\n\t\t\t */ throw new CKEditorError('editor-config-sanitizehtml-not-supported');\n        }\n        const constructor = this.constructor;\n        // We don't pass translations to the config, because its behavior of splitting keys\n        // with dots (e.g. `resize.width` => `resize: { width }`) breaks the translations.\n        const { translations: defaultTranslations, ...defaultConfig } = constructor.defaultConfig || {};\n        const { translations = defaultTranslations, ...rest } = config;\n        // Prefer the language passed as the argument to the constructor instead of the constructor's `defaultConfig`, if both are set.\n        const language = config.language || defaultConfig.language;\n        this._context = config.context || new Context({\n            language,\n            translations\n        });\n        this._context._addEditor(this, !config.context);\n        // Clone the plugins to make sure that the plugin array will not be shared\n        // between editors and make the watchdog feature work correctly.\n        const availablePlugins = Array.from(constructor.builtinPlugins || []);\n        this.config = new Config(rest, defaultConfig);\n        this.config.define('plugins', availablePlugins);\n        this.config.define(this._context._getEditorConfig());\n        this.plugins = new PluginCollection(this, availablePlugins, this._context.plugins);\n        this.locale = this._context.locale;\n        this.t = this.locale.t;\n        this._readOnlyLocks = new Set();\n        this.commands = new CommandCollection();\n        this.set('state', 'initializing');\n        this.once('ready', ()=>this.state = 'ready', {\n            priority: 'high'\n        });\n        this.once('destroy', ()=>this.state = 'destroyed', {\n            priority: 'high'\n        });\n        this.model = new Model();\n        this.on('change:isReadOnly', ()=>{\n            this.model.document.isReadOnly = this.isReadOnly;\n        });\n        const stylesProcessor = new StylesProcessor();\n        this.data = new DataController(this.model, stylesProcessor);\n        this.editing = new EditingController(this.model, stylesProcessor);\n        this.editing.view.document.bind('isReadOnly').to(this);\n        this.conversion = new Conversion([\n            this.editing.downcastDispatcher,\n            this.data.downcastDispatcher\n        ], this.data.upcastDispatcher);\n        this.conversion.addAlias('dataDowncast', this.data.downcastDispatcher);\n        this.conversion.addAlias('editingDowncast', this.editing.downcastDispatcher);\n        this.keystrokes = new EditingKeystrokeHandler(this);\n        this.keystrokes.listenTo(this.editing.view.document);\n        this.accessibility = new Accessibility(this);\n    }\n    /**\n\t * Defines whether the editor is in the read-only mode.\n\t *\n\t * In read-only mode the editor {@link #commands commands} are disabled so it is not possible\n\t * to modify the document by using them. Also, the editable element(s) become non-editable.\n\t *\n\t * In order to make the editor read-only, you need to call the {@link #enableReadOnlyMode} method:\n\t *\n\t * ```ts\n\t * editor.enableReadOnlyMode( 'feature-id' );\n\t * ```\n\t *\n     * Later, to turn off the read-only mode, call {@link #disableReadOnlyMode}:\n\t *\n\t * ```ts\n\t * editor.disableReadOnlyMode( 'feature-id' );\n\t * ```\n\t *\n\t * @readonly\n\t * @observable\n\t */ get isReadOnly() {\n        return this._readOnlyLocks.size > 0;\n    }\n    set isReadOnly(value) {\n        /**\n\t\t * The {@link module:core/editor/editor~Editor#isReadOnly Editor#isReadOnly} property is read-only since version `34.0.0`\n\t\t * and can be set only using {@link module:core/editor/editor~Editor#enableReadOnlyMode `Editor#enableReadOnlyMode( lockId )`} and\n\t\t * {@link module:core/editor/editor~Editor#disableReadOnlyMode `Editor#disableReadOnlyMode( lockId )`}.\n\t\t *\n\t\t * Usage before version `34.0.0`:\n\t\t *\n\t\t * ```ts\n\t\t * editor.isReadOnly = true;\n\t\t * editor.isReadOnly = false;\n\t\t * ```\n\t\t *\n\t\t * Usage since version `34.0.0`:\n\t\t *\n\t\t * ```ts\n\t\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t\t * editor.disableReadOnlyMode( 'my-feature-id' );\n\t\t * ```\n\t\t *\n\t\t * @error editor-isreadonly-has-no-setter\n\t\t */ throw new CKEditorError('editor-isreadonly-has-no-setter');\n    }\n    /**\n\t * Turns on the read-only mode in the editor.\n\t *\n\t * Editor can be switched to or out of the read-only mode by many features, under various circumstances. The editor supports locking\n\t * mechanism for the read-only mode. It enables easy control over the read-only mode when many features wants to turn it on or off at\n\t * the same time, without conflicting with each other. It guarantees that you will not make the editor editable accidentally (which\n\t * could lead to errors).\n\t *\n\t * Each read-only mode request is identified by a unique id (also called \"lock\"). If multiple plugins requested to turn on the\n\t * read-only mode, then, the editor will become editable only after all these plugins turn the read-only mode off (using the same ids).\n\t *\n\t * Note, that you cannot force the editor to disable the read-only mode if other plugins set it.\n\t *\n\t * After the first `enableReadOnlyMode()` call, the {@link #isReadOnly `isReadOnly` property} will be set to `true`:\n\t *\n\t * ```ts\n\t * editor.isReadOnly; // `false`.\n\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t * editor.isReadOnly; // `true`.\n\t * ```\n\t *\n\t * You can turn off the read-only mode (\"clear the lock\") using the {@link #disableReadOnlyMode `disableReadOnlyMode()`} method:\n\t *\n\t * ```ts\n\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t * // ...\n\t * editor.disableReadOnlyMode( 'my-feature-id' );\n\t * editor.isReadOnly; // `false`.\n\t * ```\n\t *\n\t * All \"locks\" need to be removed to enable editing:\n\t *\n\t * ```ts\n\t * editor.enableReadOnlyMode( 'my-feature-id' );\n\t * editor.enableReadOnlyMode( 'my-other-feature-id' );\n\t * // ...\n\t * editor.disableReadOnlyMode( 'my-feature-id' );\n\t * editor.isReadOnly; // `true`.\n\t * editor.disableReadOnlyMode( 'my-other-feature-id' );\n\t * editor.isReadOnly; // `false`.\n\t * ```\n\t *\n\t * @param lockId A unique ID for setting the editor to the read-only state.\n\t */ enableReadOnlyMode(lockId) {\n        if (typeof lockId !== 'string' && typeof lockId !== 'symbol') {\n            /**\n\t\t\t * The lock ID is missing or it is not a string or symbol.\n\t\t\t *\n\t\t\t * @error editor-read-only-lock-id-invalid\n\t\t\t */ throw new CKEditorError('editor-read-only-lock-id-invalid', null, {\n                lockId\n            });\n        }\n        if (this._readOnlyLocks.has(lockId)) {\n            return;\n        }\n        this._readOnlyLocks.add(lockId);\n        if (this._readOnlyLocks.size === 1) {\n            // Manually fire the `change:isReadOnly` event as only getter is provided.\n            this.fire('change:isReadOnly', 'isReadOnly', true, false);\n        }\n    }\n    /**\n\t * Removes the read-only lock from the editor with given lock ID.\n\t *\n\t * When no lock is present on the editor anymore, then the {@link #isReadOnly `isReadOnly` property} will be set to `false`.\n\t *\n\t * @param lockId The lock ID for setting the editor to the read-only state.\n\t */ disableReadOnlyMode(lockId) {\n        if (typeof lockId !== 'string' && typeof lockId !== 'symbol') {\n            throw new CKEditorError('editor-read-only-lock-id-invalid', null, {\n                lockId\n            });\n        }\n        if (!this._readOnlyLocks.has(lockId)) {\n            return;\n        }\n        this._readOnlyLocks.delete(lockId);\n        if (this._readOnlyLocks.size === 0) {\n            // Manually fire the `change:isReadOnly` event as only getter is provided.\n            this.fire('change:isReadOnly', 'isReadOnly', false, true);\n        }\n    }\n    /**\n\t * Sets the data in the editor.\n\t *\n\t * ```ts\n\t * editor.setData( '<p>This is editor!</p>' );\n\t * ```\n\t *\n\t * If your editor implementation uses multiple roots, you should pass an object with keys corresponding\n\t * to the editor root names and values equal to the data that should be set in each root:\n\t *\n\t * ```ts\n\t * editor.setData( {\n\t *     header: '<p>Content for header part.</p>',\n\t *     content: '<p>Content for main part.</p>',\n\t *     footer: '<p>Content for footer part.</p>'\n\t * } );\n\t * ```\n\t *\n\t * By default the editor accepts HTML. This can be controlled by injecting a different data processor.\n\t * See the {@glink features/markdown Markdown output} guide for more details.\n\t *\n\t * @param data Input data.\n\t */ setData(data) {\n        this.data.set(data);\n    }\n    /**\n\t * Gets the data from the editor.\n\t *\n\t * ```ts\n\t * editor.getData(); // -> '<p>This is editor!</p>'\n\t * ```\n\t *\n\t * If your editor implementation uses multiple roots, you should pass root name as one of the options:\n\t *\n\t * ```ts\n\t * editor.getData( { rootName: 'header' } ); // -> '<p>Content for header part.</p>'\n\t * ```\n\t *\n\t * By default, the editor outputs HTML. This can be controlled by injecting a different data processor.\n\t * See the {@glink features/markdown Markdown output} guide for more details.\n\t *\n\t * A warning is logged when you try to retrieve data for a detached root, as most probably this is a mistake. A detached root should\n\t * be treated like it is removed, and you should not save its data. Note, that the detached root data is always an empty string.\n\t *\n\t * @param options Additional configuration for the retrieved data.\n\t * Editor features may introduce more configuration options that can be set through this parameter.\n\t * @param options.rootName Root name. Defaults to `'main'`.\n\t * @param options.trim Whether returned data should be trimmed. This option is set to `'empty'` by default,\n\t * which means that whenever editor content is considered empty, an empty string is returned. To turn off trimming\n\t * use `'none'`. In such cases exact content will be returned (for example `'<p>&nbsp;</p>'` for an empty editor).\n\t * @returns Output data.\n\t */ getData(options) {\n        return this.data.get(options);\n    }\n    /**\n\t * Loads and initializes plugins specified in the configuration.\n\t *\n\t * @returns A promise which resolves once the initialization is completed, providing an array of loaded plugins.\n\t */ initPlugins() {\n        const config = this.config;\n        const plugins = config.get('plugins');\n        const removePlugins = config.get('removePlugins') || [];\n        const extraPlugins = config.get('extraPlugins') || [];\n        const substitutePlugins = config.get('substitutePlugins') || [];\n        return this.plugins.init(plugins.concat(extraPlugins), removePlugins, substitutePlugins);\n    }\n    /**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * **Note** The editor cannot be destroyed during the initialization phase so if it is called\n\t * while the editor {@link #state is being initialized}, it will wait for the editor initialization before destroying it.\n\t *\n\t * @fires destroy\n\t * @returns A promise that resolves once the editor instance is fully destroyed.\n\t */ destroy() {\n        let readyPromise = Promise.resolve();\n        if (this.state == 'initializing') {\n            readyPromise = new Promise((resolve)=>this.once('ready', resolve));\n        }\n        return readyPromise.then(()=>{\n            this.fire('destroy');\n            this.stopListening();\n            this.commands.destroy();\n        }).then(()=>this.plugins.destroy()).then(()=>{\n            this.model.destroy();\n            this.data.destroy();\n            this.editing.destroy();\n            this.keystrokes.destroy();\n        })// Remove the editor from the context.\n        // When the context was created by this editor, the context will be destroyed.\n        .then(()=>this._context._removeEditor(this));\n    }\n    /**\n\t * Executes the specified command with given parameters.\n\t *\n\t * Shorthand for:\n\t *\n\t * ```ts\n\t * editor.commands.get( commandName ).execute( ... );\n\t * ```\n\t *\n\t * @param commandName The name of the command to execute.\n\t * @param commandParams Command parameters.\n\t * @returns The value returned by the {@link module:core/commandcollection~CommandCollection#execute `commands.execute()`}.\n\t */ execute(commandName, ...commandParams) {\n        try {\n            return this.commands.execute(commandName, ...commandParams);\n        } catch (err) {\n            // @if CK_DEBUG // throw err;\n            /* istanbul ignore next -- @preserve */ CKEditorError.rethrowUnexpectedError(err, this);\n        }\n    }\n    /**\n\t * Focuses the editor.\n\t *\n\t * **Note** To explicitly focus the editing area of the editor, use the\n\t * {@link module:engine/view/view~View#focus `editor.editing.view.focus()`} method of the editing view.\n\t *\n\t * Check out the {@glink framework/deep-dive/ui/focus-tracking#focus-in-the-editor-ui Focus in the editor UI} section\n\t * of the {@glink framework/deep-dive/ui/focus-tracking Deep dive into focus tracking} guide to learn more.\n\t */ focus() {\n        this.editing.view.focus();\n    }\n    /* istanbul ignore next -- @preserve */ /**\n\t * Creates and initializes a new editor instance.\n\t *\n\t * This is an abstract method. Every editor type needs to implement its own initialization logic.\n\t *\n\t * See the `create()` methods of the existing editor types to learn how to use them:\n\t *\n\t * * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}\n\t * * {@link module:editor-balloon/ballooneditor~BalloonEditor.create `BalloonEditor.create()`}\n\t * * {@link module:editor-decoupled/decouplededitor~DecoupledEditor.create `DecoupledEditor.create()`}\n\t * * {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`}\n\t */ static create(...args) {\n        throw new Error('This is an abstract method.');\n    }\n    /**\n\t * The {@link module:core/context~Context} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */ static Context = Context;\n    /**\n\t * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */ static EditorWatchdog = EditorWatchdog;\n    /**\n\t * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.\n\t *\n\t * Exposed as static editor field for easier access in editor builds.\n\t */ static ContextWatchdog = ContextWatchdog;\n}\n /**\n * This error is thrown when trying to pass a `<textarea>` element to a `create()` function of an editor class.\n *\n * The only editor type which can be initialized on `<textarea>` elements is\n * the {@glink getting-started/setup/editor-types#classic-editor classic editor}.\n * This editor hides the passed element and inserts its own UI next to it. Other types of editors reuse the passed element as their root\n * editable element and therefore `<textarea>` is not appropriate for them. Use a `<div>` or another text container instead:\n *\n * ```html\n * <div id=\"editor\">\n * \t<p>Initial content.</p>\n * </div>\n * ```\n *\n * @error editor-wrong-element\n */\n\n/**\n * Checks if the editor is initialized on a `<textarea>` element that belongs to a form. If yes, it updates the editor's element\n * content before submitting the form.\n *\n * This helper requires the {@link module:core/editor/utils/elementapimixin~ElementApi ElementApi interface}.\n *\n * @param editor Editor instance.\n */ function attachToForm(editor) {\n    if (!isFunction(editor.updateSourceElement)) {\n        /**\n\t\t * The editor passed to `attachToForm()` must implement the\n\t\t * {@link module:core/editor/utils/elementapimixin~ElementApi} interface.\n\t\t *\n\t\t * @error attachtoform-missing-elementapi-interface\n\t\t */ throw new CKEditorError('attachtoform-missing-elementapi-interface', editor);\n    }\n    const sourceElement = editor.sourceElement;\n    // Only when replacing a textarea which is inside of a form element.\n    if (isTextArea(sourceElement) && sourceElement.form) {\n        let originalSubmit;\n        const form = sourceElement.form;\n        const onSubmit = ()=>editor.updateSourceElement();\n        // Replace the original form#submit() to call a custom submit function first.\n        // Check if #submit is a function because the form might have an input named \"submit\".\n        if (isFunction(form.submit)) {\n            originalSubmit = form.submit;\n            form.submit = ()=>{\n                onSubmit();\n                originalSubmit.apply(form);\n            };\n        }\n        // Update the replaced textarea with data before each form#submit event.\n        form.addEventListener('submit', onSubmit);\n        // Remove the submit listener and revert the original submit method on\n        // editor#destroy.\n        editor.on('destroy', ()=>{\n            form.removeEventListener('submit', onSubmit);\n            if (originalSubmit) {\n                form.submit = originalSubmit;\n            }\n        });\n    }\n}\nfunction isTextArea(sourceElement) {\n    return !!sourceElement && sourceElement.tagName.toLowerCase() === 'textarea';\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module core/editor/utils/dataapimixin\n */ /**\n * Implementation of the {@link module:core/editor/utils/dataapimixin~DataApi}.\n *\n * @deprecated This functionality is already implemented by the `Editor` class.\n */ function DataApiMixin(base) {\n    return base;\n}\n\n/**\n * Implementation of the {@link module:core/editor/utils/elementapimixin~ElementApi}.\n */ function ElementApiMixin(base) {\n    class Mixin extends base {\n        sourceElement;\n        updateSourceElement(data) {\n            if (!this.sourceElement) {\n                /**\n\t\t\t\t * Cannot update the source element of a detached editor.\n\t\t\t\t *\n\t\t\t\t * The {@link module:core/editor/utils/elementapimixin~ElementApi#updateSourceElement `updateSourceElement()`}\n\t\t\t\t * method cannot be called if you did not pass an element to `Editor.create()`.\n\t\t\t\t *\n\t\t\t\t * @error editor-missing-sourceelement\n\t\t\t\t */ throw new CKEditorError('editor-missing-sourceelement', this);\n            }\n            const shouldUpdateSourceElement = this.config.get('updateSourceElementOnDestroy');\n            const isSourceElementTextArea = this.sourceElement instanceof HTMLTextAreaElement;\n            // The data returned by the editor might be unsafe, so we want to prevent rendering\n            // unsafe content inside the source element different than <textarea>, which is considered\n            // secure. This behavior could be changed by setting the `updateSourceElementOnDestroy`\n            // configuration option to `true`.\n            if (!shouldUpdateSourceElement && !isSourceElementTextArea) {\n                setDataInElement(this.sourceElement, '');\n                return;\n            }\n            const dataToSet = typeof data === 'string' ? data : this.data.get();\n            setDataInElement(this.sourceElement, dataToSet);\n        }\n    }\n    return Mixin;\n}\n// Backward compatibility with `mix`.\nElementApiMixin.updateSourceElement = ElementApiMixin(Object).prototype.updateSourceElement;\n\n/**\n * Marks the source element on which the editor was initialized. This prevents other editor instances from using this element.\n *\n * Running multiple editor instances on the same source element causes various issues and it is\n * crucial this helper is called as soon as the source element is known to prevent collisions.\n *\n * @param editor Editor instance.\n * @param sourceElement Element to bind with the editor instance.\n */ function secureSourceElement(editor, sourceElement) {\n    if (sourceElement.ckeditorInstance) {\n        /**\n\t\t * A DOM element used to create the editor (e.g.\n\t\t * {@link module:editor-inline/inlineeditor~InlineEditor.create `InlineEditor.create()`})\n\t\t * has already been used to create another editor instance. Make sure each editor is\n\t\t * created with an unique DOM element.\n\t\t *\n\t\t * @error editor-source-element-already-used\n\t\t * @param element DOM element that caused the collision.\n\t\t */ throw new CKEditorError('editor-source-element-already-used', editor);\n    }\n    sourceElement.ckeditorInstance = editor;\n    editor.once('destroy', ()=>{\n        delete sourceElement.ckeditorInstance;\n    });\n}\n\n/**\n * The list of pending editor actions.\n *\n * This plugin should be used to synchronise plugins that execute long-lasting actions\n * (e.g. file upload) with the editor integration. It gives the developer who integrates the editor\n * an easy way to check if there are any actions pending whenever such information is needed.\n * All plugins that register a pending action also provide a message about the action that is ongoing\n * which can be displayed to the user. This lets them decide if they want to interrupt the action or wait.\n *\n * Adding and updating a pending action:\n *\n * ```ts\n * const pendingActions = editor.plugins.get( 'PendingActions' );\n * const action = pendingActions.add( 'Upload in progress: 0%.' );\n *\n * // You can update the message:\n * action.message = 'Upload in progress: 10%.';\n * ```\n *\n * Removing a pending action:\n *\n * ```ts\n * const pendingActions = editor.plugins.get( 'PendingActions' );\n * const action = pendingActions.add( 'Unsaved changes.' );\n *\n * pendingActions.remove( action );\n * ```\n *\n * Getting pending actions:\n *\n * ```ts\n * const pendingActions = editor.plugins.get( 'PendingActions' );\n *\n * const action1 = pendingActions.add( 'Action 1' );\n * const action2 = pendingActions.add( 'Action 2' );\n *\n * pendingActions.first; // Returns action1\n * Array.from( pendingActions ); // Returns [ action1, action2 ]\n * ```\n *\n * This plugin is used by features like {@link module:upload/filerepository~FileRepository} to register their ongoing actions\n * and by features like {@link module:autosave/autosave~Autosave} to detect whether there are any ongoing actions.\n * Read more about saving the data in the\n * {@glink getting-started/setup/getting-and-setting-data Saving and getting data} guide.\n */ class PendingActions extends ContextPlugin {\n    /**\n\t * A list of pending actions.\n\t */ _actions;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'PendingActions';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        this.set('hasAny', false);\n        this._actions = new Collection({\n            idProperty: '_id'\n        });\n        this._actions.delegate('add', 'remove').to(this);\n    }\n    /**\n\t * Adds an action to the list of pending actions.\n\t *\n\t * This method returns an action object with an observable message property.\n\t * The action object can be later used in the {@link #remove} method. It also allows you to change the message.\n\t *\n\t * @param message The action message.\n\t * @returns An observable object that represents a pending action.\n\t */ add(message) {\n        if (typeof message !== 'string') {\n            /**\n\t\t\t * The message must be a string.\n\t\t\t *\n\t\t\t * @error pendingactions-add-invalid-message\n\t\t\t */ throw new CKEditorError('pendingactions-add-invalid-message', this);\n        }\n        const action = new (ObservableMixin())();\n        action.set('message', message);\n        this._actions.add(action);\n        this.hasAny = true;\n        return action;\n    }\n    /**\n\t * Removes an action from the list of pending actions.\n\t *\n\t * @param action An action object.\n\t */ remove(action) {\n        this._actions.remove(action);\n        this.hasAny = !!this._actions.length;\n    }\n    /**\n\t * Returns the first action from the list or null if the list is empty\n\t *\n\t * @returns The pending action object.\n\t */ get first() {\n        return this._actions.get(0);\n    }\n    /**\n\t * Iterable interface.\n\t */ [Symbol.iterator]() {\n        return this._actions[Symbol.iterator]();\n    }\n}\n\nvar cancel = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z\\\"/></svg>\";\n\nvar caption = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z\\\"/><path d=\\\"M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z\\\" fill-opacity=\\\".6\\\"/></svg>\";\n\nvar check = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z\\\"/></svg>\";\n\nvar cog = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z\\\"/></svg>\";\n\nvar colorPalette = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 8.665 8.665 0 0 1-.372.008Zm-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414ZM9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Zm4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415Z\\\"/></svg>\";\n\nvar eraser = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z\\\"/><path d=\\\"M4 18h5.523v-1H4zm-2 0h1v-1H2z\\\"/></svg>\";\n\nvar history = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M11 1a9 9 0 1 1-8.027 13.075l1.128-1.129A7.502 7.502 0 0 0 18.5 10a7.5 7.5 0 1 0-14.962.759l-.745-.746-.76.76A9 9 0 0 1 11 1z\\\"/><path d=\\\"M.475 8.17a.75.75 0 0 1 .978.047l.075.082 1.284 1.643 1.681-1.284a.75.75 0 0 1 .978.057l.073.083a.75.75 0 0 1-.057.978l-.083.073-2.27 1.737a.75.75 0 0 1-.973-.052l-.074-.082-1.741-2.23a.75.75 0 0 1 .13-1.052z\\\"/><path d=\\\"M11.5 5v4.999l3.196 3.196-1.06 1.06L10.1 10.72l-.1-.113V5z\\\"/></svg>\";\n\nvar lowVision = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z\\\"/></svg>\";\n\nvar textAlternative = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1H3.035Zm10.453 2.61a1.885 1.885 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.903 1.903 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598ZM7.463 8.163a.611.611 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.628.628 0 0 0-.417-.185Zm6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.618.618 0 0 0-.42-.165ZM.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.908.908 0 0 0-.912-.912H.91ZM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516L3.668 13Zm4.947 0h1.801v4.3h2.7v1.4h-4.5V13h-.001Zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9V13h-.001Zm-8.517 1.457-.614 2.059h1.262l-.648-2.059Z\\\"/></svg>\";\n\nvar loupe = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M12.68 13.74h-.001l4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474ZM13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z\\\"/></svg>\";\n\nvar previousArrow = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z\\\"/></svg>\";\n\nvar nextArrow = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z\\\"/></svg>\";\n\nvar image = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1l4.16-4.482ZM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1h15.6Zm-5.655 6a2.128 2.128 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7Z\\\"/></svg>\";\n\nvar imageUpload = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a2.97 2.97 0 0 1-.414-.287 2.998 2.998 0 0 1-1.055-2.03 3.003 3.003 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.134 2.134 0 0 0-1.875-.978Z\\\"/><path d=\\\"M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z\\\"/><path d=\\\"M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.784.784 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79Z\\\"/></svg>\";\n\nvar imageAssetManager = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M1.201 1c-.662 0-1.2.47-1.2 1.1v14.248c0 .64.533 1.152 1.185 1.152h6.623v-7.236L6.617 9.15a.694.694 0 0 0-.957-.033L1.602 13.55V2.553l14.798.003V9.7H18V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.094 2.094 0 0 0-1.621.832 2.127 2.127 0 0 0 1.136 3.357 2.13 2.13 0 0 0 2.611-1.506 2.133 2.133 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.366-.44Z\\\"/><path clip-rule=\\\"evenodd\\\" d=\\\"M19.898 12.369v6.187a.844.844 0 0 1-.844.844h-8.719a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.531a.843.843 0 0 1 .597.248l.838.852h4.75c.223 0 .441.114.6.272a.844.844 0 0 1 .247.597Zm-1.52.654-4.377.02-1.1-1.143H11v6h7.4l-.023-4.877Z\\\"/></svg>\";\n\nvar imageUrl = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h7.029a5.401 5.401 0 0 1 .615-4.338l.762-1.232-2.975-2.78a.696.696 0 0 0-.957-.033L1.5 13.6V2.5h15v6.023c.449.131.887.32 1.307.573l.058.033c.046.028.09.057.135.086V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713 2.803a2.15 2.15 0 0 0-1.611.834 2.118 2.118 0 0 0-.438 1.158 2.14 2.14 0 0 0 1.277 2.096 2.132 2.132 0 0 0 2.645-3.11 2.13 2.13 0 0 0-1.873-.978Z\\\"/><path d=\\\"M16.63 10.294a3.003 3.003 0 0 0-4.142.887l-.117.177a.647.647 0 0 0-.096.492.664.664 0 0 0 .278.418.7.7 0 0 0 .944-.234 1.741 1.741 0 0 1 2.478-.463 1.869 1.869 0 0 1 .476 2.55.637.637 0 0 0-.071.5.646.646 0 0 0 .309.396.627.627 0 0 0 .869-.19l.027-.041a3.226 3.226 0 0 0-.956-4.492Zm-6.061 3.78-.044.066a3.228 3.228 0 0 0 .82 4.403 3.005 3.005 0 0 0 4.275-.798l.13-.197a.626.626 0 0 0 .092-.475.638.638 0 0 0-.268-.402.713.713 0 0 0-.99.26l-.018.029a1.741 1.741 0 0 1-2.477.461 1.87 1.87 0 0 1-.475-2.55l.029-.047a.647.647 0 0 0 .086-.485.66.66 0 0 0-.275-.408l-.04-.027a.609.609 0 0 0-.845.17Z\\\"/><path d=\\\"M15.312 13.925c.24-.36.154-.838-.19-1.067-.346-.23-.82-.124-1.059.236l-1.268 1.907c-.239.36-.153.838.192 1.067.345.23.818.123 1.057-.236l1.268-1.907Z\\\"/></svg>\";\n\nvar alignBottom = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z\\\"/></svg>\";\n\nvar alignMiddle = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z\\\"/></svg>\";\n\nvar alignTop = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z\\\"/></svg>\";\n\nvar alignLeft = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z\\\"/></svg>\";\n\nvar alignCenter = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z\\\"/></svg>\";\n\nvar alignRight = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z\\\"/></svg>\";\n\nvar alignJustify = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z\\\"/></svg>\";\n\nvar objectBlockLeft = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path opacity=\\\".5\\\" d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z\\\"/></svg>\";\n\nvar objectCenter = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path opacity=\\\".5\\\" d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\"/><path d=\\\"M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z\\\"/></svg>\";\n\nvar objectBlockRight = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path opacity=\\\".5\\\" d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\"/><path d=\\\"M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z\\\"/></svg>\";\n\nvar objectFullWidth = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path opacity=\\\".5\\\" d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2z\\\"/><path d=\\\"M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z\\\"/></svg>\";\n\nvar objectInline = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path opacity=\\\".5\\\" d=\\\"M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z\\\"/></svg>\";\n\nvar objectLeft = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path opacity=\\\".5\\\" d=\\\"M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z\\\"/><path d=\\\"M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z\\\"/></svg>\";\n\nvar objectRight = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path opacity=\\\".5\\\" d=\\\"M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z\\\"/><path d=\\\"M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z\\\"/></svg>\";\n\nvar objectSizeFull = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z\\\"/><path d=\\\"M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z\\\"/></svg>\";\n\nvar objectSizeCustom = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:v=\\\"https://vecta.io/nano\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.95 1.43a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h.75v6.3H.95a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-.65h1.932l1.539-1.5H5v-.95a.95.95 0 0 0-.95-.95H3.2v-6.3h.85A.95.95 0 0 0 5 5.48v-.55h10v.55a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-3.1a.95.95 0 0 0-.95-.95h-3.1a.95.95 0 0 0-.95.95v1.05H5V2.38a.95.95 0 0 0-.95-.95H.95zm.55 3.5v-2h2v2h-2zm0 9.3v2h2v-2h-2zm15-11.3v2h2v-2h-2z\\\"/><path d=\\\"M8.139 20.004v-2.388l7.045-7.048 2.391 2.391-7.046 7.046h-2.39zm11.421-9.101a.64.64 0 0 1-.138.206l-1.165 1.168-2.391-2.391 1.167-1.163a.63.63 0 0 1 .206-.138.635.635 0 0 1 .243-.049.63.63 0 0 1 .449.187l1.491 1.488c.059.059.108.129.138.206s.049.16.049.243a.6.6 0 0 1-.049.243z\\\"/></svg>\";\n\nvar objectSizeLarge = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8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\\\"/></svg>\";\n\nvar objectSizeMedium = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2.5 16.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1ZM1 15v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 13v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 11v1H0v-1h1Zm19 0v1h-1v-1h1ZM1 9v1H0V9h1Zm19 0v1h-1V9h1ZM1 7v1H0V7h1Zm19 0v1h-1V7h1ZM1 5v1H0V5h1Zm19 0v1h-1V5h1Zm0-2v1h-1V3h1ZM1 3v1H0V3h1Zm13.5-1.5v1h-1v-1h1Zm2 0v1h-1v-1h1Zm2 0v1h-1v-1h1Zm-8 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm-2 0v1h-1v-1h1Zm8 0v1h-1v-1h1Zm-10 0v1h-1v-1h1Z\\\"/><path d=\\\"M10 7.5H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2ZM10 9a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6A.5.5 0 0 1 2 9h8Z\\\"/></svg>\";\n\nvar pencil = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z\\\"/></svg>\";\n\nvar pilcrow = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z\\\"/></svg>\";\n\nvar quote = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z\\\"/></svg>\";\n\nvar threeVerticalDots = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><circle cx=\\\"9.5\\\" cy=\\\"4.5\\\" r=\\\"1.5\\\"/><circle cx=\\\"9.5\\\" cy=\\\"10.5\\\" r=\\\"1.5\\\"/><circle cx=\\\"9.5\\\" cy=\\\"16.5\\\" r=\\\"1.5\\\"/></svg>\";\n\nvar dragIndicator = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/><path d=\\\"M12 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/><path d=\\\"M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/><path d=\\\"M12 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/><path d=\\\"M5 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/><path d=\\\"M12 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0\\\"/></svg>\";\n\nvar bold = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z\\\"/></svg>\";\n\nvar paragraph = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z\\\"/></svg>\";\n\nvar plus = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1Z\\\"/></svg>\";\n\nvar text = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z\\\"/><path d=\\\"m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z\\\"/></svg>\";\n\nvar importExport = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z\\\"/></svg>\";\n\nvar redo = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z\\\"/></svg>\";\n\nvar undo = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z\\\"/></svg>\";\n\nvar bulletedList = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z\\\"/></svg>\";\n\nvar numberedList = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z\\\"/></svg>\";\n\nvar todoList = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z\\\"/></svg>\";\n\nvar codeBlock = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174zm2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207zM16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h14zM5.009 15l.003 1H3v-1h2.009zm2.188-2-1.471 1H5v-1h2.197zM10 11v.095L8.668 12H7v-1h3zm4-2v1H7V9h7zm0-2v1H7V7h7zm-4-2v1H5V5h5zM6 3v1H3V3h3z\\\"/></svg>\";\n\nvar browseFiles = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z\\\"/><path d=\\\"M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z\\\"/></svg>\";\n\nvar heading1 = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M19 9v10h-2v-8h-2V9h4zM4 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1V11H4v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v4.5z\\\"/></svg>\";\n\nvar heading2 = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm16.076 8.343V18.5h-6.252c.067-.626.27-1.22.61-1.78.338-.561 1.006-1.305 2.005-2.232.804-.749 1.297-1.257 1.479-1.523.245-.368.368-.732.368-1.092 0-.398-.107-.703-.32-.917-.214-.214-.51-.32-.886-.32-.372 0-.669.111-.889.336-.22.224-.347.596-.38 1.117l-1.778-.178c.106-.982.438-1.686.997-2.114.558-.427 1.257-.64 2.095-.64.918 0 1.64.247 2.164.742.525.495.787 1.11.787 1.847 0 .419-.075.818-.225 1.197-.15.378-.388.775-.714 1.19-.216.275-.605.67-1.168 1.187-.563.516-.92.859-1.07 1.028a3.11 3.11 0 0 0-.365.495h3.542z\\\"/></svg>\";\n\nvar heading3 = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V11H3v4.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1H2a1 1 0 0 1 1 1v4.5zm9.989 7.53 1.726-.209c.055.44.203.777.445 1.01.24.232.533.349.876.349.368 0 .678-.14.93-.42.251-.279.377-.655.377-1.13 0-.448-.12-.803-.362-1.066a1.153 1.153 0 0 0-.882-.393c-.228 0-.501.044-.819.133l.197-1.453c.482.012.85-.092 1.105-.315.253-.222.38-.517.38-.885 0-.313-.093-.563-.279-.75-.186-.185-.434-.278-.743-.278a1.07 1.07 0 0 0-.78.317c-.216.212-.347.52-.394.927l-1.644-.28c.114-.562.287-1.012.517-1.348.231-.337.553-.601.965-.794a3.24 3.24 0 0 1 1.387-.289c.876 0 1.579.28 2.108.838.436.457.653.973.653 1.549 0 .817-.446 1.468-1.339 1.955.533.114.96.37 1.28.768.319.398.478.878.478 1.441 0 .817-.298 1.513-.895 2.088-.596.576-1.339.864-2.228.864-.842 0-1.54-.243-2.094-.727-.555-.485-.876-1.118-.965-1.901z\\\"/></svg>\";\n\nvar heading4 = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm13.55 10v-1.873h-3.81v-1.561l4.037-5.91h1.498v5.904h1.156v1.567h-1.156V18.5H17.05zm0-3.44v-3.18l-2.14 3.18h2.14z\\\"/></svg>\";\n\nvar heading5 = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm9.578 7.607 1.777-.184c.05.402.201.72.45.955a1.223 1.223 0 0 0 1.81-.101c.258-.303.387-.759.387-1.368 0-.572-.128-1-.384-1.286-.256-.285-.59-.428-1-.428-.512 0-.971.226-1.377.679l-1.448-.21.915-4.843h4.716v1.67H15.56l-.28 1.58a2.697 2.697 0 0 1 1.219-.298 2.68 2.68 0 0 1 2.012.863c.55.576.825 1.323.825 2.241a3.36 3.36 0 0 1-.666 2.05c-.605.821-1.445 1.232-2.52 1.232-.86 0-1.56-.23-2.101-.692-.542-.461-.866-1.081-.971-1.86z\\\"/></svg>\";\n\nvar heading6 = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3.5 8.5h5V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v11.5a1 1 0 0 1-1 1h-.5a1 1 0 0 1-1-1V11h-5v4.5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v4.5zm15.595 2.973-1.726.19c-.043-.355-.153-.617-.33-.787-.178-.169-.409-.253-.692-.253-.377 0-.695.169-.956.507-.26.339-.424 1.043-.492 2.114.445-.525.997-.787 1.657-.787.745 0 1.383.284 1.914.85.531.568.797 1.3.797 2.197 0 .952-.28 1.716-.838 2.291-.559.576-1.276.864-2.152.864-.94 0-1.712-.365-2.317-1.095-.605-.73-.908-1.927-.908-3.59 0-1.705.316-2.935.946-3.688.63-.753 1.45-1.13 2.457-1.13.706 0 1.291.198 1.755.594.463.395.758.97.885 1.723zm-4.043 3.891c0 .58.133 1.028.4 1.343.266.315.57.473.914.473.33 0 .605-.13.825-.388.22-.258.33-.68.33-1.27 0-.604-.118-1.047-.355-1.329a1.115 1.115 0 0 0-.89-.422c-.342 0-.632.134-.869.403s-.355.666-.355 1.19z\\\"/></svg>\";\n\nvar horizontalLine = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2 9h16v2H2z\\\"/></svg>\";\n\nvar html = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M17 0a2 2 0 0 1 2 2v7a1 1 0 0 1 1 1v5a1 1 0 0 1-.883.993l-.118.006L19 17a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2l-.001-1.001-.116-.006A1 1 0 0 1 0 15v-5a1 1 0 0 1 .999-1L1 2a2 2 0 0 1 2-2h14zm.499 15.999h-15L2.5 17a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5l-.001-1.001zm-3.478-6.013-.014.014H14v.007l-1.525 1.525-1.46-1.46-.015.013V10h-1v5h1v-3.53l1.428 1.43.048.043.131-.129L14 11.421V15h1v-5h-.965l-.014-.014zM2 10H1v5h1v-2h2v2h1v-5H4v2H2v-2zm7 0H6v1h1v4h1v-4h1v-1zm8 0h-1v5h3v-1h-2v-4zm0-8.5H3a.5.5 0 0 0-.5.5l-.001 6.999h15L17.5 2a.5.5 0 0 0-.5-.5zM10 7v1H4V7h6zm3-2v1H4V5h9zm-3-2v1H4V3h6z\\\"/></svg>\";\n\nvar indent = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z\\\"/></svg>\";\n\nvar outdent = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z\\\"/></svg>\";\n\nvar table = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3 5.5v3h4v-3H3Zm0 4v3h4v-3H3Zm0 4v3h4v-3H3Zm5 3h4v-3H8v3Zm5 0h4v-3h-4v3Zm4-4v-3h-4v3h4Zm0-4v-3h-4v3h4Zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5v13.5Zm-6.5-4v-3H8v3h4Zm0-4v-3H8v3h4Z\\\"/></svg>\";\n\nconst icons = {\n    bold,\n    cancel,\n    caption,\n    check,\n    cog,\n    colorPalette,\n    eraser,\n    history,\n    image,\n    imageUpload,\n    imageAssetManager,\n    imageUrl,\n    lowVision,\n    textAlternative,\n    loupe,\n    previousArrow,\n    nextArrow,\n    importExport,\n    paragraph,\n    plus,\n    text,\n    alignBottom,\n    alignMiddle,\n    alignTop,\n    alignLeft,\n    alignCenter,\n    alignRight,\n    alignJustify,\n    objectLeft,\n    objectCenter,\n    objectRight,\n    objectFullWidth,\n    objectInline,\n    objectBlockLeft,\n    objectBlockRight,\n    objectSizeCustom,\n    objectSizeFull,\n    objectSizeLarge,\n    objectSizeSmall,\n    objectSizeMedium,\n    pencil,\n    pilcrow,\n    quote,\n    threeVerticalDots,\n    dragIndicator,\n    redo,\n    undo,\n    bulletedList,\n    numberedList,\n    todoList,\n    codeBlock,\n    browseFiles,\n    heading1,\n    heading2,\n    heading3,\n    heading4,\n    heading5,\n    heading6,\n    horizontalLine,\n    html,\n    indent,\n    outdent,\n    table\n};\n\nexport { Command, Context, ContextPlugin, DataApiMixin, Editor, ElementApiMixin, MultiCommand, PendingActions, Plugin, attachToForm, icons, secureSourceElement };\n//# sourceMappingURL=index.js.map\n","import toString from './toString.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n    reHasRegExpChar = RegExp(reRegExpChar.source);\n\n/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\nfunction escapeRegExp(string) {\n  string = toString(string);\n  return (string && reHasRegExpChar.test(string))\n    ? string.replace(reRegExpChar, '\\\\$&')\n    : string;\n}\n\nexport default escapeRegExp;\n","/**\r\n * @module color-parse\r\n */\r\nimport names from 'color-name'\r\n\r\nexport default parse\r\n\r\n/**\r\n * Base hues\r\n * http://dev.w3.org/csswg/css-color/#typedef-named-hue\r\n */\r\n//FIXME: use external hue detector\r\nvar baseHues = {\r\n\tred: 0,\r\n\torange: 60,\r\n\tyellow: 120,\r\n\tgreen: 180,\r\n\tblue: 240,\r\n\tpurple: 300\r\n}\r\n\r\n/**\r\n * Parse color from the string passed\r\n *\r\n * @return {Object} A space indicator `space`, an array `values` and `alpha`\r\n */\r\nfunction parse (cstr) {\r\n\tvar m, parts = [], alpha = 1, space\r\n\r\n\tif (typeof cstr === 'string') {\r\n\t\t//keyword\r\n\t\tif (names[cstr]) {\r\n\t\t\tparts = names[cstr].slice()\r\n\t\t\tspace = 'rgb'\r\n\t\t}\r\n\r\n\t\t//reserved words\r\n\t\telse if (cstr === 'transparent') {\r\n\t\t\talpha = 0\r\n\t\t\tspace = 'rgb'\r\n\t\t\tparts = [0,0,0]\r\n\t\t}\r\n\r\n\t\t//hex\r\n\t\telse if (/^#[A-Fa-f0-9]+$/.test(cstr)) {\r\n\t\t\tvar base = cstr.slice(1)\r\n\t\t\tvar size = base.length\r\n\t\t\tvar isShort = size <= 4\r\n\t\t\talpha = 1\r\n\r\n\t\t\tif (isShort) {\r\n\t\t\t\tparts = [\r\n\t\t\t\t\tparseInt(base[0] + base[0], 16),\r\n\t\t\t\t\tparseInt(base[1] + base[1], 16),\r\n\t\t\t\t\tparseInt(base[2] + base[2], 16)\r\n\t\t\t\t]\r\n\t\t\t\tif (size === 4) {\r\n\t\t\t\t\talpha = parseInt(base[3] + base[3], 16) / 255\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tparts = [\r\n\t\t\t\t\tparseInt(base[0] + base[1], 16),\r\n\t\t\t\t\tparseInt(base[2] + base[3], 16),\r\n\t\t\t\t\tparseInt(base[4] + base[5], 16)\r\n\t\t\t\t]\r\n\t\t\t\tif (size === 8) {\r\n\t\t\t\t\talpha = parseInt(base[6] + base[7], 16) / 255\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!parts[0]) parts[0] = 0\r\n\t\t\tif (!parts[1]) parts[1] = 0\r\n\t\t\tif (!parts[2]) parts[2] = 0\r\n\r\n\t\t\tspace = 'rgb'\r\n\t\t}\r\n\r\n\t\t//color space\r\n\t\telse if (m = /^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\s*\\(([^\\)]*)\\)/.exec(cstr)) {\r\n\t\t\tvar name = m[1]\r\n\t\t\tvar isRGB = name === 'rgb'\r\n\t\t\tvar base = name.replace(/a$/, '')\r\n\t\t\tspace = base\r\n\t\t\tvar size = base === 'cmyk' ? 4 : base === 'gray' ? 1 : 3\r\n\t\t\tparts = m[2].trim()\r\n\t\t\t\t.split(/\\s*[,\\/]\\s*|\\s+/)\r\n\t\t\t\t.map(function (x, i) {\r\n\t\t\t\t\t//<percentage>\r\n\t\t\t\t\tif (/%$/.test(x)) {\r\n\t\t\t\t\t\t//alpha\r\n\t\t\t\t\t\tif (i === size)\treturn parseFloat(x) / 100\r\n\t\t\t\t\t\t//rgb\r\n\t\t\t\t\t\tif (base === 'rgb') return parseFloat(x) * 255 / 100\r\n\t\t\t\t\t\treturn parseFloat(x)\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//hue\r\n\t\t\t\t\telse if (base[i] === 'h') {\r\n\t\t\t\t\t\t//<deg>\r\n\t\t\t\t\t\tif (/deg$/.test(x)) {\r\n\t\t\t\t\t\t\treturn parseFloat(x)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//<base-hue>\r\n\t\t\t\t\t\telse if (baseHues[x] !== undefined) {\r\n\t\t\t\t\t\t\treturn baseHues[x]\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn parseFloat(x)\r\n\t\t\t\t})\r\n\r\n\t\t\tif (name === base) parts.push(1)\r\n\t\t\talpha = (isRGB) ? 1 : (parts[size] === undefined) ? 1 : parts[size]\r\n\t\t\tparts = parts.slice(0, size)\r\n\t\t}\r\n\r\n\t\t//named channels case\r\n\t\telse if (cstr.length > 10 && /[0-9](?:\\s|\\/)/.test(cstr)) {\r\n\t\t\tparts = cstr.match(/([0-9]+)/g).map(function (value) {\r\n\t\t\t\treturn parseFloat(value)\r\n\t\t\t})\r\n\r\n\t\t\tspace = cstr.match(/([a-z])/ig).join('').toLowerCase()\r\n\t\t}\r\n\t}\r\n\r\n\t//numeric case\r\n\telse if (!isNaN(cstr)) {\r\n\t\tspace = 'rgb'\r\n\t\tparts = [cstr >>> 16, (cstr & 0x00ff00) >>> 8, cstr & 0x0000ff]\r\n\t}\r\n\r\n\t//array-like\r\n\telse if (Array.isArray(cstr) || cstr.length) {\r\n\t\tparts = [cstr[0], cstr[1], cstr[2]]\r\n\t\tspace = 'rgb'\r\n\t\talpha = cstr.length === 4 ? cstr[3] : 1\r\n\t}\r\n\r\n\t//object case - detects css cases of rgb and hsl\r\n\telse if (cstr instanceof Object) {\r\n\t\tif (cstr.r != null || cstr.red != null || cstr.R != null) {\r\n\t\t\tspace = 'rgb'\r\n\t\t\tparts = [\r\n\t\t\t\tcstr.r || cstr.red || cstr.R || 0,\r\n\t\t\t\tcstr.g || cstr.green || cstr.G || 0,\r\n\t\t\t\tcstr.b || cstr.blue || cstr.B || 0\r\n\t\t\t]\r\n\t\t}\r\n\t\telse {\r\n\t\t\tspace = 'hsl'\r\n\t\t\tparts = [\r\n\t\t\t\tcstr.h || cstr.hue || cstr.H || 0,\r\n\t\t\t\tcstr.s || cstr.saturation || cstr.S || 0,\r\n\t\t\t\tcstr.l || cstr.lightness || cstr.L || cstr.b || cstr.brightness\r\n\t\t\t]\r\n\t\t}\r\n\r\n\t\talpha = cstr.a || cstr.alpha || cstr.opacity || 1\r\n\r\n\t\tif (cstr.opacity != null) alpha /= 100\r\n\t}\r\n\r\n\treturn {\r\n\t\tspace: space,\r\n\t\tvalues: parts,\r\n\t\talpha: alpha\r\n\t}\r\n}\r\n","// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number, min = 0, max = 1) => {\n    return number > max ? max : number < min ? min : number;\n};\nexport const round = (number, digits = 0, base = Math.pow(10, digits)) => {\n    return Math.round(base * number) / base;\n};\n//# sourceMappingURL=math.js.map","import { round } from './math.js';\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits = {\n    grad: 360 / 400,\n    turn: 360,\n    rad: 360 / (Math.PI * 2)\n};\nexport const hexToHsva = (hex) => rgbaToHsva(hexToRgba(hex));\nexport const hexToRgba = (hex) => {\n    if (hex[0] === '#')\n        hex = hex.substring(1);\n    if (hex.length < 6) {\n        return {\n            r: parseInt(hex[0] + hex[0], 16),\n            g: parseInt(hex[1] + hex[1], 16),\n            b: parseInt(hex[2] + hex[2], 16),\n            a: hex.length === 4 ? round(parseInt(hex[3] + hex[3], 16) / 255, 2) : 1\n        };\n    }\n    return {\n        r: parseInt(hex.substring(0, 2), 16),\n        g: parseInt(hex.substring(2, 4), 16),\n        b: parseInt(hex.substring(4, 6), 16),\n        a: hex.length === 8 ? round(parseInt(hex.substring(6, 8), 16) / 255, 2) : 1\n    };\n};\nexport const parseHue = (value, unit = 'deg') => {\n    return Number(value) * (angleUnits[unit] || 1);\n};\nexport const hslaStringToHsva = (hslString) => {\n    const matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n    const match = matcher.exec(hslString);\n    if (!match)\n        return { h: 0, s: 0, v: 0, a: 1 };\n    return hslaToHsva({\n        h: parseHue(match[1], match[2]),\n        s: Number(match[3]),\n        l: Number(match[4]),\n        a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n    });\n};\nexport const hslStringToHsva = hslaStringToHsva;\nexport const hslaToHsva = ({ h, s, l, a }) => {\n    s *= (l < 50 ? l : 100 - l) / 100;\n    return {\n        h: h,\n        s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n        v: l + s,\n        a\n    };\n};\nexport const hsvaToHex = (hsva) => rgbaToHex(hsvaToRgba(hsva));\nexport const hsvaToHsla = ({ h, s, v, a }) => {\n    const hh = ((200 - s) * v) / 100;\n    return {\n        h: round(h),\n        s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n        l: round(hh / 2),\n        a: round(a, 2)\n    };\n};\nexport const hsvaToHsvString = (hsva) => {\n    const { h, s, v } = roundHsva(hsva);\n    return `hsv(${h}, ${s}%, ${v}%)`;\n};\nexport const hsvaToHsvaString = (hsva) => {\n    const { h, s, v, a } = roundHsva(hsva);\n    return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\nexport const hsvaToHslString = (hsva) => {\n    const { h, s, l } = hsvaToHsla(hsva);\n    return `hsl(${h}, ${s}%, ${l}%)`;\n};\nexport const hsvaToHslaString = (hsva) => {\n    const { h, s, l, a } = hsvaToHsla(hsva);\n    return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\nexport const hsvaToRgba = ({ h, s, v, a }) => {\n    h = (h / 360) * 6;\n    s = s / 100;\n    v = v / 100;\n    const hh = Math.floor(h), b = v * (1 - s), c = v * (1 - (h - hh) * s), d = v * (1 - (1 - h + hh) * s), module = hh % 6;\n    return {\n        r: round([v, c, b, b, d, v][module] * 255),\n        g: round([d, v, v, c, b, b][module] * 255),\n        b: round([b, b, d, v, v, c][module] * 255),\n        a: round(a, 2)\n    };\n};\nexport const hsvaToRgbString = (hsva) => {\n    const { r, g, b } = hsvaToRgba(hsva);\n    return `rgb(${r}, ${g}, ${b})`;\n};\nexport const hsvaToRgbaString = (hsva) => {\n    const { r, g, b, a } = hsvaToRgba(hsva);\n    return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\nexport const hsvaStringToHsva = (hsvString) => {\n    const matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n    const match = matcher.exec(hsvString);\n    if (!match)\n        return { h: 0, s: 0, v: 0, a: 1 };\n    return roundHsva({\n        h: parseHue(match[1], match[2]),\n        s: Number(match[3]),\n        v: Number(match[4]),\n        a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1)\n    });\n};\nexport const hsvStringToHsva = hsvaStringToHsva;\nexport const rgbaStringToHsva = (rgbaString) => {\n    const matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n    const match = matcher.exec(rgbaString);\n    if (!match)\n        return { h: 0, s: 0, v: 0, a: 1 };\n    return rgbaToHsva({\n        r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n        g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n        b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n        a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1)\n    });\n};\nexport const rgbStringToHsva = rgbaStringToHsva;\nconst format = (number) => {\n    const hex = number.toString(16);\n    return hex.length < 2 ? '0' + hex : hex;\n};\nexport const rgbaToHex = ({ r, g, b, a }) => {\n    const alphaHex = a < 1 ? format(round(a * 255)) : '';\n    return '#' + format(r) + format(g) + format(b) + alphaHex;\n};\nexport const rgbaToHsva = ({ r, g, b, a }) => {\n    const max = Math.max(r, g, b);\n    const delta = max - Math.min(r, g, b);\n    // prettier-ignore\n    const hh = delta\n        ? max === r\n            ? (g - b) / delta\n            : max === g\n                ? 2 + (b - r) / delta\n                : 4 + (r - g) / delta\n        : 0;\n    return {\n        h: round(60 * (hh < 0 ? hh + 6 : hh)),\n        s: round(max ? (delta / max) * 100 : 0),\n        v: round((max / 255) * 100),\n        a\n    };\n};\nexport const roundHsva = (hsva) => ({\n    h: round(hsva.h),\n    s: round(hsva.s),\n    v: round(hsva.v),\n    a: round(hsva.a, 2)\n});\nexport const rgbaToRgb = ({ r, g, b }) => ({ r, g, b });\nexport const hslaToHsl = ({ h, s, l }) => ({ h, s, l });\nexport const hsvaToHsv = (hsva) => {\n    const { h, s, v } = roundHsva(hsva);\n    return { h, s, v };\n};\n//# sourceMappingURL=convert.js.map","import { hexToRgba } from './convert.js';\nexport const equalColorObjects = (first, second) => {\n    if (first === second)\n        return true;\n    for (const prop in first) {\n        // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n        // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n        // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n        // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n        // there is or not), and then as a type TS can iterate over.\n        if (first[prop] !==\n            second[prop])\n            return false;\n    }\n    return true;\n};\nexport const equalColorString = (first, second) => {\n    return first.replace(/\\s/g, '') === second.replace(/\\s/g, '');\n};\nexport const equalHex = (first, second) => {\n    if (first.toLowerCase() === second.toLowerCase())\n        return true;\n    // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n    return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n//# sourceMappingURL=compare.js.map","const cache = {};\nexport const tpl = (html) => {\n    let template = cache[html];\n    if (!template) {\n        template = document.createElement('template');\n        template.innerHTML = html;\n        cache[html] = template;\n    }\n    return template;\n};\nexport const fire = (target, type, detail) => {\n    target.dispatchEvent(new CustomEvent(type, {\n        bubbles: true,\n        detail\n    }));\n};\n//# sourceMappingURL=dom.js.map","import { fire, tpl } from '../utils/dom.js';\nimport { clamp } from '../utils/math.js';\nlet hasTouched = false;\n// Check if an event was triggered by touch\nconst isTouch = (e) => 'touches' in e;\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isValid = (event) => {\n    if (hasTouched && !isTouch(event))\n        return false;\n    if (!hasTouched)\n        hasTouched = isTouch(event);\n    return true;\n};\nconst pointerMove = (target, event) => {\n    const pointer = isTouch(event) ? event.touches[0] : event;\n    const rect = target.el.getBoundingClientRect();\n    fire(target.el, 'move', target.getMove({\n        x: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n        y: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height)\n    }));\n};\nconst keyMove = (target, event) => {\n    // We use `keyCode` instead of `key` to reduce the size of the library.\n    const keyCode = event.keyCode;\n    // Ignore all keys except arrow ones, Page Up, Page Down, Home and End.\n    if (keyCode > 40 || (target.xy && keyCode < 37) || keyCode < 33)\n        return;\n    // Do not scroll page by keys when color picker element has focus.\n    event.preventDefault();\n    // Send relative offset to the parent component.\n    fire(target.el, 'move', target.getMove({\n        x: keyCode === 39 // Arrow Right\n            ? 0.01\n            : keyCode === 37 // Arrow Left\n                ? -0.01\n                : keyCode === 34 // Page Down\n                    ? 0.05\n                    : keyCode === 33 // Page Up\n                        ? -0.05\n                        : keyCode === 35 // End\n                            ? 1\n                            : keyCode === 36 // Home\n                                ? -1\n                                : 0,\n        y: keyCode === 40 // Arrow down\n            ? 0.01\n            : keyCode === 38 // Arrow Up\n                ? -0.01\n                : 0\n    }, true));\n};\nexport class Slider {\n    constructor(root, part, aria, xy) {\n        const template = tpl(`<div role=\"slider\" tabindex=\"0\" part=\"${part}\" ${aria}><div part=\"${part}-pointer\"></div></div>`);\n        root.appendChild(template.content.cloneNode(true));\n        const el = root.querySelector(`[part=${part}]`);\n        el.addEventListener('mousedown', this);\n        el.addEventListener('touchstart', this);\n        el.addEventListener('keydown', this);\n        this.el = el;\n        this.xy = xy;\n        this.nodes = [el.firstChild, el];\n    }\n    set dragging(state) {\n        const toggleEvent = state ? document.addEventListener : document.removeEventListener;\n        toggleEvent(hasTouched ? 'touchmove' : 'mousemove', this);\n        toggleEvent(hasTouched ? 'touchend' : 'mouseup', this);\n    }\n    handleEvent(event) {\n        switch (event.type) {\n            case 'mousedown':\n            case 'touchstart':\n                event.preventDefault();\n                // event.button is 0 in mousedown for left button activation\n                if (!isValid(event) || (!hasTouched && event.button != 0))\n                    return;\n                this.el.focus();\n                pointerMove(this, event);\n                this.dragging = true;\n                break;\n            case 'mousemove':\n            case 'touchmove':\n                event.preventDefault();\n                pointerMove(this, event);\n                break;\n            case 'mouseup':\n            case 'touchend':\n                this.dragging = false;\n                break;\n            case 'keydown':\n                keyMove(this, event);\n                break;\n        }\n    }\n    style(styles) {\n        styles.forEach((style, i) => {\n            for (const p in style) {\n                this.nodes[i].style.setProperty(p, style[p]);\n            }\n        });\n    }\n}\n//# sourceMappingURL=slider.js.map","import { Slider } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nexport class Hue extends Slider {\n    constructor(root) {\n        super(root, 'hue', 'aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"', false);\n    }\n    update({ h }) {\n        this.h = h;\n        this.style([\n            {\n                left: `${(h / 360) * 100}%`,\n                color: hsvaToHslString({ h, s: 100, v: 100, a: 1 })\n            }\n        ]);\n        this.el.setAttribute('aria-valuenow', `${round(h)}`);\n    }\n    getMove(offset, key) {\n        // Hue measured in degrees of the color circle ranging from 0 to 360\n        return { h: key ? clamp(this.h + offset.x * 360, 0, 360) : 360 * offset.x };\n    }\n}\n//# sourceMappingURL=hue.js.map","import { Slider } from './slider.js';\nimport { hsvaToHslString } from '../utils/convert.js';\nimport { clamp, round } from '../utils/math.js';\nexport class Saturation extends Slider {\n    constructor(root) {\n        super(root, 'saturation', 'aria-label=\"Color\"', true);\n    }\n    update(hsva) {\n        this.hsva = hsva;\n        this.style([\n            {\n                top: `${100 - hsva.v}%`,\n                left: `${hsva.s}%`,\n                color: hsvaToHslString(hsva)\n            },\n            {\n                'background-color': hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 })\n            }\n        ]);\n        this.el.setAttribute('aria-valuetext', `Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`);\n    }\n    getMove(offset, key) {\n        // Saturation and brightness always fit into [0, 100] range\n        return {\n            s: key ? clamp(this.hsva.s + offset.x * 100, 0, 100) : offset.x * 100,\n            v: key ? clamp(this.hsva.v - offset.y * 100, 0, 100) : Math.round(100 - offset.y * 100)\n        };\n    }\n}\n//# sourceMappingURL=saturation.js.map","import { equalColorObjects } from '../utils/compare.js';\nimport { fire, tpl } from '../utils/dom.js';\nimport { Hue } from './hue.js';\nimport { Saturation } from './saturation.js';\nimport css from '../styles/color-picker.js';\nimport hueCss from '../styles/hue.js';\nimport saturationCss from '../styles/saturation.js';\nconst $isSame = Symbol('same');\nconst $color = Symbol('color');\nconst $hsva = Symbol('hsva');\nconst $update = Symbol('update');\nconst $parts = Symbol('parts');\nexport const $css = Symbol('css');\nexport const $sliders = Symbol('sliders');\nexport class ColorPicker extends HTMLElement {\n    static get observedAttributes() {\n        return ['color'];\n    }\n    get [$css]() {\n        return [css, hueCss, saturationCss];\n    }\n    get [$sliders]() {\n        return [Saturation, Hue];\n    }\n    get color() {\n        return this[$color];\n    }\n    set color(newColor) {\n        if (!this[$isSame](newColor)) {\n            const newHsva = this.colorModel.toHsva(newColor);\n            this[$update](newHsva);\n            this[$color] = newColor;\n        }\n    }\n    constructor() {\n        super();\n        const template = tpl(`<style>${this[$css].join('')}</style>`);\n        const root = this.attachShadow({ mode: 'open' });\n        root.appendChild(template.content.cloneNode(true));\n        root.addEventListener('move', this);\n        this[$parts] = this[$sliders].map((slider) => new slider(root));\n    }\n    connectedCallback() {\n        // A user may set a property on an _instance_ of an element,\n        // before its prototype has been connected to this class.\n        // If so, we need to run it through the proper class setter.\n        if (this.hasOwnProperty('color')) {\n            const value = this.color;\n            delete this['color'];\n            this.color = value;\n        }\n        else if (!this.color) {\n            this.color = this.colorModel.defaultColor;\n        }\n    }\n    attributeChangedCallback(_attr, _oldVal, newVal) {\n        const color = this.colorModel.fromAttr(newVal);\n        if (!this[$isSame](color)) {\n            this.color = color;\n        }\n    }\n    handleEvent(event) {\n        // Merge the current HSV color object with updated params.\n        const oldHsva = this[$hsva];\n        const newHsva = { ...oldHsva, ...event.detail };\n        this[$update](newHsva);\n        let newColor;\n        if (!equalColorObjects(newHsva, oldHsva) &&\n            !this[$isSame]((newColor = this.colorModel.fromHsva(newHsva)))) {\n            this[$color] = newColor;\n            fire(this, 'color-changed', { value: newColor });\n        }\n    }\n    [$isSame](color) {\n        return this.color && this.colorModel.equal(color, this.color);\n    }\n    [$update](hsva) {\n        this[$hsva] = hsva;\n        this[$parts].forEach((part) => part.update(hsva));\n    }\n}\n//# sourceMappingURL=color-picker.js.map","export default `:host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}`;\n//# sourceMappingURL=color-picker.js.map","export default `[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}`;\n//# sourceMappingURL=hue.js.map","export default `[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}`;\n//# sourceMappingURL=saturation.js.map","import { ColorPicker } from '../components/color-picker.js';\nimport { hexToHsva, hsvaToHex } from '../utils/convert.js';\nimport { equalHex } from '../utils/compare.js';\nconst colorModel = {\n    defaultColor: '#000',\n    toHsva: hexToHsva,\n    fromHsva: ({ h, s, v }) => hsvaToHex({ h, s, v, a: 1 }),\n    equal: equalHex,\n    fromAttr: (color) => color\n};\nexport class HexBase extends ColorPicker {\n    get colorModel() {\n        return colorModel;\n    }\n}\n//# sourceMappingURL=hex.js.map","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Collection, CKEditorError, EmitterMixin, isNode, toArray, DomEmitterMixin, ObservableMixin, isIterable, uid, env, delay, getEnvKeystrokeText, isVisible, global, KeystrokeHandler, FocusTracker, Rect, toUnit, createElement, ResizeObserver, getBorderWidths, logWarning, getOptimalPosition, isText, isRange, priorities, first, verifyLicense } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { cloneDeepWith, isObject, isElement, debounce, throttle, cloneDeep, extend, escapeRegExp, escape } from 'lodash-es';\nimport { icons, Plugin, ContextPlugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport parse from 'color-parse';\nimport * as convert from 'color-convert';\nimport { HexBase } from 'vanilla-colorful/lib/entrypoints/hex';\nimport { Observer } from '@ckeditor/ckeditor5-engine/dist/index.js';\n\n/**\n * Collects {@link module:ui/view~View} instances.\n *\n * ```ts\n * const parentView = new ParentView( locale );\n * const collection = new ViewCollection( locale );\n *\n * collection.setParent( parentView.element );\n *\n * const viewA = new ChildView( locale );\n * const viewB = new ChildView( locale );\n * ```\n *\n * View collection renders and manages view {@link module:ui/view~View#element elements}:\n *\n * ```ts\n * collection.add( viewA );\n * collection.add( viewB );\n *\n * console.log( parentView.element.firsChild ); // -> viewA.element\n * console.log( parentView.element.lastChild ); // -> viewB.element\n * ```\n *\n * It {@link module:ui/viewcollection~ViewCollection#delegate propagates} DOM events too:\n *\n * ```ts\n * // Delegate #click and #keydown events from viewA and viewB to the parentView.\n * collection.delegate( 'click' ).to( parentView );\n *\n * parentView.on( 'click', ( evt ) => {\n * \tconsole.log( `${ evt.source } has been clicked.` );\n * } );\n *\n * // This event will be delegated to the parentView.\n * viewB.fire( 'click' );\n * ```\n *\n * **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}\n * of a {@link module:ui/template~Template template}.\n */ class ViewCollection extends Collection {\n    /**\n\t * A parent element within which child views are rendered and managed in DOM.\n\t */ _parentElement;\n    /**\n\t * Creates a new instance of the {@link module:ui/viewcollection~ViewCollection}.\n\t *\n\t * @param initialItems The initial items of the collection.\n\t */ constructor(initialItems = []){\n        super(initialItems, {\n            // An #id Number attribute should be legal and not break the `ViewCollection` instance.\n            // https://github.com/ckeditor/ckeditor5-ui/issues/93\n            idProperty: 'viewUid'\n        });\n        // Handle {@link module:ui/view~View#element} in DOM when a new view is added to the collection.\n        this.on('add', (evt, view, index)=>{\n            this._renderViewIntoCollectionParent(view, index);\n        });\n        // Handle {@link module:ui/view~View#element} in DOM when a view is removed from the collection.\n        this.on('remove', (evt, view)=>{\n            if (view.element && this._parentElement) {\n                view.element.remove();\n            }\n        });\n        this._parentElement = null;\n    }\n    /**\n\t * Destroys the view collection along with child views.\n\t * See the view {@link module:ui/view~View#destroy} method.\n\t */ destroy() {\n        this.map((view)=>view.destroy());\n    }\n    /**\n\t * Sets the parent HTML element of this collection. When parent is set, {@link #add adding} and\n\t * {@link #remove removing} views in the collection synchronizes their\n\t * {@link module:ui/view~View#element elements} in the parent element.\n\t *\n\t * @param element A new parent element.\n\t */ setParent(elementOrDocFragment) {\n        this._parentElement = elementOrDocFragment;\n        // Take care of the initial collection items passed to the constructor.\n        for (const view of this){\n            this._renderViewIntoCollectionParent(view);\n        }\n    }\n    /**\n\t * Delegates selected events coming from within views in the collection to any\n\t * {@link module:utils/emittermixin~Emitter}.\n\t *\n\t * For the following views and collection:\n\t *\n\t * ```ts\n\t * const viewA = new View();\n\t * const viewB = new View();\n\t * const viewC = new View();\n\t *\n\t * const views = parentView.createCollection();\n\t *\n\t * views.delegate( 'eventX' ).to( viewB );\n\t * views.delegate( 'eventX', 'eventY' ).to( viewC );\n\t *\n\t * views.add( viewA );\n\t * ```\n\t *\n\t * the `eventX` is delegated (fired by) `viewB` and `viewC` along with `customData`:\n\t *\n\t * ```ts\n\t * viewA.fire( 'eventX', customData );\n\t * ```\n\t *\n\t * and `eventY` is delegated (fired by) `viewC` along with `customData`:\n\t *\n\t * ```ts\n\t * viewA.fire( 'eventY', customData );\n\t * ```\n\t *\n\t * See {@link module:utils/emittermixin~Emitter#delegate}.\n\t *\n\t * @param events {@link module:ui/view~View} event names to be delegated to another\n\t * {@link module:utils/emittermixin~Emitter}.\n\t * @returns Object with `to` property, a function which accepts the destination\n\t * of {@link module:utils/emittermixin~Emitter#delegate delegated} events.\n\t */ delegate(...events) {\n        if (!events.length || !isStringArray(events)) {\n            /**\n\t\t\t * All event names must be strings.\n\t\t\t *\n\t\t\t * @error ui-viewcollection-delegate-wrong-events\n\t\t\t */ throw new CKEditorError('ui-viewcollection-delegate-wrong-events', this);\n        }\n        return {\n            to: (dest)=>{\n                // Activate delegating on existing views in this collection.\n                for (const view of this){\n                    for (const evtName of events){\n                        view.delegate(evtName).to(dest);\n                    }\n                }\n                // Activate delegating on future views in this collection.\n                this.on('add', (evt, view)=>{\n                    for (const evtName of events){\n                        view.delegate(evtName).to(dest);\n                    }\n                });\n                // Deactivate delegating when view is removed from this collection.\n                this.on('remove', (evt, view)=>{\n                    for (const evtName of events){\n                        view.stopDelegating(evtName, dest);\n                    }\n                });\n            }\n        };\n    }\n    /**\n\t * This method {@link module:ui/view~View#render renders} a new view added to the collection.\n\t *\n\t * If the {@link #_parentElement parent element} of the collection is set, this method also adds\n\t * the view's {@link module:ui/view~View#element} as a child of the parent in DOM at a specified index.\n\t *\n\t * **Note**: If index is not specified, the view's element is pushed as the last child\n\t * of the parent element.\n\t *\n\t * @param view A new view added to the collection.\n\t * @param index An index the view holds in the collection. When not specified,\n\t * the view is added at the end.\n\t */ _renderViewIntoCollectionParent(view, index) {\n        if (!view.isRendered) {\n            view.render();\n        }\n        if (view.element && this._parentElement) {\n            this._parentElement.insertBefore(view.element, this._parentElement.children[index]);\n        }\n    }\n    /**\n\t * Removes a child view from the collection. If the {@link #setParent parent element} of the\n\t * collection has been set, the {@link module:ui/view~View#element element} of the view is also removed\n\t * in DOM, reflecting the order of the collection.\n\t *\n\t * See the {@link #add} method.\n\t *\n\t * @param subject The view to remove, its id or index in the collection.\n\t * @returns The removed view.\n\t */ remove(subject) {\n        return super.remove(subject);\n    }\n}\n/**\n * Check if all entries of the array are of `String` type.\n *\n * @param arr An array to be checked.\n */ function isStringArray(arr) {\n    return arr.every((a)=>typeof a == 'string');\n}\n\nconst xhtmlNs = 'http://www.w3.org/1999/xhtml';\n/**\n * A basic Template class. It renders a DOM HTML element or text from a\n * {@link module:ui/template~TemplateDefinition definition} and supports element attributes, children,\n * bindings to {@link module:utils/observablemixin~Observable observables} and DOM event propagation.\n *\n * A simple template can look like this:\n *\n * ```ts\n * const bind = Template.bind( observable, emitter );\n *\n * new Template( {\n * \ttag: 'p',\n * \tattributes: {\n * \t\tclass: 'foo',\n * \t\tstyle: {\n * \t\t\tbackgroundColor: 'yellow'\n * \t\t}\n * \t},\n * \ton: {\n * \t\tclick: bind.to( 'clicked' )\n * \t},\n * \tchildren: [\n * \t\t'A paragraph.'\n * \t]\n * } ).render();\n * ```\n *\n * and it will render the following HTML element:\n *\n * ```html\n * <p class=\"foo\" style=\"background-color: yellow;\">A paragraph.</p>\n * ```\n *\n * Additionally, the `observable` will always fire `clicked` upon clicking `<p>` in the DOM.\n *\n * See {@link module:ui/template~TemplateDefinition} to know more about templates and complex\n * template definitions.\n */ class Template extends /* #__PURE__ */ EmitterMixin() {\n    ns;\n    /**\n\t * The tag (`tagName`) of this template, e.g. `div`. It also indicates that the template\n\t * renders to an HTML element.\n\t */ tag;\n    /**\n\t * The text of the template. It also indicates that the template renders to a DOM text node.\n\t */ text;\n    /**\n\t * The attributes of the template, e.g. `{ id: [ 'ck-id' ] }`, corresponding with\n\t * the attributes of an HTML element.\n\t *\n\t * **Note**: This property only makes sense when {@link #tag} is defined.\n\t */ attributes;\n    /**\n\t * The children of the template. They can be either:\n\t * * independent instances of {@link ~Template} (sub–templates),\n\t * * native DOM Nodes.\n\t *\n\t * **Note**: This property only makes sense when {@link #tag} is defined.\n\t */ children;\n    /**\n\t * The DOM event listeners of the template.\n\t */ eventListeners;\n    /**\n\t * Indicates whether this particular Template instance has been\n\t * {@link #render rendered}.\n\t */ _isRendered;\n    /**\n\t * The data used by the {@link #revert} method to restore a node to its original state.\n\t *\n\t * See: {@link #apply}.\n\t */ _revertData;\n    /**\n\t * Creates an instance of the {@link ~Template} class.\n\t *\n\t * @param def The definition of the template.\n\t */ constructor(def){\n        super();\n        Object.assign(this, normalize(clone(def)));\n        this._isRendered = false;\n        this._revertData = null;\n    }\n    /**\n\t * Renders a DOM Node (an HTML element or text) out of the template.\n\t *\n\t * ```ts\n\t * const domNode = new Template( { ... } ).render();\n\t * ```\n\t *\n\t * See: {@link #apply}.\n\t */ render() {\n        const node = this._renderNode({\n            intoFragment: true\n        });\n        this._isRendered = true;\n        return node;\n    }\n    /**\n\t * Applies the template to an existing DOM Node, either HTML element or text.\n\t *\n\t * **Note:** No new DOM nodes will be created. Applying extends:\n\t *\n\t * {@link module:ui/template~TemplateDefinition attributes},\n\t * {@link module:ui/template~TemplateDefinition event listeners}, and\n\t * `textContent` of {@link module:ui/template~TemplateDefinition children} only.\n\t *\n\t * **Note:** Existing `class` and `style` attributes are extended when a template\n\t * is applied to an HTML element, while other attributes and `textContent` are overridden.\n\t *\n\t * **Note:** The process of applying a template can be easily reverted using the\n\t * {@link module:ui/template~Template#revert} method.\n\t *\n\t * ```ts\n\t * const element = document.createElement( 'div' );\n\t * const observable = new Model( { divClass: 'my-div' } );\n\t * const emitter = Object.create( EmitterMixin );\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \tattributes: {\n\t * \t\tid: 'first-div',\n\t * \t\tclass: bind.to( 'divClass' )\n\t * \t},\n\t * \ton: {\n\t * \t\tclick: bind( 'elementClicked' ) // Will be fired by the observable.\n\t * \t},\n\t * \tchildren: [\n\t * \t\t'Div text.'\n\t * \t]\n\t * } ).apply( element );\n\t *\n\t * console.log( element.outerHTML ); // -> '<div id=\"first-div\" class=\"my-div\"></div>'\n\t * ```\n\t *\n\t * @see module:ui/template~Template#render\n\t * @see module:ui/template~Template#revert\n\t * @param node Root node for the template to apply.\n\t */ apply(node) {\n        this._revertData = getEmptyRevertData();\n        this._renderNode({\n            node,\n            intoFragment: false,\n            isApplying: true,\n            revertData: this._revertData\n        });\n        return node;\n    }\n    /**\n\t * Reverts a template {@link module:ui/template~Template#apply applied} to a DOM node.\n\t *\n\t * @param node The root node for the template to revert. In most of the cases, it is the\n\t * same node used by {@link module:ui/template~Template#apply}.\n\t */ revert(node) {\n        if (!this._revertData) {\n            /**\n\t\t\t * Attempting to revert a template which has not been applied yet.\n\t\t\t *\n\t\t\t * @error ui-template-revert-not-applied\n\t\t\t */ throw new CKEditorError('ui-template-revert-not-applied', [\n                this,\n                node\n            ]);\n        }\n        this._revertTemplateFromNode(node, this._revertData);\n    }\n    /**\n\t * Returns an iterator which traverses the template in search of {@link module:ui/view~View}\n\t * instances and returns them one by one.\n\t *\n\t * ```ts\n\t * const viewFoo = new View();\n\t * const viewBar = new View();\n\t * const viewBaz = new View();\n\t * const template = new Template( {\n\t * \ttag: 'div',\n\t * \tchildren: [\n\t * \t\tviewFoo,\n\t * \t\t{\n\t * \t\t\ttag: 'div',\n\t * \t\t\tchildren: [\n\t * \t\t\t\tviewBar\n\t * \t\t\t]\n\t * \t\t},\n\t * \t\tviewBaz\n\t * \t]\n\t * } );\n\t *\n\t * // Logs: viewFoo, viewBar, viewBaz\n\t * for ( const view of template.getViews() ) {\n\t * \tconsole.log( view );\n\t * }\n\t * ```\n\t */ *getViews() {\n        function* search(def) {\n            if (def.children) {\n                for (const child of def.children){\n                    if (isView(child)) {\n                        yield child;\n                    } else if (isTemplate(child)) {\n                        yield* search(child);\n                    }\n                }\n            }\n        }\n        yield* search(this);\n    }\n    /**\n\t * An entry point to the interface which binds DOM nodes to\n\t * {@link module:utils/observablemixin~Observable observables}.\n\t * There are two types of bindings:\n\t *\n\t * * HTML element attributes or text `textContent` synchronized with attributes of an\n\t * {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}\n\t * and {@link module:ui/template~BindChain#if}.\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \tattributes: {\n\t * \t\t// Binds the element \"class\" attribute to observable#classAttribute.\n\t * \t\tclass: bind.to( 'classAttribute' )\n\t * \t}\n\t * } ).render();\n\t * ```\n\t *\n\t * * DOM events fired on HTML element propagated through\n\t * {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}.\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * new Template( {\n\t * \ton: {\n\t * \t\t// Will be fired by the observable.\n\t * \t\tclick: bind( 'elementClicked' )\n\t * \t}\n\t * } ).render();\n\t * ```\n\t *\n\t * Also see {@link module:ui/view~View#bindTemplate}.\n\t *\n\t * @param observable An observable which provides boundable attributes.\n\t * @param emitter An emitter that listens to observable attribute\n\t * changes or DOM Events (depending on the kind of the binding). Usually, a {@link module:ui/view~View} instance.\n\t */ static bind(observable, emitter) {\n        return {\n            to (eventNameOrFunctionOrAttribute, callback) {\n                return new TemplateToBinding({\n                    eventNameOrFunction: eventNameOrFunctionOrAttribute,\n                    attribute: eventNameOrFunctionOrAttribute,\n                    observable,\n                    emitter,\n                    callback\n                });\n            },\n            if (attribute, valueIfTrue, callback) {\n                return new TemplateIfBinding({\n                    observable,\n                    emitter,\n                    attribute,\n                    valueIfTrue,\n                    callback\n                });\n            }\n        };\n    }\n    /**\n\t * Extends an existing {@link module:ui/template~Template} instance with some additional content\n\t * from another {@link module:ui/template~TemplateDefinition}.\n\t *\n\t * ```ts\n\t * const bind = Template.bind( observable, emitter );\n\t *\n\t * const template = new Template( {\n\t * \ttag: 'p',\n\t * \tattributes: {\n\t * \t\tclass: 'a',\n\t * \t\tdata-x: bind.to( 'foo' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t{\n\t * \t\t\ttag: 'span',\n\t * \t\t\tattributes: {\n\t * \t\t\t\tclass: 'b'\n\t * \t\t\t},\n\t * \t\t\tchildren: [\n\t * \t\t\t\t'Span'\n\t * \t\t\t]\n\t * \t\t}\n\t * \t]\n\t *  } );\n\t *\n\t * // Instance-level extension.\n\t * Template.extend( template, {\n\t * \tattributes: {\n\t * \t\tclass: 'b',\n\t * \t\tdata-x: bind.to( 'bar' )\n\t * \t},\n\t * \tchildren: [\n\t * \t\t{\n\t * \t\t\tattributes: {\n\t * \t\t\t\tclass: 'c'\n\t * \t\t\t}\n\t * \t\t}\n\t * \t]\n\t * } );\n\t *\n\t * // Child extension.\n\t * Template.extend( template.children[ 0 ], {\n\t * \tattributes: {\n\t * \t\tclass: 'd'\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * the `outerHTML` of `template.render()` is:\n\t *\n\t * ```html\n\t * <p class=\"a b\" data-x=\"{ observable.foo } { observable.bar }\">\n\t * \t<span class=\"b c d\">Span</span>\n\t * </p>\n\t * ```\n\t *\n\t * @param template An existing template instance to be extended.\n\t * @param def Additional definition to be applied to a template.\n\t */ static extend(template, def) {\n        if (template._isRendered) {\n            /**\n\t\t\t * Extending a template after rendering may not work as expected. To make sure\n\t\t\t * the {@link module:ui/template~Template.extend extending} works for an element,\n\t\t\t * make sure it happens before {@link module:ui/template~Template#render} is called.\n\t\t\t *\n\t\t\t * @error template-extend-render\n\t\t\t */ throw new CKEditorError('template-extend-render', [\n                this,\n                template\n            ]);\n        }\n        extendTemplate(template, normalize(clone(def)));\n    }\n    /**\n\t * Renders a DOM Node (either an HTML element or text) out of the template.\n\t *\n\t * @param data Rendering data.\n\t */ _renderNode(data) {\n        let isInvalid;\n        if (data.node) {\n            // When applying, a definition cannot have \"tag\" and \"text\" at the same time.\n            isInvalid = this.tag && this.text;\n        } else {\n            // When rendering, a definition must have either \"tag\" or \"text\": XOR( this.tag, this.text ).\n            isInvalid = this.tag ? this.text : !this.text;\n        }\n        if (isInvalid) {\n            /**\n\t\t\t * Node definition cannot have the \"tag\" and \"text\" properties at the same time.\n\t\t\t * Node definition must have either \"tag\" or \"text\" when rendering a new Node.\n\t\t\t *\n\t\t\t * @error ui-template-wrong-syntax\n\t\t\t */ throw new CKEditorError('ui-template-wrong-syntax', this);\n        }\n        if (this.text) {\n            return this._renderText(data);\n        } else {\n            return this._renderElement(data);\n        }\n    }\n    /**\n\t * Renders an HTML element out of the template.\n\t *\n\t * @param data Rendering data.\n\t */ _renderElement(data) {\n        let node = data.node;\n        if (!node) {\n            node = data.node = document.createElementNS(this.ns || xhtmlNs, this.tag);\n        }\n        this._renderAttributes(data);\n        this._renderElementChildren(data);\n        this._setUpListeners(data);\n        return node;\n    }\n    /**\n\t * Renders a text node out of {@link module:ui/template~Template#text}.\n\t *\n\t * @param data Rendering data.\n\t */ _renderText(data) {\n        let node = data.node;\n        // Save the original textContent to revert it in #revert().\n        if (node) {\n            data.revertData.text = node.textContent;\n        } else {\n            node = data.node = document.createTextNode('');\n        }\n        // Check if this Text Node is bound to Observable. Cases:\n        //\n        //\t\ttext: [ Template.bind( ... ).to( ... ) ]\n        //\n        //\t\ttext: [\n        //\t\t\t'foo',\n        //\t\t\tTemplate.bind( ... ).to( ... ),\n        //\t\t\t...\n        //\t\t]\n        //\n        if (hasTemplateBinding(this.text)) {\n            this._bindToObservable({\n                schema: this.text,\n                updater: getTextUpdater(node),\n                data\n            });\n        } else {\n            node.textContent = this.text.join('');\n        }\n        return node;\n    }\n    /**\n\t * Renders HTML element attributes out of {@link module:ui/template~Template#attributes}.\n\t *\n\t * @param data Rendering data.\n\t */ _renderAttributes(data) {\n        if (!this.attributes) {\n            return;\n        }\n        const node = data.node;\n        const revertData = data.revertData;\n        for(const attrName in this.attributes){\n            // Current attribute value in DOM.\n            const domAttrValue = node.getAttribute(attrName);\n            // The value to be set.\n            const attrValue = this.attributes[attrName];\n            // Save revert data.\n            if (revertData) {\n                revertData.attributes[attrName] = domAttrValue;\n            }\n            // Detect custom namespace:\n            //\n            //\t\tclass: {\n            //\t\t\tns: 'abc',\n            //\t\t\tvalue: Template.bind( ... ).to( ... )\n            //\t\t}\n            //\n            const attrNs = isNamespaced(attrValue) ? attrValue[0].ns : null;\n            // Activate binding if one is found. Cases:\n            //\n            //\t\tclass: [\n            //\t\t\tTemplate.bind( ... ).to( ... )\n            //\t\t]\n            //\n            //\t\tclass: [\n            //\t\t\t'bar',\n            //\t\t\tTemplate.bind( ... ).to( ... ),\n            //\t\t\t'baz'\n            //\t\t]\n            //\n            //\t\tclass: {\n            //\t\t\tns: 'abc',\n            //\t\t\tvalue: Template.bind( ... ).to( ... )\n            //\t\t}\n            //\n            if (hasTemplateBinding(attrValue)) {\n                // Normalize attributes with additional data like namespace:\n                //\n                //\t\tclass: {\n                //\t\t\tns: 'abc',\n                //\t\t\tvalue: [ ... ]\n                //\t\t}\n                //\n                const valueToBind = isNamespaced(attrValue) ? attrValue[0].value : attrValue;\n                // Extend the original value of attributes like \"style\" and \"class\",\n                // don't override them.\n                if (revertData && shouldExtend(attrName)) {\n                    valueToBind.unshift(domAttrValue);\n                }\n                this._bindToObservable({\n                    schema: valueToBind,\n                    updater: getAttributeUpdater(node, attrName, attrNs),\n                    data\n                });\n            } else if (attrName == 'style' && typeof attrValue[0] !== 'string') {\n                this._renderStyleAttribute(attrValue[0], data);\n            } else {\n                // Extend the original value of attributes like \"style\" and \"class\",\n                // don't override them.\n                if (revertData && domAttrValue && shouldExtend(attrName)) {\n                    attrValue.unshift(domAttrValue);\n                }\n                const value = attrValue// Retrieve \"values\" from:\n                //\n                //\t\tclass: [\n                //\t\t\t{\n                //\t\t\t\tns: 'abc',\n                //\t\t\t\tvalue: [ ... ]\n                //\t\t\t}\n                //\t\t]\n                //\n                .map((val)=>val ? val.value || val : val)// Flatten the array.\n                .reduce((prev, next)=>prev.concat(next), [])// Convert into string.\n                .reduce(arrayValueReducer, '');\n                if (!isFalsy(value)) {\n                    node.setAttributeNS(attrNs, attrName, value);\n                }\n            }\n        }\n    }\n    /**\n\t * Renders the `style` attribute of an HTML element based on\n\t * {@link module:ui/template~Template#attributes}.\n\t *\n\t * A style attribute is an object with static values:\n\t *\n\t * ```ts\n\t * attributes: {\n\t * \tstyle: {\n\t * \t\tcolor: 'red'\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * or values bound to {@link module:ui/model~Model} properties:\n\t *\n\t * ```ts\n\t * attributes: {\n\t * \tstyle: {\n\t * \t\tcolor: bind.to( ... )\n\t * \t}\n\t * }\n\t * ```\n\t *\n\t * Note: The `style` attribute is rendered without setting the namespace. It does not seem to be\n\t * needed.\n\t *\n\t * @param styles Styles located in `attributes.style` of {@link module:ui/template~TemplateDefinition}.\n\t * @param data Rendering data.\n\t */ _renderStyleAttribute(styles, data) {\n        const node = data.node;\n        for(const styleName in styles){\n            const styleValue = styles[styleName];\n            // Cases:\n            //\n            //\t\tstyle: {\n            //\t\t\tcolor: bind.to( 'attribute' )\n            //\t\t}\n            //\n            if (hasTemplateBinding(styleValue)) {\n                this._bindToObservable({\n                    schema: [\n                        styleValue\n                    ],\n                    updater: getStyleUpdater(node, styleName),\n                    data\n                });\n            } else {\n                node.style[styleName] = styleValue;\n            }\n        }\n    }\n    /**\n\t * Recursively renders HTML element's children from {@link module:ui/template~Template#children}.\n\t *\n\t * @param data Rendering data.\n\t */ _renderElementChildren(data) {\n        const node = data.node;\n        const container = data.intoFragment ? document.createDocumentFragment() : node;\n        const isApplying = data.isApplying;\n        let childIndex = 0;\n        for (const child of this.children){\n            if (isViewCollection(child)) {\n                if (!isApplying) {\n                    child.setParent(node);\n                    // Note: ViewCollection renders its children.\n                    for (const view of child){\n                        container.appendChild(view.element);\n                    }\n                }\n            } else if (isView(child)) {\n                if (!isApplying) {\n                    if (!child.isRendered) {\n                        child.render();\n                    }\n                    container.appendChild(child.element);\n                }\n            } else if (isNode(child)) {\n                container.appendChild(child);\n            } else {\n                if (isApplying) {\n                    const revertData = data.revertData;\n                    const childRevertData = getEmptyRevertData();\n                    revertData.children.push(childRevertData);\n                    child._renderNode({\n                        intoFragment: false,\n                        node: container.childNodes[childIndex++],\n                        isApplying: true,\n                        revertData: childRevertData\n                    });\n                } else {\n                    container.appendChild(child.render());\n                }\n            }\n        }\n        if (data.intoFragment) {\n            node.appendChild(container);\n        }\n    }\n    /**\n\t * Activates `on` event listeners from the {@link module:ui/template~TemplateDefinition}\n\t * on an HTML element.\n\t *\n\t * @param data Rendering data.\n\t */ _setUpListeners(data) {\n        if (!this.eventListeners) {\n            return;\n        }\n        for(const key in this.eventListeners){\n            const revertBindings = this.eventListeners[key].map((schemaItem)=>{\n                const [domEvtName, domSelector] = key.split('@');\n                return schemaItem.activateDomEventListener(domEvtName, domSelector, data);\n            });\n            if (data.revertData) {\n                data.revertData.bindings.push(revertBindings);\n            }\n        }\n    }\n    /**\n\t * For a given {@link module:ui/template~TemplateValueSchema} containing {@link module:ui/template~TemplateBinding}\n\t * activates the binding and sets its initial value.\n\t *\n\t * Note: {@link module:ui/template~TemplateValueSchema} can be for HTML element attributes or\n\t * text node `textContent`.\n\t *\n\t * @param options Binding options.\n\t * @param options.updater A function which updates the DOM (like attribute or text).\n\t * @param options.data Rendering data.\n\t */ _bindToObservable({ schema, updater, data }) {\n        const revertData = data.revertData;\n        // Set initial values.\n        syncValueSchemaValue(schema, updater, data);\n        const revertBindings = schema// Filter \"falsy\" (false, undefined, null, '') value schema components out.\n        .filter((item)=>!isFalsy(item))// Filter inactive bindings from schema, like static strings ('foo'), numbers (42), etc.\n        .filter((item)=>item.observable)// Once only the actual binding are left, let the emitter listen to observable change:attribute event.\n        // TODO: Reduce the number of listeners attached as many bindings may listen\n        // to the same observable attribute.\n        .map((templateBinding)=>templateBinding.activateAttributeListener(schema, updater, data));\n        if (revertData) {\n            revertData.bindings.push(revertBindings);\n        }\n    }\n    /**\n\t * Reverts {@link module:ui/template~RenderData#revertData template data} from a node to\n\t * return it to the original state.\n\t *\n\t * @param node A node to be reverted.\n\t * @param revertData An object that stores information about what changes have been made by\n\t * {@link #apply} to the node. See {@link module:ui/template~RenderData#revertData} for more information.\n\t */ _revertTemplateFromNode(node, revertData) {\n        for (const binding of revertData.bindings){\n            // Each binding may consist of several observable+observable#attribute.\n            // like the following has 2:\n            //\n            //\t\tclass: [\n            //\t\t\t'x',\n            //\t\t\tbind.to( 'foo' ),\n            //\t\t\t'y',\n            //\t\t\tbind.to( 'bar' )\n            //\t\t]\n            //\n            for (const revertBinding of binding){\n                revertBinding();\n            }\n        }\n        if (revertData.text) {\n            node.textContent = revertData.text;\n            return;\n        }\n        const element = node;\n        for(const attrName in revertData.attributes){\n            const attrValue = revertData.attributes[attrName];\n            // When the attribute has **not** been set before #apply().\n            if (attrValue === null) {\n                element.removeAttribute(attrName);\n            } else {\n                element.setAttribute(attrName, attrValue);\n            }\n        }\n        for(let i = 0; i < revertData.children.length; ++i){\n            this._revertTemplateFromNode(element.childNodes[i], revertData.children[i]);\n        }\n    }\n}\n/**\n * Describes a binding created by the {@link module:ui/template~Template.bind} interface.\n *\n * @internal\n */ class TemplateBinding {\n    /**\n\t * The name of the {@link module:ui/template~TemplateBinding#observable observed attribute}.\n\t */ attribute;\n    /**\n\t * An observable instance of the binding. It either:\n\t *\n\t * * provides the attribute with the value,\n\t * * or passes the event when a corresponding DOM event is fired.\n\t */ observable;\n    /**\n\t * An {@link module:utils/emittermixin~Emitter} used by the binding to:\n\t *\n\t * * listen to the attribute change in the {@link module:ui/template~TemplateBinding#observable},\n\t * * or listen to the event in the DOM.\n\t */ emitter;\n    /**\n\t * A custom function to process the value of the {@link module:ui/template~TemplateBinding#attribute}.\n\t */ callback;\n    /**\n\t * Creates an instance of the {@link module:ui/template~TemplateBinding} class.\n\t *\n\t * @param def The definition of the binding.\n\t */ constructor(def){\n        this.attribute = def.attribute;\n        this.observable = def.observable;\n        this.emitter = def.emitter;\n        this.callback = def.callback;\n    }\n    /**\n\t * Returns the value of the binding. It is the value of the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}. The value may be processed by the\n\t * {@link module:ui/template~TemplateBinding#callback}, if such has been passed to the binding.\n\t *\n\t * @param node A native DOM node, passed to the custom {@link module:ui/template~TemplateBinding#callback}.\n\t * @returns The value of {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}.\n\t */ getValue(node) {\n        const value = this.observable[this.attribute];\n        return this.callback ? this.callback(value, node) : value;\n    }\n    /**\n\t * Activates the listener which waits for changes of the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}, then updates the DOM with the aggregated\n\t * value of {@link module:ui/template~TemplateValueSchema}.\n\t *\n\t * @param schema A full schema to generate an attribute or text in the DOM.\n\t * @param updater A DOM updater function used to update the native DOM attribute or text.\n\t * @param data Rendering data.\n\t * @returns A function to sever the listener binding.\n\t */ activateAttributeListener(schema, updater, data) {\n        const callback = ()=>syncValueSchemaValue(schema, updater, data);\n        this.emitter.listenTo(this.observable, `change:${this.attribute}`, callback);\n        // Allows revert of the listener.\n        return ()=>{\n            this.emitter.stopListening(this.observable, `change:${this.attribute}`, callback);\n        };\n    }\n}\n/**\n * Describes either:\n *\n * * a binding to an {@link module:utils/observablemixin~Observable},\n * * or a native DOM event binding.\n *\n * It is created by the {@link module:ui/template~BindChain#to} method.\n *\n * @internal\n */ class TemplateToBinding extends TemplateBinding {\n    eventNameOrFunction;\n    constructor(def){\n        super(def);\n        this.eventNameOrFunction = def.eventNameOrFunction;\n    }\n    /**\n\t * Activates the listener for the native DOM event, which when fired, is propagated by\n\t * the {@link module:ui/template~TemplateBinding#emitter}.\n\t *\n\t * @param domEvtName The name of the native DOM event.\n\t * @param domSelector The selector in the DOM to filter delegated events.\n\t * @param data Rendering data.\n\t * @returns A function to sever the listener binding.\n\t */ activateDomEventListener(domEvtName, domSelector, data) {\n        const callback = (evt, domEvt)=>{\n            if (!domSelector || domEvt.target.matches(domSelector)) {\n                if (typeof this.eventNameOrFunction == 'function') {\n                    this.eventNameOrFunction(domEvt);\n                } else {\n                    this.observable.fire(this.eventNameOrFunction, domEvt);\n                }\n            }\n        };\n        this.emitter.listenTo(data.node, domEvtName, callback);\n        // Allows revert of the listener.\n        return ()=>{\n            this.emitter.stopListening(data.node, domEvtName, callback);\n        };\n    }\n}\n/**\n * Describes a binding to {@link module:utils/observablemixin~Observable} created by the {@link module:ui/template~BindChain#if}\n * method.\n *\n * @internal\n */ class TemplateIfBinding extends TemplateBinding {\n    /**\n\t * The value of the DOM attribute or text to be set if the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable} is `true`.\n\t */ valueIfTrue;\n    constructor(def){\n        super(def);\n        this.valueIfTrue = def.valueIfTrue;\n    }\n    /**\n\t * @inheritDoc\n\t */ getValue(node) {\n        const value = super.getValue(node);\n        return isFalsy(value) ? false : this.valueIfTrue || true;\n    }\n}\n/**\n * Checks whether given {@link module:ui/template~TemplateValueSchema} contains a\n * {@link module:ui/template~TemplateBinding}.\n */ function hasTemplateBinding(schema) {\n    if (!schema) {\n        return false;\n    }\n    // Normalize attributes with additional data like namespace:\n    //\n    //\t\tclass: {\n    //\t\t\tns: 'abc',\n    //\t\t\tvalue: [ ... ]\n    //\t\t}\n    //\n    if (schema.value) {\n        schema = schema.value;\n    }\n    if (Array.isArray(schema)) {\n        return schema.some(hasTemplateBinding);\n    } else if (schema instanceof TemplateBinding) {\n        return true;\n    }\n    return false;\n}\n/**\n * Assembles the value using {@link module:ui/template~TemplateValueSchema} and stores it in a form of\n * an Array. Each entry of the Array corresponds to one of {@link module:ui/template~TemplateValueSchema}\n * items.\n *\n * @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n */ function getValueSchemaValue(schema, node) {\n    return schema.map((schemaItem)=>{\n        // Process {@link module:ui/template~TemplateBinding} bindings.\n        if (schemaItem instanceof TemplateBinding) {\n            return schemaItem.getValue(node);\n        }\n        // All static values like strings, numbers, and \"falsy\" values (false, null, undefined, '', etc.) just pass.\n        return schemaItem;\n    });\n}\n/**\n * A function executed each time the bound Observable attribute changes, which updates the DOM with a value\n * constructed from {@link module:ui/template~TemplateValueSchema}.\n *\n * @param updater A function which updates the DOM (like attribute or text).\n * @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n */ function syncValueSchemaValue(schema, updater, { node }) {\n    const values = getValueSchemaValue(schema, node);\n    let value;\n    // Check if schema is a single Template.bind.if, like:\n    //\n    //\t\tclass: Template.bind.if( 'foo' )\n    //\n    if (schema.length == 1 && schema[0] instanceof TemplateIfBinding) {\n        value = values[0];\n    } else {\n        value = values.reduce(arrayValueReducer, '');\n    }\n    if (isFalsy(value)) {\n        updater.remove();\n    } else {\n        updater.set(value);\n    }\n}\n/**\n * Returns an object consisting of `set` and `remove` functions, which\n * can be used in the context of DOM Node to set or reset `textContent`.\n * @see module:ui/view~View#_bindToObservable\n *\n * @param node DOM Node to be modified.\n */ function getTextUpdater(node) {\n    return {\n        set (value) {\n            node.textContent = value;\n        },\n        remove () {\n            node.textContent = '';\n        }\n    };\n}\n/**\n * Returns an object consisting of `set` and `remove` functions, which\n * can be used in the context of DOM Node to set or reset an attribute.\n * @see module:ui/view~View#_bindToObservable\n *\n * @param el DOM Node to be modified.\n * @param attrName Name of the attribute to be modified.\n * @param ns Namespace to use.\n */ function getAttributeUpdater(el, attrName, ns) {\n    return {\n        set (value) {\n            el.setAttributeNS(ns, attrName, value);\n        },\n        remove () {\n            el.removeAttributeNS(ns, attrName);\n        }\n    };\n}\n/**\n * Returns an object consisting of `set` and `remove` functions, which\n * can be used in the context of CSSStyleDeclaration to set or remove a style.\n * @see module:ui/view~View#_bindToObservable\n *\n * @param el DOM Node to be modified.\n * @param styleName Name of the style to be modified.\n */ function getStyleUpdater(el, styleName) {\n    return {\n        set (value) {\n            el.style[styleName] = value;\n        },\n        remove () {\n            el.style[styleName] = null;\n        }\n    };\n}\n/**\n * Clones definition of the template.\n */ function clone(def) {\n    const clone = cloneDeepWith(def, (value)=>{\n        // Don't clone the `Template.bind`* bindings because of the references to Observable\n        // and DomEmitterMixin instances inside, which would also be traversed and cloned by greedy\n        // cloneDeepWith algorithm. There's no point in cloning Observable/DomEmitterMixins\n        // along with the definition.\n        //\n        // Don't clone Template instances if provided as a child. They're simply #render()ed\n        // and nothing should interfere.\n        //\n        // Also don't clone View instances if provided as a child of the Template. The template\n        // instance will be extracted from the View during the normalization and there's no need\n        // to clone it.\n        if (value && (value instanceof TemplateBinding || isTemplate(value) || isView(value) || isViewCollection(value))) {\n            return value;\n        }\n    });\n    return clone;\n}\n/**\n * Normalizes given {@link module:ui/template~TemplateDefinition}.\n *\n * See:\n *  * {@link normalizeAttributes}\n *  * {@link normalizeListeners}\n *  * {@link normalizePlainTextDefinition}\n *  * {@link normalizeTextDefinition}\n *\n * @param def A template definition.\n * @returns Normalized definition.\n */ function normalize(def) {\n    if (typeof def == 'string') {\n        def = normalizePlainTextDefinition(def);\n    } else if (def.text) {\n        normalizeTextDefinition(def);\n    }\n    if (def.on) {\n        def.eventListeners = normalizeListeners(def.on);\n        // Template mixes EmitterMixin, so delete #on to avoid collision.\n        delete def.on;\n    }\n    if (!def.text) {\n        if (def.attributes) {\n            normalizeAttributes(def.attributes);\n        }\n        const children = [];\n        if (def.children) {\n            if (isViewCollection(def.children)) {\n                children.push(def.children);\n            } else {\n                for (const child of def.children){\n                    if (isTemplate(child) || isView(child) || isNode(child)) {\n                        children.push(child);\n                    } else {\n                        children.push(new Template(child));\n                    }\n                }\n            }\n        }\n        def.children = children;\n    }\n    return def;\n}\n/**\n * Normalizes \"attributes\" section of {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * attributes: {\n * \ta: 'bar',\n * \tb: {@link module:ui/template~TemplateBinding},\n * \tc: {\n * \t\tvalue: 'bar'\n * \t}\n * }\n * ```\n *\n * becomes\n *\n * ```\n * attributes: {\n * \ta: [ 'bar' ],\n * \tb: [ {@link module:ui/template~TemplateBinding} ],\n * \tc: {\n * \t\tvalue: [ 'bar' ]\n * \t}\n * }\n * ```\n */ function normalizeAttributes(attributes) {\n    for(const a in attributes){\n        if (attributes[a].value) {\n            attributes[a].value = toArray(attributes[a].value);\n        }\n        arrayify(attributes, a);\n    }\n}\n/**\n * Normalizes \"on\" section of {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * on: {\n * \ta: 'bar',\n * \tb: {@link module:ui/template~TemplateBinding},\n * \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n * }\n * ```\n *\n * becomes\n *\n * ```\n * on: {\n * \ta: [ 'bar' ],\n * \tb: [ {@link module:ui/template~TemplateBinding} ],\n * \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n * }\n * ```\n *\n * @returns Object containing normalized listeners.\n */ function normalizeListeners(listeners) {\n    for(const l in listeners){\n        arrayify(listeners, l);\n    }\n    return listeners;\n}\n/**\n * Normalizes \"string\" {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * \"foo\"\n * ```\n *\n * becomes\n *\n * ```\n * { text: [ 'foo' ] },\n * ```\n *\n * @returns Normalized template definition.\n */ function normalizePlainTextDefinition(def) {\n    return {\n        text: [\n            def\n        ]\n    };\n}\n/**\n * Normalizes text {@link module:ui/template~TemplateDefinition}.\n *\n * ```\n * children: [\n * \t{ text: 'def' },\n * \t{ text: {@link module:ui/template~TemplateBinding} }\n * ]\n * ```\n *\n * becomes\n *\n * ```\n * children: [\n * \t{ text: [ 'def' ] },\n * \t{ text: [ {@link module:ui/template~TemplateBinding} ] }\n * ]\n * ```\n */ function normalizeTextDefinition(def) {\n    def.text = toArray(def.text);\n}\n/**\n * Wraps an entry in Object in an Array, if not already one.\n *\n * ```\n * {\n * \tx: 'y',\n * \ta: [ 'b' ]\n * }\n * ```\n *\n * becomes\n *\n * ```\n * {\n * \tx: [ 'y' ],\n * \ta: [ 'b' ]\n * }\n * ```\n */ function arrayify(obj, key) {\n    obj[key] = toArray(obj[key]);\n}\n/**\n * A helper which concatenates the value avoiding unwanted\n * leading white spaces.\n */ function arrayValueReducer(prev, cur) {\n    if (isFalsy(cur)) {\n        return prev;\n    } else if (isFalsy(prev)) {\n        return cur;\n    } else {\n        return `${prev} ${cur}`;\n    }\n}\n/**\n * Extends one object defined in the following format:\n *\n * ```\n * {\n * \tkey1: [Array1],\n * \tkey2: [Array2],\n * \t...\n * \tkeyN: [ArrayN]\n * }\n * ```\n *\n * with another object of the same data format.\n *\n * @param obj Base object.\n * @param ext Object extending base.\n */ function extendObjectValueArray(obj, ext) {\n    for(const a in ext){\n        if (obj[a]) {\n            obj[a].push(...ext[a]);\n        } else {\n            obj[a] = ext[a];\n        }\n    }\n}\n/**\n * A helper for {@link module:ui/template~Template#extend}. Recursively extends {@link module:ui/template~Template} instance\n * with content from {@link module:ui/template~TemplateDefinition}. See {@link module:ui/template~Template#extend} to learn more.\n *\n * @param def A template instance to be extended.\n * @param def A definition which is to extend the template instance.\n * @param Error context.\n */ function extendTemplate(template, def) {\n    if (def.attributes) {\n        if (!template.attributes) {\n            template.attributes = {};\n        }\n        extendObjectValueArray(template.attributes, def.attributes);\n    }\n    if (def.eventListeners) {\n        if (!template.eventListeners) {\n            template.eventListeners = {};\n        }\n        extendObjectValueArray(template.eventListeners, def.eventListeners);\n    }\n    if (def.text) {\n        template.text.push(...def.text);\n    }\n    if (def.children && def.children.length) {\n        if (template.children.length != def.children.length) {\n            /**\n\t\t\t * The number of children in extended definition does not match.\n\t\t\t *\n\t\t\t * @error ui-template-extend-children-mismatch\n\t\t\t */ throw new CKEditorError('ui-template-extend-children-mismatch', template);\n        }\n        let childIndex = 0;\n        for (const childDef of def.children){\n            extendTemplate(template.children[childIndex++], childDef);\n        }\n    }\n}\n/**\n * Checks if value is \"falsy\".\n * Note: 0 (Number) is not \"falsy\" in this context.\n *\n * @param value Value to be checked.\n */ function isFalsy(value) {\n    return !value && value !== 0;\n}\n/**\n * Checks if the item is an instance of {@link module:ui/view~View}\n *\n * @param value Value to be checked.\n */ function isView(item) {\n    return item instanceof View;\n}\n/**\n * Checks if the item is an instance of {@link module:ui/template~Template}\n *\n * @param value Value to be checked.\n */ function isTemplate(item) {\n    return item instanceof Template;\n}\n/**\n * Checks if the item is an instance of {@link module:ui/viewcollection~ViewCollection}\n *\n * @param value Value to be checked.\n */ function isViewCollection(item) {\n    return item instanceof ViewCollection;\n}\n/**\n * Checks if value array contains the one with namespace.\n */ function isNamespaced(attrValue) {\n    return isObject(attrValue[0]) && attrValue[0].ns;\n}\n/**\n * Creates an empty skeleton for {@link module:ui/template~Template#revert}\n * data.\n */ function getEmptyRevertData() {\n    return {\n        children: [],\n        bindings: [],\n        attributes: {}\n    };\n}\n/**\n * Checks whether an attribute should be extended when\n * {@link module:ui/template~Template#apply} is called.\n *\n * @param attrName Attribute name to check.\n */ function shouldExtend(attrName) {\n    return attrName == 'class' || attrName == 'style';\n}\n\n/**\n * The basic view class, which represents an HTML element created out of a\n * {@link module:ui/view~View#template}. Views are building blocks of the user interface and handle\n * interaction\n *\n * Views {@link module:ui/view~View#registerChild aggregate} children in\n * {@link module:ui/view~View#createCollection collections} and manage the life cycle of DOM\n * listeners e.g. by handling rendering and destruction.\n *\n * See the {@link module:ui/template~TemplateDefinition} syntax to learn more about shaping view\n * elements, attributes and listeners.\n *\n * ```ts\n * class SampleView extends View {\n * \tconstructor( locale ) {\n * \t\tsuper( locale );\n *\n * \t\tconst bind = this.bindTemplate;\n *\n * \t\t// Views define their interface (state) using observable attributes.\n * \t\tthis.set( 'elementClass', 'bar' );\n *\n * \t\tthis.setTemplate( {\n * \t\t\ttag: 'p',\n *\n * \t\t\t// The element of the view can be defined with its children.\n * \t\t\tchildren: [\n * \t\t\t\t'Hello',\n * \t\t\t\t{\n * \t\t\t\t\ttag: 'b',\n * \t\t\t\t\tchildren: [ 'world!' ]\n * \t\t\t\t}\n * \t\t\t],\n * \t\t\tattributes: {\n * \t\t\t\tclass: [\n * \t\t\t\t\t'foo',\n *\n * \t\t\t\t\t// Observable attributes control the state of the view in DOM.\n * \t\t\t\t\tbind.to( 'elementClass' )\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\ton: {\n * \t\t\t\t// Views listen to DOM events and propagate them.\n * \t\t\t\tclick: bind.to( 'clicked' )\n * \t\t\t}\n * \t\t} );\n * \t}\n * }\n *\n * const view = new SampleView( locale );\n *\n * view.render();\n *\n * // Append <p class=\"foo bar\">Hello<b>world</b></p> to the <body>\n * document.body.appendChild( view.element );\n *\n * // Change the class attribute to <p class=\"foo baz\">Hello<b>world</b></p>\n * view.elementClass = 'baz';\n *\n * // Respond to the \"click\" event in DOM by executing a custom action.\n * view.on( 'clicked', () => {\n * \tconsole.log( 'The view has been clicked!' );\n * } );\n * ```\n */ class View extends /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin()) {\n    /**\n\t * An HTML element of the view. `null` until {@link #render rendered}\n\t * from the {@link #template}.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor() {\n\t * \t\tsuper();\n\t *\n\t * \t\t// A template instance the #element will be created from.\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p'\n\t *\n\t * \t\t\t// ...\n\t * \t\t} );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView();\n\t *\n\t * // Renders the #template.\n\t * view.render();\n\t *\n\t * // Append the HTML element of the view to <body>.\n\t * document.body.appendChild( view.element );\n\t * ```\n\t *\n\t * **Note**: The element of the view can also be assigned directly:\n\t *\n\t * ```ts\n\t * view.element = document.querySelector( '#my-container' );\n\t * ```\n\t */ element;\n    /**\n\t * Set `true` when the view has already been {@link module:ui/view~View#render rendered}.\n\t *\n\t * @readonly\n\t */ isRendered;\n    /**\n\t * A set of tools to localize the user interface.\n\t *\n\t * Also see {@link module:core/editor/editor~Editor#locale}.\n\t *\n\t * @readonly\n\t */ locale;\n    /**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t *\n\t * Note: If {@link #locale} instance hasn't been passed to the view this method may not\n\t * be available.\n\t *\n\t * @see module:utils/locale~Locale#t\n\t */ t;\n    /**\n\t * Template of this view. It provides the {@link #element} representing\n\t * the view in DOM, which is {@link #render rendered}.\n\t */ template;\n    /**\n\t * Collections registered with {@link #createCollection}.\n\t */ _viewCollections;\n    /**\n\t * A collection of view instances, which have been added directly\n\t * into the {@link module:ui/template~Template#children}.\n\t */ _unboundChildren;\n    /**\n\t * Cached {@link module:ui/template~BindChain bind chain} object created by the\n\t * {@link #template}. See {@link #bindTemplate}.\n\t */ _bindTemplate;\n    /**\n\t * Creates an instance of the {@link module:ui/view~View} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super();\n        this.element = null;\n        this.isRendered = false;\n        this.locale = locale;\n        this.t = locale && locale.t;\n        this._viewCollections = new Collection();\n        this._unboundChildren = this.createCollection();\n        // Pass parent locale to its children.\n        this._viewCollections.on('add', (evt, collection)=>{\n            collection.locale = locale;\n            collection.t = locale && locale.t;\n        });\n        this.decorate('render');\n    }\n    /**\n\t * Shorthand for {@link module:ui/template~Template.bind}, a binding\n\t * {@link module:ui/template~BindChain interface} pre–configured for the view instance.\n\t *\n\t * It provides {@link module:ui/template~BindChain#to `to()`} and\n\t * {@link module:ui/template~BindChain#if `if()`} methods that initialize bindings with\n\t * observable attributes and attach DOM listeners.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tconst bind = this.bindTemplate;\n\t *\n\t * \t\t// These {@link module:utils/observablemixin~Observable observable} attributes will control\n\t * \t\t// the state of the view in DOM.\n\t * \t\tthis.set( {\n\t * \t\t\telementClass: 'foo',\n\t * \t\t \tisEnabled: true\n\t * \t\t } );\n\t *\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p',\n\t *\n\t * \t\t\tattributes: {\n\t * \t\t\t\t// The class HTML attribute will follow elementClass\n\t * \t\t\t\t// and isEnabled view attributes.\n\t * \t\t\t\tclass: [\n\t * \t\t\t\t\tbind.to( 'elementClass' )\n\t * \t\t\t\t\tbind.if( 'isEnabled', 'present-when-enabled' )\n\t * \t\t\t\t]\n\t * \t\t\t},\n\t *\n\t * \t\t\ton: {\n\t * \t\t\t\t// The view will fire the \"clicked\" event upon clicking <p> in DOM.\n\t * \t\t\t\tclick: bind.to( 'clicked' )\n\t * \t\t\t}\n\t * \t\t} );\n\t * \t}\n\t * }\n\t * ```\n\t */ get bindTemplate() {\n        if (this._bindTemplate) {\n            return this._bindTemplate;\n        }\n        return this._bindTemplate = Template.bind(this, this);\n    }\n    /**\n\t * Creates a new collection of views, which can be used as\n\t * {@link module:ui/template~Template#children} of this view.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tconst child = new ChildView( locale );\n\t * \t\tthis.items = this.createCollection( [ child ] );\n \t *\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p',\n\t *\n\t * \t\t\t// `items` collection will render here.\n\t * \t\t\tchildren: this.items\n\t * \t\t} );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView( locale );\n\t * view.render();\n\t *\n\t * // It will append <p><child#element></p> to the <body>.\n\t * document.body.appendChild( view.element );\n\t * ```\n\t *\n\t * @param views Initial views of the collection.\n\t * @returns A new collection of view instances.\n\t */ createCollection(views) {\n        const collection = new ViewCollection(views);\n        this._viewCollections.add(collection);\n        return collection;\n    }\n    /**\n\t * Registers a new child view under the view instance. Once registered, a child\n\t * view is managed by its parent, including {@link #render rendering}\n\t * and {@link #destroy destruction}.\n\t *\n\t * To revert this, use {@link #deregisterChild}.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tthis.childA = new SomeChildView( locale );\n\t * \t\tthis.childB = new SomeChildView( locale );\n\t *\n\t * \t\tthis.setTemplate( { tag: 'p' } );\n\t *\n\t * \t\t// Register the children.\n\t * \t\tthis.registerChild( [ this.childA, this.childB ] );\n\t * \t}\n\t *\n\t * \trender() {\n\t * \t\tsuper.render();\n\t *\n\t * \t\tthis.element.appendChild( this.childA.element );\n\t * \t\tthis.element.appendChild( this.childB.element );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView( locale );\n\t *\n\t * view.render();\n\t *\n\t * // Will append <p><childA#element><b></b><childB#element></p>.\n\t * document.body.appendChild( view.element );\n\t * ```\n\t *\n\t * **Note**: There's no need to add child views if they're already referenced in the\n\t * {@link #template}:\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor( locale ) {\n\t * \t\tsuper( locale );\n\t *\n\t * \t\tthis.childA = new SomeChildView( locale );\n\t * \t\tthis.childB = new SomeChildView( locale );\n\t *\n\t * \t\tthis.setTemplate( {\n\t * \t\t\ttag: 'p',\n\t *\n \t * \t\t\t// These children will be added automatically. There's no\n \t * \t\t\t// need to call {@link #registerChild} for any of them.\n\t * \t\t\tchildren: [ this.childA, this.childB ]\n\t * \t\t} );\n\t * \t}\n\t *\n\t * \t// ...\n\t * }\n\t * ```\n\t *\n\t * @param children Children views to be registered.\n\t */ registerChild(children) {\n        if (!isIterable(children)) {\n            children = [\n                children\n            ];\n        }\n        for (const child of children){\n            this._unboundChildren.add(child);\n        }\n    }\n    /**\n\t * The opposite of {@link #registerChild}. Removes a child view from this view instance.\n\t * Once removed, the child is no longer managed by its parent, e.g. it can safely\n\t * become a child of another parent view.\n\t *\n\t * @see #registerChild\n\t * @param children Child views to be removed.\n\t */ deregisterChild(children) {\n        if (!isIterable(children)) {\n            children = [\n                children\n            ];\n        }\n        for (const child of children){\n            this._unboundChildren.remove(child);\n        }\n    }\n    /**\n\t * Sets the {@link #template} of the view with with given definition.\n\t *\n\t * A shorthand for:\n\t *\n\t * ```ts\n\t * view.setTemplate( definition );\n\t * ```\n\t *\n\t * @param definition Definition of view's template.\n\t */ setTemplate(definition) {\n        this.template = new Template(definition);\n    }\n    /**\n\t * {@link module:ui/template~Template.extend Extends} the {@link #template} of the view with\n\t * with given definition.\n\t *\n\t * A shorthand for:\n\t *\n\t * ```ts\n\t * Template.extend( view.template, definition );\n\t * ```\n\t *\n\t * **Note**: Is requires the {@link #template} to be already set. See {@link #setTemplate}.\n\t *\n\t * @param definition Definition which extends the {@link #template}.\n\t */ extendTemplate(definition) {\n        Template.extend(this.template, definition);\n    }\n    /**\n\t * Recursively renders the view.\n\t *\n\t * Once the view is rendered:\n\t * * the {@link #element} becomes an HTML element out of {@link #template},\n\t * * the {@link #isRendered} flag is set `true`.\n\t *\n\t * **Note**: The children of the view:\n\t * * defined directly in the {@link #template}\n\t * * residing in collections created by the {@link #createCollection} method,\n\t * * and added by {@link #registerChild}\n\t * are also rendered in the process.\n\t *\n\t * In general, `render()` method is the right place to keep the code which refers to the\n\t * {@link #element} and should be executed at the very beginning of the view's life cycle.\n\t *\n\t * It is possible to {@link module:ui/template~Template.extend} the {@link #template} before\n\t * the view is rendered. To allow an early customization of the view (e.g. by its parent),\n\t * such references should be done in `render()`.\n\t *\n\t * ```ts\n\t * class SampleView extends View {\n\t * \tconstructor() {\n\t * \t\tthis.setTemplate( {\n\t * \t\t\t// ...\n\t * \t\t} );\n\t * \t},\n\t *\n\t * \trender() {\n\t * \t\t// View#element becomes available.\n\t * \t\tsuper.render();\n\t *\n\t * \t\t// The \"scroll\" listener depends on #element.\n\t * \t\tthis.listenTo( window, 'scroll', () => {\n\t * \t\t\t// A reference to #element would render the #template and make it non-extendable.\n\t * \t\t\tif ( window.scrollY > 0 ) {\n\t * \t\t\t\tthis.element.scrollLeft = 100;\n\t * \t\t\t} else {\n\t * \t\t\t\tthis.element.scrollLeft = 0;\n\t * \t\t\t}\n\t * \t\t} );\n\t * \t}\n\t * }\n\t *\n\t * const view = new SampleView();\n\t *\n\t * // Let's customize the view before it gets rendered.\n\t * view.extendTemplate( {\n\t * \tattributes: {\n\t * \t\tclass: [\n\t * \t\t\t'additional-class'\n\t * \t\t]\n\t * \t}\n\t * } );\n\t *\n\t * // Late rendering allows customization of the view.\n\t * view.render();\n\t * ```\n\t */ render() {\n        if (this.isRendered) {\n            /**\n\t\t\t * This View has already been rendered.\n\t\t\t *\n\t\t\t * @error ui-view-render-already-rendered\n\t\t\t */ throw new CKEditorError('ui-view-render-already-rendered', this);\n        }\n        // Render #element of the view.\n        if (this.template) {\n            this.element = this.template.render();\n            // Auto–register view children from #template.\n            this.registerChild(this.template.getViews());\n        }\n        this.isRendered = true;\n    }\n    /**\n\t * Recursively destroys the view instance and child views added by {@link #registerChild} and\n\t * residing in collections created by the {@link #createCollection}.\n\t *\n\t * Destruction disables all event listeners:\n\t * * created on the view, e.g. `view.on( 'event', () => {} )`,\n\t * * defined in the {@link #template} for DOM events.\n\t */ destroy() {\n        this.stopListening();\n        this._viewCollections.map((c)=>c.destroy());\n        // Template isn't obligatory for views.\n        if (this.template && this.template._revertData) {\n            this.template.revert(this.element);\n        }\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/bindings/clickoutsidehandler\n */ /* global document */ /**\n * Handles clicking **outside** of a specified set of elements, then fires an action.\n *\n * **Note**: Actually, the action is executed upon `mousedown`, not `click`. It prevents\n * certain issues when the user keeps holding the mouse button and the UI cannot react\n * properly.\n *\n * @param options Configuration options.\n * @param options.emitter The emitter to which this behavior should be added.\n * @param options.activator Function returning a `Boolean`, to determine whether the handler is active.\n * @param options.contextElements Array of HTML elements or a callback returning an array of HTML elements\n * that determine the scope of the handler. Clicking any of them or their descendants will **not** fire the callback.\n * @param options.callback An action executed by the handler.\n * @param options.listenerOptions Additional options for the listener (like priority).\n */ function clickOutsideHandler({ emitter, activator, callback, contextElements, listenerOptions }) {\n    emitter.listenTo(document, 'mousedown', (evt, domEvt)=>{\n        if (!activator()) {\n            return;\n        }\n        // Check if `composedPath` is `undefined` in case the browser does not support native shadow DOM.\n        // Can be removed when all supported browsers support native shadow DOM.\n        const path = typeof domEvt.composedPath == 'function' ? domEvt.composedPath() : [];\n        const contextElementsList = typeof contextElements == 'function' ? contextElements() : contextElements;\n        for (const contextElement of contextElementsList){\n            if (contextElement.contains(domEvt.target) || path.includes(contextElement)) {\n                return;\n            }\n        }\n        callback();\n    }, listenerOptions);\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/bindings/injectcsstransitiondisabler\n */ /**\n * A decorator that brings the possibility to temporarily disable CSS transitions using\n * {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen\n * when the view is first displayed but they should work normal in other cases.\n *\n * The methods to control the CSS transitions are:\n * * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the\n * {@link module:ui/view~View#element view element}.\n * * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the\n * {@link module:ui/view~View#element view element}.\n *\n * **Note**: This helper extends the {@link module:ui/view~View#template template} and must be used **after**\n * {@link module:ui/view~View#setTemplate} is called:\n *\n * ```ts\n * import injectCssTransitionDisabler from '@ckeditor/ckeditor5-ui/src/bindings/injectcsstransitiondisabler';\n *\n * class MyView extends View {\n * \tconstructor() {\n * \t\tsuper();\n *\n * \t\t// ...\n *\n * \t\tthis.setTemplate( { ... } );\n *\n * \t\t// ...\n *\n * \t\tinjectCssTransitionDisabler( this );\n *\n * \t\t// ...\n * \t}\n * }\n * ```\n *\n * The usage comes down to:\n *\n * ```ts\n * const view = new MyView();\n *\n * // ...\n *\n * view.disableCssTransitions();\n * view.show();\n * view.enableCssTransitions();\n * ```\n *\n * @deprecated\n * @see module:ui/bindings/csstransitiondisablermixin~CssTransitionDisablerMixin\n * @param view View instance that should get this functionality.\n */ function injectCssTransitionDisabler(view) {\n    const decorated = view;\n    decorated.set('_isCssTransitionsDisabled', false);\n    decorated.disableCssTransitions = ()=>{\n        decorated._isCssTransitionsDisabled = true;\n    };\n    decorated.enableCssTransitions = ()=>{\n        decorated._isCssTransitionsDisabled = false;\n    };\n    decorated.extendTemplate({\n        attributes: {\n            class: [\n                decorated.bindTemplate.if('_isCssTransitionsDisabled', 'ck-transitions-disabled')\n            ]\n        }\n    });\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/bindings/csstransitiondisablermixin\n */ /**\n * A mixin that brings the possibility to temporarily disable CSS transitions using\n * {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen\n * when the view is first displayed but they should work normal in other cases.\n *\n * The methods to control the CSS transitions are:\n * * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the\n * {@link module:ui/view~View#element view element}.\n * * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the\n * {@link module:ui/view~View#element view element}.\n *\n * The usage comes down to:\n *\n * ```ts\n * const MyViewWithCssTransitionDisabler = CssTransitionDisablerMixin( MyView );\n * const view = new MyViewWithCssTransitionDisabler();\n *\n * // ...\n *\n * view.disableCssTransitions();\n * view.show();\n * view.enableCssTransitions();\n * ```\n *\n * @param view View instance that should get this functionality.\n */ function CssTransitionDisablerMixin(view) {\n    class Mixin extends view {\n        disableCssTransitions() {\n            this._isCssTransitionsDisabled = true;\n        }\n        enableCssTransitions() {\n            this._isCssTransitionsDisabled = false;\n        }\n        constructor(...args){\n            super(...args);\n            this.set('_isCssTransitionsDisabled', false);\n            this.initializeCssTransitionDisablerMixin();\n        }\n        initializeCssTransitionDisablerMixin() {\n            this.extendTemplate({\n                attributes: {\n                    class: [\n                        this.bindTemplate.if('_isCssTransitionsDisabled', 'ck-transitions-disabled')\n                    ]\n                }\n            });\n        }\n    }\n    return Mixin;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/bindings/submithandler\n */ /**\n * A handler useful for {@link module:ui/view~View views} working as HTML forms. It intercepts a native DOM\n * `submit` event, prevents the default web browser behavior (navigation and page reload) and\n * fires the `submit` event on a view instead. Such a custom event can be then used by any\n * {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.\n *\n * ```ts\n * import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';\n *\n * // ...\n *\n * class AnyFormView extends View {\n * \tconstructor() {\n * \t\tsuper();\n *\n * \t\t// ...\n *\n * \t\tsubmitHandler( {\n * \t\t\tview: this\n * \t\t} );\n * \t}\n * }\n *\n * // ...\n *\n * const view = new AnyFormView();\n *\n * // A sample listener attached by an emitter working with the view.\n * this.listenTo( view, 'submit', () => {\n * \tsaveTheFormData();\n * \thideTheForm();\n * } );\n * ```\n *\n * @param options Configuration options.\n * @param options.view The view which DOM `submit` events should be handled.\n */ function submitHandler({ view }) {\n    view.listenTo(view.element, 'submit', (evt, domEvt)=>{\n        domEvt.preventDefault();\n        view.fire('submit');\n    }, {\n        useCapture: true\n    });\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/bindings/addkeyboardhandlingforgrid\n */ /**\n * A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.\n *\n * @param options Configuration options.\n * @param options.keystrokeHandler Keystroke handler to register navigation with arrow keys.\n * @param options.focusTracker A focus tracker for grid elements.\n * @param options.gridItems A collection of grid items.\n * @param options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns\n * the number (e.g. for responsive grids).\n * @param options.uiLanguageDirection String of ui language direction.\n */ function addKeyboardHandlingForGrid({ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }) {\n    const getNumberOfColumns = typeof numberOfColumns === 'number' ? ()=>numberOfColumns : numberOfColumns;\n    keystrokeHandler.set('arrowright', getGridItemFocuser((focusedElementIndex, gridItems)=>{\n        return uiLanguageDirection === 'rtl' ? getLeftElementIndex(focusedElementIndex, gridItems.length) : getRightElementIndex(focusedElementIndex, gridItems.length);\n    }));\n    keystrokeHandler.set('arrowleft', getGridItemFocuser((focusedElementIndex, gridItems)=>{\n        return uiLanguageDirection === 'rtl' ? getRightElementIndex(focusedElementIndex, gridItems.length) : getLeftElementIndex(focusedElementIndex, gridItems.length);\n    }));\n    keystrokeHandler.set('arrowup', getGridItemFocuser((focusedElementIndex, gridItems)=>{\n        let nextIndex = focusedElementIndex - getNumberOfColumns();\n        if (nextIndex < 0) {\n            nextIndex = focusedElementIndex + getNumberOfColumns() * Math.floor(gridItems.length / getNumberOfColumns());\n            if (nextIndex > gridItems.length - 1) {\n                nextIndex -= getNumberOfColumns();\n            }\n        }\n        return nextIndex;\n    }));\n    keystrokeHandler.set('arrowdown', getGridItemFocuser((focusedElementIndex, gridItems)=>{\n        let nextIndex = focusedElementIndex + getNumberOfColumns();\n        if (nextIndex > gridItems.length - 1) {\n            nextIndex = focusedElementIndex % getNumberOfColumns();\n        }\n        return nextIndex;\n    }));\n    function getGridItemFocuser(getIndexToFocus) {\n        return (evt)=>{\n            const focusedElement = gridItems.find((item)=>item.element === focusTracker.focusedElement);\n            const focusedElementIndex = gridItems.getIndex(focusedElement);\n            const nextIndexToFocus = getIndexToFocus(focusedElementIndex, gridItems);\n            gridItems.get(nextIndexToFocus).focus();\n            evt.stopPropagation();\n            evt.preventDefault();\n        };\n    }\n    /**\n\t * Function returning the next index.\n\t *\n\t * ```\n\t * before: [ ][x][ ]\tafter: [ ][ ][x]\n\t * index = 1            index = 2\n\t * ```\n\t *\n\t * If current index is last, function returns first index.\n\t *\n\t * ```\n\t * before: [ ][ ][x]\tafter: [x][ ][ ]\n\t * index = 2            index = 0\n\t * ```\n\t *\n\t * @param elementIndex Number of current index.\n\t * @param collectionLength A count of collection items.\n\t */ function getRightElementIndex(elementIndex, collectionLength) {\n        if (elementIndex === collectionLength - 1) {\n            return 0;\n        } else {\n            return elementIndex + 1;\n        }\n    }\n    /**\n\t * Function returning the previous index.\n\t *\n\t * ```\n\t * before: [ ][x][ ]\tafter: [x][ ][ ]\n\t * index = 1            index = 0\n\t * ```\n\t *\n\t * If current index is first, function returns last index.\n\t *\n\t * ```\n\t * before: [x][ ][ ]\tafter: [ ][ ][x]\n\t * index = 0            index = 2\n\t * ```\n\t *\n\t * @param elementIndex Number of current index.\n\t * @param collectionLength A count of collection items.\n\t */ function getLeftElementIndex(elementIndex, collectionLength) {\n        if (elementIndex === 0) {\n            return collectionLength - 1;\n        } else {\n            return elementIndex - 1;\n        }\n    }\n}\n\n/**\n * The icon view class.\n */ class IconView extends View {\n    /**\n\t * A list of presentational attributes that can be set on the `<svg>` element and should be preserved\n\t * when the icon {@link module:ui/icon/iconview~IconView#content content} is loaded.\n\t *\n\t * See the [specification](https://www.w3.org/TR/SVG/styling.html#TermPresentationAttribute) to learn more.\n\t */ static presentationalAttributeNames = [\n        'alignment-baseline',\n        'baseline-shift',\n        'clip-path',\n        'clip-rule',\n        'color',\n        'color-interpolation',\n        'color-interpolation-filters',\n        'color-rendering',\n        'cursor',\n        'direction',\n        'display',\n        'dominant-baseline',\n        'fill',\n        'fill-opacity',\n        'fill-rule',\n        'filter',\n        'flood-color',\n        'flood-opacity',\n        'font-family',\n        'font-size',\n        'font-size-adjust',\n        'font-stretch',\n        'font-style',\n        'font-variant',\n        'font-weight',\n        'image-rendering',\n        'letter-spacing',\n        'lighting-color',\n        'marker-end',\n        'marker-mid',\n        'marker-start',\n        'mask',\n        'opacity',\n        'overflow',\n        'paint-order',\n        'pointer-events',\n        'shape-rendering',\n        'stop-color',\n        'stop-opacity',\n        'stroke',\n        'stroke-dasharray',\n        'stroke-dashoffset',\n        'stroke-linecap',\n        'stroke-linejoin',\n        'stroke-miterlimit',\n        'stroke-opacity',\n        'stroke-width',\n        'text-anchor',\n        'text-decoration',\n        'text-overflow',\n        'text-rendering',\n        'transform',\n        'unicode-bidi',\n        'vector-effect',\n        'visibility',\n        'white-space',\n        'word-spacing',\n        'writing-mode'\n    ];\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        const bind = this.bindTemplate;\n        this.set('content', '');\n        this.set('viewBox', '0 0 20 20');\n        this.set('fillColor', '');\n        this.set('isColorInherited', true);\n        this.set('isVisible', true);\n        this.setTemplate({\n            tag: 'svg',\n            ns: 'http://www.w3.org/2000/svg',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-icon',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value),\n                    // Exclude icon internals from the CSS reset to allow rich (non-monochromatic) icons\n                    // (https://github.com/ckeditor/ckeditor5/issues/12599).\n                    'ck-reset_all-excluded',\n                    // The class to remove the dynamic color inheritance is toggleable\n                    // (https://github.com/ckeditor/ckeditor5/issues/12599).\n                    bind.if('isColorInherited', 'ck-icon_inherit-color')\n                ],\n                viewBox: bind.to('viewBox')\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this._updateXMLContent();\n        this._colorFillPaths();\n        // This is a hack for lack of innerHTML binding.\n        // See: https://github.com/ckeditor/ckeditor5-ui/issues/99.\n        this.on('change:content', ()=>{\n            this._updateXMLContent();\n            this._colorFillPaths();\n        });\n        this.on('change:fillColor', ()=>{\n            this._colorFillPaths();\n        });\n    }\n    /**\n\t * Updates the {@link #element} with the value of {@link #content}.\n\t */ _updateXMLContent() {\n        if (this.content) {\n            const parsed = new DOMParser().parseFromString(this.content.trim(), 'image/svg+xml');\n            const svg = parsed.querySelector('svg');\n            const viewBox = svg.getAttribute('viewBox');\n            if (viewBox) {\n                this.viewBox = viewBox;\n            }\n            // Preserve presentational attributes of the <svg> element from the source.\n            // They can affect rendering of the entire icon (https://github.com/ckeditor/ckeditor5/issues/12597).\n            for (const { name, value } of Array.from(svg.attributes)){\n                if (IconView.presentationalAttributeNames.includes(name)) {\n                    this.element.setAttribute(name, value);\n                }\n            }\n            while(this.element.firstChild){\n                this.element.removeChild(this.element.firstChild);\n            }\n            while(svg.childNodes.length > 0){\n                this.element.appendChild(svg.childNodes[0]);\n            }\n        }\n    }\n    /**\n\t * Fills all child `path.ck-icon__fill` with the `#fillColor`.\n\t */ _colorFillPaths() {\n        if (this.fillColor) {\n            this.element.querySelectorAll('.ck-icon__fill').forEach((path)=>{\n                path.style.fill = this.fillColor;\n            });\n        }\n    }\n}\n\n/**\n * A default implementation of the button view's label. It comes with a dynamic text support\n * via {@link module:ui/button/buttonlabelview~ButtonLabelView#text} property.\n */ class ButtonLabelView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        this.set({\n            style: undefined,\n            text: undefined,\n            id: undefined\n        });\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-button__label'\n                ],\n                style: bind.to('style'),\n                id: bind.to('id')\n            },\n            children: [\n                {\n                    text: bind.to('text')\n                }\n            ]\n        });\n    }\n}\n\n/**\n * The button view class.\n *\n * ```ts\n * const view = new ButtonView();\n *\n * view.set( {\n * \tlabel: 'A button',\n * \tkeystroke: 'Ctrl+B',\n * \ttooltip: true,\n * \twithText: true\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n */ class ButtonView extends View {\n    /**\n\t * Collection of the child views inside of the button {@link #element}.\n\t */ children;\n    /**\n\t * Label of the button view. Its text is configurable using the {@link #label label attribute}.\n\t *\n\t * If not configured otherwise in the `constructor()`, by default the label is an instance\n\t * of {@link module:ui/button/buttonlabelview~ButtonLabelView}.\n\t */ labelView;\n    /**\n\t * The icon view of the button. Will be added to {@link #children} when the\n\t * {@link #icon icon attribute} is defined.\n\t */ iconView;\n    /**\n\t * A view displaying the keystroke of the button next to the {@link #labelView label}.\n\t * Added to {@link #children} when the {@link #withKeystroke `withKeystroke` attribute}\n\t * is defined.\n\t */ keystrokeView;\n    /**\n\t * Delayed focus function for focus handling in Safari.\n\t */ _focusDelayed = null;\n    /**\n\t * Creates an instance of the button view class.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param labelView The instance of the button's label. If not provided, an instance of\n\t * {@link module:ui/button/buttonlabelview~ButtonLabelView} is used.\n\t */ constructor(locale, labelView = new ButtonLabelView()){\n        super(locale);\n        const bind = this.bindTemplate;\n        const ariaLabelUid = uid();\n        // Implement the Button interface.\n        this.set('_ariaPressed', false);\n        this.set('_ariaChecked', false);\n        this.set('ariaLabel', undefined);\n        this.set('ariaLabelledBy', `ck-editor__aria-label_${ariaLabelUid}`);\n        this.set('class', undefined);\n        this.set('labelStyle', undefined);\n        this.set('icon', undefined);\n        this.set('isEnabled', true);\n        this.set('isOn', false);\n        this.set('isVisible', true);\n        this.set('isToggleable', false);\n        this.set('keystroke', undefined);\n        this.set('label', undefined);\n        this.set('role', undefined);\n        this.set('tabindex', -1);\n        this.set('tooltip', false);\n        this.set('tooltipPosition', 's');\n        this.set('type', 'button');\n        this.set('withText', false);\n        this.set('withKeystroke', false);\n        this.children = this.createCollection();\n        this.labelView = this._setupLabelView(labelView);\n        this.iconView = new IconView();\n        this.iconView.extendTemplate({\n            attributes: {\n                class: 'ck-button__icon'\n            }\n        });\n        this.keystrokeView = this._createKeystrokeView();\n        this.bind('_tooltipString').to(this, 'tooltip', this, 'label', this, 'keystroke', this._getTooltipString.bind(this));\n        const template = {\n            tag: 'button',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-button',\n                    bind.to('class'),\n                    bind.if('isEnabled', 'ck-disabled', (value)=>!value),\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value),\n                    bind.to('isOn', (value)=>value ? 'ck-on' : 'ck-off'),\n                    bind.if('withText', 'ck-button_with-text'),\n                    bind.if('withKeystroke', 'ck-button_with-keystroke')\n                ],\n                role: bind.to('role'),\n                type: bind.to('type', (value)=>value ? value : 'button'),\n                tabindex: bind.to('tabindex'),\n                'aria-checked': bind.to('_ariaChecked'),\n                'aria-pressed': bind.to('_ariaPressed'),\n                'aria-label': bind.to('ariaLabel'),\n                'aria-labelledby': bind.to('ariaLabelledBy'),\n                'aria-disabled': bind.if('isEnabled', true, (value)=>!value),\n                'data-cke-tooltip-text': bind.to('_tooltipString'),\n                'data-cke-tooltip-position': bind.to('tooltipPosition')\n            },\n            children: this.children,\n            on: {\n                click: bind.to((evt)=>{\n                    // We can't make the button disabled using the disabled attribute, because it won't be focusable.\n                    // Though, shouldn't this condition be moved to the button controller?\n                    if (this.isEnabled) {\n                        this.fire('execute');\n                    } else {\n                        // Prevent the default when button is disabled, to block e.g.\n                        // automatic form submitting. See ckeditor/ckeditor5-link#74.\n                        evt.preventDefault();\n                    }\n                })\n            }\n        };\n        this.bind('_ariaPressed').to(this, 'isOn', this, 'isToggleable', this, 'role', (isOn, isToggleable, role)=>{\n            if (!isToggleable || isCheckableRole(role)) {\n                return false;\n            }\n            return String(!!isOn);\n        });\n        this.bind('_ariaChecked').to(this, 'isOn', this, 'isToggleable', this, 'role', (isOn, isToggleable, role)=>{\n            if (!isToggleable || !isCheckableRole(role)) {\n                return false;\n            }\n            return String(!!isOn);\n        });\n        // On Safari we have to force the focus on a button on click as it's the only browser\n        // that doesn't do that automatically. See #12115.\n        if (env.isSafari) {\n            if (!this._focusDelayed) {\n                this._focusDelayed = delay(()=>this.focus(), 0);\n            }\n            template.on.mousedown = bind.to(()=>{\n                this._focusDelayed();\n            });\n            template.on.mouseup = bind.to(()=>{\n                this._focusDelayed.cancel();\n            });\n        }\n        this.setTemplate(template);\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        if (this.icon) {\n            this.iconView.bind('content').to(this, 'icon');\n            this.children.add(this.iconView);\n        }\n        this.children.add(this.labelView);\n        if (this.withKeystroke && this.keystroke) {\n            this.children.add(this.keystrokeView);\n        }\n    }\n    /**\n\t * Focuses the {@link #element} of the button.\n\t */ focus() {\n        this.element.focus();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        if (this._focusDelayed) {\n            this._focusDelayed.cancel();\n        }\n        super.destroy();\n    }\n    /**\n\t * Binds the label view instance it with button attributes.\n\t */ _setupLabelView(labelView) {\n        labelView.bind('text', 'style', 'id').to(this, 'label', 'labelStyle', 'ariaLabelledBy');\n        return labelView;\n    }\n    /**\n\t * Creates a view that displays a keystroke next to a {@link #labelView label }\n\t * and binds it with button attributes.\n\t */ _createKeystrokeView() {\n        const keystrokeView = new View();\n        keystrokeView.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-button__keystroke'\n                ]\n            },\n            children: [\n                {\n                    text: this.bindTemplate.to('keystroke', (text)=>getEnvKeystrokeText(text))\n                }\n            ]\n        });\n        return keystrokeView;\n    }\n    /**\n\t * Gets the text for the tooltip from the combination of\n\t * {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.\n\t *\n\t * @see #tooltip\n\t * @see #_tooltipString\n\t * @param tooltip Button tooltip.\n\t * @param label Button label.\n\t * @param keystroke Button keystroke.\n\t */ _getTooltipString(tooltip, label, keystroke) {\n        if (tooltip) {\n            if (typeof tooltip == 'string') {\n                return tooltip;\n            } else {\n                if (keystroke) {\n                    keystroke = getEnvKeystrokeText(keystroke);\n                }\n                if (tooltip instanceof Function) {\n                    return tooltip(label, keystroke);\n                } else {\n                    return `${label}${keystroke ? ` (${keystroke})` : ''}`;\n                }\n            }\n        }\n        return '';\n    }\n}\n/**\n * Checks if `aria-checkbox` can be used with specified role.\n */ function isCheckableRole(role) {\n    switch(role){\n        case 'radio':\n        case 'checkbox':\n        case 'option':\n        case 'switch':\n        case 'menuitemcheckbox':\n        case 'menuitemradio':\n            return true;\n        default:\n            return false;\n    }\n}\n\n/**\n * The class component representing a form header view. It should be used in more advanced forms to\n * describe the main purpose of the form.\n *\n * By default the component contains a bolded label view that has to be set. The label is usually a short (at most 3-word) string.\n * The component can also be extended by any other elements, like: icons, dropdowns, etc.\n *\n * It is used i.a.\n * by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.\n *\n * The latter is an example, where the component has been extended by {@link module:ui/dropdown/dropdownview~DropdownView} view.\n */ class FormHeaderView extends View {\n    /**\n\t * A collection of header items.\n\t */ children;\n    /**\n\t * The icon view instance. Defined only if icon was passed in the constructor's options.\n\t */ iconView;\n    /**\n\t * Creates an instance of the form header class.\n\t *\n\t * @param locale The locale instance.\n\t * @param options.label A label.\n\t * @param options.class An additional class.\n\t */ constructor(locale, options = {}){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('label', options.label || '');\n        this.set('class', options.class || null);\n        this.children = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-form__header',\n                    bind.to('class')\n                ]\n            },\n            children: this.children\n        });\n        if (options.icon) {\n            this.iconView = new IconView();\n            this.iconView.content = options.icon;\n            this.children.add(this.iconView);\n        }\n        const label = new View(locale);\n        label.setTemplate({\n            tag: 'h2',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-form__header__label'\n                ],\n                role: 'presentation'\n            },\n            children: [\n                {\n                    text: bind.to('label')\n                }\n            ]\n        });\n        this.children.add(label);\n    }\n}\n\n/**\n * A utility class that helps cycling over {@link module:ui/focuscycler~FocusableView focusable views} in a\n * {@link module:ui/viewcollection~ViewCollection} when the focus is tracked by the\n * {@link module:utils/focustracker~FocusTracker} instance. It helps implementing keyboard\n * navigation in HTML forms, toolbars, lists and the like.\n *\n * To work properly it requires:\n * * a collection of focusable (HTML `tabindex` attribute) views that implement the `focus()` method,\n * * an associated focus tracker to determine which view is focused.\n *\n * A simple cycler setup can look like this:\n *\n * ```ts\n * const focusables = new ViewCollection<FocusableView>();\n * const focusTracker = new FocusTracker();\n *\n * // Add focusable views to the focus tracker.\n * focusTracker.add( ... );\n * ```\n *\n * Then, the cycler can be used manually:\n *\n * ```ts\n * const cycler = new FocusCycler( { focusables, focusTracker } );\n *\n * // Will focus the first focusable view in #focusables.\n * cycler.focusFirst();\n *\n * // Will log the next focusable item in #focusables.\n * console.log( cycler.next );\n * ```\n *\n * Alternatively, it can work side by side with the {@link module:utils/keystrokehandler~KeystrokeHandler}:\n *\n * ```ts\n * const keystrokeHandler = new KeystrokeHandler();\n *\n * // Activate the keystroke handler.\n * keystrokeHandler.listenTo( sourceOfEvents );\n *\n * const cycler = new FocusCycler( {\n * \tfocusables, focusTracker, keystrokeHandler,\n * \tactions: {\n * \t\t// When arrowup of arrowleft is detected by the #keystrokeHandler,\n * \t\t// focusPrevious() will be called on the cycler.\n * \t\tfocusPrevious: [ 'arrowup', 'arrowleft' ],\n * \t}\n * } );\n * ```\n *\n * Check out the {@glink framework/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\"} guide to learn more.\n */ class FocusCycler extends /* #__PURE__ */ EmitterMixin() {\n    /**\n\t * A {@link module:ui/focuscycler~FocusableView focusable views} collection that the cycler operates on.\n\t */ focusables;\n    /**\n\t * A focus tracker instance that the cycler uses to determine the current focus\n\t * state in {@link #focusables}.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t * which can respond to certain keystrokes and cycle the focus.\n\t */ keystrokeHandler;\n    /**\n\t * Actions that the cycler can take when a keystroke is pressed. Requires\n\t * `options.keystrokeHandler` to be passed and working. When an action is\n\t * performed, `preventDefault` and `stopPropagation` will be called on the event\n\t * the keystroke fired in the DOM.\n\t *\n\t * ```ts\n\t * actions: {\n\t * \t// Will call #focusPrevious() when arrowleft or arrowup is pressed.\n\t * \tfocusPrevious: [ 'arrowleft', 'arrowup' ],\n\t *\n\t * \t// Will call #focusNext() when arrowdown is pressed.\n\t * \tfocusNext: 'arrowdown'\n\t * }\n\t * ```\n\t */ actions;\n    /**\n\t * Creates an instance of the focus cycler utility.\n\t *\n\t * @param options Configuration options.\n\t */ constructor(options){\n        super();\n        this.focusables = options.focusables;\n        this.focusTracker = options.focusTracker;\n        this.keystrokeHandler = options.keystrokeHandler;\n        this.actions = options.actions;\n        if (options.actions && options.keystrokeHandler) {\n            for(const methodName in options.actions){\n                let actions = options.actions[methodName];\n                if (typeof actions == 'string') {\n                    actions = [\n                        actions\n                    ];\n                }\n                for (const keystroke of actions){\n                    options.keystrokeHandler.set(keystroke, (data, cancel)=>{\n                        this[methodName]();\n                        cancel();\n                    }, options.keystrokeHandlerOptions);\n                }\n            }\n        }\n        this.on('forwardCycle', ()=>this.focusFirst(), {\n            priority: 'low'\n        });\n        this.on('backwardCycle', ()=>this.focusLast(), {\n            priority: 'low'\n        });\n    }\n    /**\n\t * Returns the first focusable view in {@link #focusables}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ get first() {\n        return this.focusables.find(isDomFocusable) || null;\n    }\n    /**\n\t * Returns the last focusable view in {@link #focusables}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ get last() {\n        return this.focusables.filter(isDomFocusable).slice(-1)[0] || null;\n    }\n    /**\n\t * Returns the next focusable view in {@link #focusables} based on {@link #current}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ get next() {\n        return this._getDomFocusableItem(1);\n    }\n    /**\n\t * Returns the previous focusable view in {@link #focusables} based on {@link #current}.\n\t * Returns `null` if there is none.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ get previous() {\n        return this._getDomFocusableItem(-1);\n    }\n    /**\n\t * An index of the view in the {@link #focusables} which is focused according\n\t * to {@link #focusTracker}. Returns `null` when there is no such view.\n\t */ get current() {\n        let index = null;\n        // There's no focused view in the focusables.\n        if (this.focusTracker.focusedElement === null) {\n            return null;\n        }\n        this.focusables.find((view, viewIndex)=>{\n            const focused = view.element === this.focusTracker.focusedElement;\n            if (focused) {\n                index = viewIndex;\n            }\n            return focused;\n        });\n        return index;\n    }\n    /**\n\t * Focuses the {@link #first} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ focusFirst() {\n        this._focus(this.first, 1);\n    }\n    /**\n\t * Focuses the {@link #last} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ focusLast() {\n        this._focus(this.last, -1);\n    }\n    /**\n\t * Focuses the {@link #next} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ focusNext() {\n        const next = this.next;\n        // If there's only one focusable item, we need to let the outside world know\n        // that the next cycle is about to happen. This may be useful\n        // e.g. if you want to move the focus to the parent focus cycler.\n        // Note that the focus is not actually moved in this case.\n        if (next && this.focusables.getIndex(next) === this.current) {\n            this.fire('forwardCycle');\n            return;\n        }\n        if (next === this.first) {\n            this.fire('forwardCycle');\n        } else {\n            this._focus(next, 1);\n        }\n    }\n    /**\n\t * Focuses the {@link #previous} item in {@link #focusables}.\n\t *\n\t * **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t */ focusPrevious() {\n        const previous = this.previous;\n        if (previous && this.focusables.getIndex(previous) === this.current) {\n            this.fire('backwardCycle');\n            return;\n        }\n        if (previous === this.last) {\n            this.fire('backwardCycle');\n        } else {\n            this._focus(previous, -1);\n        }\n    }\n    /**\n\t * Allows for creating continuous focus cycling across multiple focus cyclers and their collections of {@link #focusables}.\n\t *\n\t * It starts listening to the {@link module:ui/focuscycler~FocusCyclerForwardCycleEvent} and\n\t * {@link module:ui/focuscycler~FocusCyclerBackwardCycleEvent} events of the chained focus cycler and engages,\n\t * whenever the user reaches the last (forwards navigation) or first (backwards navigation) focusable view\n\t * and would normally start over. Instead, the navigation continues on the higher level (flattens).\n\t *\n\t * For instance, for the following nested focus navigation structure, the focus would get stuck the moment\n\t * the AB gets focused and its focus cycler starts managing it:\n\t *\n\t *\t   ┌────────────┐   ┌──────────────────────────────────┐   ┌────────────┐\n\t *\t   │ AA         │   │ AB                               │   │ AC         │\n\t *\t   │            │   │                                  │   │            │\n\t *\t   │            │   │    ┌─────┐  ┌─────┐  ┌─────┐     │   │            │\n\t *\t   │            │   │ ┌──► ABA ├──► ABB ├──► ABC ├───┐ │   │            │\n\t *\t   │            ├───► │  └─────┘  └─────┘  └─────┘   │ │   │            │\n\t *\t   │            │   │ │                              │ │   │            │\n\t *\t   │            │   │ │                              │ │   │            │\n\t *\t   │            │   │ └──────────────────────────────┘ │   │            │\n\t *\t   │            │   │                                  │   │            │\n\t *\t   └────────────┘   └──────────────────────────────────┘   └────────────┘\n\t *\n\t * Chaining a focus tracker that manages AA, AB, and AC with the focus tracker that manages ABA, ABB, and ABC\n\t * creates a seamless navigation experience instead:\n\t *\n\t *\t   ┌────────────┐   ┌──────────────────────────────────┐   ┌────────────┐\n\t *\t   │ AA         │   │ AB                               │   │ AC         │\n\t *\t   │            │   │                                  │   │            │\n\t *\t   │            │   │    ┌─────┐  ┌─────┐  ┌─────┐     │   │            │\n\t *\t   │            │   │ ┌──► ABA ├──► ABB ├──► ABC ├──┐  │   │            │\n\t *\t┌──►            ├───┼─┘  └─────┘  └─────┘  └─────┘  └──┼───►            ├──┐\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  │            │   │                                  │   │            │  │\n\t *\t│  └────────────┘   └──────────────────────────────────┘   └────────────┘  │\n\t *\t│                                                                          │\n\t *\t│                                                                          │\n\t *\t└──────────────────────────────────────────────────────────────────────────┘\n\t *\n\t * See {@link #unchain} to reverse the chaining.\n\t */ chain(chainedFocusCycler) {\n        const getCurrentFocusedView = ()=>{\n            // This may happen when one focus cycler does not include focusables of the other (horizontal case).\n            if (this.current === null) {\n                return null;\n            }\n            return this.focusables.get(this.current);\n        };\n        this.listenTo(chainedFocusCycler, 'forwardCycle', (evt)=>{\n            const oldCurrent = getCurrentFocusedView();\n            this.focusNext();\n            // Stop the event propagation only if an attempt at focusing the view actually moved the focus.\n            // If not, let the otherFocusCycler handle the event.\n            if (oldCurrent !== getCurrentFocusedView()) {\n                evt.stop();\n            }\n        // The priority is critical for cycling across multiple chain levels when there's a single view at some of them only.\n        }, {\n            priority: 'low'\n        });\n        this.listenTo(chainedFocusCycler, 'backwardCycle', (evt)=>{\n            const oldCurrent = getCurrentFocusedView();\n            this.focusPrevious();\n            // Stop the event propagation only if an attempt at focusing the view actually moved the focus.\n            // If not, let the otherFocusCycler handle the event.\n            if (oldCurrent !== getCurrentFocusedView()) {\n                evt.stop();\n            }\n        // The priority is critical for cycling across multiple chain levels when there's a single view at some of them only.\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * Reverses a chaining made by {@link #chain}.\n\t */ unchain(otherFocusCycler) {\n        this.stopListening(otherFocusCycler);\n    }\n    /**\n\t * Focuses the given view if it exists.\n\t *\n\t * @param view The view to be focused\n\t * @param direction The direction of the focus if the view has focusable children.\n\t * @returns\n\t */ _focus(view, direction) {\n        // Don't fire focus events if the view is already focused.\n        // Such attempt may occur when cycling with only one focusable item:\n        // even though `focusNext()` method returns without changing focus,\n        // the `forwardCycle` event is fired, triggering the `focusFirst()` method.\n        if (view && this.focusTracker.focusedElement !== view.element) {\n            view.focus(direction);\n        }\n    }\n    /**\n\t * Returns the next or previous focusable view in {@link #focusables} with respect\n\t * to {@link #current}.\n\t *\n\t * @param step Either `1` for checking forward from {@link #current} or `-1` for checking backwards.\n\t */ _getDomFocusableItem(step) {\n        // Cache for speed.\n        const collectionLength = this.focusables.length;\n        if (!collectionLength) {\n            return null;\n        }\n        const current = this.current;\n        // Start from the beginning if no view is focused.\n        // https://github.com/ckeditor/ckeditor5-ui/issues/206\n        if (current === null) {\n            return this[step === 1 ? 'first' : 'last'];\n        }\n        // Note: If current is the only focusable view, it will also be returned for the given step.\n        let focusableItem = this.focusables.get(current);\n        // Cycle in both directions.\n        let index = (current + collectionLength + step) % collectionLength;\n        do {\n            const focusableItemCandidate = this.focusables.get(index);\n            if (isDomFocusable(focusableItemCandidate)) {\n                focusableItem = focusableItemCandidate;\n                break;\n            }\n            // Cycle in both directions.\n            index = (index + collectionLength + step) % collectionLength;\n        }while (index !== current)\n        return focusableItem;\n    }\n}\n/**\n * Checks whether a view can be focused (has `focus()` method and is visible).\n *\n * @param view A view to be checked.\n */ function isDomFocusable(view) {\n    return isFocusable(view) && isVisible(view.element);\n}\n/**\n * Checks whether a view is {@link ~FocusableView}.\n *\n * @param view A view to be checked.\n */ function isFocusable(view) {\n    return !!('focus' in view && typeof view.focus == 'function');\n}\n/**\n * Checks whether a view is an instance of {@link ~ViewWithFocusCycler}.\n *\n * @param view A view to be checked.\n */ function isViewWithFocusCycler(view) {\n    return isFocusable(view) && 'focusCycler' in view && view.focusCycler instanceof FocusCycler;\n}\n\n/**\n * A mixin that brings the possibility to observe dragging of the view element.\n * The view has to implement the {@link ~DraggableView} interface to use it:\n *\n * ```js\n * export default class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {\n * \t\t// ...\n * }\n * ```\n *\n * Creating a class extending it attaches a set of mouse and touch listeners allowing to observe dragging of the view element:\n * * `mousedown` and `touchstart` on the view element - starting the dragging.\n * * `mousemove` and `touchmove` on the document - updating the view coordinates.\n * * `mouseup` and `touchend` on the document - stopping the dragging.\n *\n * The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -\n * it is up to the developer to implement it.\n */ function DraggableViewMixin(view) {\n    class DraggableMixin extends view {\n        /**\n\t\t * A bound version of {@link #_onDrag}.\n\t\t */ _onDragBound = this._onDrag.bind(this);\n        /**\n\t\t * A bound version of {@link #_onDragEnd}.\n\t\t */ _onDragEndBound = this._onDragEnd.bind(this);\n        /**\n\t\t * The last coordinates of the view. It is updated on every mouse move.\n\t\t */ _lastDraggingCoordinates = {\n            x: 0,\n            y: 0\n        };\n        /**\n\t\t * @inheritDoc\n\t\t */ constructor(...args){\n            super(...args);\n            this.on('render', ()=>{\n                this._attachListeners();\n            });\n            this.set('isDragging', false);\n        }\n        /**\n\t\t * Attaches the listeners for the drag start.\n\t\t */ _attachListeners() {\n            this.listenTo(this.element, 'mousedown', this._onDragStart.bind(this));\n            this.listenTo(this.element, 'touchstart', this._onDragStart.bind(this));\n        }\n        /**\n\t\t * Attaches the listeners for the dragging and drag end.\n\t\t */ _attachDragListeners() {\n            this.listenTo(global.document, 'mouseup', this._onDragEndBound);\n            this.listenTo(global.document, 'touchend', this._onDragEndBound);\n            this.listenTo(global.document, 'mousemove', this._onDragBound);\n            this.listenTo(global.document, 'touchmove', this._onDragBound);\n        }\n        /**\n\t\t * Detaches the listeners after the drag end.\n\t\t */ _detachDragListeners() {\n            this.stopListening(global.document, 'mouseup', this._onDragEndBound);\n            this.stopListening(global.document, 'touchend', this._onDragEndBound);\n            this.stopListening(global.document, 'mousemove', this._onDragBound);\n            this.stopListening(global.document, 'touchmove', this._onDragBound);\n        }\n        /**\n\t\t * Starts the dragging listeners and sets the initial view coordinates.\n\t\t */ _onDragStart(evt, domEvt) {\n            if (!this._isHandleElementPressed(domEvt)) {\n                return;\n            }\n            this._attachDragListeners();\n            let x = 0;\n            let y = 0;\n            // If dragging is performed with a mouse, there is only one set of coordinates available.\n            // But when using a touch device, there may be many of them, so use the coordinates from the first touch.\n            if (domEvt instanceof MouseEvent) {\n                x = domEvt.clientX;\n                y = domEvt.clientY;\n            } else {\n                x = domEvt.touches[0].clientX;\n                y = domEvt.touches[0].clientY;\n            }\n            this._lastDraggingCoordinates = {\n                x,\n                y\n            };\n            this.isDragging = true;\n        }\n        /**\n\t\t * Updates the view coordinates and fires the `drag` event.\n\t\t */ _onDrag(evt, domEvt) {\n            // If dragging was stopped by some external intervention, stop listening.\n            if (!this.isDragging) {\n                this._detachDragListeners();\n                return;\n            }\n            let newX = 0;\n            let newY = 0;\n            // If dragging is performed with a mouse, there is only one set of coordinates available.\n            // But when using a touch device, there may be many of them, so use the coordinates from the first touch.\n            if (domEvt instanceof MouseEvent) {\n                newX = domEvt.clientX;\n                newY = domEvt.clientY;\n            } else {\n                newX = domEvt.touches[0].clientX;\n                newY = domEvt.touches[0].clientY;\n            }\n            // Prevents selection of text while dragging on Safari.\n            domEvt.preventDefault();\n            this.fire('drag', {\n                deltaX: Math.round(newX - this._lastDraggingCoordinates.x),\n                deltaY: Math.round(newY - this._lastDraggingCoordinates.y)\n            });\n            this._lastDraggingCoordinates = {\n                x: newX,\n                y: newY\n            };\n        }\n        /**\n\t\t * Stops the dragging and detaches the listeners.\n\t\t */ _onDragEnd() {\n            this._detachDragListeners();\n            this.isDragging = false;\n        }\n        /**\n\t\t * Checks if the drag handle element was pressed.\n\t\t */ _isHandleElementPressed(domEvt) {\n            if (!this.dragHandleElement) {\n                return false;\n            }\n            return this.dragHandleElement === domEvt.target || domEvt.target instanceof HTMLElement && this.dragHandleElement.contains(domEvt.target);\n        }\n    }\n    return DraggableMixin;\n}\n\n/**\n * A dialog actions view class. It contains button views which are used to execute dialog actions.\n */ class DialogActionsView extends View {\n    /**\n\t * A collection of button views.\n\t */ children;\n    /**\n\t * A keystroke handler instance.\n\t */ keystrokes;\n    /**\n\t * A focus cycler instance.\n\t */ focusCycler;\n    /**\n\t * A focus tracker instance.\n\t */ _focusTracker;\n    /**\n\t * A collection of focusable views.\n\t */ _focusables;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.children = this.createCollection();\n        this.keystrokes = new KeystrokeHandler();\n        this._focusTracker = new FocusTracker();\n        this._focusables = new ViewCollection();\n        this.focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this._focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-dialog__actions'\n                ]\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * Creates the button views based on the given definitions.\n\t * Then adds them to the {@link #children} collection and to the focus cycler.\n\t */ setButtons(definitions) {\n        for (const definition of definitions){\n            const button = new ButtonView(this.locale);\n            let property;\n            button.on('execute', ()=>definition.onExecute());\n            if (definition.onCreate) {\n                definition.onCreate(button);\n            }\n            for(property in definition){\n                if (property != 'onExecute' && property != 'onCreate') {\n                    button.set(property, definition[property]);\n                }\n            }\n            this.children.add(button);\n        }\n        this._updateFocusCyclableItems();\n    }\n    /**\n\t * @inheritDoc\n\t */ focus(direction) {\n        if (direction === -1) {\n            this.focusCycler.focusLast();\n        } else {\n            this.focusCycler.focusFirst();\n        }\n    }\n    /**\n\t * Adds all elements from the {@link #children} collection to the {@link #_focusables} collection\n\t * and to the {@link #_focusTracker} instance.\n\t */ _updateFocusCyclableItems() {\n        Array.from(this.children).forEach((v)=>{\n            this._focusables.add(v);\n            this._focusTracker.add(v.element);\n        });\n    }\n}\n\n/**\n * A dialog content view class.\n */ class DialogContentView extends View {\n    /**\n\t * A collection of content items.\n\t */ children;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.children = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-dialog__content'\n                ]\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * Removes all the child views.\n\t */ reset() {\n        while(this.children.length){\n            this.children.remove(0);\n        }\n    }\n}\n\n// @if CK_DEBUG_DIALOG // const RectDrawer = require( '@ckeditor/ckeditor5-utils/tests/_utils/rectdrawer' ).default;\n/**\n * Available dialog view positions:\n *\n * * `DialogViewPosition.SCREEN_CENTER` &ndash; A fixed position in the center of the screen.\n * * `DialogViewPosition.EDITOR_CENTER` &ndash; A dynamic position in the center of the editor editable area.\n * * `DialogViewPosition.EDITOR_TOP_SIDE` &ndash; A dynamic position at the top-right (for the left-to-right languages)\n * or top-left (for right-to-left languages) corner of the editor editable area.\n * * `DialogViewPosition.EDITOR_TOP_CENTER` &ndash; A dynamic position at the top-center of the editor editable area.\n * * `DialogViewPosition.EDITOR_BOTTOM_CENTER` &ndash; A dynamic position at the bottom-center of the editor editable area.\n * * `DialogViewPosition.EDITOR_ABOVE_CENTER` &ndash; A dynamic position centered above the editor editable area.\n * * `DialogViewPosition.EDITOR_BELOW_CENTER` &ndash; A dynamic position centered below the editor editable area.\n *\n * The position of a dialog is specified by a {@link module:ui/dialog/dialog~DialogDefinition#position `position` property} of a\n * definition passed to the {@link module:ui/dialog/dialog~Dialog#show} method.\n */ const DialogViewPosition = {\n    SCREEN_CENTER: 'screen-center',\n    EDITOR_CENTER: 'editor-center',\n    EDITOR_TOP_SIDE: 'editor-top-side',\n    EDITOR_TOP_CENTER: 'editor-top-center',\n    EDITOR_BOTTOM_CENTER: 'editor-bottom-center',\n    EDITOR_ABOVE_CENTER: 'editor-above-center',\n    EDITOR_BELOW_CENTER: 'editor-below-center'\n};\nconst toPx$6 = /* #__PURE__ */ toUnit('px');\n/**\n * A dialog view class.\n */ class DialogView extends /* #__PURE__ */ DraggableViewMixin(View) {\n    /**\n\t * A collection of the child views inside of the dialog.\n\t * A dialog can have 3 optional parts: header, content, and actions.\n\t */ parts;\n    /**\n\t * A header view of the dialog. It is also a drag handle of the dialog.\n\t */ headerView;\n    /**\n\t * A close button view. It is automatically added to the header view if present.\n\t */ closeButtonView;\n    /**\n\t * A view with the action buttons available to the user.\n\t */ actionsView;\n    /**\n\t * A default dialog element offset from the reference element (e.g. editor editable area).\n\t */ static defaultOffset = 15;\n    /**\n\t * A view with the dialog content.\n\t */ contentView;\n    /**\n\t * A keystroke handler instance.\n\t */ keystrokes;\n    /**\n\t * A focus tracker instance.\n\t */ focusTracker;\n    /**\n\t * A flag indicating if the dialog was moved manually. If so, its position\n\t * will not be updated automatically upon window resize or document scroll.\n\t */ wasMoved = false;\n    /**\n\t * A callback returning the DOM root that requested the dialog.\n\t */ _getCurrentDomRoot;\n    /**\n\t * A callback returning the configured editor viewport offset.\n\t */ _getViewportOffset;\n    /**\n\t * The list of the focusable elements inside the dialog view.\n\t */ _focusables;\n    /**\n\t * The focus cycler instance.\n\t */ _focusCycler;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, { getCurrentDomRoot, getViewportOffset }){\n        super(locale);\n        const bind = this.bindTemplate;\n        const t = locale.t;\n        this.set('className', '');\n        this.set('ariaLabel', t('Editor dialog'));\n        this.set('isModal', false);\n        this.set('position', DialogViewPosition.SCREEN_CENTER);\n        this.set('_isVisible', false);\n        this.set('_isTransparent', false);\n        this.set('_top', 0);\n        this.set('_left', 0);\n        this._getCurrentDomRoot = getCurrentDomRoot;\n        this._getViewportOffset = getViewportOffset;\n        this.decorate('moveTo');\n        this.parts = this.createCollection();\n        this.keystrokes = new KeystrokeHandler();\n        this.focusTracker = new FocusTracker();\n        this._focusables = new ViewCollection();\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-dialog-overlay',\n                    bind.if('isModal', 'ck-dialog-overlay__transparent', (isModal)=>!isModal),\n                    bind.if('_isVisible', 'ck-hidden', (value)=>!value)\n                ],\n                // Prevent from editor losing focus when clicking on the modal overlay.\n                tabindex: '-1'\n            },\n            children: [\n                {\n                    tag: 'div',\n                    attributes: {\n                        tabindex: '-1',\n                        class: [\n                            'ck',\n                            'ck-dialog',\n                            bind.to('className')\n                        ],\n                        role: 'dialog',\n                        'aria-label': bind.to('ariaLabel'),\n                        style: {\n                            top: bind.to('_top', (top)=>toPx$6(top)),\n                            left: bind.to('_left', (left)=>toPx$6(left)),\n                            visibility: bind.if('_isTransparent', 'hidden')\n                        }\n                    },\n                    children: this.parts\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.keystrokes.set('Esc', (data, cancel)=>{\n            this.fire('close', {\n                source: 'escKeyPress'\n            });\n            cancel();\n        });\n        // Support for dragging the modal.\n        this.on('drag', (evt, { deltaX, deltaY })=>{\n            this.wasMoved = true;\n            this.moveBy(deltaX, deltaY);\n        });\n        // Update dialog position upon window resize, if the position was not changed manually.\n        this.listenTo(global.window, 'resize', ()=>{\n            if (this._isVisible && !this.wasMoved) {\n                this.updatePosition();\n            }\n        });\n        // Update dialog position upon document scroll, if the position was not changed manually.\n        this.listenTo(global.document, 'scroll', ()=>{\n            if (this._isVisible && !this.wasMoved) {\n                this.updatePosition();\n            }\n        });\n        this.on('change:_isVisible', (evt, name, isVisible)=>{\n            if (isVisible) {\n                // Let the content render first, then apply the position. Otherwise, the calculated DOM Rects\n                // will not reflect the final look of the dialog. Note that we're not using #_moveOffScreen() here because\n                // it causes a violent movement of the viewport on iOS (because the dialog still keeps the DOM focus).\n                this._isTransparent = true;\n                // FYI: RAF is too short. We need to wait a bit longer.\n                setTimeout(()=>{\n                    this.updatePosition();\n                    this._isTransparent = false;\n                    // The view must get the focus after it gets visible. But this is only possible\n                    // after the dialog is no longer transparent.\n                    this.focus();\n                }, 10);\n            }\n        });\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * Returns the element that should be used as a drag handle.\n\t */ get dragHandleElement() {\n        if (this.headerView) {\n            return this.headerView.element;\n        } else {\n            return null;\n        }\n    }\n    /**\n\t * Creates the dialog parts. Which of them are created depends on the arguments passed to the method.\n\t * There are no rules regarding the dialog construction, that is, no part is mandatory.\n\t * Each part can only be created once.\n\t *\n\t * @internal\n\t */ setupParts({ icon, title, hasCloseButton = true, content, actionButtons }) {\n        if (title) {\n            this.headerView = new FormHeaderView(this.locale, {\n                icon\n            });\n            if (hasCloseButton) {\n                this.closeButtonView = this._createCloseButton();\n                this.headerView.children.add(this.closeButtonView);\n            }\n            this.headerView.label = title;\n            this.ariaLabel = title;\n            this.parts.add(this.headerView, 0);\n        }\n        if (content) {\n            // Normalize the content specified in the arguments.\n            if (content instanceof View) {\n                content = [\n                    content\n                ];\n            }\n            this.contentView = new DialogContentView(this.locale);\n            this.contentView.children.addMany(content);\n            this.parts.add(this.contentView);\n        }\n        if (actionButtons) {\n            this.actionsView = new DialogActionsView(this.locale);\n            this.actionsView.setButtons(actionButtons);\n            this.parts.add(this.actionsView);\n        }\n        this._updateFocusCyclableItems();\n    }\n    /**\n\t * Focuses the first focusable element inside the dialog.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Normalizes the passed coordinates to make sure the dialog view\n\t * is displayed within the visible viewport and moves it there.\n\t *\n\t * @internal\n\t */ moveTo(left, top) {\n        const viewportRect = this._getViewportRect();\n        const dialogRect = this._getDialogRect();\n        // Don't let the dialog go beyond the right edge of the viewport.\n        if (left + dialogRect.width > viewportRect.right) {\n            left = viewportRect.right - dialogRect.width;\n        }\n        // Don't let the dialog go beyond the left edge of the viewport.\n        if (left < viewportRect.left) {\n            left = viewportRect.left;\n        }\n        // Don't let the dialog go beyond the top edge of the viewport.\n        if (top < viewportRect.top) {\n            top = viewportRect.top;\n        }\n        // Note: We don't do the same for the bottom edge to allow users to resize the window vertically\n        // and let the dialog to stay put instead of covering the editing root.\n        this._moveTo(left, top);\n    }\n    /**\n\t * Moves the dialog to the specified coordinates.\n\t */ _moveTo(left, top) {\n        this._left = left;\n        this._top = top;\n    }\n    /**\n\t * Moves the dialog by the specified offset.\n\t *\n\t * @internal\n\t */ moveBy(left, top) {\n        this.moveTo(this._left + left, this._top + top);\n    }\n    /**\n\t * Moves the dialog view to the off-screen position.\n\t * Used when there is no space to display the dialog.\n\t */ _moveOffScreen() {\n        this._moveTo(-9999, -9999);\n    }\n    /**\n\t * Recalculates the dialog according to the set position and viewport,\n\t * and moves it to the new position.\n\t */ updatePosition() {\n        if (!this.element || !this.element.parentNode) {\n            return;\n        }\n        const viewportRect = this._getViewportRect();\n        // Actual position may be different from the configured one if there's no DOM root.\n        let configuredPosition = this.position;\n        let domRootRect;\n        if (!this._getCurrentDomRoot()) {\n            configuredPosition = DialogViewPosition.SCREEN_CENTER;\n        } else {\n            domRootRect = this._getVisibleDomRootRect(viewportRect);\n        }\n        const defaultOffset = DialogView.defaultOffset;\n        const dialogRect = this._getDialogRect();\n        // @if CK_DEBUG_DIALOG // RectDrawer.clear();\n        // @if CK_DEBUG_DIALOG // RectDrawer.draw( viewportRect, { outlineColor: 'blue' }, 'Viewport' );\n        switch(configuredPosition){\n            case DialogViewPosition.EDITOR_TOP_SIDE:\n                {\n                    // @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n                    // @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n                    // @if CK_DEBUG_DIALOG // }\n                    if (domRootRect) {\n                        const leftCoordinate = this.locale.contentLanguageDirection === 'ltr' ? domRootRect.right - dialogRect.width - defaultOffset : domRootRect.left + defaultOffset;\n                        this.moveTo(leftCoordinate, domRootRect.top + defaultOffset);\n                    } else {\n                        this._moveOffScreen();\n                    }\n                    break;\n                }\n            case DialogViewPosition.EDITOR_CENTER:\n                {\n                    if (domRootRect) {\n                        this.moveTo(Math.round(domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2), Math.round(domRootRect.top + domRootRect.height / 2 - dialogRect.height / 2));\n                    } else {\n                        this._moveOffScreen();\n                    }\n                    break;\n                }\n            case DialogViewPosition.SCREEN_CENTER:\n                {\n                    this.moveTo(Math.round((viewportRect.width - dialogRect.width) / 2), Math.round((viewportRect.height - dialogRect.height) / 2));\n                    break;\n                }\n            case DialogViewPosition.EDITOR_TOP_CENTER:\n                {\n                    // @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n                    // @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n                    // @if CK_DEBUG_DIALOG // }\n                    if (domRootRect) {\n                        this.moveTo(Math.round(domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2), domRootRect.top + defaultOffset);\n                    } else {\n                        this._moveOffScreen();\n                    }\n                    break;\n                }\n            case DialogViewPosition.EDITOR_BOTTOM_CENTER:\n                {\n                    // @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n                    // @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n                    // @if CK_DEBUG_DIALOG // }\n                    if (domRootRect) {\n                        this.moveTo(Math.round(domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2), domRootRect.bottom - dialogRect.height - defaultOffset);\n                    } else {\n                        this._moveOffScreen();\n                    }\n                    break;\n                }\n            case DialogViewPosition.EDITOR_ABOVE_CENTER:\n                {\n                    // @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n                    // @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n                    // @if CK_DEBUG_DIALOG // }\n                    if (domRootRect) {\n                        this.moveTo(Math.round(domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2), domRootRect.top - dialogRect.height - defaultOffset);\n                    } else {\n                        this._moveOffScreen();\n                    }\n                    break;\n                }\n            case DialogViewPosition.EDITOR_BELOW_CENTER:\n                {\n                    // @if CK_DEBUG_DIALOG // if ( domRootRect ) {\n                    // @if CK_DEBUG_DIALOG // \tRectDrawer.draw( domRootRect, { outlineColor: 'red', zIndex: 9999999 }, 'DOM ROOT' );\n                    // @if CK_DEBUG_DIALOG // }\n                    if (domRootRect) {\n                        this.moveTo(Math.round(domRootRect.left + domRootRect.width / 2 - dialogRect.width / 2), domRootRect.bottom + defaultOffset);\n                    } else {\n                        this._moveOffScreen();\n                    }\n                    break;\n                }\n        }\n    }\n    /**\n\t * Calculates the visible DOM root part.\n\t */ _getVisibleDomRootRect(viewportRect) {\n        let visibleDomRootRect = new Rect(this._getCurrentDomRoot()).getVisible();\n        if (!visibleDomRootRect) {\n            return null;\n        } else {\n            visibleDomRootRect = viewportRect.getIntersection(visibleDomRootRect);\n            if (!visibleDomRootRect) {\n                return null;\n            }\n        }\n        return visibleDomRootRect;\n    }\n    /**\n\t * Calculates the dialog element rect.\n\t */ _getDialogRect() {\n        return new Rect(this.element.firstElementChild);\n    }\n    /**\n\t * Calculates the viewport rect.\n\t */ _getViewportRect() {\n        return getConstrainedViewportRect(this._getViewportOffset());\n    }\n    /**\n\t * Collects all focusable elements inside the dialog parts\n\t * and adds them to the focus tracker and focus cycler.\n\t */ _updateFocusCyclableItems() {\n        const focusables = [];\n        if (this.contentView) {\n            for (const child of this.contentView.children){\n                if (isFocusable(child)) {\n                    focusables.push(child);\n                }\n            }\n        }\n        if (this.actionsView) {\n            focusables.push(this.actionsView);\n        }\n        if (this.closeButtonView) {\n            focusables.push(this.closeButtonView);\n        }\n        focusables.forEach((focusable)=>{\n            this._focusables.add(focusable);\n            this.focusTracker.add(focusable.element);\n            if (isViewWithFocusCycler(focusable)) {\n                this._focusCycler.chain(focusable.focusCycler);\n            }\n        });\n    }\n    /**\n\t * Creates the close button view that is displayed in the header view corner.\n\t */ _createCloseButton() {\n        const buttonView = new ButtonView(this.locale);\n        const t = this.locale.t;\n        buttonView.set({\n            label: t('Close'),\n            tooltip: true,\n            icon: icons.cancel\n        });\n        buttonView.on('execute', ()=>this.fire('close', {\n                source: 'closeButton'\n            }));\n        return buttonView;\n    }\n}\n// Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n// TODO: This is a duplicate from position.ts module. It should either be exported there or land somewhere in utils.\nfunction getConstrainedViewportRect(viewportOffset) {\n    viewportOffset = Object.assign({\n        top: 0,\n        bottom: 0,\n        left: 0,\n        right: 0\n    }, viewportOffset);\n    const viewportRect = new Rect(global.window);\n    viewportRect.top += viewportOffset.top;\n    viewportRect.height -= viewportOffset.top;\n    viewportRect.bottom -= viewportOffset.bottom;\n    viewportRect.height -= viewportOffset.bottom;\n    viewportRect.left += viewportOffset.left;\n    viewportRect.right -= viewportOffset.right;\n    viewportRect.width -= viewportOffset.left + viewportOffset.right;\n    return viewportRect;\n}\n\n/**\n * The dialog controller class. It is used to show and hide the {@link module:ui/dialog/dialogview~DialogView}.\n */ class Dialog extends Plugin {\n    /**\n\t * The currently visible dialog view instance.\n\t */ view;\n    /**\n\t * The `Dialog` plugin instance which most recently showed the dialog.\n\t *\n\t * Only one dialog can be visible at once, even if there are many editor instances on the page.\n\t * If an editor wants to show a dialog, it should first hide the dialog that is already opened.\n\t * But only the `Dialog` instance that showed the dialog is able able to properly hide it.\n\t * This is why we need to store it in a globally available space (static property).\n\t * This way every `Dialog` plugin in every editor is able to correctly close any open dialog window.\n\t */ static _visibleDialogPlugin;\n    /**\n\t * A configurable callback called when the dialog is hidden.\n\t */ _onHide;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Dialog';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        const t = editor.t;\n        this._initShowHideListeners();\n        this._initFocusToggler();\n        this._initMultiRootIntegration();\n        this.set({\n            id: null,\n            isOpen: false\n        });\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            categoryId: 'navigation',\n            keystrokes: [\n                {\n                    label: t('Move focus in and out of an active dialog window'),\n                    keystroke: 'Ctrl+F6',\n                    mayRequireFn: true\n                }\n            ]\n        });\n    }\n    /**\n\t * Initiates listeners for the `show` and `hide` events emitted by this plugin.\n\t *\n\t * We could not simply decorate the {@link #show} and {@link #hide} methods to fire events,\n\t * because they would be fired in the wrong order &ndash; first would be `show` and then `hide`\n\t * (because showing the dialog actually starts with hiding the previously visible one).\n\t * Hence, we added private methods {@link #_show} and {@link #_hide} which are called on events\n\t * in the desired sequence.\n\t */ _initShowHideListeners() {\n        this.on('show', (evt, args)=>{\n            this._show(args);\n        });\n        // 'low' priority allows to add custom callback between `_show()` and `onShow()`.\n        this.on('show', (evt, args)=>{\n            if (args.onShow) {\n                args.onShow(this);\n            }\n        }, {\n            priority: 'low'\n        });\n        this.on('hide', ()=>{\n            if (Dialog._visibleDialogPlugin) {\n                Dialog._visibleDialogPlugin._hide();\n            }\n        });\n        // 'low' priority allows to add custom callback between `_hide()` and `onHide()`.\n        this.on('hide', ()=>{\n            if (this._onHide) {\n                this._onHide(this);\n                this._onHide = undefined;\n            }\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * Initiates keystroke handler for toggling the focus between the editor and the dialog view.\n\t */ _initFocusToggler() {\n        const editor = this.editor;\n        editor.keystrokes.set('Ctrl+F6', (data, cancel)=>{\n            if (!this.isOpen || this.view.isModal) {\n                return;\n            }\n            if (this.view.focusTracker.isFocused) {\n                editor.editing.view.focus();\n            } else {\n                this.view.focus();\n            }\n            cancel();\n        });\n    }\n    /**\n\t * Provides an integration between the root attaching and detaching and positioning of the view.\n\t */ _initMultiRootIntegration() {\n        const model = this.editor.model;\n        model.document.on('change:data', ()=>{\n            if (!this.view) {\n                return;\n            }\n            const changedRoots = model.document.differ.getChangedRoots();\n            for (const changes of changedRoots){\n                if (changes.state) {\n                    this.view.updatePosition();\n                }\n            }\n        });\n    }\n    /**\n\t * Displays a dialog window.\n\t *\n\t * This method requires a {@link ~DialogDefinition} that defines the dialog's content, title, icon, action buttons, etc.\n\t *\n\t * For example, the following definition will create a dialog with:\n\t * * A header consisting of an icon, a title, and a \"Close\" button (it is added by default).\n\t * * A content consisting of a view with a single paragraph.\n\t * * A footer consisting of two buttons: \"Yes\" and \"No\".\n\t *\n\t * ```js\n\t * // Create the view that will be used as the dialog's content.\n\t * const textView = new View( locale );\n\t *\n\t * textView.setTemplate( {\n\t * \ttag: 'div',\n\t * \tattributes: {\n\t * \t\tstyle: {\n\t * \t\t\tpadding: 'var(--ck-spacing-large)',\n\t * \t\t\twhiteSpace: 'initial',\n\t * \t\t\twidth: '100%',\n\t * \t\t\tmaxWidth: '500px'\n\t * \t\t},\n\t * \t\ttabindex: -1\n\t * \t},\n\t * \tchildren: [\n\t * \t\t'Lorem ipsum dolor sit amet...'\n\t * \t]\n\t * } );\n\t *\n\t * // Show the dialog.\n\t * editor.plugins.get( 'Dialog' ).show( {\n\t *\tid: 'myDialog',\n\t * \ticon: 'myIcon', // This should be an SVG string.\n\t * \ttitle: 'My dialog',\n\t * \tcontent: textView,\n\t * \tactionButtons: [\n\t *\t\t{\n\t *\t\t\tlabel: t( 'Yes' ),\n\t *\t\t\tclass: 'ck-button-action',\n\t *\t\t\twithText: true,\n\t *\t\t\tonExecute: () => dialog.hide()\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tlabel: t( 'No' ),\n\t *\t\t\twithText: true,\n\t *\t\t\tonExecute: () => dialog.hide()\n\t *\t\t}\n\t *\t]\n\t * } );\n\t * ```\n\t *\n\t * By specifying the {@link ~DialogDefinition#onShow} and {@link ~DialogDefinition#onHide} callbacks\n\t * it is also possible to add callbacks that will be called when the dialog is shown or hidden.\n\t *\n\t * For example, the callbacks in the following definition:\n\t * * Disable the default behavior of the <kbd>Esc</kbd> key.\n\t * * Fire a custom event when the dialog gets hidden.\n\t *\n\t * ```js\n\t * editor.plugins.get( 'Dialog' ).show( {\n\t * \t// ...\n\t * \tonShow: dialog => {\n\t * \t\tdialog.view.on( 'close', ( evt, data ) => {\n\t * \t\t\t// Only prevent the event from the \"Esc\" key - do not affect the other ways of closing the dialog.\n\t * \t\t\tif ( data.source === 'escKeyPress' ) {\n\t * \t\t\t\tevt.stop();\n\t * \t\t\t}\n\t * \t\t} );\n\t * \t},\n\t * \tonHide: dialog => {\n\t * \t\tdialog.fire( 'dialogDestroyed' );\n\t * \t}\n\t * } );\n\t * ```\n\t *\n\t * Internally, calling this method:\n\t * 1. Hides the currently visible dialog (if any) calling the {@link #hide} method\n\t * (fires the {@link ~DialogHideEvent hide event}).\n\t * 2. Fires the {@link ~DialogShowEvent show event} which allows for adding callbacks that customize the\n\t * behavior of the dialog.\n\t * 3. Shows the dialog.\n\t */ show(dialogDefinition) {\n        this.hide();\n        this.fire(`show:${dialogDefinition.id}`, dialogDefinition);\n    }\n    /**\n\t * Handles creating the {@link module:ui/dialog/dialogview~DialogView} instance and making it visible.\n\t */ _show({ id, icon, title, hasCloseButton = true, content, actionButtons, className, isModal, position, onHide }) {\n        const editor = this.editor;\n        this.view = new DialogView(editor.locale, {\n            getCurrentDomRoot: ()=>{\n                return editor.editing.view.getDomRoot(editor.model.document.selection.anchor.root.rootName);\n            },\n            getViewportOffset: ()=>{\n                return editor.ui.viewportOffset;\n            }\n        });\n        const view = this.view;\n        view.on('close', ()=>{\n            this.hide();\n        });\n        editor.ui.view.body.add(view);\n        editor.keystrokes.listenTo(view.element);\n        // Unless the user specified a position, modals should always be centered on the screen.\n        // Otherwise, let's keep dialogs centered in the editing root by default.\n        if (!position) {\n            position = isModal ? DialogViewPosition.SCREEN_CENTER : DialogViewPosition.EDITOR_CENTER;\n        }\n        view.set({\n            position,\n            _isVisible: true,\n            className,\n            isModal\n        });\n        view.setupParts({\n            icon,\n            title,\n            hasCloseButton,\n            content,\n            actionButtons\n        });\n        this.id = id;\n        if (onHide) {\n            this._onHide = onHide;\n        }\n        this.isOpen = true;\n        Dialog._visibleDialogPlugin = this;\n    }\n    /**\n\t * Hides the dialog. This method is decorated to enable interacting on the {@link ~DialogHideEvent hide event}.\n\t *\n\t * See {@link #show}.\n\t */ hide() {\n        if (Dialog._visibleDialogPlugin) {\n            Dialog._visibleDialogPlugin.fire(`hide:${Dialog._visibleDialogPlugin.id}`);\n        }\n    }\n    /**\n\t * Destroys the {@link module:ui/dialog/dialogview~DialogView} and cleans up the stored dialog state.\n\t */ _hide() {\n        if (!this.view) {\n            return;\n        }\n        const editor = this.editor;\n        const view = this.view;\n        // Reset the content view to prevent its children from being destroyed in the standard\n        // View#destroy() (and collections) chain. If the content children were left in there,\n        // they would have to be re-created by the feature using the dialog every time the dialog\n        // shows up.\n        if (view.contentView) {\n            view.contentView.reset();\n        }\n        editor.ui.view.body.remove(view);\n        editor.ui.focusTracker.remove(view.element);\n        editor.keystrokes.stopListening(view.element);\n        view.destroy();\n        editor.editing.view.focus();\n        this.id = null;\n        this.isOpen = false;\n        Dialog._visibleDialogPlugin = null;\n    }\n}\n\n/**\n * Button that is used as dropdown list item entry.\n */ class ListItemButtonView extends ButtonView {\n    /**\n\t * Holds the view for the check icon of a button list item.\n\t */ _checkIconHolderView = new CheckIconHolderView();\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, labelView = new ButtonLabelView()){\n        super(locale, labelView);\n        this.set({\n            hasCheckSpace: false,\n            _hasCheck: this.isToggleable\n        });\n        const bind = this.bindTemplate;\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-list-item-button',\n                    bind.if('isToggleable', 'ck-list-item-button_toggleable')\n                ]\n            }\n        });\n        this.bind('_hasCheck').to(this, 'hasCheckSpace', this, 'isToggleable', (hasCheckSpace, isToggleable)=>hasCheckSpace || isToggleable);\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        if (this._hasCheck) {\n            this.children.add(this._checkIconHolderView, 0);\n        }\n        this._watchCheckIconHolderMount();\n    }\n    /**\n\t * Renders the check icon if the button is toggleable.\n\t */ _watchCheckIconHolderMount() {\n        this._checkIconHolderView.bind('isOn').to(this, 'isOn', (value)=>this.isToggleable && value);\n        this.on('change:_hasCheck', (evt, propertyName, hasCheck)=>{\n            const { children, _checkIconHolderView } = this;\n            if (hasCheck) {\n                children.add(_checkIconHolderView, 0);\n            } else {\n                children.remove(_checkIconHolderView);\n            }\n        });\n    }\n}\nclass CheckIconHolderView extends View {\n    /**\n\t * Collection of child views.\n\t */ children;\n    /**\n\t * The view for the check icon of the button list item.\n\t */ _checkIconView = this._createCheckIconView();\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        const bind = this.bindTemplate;\n        this.children = this.createCollection();\n        this.set('isOn', false);\n        this.setTemplate({\n            tag: 'span',\n            children: this.children,\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-list-item-button__check-holder',\n                    bind.to('isOn', (isOn)=>isOn ? 'ck-on' : 'ck-off')\n                ]\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        if (this.isOn) {\n            this.children.add(this._checkIconView, 0);\n        }\n        this._watchCheckIconMount();\n    }\n    /**\n\t * Renders the check icon if the button is toggleable.\n\t */ _watchCheckIconMount() {\n        this.on('change:isOn', (evt, propertyName, isOn)=>{\n            const { children, _checkIconView } = this;\n            if (isOn && !children.has(_checkIconView)) {\n                children.add(_checkIconView);\n            } else if (!isOn && children.has(_checkIconView)) {\n                children.remove(_checkIconView);\n            }\n        });\n    }\n    /**\n\t * Creates a check icon view.\n\t */ _createCheckIconView() {\n        const iconView = new IconView();\n        iconView.content = icons.check;\n        iconView.extendTemplate({\n            attributes: {\n                class: 'ck-list-item-button__check-icon'\n            }\n        });\n        return iconView;\n    }\n}\n\n/**\n * A menu bar list button view. Buttons like this one execute user actions.\n */ class MenuBarMenuListItemButtonView extends ListItemButtonView {\n    /**\n\t * Creates an instance of the menu bar list button view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        this.set({\n            withText: true,\n            withKeystroke: true,\n            tooltip: false,\n            role: 'menuitem'\n        });\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-menu-bar__menu__item__button'\n                ]\n            }\n        });\n    }\n}\n\n/**\n * The label view class.\n */ class LabelView extends View {\n    /**\n\t * An unique id of the label. It can be used by other UI components to reference\n\t * the label, for instance, using the `aria-describedby` DOM attribute.\n\t */ id;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.set('text', undefined);\n        this.set('for', undefined);\n        this.id = `ck-editor__label_${uid()}`;\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'label',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-label'\n                ],\n                id: this.id,\n                for: bind.to('for')\n            },\n            children: [\n                {\n                    text: bind.to('text')\n                }\n            ]\n        });\n    }\n}\n\n/**\n * The view displaying keystrokes in the Accessibility help dialog.\n */ class AccessibilityHelpContentView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, keystrokes){\n        super(locale);\n        const t = locale.t;\n        const helpLabel = new LabelView();\n        helpLabel.text = t('Help Contents. To close this dialog press ESC.');\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-accessibility-help-dialog__content'\n                ],\n                'aria-labelledby': helpLabel.id,\n                role: 'document',\n                tabindex: -1\n            },\n            children: [\n                createElement(document, 'p', {}, t('Below, you can find a list of keyboard shortcuts that can be used in the editor.')),\n                ...this._createCategories(Array.from(keystrokes.values())),\n                helpLabel\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ focus() {\n        this.element.focus();\n    }\n    /**\n\t * Creates `<section><h3>Category label</h3>...</section>` elements for each category of keystrokes.\n\t */ _createCategories(categories) {\n        return categories.map((categoryDefinition)=>{\n            const elements = [\n                // Category header.\n                createElement(document, 'h3', {}, categoryDefinition.label),\n                // Category definitions (<dl>) and their optional headers (<h4>).\n                ...Array.from(categoryDefinition.groups.values()).map((groupDefinition)=>this._createGroup(groupDefinition)).flat()\n            ];\n            // Category description (<p>).\n            if (categoryDefinition.description) {\n                elements.splice(1, 0, createElement(document, 'p', {}, categoryDefinition.description));\n            }\n            return createElement(document, 'section', {}, elements);\n        });\n    }\n    /**\n\t * Creates `[<h4>Optional label</h4>]<dl>...</dl>` elements for each group of keystrokes in a category.\n\t */ _createGroup(groupDefinition) {\n        const definitionAndDescriptionElements = groupDefinition.keystrokes.sort((a, b)=>a.label.localeCompare(b.label)).map((keystrokeDefinition)=>this._createGroupRow(keystrokeDefinition)).flat();\n        const elements = [\n            createElement(document, 'dl', {}, definitionAndDescriptionElements)\n        ];\n        if (groupDefinition.label) {\n            elements.unshift(createElement(document, 'h4', {}, groupDefinition.label));\n        }\n        return elements;\n    }\n    /**\n\t * Creates `<dt>Keystroke label</dt><dd>Keystroke definition</dd>` elements for each keystroke in a group.\n\t */ _createGroupRow(keystrokeDefinition) {\n        const t = this.locale.t;\n        const dt = createElement(document, 'dt');\n        const dd = createElement(document, 'dd');\n        const normalizedKeystrokeDefinition = normalizeKeystrokeDefinition(keystrokeDefinition.keystroke);\n        const keystrokeAlternativeHTMLs = [];\n        for (const keystrokeAlternative of normalizedKeystrokeDefinition){\n            keystrokeAlternativeHTMLs.push(keystrokeAlternative.map(keystrokeToEnvKbd).join(''));\n        }\n        dt.innerHTML = keystrokeDefinition.label;\n        dd.innerHTML = keystrokeAlternativeHTMLs.join(', ') + (keystrokeDefinition.mayRequireFn && env.isMac ? ` ${t('(may require <kbd>Fn</kbd>)')}` : '');\n        return [\n            dt,\n            dd\n        ];\n    }\n}\nfunction keystrokeToEnvKbd(keystroke) {\n    return getEnvKeystrokeText(keystroke).split('+').map((part)=>`<kbd>${part}</kbd>`).join('+');\n}\nfunction normalizeKeystrokeDefinition(definition) {\n    if (typeof definition === 'string') {\n        return [\n            [\n                definition\n            ]\n        ];\n    }\n    if (typeof definition[0] === 'string') {\n        return [\n            definition\n        ];\n    }\n    return definition;\n}\n\nvar accessibilityIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\\\"/><path d=\\\"M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103V9.125Z\\\"/><path clip-rule=\\\"evenodd\\\" d=\\\"M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17Zm0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10Z\\\"/></svg>\";\n\n/**\n * A plugin that brings the accessibility help dialog to the editor available under the <kbd>Alt</kbd>+<kbd>0</kbd>\n * keystroke and via the \"Accessibility help\" toolbar button. The dialog displays a list of keystrokes that can be used\n * by the user to perform various actions in the editor.\n *\n * Keystroke information is loaded from {@link module:core/accessibility~Accessibility#keystrokeInfos}. New entries can be\n * added using the API provided by the {@link module:core/accessibility~Accessibility} class.\n */ class AccessibilityHelp extends Plugin {\n    /**\n\t * The view that displays the dialog content (list of keystrokes).\n\t * Created when the dialog is opened for the first time.\n\t */ contentView = null;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Dialog\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'AccessibilityHelp';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        editor.ui.componentFactory.add('accessibilityHelp', ()=>{\n            const button = this._createButton(ButtonView);\n            button.set({\n                tooltip: true,\n                withText: false,\n                label: t('Accessibility help')\n            });\n            return button;\n        });\n        editor.ui.componentFactory.add('menuBar:accessibilityHelp', ()=>{\n            const button = this._createButton(MenuBarMenuListItemButtonView);\n            button.label = t('Accessibility');\n            return button;\n        });\n        editor.keystrokes.set('Alt+0', (evt, cancel)=>{\n            this._toggleDialog();\n            cancel();\n        });\n        this._setupRootLabels();\n    }\n    /**\n\t * Creates a button to show accessibility help dialog, for use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n        const editor = this.editor;\n        const dialog = editor.plugins.get('Dialog');\n        const locale = editor.locale;\n        const view = new ButtonClass(locale);\n        view.set({\n            keystroke: 'Alt+0',\n            icon: accessibilityIcon,\n            isToggleable: true\n        });\n        view.on('execute', ()=>this._toggleDialog());\n        view.bind('isOn').to(dialog, 'id', (id)=>id === 'accessibilityHelp');\n        return view;\n    }\n    /**\n\t * Injects a help text into each editing root's `aria-label` attribute allowing assistive technology users\n\t * to discover the availability of the Accessibility help dialog.\n\t */ _setupRootLabels() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const t = editor.t;\n        editor.ui.on('ready', ()=>{\n            editingView.change((writer)=>{\n                for (const root of editingView.document.roots){\n                    addAriaLabelTextToRoot(writer, root);\n                }\n            });\n            editor.on('addRoot', (evt, modelRoot)=>{\n                const viewRoot = editor.editing.view.document.getRoot(modelRoot.rootName);\n                editingView.change((writer)=>addAriaLabelTextToRoot(writer, viewRoot));\n            }, {\n                priority: 'low'\n            });\n        });\n        function addAriaLabelTextToRoot(writer, viewRoot) {\n            const currentAriaLabel = viewRoot.getAttribute('aria-label');\n            const newAriaLabel = [\n                currentAriaLabel,\n                t('Press %0 for help.', [\n                    getEnvKeystrokeText('Alt+0')\n                ])\n            ].filter((segment)=>segment).join('. ');\n            writer.setAttribute('aria-label', newAriaLabel, viewRoot);\n        }\n    }\n    /**\n\t * Shows the accessibility help dialog. Also, creates {@link #contentView} on demand.\n\t */ _toggleDialog() {\n        const editor = this.editor;\n        const dialog = editor.plugins.get('Dialog');\n        const t = editor.locale.t;\n        if (!this.contentView) {\n            this.contentView = new AccessibilityHelpContentView(editor.locale, editor.accessibility.keystrokeInfos);\n        }\n        if (dialog.id === 'accessibilityHelp') {\n            dialog.hide();\n        } else {\n            dialog.show({\n                id: 'accessibilityHelp',\n                className: 'ck-accessibility-help-dialog',\n                title: t('Accessibility help'),\n                icon: accessibilityIcon,\n                hasCloseButton: true,\n                content: this.contentView\n            });\n        }\n    }\n}\n\n/**\n * This is a special {@link module:ui/viewcollection~ViewCollection} dedicated to elements that are detached\n * from the DOM structure of the editor, like panels, icons, etc.\n *\n * The body collection is available in the {@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`} property.\n * Any plugin can add a {@link module:ui/view~View view} to this collection.\n * These views will render in a container placed directly in the `<body>` element.\n * The editor will detach and destroy this collection when the editor will be {@link module:core/editor/editor~Editor#destroy destroyed}.\n *\n * If you need to control the life cycle of the body collection on your own, you can create your own instance of this class.\n *\n * A body collection will render itself automatically in the DOM body element as soon as you call {@link ~BodyCollection#attachToDom}.\n * If you create multiple body collections, this class will create a special wrapper element in the DOM to limit the number of\n * elements created directly in the body and remove it when the last body collection will be\n * {@link ~BodyCollection#detachFromDom detached}.\n */ class BodyCollection extends ViewCollection {\n    /**\n\t * The {@link module:core/editor/editor~Editor#locale editor's locale} instance.\n\t * See the view {@link module:ui/view~View#locale locale} property.\n\t */ locale;\n    /**\n\t * The element holding elements of the body region.\n\t */ _bodyCollectionContainer;\n    /**\n\t * Creates a new instance of the {@link module:ui/editorui/bodycollection~BodyCollection}.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor editor's locale} instance.\n\t * @param initialItems The initial items of the collection.\n\t */ constructor(locale, initialItems = []){\n        super(initialItems);\n        this.locale = locale;\n    }\n    /**\n\t * The element holding elements of the body region.\n\t */ get bodyCollectionContainer() {\n        return this._bodyCollectionContainer;\n    }\n    /**\n\t * Attaches the body collection to the DOM body element. You need to execute this method to render the content of\n\t * the body collection.\n\t */ attachToDom() {\n        this._bodyCollectionContainer = new Template({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-reset_all',\n                    'ck-body',\n                    'ck-rounded-corners'\n                ],\n                dir: this.locale.uiLanguageDirection,\n                role: 'application'\n            },\n            children: this\n        }).render();\n        let wrapper = document.querySelector('.ck-body-wrapper');\n        if (!wrapper) {\n            wrapper = createElement(document, 'div', {\n                class: 'ck-body-wrapper'\n            });\n            document.body.appendChild(wrapper);\n        }\n        wrapper.appendChild(this._bodyCollectionContainer);\n    }\n    /**\n\t * Detaches the collection from the DOM structure. Use this method when you do not need to use the body collection\n\t * anymore to clean-up the DOM structure.\n\t */ detachFromDom() {\n        super.destroy();\n        if (this._bodyCollectionContainer) {\n            this._bodyCollectionContainer.remove();\n        }\n        const wrapper = document.querySelector('.ck-body-wrapper');\n        if (wrapper && wrapper.childElementCount == 0) {\n            wrapper.remove();\n        }\n    }\n}\n\n/**\n * The switch button view class.\n *\n * ```ts\n * const view = new SwitchButtonView();\n *\n * view.set( {\n * \twithText: true,\n * \tlabel: 'Switch me!'\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n */ class SwitchButtonView extends ButtonView {\n    /**\n\t * The toggle switch of the button.\n\t */ toggleSwitchView;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.isToggleable = true;\n        this.toggleSwitchView = this._createToggleView();\n        this.extendTemplate({\n            attributes: {\n                class: 'ck-switchbutton'\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.children.add(this.toggleSwitchView);\n    }\n    /**\n\t * Creates a toggle child view.\n\t */ _createToggleView() {\n        const toggleSwitchView = new View();\n        toggleSwitchView.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-button__toggle'\n                ]\n            },\n            children: [\n                {\n                    tag: 'span',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-button__toggle__inner'\n                        ]\n                    }\n                }\n            ]\n        });\n        return toggleSwitchView;\n    }\n}\n\n/**\n * The file dialog button view.\n *\n * This component provides a button that opens the native file selection dialog.\n * It can be used to implement the UI of a file upload feature.\n *\n * ```ts\n * const view = new FileDialogButtonView( locale );\n *\n * view.set( {\n * \tacceptedType: 'image/*',\n * \tallowMultipleFiles: true\n * \tlabel: t( 'Insert image' ),\n * \ticon: imageIcon,\n * \ttooltip: true\n * } );\n *\n * view.on( 'done', ( evt, files ) => {\n * \tfor ( const file of Array.from( files ) ) {\n * \t\tconsole.log( 'Selected file', file );\n * \t}\n * } );\n * ```\n */ class FileDialogButtonView extends /* #__PURE__ */ FileDialogViewMixin(ButtonView) {\n}\n/**\n * The file dialog button view used in a lists.\n *\n * This component provides a button that opens the native file selection dialog.\n * It can be used to implement the UI of a file upload feature.\n *\n* ```ts\n * const view = new FileDialogListItemButtonView( locale );\n *\n * view.set( {\n * \tacceptedType: 'image/*',\n * \tallowMultipleFiles: true\n * \tlabel: t( 'Insert image' ),\n * \ticon: imageIcon,\n * \ttooltip: true\n * } );\n *\n * view.on( 'done', ( evt, files ) => {\n * \tfor ( const file of Array.from( files ) ) {\n * \t\tconsole.log( 'Selected file', file );\n * \t}\n * } );\n * ```\n */ class FileDialogListItemButtonView extends /* #__PURE__ */ FileDialogViewMixin(ListItemButtonView) {\n}\n/**\n * Mixin function that enhances a base button view class with file dialog functionality. It is used\n * to create a button view class that opens the native select file dialog when clicked.\n *\n * The enhanced view includes a button and a hidden file input. When the button is clicked, the file dialog is opened.\n * The mixin adds properties and methods to the base class to handle the file selection.\n *\n * @param view The base class to be enhanced with file dialog functionality.\n * @returns A new class that extends the base class and includes the file dialog functionality.\n */ function FileDialogViewMixin(view) {\n    class FileDialogView extends view {\n        /**\n\t\t * The button view of the component.\n\t\t *\n\t\t * @deprecated\n\t\t */ buttonView;\n        /**\n\t\t * A hidden `<input>` view used to execute file dialog.\n\t\t */ _fileInputView;\n        /**\n\t\t * @inheritDoc\n\t\t */ constructor(...args){\n            super(...args);\n            // For backward compatibility.\n            this.buttonView = this;\n            this._fileInputView = new FileInputView(this.locale);\n            this._fileInputView.bind('acceptedType').to(this);\n            this._fileInputView.bind('allowMultipleFiles').to(this);\n            this._fileInputView.delegate('done').to(this);\n            this.on('execute', ()=>{\n                this._fileInputView.open();\n            });\n            this.extendTemplate({\n                attributes: {\n                    class: 'ck-file-dialog-button'\n                }\n            });\n        }\n        /**\n\t\t * @inheritDoc\n\t\t */ render() {\n            super.render();\n            this.children.add(this._fileInputView);\n        }\n    }\n    return FileDialogView;\n}\n/**\n * The hidden file input view class.\n */ class FileInputView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.set('acceptedType', undefined);\n        this.set('allowMultipleFiles', false);\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'input',\n            attributes: {\n                class: [\n                    'ck-hidden'\n                ],\n                type: 'file',\n                tabindex: '-1',\n                accept: bind.to('acceptedType'),\n                multiple: bind.to('allowMultipleFiles')\n            },\n            on: {\n                // Removing from code coverage since we cannot programmatically set input element files.\n                change: bind.to(/* istanbul ignore next -- @preserve */ ()=>{\n                    if (this.element && this.element.files && this.element.files.length) {\n                        this.fire('done', this.element.files);\n                    }\n                    this.element.value = '';\n                })\n            }\n        });\n    }\n    /**\n\t * Opens file dialog.\n\t */ open() {\n        this.element.click();\n    }\n}\n\nvar dropdownArrowIcon = \"<svg viewBox=\\\"0 0 10 10\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z\\\"/></svg>\";\n\n/**\n * A collapsible UI component. Consists of a labeled button and a container which can be collapsed\n * by clicking the button. The collapsible container can be a host to other UI views.\n *\n * @internal\n */ class CollapsibleView extends View {\n    /**\n\t * The main button that, when clicked, collapses or expands the container with {@link #children}.\n\t */ buttonView;\n    /**\n\t * A collection of the child views that can be collapsed by clicking the {@link #buttonView}.\n\t */ children;\n    /**\n\t * Creates an instance of the collapsible view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param childViews An optional array of initial child views to be inserted into the collapsible.\n\t */ constructor(locale, childViews){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('isCollapsed', false);\n        this.set('label', '');\n        this.buttonView = this._createButtonView();\n        this.children = this.createCollection();\n        this.set('_collapsibleAriaLabelUid', undefined);\n        if (childViews) {\n            this.children.addMany(childViews);\n        }\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-collapsible',\n                    bind.if('isCollapsed', 'ck-collapsible_collapsed')\n                ]\n            },\n            children: [\n                this.buttonView,\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-collapsible__children'\n                        ],\n                        role: 'region',\n                        hidden: bind.if('isCollapsed', 'hidden'),\n                        'aria-labelledby': bind.to('_collapsibleAriaLabelUid')\n                    },\n                    children: this.children\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this._collapsibleAriaLabelUid = this.buttonView.labelView.element.id;\n    }\n    /**\n\t * Focuses the first focusable.\n\t */ focus() {\n        this.buttonView.focus();\n    }\n    /**\n\t * Creates the main {@link #buttonView} of the collapsible.\n\t */ _createButtonView() {\n        const buttonView = new ButtonView(this.locale);\n        const bind = buttonView.bindTemplate;\n        buttonView.set({\n            withText: true,\n            icon: dropdownArrowIcon\n        });\n        buttonView.extendTemplate({\n            attributes: {\n                'aria-expanded': bind.to('isOn', (value)=>String(value))\n            }\n        });\n        buttonView.bind('label').to(this);\n        buttonView.bind('isOn').to(this, 'isCollapsed', (isCollapsed)=>!isCollapsed);\n        buttonView.on('execute', ()=>{\n            this.isCollapsed = !this.isCollapsed;\n        });\n        return buttonView;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/colorgrid/utils\n */ /**\n * Returns color configuration options as defined in `editor.config.(fontColor|fontBackgroundColor).colors` or\n * `editor.config.table.(tableProperties|tableCellProperties).(background|border).colors\n * but processed to account for editor localization in the correct language.\n *\n * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n * when the user configuration is defined because the editor does not exist yet.\n *\n * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n */ function getLocalizedColorOptions(locale, options) {\n    const t = locale.t;\n    const localizedColorNames = {\n        Black: t('Black'),\n        'Dim grey': t('Dim grey'),\n        Grey: t('Grey'),\n        'Light grey': t('Light grey'),\n        White: t('White'),\n        Red: t('Red'),\n        Orange: t('Orange'),\n        Yellow: t('Yellow'),\n        'Light green': t('Light green'),\n        Green: t('Green'),\n        Aquamarine: t('Aquamarine'),\n        Turquoise: t('Turquoise'),\n        'Light blue': t('Light blue'),\n        Blue: t('Blue'),\n        Purple: t('Purple')\n    };\n    return options.map((colorOption)=>{\n        const label = localizedColorNames[colorOption.label];\n        if (label && label != colorOption.label) {\n            colorOption.label = label;\n        }\n        return colorOption;\n    });\n}\n/**\n * Creates a unified color definition object from color configuration options.\n * The object contains the information necessary to both render the UI and initialize the conversion.\n */ function normalizeColorOptions(options) {\n    return options.map(normalizeSingleColorDefinition).filter((option)=>!!option);\n}\n/**\n * Creates a normalized color definition from the user-defined configuration.\n * The \"normalization\" means it will create full\n * {@link module:ui/colorgrid/colorgridview~ColorDefinition `ColorDefinition-like`}\n * object for string values, and add a `view` property, for each definition.\n */ function normalizeSingleColorDefinition(color) {\n    if (typeof color === 'string') {\n        return {\n            model: color,\n            label: color,\n            hasBorder: false,\n            view: {\n                name: 'span',\n                styles: {\n                    color\n                }\n            }\n        };\n    } else {\n        return {\n            model: color.color,\n            label: color.label || color.color,\n            hasBorder: color.hasBorder === undefined ? false : color.hasBorder,\n            view: {\n                name: 'span',\n                styles: {\n                    color: `${color.color}`\n                }\n            }\n        };\n    }\n}\n\nvar checkIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path class=\\\"ck-icon__fill\\\" d=\\\"M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z\\\"/><path d=\\\"M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z\\\"/></svg>\";\n\n/**\n * This class represents a single color tile in the {@link module:ui/colorgrid/colorgridview~ColorGridView}.\n */ class ColorTileView extends ButtonView {\n    constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('color', undefined);\n        this.set('hasBorder', false);\n        this.icon = checkIcon;\n        this.extendTemplate({\n            attributes: {\n                style: {\n                    // https://github.com/ckeditor/ckeditor5/issues/14907\n                    backgroundColor: bind.to('color', (color)=>env.isMediaForcedColors ? null : color)\n                },\n                class: [\n                    'ck',\n                    'ck-color-grid__tile',\n                    bind.if('hasBorder', 'ck-color-selector__color-tile_bordered')\n                ]\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.iconView.fillColor = 'hsl(0, 0%, 100%)';\n    }\n}\n\n/**\n * A grid of {@link module:ui/colorgrid/colortileview~ColorTileView color tiles}.\n */ class ColorGridView extends View {\n    /**\n\t * A number of columns for the tiles grid.\n\t */ columns;\n    /**\n\t * Collection of the child tile views.\n\t */ items;\n    /**\n\t * Tracks information about DOM focus in the grid.\n\t */ focusTracker;\n    /**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * Creates an instance of a color grid containing {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t *\n\t * @fires execute\n\t * @param locale The localization services instance.\n\t * @param options Component configuration\n\t * @param options.colorDefinitions Array with definitions\n\t * required to create the {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t * @param options.columns A number of columns to display the tiles.\n\t */ constructor(locale, options){\n        super(locale);\n        const colorDefinitions = options && options.colorDefinitions ? options.colorDefinitions : [];\n        this.columns = options && options.columns ? options.columns : 5;\n        const viewStyleAttribute = {\n            gridTemplateColumns: `repeat( ${this.columns}, 1fr)`\n        };\n        this.set('selectedColor', undefined);\n        this.items = this.createCollection();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this.items.on('add', (evt, colorTile)=>{\n            colorTile.isOn = colorTile.color === this.selectedColor;\n        });\n        colorDefinitions.forEach((color)=>{\n            const colorTile = new ColorTileView();\n            colorTile.set({\n                color: color.color,\n                label: color.label,\n                tooltip: true,\n                hasBorder: color.options.hasBorder\n            });\n            colorTile.on('execute', ()=>{\n                this.fire('execute', {\n                    value: color.color,\n                    hasBorder: color.options.hasBorder,\n                    label: color.label\n                });\n            });\n            this.items.add(colorTile);\n        });\n        this.setTemplate({\n            tag: 'div',\n            children: this.items,\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-color-grid'\n                ],\n                style: viewStyleAttribute\n            }\n        });\n        this.on('change:selectedColor', (evt, name, selectedColor)=>{\n            for (const item of this.items){\n                item.isOn = item.color === selectedColor;\n            }\n        });\n    }\n    /**\n\t * Focuses the first focusable in {@link #items}.\n\t */ focus() {\n        if (this.items.length) {\n            this.items.first.focus();\n        }\n    }\n    /**\n\t * Focuses the last focusable in {@link #items}.\n\t */ focusLast() {\n        if (this.items.length) {\n            this.items.last.focus();\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        // Items added before rendering should be known to the #focusTracker.\n        for (const item of this.items){\n            this.focusTracker.add(item.element);\n        }\n        this.items.on('add', (evt, item)=>{\n            this.focusTracker.add(item.element);\n        });\n        this.items.on('remove', (evt, item)=>{\n            this.focusTracker.remove(item.element);\n        });\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n        addKeyboardHandlingForGrid({\n            keystrokeHandler: this.keystrokes,\n            focusTracker: this.focusTracker,\n            gridItems: this.items,\n            numberOfColumns: this.columns,\n            uiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/colorpicker/utils\n */ /* eslint-disable @typescript-eslint/ban-ts-comment */ // There are no available types for 'color-parse' module.\n// @ts-ignore\n/**\n * Parses and converts the color string to requested format. Handles variety of color spaces\n * like `hsl`, `hex` or `rgb`.\n *\n * @param color\n * @returns A color string.\n */ function convertColor(color, outputFormat) {\n    if (!color) {\n        return '';\n    }\n    const colorObject = parseColorString(color);\n    if (!colorObject) {\n        return '';\n    }\n    if (colorObject.space === outputFormat) {\n        return color;\n    }\n    if (!canConvertParsedColor(colorObject)) {\n        return '';\n    }\n    const fromColorSpace = convert[colorObject.space];\n    const toColorSpace = fromColorSpace[outputFormat];\n    if (!toColorSpace) {\n        return '';\n    }\n    const convertedColorChannels = toColorSpace(colorObject.space === 'hex' ? colorObject.hexValue : colorObject.values);\n    return formatColorOutput(convertedColorChannels, outputFormat);\n}\n/**\n * Converts a color string to hex format.\n *\n * @param color\n * @returns A color string.\n */ function convertToHex(color) {\n    if (!color) {\n        return '';\n    }\n    const colorObject = parseColorString(color);\n    if (!colorObject) {\n        return '#000';\n    }\n    if (colorObject.space === 'hex') {\n        return colorObject.hexValue;\n    }\n    return convertColor(color, 'hex');\n}\n/**\n * Registers the custom element in the\n * [CustomElementsRegistry](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry).\n */ function registerCustomElement(elementName, constructor) {\n    if (customElements.get(elementName) === undefined) {\n        customElements.define(elementName, constructor);\n    }\n}\n/**\n * Formats the passed color channels according to the requested format.\n *\n * @param values\n * @param format\n * @returns A color string.\n */ function formatColorOutput(values, format) {\n    switch(format){\n        case 'hex':\n            return `#${values}`;\n        case 'rgb':\n            return `rgb( ${values[0]}, ${values[1]}, ${values[2]} )`;\n        case 'hsl':\n            return `hsl( ${values[0]}, ${values[1]}%, ${values[2]}% )`;\n        case 'hwb':\n            return `hwb( ${values[0]}, ${values[1]}, ${values[2]} )`;\n        case 'lab':\n            return `lab( ${values[0]}% ${values[1]} ${values[2]} )`;\n        case 'lch':\n            return `lch( ${values[0]}% ${values[1]} ${values[2]} )`;\n        default:\n            return '';\n    }\n}\nfunction parseColorString(colorString) {\n    // Parser library treats `hex` format as belonging to `rgb` space | which messes up further conversion.\n    // Let's parse such strings on our own.\n    if (colorString.startsWith('#')) {\n        const parsedHex = parse(colorString);\n        return {\n            space: 'hex',\n            values: parsedHex.values,\n            hexValue: colorString,\n            alpha: parsedHex.alpha\n        };\n    }\n    const parsed = parse(colorString);\n    if (!parsed.space) {\n        return null;\n    }\n    return parsed;\n}\nfunction canConvertParsedColor(parsedColor) {\n    return Object.keys(convert).includes(parsedColor.space);\n}\n\n/**\n * The labeled field view class. It can be used to enhance any view with the following features:\n *\n * * a label,\n * * (optional) an error message,\n * * (optional) an info (status) text,\n *\n * all bound logically by proper DOM attributes for UX and accessibility.  It also provides an interface\n * (e.g. observable properties) that allows controlling those additional features.\n *\n * The constructor of this class requires a callback that returns a view to be labeled. The callback\n * is called with unique ids that allow binding of DOM properties:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, ( labeledFieldView, viewUid, statusUid ) => {\n * \tconst inputView = new InputTextView( labeledFieldView.locale );\n *\n * \tinputView.set( {\n * \t\tid: viewUid,\n * \t\tariaDescribedById: statusUid\n * \t} );\n *\n * \tinputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n * \tinputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n *\n * \treturn inputView;\n * } );\n *\n * labeledInputView.label = 'User name';\n * labeledInputView.infoText = 'Full name like for instance, John Doe.';\n * labeledInputView.render();\n *\n * document.body.append( labeledInputView.element );\n * ```\n *\n * See {@link module:ui/labeledfield/utils} to discover ready–to–use labeled input helpers for common\n * UI components.\n */ class LabeledFieldView extends View {\n    /**\n\t * The field view that gets labeled.\n\t */ fieldView;\n    /**\n\t * The label view instance that describes the entire view.\n\t */ labelView;\n    /**\n\t * The status view for the {@link #fieldView}. It displays {@link #errorText} and\n\t * {@link #infoText}.\n\t */ statusView;\n    /**\n\t * A collection of children of the internal wrapper element. Allows inserting additional DOM elements (views) next to\n\t * the {@link #fieldView} for easy styling (e.g. positioning).\n\t *\n\t * By default, the collection contains {@link #fieldView} and {@link #labelView}.\n\t */ fieldWrapperChildren;\n    /**\n\t * Creates an instance of the labeled field view class using a provided creator function\n\t * that provides the view to be labeled.\n\t *\n\t * @param locale The locale instance.\n\t * @param viewCreator A function that returns a {@link module:ui/view~View}\n\t * that will be labeled. The following arguments are passed to the creator function:\n\t *\n\t * * an instance of the `LabeledFieldView` to allow binding observable properties,\n\t * * an UID string that connects the {@link #labelView label} and the labeled field view in DOM,\n\t * * an UID string that connects the {@link #statusView status} and the labeled field view in DOM.\n\t */ constructor(locale, viewCreator){\n        super(locale);\n        const viewUid = `ck-labeled-field-view-${uid()}`;\n        const statusUid = `ck-labeled-field-view-status-${uid()}`;\n        this.fieldView = viewCreator(this, viewUid, statusUid);\n        this.set('label', undefined);\n        this.set('isEnabled', true);\n        this.set('isEmpty', true);\n        this.set('isFocused', false);\n        this.set('errorText', null);\n        this.set('infoText', null);\n        this.set('class', undefined);\n        this.set('placeholder', undefined);\n        this.labelView = this._createLabelView(viewUid);\n        this.statusView = this._createStatusView(statusUid);\n        this.fieldWrapperChildren = this.createCollection([\n            this.fieldView,\n            this.labelView\n        ]);\n        this.bind('_statusText').to(this, 'errorText', this, 'infoText', (errorText, infoText)=>errorText || infoText);\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-labeled-field-view',\n                    bind.to('class'),\n                    bind.if('isEnabled', 'ck-disabled', (value)=>!value),\n                    bind.if('isEmpty', 'ck-labeled-field-view_empty'),\n                    bind.if('isFocused', 'ck-labeled-field-view_focused'),\n                    bind.if('placeholder', 'ck-labeled-field-view_placeholder'),\n                    bind.if('errorText', 'ck-error')\n                ]\n            },\n            children: [\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-labeled-field-view__input-wrapper'\n                        ]\n                    },\n                    children: this.fieldWrapperChildren\n                },\n                this.statusView\n            ]\n        });\n    }\n    /**\n\t * Creates label view class instance and bind with view.\n\t *\n\t * @param id Unique id to set as labelView#for attribute.\n\t */ _createLabelView(id) {\n        const labelView = new LabelView(this.locale);\n        labelView.for = id;\n        labelView.bind('text').to(this, 'label');\n        return labelView;\n    }\n    /**\n\t * Creates the status view instance. It displays {@link #errorText} and {@link #infoText}\n\t * next to the {@link #fieldView}. See {@link #_statusText}.\n\t *\n\t * @param statusUid Unique id of the status, shared with the {@link #fieldView view's}\n\t * `aria-describedby` attribute.\n\t */ _createStatusView(statusUid) {\n        const statusView = new View(this.locale);\n        const bind = this.bindTemplate;\n        statusView.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-labeled-field-view__status',\n                    bind.if('errorText', 'ck-labeled-field-view__status_error'),\n                    bind.if('_statusText', 'ck-hidden', (value)=>!value)\n                ],\n                id: statusUid,\n                role: bind.if('errorText', 'alert')\n            },\n            children: [\n                {\n                    text: bind.to('_statusText')\n                }\n            ]\n        });\n        return statusView;\n    }\n    /**\n\t * Focuses the {@link #fieldView}.\n\t */ focus(direction) {\n        this.fieldView.focus(direction);\n    }\n}\n\n/**\n * The base input view class.\n */ class InputBase extends View {\n    /**\n\t * Stores information about the editor UI focus and propagates it so various plugins and components\n\t * are unified as a focus group.\n\t */ focusTracker;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.set('value', undefined);\n        this.set('id', undefined);\n        this.set('placeholder', undefined);\n        this.set('tabIndex', undefined);\n        this.set('isReadOnly', false);\n        this.set('hasError', false);\n        this.set('ariaDescribedById', undefined);\n        this.set('ariaLabel', undefined);\n        this.focusTracker = new FocusTracker();\n        this.bind('isFocused').to(this.focusTracker);\n        this.set('isEmpty', true);\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'input',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-input',\n                    bind.if('isFocused', 'ck-input_focused'),\n                    bind.if('isEmpty', 'ck-input-text_empty'),\n                    bind.if('hasError', 'ck-error')\n                ],\n                id: bind.to('id'),\n                placeholder: bind.to('placeholder'),\n                tabindex: bind.to('tabIndex'),\n                readonly: bind.to('isReadOnly'),\n                'aria-invalid': bind.if('hasError', true),\n                'aria-describedby': bind.to('ariaDescribedById'),\n                'aria-label': bind.to('ariaLabel')\n            },\n            on: {\n                input: bind.to((...args)=>{\n                    this.fire('input', ...args);\n                    this._updateIsEmpty();\n                }),\n                change: bind.to(this._updateIsEmpty.bind(this))\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.focusTracker.add(this.element);\n        this._setDomElementValue(this.value);\n        this._updateIsEmpty();\n        // Bind `this.value` to the DOM element's value.\n        // We cannot use `value` DOM attribute because removing it on Edge does not clear the DOM element's value property.\n        this.on('change:value', (evt, name, value)=>{\n            this._setDomElementValue(value);\n            this._updateIsEmpty();\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n    }\n    /**\n\t * Moves the focus to the input and selects the value.\n\t */ select() {\n        this.element.select();\n    }\n    /**\n\t * Focuses the input.\n\t */ focus() {\n        this.element.focus();\n    }\n    /**\n\t * Resets the value of the input\n\t */ reset() {\n        this.value = this.element.value = '';\n        this._updateIsEmpty();\n    }\n    /**\n\t * Updates the {@link #isEmpty} property value on demand.\n\t */ _updateIsEmpty() {\n        this.isEmpty = isInputElementEmpty(this.element);\n    }\n    /**\n\t * Sets the `value` property of the {@link #element DOM element} on demand.\n\t */ _setDomElementValue(value) {\n        this.element.value = !value && value !== 0 ? '' : value;\n    }\n}\nfunction isInputElementEmpty(domElement) {\n    return !domElement.value;\n}\n\n/**\n * The input view class.\n */ class InputView extends InputBase {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.set('inputMode', 'text');\n        const bind = this.bindTemplate;\n        this.extendTemplate({\n            attributes: {\n                inputmode: bind.to('inputMode')\n            }\n        });\n    }\n}\n\n/**\n * The text input view class.\n */ class InputTextView extends InputView {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.extendTemplate({\n            attributes: {\n                type: 'text',\n                class: [\n                    'ck-input-text'\n                ]\n            }\n        });\n    }\n}\n\n/**\n * The number input view class.\n */ class InputNumberView extends InputView {\n    /**\n\t * Creates an instance of the input number view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options The options of the input.\n\t * @param options.min The value of the `min` DOM attribute (the lowest accepted value).\n\t * @param options.max The value of the `max` DOM attribute (the highest accepted value).\n\t * @param options.step The value of the `step` DOM attribute.\n\t */ constructor(locale, { min, max, step } = {}){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('min', min);\n        this.set('max', max);\n        this.set('step', step);\n        this.extendTemplate({\n            attributes: {\n                type: 'number',\n                class: [\n                    'ck-input-number'\n                ],\n                min: bind.to('min'),\n                max: bind.to('max'),\n                step: bind.to('step')\n            }\n        });\n    }\n}\n\n/**\n * The textarea view class.\n *\n * ```ts\n * const textareaView = new TextareaView();\n *\n * textareaView.minRows = 2;\n * textareaView.maxRows = 10;\n *\n * textareaView.render();\n *\n * document.body.append( textareaView.element );\n * ```\n */ class TextareaView extends InputBase {\n    /**\n\t * An instance of the resize observer used to detect when the view is visible or not and update\n\t * its height if any changes that affect it were made while it was invisible.\n\t *\n\t * **Note:** Created in {@link #render}.\n\t */ _resizeObserver;\n    /**\n\t * A flag that indicates whether the {@link #_updateAutoGrowHeight} method should be called when the view becomes\n\t * visible again. See {@link #_resizeObserver}.\n\t */ _isUpdateAutoGrowHeightPending = false;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const toPx = toUnit('px');\n        this.set('minRows', 2);\n        this.set('maxRows', 5);\n        this.set('_height', null);\n        this.set('resize', 'none');\n        this._resizeObserver = null;\n        this.on('change:minRows', this._validateMinMaxRows.bind(this));\n        this.on('change:maxRows', this._validateMinMaxRows.bind(this));\n        const bind = this.bindTemplate;\n        this.template.tag = 'textarea';\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-textarea'\n                ],\n                style: {\n                    height: bind.to('_height', (height)=>height ? toPx(height) : null),\n                    resize: bind.to('resize')\n                },\n                rows: bind.to('minRows')\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        let wasVisible = false;\n        this.on('input', ()=>{\n            this._updateAutoGrowHeight(true);\n            this.fire('update');\n        });\n        this.on('change:value', ()=>{\n            // The content needs to be updated by the browser after the value is changed. It takes a few ms.\n            global.window.requestAnimationFrame(()=>{\n                if (!isVisible(this.element)) {\n                    this._isUpdateAutoGrowHeightPending = true;\n                    return;\n                }\n                this._updateAutoGrowHeight();\n                this.fire('update');\n            });\n        });\n        // It may occur that the Textarea size needs to be updated (e.g. because it's content was changed)\n        // when it is not visible or detached from DOM.\n        // In such case, we need to detect the moment when it becomes visible again and update its height then.\n        // We're using ResizeObserver for that as it is the most reliable way to detect when the element becomes visible.\n        // IntersectionObserver didn't work well with the absolute positioned containers.\n        this._resizeObserver = new ResizeObserver(this.element, (evt)=>{\n            const isVisible = !!evt.contentRect.width && !!evt.contentRect.height;\n            if (!wasVisible && isVisible && this._isUpdateAutoGrowHeightPending) {\n                // We're wrapping the auto-grow logic in RAF because otherwise there is an error thrown\n                // by the browser about recursive calls to the ResizeObserver. It used to happen in unit\n                // tests only, though. Since there is no risk of infinite loop here, it can stay here.\n                global.window.requestAnimationFrame(()=>{\n                    this._updateAutoGrowHeight();\n                    this.fire('update');\n                });\n            }\n            wasVisible = isVisible;\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        if (this._resizeObserver) {\n            this._resizeObserver.destroy();\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ reset() {\n        super.reset();\n        this._updateAutoGrowHeight();\n        this.fire('update');\n    }\n    /**\n\t * Updates the {@link #_height} of the view depending on {@link #minRows}, {@link #maxRows}, and the current content size.\n\t *\n\t * **Note**: This method overrides manual resize done by the user using a handle. It's a known bug.\n\t */ _updateAutoGrowHeight(shouldScroll) {\n        const viewElement = this.element;\n        if (!viewElement.offsetParent) {\n            this._isUpdateAutoGrowHeightPending = true;\n            return;\n        }\n        this._isUpdateAutoGrowHeightPending = false;\n        const singleLineContentClone = getTextareaElementClone(viewElement, '1');\n        const fullTextValueClone = getTextareaElementClone(viewElement, viewElement.value);\n        const singleLineContentStyles = singleLineContentClone.ownerDocument.defaultView.getComputedStyle(singleLineContentClone);\n        const verticalPaddings = parseFloat(singleLineContentStyles.paddingTop) + parseFloat(singleLineContentStyles.paddingBottom);\n        const borders = getBorderWidths(singleLineContentClone);\n        const lineHeight = parseFloat(singleLineContentStyles.lineHeight);\n        const verticalBorder = borders.top + borders.bottom;\n        const singleLineAreaDefaultHeight = new Rect(singleLineContentClone).height;\n        const numberOfLines = Math.round((fullTextValueClone.scrollHeight - verticalPaddings) / lineHeight);\n        const maxHeight = this.maxRows * lineHeight + verticalPaddings + verticalBorder;\n        // There's a --ck-ui-component-min-height CSS custom property that enforces min height of the component.\n        // This min-height is relevant only when there's one line of text. Other than that, we can rely on line-height.\n        const minHeight = numberOfLines === 1 ? singleLineAreaDefaultHeight : this.minRows * lineHeight + verticalPaddings + verticalBorder;\n        // The size of textarea is controlled by height style instead of rows attribute because event though it is\n        // a more complex solution, it is immune to the layout textarea has been rendered in (gird, flex).\n        this._height = Math.min(Math.max(Math.max(numberOfLines, this.minRows) * lineHeight + verticalPaddings + verticalBorder, minHeight), maxHeight);\n        if (shouldScroll) {\n            viewElement.scrollTop = viewElement.scrollHeight;\n        }\n        singleLineContentClone.remove();\n        fullTextValueClone.remove();\n    }\n    /**\n\t * Validates the {@link #minRows} and {@link #maxRows} properties and warns in the console if the configuration is incorrect.\n\t */ _validateMinMaxRows() {\n        if (this.minRows > this.maxRows) {\n            /**\n\t\t\t * The minimum number of rows is greater than the maximum number of rows.\n\t\t\t *\n\t\t\t * @error ui-textarea-view-min-rows-greater-than-max-rows\n\t\t\t * @param textareaView The misconfigured textarea view instance.\n\t\t\t * @param minRows The value of `minRows` property.\n\t\t\t * @param maxRows The value of `maxRows` property.\n\t\t\t */ throw new CKEditorError('ui-textarea-view-min-rows-greater-than-max-rows', {\n                textareaView: this,\n                minRows: this.minRows,\n                maxRows: this.maxRows\n            });\n        }\n    }\n}\nfunction getTextareaElementClone(element, value) {\n    const clone = element.cloneNode();\n    clone.style.position = 'absolute';\n    clone.style.top = '-99999px';\n    clone.style.left = '-99999px';\n    clone.style.height = 'auto';\n    clone.style.overflow = 'hidden';\n    clone.style.width = element.ownerDocument.defaultView.getComputedStyle(element).width;\n    clone.tabIndex = -1;\n    clone.rows = 1;\n    clone.value = value;\n    element.parentNode.insertBefore(clone, element);\n    return clone;\n}\n\n/**\n * The dropdown panel view class.\n *\n * See {@link module:ui/dropdown/dropdownview~DropdownView} to learn about the common usage.\n */ class DropdownPanelView extends View {\n    /**\n\t * Collection of the child views in this panel.\n\t *\n\t * A common child type is the {@link module:ui/list/listview~ListView} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n\t * See {@link module:ui/dropdown/utils~addListToDropdown} and\n\t * {@link module:ui/dropdown/utils~addToolbarToDropdown} to learn more about child views of dropdowns.\n\t */ children;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('isVisible', false);\n        this.set('position', 'se');\n        this.children = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-reset',\n                    'ck-dropdown__panel',\n                    bind.to('position', (value)=>`ck-dropdown__panel_${value}`),\n                    bind.if('isVisible', 'ck-dropdown__panel-visible')\n                ],\n                tabindex: '-1'\n            },\n            children: this.children,\n            on: {\n                // Drag and drop in the panel should not break the selection in the editor.\n                // https://github.com/ckeditor/ckeditor5-ui/issues/228\n                selectstart: bind.to((evt)=>{\n                    if (evt.target.tagName.toLocaleLowerCase() === 'input') {\n                        return;\n                    }\n                    evt.preventDefault();\n                })\n            }\n        });\n    }\n    /**\n\t * Focuses the first view in the {@link #children} collection.\n\t *\n\t * See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t */ focus() {\n        if (this.children.length) {\n            const firstChild = this.children.first;\n            if (typeof firstChild.focus === 'function') {\n                firstChild.focus();\n            } else {\n                /**\n\t\t\t\t * The child view of a dropdown could not be focused because it is missing the `focus()` method.\n\t\t\t\t *\n\t\t\t\t * This warning appears when a dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open} and it\n\t\t\t\t * attempts to focus the {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children first child} of its panel\n\t\t\t\t * but the child does not implement the\n\t\t\t\t * {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface}.\n\t\t\t\t *\n\t\t\t\t * Focusing the content of a dropdown on open greatly improves the accessibility. Please make sure the view instance\n\t\t\t\t * provides the `focus()` method for the best user experience.\n\t\t\t\t *\n\t\t\t\t * @error ui-dropdown-panel-focus-child-missing-focus\n\t\t\t\t * @param childView\n\t\t\t\t * @param dropdownPanel\n\t\t\t\t */ logWarning('ui-dropdown-panel-focus-child-missing-focus', {\n                    childView: this.children.first,\n                    dropdownPanel: this\n                });\n            }\n        }\n    }\n    /**\n\t * Focuses the view element or last item in view collection on opening dropdown's panel.\n\t *\n\t * See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t */ focusLast() {\n        if (this.children.length) {\n            const lastChild = this.children.last;\n            if (typeof lastChild.focusLast === 'function') {\n                lastChild.focusLast();\n            } else {\n                lastChild.focus();\n            }\n        }\n    }\n}\n\n/**\n * The dropdown view class. It manages the dropdown button and dropdown panel.\n *\n * In most cases, the easiest way to create a dropdown is by using the {@link module:ui/dropdown/utils~createDropdown}\n * util:\n *\n * ```ts\n * const dropdown = createDropdown( locale );\n *\n * // Configure dropdown's button properties:\n * dropdown.buttonView.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.render();\n *\n * dropdown.panelView.element.textContent = 'Content of the panel';\n *\n * // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * If you want to add a richer content to the dropdown panel, you can use the {@link module:ui/dropdown/utils~addListToDropdown}\n * and {@link module:ui/dropdown/utils~addToolbarToDropdown} helpers. See more examples in\n * {@link module:ui/dropdown/utils~createDropdown} documentation.\n *\n * If you want to create a completely custom dropdown, then you can compose it manually:\n *\n * ```ts\n * const button = new DropdownButtonView( locale );\n * const panel = new DropdownPanelView( locale );\n * const dropdown = new DropdownView( locale, button, panel );\n *\n * button.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.render();\n *\n * panel.element.textContent = 'Content of the panel';\n *\n * // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * However, dropdown created this way will contain little behavior. You will need to implement handlers for actions\n * such as {@link module:ui/bindings/clickoutsidehandler~clickOutsideHandler clicking outside an open dropdown}\n * (which should close it) and support for arrow keys inside the panel. Therefore, unless you really know what\n * you do and you really need to do it, it is recommended to use the {@link module:ui/dropdown/utils~createDropdown} helper.\n */ class DropdownView extends View {\n    /**\n\t * Button of the dropdown view. Clicking the button opens the {@link #panelView}.\n\t */ buttonView;\n    /**\n\t * Panel of the dropdown. It opens when the {@link #buttonView} is\n\t * {@link module:ui/button/button~Button#event:execute executed} (i.e. clicked).\n\t *\n\t * Child views can be added to the panel's `children` collection:\n\t *\n\t * ```ts\n\t * dropdown.panelView.children.add( childView );\n\t * ```\n\t *\n\t * See {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children} and\n\t * {@link module:ui/viewcollection~ViewCollection#add}.\n\t */ panelView;\n    /**\n\t * Tracks information about the DOM focus in the dropdown.\n\t */ focusTracker;\n    /**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the dropdown:\n\t *\n\t * * <kbd>▼</kbd> opens the dropdown,\n\t * * <kbd>◀</kbd> and <kbd>Esc</kbd> closes the dropdown.\n\t */ keystrokes;\n    /**\n\t * A child {@link module:ui/list/listview~ListView list view} of the dropdown located\n\t * in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t *\n\t * **Note**: Only supported when dropdown has list view added using {@link module:ui/dropdown/utils~addListToDropdown}.\n\t */ listView;\n    /**\n\t * A child toolbar of the dropdown located in the\n\t * {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t *\n\t * **Note**: Only supported when dropdown has a toolbar added using {@link module:ui/dropdown/utils~addToolbarToDropdown}.\n\t */ toolbarView;\n    /**\n\t * A child menu component of the dropdown located\n\t * in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t *\n\t * **Note**: Only supported when dropdown has a menu added using {@link module:ui/dropdown/utils~addMenuToDropdown}.\n\t */ menuView;\n    /**\n\t * Creates an instance of the dropdown.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale, buttonView, panelView){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.buttonView = buttonView;\n        this.panelView = panelView;\n        this.set('isOpen', false);\n        this.set('isEnabled', true);\n        this.set('class', undefined);\n        this.set('id', undefined);\n        this.set('panelPosition', 'auto');\n        // Toggle the visibility of the panel when the dropdown becomes open.\n        this.panelView.bind('isVisible').to(this, 'isOpen');\n        this.keystrokes = new KeystrokeHandler();\n        this.focusTracker = new FocusTracker();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-dropdown',\n                    bind.to('class'),\n                    bind.if('isEnabled', 'ck-disabled', (value)=>!value)\n                ],\n                id: bind.to('id'),\n                'aria-describedby': bind.to('ariaDescribedById')\n            },\n            children: [\n                buttonView,\n                panelView\n            ]\n        });\n        buttonView.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-dropdown__button'\n                ],\n                'data-cke-tooltip-disabled': bind.to('isOpen')\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.focusTracker.add(this.buttonView.element);\n        this.focusTracker.add(this.panelView.element);\n        // Toggle the dropdown when its button has been clicked.\n        this.listenTo(this.buttonView, 'open', ()=>{\n            this.isOpen = !this.isOpen;\n        });\n        // Let the dropdown control the position of the panel. The position must\n        // be updated every time the dropdown is open.\n        this.on('change:isOpen', (evt, name, isOpen)=>{\n            if (!isOpen) {\n                return;\n            }\n            // If \"auto\", find the best position of the panel to fit into the viewport.\n            // Otherwise, simply assign the static position.\n            if (this.panelPosition === 'auto') {\n                const optimalPanelPosition = DropdownView._getOptimalPosition({\n                    element: this.panelView.element,\n                    target: this.buttonView.element,\n                    fitInViewport: true,\n                    positions: this._panelPositions\n                });\n                this.panelView.position = optimalPanelPosition ? optimalPanelPosition.name : this._panelPositions[0].name;\n            } else {\n                this.panelView.position = this.panelPosition;\n            }\n        });\n        // Listen for keystrokes coming from within #element.\n        this.keystrokes.listenTo(this.element);\n        const closeDropdown = (data, cancel)=>{\n            if (this.isOpen) {\n                this.isOpen = false;\n                cancel();\n            }\n        };\n        // Open the dropdown panel using the arrow down key, just like with return or space.\n        this.keystrokes.set('arrowdown', (data, cancel)=>{\n            // Don't open if the dropdown is disabled or already open.\n            if (this.buttonView.isEnabled && !this.isOpen) {\n                this.isOpen = true;\n                cancel();\n            }\n        });\n        // Block the right arrow key (until nested dropdowns are implemented).\n        this.keystrokes.set('arrowright', (data, cancel)=>{\n            if (this.isOpen) {\n                cancel();\n            }\n        });\n        // Close the dropdown using the arrow left/escape key.\n        this.keystrokes.set('arrowleft', closeDropdown);\n        this.keystrokes.set('esc', closeDropdown);\n    }\n    /**\n\t * Focuses the {@link #buttonView}.\n\t */ focus() {\n        this.buttonView.focus();\n    }\n    /**\n\t * Returns {@link #panelView panel} positions to be used by the\n\t * {@link module:utils/dom/position~getOptimalPosition `getOptimalPosition()`}\n\t * utility considering the direction of the language the UI of the editor is displayed in.\n\t */ get _panelPositions() {\n        const { south, north, southEast, southWest, northEast, northWest, southMiddleEast, southMiddleWest, northMiddleEast, northMiddleWest } = DropdownView.defaultPanelPositions;\n        if (this.locale.uiLanguageDirection !== 'rtl') {\n            return [\n                southEast,\n                southWest,\n                southMiddleEast,\n                southMiddleWest,\n                south,\n                northEast,\n                northWest,\n                northMiddleEast,\n                northMiddleWest,\n                north\n            ];\n        } else {\n            return [\n                southWest,\n                southEast,\n                southMiddleWest,\n                southMiddleEast,\n                south,\n                northWest,\n                northEast,\n                northMiddleWest,\n                northMiddleEast,\n                north\n            ];\n        }\n    }\n    /**\n\t * A set of positioning functions used by the dropdown view to determine\n\t * the optimal position (i.e. fitting into the browser viewport) of its\n\t * {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel} when\n\t * {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition} is set to 'auto'`.\n\t *\n\t * The available positioning functions are as follow:\n\t *\n\t * **South**\n\t *\n\t * * `south`\n\t *\n\t * ```\n\t *\t\t\t[ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEast`\n\t *\n\t * ```\n\t *\t\t[ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWest`\n\t *\n\t * ```\n\t *\t\t         [ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southMiddleEast`\n\t *\n\t * ```\n\t *\t\t  [ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southMiddleWest`\n\t *\n\t * ```\n\t *\t\t       [ Button ]\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **North**\n\t *\n\t * * `north`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t    [ Button ]\n\t * ```\n\t *\n\t * * `northEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t[ Button ]\n\t * ```\n\t *\n\t * * `northWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t         [ Button ]\n\t * ```\n\t *\n\t * * `northMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t  [ Button ]\n\t * ```\n\t *\n\t * * `northMiddleWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|      Panel      |\n\t *\t\t+-----------------+\n\t *\t\t       [ Button ]\n\t * ```\n\t *\n\t * Positioning functions are compatible with {@link module:utils/dom/position~DomPoint}.\n\t *\n\t * The name that position function returns will be reflected in dropdown panel's class that\n\t * controls its placement. See {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition}\n\t * to learn more.\n\t */ static defaultPanelPositions = {\n        south: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.bottom,\n                left: buttonRect.left - (panelRect.width - buttonRect.width) / 2,\n                name: 's'\n            };\n        },\n        southEast: (buttonRect)=>{\n            return {\n                top: buttonRect.bottom,\n                left: buttonRect.left,\n                name: 'se'\n            };\n        },\n        southWest: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.bottom,\n                left: buttonRect.left - panelRect.width + buttonRect.width,\n                name: 'sw'\n            };\n        },\n        southMiddleEast: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.bottom,\n                left: buttonRect.left - (panelRect.width - buttonRect.width) / 4,\n                name: 'sme'\n            };\n        },\n        southMiddleWest: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.bottom,\n                left: buttonRect.left - (panelRect.width - buttonRect.width) * 3 / 4,\n                name: 'smw'\n            };\n        },\n        north: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.top - panelRect.height,\n                left: buttonRect.left - (panelRect.width - buttonRect.width) / 2,\n                name: 'n'\n            };\n        },\n        northEast: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.top - panelRect.height,\n                left: buttonRect.left,\n                name: 'ne'\n            };\n        },\n        northWest: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.top - panelRect.height,\n                left: buttonRect.left - panelRect.width + buttonRect.width,\n                name: 'nw'\n            };\n        },\n        northMiddleEast: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.top - panelRect.height,\n                left: buttonRect.left - (panelRect.width - buttonRect.width) / 4,\n                name: 'nme'\n            };\n        },\n        northMiddleWest: (buttonRect, panelRect)=>{\n            return {\n                top: buttonRect.top - panelRect.height,\n                left: buttonRect.left - (panelRect.width - buttonRect.width) * 3 / 4,\n                name: 'nmw'\n            };\n        }\n    };\n    /**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t */ static _getOptimalPosition = getOptimalPosition;\n}\n\n/**\n * The default dropdown button view class.\n *\n * ```ts\n * const view = new DropdownButtonView();\n *\n * view.set( {\n * \tlabel: 'A button',\n * \tkeystroke: 'Ctrl+B',\n * \ttooltip: true\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n *\n * Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n */ class DropdownButtonView extends ButtonView {\n    /**\n\t * An icon that displays arrow to indicate a dropdown button.\n\t */ arrowView;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.arrowView = this._createArrowView();\n        this.extendTemplate({\n            attributes: {\n                'aria-haspopup': true,\n                'aria-expanded': this.bindTemplate.to('isOn', (value)=>String(value))\n            }\n        });\n        // The DropdownButton interface expects the open event upon which will open the dropdown.\n        this.delegate('execute').to(this, 'open');\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.children.add(this.arrowView);\n    }\n    /**\n\t * Creates a {@link module:ui/icon/iconview~IconView} instance as {@link #arrowView}.\n\t */ _createArrowView() {\n        const arrowView = new IconView();\n        arrowView.content = dropdownArrowIcon;\n        arrowView.extendTemplate({\n            attributes: {\n                class: 'ck-dropdown__arrow'\n            }\n        });\n        return arrowView;\n    }\n}\n\n/**\n * Represents a view for a button in a dropdown menu list item.\n */ class DropdownMenuListItemButtonView extends ButtonView {\n    id;\n    constructor(locale, id, label){\n        super(locale);\n        this.id = id;\n        this.set({\n            withText: true,\n            withKeystroke: true,\n            tooltip: false,\n            role: 'menuitem',\n            label\n        });\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-dropdown-menu-list__nested-menu__item__button'\n                ]\n            }\n        });\n    }\n}\n\n/**\n * Represents a view for a dropdown menu button.\n */ class DropdownMenuButtonView extends ListItemButtonView {\n    /**\n\t * An icon that displays an arrow to indicate a direction of the menu.\n\t */ arrowView;\n    /**\n\t * Creates an instance of the dropdown menu button view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set({\n            withText: true,\n            role: 'menuitem'\n        });\n        this.arrowView = this._createArrowView();\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-dropdown-menu-list__nested-menu__button'\n                ],\n                'aria-haspopup': true,\n                'aria-expanded': this.bindTemplate.to('isOn', (value)=>String(value)),\n                'data-cke-tooltip-disabled': bind.to('isOn')\n            },\n            on: {\n                'mouseenter': bind.to('mouseenter')\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.children.add(this.arrowView);\n    }\n    /**\n\t * Creates the arrow view instance.\n\t *\n\t * @private\n\t */ _createArrowView() {\n        const arrowView = new IconView();\n        arrowView.content = dropdownArrowIcon;\n        arrowView.extendTemplate({\n            attributes: {\n                class: 'ck-dropdown-menu-list__nested-menu__button__arrow'\n            }\n        });\n        return arrowView;\n    }\n}\n\n/**\n * The list item view class.\n */ class ListItemView extends View {\n    /**\n\t * Collection of the child views inside of the list item {@link #element}.\n\t */ children;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('isVisible', true);\n        this.children = this.createCollection();\n        this.setTemplate({\n            tag: 'li',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-list__item',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ],\n                role: 'presentation'\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * Focuses the list item.\n\t */ focus() {\n        if (this.children.first) {\n            this.children.first.focus();\n        }\n    }\n}\n\n/**\n * The list separator view class.\n */ class ListSeparatorView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.setTemplate({\n            tag: 'li',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-list__separator'\n                ]\n            }\n        });\n    }\n}\n\n/**\n * The list item group view class.\n */ class ListItemGroupView extends View {\n    /**\n\t * Label of the group view. Its text is configurable using the {@link #label label attribute}.\n\t *\n\t * If a custom label view is not passed in `ListItemGroupView` constructor, the label is an instance\n\t * of {@link module:ui/label/labelview~LabelView}.\n\t */ labelView;\n    /**\n\t * Collection of the child list items inside this group.\n\t */ items;\n    /**\n\t * Collection of the child elements of the group.\n\t */ children;\n    /**\n\t * Creates an instance of the list item group view class.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param labelView The instance of the group's label. If not provided, an instance of\n\t * {@link module:ui/label/labelview~LabelView} is used.\n\t */ constructor(locale, labelView = new LabelView()){\n        super(locale);\n        const bind = this.bindTemplate;\n        const nestedList = new ListView(locale);\n        this.set({\n            label: '',\n            isVisible: true\n        });\n        this.labelView = labelView;\n        this.labelView.bind('text').to(this, 'label');\n        this.children = this.createCollection();\n        this.children.addMany([\n            this.labelView,\n            nestedList\n        ]);\n        nestedList.set({\n            role: 'group',\n            ariaLabelledBy: labelView.id\n        });\n        // Disable focus tracking and accessible navigation in the child list.\n        nestedList.focusTracker.destroy();\n        nestedList.keystrokes.destroy();\n        this.items = nestedList.items;\n        this.setTemplate({\n            tag: 'li',\n            attributes: {\n                role: 'presentation',\n                class: [\n                    'ck',\n                    'ck-list__group',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ]\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * Focuses the list item (which is not a separator).\n\t */ focus() {\n        if (this.items) {\n            const firstListItem = this.items.find((item)=>!(item instanceof ListSeparatorView));\n            if (firstListItem) {\n                firstListItem.focus();\n            }\n        }\n    }\n}\n\n/**\n * The list view class.\n */ class ListView extends View {\n    /**\n\t * The collection of focusable views in the list. It is used to determine accessible navigation\n\t * between the {@link module:ui/list/listitemview~ListItemView list items} and\n\t * {@link module:ui/list/listitemgroupview~ListItemGroupView list groups}.\n\t */ focusables;\n    /**\n\t * Collection of the child list views.\n\t */ items;\n    /**\n\t * Tracks information about DOM focus in the list.\n\t */ focusTracker;\n    /**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * Helps cycling over focusable {@link #items} in the list.\n\t */ _focusCycler;\n    /**\n\t * A cached map of {@link module:ui/list/listitemgroupview~ListItemGroupView} to `change` event listeners for their `items`.\n\t * Used for accessibility and keyboard navigation purposes.\n\t */ _listItemGroupToChangeListeners = new WeakMap();\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.focusables = new ViewCollection();\n        this.items = this.createCollection();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this._focusCycler = new FocusCycler({\n            focusables: this.focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate list items backwards using the arrowup key.\n                focusPrevious: 'arrowup',\n                // Navigate toolbar items forwards using the arrowdown key.\n                focusNext: 'arrowdown'\n            }\n        });\n        this.set('ariaLabel', undefined);\n        this.set('ariaLabelledBy', undefined);\n        this.set('role', undefined);\n        this.setTemplate({\n            tag: 'ul',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-reset',\n                    'ck-list'\n                ],\n                role: bind.to('role'),\n                'aria-label': bind.to('ariaLabel'),\n                'aria-labelledby': bind.to('ariaLabelledBy')\n            },\n            children: this.items\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        // Items added before rendering should be known to the #focusTracker.\n        for (const item of this.items){\n            if (item instanceof ListItemGroupView) {\n                this._registerFocusableItemsGroup(item);\n            } else if (item instanceof ListItemView) {\n                this._registerFocusableListItem(item);\n            }\n        }\n        this.items.on('change', (evt, data)=>{\n            for (const removed of data.removed){\n                if (removed instanceof ListItemGroupView) {\n                    this._deregisterFocusableItemsGroup(removed);\n                } else if (removed instanceof ListItemView) {\n                    this._deregisterFocusableListItem(removed);\n                }\n            }\n            for (const added of Array.from(data.added).reverse()){\n                if (added instanceof ListItemGroupView) {\n                    this._registerFocusableItemsGroup(added, data.index);\n                } else {\n                    this._registerFocusableListItem(added, data.index);\n                }\n            }\n        });\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the first focusable in {@link #items}.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Focuses the first focusable in {@link #items}.\n\t */ focusFirst() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Focuses the last focusable in {@link #items}.\n\t */ focusLast() {\n        this._focusCycler.focusLast();\n    }\n    /**\n\t * Registers a list item view in the focus tracker.\n\t *\n\t * @param item The list item view to be registered.\n\t * @param index Index of the list item view in the {@link #items} collection. If not specified, the item will be added at the end.\n\t */ _registerFocusableListItem(item, index) {\n        this.focusTracker.add(item.element);\n        this.focusables.add(item, index);\n    }\n    /**\n\t * Removes a list item view from the focus tracker.\n\t *\n\t * @param item The list item view to be removed.\n\t */ _deregisterFocusableListItem(item) {\n        this.focusTracker.remove(item.element);\n        this.focusables.remove(item);\n    }\n    /**\n\t * Gets a callback that will be called when the `items` collection of a {@link module:ui/list/listitemgroupview~ListItemGroupView}\n\t * change.\n\t *\n\t * @param groupView The group view for which the callback will be created.\n\t * @returns The callback function to be used for the items `change` event listener in a group.\n\t */ _getOnGroupItemsChangeCallback(groupView) {\n        return (evt, data)=>{\n            for (const removed of data.removed){\n                this._deregisterFocusableListItem(removed);\n            }\n            for (const added of Array.from(data.added).reverse()){\n                this._registerFocusableListItem(added, this.items.getIndex(groupView) + data.index);\n            }\n        };\n    }\n    /**\n\t * Registers a list item group view (and its children) in the focus tracker.\n\t *\n\t * @param groupView A group view to be registered.\n\t * @param groupIndex Index of the group view in the {@link #items} collection. If not specified, the group will be added at the end.\n\t */ _registerFocusableItemsGroup(groupView, groupIndex) {\n        Array.from(groupView.items).forEach((child, childIndex)=>{\n            const registeredChildIndex = typeof groupIndex !== 'undefined' ? groupIndex + childIndex : undefined;\n            this._registerFocusableListItem(child, registeredChildIndex);\n        });\n        const groupItemsChangeCallback = this._getOnGroupItemsChangeCallback(groupView);\n        // Cache the reference to the callback in case the group is removed (see _deregisterFocusableItemsGroup()).\n        this._listItemGroupToChangeListeners.set(groupView, groupItemsChangeCallback);\n        groupView.items.on('change', groupItemsChangeCallback);\n    }\n    /**\n\t * Removes a list item group view (and its children) from the focus tracker.\n\t *\n\t * @param groupView The group view to be removed.\n\t */ _deregisterFocusableItemsGroup(groupView) {\n        for (const child of groupView.items){\n            this._deregisterFocusableListItem(child);\n        }\n        groupView.items.off('change', this._listItemGroupToChangeListeners.get(groupView));\n        this._listItemGroupToChangeListeners.delete(groupView);\n    }\n}\n\n/**\n * Represents a dropdown menu list view.\n */ class DropdownMenuListView extends ListView {\n    /**\n\t * Creates an instance of the dropdown menu list view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.role = 'menu';\n        this.set('isVisible', true);\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-dropdown-menu-list',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ]\n            }\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/dropdown/menu/utils\n */ const NESTED_PANEL_HORIZONTAL_OFFSET$1 = 5;\n/**\n * Contains every positioning function used by {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView} that\n * decides where the {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView#panelView} should be placed.\n *\n * Positioning functions:\n *\n *\t┌──────┬───────────────┐\n *\t│      │               │\n *\t└──────┤               │\n *\t       │               │\n *\t       │            ES │\n *\t       └───────────────┘\n *\n *\t┌───────────────┬──────┐\n *\t│               │      │\n *\t│               ├──────┘\n *\t│               │\n *\t│ WS            │\n *\t└───────────────┘\n *\n *\t       ┌───────────────┐\n *\t       │            EN │\n *\t       │               │\n *\t┌──────┤               │\n *\t│      │               │\n *\t└──────┴───────────────┘\n *\n *\t┌───────────────┐\n *\t│ WN            │\n *\t│               │\n *\t│               ├──────┐\n *\t│               │      │\n *\t└───────────────┴──────┘\n */ const DropdownMenuPanelPositioningFunctions = {\n    eastSouth: (buttonRect)=>({\n            top: buttonRect.top,\n            left: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET$1,\n            name: 'es'\n        }),\n    eastNorth: (buttonRect, panelRect)=>({\n            top: buttonRect.top - panelRect.height + buttonRect.height,\n            left: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET$1,\n            name: 'en'\n        }),\n    westSouth: (buttonRect, panelRect)=>({\n            top: buttonRect.top,\n            left: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET$1,\n            name: 'ws'\n        }),\n    westNorth: (buttonRect, panelRect)=>({\n            top: buttonRect.top - panelRect.height + buttonRect.height,\n            left: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET$1,\n            name: 'wn'\n        })\n};\n\n/**\n * Represents a view for a single item in a dropdown menu list.\n */ class DropdownMenuListItemView extends ListItemView {\n    /**\n\t * The view representing either a flat item or a nested menu in a dropdown menu list item.\n\t */ childView;\n    constructor(locale, parentMenuView, childView){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.childView = childView;\n        this.children.add(childView);\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-dropdown-menu-list__nested-menu__item'\n                ]\n            },\n            on: {\n                'mouseenter': bind.to('mouseenter')\n            }\n        });\n        if (parentMenuView) {\n            this.delegate('mouseenter').to(parentMenuView);\n            if (childView instanceof DropdownMenuListItemButtonView) {\n                childView.delegate('execute').to(parentMenuView);\n            }\n        }\n    }\n}\n\nconst DropdownRootMenuBehaviors = {\n    /**\n\t * Move focus to a menu item on mouse hover. If it is a button to open a nested menu, open that menu.\n\t */ toggleMenusAndFocusItemsOnHover (rootList) {\n        rootList.on('menu:mouseenter', (evt)=>{\n            const [pathLeaf] = evt.path;\n            evt.source.focus();\n            for (const menuView of rootList.menus){\n                const isListItemContainingMenu = pathLeaf instanceof DropdownMenuListItemView && pathLeaf.childView === menuView;\n                menuView.isOpen = (evt.path.includes(menuView) || isListItemContainingMenu) && menuView.isEnabled;\n            }\n        });\n    },\n    /**\n\t * Handles the following case:\n\t *\n\t * 1. Hover to open a sub-menu (A). The button has focus.\n\t * 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t * 3. Press arrow right to open the sub-menu (B).\n\t * 4. The sub-menu (A) should close (if not, there are two open menus).\n\t */ closeMenuWhenAnotherOnTheSameLevelOpens (rootList) {\n        rootList.on('menu:change:isOpen', (evt, name, isOpen)=>{\n            if (!isOpen) {\n                return;\n            }\n            const evtMenu = evt.source;\n            for (const menuView of rootList.menus){\n                if (evtMenu.parentMenuView === menuView.parentMenuView && evtMenu !== menuView) {\n                    menuView.isOpen = false;\n                }\n            }\n        });\n    }\n};\nconst DropdownMenuBehaviors = {\n    /**\n\t * Open the menu on the right arrow key press (left, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t */ openOnArrowRightKey (menuView) {\n        const keystroke = menuView.locale.uiLanguageDirection === 'rtl' ? 'arrowleft' : 'arrowright';\n        menuView.keystrokes.set(keystroke, (data, cancel)=>{\n            if (menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled) {\n                return;\n            }\n            if (!menuView.isOpen) {\n                menuView.isOpen = true;\n            }\n            menuView.panelView.focus();\n            cancel();\n        });\n    },\n    /**\n\t * Opens the menu on its button click as well as enter and space keys press (if the button is focused).\n\t */ openOnButtonClick (menuView) {\n        menuView.buttonView.on('execute', ()=>{\n            if (menuView.isEnabled) {\n                menuView.isOpen = true;\n            }\n        });\n    },\n    /**\n\t * Opens the menu and focuses the panel content upon pressing the Enter key.\n\t */ openAndFocusOnEnterKeyPress (menuView) {\n        menuView.keystrokes.set('enter', (data, cancel)=>{\n            // Engage only for Enter key press when the button is focused. The panel can contain\n            // other UI components and features that rely on the Enter key press.\n            if (menuView.focusTracker.focusedElement !== menuView.buttonView.element) {\n                return;\n            }\n            menuView.isOpen = true;\n            menuView.panelView.focus();\n            cancel();\n        });\n    },\n    /**\n\t * Closes the menu on the left key press (right, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t */ closeOnArrowLeftKey (menuView) {\n        const keystroke = menuView.locale.uiLanguageDirection === 'rtl' ? 'arrowright' : 'arrowleft';\n        menuView.keystrokes.set(keystroke, (data, cancel)=>{\n            if (menuView.isOpen) {\n                // Focus first, then close the panel. Otherwise, Safari won't send blur events for detached DOM elements, leading to errors.\n                menuView.focus();\n                menuView.isOpen = false;\n                cancel();\n            }\n        });\n    },\n    closeOnEscKey (menuView) {\n        menuView.keystrokes.set('esc', (data, cancel)=>{\n            if (menuView.isOpen) {\n                // Focus first, then close the panel. Otherwise, Safari won't send blur events for detached DOM elements, leading to errors.\n                menuView.focus();\n                menuView.isOpen = false;\n                cancel();\n            }\n        });\n    },\n    /**\n\t * Closes the menu when its parent menu closes. This prevents from leaving orphaned open menus.\n\t */ closeOnParentClose (menuView, parentMenuView) {\n        parentMenuView.on('change:isOpen', (evt, name, isOpen)=>{\n            // TODO: Remove checking `evt.source` if `change:isOpen` is no longer delegated.\n            if (!isOpen && evt.source === parentMenuView) {\n                menuView.isOpen = false;\n            }\n        });\n    }\n};\n\nconst toPx$5 = /* #__PURE__ */ toUnit('px');\n// A static balloon panel positioning function that moves the balloon far off the viewport.\n// It is used as a fallback when there is no way to position the balloon using provided\n// positioning functions (see: `getOptimalPosition()`), for instance, when the target the\n// balloon should be attached to gets obscured by scrollable containers or the viewport.\n//\n// It prevents the balloon from being attached to the void and possible degradation of the UX.\n// At the same time, it keeps the balloon physically visible in the DOM so the focus remains\n// uninterrupted.\nconst POSITION_OFF_SCREEN = {\n    top: -99999,\n    left: -99999,\n    name: 'arrowless',\n    config: {\n        withArrow: false\n    }\n};\n/**\n * The balloon panel view class.\n *\n * A floating container which can\n * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#pin pin} to any\n * {@link module:utils/dom/position~Options#target target} in the DOM and remain in that position\n * e.g. when the web page is scrolled.\n *\n * The balloon panel can be used to display contextual, non-blocking UI like forms, toolbars and\n * the like in its {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#content} view\n * collection.\n *\n * There is a number of {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}\n * that the balloon can use, automatically switching from one to another when the viewport space becomes\n * scarce to keep the balloon visible to the user as long as it is possible. The balloon will also\n * accept any custom position set provided by the user compatible with the\n * {@link module:utils/dom/position~Options options}.\n *\n * ```ts\n * const panel = new BalloonPanelView( locale );\n * const childView = new ChildView();\n * const positions = BalloonPanelView.defaultPositions;\n *\n * panel.render();\n *\n * // Add a child view to the panel's content collection.\n * panel.content.add( childView );\n *\n * // Start pinning the panel to an element with the \"target\" id DOM.\n * // The balloon will remain pinned until unpin() is called.\n * panel.pin( {\n * \ttarget: document.querySelector( '#target' ),\n * \tpositions: [\n * \t\tpositions.northArrowSouth,\n * \t\tpositions.southArrowNorth\n * \t]\n * } );\n * ```\n */ class BalloonPanelView extends View {\n    /**\n\t * A collection of the child views that creates the balloon panel contents.\n\t */ content;\n    /**\n\t * A callback that starts pinning the panel when {@link #isVisible} gets\n\t * `true`. Used by {@link #pin}.\n\t *\n\t * @private\n\t */ _pinWhenIsVisibleCallback;\n    /**\n\t * An instance of resize observer used to detect if target element is still visible.\n\t */ _resizeObserver;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('top', 0);\n        this.set('left', 0);\n        this.set('position', 'arrow_nw');\n        this.set('isVisible', false);\n        this.set('withArrow', true);\n        this.set('class', undefined);\n        this._pinWhenIsVisibleCallback = null;\n        this._resizeObserver = null;\n        this.content = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-balloon-panel',\n                    bind.to('position', (value)=>`ck-balloon-panel_${value}`),\n                    bind.if('isVisible', 'ck-balloon-panel_visible'),\n                    bind.if('withArrow', 'ck-balloon-panel_with-arrow'),\n                    bind.to('class')\n                ],\n                style: {\n                    top: bind.to('top', toPx$5),\n                    left: bind.to('left', toPx$5)\n                }\n            },\n            children: this.content\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this.hide();\n        super.destroy();\n    }\n    /**\n\t * Shows the panel.\n\t *\n\t * See {@link #isVisible}.\n\t */ show() {\n        this.isVisible = true;\n    }\n    /**\n\t * Hides the panel.\n\t *\n\t * See {@link #isVisible}.\n\t */ hide() {\n        this.isVisible = false;\n    }\n    /**\n\t * Attaches the panel to a specified {@link module:utils/dom/position~Options#target} with a\n\t * smart positioning heuristics that chooses from available positions to make sure the panel\n\t * is visible to the user i.e. within the limits of the viewport.\n\t *\n\t * This method accepts configuration {@link module:utils/dom/position~Options options}\n\t * to set the `target`, optional `limiter` and `positions` the balloon should choose from.\n\t *\n\t * ```ts\n\t * const panel = new BalloonPanelView( locale );\n\t * const positions = BalloonPanelView.defaultPositions;\n\t *\n\t * panel.render();\n\t *\n\t * // Attach the panel to an element with the \"target\" id DOM.\n\t * panel.attachTo( {\n\t * \ttarget: document.querySelector( '#target' ),\n\t * \tpositions: [\n\t * \t\tpositions.northArrowSouth,\n\t * \t\tpositions.southArrowNorth\n\t * \t]\n\t * } );\n\t * ```\n\t *\n\t * **Note**: Attaching the panel will also automatically {@link #show} it.\n\t *\n\t * **Note**: An attached panel will not follow its target when the window is scrolled or resized.\n\t * See the {@link #pin} method for a more permanent positioning strategy.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t * @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t * provided in the options is invisible (e.g. element detached from DOM).\n\t */ attachTo(options) {\n        const target = getDomElement(options.target);\n        if (target && !isVisible(target)) {\n            return false;\n        }\n        this.show();\n        const defaultPositions = BalloonPanelView.defaultPositions;\n        const positionOptions = Object.assign({}, {\n            element: this.element,\n            positions: [\n                defaultPositions.southArrowNorth,\n                defaultPositions.southArrowNorthMiddleWest,\n                defaultPositions.southArrowNorthMiddleEast,\n                defaultPositions.southArrowNorthWest,\n                defaultPositions.southArrowNorthEast,\n                defaultPositions.northArrowSouth,\n                defaultPositions.northArrowSouthMiddleWest,\n                defaultPositions.northArrowSouthMiddleEast,\n                defaultPositions.northArrowSouthWest,\n                defaultPositions.northArrowSouthEast,\n                defaultPositions.viewportStickyNorth\n            ],\n            limiter: global.document.body,\n            fitInViewport: true\n        }, options);\n        const optimalPosition = BalloonPanelView._getOptimalPosition(positionOptions) || POSITION_OFF_SCREEN;\n        // Usually browsers make some problems with super accurate values like 104.345px\n        // so it is better to use int values.\n        const left = parseInt(optimalPosition.left);\n        const top = parseInt(optimalPosition.top);\n        const position = optimalPosition.name;\n        const config = optimalPosition.config || {};\n        const { withArrow = true } = config;\n        this.top = top;\n        this.left = left;\n        this.position = position;\n        this.withArrow = withArrow;\n        return true;\n    }\n    /**\n\t * Works the same way as the {@link #attachTo} method except that the position of the panel is\n\t * continuously updated when:\n\t *\n\t * * any ancestor of the {@link module:utils/dom/position~Options#target}\n\t * or {@link module:utils/dom/position~Options#limiter} is scrolled,\n\t * * the browser window gets resized or scrolled.\n\t *\n\t * Thanks to that, the panel always sticks to the {@link module:utils/dom/position~Options#target}\n\t * and is immune to the changing environment.\n\t *\n\t * ```ts\n\t * const panel = new BalloonPanelView( locale );\n\t * const positions = BalloonPanelView.defaultPositions;\n\t *\n\t * panel.render();\n\t *\n\t * // Pin the panel to an element with the \"target\" id DOM.\n\t * panel.pin( {\n\t * \ttarget: document.querySelector( '#target' ),\n\t * \tpositions: [\n\t * \t\tpositions.northArrowSouth,\n\t * \t\tpositions.southArrowNorth\n\t * \t]\n\t * } );\n\t * ```\n\t *\n\t * To leave the pinned state, use the {@link #unpin} method.\n\t *\n\t * **Note**: Pinning the panel will also automatically {@link #show} it.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t */ pin(options) {\n        this.unpin();\n        if (!this._startPinning(options)) {\n            return;\n        }\n        this._pinWhenIsVisibleCallback = ()=>{\n            if (this.isVisible) {\n                this._startPinning(options);\n            } else {\n                this._stopPinning();\n            }\n        };\n        // Control the state of the listeners depending on whether the panel is visible\n        // or not.\n        // TODO: Use on() (https://github.com/ckeditor/ckeditor5-utils/issues/144).\n        this.listenTo(this, 'change:isVisible', this._pinWhenIsVisibleCallback);\n    }\n    /**\n\t * Stops pinning the panel, as set up by {@link #pin}.\n\t */ unpin() {\n        if (this._pinWhenIsVisibleCallback) {\n            // Deactivate listeners attached by pin().\n            this._stopPinning();\n            // Deactivate the panel pin() control logic.\n            // TODO: Use off() (https://github.com/ckeditor/ckeditor5-utils/issues/144).\n            this.stopListening(this, 'change:isVisible', this._pinWhenIsVisibleCallback);\n            this._pinWhenIsVisibleCallback = null;\n            this.hide();\n        }\n    }\n    /**\n\t * Starts managing the pinned state of the panel. See {@link #pin}.\n\t *\n\t * @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t * @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t * provided in the options is invisible (e.g. element detached from DOM).\n\t */ _startPinning(options) {\n        if (!this.attachTo(options)) {\n            return false;\n        }\n        let targetElement = getDomElement(options.target);\n        const limiterElement = options.limiter ? getDomElement(options.limiter) : global.document.body;\n        // Then we need to listen on scroll event of eny element in the document.\n        this.listenTo(global.document, 'scroll', (evt, domEvt)=>{\n            const scrollTarget = domEvt.target;\n            // The position needs to be updated if the positioning target is within the scrolled element.\n            const isWithinScrollTarget = targetElement && scrollTarget.contains(targetElement);\n            // The position needs to be updated if the positioning limiter is within the scrolled element.\n            const isLimiterWithinScrollTarget = limiterElement && scrollTarget.contains(limiterElement);\n            // The positioning target and/or limiter can be a Rect, object etc..\n            // There's no way to optimize the listener then.\n            if (isWithinScrollTarget || isLimiterWithinScrollTarget || !targetElement || !limiterElement) {\n                this.attachTo(options);\n            }\n        }, {\n            useCapture: true\n        });\n        // We need to listen on window resize event and update position.\n        this.listenTo(global.window, 'resize', ()=>{\n            this.attachTo(options);\n        });\n        // Hide the panel if the target element is no longer visible.\n        if (!this._resizeObserver) {\n            // If the target element is a text node, we need to check the parent element.\n            // It's because `ResizeObserver` accept only elements, not text nodes.\n            if (targetElement && isText(targetElement)) {\n                targetElement = targetElement.parentElement;\n            }\n            if (targetElement) {\n                const checkVisibility = ()=>{\n                    // If the target element is no longer visible, hide the panel.\n                    if (!isVisible(targetElement)) {\n                        this.unpin();\n                    }\n                };\n                // Element is being resized to 0x0 after it's parent became hidden,\n                // so we need to check size in order to determine if it's visible or not.\n                this._resizeObserver = new ResizeObserver(targetElement, checkVisibility);\n            }\n        }\n        return true;\n    }\n    /**\n\t * Stops managing the pinned state of the panel. See {@link #pin}.\n\t */ _stopPinning() {\n        this.stopListening(global.document, 'scroll');\n        this.stopListening(global.window, 'resize');\n        if (this._resizeObserver) {\n            this._resizeObserver.destroy();\n            this._resizeObserver = null;\n        }\n    }\n    /**\n\t * Returns available {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n\t * {@link module:utils/dom/position~PositioningFunction positioning functions} adjusted by the specific offsets.\n\t *\n\t * @internal\n\t * @param options Options to generate positions. If not specified, this helper will simply return\n\t * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t * @param options.sideOffset A custom side offset (in pixels) of each position. If\n\t * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowSideOffset the default value}\n\t * will be used.\n\t * @param options.heightOffset A custom height offset (in pixels) of each position. If\n\t * not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowHeightOffset the default value}\n\t * will be used.\n\t * @param options.stickyVerticalOffset A custom offset (in pixels) of the `viewportStickyNorth` positioning function.\n\t * If not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.stickyVerticalOffset the default value}\n\t * will be used.\n\t * @param options.config Additional configuration of the balloon balloon panel view.\n\t * Currently only {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#withArrow} is supported. Learn more\n\t * about {@link module:utils/dom/position~PositioningFunction positioning functions}.\n\t */ static generatePositions(options = {}) {\n        const { sideOffset = BalloonPanelView.arrowSideOffset, heightOffset = BalloonPanelView.arrowHeightOffset, stickyVerticalOffset = BalloonPanelView.stickyVerticalOffset, config } = options;\n        return {\n            // ------- North west\n            northWestArrowSouthWest: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left - sideOffset,\n                    name: 'arrow_sw',\n                    ...config && {\n                        config\n                    }\n                }),\n            northWestArrowSouthMiddleWest: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left - balloonRect.width * .25 - sideOffset,\n                    name: 'arrow_smw',\n                    ...config && {\n                        config\n                    }\n                }),\n            northWestArrowSouth: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left - balloonRect.width / 2,\n                    name: 'arrow_s',\n                    ...config && {\n                        config\n                    }\n                }),\n            northWestArrowSouthMiddleEast: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left - balloonRect.width * .75 + sideOffset,\n                    name: 'arrow_sme',\n                    ...config && {\n                        config\n                    }\n                }),\n            northWestArrowSouthEast: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left - balloonRect.width + sideOffset,\n                    name: 'arrow_se',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- North\n            northArrowSouthWest: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left + targetRect.width / 2 - sideOffset,\n                    name: 'arrow_sw',\n                    ...config && {\n                        config\n                    }\n                }),\n            northArrowSouthMiddleWest: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width * .25 - sideOffset,\n                    name: 'arrow_smw',\n                    ...config && {\n                        config\n                    }\n                }),\n            northArrowSouth: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n                    name: 'arrow_s',\n                    ...config && {\n                        config\n                    }\n                }),\n            northArrowSouthMiddleEast: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width * .75 + sideOffset,\n                    name: 'arrow_sme',\n                    ...config && {\n                        config\n                    }\n                }),\n            northArrowSouthEast: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n                    name: 'arrow_se',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- North east\n            northEastArrowSouthWest: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.right - sideOffset,\n                    name: 'arrow_sw',\n                    ...config && {\n                        config\n                    }\n                }),\n            northEastArrowSouthMiddleWest: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.right - balloonRect.width * .25 - sideOffset,\n                    name: 'arrow_smw',\n                    ...config && {\n                        config\n                    }\n                }),\n            northEastArrowSouth: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.right - balloonRect.width / 2,\n                    name: 'arrow_s',\n                    ...config && {\n                        config\n                    }\n                }),\n            northEastArrowSouthMiddleEast: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.right - balloonRect.width * .75 + sideOffset,\n                    name: 'arrow_sme',\n                    ...config && {\n                        config\n                    }\n                }),\n            northEastArrowSouthEast: (targetRect, balloonRect)=>({\n                    top: getNorthTop(targetRect, balloonRect),\n                    left: targetRect.right - balloonRect.width + sideOffset,\n                    name: 'arrow_se',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- South west\n            southWestArrowNorthWest: (targetRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left - sideOffset,\n                    name: 'arrow_nw',\n                    ...config && {\n                        config\n                    }\n                }),\n            southWestArrowNorthMiddleWest: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left - balloonRect.width * .25 - sideOffset,\n                    name: 'arrow_nmw',\n                    ...config && {\n                        config\n                    }\n                }),\n            southWestArrowNorth: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left - balloonRect.width / 2,\n                    name: 'arrow_n',\n                    ...config && {\n                        config\n                    }\n                }),\n            southWestArrowNorthMiddleEast: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left - balloonRect.width * .75 + sideOffset,\n                    name: 'arrow_nme',\n                    ...config && {\n                        config\n                    }\n                }),\n            southWestArrowNorthEast: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left - balloonRect.width + sideOffset,\n                    name: 'arrow_ne',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- South\n            southArrowNorthWest: (targetRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left + targetRect.width / 2 - sideOffset,\n                    name: 'arrow_nw',\n                    ...config && {\n                        config\n                    }\n                }),\n            southArrowNorthMiddleWest: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width * 0.25 - sideOffset,\n                    name: 'arrow_nmw',\n                    ...config && {\n                        config\n                    }\n                }),\n            southArrowNorth: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n                    name: 'arrow_n',\n                    ...config && {\n                        config\n                    }\n                }),\n            southArrowNorthMiddleEast: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width * 0.75 + sideOffset,\n                    name: 'arrow_nme',\n                    ...config && {\n                        config\n                    }\n                }),\n            southArrowNorthEast: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n                    name: 'arrow_ne',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- South east\n            southEastArrowNorthWest: (targetRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.right - sideOffset,\n                    name: 'arrow_nw',\n                    ...config && {\n                        config\n                    }\n                }),\n            southEastArrowNorthMiddleWest: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.right - balloonRect.width * .25 - sideOffset,\n                    name: 'arrow_nmw',\n                    ...config && {\n                        config\n                    }\n                }),\n            southEastArrowNorth: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.right - balloonRect.width / 2,\n                    name: 'arrow_n',\n                    ...config && {\n                        config\n                    }\n                }),\n            southEastArrowNorthMiddleEast: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.right - balloonRect.width * .75 + sideOffset,\n                    name: 'arrow_nme',\n                    ...config && {\n                        config\n                    }\n                }),\n            southEastArrowNorthEast: (targetRect, balloonRect)=>({\n                    top: getSouthTop(targetRect),\n                    left: targetRect.right - balloonRect.width + sideOffset,\n                    name: 'arrow_ne',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- West\n            westArrowEast: (targetRect, balloonRect)=>({\n                    top: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n                    left: targetRect.left - balloonRect.width - heightOffset,\n                    name: 'arrow_e',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- East\n            eastArrowWest: (targetRect, balloonRect)=>({\n                    top: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n                    left: targetRect.right + heightOffset,\n                    name: 'arrow_w',\n                    ...config && {\n                        config\n                    }\n                }),\n            // ------- Sticky\n            viewportStickyNorth: (targetRect, balloonRect, viewportRect, limiterRect)=>{\n                const boundaryRect = limiterRect || viewportRect;\n                if (!targetRect.getIntersection(boundaryRect)) {\n                    return null;\n                }\n                // Engage when the target top and bottom edges are close or off the boundary.\n                // By close, it means there's not enough space for the balloon arrow (offset).\n                if (boundaryRect.height - targetRect.height > stickyVerticalOffset) {\n                    return null;\n                }\n                return {\n                    top: boundaryRect.top + stickyVerticalOffset,\n                    left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n                    name: 'arrowless',\n                    config: {\n                        withArrow: false,\n                        ...config\n                    }\n                };\n            }\n        };\n        /**\n\t\t * Returns the top coordinate for positions starting with `north*`.\n\t\t *\n\t\t * @param targetRect A rect of the target.\n\t\t * @param balloonRect A rect of the balloon.\n\t\t */ function getNorthTop(targetRect, balloonRect) {\n            return targetRect.top - balloonRect.height - heightOffset;\n        }\n        /**\n\t\t * Returns the top coordinate for positions starting with `south*`.\n\t\t *\n\t\t * @param targetRect A rect of the target.\n\t\t */ function getSouthTop(targetRect) {\n            return targetRect.bottom + heightOffset;\n        }\n    }\n    /**\n\t * A side offset of the arrow tip from the edge of the balloon. Controlled by CSS.\n\t *\n\t * ```\n\t *\t\t ┌───────────────────────┐\n\t *\t\t │                       │\n\t *\t\t │         Balloon       │\n\t *\t\t │         Content       │\n\t *\t\t │                       │\n\t *\t\t └──+    +───────────────┘\n\t *\t\t |   \\  /\n\t *\t\t |    \\/\n\t *\t\t>┼─────┼< ─────────────────────── side offset\n\t *\n\t * ```\n\t *\n\t * @default 25\n\t */ static arrowSideOffset = 25;\n    /**\n\t * A height offset of the arrow from the edge of the balloon. Controlled by CSS.\n\t *\n\t * ```\n\t *\t\t ┌───────────────────────┐\n\t *\t\t │                       │\n\t *\t\t │         Balloon       │\n\t *\t\t │         Content       │      ╱-- arrow height offset\n\t *\t\t │                       │      V\n\t *\t\t └──+    +───────────────┘ --- ─┼───────\n\t *\t\t     \\  /                       │\n\t *\t\t      \\/                        │\n\t *\t\t────────────────────────────────┼───────\n\t *\t\t                                ^\n\t *\n\t *\n\t *\t\t>┼────┼<  arrow height offset\n\t *\t\t │    │\n\t *\t\t │    ┌────────────────────────┐\n\t *\t\t │    │                        │\n\t *\t\t │   ╱                         │\n\t *\t\t │ ╱            Balloon        │\n\t *\t\t │ ╲            Content        │\n\t *\t\t │   ╲                         │\n\t *\t\t │    │                        │\n\t *\t\t │    └────────────────────────┘\n\t * ```\n\t *\n\t * @default 10\n\t*/ static arrowHeightOffset = 10;\n    /**\n\t * A vertical offset of the balloon panel from the edge of the viewport if sticky.\n\t * It helps in accessing toolbar buttons underneath the balloon panel.\n\t *\n\t * ```\n\t *\t\t  ┌───────────────────────────────────────────────────┐\n\t *\t\t  │                      Target                       │\n\t *\t\t  │                                                   │\n\t *\t\t  │                            /── vertical offset    │\n\t *\t\t┌─────────────────────────────V─────────────────────────┐\n\t *\t\t│ Toolbar            ┌─────────────┐                    │\n\t *\t\t├────────────────────│   Balloon   │────────────────────┤\n\t *\t\t│ │                  └─────────────┘                  │ │\n\t *\t\t│ │                                                   │ │\n\t *\t\t│ │                                                   │ │\n\t *\t\t│ │                                                   │ │\n\t *\t\t│ └───────────────────────────────────────────────────┘ │\n\t *\t\t│                        Viewport                       │\n\t *\t\t└───────────────────────────────────────────────────────┘\n\t * ```\n\t *\n\t * @default 20\n\t */ static stickyVerticalOffset = 20;\n    /**\n\t * Function used to calculate the optimal position for the balloon.\n\t */ static _getOptimalPosition = getOptimalPosition;\n    /**\n\t * A default set of positioning functions used by the balloon panel view\n\t * when attaching using the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo} method.\n\t *\n\t * The available positioning functions are as follows:\n\t *\n\t * **North west**\n\t *\n\t * * `northWestArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t V\n\t *\t\t [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t    V\n\t *\t\t    [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t         V\n\t *\t\t         [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t             V\n\t *\t\t             [ Target ]\n\t * ```\n\t *\n\t * * `northWestArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t                 V\n\t *\t\t                 [ Target ]\n\t * ```\n\t *\n\t * **North**\n\t *\n\t * * `northArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t    +-----------------+\n\t *\t\t    |     Balloon     |\n\t *\t\t    +-----------------+\n\t *\t\t     V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t +-----------------+\n\t *\t\t |     Balloon     |\n\t *\t\t +-----------------+\n\t *\t\t     V\n\t *\t\t[ Target ]\n\t * ```\n\t * * `northArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t         V\n\t *\t\t    [ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t             V\n\t *\t\t        [ Target ]\n\t * ```\n\t *\n\t * * `northArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t                V\n\t *\t\t           [ Target ]\n\t * ```\n\t *\n\t * **North east**\n\t *\n\t * * `northEastArrowSouthWest`\n\t *\n\t * ```\n\t *\t\t        +-----------------+\n\t *\t\t        |     Balloon     |\n\t *\t\t        +-----------------+\n\t *\t\t         V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthMiddleWest`\n\t *\n\t * ```\n\t *\t\t     +-----------------+\n\t *\t\t     |     Balloon     |\n\t *\t\t     +-----------------+\n\t *\t\t         V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouth`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t         V\n\t *\t\t[ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthMiddleEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t             V\n\t *\t\t    [ Target ]\n\t * ```\n\t *\n\t * * `northEastArrowSouthEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t *\t\t                 V\n\t *\t\t        [ Target ]\n\t * ```\n\t *\n\t * **South**\n\t *\n\t * * `southArrowNorthWest`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t     ^\n\t *\t\t    +-----------------+\n\t *\t\t    |     Balloon     |\n\t *\t\t    +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t   [ Target ]\n\t *\t\t        ^\n\t *\t\t    +-----------------+\n\t *\t\t    |     Balloon     |\n\t *\t\t    +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorth`\n\t *\n\t * ```\n\t *\t\t    [ Target ]\n\t *\t\t         ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t            [ Target ]\n\t *\t\t                 ^\n\t *\t\t   +-----------------+\n\t *\t\t   |     Balloon     |\n\t *\t\t   +-----------------+\n\t * ```\n\t *\n\t * * `southArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t            [ Target ]\n\t *\t\t                 ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **South west**\n\t *\n\t * * `southWestArrowNorthWest`\n\t *\n\t *\n\t * ```\n\t *\t\t [ Target ]\n\t *\t\t ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t     [ Target ]\n\t *\t\t     ^\n\t *\t\t +-----------------+\n\t *\t\t |     Balloon     |\n\t *\t\t +-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorth`\n\t *\n\t * ```\n\t *\t\t         [ Target ]\n\t *\t\t         ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t              [ Target ]\n\t *\t\t              ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southWestArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t                 [ Target ]\n\t *\t\t                 ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **South east**\n\t *\n\t * * `southEastArrowNorthWest`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t         ^\n\t *\t\t        +-----------------+\n\t *\t\t        |     Balloon     |\n\t *\t\t        +-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthMiddleWest`\n\t *\n\t * ```\n\t *\t\t   [ Target ]\n\t *\t\t            ^\n\t *\t\t        +-----------------+\n\t *\t\t        |     Balloon     |\n\t *\t\t        +-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorth`\n\t *\n\t * ```\n\t *\t\t[ Target ]\n\t *\t\t         ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthMiddleEast`\n\t *\n\t * ```\n\t *\t\t     [ Target ]\n\t *\t\t              ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * * `southEastArrowNorthEast`\n\t *\n\t * ```\n\t *\t\t        [ Target ]\n\t *\t\t                 ^\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **West**\n\t *\n\t * * `westArrowEast`\n\t *\n\t * ```\n\t *\t\t+-----------------+\n\t *\t\t|     Balloon     |>[ Target ]\n\t *\t\t+-----------------+\n\t * ```\n\t *\n\t * **East**\n\t *\n\t * * `eastArrowWest`\n\t *\n\t * ```\n\t *\t\t           +-----------------+\n\t *\t\t[ Target ]<|     Balloon     |\n\t *\t\t           +-----------------+\n\t * ```\n\t *\n\t * **Sticky**\n\t *\n\t * * `viewportStickyNorth`\n\t *\n\t * ```\n\t *\t\t    +---------------------------+\n\t *\t\t    |        [ Target ]         |\n\t *\t\t    |                           |\n\t *\t\t+-----------------------------------+\n\t *\t\t|   |    +-----------------+    |   |\n\t *\t\t|   |    |     Balloon     |    |   |\n\t *\t\t|   |    +-----------------+    |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   |                           |   |\n\t *\t\t|   +---------------------------+   |\n\t *\t\t|             Viewport              |\n\t *\t\t+-----------------------------------+\n\t * ```\n\t *\n\t * See {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo}.\n\t *\n\t * Positioning functions must be compatible with {@link module:utils/dom/position~DomPoint}.\n\t *\n\t * Default positioning functions with customized offsets can be generated using\n\t * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.generatePositions}.\n\t *\n\t * The name that the position function returns will be reflected in the balloon panel's class that\n\t * controls the placement of the \"arrow\". See {@link #position} to learn more.\n\t */ static defaultPositions = /* #__PURE__ */ BalloonPanelView.generatePositions();\n}\n/**\n * Returns the DOM element for given object or null, if there is none,\n * e.g. when the passed object is a Rect instance or so.\n */ function getDomElement(object) {\n    if (isElement(object)) {\n        return object;\n    }\n    if (isRange(object)) {\n        return object.commonAncestorContainer;\n    }\n    if (typeof object == 'function') {\n        return getDomElement(object());\n    }\n    return null;\n}\n\n/**\n * Represents the view for the dropdown menu panel.\n */ class DropdownMenuNestedMenuPanelView extends BalloonPanelView {\n    /**\n\t * Creates an instance of the menu panel view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set({\n            isVisible: false,\n            position: 'se',\n            class: null,\n            top: 0,\n            left: 0\n        });\n        this.extendTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck-reset',\n                    'ck-dropdown-menu__nested-menu__panel'\n                ],\n                tabindex: '-1'\n            },\n            on: {\n                // Drag and drop in the panel should not break the selection in the editor.\n                // https://github.com/ckeditor/ckeditor5-ui/issues/228\n                selectstart: bind.to((evt)=>{\n                    if (evt.target.tagName.toLocaleLowerCase() === 'input') {\n                        return;\n                    }\n                    evt.preventDefault();\n                })\n            }\n        });\n    }\n    /**\n\t * Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t *\n\t * @param direction The direction to focus. Default is `1`.\n\t */ focus(direction = 1) {\n        const { content } = this;\n        if (content.length) {\n            if (direction === 1) {\n                content.first.focus();\n            } else {\n                content.last.focus();\n            }\n        }\n    }\n}\n\n/**\n * Represents a nested menu view.\n */ class DropdownMenuNestedMenuView extends View {\n    /**\n\t * An array of delegated events for the dropdown menu definition controller.\n\t * These events are delegated to the dropdown menu element.\n\t */ // Due to some spaghetti code we need to delegate `change:isOpen`.\n    static DELEGATED_EVENTS = [\n        'mouseenter',\n        'execute',\n        'change:isOpen'\n    ];\n    id;\n    /**\n\t * Button of the menu view.\n\t */ buttonView;\n    /**\n\t * Panel of the menu. It hosts children of the menu.\n\t */ panelView;\n    /**\n\t * List of nested menu entries.\n\t */ listView;\n    /**\n\t * Tracks information about the DOM focus in the menu.\n\t */ focusTracker;\n    /**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the menu.\n\t */ keystrokes;\n    _bodyCollection;\n    /**\n\t * Creates a new instance of the DropdownMenuView class.\n\t *\n\t * @param locale\n\t * @param bodyCollection\n\t * @param id\n\t * @param label The label for the dropdown menu button.\n\t * @param parentMenuView The parent dropdown menu view, if any.\n\t */ constructor(locale, bodyCollection, id, label, parentMenuView){\n        super(locale);\n        this._bodyCollection = bodyCollection;\n        this.id = id;\n        this.set({\n            isOpen: false,\n            isEnabled: true,\n            panelPosition: 'w',\n            class: undefined,\n            parentMenuView: null\n        });\n        this.keystrokes = new KeystrokeHandler();\n        this.focusTracker = new FocusTracker();\n        this.buttonView = new DropdownMenuButtonView(locale);\n        this.buttonView.delegate('mouseenter').to(this);\n        this.buttonView.bind('isOn', 'isEnabled').to(this, 'isOpen', 'isEnabled');\n        this.buttonView.label = label;\n        this.panelView = new DropdownMenuNestedMenuPanelView(locale);\n        this.panelView.isVisible = true;\n        this.listView = new DropdownMenuListView(locale);\n        this.listView.bind('ariaLabel').to(this.buttonView, 'label');\n        this.panelView.content.add(this.listView);\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-dropdown-menu-list__nested-menu',\n                    bind.to('class'),\n                    bind.if('isEnabled', 'ck-disabled', (value)=>!value)\n                ],\n                role: 'presentation'\n            },\n            children: [\n                this.buttonView\n            ]\n        });\n        this.parentMenuView = parentMenuView;\n        if (this.parentMenuView) {\n            this._handleParentMenuView();\n        }\n        this._attachBehaviors();\n    }\n    /**\n\t * An array of positioning functions used to determine the position of the dropdown menu panel.\n\t * The order of the functions in the array determines the priority of the positions to be tried.\n\t * The first function that returns a valid position will be used.\n\t *\n\t * @returns {Array<PositioningFunction>} An array of positioning functions.\n\t * @internal\n\t */ get _panelPositions() {\n        const { westSouth, eastSouth, westNorth, eastNorth } = DropdownMenuPanelPositioningFunctions;\n        if (this.locale.uiLanguageDirection === 'ltr') {\n            return [\n                eastSouth,\n                eastNorth,\n                westSouth,\n                westNorth\n            ];\n        } else {\n            return [\n                westSouth,\n                westNorth,\n                eastSouth,\n                eastNorth\n            ];\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.panelView.render();\n        this.focusTracker.add(this.buttonView.element);\n        this.focusTracker.add(this.panelView.element);\n        // Listen for keystrokes coming from within #element.\n        this.keystrokes.listenTo(this.element);\n        this._mountPanelOnOpen();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this._removePanelFromBody();\n        this.panelView.destroy();\n        super.destroy();\n    }\n    /**\n\t * @inheritDoc\n\t */ focus() {\n        this.buttonView.focus();\n    }\n    _handleParentMenuView() {\n        // Propagate events from this component to parent-menu.\n        this.delegate(...DropdownMenuNestedMenuView.DELEGATED_EVENTS).to(this.parentMenuView);\n        // Close this menu if its parent closes.\n        DropdownMenuBehaviors.closeOnParentClose(this, this.parentMenuView);\n    }\n    /**\n\t * Attach all keyboard behaviors for the menu view.\n\t */ _attachBehaviors() {\n        DropdownMenuBehaviors.openOnButtonClick(this);\n        DropdownMenuBehaviors.openAndFocusOnEnterKeyPress(this);\n        DropdownMenuBehaviors.openOnArrowRightKey(this);\n        DropdownMenuBehaviors.closeOnEscKey(this);\n        DropdownMenuBehaviors.closeOnArrowLeftKey(this);\n    }\n    /**\n\t * Mounts the portal view in the body when the menu is open and removes it when the menu is closed.\n\t * Binds keystrokes to the portal view when the menu is open.\n\t */ _mountPanelOnOpen() {\n        const { panelView } = this;\n        this.on('change:isOpen', (evt, name, isOpen)=>{\n            // Ensure that the event was triggered by this instance.\n            // TODO: Remove checking `evt.source` if `change:isOpen` is no longer delegated.\n            if (evt.source !== this) {\n                return;\n            }\n            // Removes the panel view from the body when the menu is closed.\n            if (!isOpen && this._bodyCollection.has(panelView)) {\n                this._removePanelFromBody();\n                return;\n            }\n            // Adds the panel view to the body when the menu is open.\n            if (isOpen && !this._bodyCollection.has(panelView)) {\n                this._addPanelToBody();\n            }\n        });\n    }\n    /**\n\t * Removes the panel view from the editor's body and removes it from the focus tracker.\n\t */ _removePanelFromBody() {\n        const { panelView, keystrokes } = this;\n        if (this._bodyCollection.has(panelView)) {\n            this._bodyCollection.remove(panelView);\n            keystrokes.stopListening(panelView.element);\n        }\n    }\n    /**\n\t * Adds the panel view to the editor's body and sets up event listeners.\n\t */ _addPanelToBody() {\n        const { panelView, buttonView, keystrokes } = this;\n        if (!this._bodyCollection.has(panelView)) {\n            this._bodyCollection.add(panelView);\n            keystrokes.listenTo(panelView.element);\n            panelView.pin({\n                positions: this._panelPositions,\n                limiter: global.document.body,\n                element: panelView.element,\n                target: buttonView.element,\n                fitInViewport: true\n            });\n        }\n    }\n}\n\n/**\n * Creates and manages a multi-level menu UI structure, suitable to be used inside dropdown components.\n *\n * This class creates a menu structure based on {@link module:ui/dropdown/menu/utils~DropdownMenuDefinition declarative definition}\n * passed in the constructor.\n *\n * Below is an example of a simple definition, that describes a menu with two sub-menus (Menu 1, Menu 2) and four buttons in total (Item A,\n * Item B, Item C, Item D):\n *\n * ```js\n * [\n * \t{\n * \t\tid: 'menu_1',\n * \t\tmenu: 'Menu 1',\n * \t\tchildren: [\n * \t\t\t{ id: 'menu_1_a', label: 'Item A' },\n * \t\t\t{ id: 'menu_1_b', label: 'Item B' }\n * \t\t]\n * \t},\n * \t{\n * \t\tid: 'menu_2',\n * \t\tmenu: 'Menu 2',\n * \t\tchildren: [\n * \t\t\t{ id: 'menu_2_c', label: 'Item C' },\n * \t\t]\n * \t},\n * \t{ id: 'item_d', label: 'Item D' }\n * ]\n * ```\n *\n * The menu is build using multiple view classes. The most important are:\n *\n * * {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView `DropdownMenuNestedMenuView`} - \"menu\" - provides\n * a panel with a nested menu, and a button which opens the panel,\n * * {@link module:ui/dropdown/menu/dropdownmenulistitembuttonview~DropdownMenuListItemButtonView `DropdownMenuListItemButtonView`} -\n * \"button\" or \"leaf button\" (as opposed to buttons provided by `DropdownMenuNestedMenuView`) - should trigger some action when pressed.\n *\n * Instances of these two classes are created based on the data provided in definitions. They are assigned proper IDs and labels.\n * Other view classes build a proper DOM structure around menus and buttons.\n *\n * The `DropdownMenuNestedMenuView` instances provides panels, which may include further menus or buttons. These panels are added to\n * a `BodyCollection` view, which means they are appended outside the DOM editor and UI structure.\n *\n * When \"leaf button\" is pressed, it fires `execute` event which is delegated to `DropdownMenuRootListView` as `menu:execute` event. You\n * can listen to this event to perform an action:\n *\n * ```js\n * rootListView.on( 'menu:execute', evt => {\n * \tconsole.log( evt.source.id ); // E.g. will print 'menu_1_a' when 'Item A' is pressed.\n * } );\n * ```\n *\n * All menus and \"leaf\" buttons created from the definition can be easily accessed through {@link ~DropdownMenuRootListView#menus `menus`}\n * and {@link ~DropdownMenuRootListView#buttons `buttons`} properties.\n *\n * For performance reasons, the whole menu structure is created only when `DropdownMenuRootListView` is rendered for the first time.\n *\n * It is recommended to use this class together with {@link module:ui/dropdown/utils~addMenuToDropdown `addMenuToDropdown()` helper}.\n */ class DropdownMenuRootListView extends DropdownMenuListView {\n    /**\n\t * The definitions object used to create the whole menu structure.\n\t */ _definition;\n    /**\n\t * Cached array of all menus in the dropdown menu (including nested menus).\n\t */ _cachedMenus = [];\n    /**\n\t * Cached array of all buttons in the dropdown menu (including buttons in nested menus).\n\t */ _cachedButtons = [];\n    /**\n\t * Editor body collection into which nested menus panels will be appended.\n\t */ _bodyCollection;\n    /**\n\t * Creates an instance of the DropdownMenuRootListView class.\n\t *\n\t * @param locale\n\t * @param bodyCollection\n\t * @param definition The definition object used to create the menu structure.\n\t */ constructor(locale, bodyCollection, definition){\n        super(locale);\n        this._bodyCollection = bodyCollection;\n        this._definition = definition;\n        this.set('menuPanelClass', undefined);\n    }\n    /**\n\t * Returns the array of all menus in the dropdown menu (including nested menus).\n\t */ get menus() {\n        return Array.from(this._cachedMenus.values());\n    }\n    /**\n\t * Returns the array of all buttons in the dropdown menu (including buttons in nested menus).\n\t *\n\t * Note, that this includes only \"leaf\" buttons, as specified in the definition passed in constructor. Buttons created as a part of\n\t * the nested menus, that open nested menus when hovered or pressed, are not included.\n\t */ get buttons() {\n        return Array.from(this._cachedButtons.values());\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        this._createStructure(this._definition, null);\n        super.render();\n        DropdownRootMenuBehaviors.toggleMenusAndFocusItemsOnHover(this);\n        DropdownRootMenuBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens(this);\n    }\n    /**\n\t * Closes all nested menus.\n\t */ closeMenus() {\n        this.menus.forEach((menu)=>{\n            menu.isOpen = false;\n        });\n    }\n    /**\n\t * Recursively creates the whole view tree structure for the dropdown menu, according to the passed `definitions`.\n\t *\n\t * @private\n\t */ _createStructure(definitions, parentMenuView) {\n        const items = [];\n        for (const def of definitions){\n            let createdView;\n            if ('menu' in def) {\n                createdView = new DropdownMenuNestedMenuView(this.locale, this._bodyCollection, def.id, def.menu, parentMenuView);\n                createdView.panelView.bind('class').to(this, 'menuPanelClass');\n                if (!parentMenuView) {\n                    createdView.delegate(...DropdownMenuNestedMenuView.DELEGATED_EVENTS).to(this, (name)=>`menu:${name}`);\n                }\n                this._cachedMenus.push(createdView);\n                this._createStructure(def.children, createdView);\n            } else {\n                createdView = new DropdownMenuListItemButtonView(this.locale, def.id, def.label);\n                if (!parentMenuView) {\n                    createdView.delegate('execute').to(this, 'menu:execute');\n                }\n                this._cachedButtons.push(createdView);\n            }\n            const listItemView = new DropdownMenuListItemView(this.locale, parentMenuView, createdView);\n            if (!parentMenuView) {\n                listItemView.delegate('mouseenter').to(this, 'menu:mouseenter');\n            }\n            items.push(listItemView);\n        }\n        const targetListView = parentMenuView ? parentMenuView.listView : this;\n        targetListView.items.addMany(items);\n    }\n}\n\n/**\n * The toolbar separator view class.\n */ class ToolbarSeparatorView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-toolbar__separator'\n                ]\n            }\n        });\n    }\n}\n\n/**\n * The toolbar line break view class.\n */ class ToolbarLineBreakView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-toolbar__line-break'\n                ]\n            }\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/bindings/preventdefault\n */ /**\n * A helper which executes a native `Event.preventDefault()` if the target of an event equals the\n * {@link module:ui/view~View#element element of the view}. It shortens the definition of a\n * {@link module:ui/view~View#template template}.\n *\n * ```ts\n * // In a class extending View.\n * import preventDefault from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';\n *\n * // ...\n *\n * this.setTemplate( {\n * \ttag: 'div',\n *\n * \ton: {\n * \t\t// Prevent the default mousedown action on this view.\n * \t\tmousedown: preventDefault( this )\n * \t}\n * } );\n * ```\n *\n * @param view View instance that defines the template.\n */ function preventDefault(view) {\n    return view.bindTemplate.to((evt)=>{\n        if (evt.target === view.element) {\n            evt.preventDefault();\n        }\n    });\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/toolbar/normalizetoolbarconfig\n */ /**\n * Normalizes the toolbar configuration (`config.toolbar`), which:\n *\n * * may be defined as an `Array`:\n *\n * ```\n * toolbar: [ 'heading', 'bold', 'italic', 'link', ... ]\n * ```\n *\n * * or an `Object`:\n *\n * ```\n * toolbar: {\n * \titems: [ 'heading', 'bold', 'italic', 'link', ... ],\n * \tremoveItems: [ 'bold' ],\n * \t...\n * }\n * ```\n *\n * * or may not be defined at all (`undefined`)\n *\n * and returns it in the object form.\n *\n * @param config The value of `config.toolbar`.\n * @returns A normalized toolbar config object.\n */ function normalizeToolbarConfig(config) {\n    if (Array.isArray(config)) {\n        return {\n            items: config,\n            removeItems: []\n        };\n    }\n    const predefinedConfigOptions = {\n        items: [],\n        removeItems: []\n    };\n    if (!config) {\n        return predefinedConfigOptions;\n    }\n    return {\n        ...predefinedConfigOptions,\n        ...config\n    };\n}\n\nconst NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({\n        alignLeft: icons.alignLeft,\n        bold: icons.bold,\n        importExport: icons.importExport,\n        paragraph: icons.paragraph,\n        plus: icons.plus,\n        text: icons.text,\n        threeVerticalDots: icons.threeVerticalDots,\n        pilcrow: icons.pilcrow,\n        dragIndicator: icons.dragIndicator\n    }))();\n/**\n * The toolbar view class.\n */ class ToolbarView extends View {\n    /**\n\t * A reference to the options object passed to the constructor.\n\t */ options;\n    /**\n\t * A collection of toolbar items (buttons, dropdowns, etc.).\n\t */ items;\n    /**\n\t * Tracks information about the DOM focus in the toolbar.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t * to handle keyboard navigation in the toolbar.\n\t */ keystrokes;\n    /**\n\t * A (child) view containing {@link #items toolbar items}.\n\t */ itemsView;\n    /**\n\t * A top–level collection aggregating building blocks of the toolbar.\n\t *\n\t *\t┌───────────────── ToolbarView ─────────────────┐\n\t *\t| ┌──────────────── #children ────────────────┐ |\n\t *\t| |   ┌──────────── #itemsView ───────────┐   | |\n\t *\t| |   | [ item1 ] [ item2 ] ... [ itemN ] |   | |\n\t *\t| |   └──────────────────────────────────-┘   | |\n\t *\t| └───────────────────────────────────────────┘ |\n\t *\t└───────────────────────────────────────────────┘\n\t *\n\t * By default, it contains the {@link #itemsView} but it can be extended with additional\n\t * UI elements when necessary.\n\t */ children;\n    /**\n\t * A collection of {@link #items} that take part in the focus cycling\n\t * (i.e. navigation using the keyboard). Usually, it contains a subset of {@link #items} with\n\t * some optional UI elements that also belong to the toolbar and should be focusable\n\t * by the user.\n\t */ focusables;\n    /**\n\t * Helps cycling over {@link #focusables focusable items} in the toolbar.\n\t */ _focusCycler;\n    /**\n\t * An instance of the active toolbar behavior that shapes its look and functionality.\n\t *\n\t * See {@link module:ui/toolbar/toolbarview~ToolbarBehavior} to learn more.\n\t */ _behavior;\n    /**\n\t * Creates an instance of the {@link module:ui/toolbar/toolbarview~ToolbarView} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param options Configuration options of the toolbar.\n\t */ constructor(locale, options){\n        super(locale);\n        const bind = this.bindTemplate;\n        const t = this.t;\n        this.options = options || {};\n        this.set('ariaLabel', t('Editor toolbar'));\n        this.set('maxWidth', 'auto');\n        this.items = this.createCollection();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this.set('class', undefined);\n        this.set('isCompact', false);\n        this.itemsView = new ItemsView(locale);\n        this.children = this.createCollection();\n        this.children.add(this.itemsView);\n        this.focusables = this.createCollection();\n        const isRtl = locale.uiLanguageDirection === 'rtl';\n        this._focusCycler = new FocusCycler({\n            focusables: this.focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate toolbar items backwards using the arrow[left,up] keys.\n                focusPrevious: [\n                    isRtl ? 'arrowright' : 'arrowleft',\n                    'arrowup'\n                ],\n                // Navigate toolbar items forwards using the arrow[right,down] keys.\n                focusNext: [\n                    isRtl ? 'arrowleft' : 'arrowright',\n                    'arrowdown'\n                ]\n            }\n        });\n        const classes = [\n            'ck',\n            'ck-toolbar',\n            bind.to('class'),\n            bind.if('isCompact', 'ck-toolbar_compact')\n        ];\n        if (this.options.shouldGroupWhenFull && this.options.isFloating) {\n            classes.push('ck-toolbar_floating');\n        }\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: classes,\n                role: 'toolbar',\n                'aria-label': bind.to('ariaLabel'),\n                style: {\n                    maxWidth: bind.to('maxWidth')\n                },\n                tabindex: -1\n            },\n            children: this.children,\n            on: {\n                // https://github.com/ckeditor/ckeditor5-ui/issues/206\n                mousedown: preventDefault(this)\n            }\n        });\n        this._behavior = this.options.shouldGroupWhenFull ? new DynamicGrouping(this) : new StaticLayout(this);\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.focusTracker.add(this.element);\n        // Children added before rendering should be known to the #focusTracker.\n        for (const item of this.items){\n            this.focusTracker.add(item.element);\n        }\n        this.items.on('add', (evt, item)=>{\n            this.focusTracker.add(item.element);\n        });\n        this.items.on('remove', (evt, item)=>{\n            this.focusTracker.remove(item.element);\n        });\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n        this._behavior.render(this);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this._behavior.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n        return super.destroy();\n    }\n    /**\n\t * Focuses the first focusable in {@link #focusables}.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Focuses the last focusable in {@link #focusables}.\n\t */ focusLast() {\n        this._focusCycler.focusLast();\n    }\n    /**\n\t * A utility that expands the plain toolbar configuration into\n\t * {@link module:ui/toolbar/toolbarview~ToolbarView#items} using a given component factory.\n\t *\n\t * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t * @param factory A factory producing toolbar items.\n\t * @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t * to this toolbar and all nested ones as well.\n\t */ fillFromConfig(itemsOrConfig, factory, removeItems) {\n        this.items.addMany(this._buildItemsFromConfig(itemsOrConfig, factory, removeItems));\n    }\n    /**\n\t * A utility that expands the plain toolbar configuration into a list of view items using a given component factory.\n\t *\n\t * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t * @param factory A factory producing toolbar items.\n\t * @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t * to this toolbar and all nested ones as well.\n\t */ _buildItemsFromConfig(itemsOrConfig, factory, removeItems) {\n        const config = normalizeToolbarConfig(itemsOrConfig);\n        const normalizedRemoveItems = removeItems || config.removeItems;\n        const itemsToAdd = this._cleanItemsConfiguration(config.items, factory, normalizedRemoveItems).map((item)=>{\n            if (isObject(item)) {\n                return this._createNestedToolbarDropdown(item, factory, normalizedRemoveItems);\n            } else if (item === '|') {\n                return new ToolbarSeparatorView();\n            } else if (item === '-') {\n                return new ToolbarLineBreakView();\n            }\n            return factory.create(item);\n        }).filter((item)=>!!item);\n        return itemsToAdd;\n    }\n    /**\n\t * Cleans up the {@link module:ui/toolbar/toolbarview~ToolbarView#items} of the toolbar by removing unwanted items and\n\t * duplicated (obsolete) separators or line breaks.\n\t *\n\t * @param items The toolbar items configuration.\n\t * @param factory A factory producing toolbar items.\n\t * @param removeItems An array of items names to be removed from the configuration.\n\t * @returns Items after the clean-up.\n\t */ _cleanItemsConfiguration(items, factory, removeItems) {\n        const filteredItems = items.filter((item, idx, items)=>{\n            if (item === '|') {\n                return true;\n            }\n            // Items listed in `config.removeItems` should not be added to the toolbar.\n            if (removeItems.indexOf(item) !== -1) {\n                return false;\n            }\n            if (item === '-') {\n                // The toolbar line breaks must not be rendered when toolbar grouping is enabled.\n                // (https://github.com/ckeditor/ckeditor5/issues/8582)\n                if (this.options.shouldGroupWhenFull) {\n                    /**\n\t\t\t\t\t\t * The toolbar multiline breaks (`-` items) only work when the automatic button grouping\n\t\t\t\t\t\t * is disabled in the toolbar configuration.\n\t\t\t\t\t\t * To do this, set the `shouldNotGroupWhenFull` option to `true` in the editor configuration:\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * ```ts\n\t\t\t\t\t\t * const config = {\n\t\t\t\t\t\t * \ttoolbar: {\n\t\t\t\t\t\t * \t\titems: [ ... ],\n\t\t\t\t\t\t * \t\tshouldNotGroupWhenFull: true\n\t\t\t\t\t\t * \t}\n\t\t\t\t\t\t * }\n\t\t\t\t\t\t * ```\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @error toolbarview-line-break-ignored-when-grouping-items\n\t\t\t\t\t\t */ logWarning('toolbarview-line-break-ignored-when-grouping-items', items);\n                    return false;\n                }\n                return true;\n            }\n            // For the items that cannot be instantiated we are sending warning message. We also filter them out.\n            if (!isObject(item) && !factory.has(item)) {\n                /**\n\t\t\t\t\t * There was a problem processing the configuration of the toolbar. The item with the given\n\t\t\t\t\t * name does not exist so it was omitted when rendering the toolbar.\n\t\t\t\t\t *\n\t\t\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t\t\t * to provide a toolbar item has not been loaded or there is a typo in the\n\t\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t\t *\n\t\t\t\t\t * Make sure the plugin responsible for this toolbar item is loaded and the toolbar configuration\n\t\t\t\t\t * is correct, e.g. {@link module:basic-styles/bold~Bold} is loaded for the `'bold'` toolbar item.\n\t\t\t\t\t *\n\t\t\t\t\t * You can use the following snippet to retrieve all available toolbar items:\n\t\t\t\t\t *\n\t\t\t\t\t * ```ts\n\t\t\t\t\t * Array.from( editor.ui.componentFactory.names() );\n\t\t\t\t\t * ```\n\t\t\t\t\t *\n\t\t\t\t\t * @error toolbarview-item-unavailable\n\t\t\t\t\t * @param item The name of the component or nested toolbar definition.\n\t\t\t\t\t */ logWarning('toolbarview-item-unavailable', {\n                    item\n                });\n                return false;\n            }\n            return true;\n        });\n        return this._cleanSeparatorsAndLineBreaks(filteredItems);\n    }\n    /**\n\t * Remove leading, trailing, and duplicated separators (`-` and `|`).\n\t *\n\t * @returns Toolbar items after the separator and line break clean-up.\n\t */ _cleanSeparatorsAndLineBreaks(items) {\n        const nonSeparatorPredicate = (item)=>item !== '-' && item !== '|';\n        const count = items.length;\n        // Find an index of the first item that is not a separator.\n        const firstCommandItemIndex = items.findIndex(nonSeparatorPredicate);\n        // Items include separators only. There is no point in displaying them.\n        if (firstCommandItemIndex === -1) {\n            return [];\n        }\n        // Search from the end of the list, then convert found index back to the original direction.\n        const lastCommandItemIndex = count - items.slice().reverse().findIndex(nonSeparatorPredicate);\n        return items// Return items without the leading and trailing separators.\n        .slice(firstCommandItemIndex, lastCommandItemIndex)// Remove duplicated separators.\n        .filter((name, idx, items)=>{\n            // Filter only separators.\n            if (nonSeparatorPredicate(name)) {\n                return true;\n            }\n            const isDuplicated = idx > 0 && items[idx - 1] === name;\n            return !isDuplicated;\n        });\n    }\n    /**\n\t * Creates a user-defined dropdown containing a toolbar with items.\n\t *\n\t * @param definition A definition of the nested toolbar dropdown.\n\t * @param definition.label A label of the dropdown.\n\t * @param definition.icon An icon of the drop-down. One of 'bold', 'plus', 'text', 'importExport', 'alignLeft',\n\t * 'paragraph' or an SVG string. When `false` is passed, no icon will be used.\n\t * @param definition.withText When set `true`, the label of the dropdown will be visible. See\n\t * {@link module:ui/button/buttonview~ButtonView#withText} to learn more.\n\t * @param definition.tooltip A tooltip of the dropdown button. See\n\t * {@link module:ui/button/buttonview~ButtonView#tooltip} to learn more. Defaults to `true`.\n\t * @param componentFactory Component factory used to create items\n\t * of the nested toolbar.\n\t */ _createNestedToolbarDropdown(definition, componentFactory, removeItems) {\n        let { label, icon, items, tooltip = true, withText = false } = definition;\n        items = this._cleanItemsConfiguration(items, componentFactory, removeItems);\n        // There is no point in rendering a dropdown without items.\n        if (!items.length) {\n            return null;\n        }\n        const locale = this.locale;\n        const dropdownView = createDropdown(locale);\n        if (!label) {\n            /**\n\t\t\t * A dropdown definition in the toolbar configuration is missing a text label.\n\t\t\t *\n\t\t\t * Without a label, the dropdown becomes inaccessible to users relying on assistive technologies.\n\t\t\t * Make sure the `label` property is set in your drop-down configuration:\n\t\t\t *\n\t\t\t * ```json\n \t\t\t * {\n \t\t\t * \tlabel: 'A human-readable label',\n\t\t\t * \ticon: '...',\n\t\t\t * \titems: [ ... ]\n \t\t\t * },\n\t\t\t * ```\n\t\t\t *\n\t\t\t * Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t *\n\t\t\t * @error toolbarview-nested-toolbar-dropdown-missing-label\n\t\t\t */ logWarning('toolbarview-nested-toolbar-dropdown-missing-label', definition);\n        }\n        dropdownView.class = 'ck-toolbar__nested-toolbar-dropdown';\n        dropdownView.buttonView.set({\n            label,\n            tooltip,\n            withText: !!withText\n        });\n        // Allow disabling icon by passing false.\n        if (icon !== false) {\n            // A pre-defined icon picked by name, SVG string, a fallback (default) icon.\n            dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[icon] || icon || icons.threeVerticalDots;\n        } else {\n            dropdownView.buttonView.withText = true;\n        }\n        addToolbarToDropdown(dropdownView, ()=>dropdownView.toolbarView._buildItemsFromConfig(items, componentFactory, removeItems));\n        return dropdownView;\n    }\n}\n/**\n * An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its\n * {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n */ class ItemsView extends View {\n    /**\n\t * A collection of items (buttons, dropdowns, etc.).\n\t */ children;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.children = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-toolbar__items'\n                ]\n            },\n            children: this.children\n        });\n    }\n}\n/**\n * A toolbar behavior that makes it static and unresponsive to the changes of the environment.\n * At the same time, it also makes it possible to display a toolbar with a vertical layout\n * using the {@link module:ui/toolbar/toolbarview~ToolbarView#isVertical} property.\n */ class StaticLayout {\n    /**\n\t * Creates an instance of the {@link module:ui/toolbar/toolbarview~StaticLayout} toolbar\n\t * behavior.\n\t *\n\t * @param view An instance of the toolbar that this behavior is added to.\n\t */ constructor(view){\n        const bind = view.bindTemplate;\n        // Static toolbar can be vertical when needed.\n        view.set('isVertical', false);\n        // 1:1 pass–through binding, all ToolbarView#items are visible.\n        view.itemsView.children.bindTo(view.items).using((item)=>item);\n        // 1:1 pass–through binding, all ToolbarView#items are focusable.\n        view.focusables.bindTo(view.items).using((item)=>isFocusable(item) ? item : null);\n        view.extendTemplate({\n            attributes: {\n                class: [\n                    // When vertical, the toolbar has an additional CSS class.\n                    bind.if('isVertical', 'ck-toolbar_vertical')\n                ]\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {}\n    /**\n\t * @inheritDoc\n\t */ destroy() {}\n}\n/**\n * A toolbar behavior that makes the items respond to changes in the geometry.\n *\n * In a nutshell, it groups {@link module:ui/toolbar/toolbarview~ToolbarView#items}\n * that do not fit visually into a single row of the toolbar (due to limited space).\n * Items that do not fit are aggregated in a dropdown displayed at the end of the toolbar.\n *\n * ```\n *\t┌──────────────────────────────────────── ToolbarView ──────────────────────────────────────────┐\n *\t| ┌─────────────────────────────────────── #children ─────────────────────────────────────────┐ |\n *\t| |   ┌─────── #itemsView ────────┐ ┌──────────────────────┐ ┌── #groupedItemsDropdown ───┐   | |\n *\t| |   |       #ungroupedItems     | | ToolbarSeparatorView | |        #groupedItems       |   | |\n *\t| |   └──────────────────────────-┘ └──────────────────────┘ └────────────────────────────┘   | |\n *\t| |                                  \\---------- only when toolbar items overflow -------/    | |\n *\t| └───────────────────────────────────────────────────────────────────────────────────────────┘ |\n *\t└───────────────────────────────────────────────────────────────────────────────────────────────┘\n * ```\n */ class DynamicGrouping {\n    /**\n\t * A toolbar view this behavior belongs to.\n\t */ view;\n    /**\n\t * A collection of toolbar children.\n\t */ viewChildren;\n    /**\n\t * A collection of focusable toolbar elements.\n\t */ viewFocusables;\n    /**\n\t * A view containing toolbar items.\n\t */ viewItemsView;\n    /**\n\t * Toolbar focus tracker.\n\t */ viewFocusTracker;\n    /**\n\t * Toolbar locale.\n\t */ viewLocale;\n    /**\n\t * A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t * Aggregates items that fit into a single row of the toolbar and were not {@link #groupedItems grouped}\n\t * into a {@link #groupedItemsDropdown dropdown}. Items of this collection are displayed in the\n\t * {@link module:ui/toolbar/toolbarview~ToolbarView#itemsView}.\n\t *\n\t * When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped, it\n\t * matches the {@link module:ui/toolbar/toolbarview~ToolbarView#items} collection in size and order.\n\t */ ungroupedItems;\n    /**\n\t * A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t * A collection of the toolbar items that do not fit into a single row of the toolbar.\n\t * Grouped items are displayed in a dedicated {@link #groupedItemsDropdown dropdown}.\n\t *\n\t * When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped,\n\t * this collection is empty.\n\t */ groupedItems;\n    /**\n\t * The dropdown that aggregates {@link #groupedItems grouped items} that do not fit into a single\n\t * row of the toolbar. It is displayed on demand as the last of\n\t * {@link module:ui/toolbar/toolbarview~ToolbarView#children toolbar children} and offers another\n\t * (nested) toolbar which displays items that would normally overflow.\n\t */ groupedItemsDropdown;\n    /**\n\t * An instance of the resize observer that helps dynamically determine the geometry of the toolbar\n\t * and manage items that do not fit into a single row.\n\t *\n\t * **Note:** Created in {@link #_enableGroupingOnResize}.\n\t *\n\t * @readonly\n\t */ resizeObserver = null;\n    /**\n\t * A cached value of the horizontal padding style used by {@link #_updateGrouping}\n\t * to manage the {@link module:ui/toolbar/toolbarview~ToolbarView#items} that do not fit into\n\t * a single toolbar line. This value can be reused between updates because it is unlikely that\n\t * the padding will change and re–using `Window.getComputedStyle()` is expensive.\n\t *\n\t * @readonly\n\t */ cachedPadding = null;\n    /**\n\t * A flag indicating that an items grouping update has been queued (e.g. due to the toolbar being visible)\n\t * and should be executed immediately the next time the toolbar shows up.\n\t *\n\t * @readonly\n\t */ shouldUpdateGroupingOnNextResize = false;\n    /**\n\t * Toolbar element.\n\t *\n\t * @readonly\n\t */ viewElement;\n    /**\n\t * Creates an instance of the {@link module:ui/toolbar/toolbarview~DynamicGrouping} toolbar\n\t * behavior.\n\t *\n\t * @param view An instance of the toolbar that this behavior is added to.\n\t */ constructor(view){\n        this.view = view;\n        this.viewChildren = view.children;\n        this.viewFocusables = view.focusables;\n        this.viewItemsView = view.itemsView;\n        this.viewFocusTracker = view.focusTracker;\n        this.viewLocale = view.locale;\n        this.ungroupedItems = view.createCollection();\n        this.groupedItems = view.createCollection();\n        this.groupedItemsDropdown = this._createGroupedItemsDropdown();\n        // Only those items that were not grouped are visible to the user.\n        view.itemsView.children.bindTo(this.ungroupedItems).using((item)=>item);\n        // Make sure all #items visible in the main space of the toolbar are \"focuscyclable\".\n        this.ungroupedItems.on('change', this._updateFocusCyclableItems.bind(this));\n        // Make sure the #groupedItemsDropdown is also included in cycling when it appears.\n        view.children.on('change', this._updateFocusCyclableItems.bind(this));\n        // ToolbarView#items is dynamic. When an item is added or removed, it should be automatically\n        // represented in either grouped or ungrouped items at the right index.\n        // In other words #items == concat( #ungroupedItems, #groupedItems )\n        // (in length and order).\n        view.items.on('change', (evt, changeData)=>{\n            const index = changeData.index;\n            const added = Array.from(changeData.added);\n            // Removing.\n            for (const removedItem of changeData.removed){\n                if (index >= this.ungroupedItems.length) {\n                    this.groupedItems.remove(removedItem);\n                } else {\n                    this.ungroupedItems.remove(removedItem);\n                }\n            }\n            // Adding.\n            for(let currentIndex = index; currentIndex < index + added.length; currentIndex++){\n                const addedItem = added[currentIndex - index];\n                if (currentIndex > this.ungroupedItems.length) {\n                    this.groupedItems.add(addedItem, currentIndex - this.ungroupedItems.length);\n                } else {\n                    this.ungroupedItems.add(addedItem, currentIndex);\n                }\n            }\n            // When new ungrouped items join in and land in #ungroupedItems, there's a chance it causes\n            // the toolbar to overflow.\n            // Consequently if removed from grouped or ungrouped items, there is a chance\n            // some new space is available and we could do some ungrouping.\n            this._updateGrouping();\n        });\n        view.extendTemplate({\n            attributes: {\n                class: [\n                    // To group items dynamically, the toolbar needs a dedicated CSS class.\n                    'ck-toolbar_grouping'\n                ]\n            }\n        });\n    }\n    /**\n\t * Enables dynamic items grouping based on the dimensions of the toolbar.\n\t *\n\t * @param view An instance of the toolbar that this behavior is added to.\n\t */ render(view) {\n        this.viewElement = view.element;\n        this._enableGroupingOnResize();\n        this._enableGroupingOnMaxWidthChange(view);\n    }\n    /**\n\t * Cleans up the internals used by this behavior.\n\t */ destroy() {\n        // The dropdown may not be in ToolbarView#children at the moment of toolbar destruction\n        // so let's make sure it's actually destroyed along with the toolbar.\n        this.groupedItemsDropdown.destroy();\n        this.resizeObserver.destroy();\n    }\n    /**\n\t * When called, it will check if any of the {@link #ungroupedItems} do not fit into a single row of the toolbar,\n\t * and it will move them to the {@link #groupedItems} when it happens.\n\t *\n\t * At the same time, it will also check if there is enough space in the toolbar for the first of the\n\t * {@link #groupedItems} to be returned back to {@link #ungroupedItems} and still fit into a single row\n\t * without the toolbar wrapping.\n\t */ _updateGrouping() {\n        // Do no grouping–related geometry analysis when the toolbar is detached from visible DOM,\n        // for instance before #render(), or after render but without a parent or a parent detached\n        // from DOM. DOMRects won't work anyway and there will be tons of warning in the console and\n        // nothing else. This happens, for instance, when the toolbar is detached from DOM and\n        // some logic adds or removes its #items.\n        if (!this.viewElement.ownerDocument.body.contains(this.viewElement)) {\n            return;\n        }\n        // Do not update grouping when the element is invisible. Such toolbar has DOMRect filled with zeros\n        // and that would cause all items to be grouped. Instead, queue the grouping so it runs next time\n        // the toolbar is visible (the next ResizeObserver callback execution). This is handy because\n        // the grouping could be caused by increasing the #maxWidth when the toolbar was invisible and the next\n        // time it shows up, some items could actually be ungrouped (https://github.com/ckeditor/ckeditor5/issues/6575).\n        if (!isVisible(this.viewElement)) {\n            this.shouldUpdateGroupingOnNextResize = true;\n            return;\n        }\n        // Remember how many items were initially grouped so at the it is possible to figure out if the number\n        // of grouped items has changed. If the number has changed, geometry of the toolbar has also changed.\n        const initialGroupedItemsCount = this.groupedItems.length;\n        let wereItemsGrouped;\n        // Group #items as long as some wrap to the next row. This will happen, for instance,\n        // when the toolbar is getting narrow and there is not enough space to display all items in\n        // a single row.\n        while(this._areItemsOverflowing){\n            this._groupLastItem();\n            wereItemsGrouped = true;\n        }\n        // If none were grouped now but there were some items already grouped before,\n        // then, what the hell, maybe let's see if some of them can be ungrouped. This happens when,\n        // for instance, the toolbar is stretching and there's more space in it than before.\n        if (!wereItemsGrouped && this.groupedItems.length) {\n            // Ungroup items as long as none are overflowing or there are none to ungroup left.\n            while(this.groupedItems.length && !this._areItemsOverflowing){\n                this._ungroupFirstItem();\n            }\n            // If the ungrouping ended up with some item wrapping to the next row,\n            // put it back to the group toolbar (\"undo the last ungroup\"). We don't know whether\n            // an item will wrap or not until we ungroup it (that's a DOM/CSS thing) so this\n            // clean–up is vital for the algorithm.\n            if (this._areItemsOverflowing) {\n                this._groupLastItem();\n            }\n        }\n        if (this.groupedItems.length !== initialGroupedItemsCount) {\n            this.view.fire('groupedItemsUpdate');\n        }\n    }\n    /**\n\t * Returns `true` when {@link module:ui/toolbar/toolbarview~ToolbarView#element} children visually overflow,\n\t * for instance if the toolbar is narrower than its members. Returns `false` otherwise.\n\t */ get _areItemsOverflowing() {\n        // An empty toolbar cannot overflow.\n        if (!this.ungroupedItems.length) {\n            return false;\n        }\n        const element = this.viewElement;\n        const uiLanguageDirection = this.viewLocale.uiLanguageDirection;\n        const lastChildRect = new Rect(element.lastChild);\n        const toolbarRect = new Rect(element);\n        if (!this.cachedPadding) {\n            const computedStyle = global.window.getComputedStyle(element);\n            const paddingProperty = uiLanguageDirection === 'ltr' ? 'paddingRight' : 'paddingLeft';\n            // parseInt() is essential because of quirky floating point numbers logic and DOM.\n            // If the padding turned out too big because of that, the grouped items dropdown would\n            // always look (from the Rect perspective) like it overflows (while it's not).\n            this.cachedPadding = Number.parseInt(computedStyle[paddingProperty]);\n        }\n        if (uiLanguageDirection === 'ltr') {\n            return lastChildRect.right > toolbarRect.right - this.cachedPadding;\n        } else {\n            return lastChildRect.left < toolbarRect.left + this.cachedPadding;\n        }\n    }\n    /**\n\t * Enables the functionality that prevents {@link #ungroupedItems} from overflowing (wrapping to the next row)\n\t * upon resize when there is little space available. Instead, the toolbar items are moved to the\n\t * {@link #groupedItems} collection and displayed in a dropdown at the end of the row (which has its own nested toolbar).\n\t *\n\t * When called, the toolbar will automatically analyze the location of its {@link #ungroupedItems} and \"group\"\n\t * them in the dropdown if necessary. It will also observe the browser window for size changes in\n\t * the future and respond to them by grouping more items or reverting already grouped back, depending\n\t * on the visual space available.\n\t */ _enableGroupingOnResize() {\n        let previousWidth;\n        // TODO: Consider debounce.\n        this.resizeObserver = new ResizeObserver(this.viewElement, (entry)=>{\n            if (!previousWidth || previousWidth !== entry.contentRect.width || this.shouldUpdateGroupingOnNextResize) {\n                this.shouldUpdateGroupingOnNextResize = false;\n                this._updateGrouping();\n                previousWidth = entry.contentRect.width;\n            }\n        });\n        this._updateGrouping();\n    }\n    /**\n\t * Enables the grouping functionality, just like {@link #_enableGroupingOnResize} but the difference is that\n\t * it listens to the changes of {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth} instead.\n\t */ _enableGroupingOnMaxWidthChange(view) {\n        view.on('change:maxWidth', ()=>{\n            this._updateGrouping();\n        });\n    }\n    /**\n\t * When called, it will remove the last item from {@link #ungroupedItems} and move it back\n\t * to the {@link #groupedItems} collection.\n\t *\n\t * The opposite of {@link #_ungroupFirstItem}.\n\t */ _groupLastItem() {\n        if (!this.groupedItems.length) {\n            this.viewChildren.add(new ToolbarSeparatorView());\n            this.viewChildren.add(this.groupedItemsDropdown);\n            this.viewFocusTracker.add(this.groupedItemsDropdown.element);\n        }\n        this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last), 0);\n    }\n    /**\n\t * Moves the very first item belonging to {@link #groupedItems} back\n\t * to the {@link #ungroupedItems} collection.\n\t *\n\t * The opposite of {@link #_groupLastItem}.\n\t */ _ungroupFirstItem() {\n        this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first));\n        if (!this.groupedItems.length) {\n            this.viewChildren.remove(this.groupedItemsDropdown);\n            this.viewChildren.remove(this.viewChildren.last);\n            this.viewFocusTracker.remove(this.groupedItemsDropdown.element);\n        }\n    }\n    /**\n\t * Creates the {@link #groupedItemsDropdown} that hosts the members of the {@link #groupedItems}\n\t * collection when there is not enough space in the toolbar to display all items in a single row.\n\t */ _createGroupedItemsDropdown() {\n        const locale = this.viewLocale;\n        const t = locale.t;\n        const dropdown = createDropdown(locale);\n        dropdown.class = 'ck-toolbar__grouped-dropdown';\n        // Make sure the dropdown never sticks out to the left/right. It should be under the main toolbar.\n        // (https://github.com/ckeditor/ckeditor5/issues/5608)\n        dropdown.panelPosition = locale.uiLanguageDirection === 'ltr' ? 'sw' : 'se';\n        addToolbarToDropdown(dropdown, this.groupedItems);\n        dropdown.buttonView.set({\n            label: t('Show more items'),\n            tooltip: true,\n            tooltipPosition: locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw',\n            icon: icons.threeVerticalDots\n        });\n        return dropdown;\n    }\n    /**\n\t * Updates the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables focus–cyclable items}\n\t * collection so it represents the up–to–date state of the UI from the perspective of the user.\n\t *\n\t * For instance, the {@link #groupedItemsDropdown} can show up and hide but when it is visible,\n\t * it must be subject to focus cycling in the toolbar.\n\t *\n\t * See the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables collection} documentation\n\t * to learn more about the purpose of this method.\n\t */ _updateFocusCyclableItems() {\n        this.viewFocusables.clear();\n        this.ungroupedItems.map((item)=>{\n            if (isFocusable(item)) {\n                this.viewFocusables.add(item);\n            }\n        });\n        if (this.groupedItems.length) {\n            this.viewFocusables.add(this.groupedItemsDropdown);\n        }\n    }\n}\n\n/**\n * The split button view class.\n *\n * ```ts\n * const view = new SplitButtonView();\n *\n * view.set( {\n * \tlabel: 'A button',\n * \tkeystroke: 'Ctrl+B',\n * \ttooltip: true\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n *\n * Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n */ class SplitButtonView extends View {\n    /**\n\t * Collection of the child views inside of the split button {@link #element}.\n\t */ children;\n    /**\n\t * A main button of split button.\n\t */ actionView;\n    /**\n\t * A secondary button of split button that opens dropdown.\n\t */ arrowView;\n    /**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the split button:\n\t *\n\t * * <kbd>▶</kbd> moves focus to arrow view when action view is focused,\n\t * * <kbd>◀</kbd> moves focus to action view when arrow view is focused.\n\t */ keystrokes;\n    /**\n\t * Tracks information about DOM focus in the dropdown.\n\t */ focusTracker;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, actionButton){\n        super(locale);\n        const bind = this.bindTemplate;\n        // Implement the Button interface.\n        this.set('class', undefined);\n        this.set('labelStyle', undefined);\n        this.set('icon', undefined);\n        this.set('isEnabled', true);\n        this.set('isOn', false);\n        this.set('isToggleable', false);\n        this.set('isVisible', true);\n        this.set('keystroke', undefined);\n        this.set('withKeystroke', false);\n        this.set('label', undefined);\n        this.set('tabindex', -1);\n        this.set('tooltip', false);\n        this.set('tooltipPosition', 's');\n        this.set('type', 'button');\n        this.set('withText', false);\n        this.children = this.createCollection();\n        this.actionView = this._createActionView(actionButton);\n        this.arrowView = this._createArrowView();\n        this.keystrokes = new KeystrokeHandler();\n        this.focusTracker = new FocusTracker();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-splitbutton',\n                    bind.to('class'),\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value),\n                    this.arrowView.bindTemplate.if('isOn', 'ck-splitbutton_open')\n                ]\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.children.add(this.actionView);\n        this.children.add(this.arrowView);\n        this.focusTracker.add(this.actionView.element);\n        this.focusTracker.add(this.arrowView.element);\n        this.keystrokes.listenTo(this.element);\n        // Overrides toolbar focus cycling behavior.\n        this.keystrokes.set('arrowright', (evt, cancel)=>{\n            if (this.focusTracker.focusedElement === this.actionView.element) {\n                this.arrowView.focus();\n                cancel();\n            }\n        });\n        // Overrides toolbar focus cycling behavior.\n        this.keystrokes.set('arrowleft', (evt, cancel)=>{\n            if (this.focusTracker.focusedElement === this.arrowView.element) {\n                this.actionView.focus();\n                cancel();\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the {@link module:ui/button/buttonview~ButtonView#element} of the action part of split button.\n\t */ focus() {\n        this.actionView.focus();\n    }\n    /**\n\t * Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #actionView} and binds it with main split button\n\t * attributes.\n\t */ _createActionView(actionButton) {\n        const actionView = actionButton || new ButtonView();\n        if (!actionButton) {\n            actionView.bind('icon', 'isEnabled', 'isOn', 'isToggleable', 'keystroke', 'label', 'tabindex', 'tooltip', 'tooltipPosition', 'type', 'withText').to(this);\n        }\n        actionView.extendTemplate({\n            attributes: {\n                class: 'ck-splitbutton__action'\n            }\n        });\n        actionView.delegate('execute').to(this);\n        return actionView;\n    }\n    /**\n\t * Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #arrowView} and binds it with main split button\n\t * attributes.\n\t */ _createArrowView() {\n        const arrowView = new ButtonView();\n        const bind = arrowView.bindTemplate;\n        arrowView.icon = dropdownArrowIcon;\n        arrowView.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-splitbutton__arrow'\n                ],\n                'data-cke-tooltip-disabled': bind.to('isOn'),\n                'aria-haspopup': true,\n                'aria-expanded': bind.to('isOn', (value)=>String(value))\n            }\n        });\n        arrowView.bind('isEnabled').to(this);\n        arrowView.bind('label').to(this);\n        arrowView.bind('tooltip').to(this);\n        arrowView.delegate('execute').to(this, 'open');\n        return arrowView;\n    }\n}\n\n/**\n * A helper for creating dropdowns. It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown},\n * with a {@link module:ui/dropdown/button/dropdownbutton~DropdownButton button},\n * {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView panel} and all standard dropdown's behaviors.\n *\n * # Creating dropdowns\n *\n * By default, the default {@link module:ui/dropdown/button/dropdownbuttonview~DropdownButtonView} class is used as\n * definition of the button:\n *\n * ```ts\n * const dropdown = createDropdown( model );\n *\n * // Configure dropdown's button properties:\n * dropdown.buttonView.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.render();\n *\n * // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * You can also provide other button views (they need to implement the\n * {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface). For instance, you can use\n * {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} to create a dropdown with a split button.\n *\n * ```ts\n * const dropdown = createDropdown( locale, SplitButtonView );\n *\n * // Configure dropdown's button properties:\n * dropdown.buttonView.set( {\n * \tlabel: 'A dropdown',\n * \twithText: true\n * } );\n *\n * dropdown.buttonView.on( 'execute', () => {\n * \t// Add the behavior of the \"action part\" of the split button.\n * \t// Split button consists of the \"action part\" and \"arrow part\".\n * \t// The arrow opens the dropdown while the action part can have some other behavior.\n * } );\n *\n * dropdown.render();\n *\n * // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * # Adding content to the dropdown's panel\n *\n * The content of the panel can be inserted directly into the `dropdown.panelView.element`:\n *\n * ```ts\n * dropdown.panelView.element.textContent = 'Content of the panel';\n * ```\n *\n * However, most of the time you will want to add there either a {@link module:ui/list/listview~ListView list of options}\n * or a list of buttons (i.e. a {@link module:ui/toolbar/toolbarview~ToolbarView toolbar}).\n * To simplify the task, you can use, respectively, {@link module:ui/dropdown/utils~addListToDropdown} or\n * {@link module:ui/dropdown/utils~addToolbarToDropdown} utils.\n *\n * @param locale The locale instance.\n * @param ButtonClassOrInstance The dropdown button view class. Needs to implement the\n * @param behaviorOptions Attributes for the default behavior of the dropdown.\n *\n * {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface.\n * @returns The dropdown view instance.\n */ function createDropdown(locale, ButtonClassOrInstance = DropdownButtonView) {\n    const buttonView = typeof ButtonClassOrInstance == 'function' ? new ButtonClassOrInstance(locale) : ButtonClassOrInstance;\n    const panelView = new DropdownPanelView(locale);\n    const dropdownView = new DropdownView(locale, buttonView, panelView);\n    buttonView.bind('isEnabled').to(dropdownView);\n    if (buttonView instanceof SplitButtonView) {\n        buttonView.arrowView.bind('isOn').to(dropdownView, 'isOpen');\n    } else {\n        buttonView.bind('isOn').to(dropdownView, 'isOpen');\n    }\n    addDefaultBehaviors(dropdownView);\n    return dropdownView;\n}\n/**\n * Adds a menu UI component to a dropdown and sets all common behaviors and interactions between the dropdown and the menu.\n *\n * Use this helper to create multi-level dropdown menus that are displayed in a toolbar.\n *\n * Internally, it creates an instance of {@link module:ui/dropdown/menu/dropdownmenurootlistview~DropdownMenuRootListView}.\n *\n * Example:\n *\n * ```ts\n * const definitions = [\n * \t{\n * \t\tid: 'menu_1',\n * \t\tmenu: 'Menu 1',\n * \t\tchildren: [\n * \t\t\t{\n * \t\t\t\tid: 'menu_1_a',\n * \t\t\t\tlabel: 'Item A'\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tid: 'menu_1_b',\n * \t\t\t\tlabel: 'Item B'\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tid: 'top_a',\n * \t\tlabel: 'Top Item A'\n * \t},\n * \t{\n * \t\tid: 'top_b',\n * \t\tlabel: 'Top Item B'\n * \t}\n * ];\n *\n * const dropdownView = createDropdown( editor.locale );\n *\n * addMenuToDropdown( dropdownView, editor.ui.view.body, definitions );\n * ```\n *\n * After using this helper, the `dropdown` will fire {@link module:ui/dropdown/dropdownview~DropdownViewEvent `execute`} event when\n * a nested menu button is pressed.\n *\n * The helper will make sure that the `dropdownMenuRootListView` is lazy loaded, i.e., the menu component structure will be initialized\n * and rendered only after the `dropdown` is opened for the first time.\n *\n * @param dropdownView A dropdown instance to which the menu component will be added.\n * @param body Body collection to which floating menu panels will be added.\n * @param definition The menu component definition.\n * @param options.ariaLabel Label used by assistive technologies to describe the top-level menu.\n */ function addMenuToDropdown(dropdownView, body, definition, options = {}) {\n    dropdownView.menuView = new DropdownMenuRootListView(dropdownView.locale, body, definition);\n    if (dropdownView.isOpen) {\n        addMenuToOpenDropdown(dropdownView, options);\n    } else {\n        // Load the UI elements only after the dropdown is opened for the first time - lazy loading.\n        dropdownView.once('change:isOpen', ()=>{\n            addMenuToOpenDropdown(dropdownView, options);\n        }, {\n            priority: 'highest'\n        });\n    }\n}\nfunction addMenuToOpenDropdown(dropdownView, options) {\n    const dropdownMenuRootListView = dropdownView.menuView;\n    const t = dropdownView.locale.t;\n    dropdownMenuRootListView.delegate('menu:execute').to(dropdownView, 'execute');\n    dropdownMenuRootListView.listenTo(dropdownView, 'change:isOpen', (evt, name, isOpen)=>{\n        if (!isOpen) {\n            dropdownMenuRootListView.closeMenus();\n        }\n    }, {\n        priority: 'low'\n    }); // Make sure this is fired after `focusDropdownButtonOnClose` behavior.\n    // When `dropdownMenuRootListView` is added as a `panelView` child, it becomes rendered (`panelView` is rendered at this point).\n    dropdownView.panelView.children.add(dropdownMenuRootListView);\n    // Nested menu panels are added to body collection, so they are not children of the `dropdownView` from DOM perspective.\n    // Add these panels to `dropdownView` focus tracker, so they are treated like part of the `dropdownView` for focus-related purposes.\n    for (const menu of dropdownMenuRootListView.menus){\n        dropdownView.focusTracker.add(menu.panelView.element);\n    }\n    dropdownMenuRootListView.ariaLabel = options.ariaLabel || t('Dropdown menu');\n}\n/**\n * Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n *\n * ```ts\n * const buttonsCreator = () => {\n * \tconst buttons = [];\n *\n * \t// Either create a new ButtonView instance or create existing.\n * \tbuttons.push( new ButtonView() );\n * \tbuttons.push( editor.ui.componentFactory.create( 'someButton' ) );\n * };\n *\n * const dropdown = createDropdown( locale );\n *\n * addToolbarToDropdown( dropdown, buttonsCreator, { isVertical: true } );\n *\n * // Will render a vertical button dropdown labeled \"A button dropdown\"\n * // with a button group in the panel containing two buttons.\n * // Buttons inside the dropdown will be created on first dropdown panel open.\n * dropdown.render()\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * **Note:** To improve the accessibility, you can tell the dropdown to focus the first active button of the toolbar when the dropdown\n * {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}. See the documentation of `options` to learn more.\n *\n * **Note:** Toolbar view will be created on first open of the dropdown.\n *\n * See {@link module:ui/dropdown/utils~createDropdown} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n *\n * @param dropdownView A dropdown instance to which `ToolbarView` will be added.\n * @param options.enableActiveItemFocusOnDropdownOpen When set `true`, the focus will automatically move to the first\n * active {@link module:ui/toolbar/toolbarview~ToolbarView#items item} of the toolbar upon\n * {@link module:ui/dropdown/dropdownview~DropdownView#isOpen opening} the dropdown. Active items are those with the `isOn` property set\n * `true` (for instance {@link module:ui/button/buttonview~ButtonView buttons}). If no active items is found, the toolbar will be focused\n * as a whole resulting in the focus moving to its first focusable item (default behavior of\n * {@link module:ui/dropdown/dropdownview~DropdownView}).\n * @param options.ariaLabel Label used by assistive technologies to describe toolbar element.\n * @param options.maxWidth The maximum width of the toolbar element.\n * Details: {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth}.\n * @param options.class An additional CSS class added to the toolbar element.\n * @param options.isCompact When set true, makes the toolbar look compact with toolbar element.\n * @param options.isVertical Controls the orientation of toolbar items.\n */ function addToolbarToDropdown(dropdownView, buttonsOrCallback, options = {}) {\n    dropdownView.extendTemplate({\n        attributes: {\n            class: [\n                'ck-toolbar-dropdown'\n            ]\n        }\n    });\n    if (dropdownView.isOpen) {\n        addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options);\n    } else {\n        dropdownView.once('change:isOpen', ()=>addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options), {\n            priority: 'highest'\n        });\n    }\n    if (options.enableActiveItemFocusOnDropdownOpen) {\n        // Accessibility: Focus the first active button in the toolbar when the dropdown gets open.\n        focusChildOnDropdownOpen(dropdownView, ()=>dropdownView.toolbarView.items.find((item)=>item.isOn));\n    }\n}\n/**\n * Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n */ function addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options) {\n    const locale = dropdownView.locale;\n    const t = locale.t;\n    const toolbarView = dropdownView.toolbarView = new ToolbarView(locale);\n    const buttons = typeof buttonsOrCallback == 'function' ? buttonsOrCallback() : buttonsOrCallback;\n    toolbarView.ariaLabel = options.ariaLabel || t('Dropdown toolbar');\n    if (options.maxWidth) {\n        toolbarView.maxWidth = options.maxWidth;\n    }\n    if (options.class) {\n        toolbarView.class = options.class;\n    }\n    if (options.isCompact) {\n        toolbarView.isCompact = options.isCompact;\n    }\n    if (options.isVertical) {\n        toolbarView.isVertical = true;\n    }\n    if (buttons instanceof ViewCollection) {\n        toolbarView.items.bindTo(buttons).using((item)=>item);\n    } else {\n        toolbarView.items.addMany(buttons);\n    }\n    dropdownView.panelView.children.add(toolbarView);\n    toolbarView.items.delegate('execute').to(dropdownView);\n}\n/**\n * Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n *\n * ```ts\n * const items = new Collection<ListDropdownItemDefinition>();\n *\n * items.add( {\n * \ttype: 'button',\n * \tmodel: new Model( {\n * \t\twithText: true,\n * \t\tlabel: 'First item',\n * \t\tlabelStyle: 'color: red'\n * \t} )\n * } );\n *\n * items.add( {\n * \t type: 'button',\n * \t model: new Model( {\n * \t\twithText: true,\n * \t\tlabel: 'Second item',\n * \t\tlabelStyle: 'color: green',\n * \t\tclass: 'foo'\n * \t} )\n * } );\n *\n * const dropdown = createDropdown( locale );\n *\n * addListToDropdown( dropdown, items );\n *\n * // Will render a dropdown with a list in the panel containing two items.\n * dropdown.render()\n * document.body.appendChild( dropdown.element );\n * ```\n *\n * The `items` collection passed to this methods controls the presence and attributes of respective\n * {@link module:ui/list/listitemview~ListItemView list items}.\n *\n * **Note:** To improve the accessibility, when a list is added to the dropdown using this helper the dropdown will automatically attempt\n * to focus the first active item (a host to a {@link module:ui/button/buttonview~ButtonView} with\n * {@link module:ui/button/buttonview~ButtonView#isOn} set `true`) or the very first item when none are active.\n *\n * **Note:** List view will be created on first open of the dropdown.\n *\n * See {@link module:ui/dropdown/utils~createDropdown} and {@link module:list/list~List}.\n *\n * @param dropdownView A dropdown instance to which `ListVIew` will be added.\n * @param itemsOrCallback A collection of the list item definitions or a callback returning a list item definitions to populate the list.\n * @param options.ariaLabel Label used by assistive technologies to describe list element.\n * @param options.role Will be reflected by the `role` DOM attribute in `ListVIew` and used by assistive technologies.\n */ function addListToDropdown(dropdownView, itemsOrCallback, options = {}) {\n    if (dropdownView.isOpen) {\n        addListToOpenDropdown(dropdownView, itemsOrCallback, options);\n    } else {\n        dropdownView.once('change:isOpen', ()=>addListToOpenDropdown(dropdownView, itemsOrCallback, options), {\n            priority: 'highest'\n        });\n    }\n    // Accessibility: Focus the first active button in the list when the dropdown gets open.\n    focusChildOnDropdownOpen(dropdownView, ()=>dropdownView.listView.items.find((item)=>{\n            if (item instanceof ListItemView) {\n                return item.children.first.isOn;\n            }\n            return false;\n        }));\n}\n/**\n * Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n */ function addListToOpenDropdown(dropdownView, itemsOrCallback, options) {\n    const locale = dropdownView.locale;\n    const listView = dropdownView.listView = new ListView(locale);\n    const items = typeof itemsOrCallback == 'function' ? itemsOrCallback() : itemsOrCallback;\n    listView.ariaLabel = options.ariaLabel;\n    listView.role = options.role;\n    bindViewCollectionItemsToDefinitions(dropdownView, listView.items, items, locale);\n    dropdownView.panelView.children.add(listView);\n    listView.items.delegate('execute').to(dropdownView);\n}\n/**\n * A helper to be used on an existing {@link module:ui/dropdown/dropdownview~DropdownView} that focuses\n * a specific child in DOM when the dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}.\n *\n * @param dropdownView A dropdown instance to which the focus behavior will be added.\n * @param childSelectorCallback A callback executed when the dropdown gets open. It should return a {@link module:ui/view~View}\n * instance (child of {@link module:ui/dropdown/dropdownview~DropdownView#panelView}) that will get focused or a falsy value.\n * If falsy value is returned, a default behavior of the dropdown will engage focusing the first focusable child in\n * the {@link module:ui/dropdown/dropdownview~DropdownView#panelView}.\n */ function focusChildOnDropdownOpen(dropdownView, childSelectorCallback) {\n    dropdownView.on('change:isOpen', ()=>{\n        if (!dropdownView.isOpen) {\n            return;\n        }\n        const childToFocus = childSelectorCallback();\n        if (!childToFocus) {\n            return;\n        }\n        if (typeof childToFocus.focus === 'function') {\n            childToFocus.focus();\n        } else {\n            /**\n\t\t\t * The child view of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} is missing the `focus()` method\n\t\t\t * and could not be focused when the dropdown got {@link module:ui/dropdown/dropdownview~DropdownView#isOpen open}.\n\t\t\t *\n\t\t\t * Making the content of a dropdown focusable in this case greatly improves the accessibility. Please make the view instance\n\t\t\t * implements the {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface} for the best user\n\t\t\t * experience.\n\t\t\t *\n\t\t\t * @error ui-dropdown-focus-child-on-open-child-missing-focus\n\t\t\t * @param {module:ui/view~View} view\n\t\t\t */ logWarning('ui-dropdown-focus-child-on-open-child-missing-focus', {\n                view: childToFocus\n            });\n        }\n    // * Let the panel show up first (do not focus an invisible element).\n    // * Execute after focusDropdownPanelOnOpen(). See focusDropdownPanelOnOpen() to learn more.\n    }, {\n        priority: priorities.low - 10\n    });\n}\n/**\n * Add a set of default behaviors to dropdown view.\n */ function addDefaultBehaviors(dropdownView) {\n    closeDropdownOnClickOutside(dropdownView);\n    closeDropdownOnExecute(dropdownView);\n    closeDropdownOnBlur(dropdownView);\n    focusDropdownContentsOnArrows(dropdownView);\n    focusDropdownButtonOnClose(dropdownView);\n    focusDropdownPanelOnOpen(dropdownView);\n}\n/**\n * Adds a behavior to a dropdownView that closes opened dropdown when user clicks outside the dropdown.\n */ function closeDropdownOnClickOutside(dropdownView) {\n    clickOutsideHandler({\n        emitter: dropdownView,\n        activator: ()=>dropdownView.isRendered && dropdownView.isOpen,\n        callback: ()=>{\n            dropdownView.isOpen = false;\n        },\n        contextElements: ()=>[\n                dropdownView.element,\n                ...dropdownView.focusTracker.elements\n            ]\n    });\n}\n/**\n * Adds a behavior to a dropdownView that closes the dropdown view on \"execute\" event.\n */ function closeDropdownOnExecute(dropdownView) {\n    // Close the dropdown when one of the list items has been executed.\n    dropdownView.on('execute', (evt)=>{\n        // Toggling a switch button view should not close the dropdown.\n        if (evt.source instanceof SwitchButtonView) {\n            return;\n        }\n        dropdownView.isOpen = false;\n    });\n}\n/**\n * Adds a behavior to a dropdown view that closes opened dropdown when it loses focus.\n */ function closeDropdownOnBlur(dropdownView) {\n    dropdownView.focusTracker.on('change:isFocused', (evt, name, isFocused)=>{\n        if (isFocused || !dropdownView.isOpen) {\n            return;\n        }\n        dropdownView.isOpen = false;\n    });\n}\n/**\n * Adds a behavior to a dropdownView that focuses the dropdown's panel view contents on keystrokes.\n */ function focusDropdownContentsOnArrows(dropdownView) {\n    // If the dropdown panel is already open, the arrow down key should focus the first child of the #panelView.\n    dropdownView.keystrokes.set('arrowdown', (data, cancel)=>{\n        if (dropdownView.isOpen) {\n            dropdownView.panelView.focus();\n            cancel();\n        }\n    });\n    // If the dropdown panel is already open, the arrow up key should focus the last child of the #panelView.\n    dropdownView.keystrokes.set('arrowup', (data, cancel)=>{\n        if (dropdownView.isOpen) {\n            dropdownView.panelView.focusLast();\n            cancel();\n        }\n    });\n}\n/**\n * Adds a behavior that focuses the #buttonView when the dropdown was closed but focus was within the #panelView element.\n * This makes sure the focus is never lost.\n */ function focusDropdownButtonOnClose(dropdownView) {\n    dropdownView.on('change:isOpen', (evt, name, isOpen)=>{\n        if (isOpen) {\n            return;\n        }\n        const elements = dropdownView.focusTracker.elements;\n        // If the dropdown was closed, move the focus back to the button (#12125).\n        // Don't touch the focus, if it moved somewhere else (e.g. moved to the editing root on #execute) (#12178).\n        // Note: Don't use the state of the DropdownView#focusTracker here. It fires #blur with the timeout.\n        if (elements.some((element)=>element.contains(global.document.activeElement))) {\n            dropdownView.buttonView.focus();\n        }\n    });\n}\n/**\n * Adds a behavior that focuses the #panelView when dropdown gets open (accessibility).\n */ function focusDropdownPanelOnOpen(dropdownView) {\n    dropdownView.on('change:isOpen', (evt, name, isOpen)=>{\n        if (!isOpen) {\n            return;\n        }\n        // Focus the first item in the dropdown when the dropdown opened.\n        dropdownView.panelView.focus();\n    // * Let the panel show up first (do not focus an invisible element).\n    // * Also, execute before focusChildOnDropdownOpen() to make sure this helper does not break the\n    //   focus of a specific child by kicking in too late and resetting the focus in the panel.\n    }, {\n        priority: 'low'\n    });\n}\n/**\n * This helper populates a dropdown list with items and groups according to the\n * collection of item definitions. A permanent binding is created in this process allowing\n * dynamic management of the dropdown list content.\n *\n * @param dropdownView\n * @param listItems\n * @param definitions\n * @param locale\n */ function bindViewCollectionItemsToDefinitions(dropdownView, listItems, definitions, locale) {\n    // List item checkboxes have a reserved space for the check icon, so we need to know if there are any checkboxes in the list\n    // to adjust the layout accordingly. It'd look weird if the items on the list were not aligned horizontally.\n    //\n    // Possible theoretical performance problem if many items are added one by one, as this will be called for each item.\n    listItems.on('change', ()=>{\n        // Filter-map. Check all items, leave only these that have buttons and return the buttons.\n        const listItemButtons = [\n            ...listItems\n        ].reduce((acc, item)=>{\n            if (item instanceof ListItemView && item.children.first instanceof ListItemButtonView) {\n                acc.push(item.children.first);\n            }\n            return acc;\n        }, []);\n        const hasAnyCheckboxOnList = listItemButtons.some((button)=>button.isToggleable);\n        listItemButtons.forEach((item)=>{\n            item.hasCheckSpace = hasAnyCheckboxOnList;\n        });\n    });\n    listItems.bindTo(definitions).using((def)=>{\n        if (def.type === 'separator') {\n            return new ListSeparatorView(locale);\n        } else if (def.type === 'group') {\n            const groupView = new ListItemGroupView(locale);\n            groupView.set({\n                label: def.label\n            });\n            bindViewCollectionItemsToDefinitions(dropdownView, groupView.items, def.items, locale);\n            groupView.items.delegate('execute').to(dropdownView);\n            return groupView;\n        } else if (def.type === 'button' || def.type === 'switchbutton') {\n            const isToggleable = def.model.role === 'menuitemcheckbox' || def.model.role === 'menuitemradio';\n            const listItemView = new ListItemView(locale);\n            let buttonView;\n            if (def.type === 'button') {\n                buttonView = new ListItemButtonView(locale);\n                buttonView.set({\n                    isToggleable\n                });\n            } else {\n                buttonView = new SwitchButtonView(locale);\n            }\n            // Bind all model properties to the button view.\n            buttonView.bind(...Object.keys(def.model)).to(def.model);\n            buttonView.delegate('execute').to(listItemView);\n            listItemView.children.add(buttonView);\n            return listItemView;\n        }\n        return null;\n    });\n}\n\n/**\n * A helper for creating labeled inputs.\n *\n * It creates an instance of a {@link module:ui/inputtext/inputtextview~InputTextView input text} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n *\n * The helper does the following:\n *\n * * It sets input's `id` and `ariaDescribedById` attributes.\n * * It binds input's `isReadOnly` to the labeled view.\n * * It binds input's `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when user starts typing in the input.\n *\n * Usage:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, createLabeledInputText );\n * console.log( labeledInputView.fieldView ); // A text input instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n * @returns The input text view instance.\n */ const createLabeledInputText = (labeledFieldView, viewUid, statusUid)=>{\n    const inputView = new InputTextView(labeledFieldView.locale);\n    inputView.set({\n        id: viewUid,\n        ariaDescribedById: statusUid\n    });\n    inputView.bind('isReadOnly').to(labeledFieldView, 'isEnabled', (value)=>!value);\n    inputView.bind('hasError').to(labeledFieldView, 'errorText', (value)=>!!value);\n    inputView.on('input', ()=>{\n        // UX: Make the error text disappear and disable the error indicator as the user\n        // starts fixing the errors.\n        labeledFieldView.errorText = null;\n    });\n    labeledFieldView.bind('isEmpty', 'isFocused', 'placeholder').to(inputView);\n    return inputView;\n};\n/**\n * A helper for creating labeled number inputs.\n *\n * It creates an instance of a {@link module:ui/inputnumber/inputnumberview~InputNumberView input number} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n *\n * The helper does the following:\n *\n * * It sets input's `id` and `ariaDescribedById` attributes.\n * * It binds input's `isReadOnly` to the labeled view.\n * * It binds input's `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when user starts typing in the input.\n *\n * Usage:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, createLabeledInputNumber );\n * console.log( labeledInputView.fieldView ); // A number input instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n * @returns The input number view instance.\n */ const createLabeledInputNumber = (labeledFieldView, viewUid, statusUid)=>{\n    const inputView = new InputNumberView(labeledFieldView.locale);\n    inputView.set({\n        id: viewUid,\n        ariaDescribedById: statusUid,\n        inputMode: 'numeric'\n    });\n    inputView.bind('isReadOnly').to(labeledFieldView, 'isEnabled', (value)=>!value);\n    inputView.bind('hasError').to(labeledFieldView, 'errorText', (value)=>!!value);\n    inputView.on('input', ()=>{\n        // UX: Make the error text disappear and disable the error indicator as the user\n        // starts fixing the errors.\n        labeledFieldView.errorText = null;\n    });\n    labeledFieldView.bind('isEmpty', 'isFocused', 'placeholder').to(inputView);\n    return inputView;\n};\n/**\n * A helper for creating labeled textarea.\n *\n * It creates an instance of a {@link module:ui/textarea/textareaview~TextareaView textarea} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n *\n * The helper does the following:\n *\n * * It sets textarea's `id` and `ariaDescribedById` attributes.\n * * It binds textarea's `isReadOnly` to the labeled view.\n * * It binds textarea's `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when user starts typing in the textarea.\n *\n * Usage:\n *\n * ```ts\n * const labeledTextarea = new LabeledFieldView( locale, createLabeledTextarea );\n * console.log( labeledTextarea.fieldView ); // A textarea instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the textarea.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the textarea.\n * @returns The textarea view instance.\n */ const createLabeledTextarea = (labeledFieldView, viewUid, statusUid)=>{\n    const textareaView = new TextareaView(labeledFieldView.locale);\n    textareaView.set({\n        id: viewUid,\n        ariaDescribedById: statusUid\n    });\n    textareaView.bind('isReadOnly').to(labeledFieldView, 'isEnabled', (value)=>!value);\n    textareaView.bind('hasError').to(labeledFieldView, 'errorText', (value)=>!!value);\n    textareaView.on('input', ()=>{\n        // UX: Make the error text disappear and disable the error indicator as the user\n        // starts fixing the errors.\n        labeledFieldView.errorText = null;\n    });\n    labeledFieldView.bind('isEmpty', 'isFocused', 'placeholder').to(textareaView);\n    return textareaView;\n};\n/**\n * A helper for creating labeled dropdowns.\n *\n * It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} that is\n * logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled field view}.\n *\n * The helper does the following:\n *\n * * It sets dropdown's `id` and `ariaDescribedById` attributes.\n * * It binds input's `isEnabled` to the labeled view.\n *\n * Usage:\n *\n * ```ts\n * const labeledInputView = new LabeledFieldView( locale, createLabeledDropdown );\n * console.log( labeledInputView.fieldView ); // A dropdown instance.\n * ```\n *\n * @param labeledFieldView The instance of the labeled field view.\n * @param viewUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view label} and the dropdown.\n * @param statusUid A UID string that allows DOM logical connection between the\n * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view status} and the dropdown.\n * @returns The dropdown view instance.\n */ const createLabeledDropdown = (labeledFieldView, viewUid, statusUid)=>{\n    const dropdownView = createDropdown(labeledFieldView.locale);\n    dropdownView.set({\n        id: viewUid,\n        ariaDescribedById: statusUid\n    });\n    dropdownView.bind('isEnabled').to(labeledFieldView);\n    return dropdownView;\n};\n\nconst waitingTime = 150;\n/**\n * A class which represents a color picker with an input field for defining custom colors.\n */ class ColorPickerView extends View {\n    /**\n\t * Container for a `#` sign prefix and an input for displaying and defining custom colors\n\t * in HEX format.\n\t */ hexInputRow;\n    /**\n\t * Debounced function updating the `color` property in the component\n\t * and firing the `ColorPickerColorSelectedEvent`. Executed whenever color in component\n\t * is changed by the user interaction (through the palette or input).\n\t *\n\t * @private\n\t */ _debounceColorPickerEvent;\n    /**\n\t * A reference to the configuration of the color picker specified in the constructor.\n\t *\n\t * @private\n\t */ _config;\n    /**\n\t * Creates a view of color picker.\n\t *\n\t * @param locale\n\t * @param config\n\t */ constructor(locale, config = {}){\n        super(locale);\n        this.set({\n            color: '',\n            _hexColor: ''\n        });\n        this.hexInputRow = this._createInputRow();\n        const children = this.createCollection();\n        if (!config.hideInput) {\n            children.add(this.hexInputRow);\n        }\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-color-picker'\n                ],\n                tabindex: -1\n            },\n            children\n        });\n        this._config = config;\n        this._debounceColorPickerEvent = debounce((color)=>{\n            // At first, set the color internally in the component. It's converted to the configured output format.\n            this.set('color', color);\n            // Then let the outside world know that the user changed the color.\n            this.fire('colorSelected', {\n                color: this.color\n            });\n        }, waitingTime, {\n            leading: true\n        });\n        // The `color` property holds the color in the configured output format.\n        // Ensure it before actually setting the value.\n        this.on('set:color', (evt, propertyName, newValue)=>{\n            evt.return = convertColor(newValue, this._config.format || 'hsl');\n        });\n        // The `_hexColor` property is bound to the `color` one, but requires conversion.\n        this.on('change:color', ()=>{\n            this._hexColor = convertColorToCommonHexFormat(this.color);\n        });\n        this.on('change:_hexColor', ()=>{\n            // Update the selected color in the color picker palette when it's not focused.\n            // It means the user typed the color in the input.\n            if (document.activeElement !== this.picker) {\n                this.picker.setAttribute('color', this._hexColor);\n            }\n            // There has to be two way binding between properties.\n            // Extra precaution has to be taken to trigger change back only when the color really changes.\n            if (convertColorToCommonHexFormat(this.color) != convertColorToCommonHexFormat(this._hexColor)) {\n                this.color = this._hexColor;\n            }\n        });\n    }\n    /**\n\t * Renders color picker in the view.\n\t */ render() {\n        super.render();\n        // Extracted to the helper to make it testable.\n        registerCustomElement('hex-color-picker', HexBase);\n        this.picker = global.document.createElement('hex-color-picker');\n        this.picker.setAttribute('class', 'hex-color-picker');\n        this.picker.setAttribute('tabindex', '-1');\n        this._createSlidersView();\n        if (this.element) {\n            if (this.hexInputRow.element) {\n                this.element.insertBefore(this.picker, this.hexInputRow.element);\n            } else {\n                this.element.appendChild(this.picker);\n            }\n            // Create custom stylesheet with a look of focused pointer in color picker and append it into the color picker shadowDom\n            const styleSheetForFocusedColorPicker = document.createElement('style');\n            styleSheetForFocusedColorPicker.textContent = '[role=\"slider\"]:focus [part$=\"pointer\"] {' + 'border: 1px solid #fff;' + 'outline: 1px solid var(--ck-color-focus-border);' + 'box-shadow: 0 0 0 2px #fff;' + '}';\n            this.picker.shadowRoot.appendChild(styleSheetForFocusedColorPicker);\n        }\n        this.picker.addEventListener('color-changed', (event)=>{\n            const color = event.detail.value;\n            this._debounceColorPickerEvent(color);\n        });\n    }\n    /**\n\t * Focuses the first pointer in color picker.\n\t *\n\t */ focus() {\n        // In some browsers we need to move the focus to the input first.\n        // Otherwise, the color picker doesn't behave as expected.\n        // In FF, after selecting the color via slider, it instantly moves back to the previous color.\n        // In all iOS browsers and desktop Safari, once the saturation slider is moved for the first time,\n        // editor collapses the selection and doesn't apply the color change.\n        // See: https://github.com/cksource/ckeditor5-internal/issues/3245, https://github.com/ckeditor/ckeditor5/issues/14119,\n        // https://github.com/cksource/ckeditor5-internal/issues/3268.\n        /* istanbul ignore next -- @preserve */ if (!this._config.hideInput && (env.isGecko || env.isiOS || env.isSafari)) {\n            const input = this.hexInputRow.children.get(1);\n            input.focus();\n        }\n        const firstSlider = this.slidersView.first;\n        firstSlider.focus();\n    }\n    /**\n\t * Creates collection of sliders in color picker.\n\t *\n\t * @private\n\t */ _createSlidersView() {\n        const colorPickersChildren = [\n            ...this.picker.shadowRoot.children\n        ];\n        const sliders = colorPickersChildren.filter((item)=>item.getAttribute('role') === 'slider');\n        const slidersView = sliders.map((slider)=>{\n            const view = new SliderView(slider);\n            return view;\n        });\n        this.slidersView = this.createCollection();\n        slidersView.forEach((item)=>{\n            this.slidersView.add(item);\n        });\n    }\n    /**\n\t * Creates input row for defining custom colors in color picker.\n\t *\n\t * @private\n\t */ _createInputRow() {\n        const colorInput = this._createColorInput();\n        return new ColorPickerInputRowView(this.locale, colorInput);\n    }\n    /**\n\t * Creates the input where user can type or paste the color in hex format.\n\t *\n\t * @private\n\t */ _createColorInput() {\n        const labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n        const { t } = this.locale;\n        labeledInput.set({\n            label: t('HEX'),\n            class: 'color-picker-hex-input'\n        });\n        labeledInput.fieldView.bind('value').to(this, '_hexColor', (pickerColor)=>{\n            if (labeledInput.isFocused) {\n                // Text field shouldn't be updated with color change if the text field is focused.\n                // Imagine user typing hex code and getting the value of field changed.\n                return labeledInput.fieldView.value;\n            } else {\n                return pickerColor.startsWith('#') ? pickerColor.substring(1) : pickerColor;\n            }\n        });\n        // Only accept valid hex colors as input.\n        labeledInput.fieldView.on('input', ()=>{\n            const inputValue = labeledInput.fieldView.element.value;\n            if (inputValue) {\n                const maybeHexColor = tryParseHexColor(inputValue);\n                if (maybeHexColor) {\n                    // If so, set the color.\n                    // Otherwise, do nothing.\n                    this._debounceColorPickerEvent(maybeHexColor);\n                }\n            }\n        });\n        return labeledInput;\n    }\n    /**\n\t * Validates the view and returns `false` when some fields are invalid.\n\t */ isValid() {\n        const { t } = this.locale;\n        // If the input is hidden, it's always valid, because there is no way to select\n        // invalid color value using diagram color picker.\n        if (this._config.hideInput) {\n            return true;\n        }\n        this.resetValidationStatus();\n        // One error per field is enough.\n        if (!this.hexInputRow.getParsedColor()) {\n            // Apply updated error.\n            this.hexInputRow.inputView.errorText = t('Please enter a valid color (e.g. \"ff0000\").');\n            return false;\n        }\n        return true;\n    }\n    /**\n\t * Cleans up the supplementary error and information text of input inside the {@link #hexInputRow}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */ resetValidationStatus() {\n        this.hexInputRow.inputView.errorText = null;\n    }\n}\n// Converts any color format to a unified hex format.\n//\n// @param inputColor\n// @returns An unified hex string.\nfunction convertColorToCommonHexFormat(inputColor) {\n    let ret = convertToHex(inputColor);\n    if (!ret) {\n        ret = '#000';\n    }\n    if (ret.length === 4) {\n        // Unfold shortcut format.\n        ret = '#' + [\n            ret[1],\n            ret[1],\n            ret[2],\n            ret[2],\n            ret[3],\n            ret[3]\n        ].join('');\n    }\n    return ret.toLowerCase();\n}\n// View abstraction over pointer in color picker.\nclass SliderView extends View {\n    /**\n\t * @param element HTML element of slider in color picker.\n\t */ constructor(element){\n        super();\n        this.element = element;\n    }\n    /**\n\t * Focuses element.\n\t */ focus() {\n        this.element.focus();\n    }\n}\n// View abstraction over the `#` character before color input.\nclass HashView extends View {\n    constructor(locale){\n        super(locale);\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-color-picker__hash-view'\n                ]\n            },\n            children: '#'\n        });\n    }\n}\n// The class representing a row containing hex color input field.\n// **Note**: For now this class is private. When more use cases appear (beyond `ckeditor5-table` and `ckeditor5-image`),\n// it will become a component in `ckeditor5-ui`.\n//\n// @private\nclass ColorPickerInputRowView extends View {\n    /**\n\t * A collection of row items (buttons, dropdowns, etc.).\n\t */ children;\n    /**\n\t * Hex input view element.\n\t */ inputView;\n    /**\n\t * Creates an instance of the form row class.\n\t *\n\t * @param locale The locale instance.\n\t * @param inputView Hex color input element.\n\t */ constructor(locale, inputView){\n        super(locale);\n        this.inputView = inputView;\n        this.children = this.createCollection([\n            new HashView(),\n            this.inputView\n        ]);\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-color-picker__row'\n                ]\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * Returns false if color input value is not in hex format.\n\t */ getParsedColor() {\n        return tryParseHexColor(this.inputView.fieldView.element.value);\n    }\n}\n/**\n * Trim spaces from provided color and check if hex is valid.\n *\n * @param color Unsafe color string.\n * @returns Null if provided color is not hex value.\n * @export\n */ function tryParseHexColor(color) {\n    if (!color) {\n        return null;\n    }\n    const hashLessColor = color.trim().replace(/^#/, '');\n    // Incorrect length.\n    if (![\n        3,\n        4,\n        6,\n        8\n    ].includes(hashLessColor.length)) {\n        return null;\n    }\n    // Incorrect characters.\n    if (!/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(hashLessColor)) {\n        return null;\n    }\n    return `#${hashLessColor}`;\n}\n\n/**\n * A collection to store document colors. It enforces colors to be unique.\n */ class DocumentColorCollection extends /* #__PURE__ */ ObservableMixin(Collection) {\n    constructor(options){\n        super(options);\n        this.set('isEmpty', true);\n        this.on('change', ()=>{\n            this.set('isEmpty', this.length === 0);\n        });\n    }\n    /**\n\t * Adds a color to the document color collection.\n\t *\n\t * This method ensures that no color duplicates are inserted (compared using\n\t * the color value of the {@link module:ui/colorgrid/colorgridview~ColorDefinition}).\n\t *\n\t * If the item does not have an ID, it will be automatically generated and set on the item.\n\t *\n\t * @param index The position of the item in the collection. The item is pushed to the collection when `index` is not specified.\n\t * @fires add\n\t * @fires change\n\t */ add(item, index) {\n        if (this.find((element)=>element.color === item.color)) {\n            // No duplicates are allowed.\n            return this;\n        }\n        return super.add(item, index);\n    }\n    /**\n\t * Checks if an object with given colors is present in the document color collection.\n\t */ hasColor(color) {\n        return !!this.find((item)=>item.color === color);\n    }\n}\n\n/**\n * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n *\n * It provides a UI that allows users to select colors from the a predefined set and from existing document colors.\n *\n * It consists of the following sub–components:\n *\n * * A \"Remove color\" button,\n * * A static {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors defined in the configuration,\n * * A dynamic {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors used in the document.\n * * If color picker is configured, the \"Color Picker\" button is visible too.\n */ class ColorGridsFragmentView extends View {\n    /**\n\t * A collection of the children of the table.\n\t */ items;\n    /**\n\t * An array with objects representing colors to be displayed in the grid.\n\t */ colorDefinitions;\n    /**\n\t * Tracks information about the DOM focus in the list.\n\t */ focusTracker;\n    /**\n\t * The number of columns in the color grid.\n\t */ columns;\n    /**\n\t * Preserves the reference to {@link module:ui/colorselector/documentcolorcollection~DocumentColorCollection} used to collect\n\t * definitions that store the document colors.\n\t *\n\t * @readonly\n\t */ documentColors;\n    /**\n\t * The maximum number of colors in the document colors section.\n\t * If it equals 0, the document colors section is not added.\n\t *\n\t * @readonly\n\t */ documentColorsCount;\n    /**\n\t * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t * the default (static) color set.\n\t *\n\t * The property is loaded once the the parent dropdown is opened the first time.\n\t *\n\t * @readonly\n\t */ staticColorsGrid;\n    /**\n\t * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t * the document colors. It remains undefined if the document colors feature is disabled.\n\t *\n\t * The property is loaded once the the parent dropdown is opened the first time.\n\t *\n\t * @readonly\n\t */ documentColorsGrid;\n    /**\n\t * The \"Color picker\" button view.\n\t */ colorPickerButtonView;\n    /**\n\t * The \"Remove color\" button view.\n\t */ removeColorButtonView;\n    /**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */ _focusables;\n    /**\n\t * Document color section's label.\n\t *\n\t * @readonly\n\t */ _documentColorsLabel;\n    /**\n\t * The label of the button responsible for removing color attributes.\n\t */ _removeButtonLabel;\n    /**\n\t * The label of the button responsible for switching to the color picker component.\n\t */ _colorPickerLabel;\n    /**\n\t * Creates an instance of the view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param colors An array with definitions of colors to be displayed in the table.\n\t * @param columns The number of columns in the color grid.\n\t * @param removeButtonLabel The label of the button responsible for removing the color.\n\t * @param colorPickerLabel The label of the button responsible for color picker appearing.\n\t * @param documentColorsLabel The label for the section with the document colors.\n\t * @param documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t * @param focusTracker Tracks information about the DOM focus in the list.\n\t * @param focusables A collection of views that can be focused in the view.\n\t */ constructor(locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, focusTracker, focusables }){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('isVisible', true);\n        this.focusTracker = focusTracker;\n        this.items = this.createCollection();\n        this.colorDefinitions = colors;\n        this.columns = columns;\n        this.documentColors = new DocumentColorCollection();\n        this.documentColorsCount = documentColorsCount;\n        this._focusables = focusables;\n        this._removeButtonLabel = removeButtonLabel;\n        this._colorPickerLabel = colorPickerLabel;\n        this._documentColorsLabel = documentColorsLabel;\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck-color-grids-fragment',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ]\n            },\n            children: this.items\n        });\n        this.removeColorButtonView = this._createRemoveColorButton();\n        this.items.add(this.removeColorButtonView);\n    }\n    /**\n\t * Scans through the editor model and searches for text node attributes with the given attribute name.\n\t * Found entries are set as document colors.\n\t *\n\t * All the previously stored document colors will be lost in the process.\n\t *\n\t * @param model The model used as a source to obtain the document colors.\n\t * @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t */ updateDocumentColors(model, attributeName) {\n        const document = model.document;\n        const maxCount = this.documentColorsCount;\n        this.documentColors.clear();\n        for (const root of document.getRoots()){\n            const range = model.createRangeIn(root);\n            for (const node of range.getItems()){\n                if (node.is('$textProxy') && node.hasAttribute(attributeName)) {\n                    this._addColorToDocumentColors(node.getAttribute(attributeName));\n                    if (this.documentColors.length >= maxCount) {\n                        return;\n                    }\n                }\n            }\n        }\n    }\n    /**\n\t * Refreshes the state of the selected color in one or both {@link module:ui/colorgrid/colorgridview~ColorGridView}s\n\t * available in the {@link module:ui/colorselector/colorselectorview~ColorSelectorView}. It guarantees that the selection will\n\t * occur only in one of them.\n\t */ updateSelectedColors() {\n        const documentColorsGrid = this.documentColorsGrid;\n        const staticColorsGrid = this.staticColorsGrid;\n        const selectedColor = this.selectedColor;\n        staticColorsGrid.selectedColor = selectedColor;\n        if (documentColorsGrid) {\n            documentColorsGrid.selectedColor = selectedColor;\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.staticColorsGrid = this._createStaticColorsGrid();\n        this.items.add(this.staticColorsGrid);\n        if (this.documentColorsCount) {\n            // Create a label for document colors.\n            const bind = Template.bind(this.documentColors, this.documentColors);\n            const label = new View(this.locale);\n            label.setTemplate({\n                tag: 'span',\n                attributes: {\n                    class: [\n                        'ck',\n                        'ck-color-grid__label',\n                        bind.if('isEmpty', 'ck-hidden')\n                    ]\n                },\n                children: [\n                    {\n                        text: this._documentColorsLabel\n                    }\n                ]\n            });\n            this.items.add(label);\n            this.documentColorsGrid = this._createDocumentColorsGrid();\n            this.items.add(this.documentColorsGrid);\n        }\n        this._createColorPickerButton();\n        this._addColorSelectorElementsToFocusTracker();\n    }\n    /**\n\t * Focuses the component.\n\t */ focus() {\n        this.removeColorButtonView.focus();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n    }\n    /**\n\t * Handles displaying the color picker button (if it was previously created) and making it focusable.\n\t */ addColorPickerButton() {\n        if (this.colorPickerButtonView) {\n            this.items.add(this.colorPickerButtonView);\n            this.focusTracker.add(this.colorPickerButtonView.element);\n            this._focusables.add(this.colorPickerButtonView);\n        }\n    }\n    /**\n\t * Adds color selector elements to focus tracker.\n\t */ _addColorSelectorElementsToFocusTracker() {\n        this.focusTracker.add(this.removeColorButtonView.element);\n        this._focusables.add(this.removeColorButtonView);\n        if (this.staticColorsGrid) {\n            this.focusTracker.add(this.staticColorsGrid.element);\n            this._focusables.add(this.staticColorsGrid);\n        }\n        if (this.documentColorsGrid) {\n            this.focusTracker.add(this.documentColorsGrid.element);\n            this._focusables.add(this.documentColorsGrid);\n        }\n    }\n    /**\n\t * Creates the button responsible for displaying the color picker component.\n\t */ _createColorPickerButton() {\n        this.colorPickerButtonView = new ButtonView();\n        this.colorPickerButtonView.set({\n            label: this._colorPickerLabel,\n            withText: true,\n            icon: icons.colorPalette,\n            class: 'ck-color-selector__color-picker'\n        });\n        this.colorPickerButtonView.on('execute', ()=>{\n            this.fire('colorPicker:show');\n        });\n    }\n    /**\n\t * Adds the remove color button as a child of the current view.\n\t */ _createRemoveColorButton() {\n        const buttonView = new ButtonView();\n        buttonView.set({\n            withText: true,\n            icon: icons.eraser,\n            label: this._removeButtonLabel\n        });\n        buttonView.class = 'ck-color-selector__remove-color';\n        buttonView.on('execute', ()=>{\n            this.fire('execute', {\n                value: null,\n                source: 'removeColorButton'\n            });\n        });\n        buttonView.render();\n        return buttonView;\n    }\n    /**\n\t * Creates a static color grid based on the editor configuration.\n\t */ _createStaticColorsGrid() {\n        const colorGrid = new ColorGridView(this.locale, {\n            colorDefinitions: this.colorDefinitions,\n            columns: this.columns\n        });\n        colorGrid.on('execute', (evt, data)=>{\n            this.fire('execute', {\n                value: data.value,\n                source: 'staticColorsGrid'\n            });\n        });\n        return colorGrid;\n    }\n    /**\n\t * Creates the document colors section view and binds it to {@link #documentColors}.\n\t */ _createDocumentColorsGrid() {\n        const bind = Template.bind(this.documentColors, this.documentColors);\n        const documentColorsGrid = new ColorGridView(this.locale, {\n            columns: this.columns\n        });\n        documentColorsGrid.extendTemplate({\n            attributes: {\n                class: bind.if('isEmpty', 'ck-hidden')\n            }\n        });\n        documentColorsGrid.items.bindTo(this.documentColors).using((colorObj)=>{\n            const colorTile = new ColorTileView();\n            colorTile.set({\n                color: colorObj.color,\n                hasBorder: colorObj.options && colorObj.options.hasBorder\n            });\n            if (colorObj.label) {\n                colorTile.set({\n                    label: colorObj.label,\n                    tooltip: true\n                });\n            }\n            colorTile.on('execute', ()=>{\n                this.fire('execute', {\n                    value: colorObj.color,\n                    source: 'documentColorsGrid'\n                });\n            });\n            return colorTile;\n        });\n        // Selected color should be cleared when document colors became empty.\n        this.documentColors.on('change:isEmpty', (evt, name, val)=>{\n            if (val) {\n                documentColorsGrid.selectedColor = null;\n            }\n        });\n        return documentColorsGrid;\n    }\n    /**\n\t * Adds a given color to the document colors list. If possible, the method will attempt to use\n\t * data from the {@link #colorDefinitions} (label, color options).\n\t *\n\t * @param color A string that stores the value of the recently applied color.\n\t */ _addColorToDocumentColors(color) {\n        const predefinedColor = this.colorDefinitions.find((definition)=>definition.color === color);\n        if (!predefinedColor) {\n            this.documentColors.add({\n                color,\n                label: color,\n                options: {\n                    hasBorder: false\n                }\n            });\n        } else {\n            this.documentColors.add(Object.assign({}, predefinedColor));\n        }\n    }\n}\n\n/**\n * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n *\n * It allows users to select a color from a color picker.\n *\n * It consists of the following sub–components:\n *\n * * A color picker saturation and hue sliders,\n * * A text input accepting colors in HEX format,\n * * \"Save\" and \"Cancel\" action buttons.\n */ class ColorPickerFragmentView extends View {\n    /**\n\t * A collection of component's children.\n\t */ items;\n    /**\n\t * A view with saturation and hue sliders and color input.\n\t */ colorPickerView;\n    /**\n\t * The \"Save\" button view.\n\t */ saveButtonView;\n    /**\n\t * The \"Cancel\" button view.\n\t */ cancelButtonView;\n    /**\n\t * The action bar where are \"Save\" button and \"Cancel\" button.\n\t */ actionBarView;\n    /**\n\t * Tracks information about the DOM focus in the list.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */ _focusables;\n    /**\n\t * A reference to the configuration of {@link #colorPickerView}. `false` when the view was\n\t * configured without a color picker.\n\t *\n\t * @readonly\n\t */ _colorPickerViewConfig;\n    /**\n\t * Creates an instance of the view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param focusTracker Tracks information about the DOM focus in the list.\n\t * @param focusables A collection of views that can be focused in the view..\n\t * @param keystrokes An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t * @param colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker\n\t * will not be rendered.\n\t */ constructor(locale, { focusTracker, focusables, keystrokes, colorPickerViewConfig }){\n        super(locale);\n        this.items = this.createCollection();\n        this.focusTracker = focusTracker;\n        this.keystrokes = keystrokes;\n        this.set('isVisible', false);\n        this.set('selectedColor', undefined);\n        this._focusables = focusables;\n        this._colorPickerViewConfig = colorPickerViewConfig;\n        const bind = this.bindTemplate;\n        const { saveButtonView, cancelButtonView } = this._createActionButtons();\n        this.saveButtonView = saveButtonView;\n        this.cancelButtonView = cancelButtonView;\n        this.actionBarView = this._createActionBarView({\n            saveButtonView,\n            cancelButtonView\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck-color-picker-fragment',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ]\n            },\n            children: this.items\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        const colorPickerView = new ColorPickerView(this.locale, {\n            ...this._colorPickerViewConfig\n        });\n        this.colorPickerView = colorPickerView;\n        this.colorPickerView.render();\n        if (this.selectedColor) {\n            colorPickerView.color = this.selectedColor;\n        }\n        this.listenTo(this, 'change:selectedColor', (evt, name, value)=>{\n            colorPickerView.color = value;\n        });\n        this.items.add(this.colorPickerView);\n        this.items.add(this.actionBarView);\n        this._addColorPickersElementsToFocusTracker();\n        this._stopPropagationOnArrowsKeys();\n        this._executeOnEnterPress();\n        this._executeUponColorChange();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n    }\n    /**\n\t * Focuses the color picker.\n\t */ focus() {\n        this.colorPickerView.focus();\n    }\n    /**\n\t * Reset validation messages.\n\t */ resetValidationStatus() {\n        this.colorPickerView.resetValidationStatus();\n    }\n    /**\n\t * When color picker is focused and \"enter\" is pressed it executes command.\n\t */ _executeOnEnterPress() {\n        this.keystrokes.set('enter', (evt)=>{\n            if (this.isVisible && this.focusTracker.focusedElement !== this.cancelButtonView.element && this.colorPickerView.isValid()) {\n                this.fire('execute', {\n                    value: this.selectedColor\n                });\n                evt.stopPropagation();\n                evt.preventDefault();\n            }\n        });\n    }\n    /**\n\t * Removes default behavior of arrow keys in dropdown.\n\t */ _stopPropagationOnArrowsKeys() {\n        const stopPropagation = (data)=>data.stopPropagation();\n        this.keystrokes.set('arrowright', stopPropagation);\n        this.keystrokes.set('arrowleft', stopPropagation);\n        this.keystrokes.set('arrowup', stopPropagation);\n        this.keystrokes.set('arrowdown', stopPropagation);\n    }\n    /**\n\t * Adds color picker elements to focus tracker.\n\t */ _addColorPickersElementsToFocusTracker() {\n        for (const slider of this.colorPickerView.slidersView){\n            this.focusTracker.add(slider.element);\n            this._focusables.add(slider);\n        }\n        const input = this.colorPickerView.hexInputRow.children.get(1);\n        if (input.element) {\n            this.focusTracker.add(input.element);\n            this._focusables.add(input);\n        }\n        this.focusTracker.add(this.saveButtonView.element);\n        this._focusables.add(this.saveButtonView);\n        this.focusTracker.add(this.cancelButtonView.element);\n        this._focusables.add(this.cancelButtonView);\n    }\n    /**\n\t * Creates bar containing \"Save\" and \"Cancel\" buttons.\n\t */ _createActionBarView({ saveButtonView, cancelButtonView }) {\n        const actionBarRow = new View();\n        const children = this.createCollection();\n        children.add(saveButtonView);\n        children.add(cancelButtonView);\n        actionBarRow.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-color-selector_action-bar'\n                ]\n            },\n            children\n        });\n        return actionBarRow;\n    }\n    /**\n\t * Creates \"Save\" and \"Cancel\" buttons.\n\t */ _createActionButtons() {\n        const locale = this.locale;\n        const t = locale.t;\n        const saveButtonView = new ButtonView(locale);\n        const cancelButtonView = new ButtonView(locale);\n        saveButtonView.set({\n            icon: icons.check,\n            class: 'ck-button-save',\n            type: 'button',\n            withText: false,\n            label: t('Accept')\n        });\n        cancelButtonView.set({\n            icon: icons.cancel,\n            class: 'ck-button-cancel',\n            type: 'button',\n            withText: false,\n            label: t('Cancel')\n        });\n        saveButtonView.on('execute', ()=>{\n            if (this.colorPickerView.isValid()) {\n                this.fire('execute', {\n                    source: 'colorPickerSaveButton',\n                    value: this.selectedColor\n                });\n            }\n        });\n        cancelButtonView.on('execute', ()=>{\n            this.fire('colorPicker:cancel');\n        });\n        return {\n            saveButtonView,\n            cancelButtonView\n        };\n    }\n    /**\n\t * Fires the `execute` event if color in color picker has been changed\n\t * by the user.\n\t */ _executeUponColorChange() {\n        this.colorPickerView.on('colorSelected', (evt, data)=>{\n            this.fire('execute', {\n                value: data.color,\n                source: 'colorPicker'\n            });\n            this.set('selectedColor', data.color);\n        });\n    }\n}\n\n/**\n * The configurable color selector view class. It allows users to select colors from a predefined set of colors as well as from\n * a color picker.\n *\n * This meta-view is is made of two components (fragments):\n *\n * * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorGridsFragmentView},\n * * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView}.\n *\n * ```ts\n * const colorDefinitions = [\n * \t{ color: '#000', label: 'Black', options: { hasBorder: false } },\n * \t{ color: 'rgb(255, 255, 255)', label: 'White', options: { hasBorder: true } },\n * \t{ color: 'red', label: 'Red', options: { hasBorder: false } }\n * ];\n *\n * const selectorView = new ColorSelectorView( locale, {\n * \tcolors: colorDefinitions,\n * \tcolumns: 5,\n * \tremoveButtonLabel: 'Remove color',\n * \tdocumentColorsLabel: 'Document colors',\n * \tdocumentColorsCount: 4,\n * \tcolorPickerViewConfig: {\n * \t\tformat: 'hsl'\n * \t}\n * } );\n *\n * selectorView.appendUI();\n * selectorView.selectedColor = 'red';\n * selectorView.updateSelectedColors();\n *\n * selectorView.on<ColorSelectorExecuteEvent>( 'execute', ( evt, data ) => {\n * \tconsole.log( 'Color changed', data.value, data.source );\n * } );\n *\n * selectorView.on<ColorSelectorColorPickerShowEvent>( 'colorPicker:show', ( evt ) => {\n * \tconsole.log( 'Color picker showed up', evt );\n * } );\n *\n * selectorView.on<ColorSelectorColorPickerCancelEvent>( 'colorPicker:cancel', ( evt ) => {\n * \tconsole.log( 'Color picker cancel', evt );\n * } );\n *\n * selectorView.render();\n *\n * document.body.appendChild( selectorView.element );\n * ```\n */ class ColorSelectorView extends View {\n    /**\n\t * Tracks information about the DOM focus in the list.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * A collection of components.\n\t */ items;\n    /**\n\t * A fragment that allows users to select colors from the a predefined set and from existing document colors.\n\t */ colorGridsFragmentView;\n    /**\n\t * A fragment that allows users to select a color from a color picker.\n\t */ colorPickerFragmentView;\n    /**\n\t * Helps cycling over focusable {@link #items} in the list.\n\t *\n\t * @readonly\n\t */ _focusCycler;\n    /**\n\t * A collection of views that can be focused in the view.\n\t *\n\t * @readonly\n\t */ _focusables;\n    /**\n\t * The configuration of color picker sub-component.\n\t */ _colorPickerViewConfig;\n    /**\n\t * Creates a view to be inserted as a child of {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param colors An array with definitions of colors to be displayed in the table.\n\t * @param columns The number of columns in the color grid.\n\t * @param removeButtonLabel The label of the button responsible for removing the color.\n\t * @param colorPickerLabel The label of the button responsible for color picker appearing.\n\t * @param documentColorsLabel The label for the section with the document colors.\n\t * @param documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t * @param colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker will be hidden.\n\t */ constructor(locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, colorPickerViewConfig }){\n        super(locale);\n        this.items = this.createCollection();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this._focusables = new ViewCollection();\n        this._colorPickerViewConfig = colorPickerViewConfig;\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate list items backwards using the <kbd>Shift</kbd> + <kbd>Tab</kbd> keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate list items forwards using the <kbd>Tab</kbd> key.\n                focusNext: 'tab'\n            }\n        });\n        this.colorGridsFragmentView = new ColorGridsFragmentView(locale, {\n            colors,\n            columns,\n            removeButtonLabel,\n            documentColorsLabel,\n            documentColorsCount,\n            colorPickerLabel,\n            focusTracker: this.focusTracker,\n            focusables: this._focusables\n        });\n        this.colorPickerFragmentView = new ColorPickerFragmentView(locale, {\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokes: this.keystrokes,\n            colorPickerViewConfig\n        });\n        this.set('_isColorGridsFragmentVisible', true);\n        this.set('_isColorPickerFragmentVisible', false);\n        this.set('selectedColor', undefined);\n        this.colorGridsFragmentView.bind('isVisible').to(this, '_isColorGridsFragmentVisible');\n        this.colorPickerFragmentView.bind('isVisible').to(this, '_isColorPickerFragmentVisible');\n        /**\n\t\t * This is kind of bindings. Unfortunately we could not use this.bind() method because the same property\n\t\t * can not be bound twice. So this is work around how to bind 'selectedColor' property between components.\n\t\t */ this.on('change:selectedColor', (evt, evtName, data)=>{\n            this.colorGridsFragmentView.set('selectedColor', data);\n            this.colorPickerFragmentView.set('selectedColor', data);\n        });\n        this.colorGridsFragmentView.on('change:selectedColor', (evt, evtName, data)=>{\n            this.set('selectedColor', data);\n        });\n        this.colorPickerFragmentView.on('change:selectedColor', (evt, evtName, data)=>{\n            this.set('selectedColor', data);\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-color-selector'\n                ]\n            },\n            children: this.items\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Renders the internals of the component on demand:\n\t * * {@link #colorPickerFragmentView},\n\t * * {@link #colorGridsFragmentView}.\n\t *\n\t * It allows for deferring component initialization to improve the performance.\n\t *\n\t * See {@link #showColorPickerFragment}, {@link #showColorGridsFragment}.\n\t */ appendUI() {\n        this._appendColorGridsFragment();\n        if (this._colorPickerViewConfig) {\n            this._appendColorPickerFragment();\n        }\n    }\n    /**\n\t * Shows the {@link #colorPickerFragmentView} and hides the {@link #colorGridsFragmentView}.\n\t *\n\t * **Note**: It requires {@link #appendUI} to be called first.\n\t *\n\t * See {@link #showColorGridsFragment}, {@link ~ColorSelectorView#event:colorPicker:show}.\n\t */ showColorPickerFragment() {\n        if (!this.colorPickerFragmentView.colorPickerView || this._isColorPickerFragmentVisible) {\n            return;\n        }\n        this._isColorPickerFragmentVisible = true;\n        this.colorPickerFragmentView.focus();\n        this.colorPickerFragmentView.resetValidationStatus();\n        this._isColorGridsFragmentVisible = false;\n    }\n    /**\n\t * Shows the {@link #colorGridsFragmentView} and hides the {@link #colorPickerFragmentView}.\n\t *\n\t * See {@link #showColorPickerFragment}.\n\t *\n\t * **Note**: It requires {@link #appendUI} to be called first.\n\t */ showColorGridsFragment() {\n        if (this._isColorGridsFragmentVisible) {\n            return;\n        }\n        this._isColorGridsFragmentVisible = true;\n        this.colorGridsFragmentView.focus();\n        this._isColorPickerFragmentVisible = false;\n    }\n    /**\n\t * Focuses the first focusable element in {@link #items}.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Focuses the last focusable element in {@link #items}.\n\t */ focusLast() {\n        this._focusCycler.focusLast();\n    }\n    /**\n\t * Scans through the editor model and searches for text node attributes with the given `attributeName`.\n\t * Found entries are set as document colors in {@link #colorGridsFragmentView}.\n\t *\n\t * All the previously stored document colors will be lost in the process.\n\t *\n\t * @param model The model used as a source to obtain the document colors.\n\t * @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t */ updateDocumentColors(model, attributeName) {\n        this.colorGridsFragmentView.updateDocumentColors(model, attributeName);\n    }\n    /**\n\t * Refreshes the state of the selected color in one or both grids located in {@link #colorGridsFragmentView}.\n\t *\n\t * It guarantees that the selection will occur only in one of them.\n\t */ updateSelectedColors() {\n        this.colorGridsFragmentView.updateSelectedColors();\n    }\n    /**\n\t * Appends the view containing static and document color grid views.\n\t */ _appendColorGridsFragment() {\n        if (this.items.length) {\n            return;\n        }\n        this.items.add(this.colorGridsFragmentView);\n        this.colorGridsFragmentView.delegate('execute').to(this);\n        this.colorGridsFragmentView.delegate('colorPicker:show').to(this);\n    }\n    /**\n\t * Appends the view with the color picker.\n\t */ _appendColorPickerFragment() {\n        if (this.items.length === 2) {\n            return;\n        }\n        this.items.add(this.colorPickerFragmentView);\n        if (this.colorGridsFragmentView.colorPickerButtonView) {\n            this.colorGridsFragmentView.colorPickerButtonView.on('execute', ()=>{\n                this.showColorPickerFragment();\n            });\n        }\n        this.colorGridsFragmentView.addColorPickerButton();\n        this.colorPickerFragmentView.delegate('execute').to(this);\n        this.colorPickerFragmentView.delegate('colorPicker:cancel').to(this);\n    }\n}\n\n/**\n * A helper class implementing the UI component ({@link module:ui/view~View view}) factory.\n *\n * It allows functions producing specific UI components to be registered under their unique names\n * in the factory. A registered component can be then instantiated by providing its name.\n * Note that the names are case insensitive.\n *\n * ```ts\n * // The editor provides localization tools for the factory.\n * const factory = new ComponentFactory( editor );\n *\n * factory.add( 'foo', locale => new FooView( locale ) );\n * factory.add( 'bar', locale => new BarView( locale ) );\n *\n * // An instance of FooView.\n * const fooInstance = factory.create( 'foo' );\n *\n * // Names are case insensitive so this is also allowed:\n * const barInstance = factory.create( 'Bar' );\n * ```\n *\n * The {@link module:core/editor/editor~Editor#locale editor locale} is passed to the factory\n * function when {@link module:ui/componentfactory~ComponentFactory#create} is called.\n */ class ComponentFactory {\n    /**\n\t * The editor instance that the factory belongs to.\n\t */ editor;\n    /**\n\t * Registered component factories.\n\t */ _components = new Map();\n    /**\n\t * Creates an instance of the factory.\n\t *\n\t * @param editor The editor instance.\n\t */ constructor(editor){\n        this.editor = editor;\n    }\n    /**\n\t * Returns an iterator of registered component names. Names are returned in lower case.\n\t */ *names() {\n        for (const value of this._components.values()){\n            yield value.originalName;\n        }\n    }\n    /**\n\t * Registers a component factory function that will be used by the\n\t * {@link #create create} method and called with the\n\t * {@link module:core/editor/editor~Editor#locale editor locale} as an argument,\n\t * allowing localization of the {@link module:ui/view~View view}.\n\t *\n\t * @param name The name of the component.\n\t * @param callback The callback that returns the component.\n\t */ add(name, callback) {\n        this._components.set(getNormalized(name), {\n            callback,\n            originalName: name\n        });\n    }\n    /**\n\t * Creates an instance of a component registered in the factory under a specific name.\n\t *\n\t * When called, the {@link module:core/editor/editor~Editor#locale editor locale} is passed to\n\t * the previously {@link #add added} factory function, allowing localization of the\n\t * {@link module:ui/view~View view}.\n\t *\n\t * @param name The name of the component.\n\t * @returns The instantiated component view.\n\t */ create(name) {\n        if (!this.has(name)) {\n            /**\n\t\t\t * The required component is not registered in the component factory. Please make sure\n\t\t\t * the provided name is correct and the component has been correctly\n\t\t\t * {@link module:ui/componentfactory~ComponentFactory#add added} to the factory.\n\t\t\t *\n\t\t\t * @error componentfactory-item-missing\n\t\t\t * @param name The name of the missing component.\n\t\t\t */ throw new CKEditorError('componentfactory-item-missing', this, {\n                name\n            });\n        }\n        return this._components.get(getNormalized(name)).callback(this.editor.locale);\n    }\n    /**\n\t * Checks if a component of a given name is registered in the factory.\n\t *\n\t * @param name The name of the component.\n\t */ has(name) {\n        return this._components.has(getNormalized(name));\n    }\n}\n/**\n * Ensures that the component name used as the key in the internal map is in lower case.\n */ function getNormalized(name) {\n    return String(name).toLowerCase();\n}\n\nconst BALLOON_CLASS = 'ck-tooltip';\n/**\n * A tooltip manager class for the UI of the editor.\n *\n * **Note**: Most likely you do not have to use the `TooltipManager` API listed below in order to display tooltips. Popular\n * {@glink framework/architecture/ui-library UI components} support tooltips out-of-the-box via observable properties\n * (see {@link module:ui/button/buttonview~ButtonView#tooltip} and {@link module:ui/button/buttonview~ButtonView#tooltipPosition}).\n *\n * # Displaying tooltips\n *\n * To display a tooltip, set `data-cke-tooltip-text` attribute on any DOM element:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'My tooltip';\n * ```\n *\n * The tooltip will show up whenever the user moves the mouse over the element or the element gets focus in DOM.\n *\n * # Positioning tooltips\n *\n * To change the position of the tooltip, use the `data-cke-tooltip-position` attribute (`s`, `se`, `sw`, `n`, `e`, or `w`):\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Tooltip to the north';\n * domElement.dataset.ckeTooltipPosition = 'n';\n * ```\n *\n * # Disabling tooltips\n *\n * In order to disable the tooltip  temporarily, use the `data-cke-tooltip-disabled` attribute:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Disabled. For now.';\n * domElement.dataset.ckeTooltipDisabled = 'true';\n * ```\n *\n * # Styling tooltips\n *\n * By default, the tooltip has `.ck-tooltip` class and its text inner `.ck-tooltip__text`.\n *\n * If your tooltip requires custom styling, using `data-cke-tooltip-class` attribute will add additional class to the balloon\n * displaying the tooltip:\n *\n * ```ts\n * domElement.dataset.ckeTooltipText = 'Tooltip with a red text';\n * domElement.dataset.ckeTooltipClass = 'my-class';\n * ```\n *\n * ```css\n * .ck.ck-tooltip.my-class { color: red }\n * ```\n *\n * **Note**: This class is a singleton. All editor instances re-use the same instance loaded by\n * {@link module:ui/editorui/editorui~EditorUI} of the first editor.\n */ class TooltipManager extends /* #__PURE__ */ DomEmitterMixin() {\n    /**\n\t * The view rendering text of the tooltip.\n\t */ tooltipTextView;\n    /**\n\t * The instance of the balloon panel that renders and positions the tooltip.\n\t */ balloonPanelView;\n    /**\n\t * A set of default {@link module:utils/dom/position~PositioningFunction positioning functions} used by the `TooltipManager`\n\t * to pin tooltips in different positions.\n\t */ static defaultBalloonPositions = /* #__PURE__ */ BalloonPanelView.generatePositions({\n        heightOffset: 5,\n        sideOffset: 13\n    });\n    /**\n\t * Stores the reference to the DOM element the tooltip is attached to. `null` when there's no tooltip\n\t * in the UI.\n\t */ _currentElementWithTooltip = null;\n    /**\n\t * Stores the current tooltip position. `null` when there's no tooltip in the UI.\n\t */ _currentTooltipPosition = null;\n    /**\n\t * An instance of the mutation observer that keeps track on target element attributes changes.\n\t */ _mutationObserver = null;\n    /**\n\t * A debounced version of {@link #_pinTooltip}. Tooltips show with a delay to avoid flashing and\n\t * to improve the UX.\n\t */ _pinTooltipDebounced;\n    /**\n\t * A debounced version of {@link #_unpinTooltip}. Tooltips hide with a delay to allow hovering of their titles.\n\t */ _unpinTooltipDebounced;\n    _watchdogExcluded;\n    /**\n\t * A set of editors the single tooltip manager instance must listen to.\n\t * This is mostly to handle `EditorUI#update` listeners from individual editors.\n\t */ static _editors = new Set();\n    /**\n\t * A reference to the `TooltipManager` instance. The class is a singleton and as such,\n\t * successive attempts at creating instances should return this instance.\n\t */ static _instance = null;\n    /**\n\t * Creates an instance of the tooltip manager.\n\t */ constructor(editor){\n        super();\n        TooltipManager._editors.add(editor);\n        // TooltipManager must be a singleton. Multiple instances would mean multiple tooltips attached\n        // to the same DOM element with data-cke-tooltip-* attributes.\n        if (TooltipManager._instance) {\n            return TooltipManager._instance;\n        }\n        TooltipManager._instance = this;\n        this.tooltipTextView = new View(editor.locale);\n        this.tooltipTextView.set('text', '');\n        this.tooltipTextView.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-tooltip__text'\n                ]\n            },\n            children: [\n                {\n                    text: this.tooltipTextView.bindTemplate.to('text')\n                }\n            ]\n        });\n        this.balloonPanelView = new BalloonPanelView(editor.locale);\n        this.balloonPanelView.class = BALLOON_CLASS;\n        this.balloonPanelView.content.add(this.tooltipTextView);\n        this._mutationObserver = createMutationObserver(()=>{\n            this._updateTooltipPosition();\n        });\n        this._pinTooltipDebounced = debounce(this._pinTooltip, 600);\n        this._unpinTooltipDebounced = debounce(this._unpinTooltip, 400);\n        this.listenTo(global.document, 'keydown', this._onKeyDown.bind(this), {\n            useCapture: true\n        });\n        this.listenTo(global.document, 'mouseenter', this._onEnterOrFocus.bind(this), {\n            useCapture: true\n        });\n        this.listenTo(global.document, 'mouseleave', this._onLeaveOrBlur.bind(this), {\n            useCapture: true\n        });\n        this.listenTo(global.document, 'focus', this._onEnterOrFocus.bind(this), {\n            useCapture: true\n        });\n        this.listenTo(global.document, 'blur', this._onLeaveOrBlur.bind(this), {\n            useCapture: true\n        });\n        this.listenTo(global.document, 'scroll', this._onScroll.bind(this), {\n            useCapture: true\n        });\n        // Because this class is a singleton, its only instance is shared across all editors and connects them through the reference.\n        // This causes issues with the ContextWatchdog. When an error is thrown in one editor, the watchdog traverses the references\n        // and (because of shared tooltip manager) figures that the error affects all editors and restarts them all.\n        // This flag, excludes tooltip manager instance from the traversal and brings ContextWatchdog back to normal.\n        // More in https://github.com/ckeditor/ckeditor5/issues/12292.\n        this._watchdogExcluded = true;\n    }\n    /**\n\t * Destroys the tooltip manager.\n\t *\n\t * **Note**: The manager singleton cannot be destroyed until all editors that use it are destroyed.\n\t *\n\t * @param editor The editor the manager was created for.\n\t */ destroy(editor) {\n        const editorBodyViewCollection = editor.ui.view && editor.ui.view.body;\n        TooltipManager._editors.delete(editor);\n        this.stopListening(editor.ui);\n        // Prevent the balloon panel from being destroyed in the EditorUI#destroy() cascade. It should be destroyed along\n        // with the last editor only (https://github.com/ckeditor/ckeditor5/issues/12602).\n        if (editorBodyViewCollection && editorBodyViewCollection.has(this.balloonPanelView)) {\n            editorBodyViewCollection.remove(this.balloonPanelView);\n        }\n        if (!TooltipManager._editors.size) {\n            this._unpinTooltip();\n            this.balloonPanelView.destroy();\n            this.stopListening();\n            TooltipManager._instance = null;\n        }\n    }\n    /**\n\t * Returns {@link #balloonPanelView} {@link module:utils/dom/position~PositioningFunction positioning functions} for a given position\n\t * name.\n\t *\n\t * @param position Name of the position (`s`, `se`, `sw`, `n`, `e`, or `w`).\n\t * @returns Positioning functions to be used by the {@link #balloonPanelView}.\n\t */ static getPositioningFunctions(position) {\n        const defaultPositions = TooltipManager.defaultBalloonPositions;\n        return ({\n            // South is most popular. We can use positioning heuristics to avoid clipping by the viewport with the sane fallback.\n            s: [\n                defaultPositions.southArrowNorth,\n                defaultPositions.southArrowNorthEast,\n                defaultPositions.southArrowNorthWest\n            ],\n            n: [\n                defaultPositions.northArrowSouth\n            ],\n            e: [\n                defaultPositions.eastArrowWest\n            ],\n            w: [\n                defaultPositions.westArrowEast\n            ],\n            sw: [\n                defaultPositions.southArrowNorthEast\n            ],\n            se: [\n                defaultPositions.southArrowNorthWest\n            ]\n        })[position];\n    }\n    /**\n\t * Handles hiding tooltips on `keydown` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */ _onKeyDown(evt, domEvent) {\n        if (domEvent.key === 'Escape' && this._currentElementWithTooltip) {\n            this._unpinTooltip();\n            domEvent.stopPropagation();\n        }\n    }\n    /**\n\t * Handles displaying tooltips on `mouseenter` and `focus` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */ _onEnterOrFocus(evt, { target }) {\n        const elementWithTooltipAttribute = getDescendantWithTooltip(target);\n        // Abort when there's no descendant needing tooltip.\n        if (!elementWithTooltipAttribute) {\n            // Unpin if element is focused, regardless of whether it contains a label or not.\n            // It also prevents tooltips from overlapping the menu bar\n            if (evt.name === 'focus') {\n                this._unpinTooltip();\n            }\n            return;\n        }\n        // Abort to avoid flashing when, for instance:\n        // * a tooltip is displayed for a focused element, then the same element gets mouseentered,\n        // * a tooltip is displayed for an element via mouseenter, then the focus moves to the same element.\n        if (elementWithTooltipAttribute === this._currentElementWithTooltip) {\n            return;\n        }\n        this._unpinTooltip();\n        // The tooltip should be pinned immediately when the element gets focused using keyboard.\n        // If it is focused using the mouse, the tooltip should be pinned after a delay to prevent flashing.\n        // See https://github.com/ckeditor/ckeditor5/issues/16383\n        if (evt.name === 'focus' && !elementWithTooltipAttribute.matches(':hover')) {\n            this._pinTooltip(elementWithTooltipAttribute, getTooltipData(elementWithTooltipAttribute));\n        } else {\n            this._pinTooltipDebounced(elementWithTooltipAttribute, getTooltipData(elementWithTooltipAttribute));\n        }\n    }\n    /**\n\t * Handles hiding tooltips on `mouseleave` and `blur` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */ _onLeaveOrBlur(evt, { target, relatedTarget }) {\n        if (evt.name === 'mouseleave') {\n            // Don't act when the event does not concern a DOM element (e.g. a mouseleave out of an entire document),\n            if (!isElement(target)) {\n                return;\n            }\n            const balloonElement = this.balloonPanelView.element;\n            const isEnteringBalloon = balloonElement && (balloonElement === relatedTarget || balloonElement.contains(relatedTarget));\n            const isLeavingBalloon = !isEnteringBalloon && target === balloonElement;\n            // Do not hide the tooltip when the user moves the cursor over it.\n            if (isEnteringBalloon) {\n                this._unpinTooltipDebounced.cancel();\n                return;\n            }\n            // If a tooltip is currently visible, don't act for a targets other than the one it is attached to.\n            // The only exception is leaving balloon, in this scenario tooltip should be closed.\n            // For instance, a random mouseleave far away in the page should not unpin the tooltip that was pinned because\n            // of a previous focus. Only leaving the same element should hide the tooltip.\n            if (!isLeavingBalloon && this._currentElementWithTooltip && target !== this._currentElementWithTooltip) {\n                return;\n            }\n            const descendantWithTooltip = getDescendantWithTooltip(target);\n            const relatedDescendantWithTooltip = getDescendantWithTooltip(relatedTarget);\n            // Unpin when the mouse was leaving element with a tooltip to a place which does not have or has a different tooltip.\n            // Note that this should happen whether the tooltip is already visible or not, for instance,\n            // it could be invisible but queued (debounced): it should get canceled.\n            if (isLeavingBalloon || descendantWithTooltip && descendantWithTooltip !== relatedDescendantWithTooltip) {\n                this._unpinTooltipDebounced();\n            }\n        } else {\n            // If a tooltip is currently visible, don't act for a targets other than the one it is attached to.\n            // For instance, a random blur in the web page should not unpin the tooltip that was pinned because of a previous mouseenter.\n            if (this._currentElementWithTooltip && target !== this._currentElementWithTooltip) {\n                return;\n            }\n            // Note that unpinning should happen whether the tooltip is already visible or not, for instance, it could be invisible but\n            // queued (debounced): it should get canceled (e.g. quick focus then quick blur using the keyboard).\n            this._unpinTooltipDebounced();\n        }\n    }\n    /**\n\t * Handles hiding tooltips on `scroll` in DOM.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param domEvent The DOM event.\n\t */ _onScroll(evt, { target }) {\n        // No tooltip, no reason to react on scroll.\n        if (!this._currentElementWithTooltip) {\n            return;\n        }\n        // When scrolling a container that has both the balloon and the current element (common ancestor), the balloon can remain\n        // visible (e.g. scrolling ≤body>). Otherwise, to avoid glitches (clipping, lagging) better just hide the tooltip.\n        // Also, don't do anything when scrolling an unrelated DOM element that has nothing to do with the current element and the balloon.\n        if (target.contains(this.balloonPanelView.element) && target.contains(this._currentElementWithTooltip)) {\n            return;\n        }\n        this._unpinTooltip();\n    }\n    /**\n\t * Pins the tooltip to a specific DOM element.\n\t *\n\t * @param options.text Text of the tooltip to display.\n\t * @param options.position The position of the tooltip.\n\t * @param options.cssClass Additional CSS class of the balloon with the tooltip.\n\t */ _pinTooltip(targetDomElement, { text, position, cssClass }) {\n        this._unpinTooltip();\n        // Use the body collection of the first editor.\n        const bodyViewCollection = first(TooltipManager._editors.values()).ui.view.body;\n        if (!bodyViewCollection.has(this.balloonPanelView)) {\n            bodyViewCollection.add(this.balloonPanelView);\n        }\n        this.tooltipTextView.text = text;\n        this.balloonPanelView.class = [\n            BALLOON_CLASS,\n            cssClass\n        ].filter((className)=>className).join(' ');\n        // Ensure that all changes to the tooltip are set before pinning it.\n        // Setting class or text after pinning can cause the tooltip to be pinned in the wrong position.\n        // It happens especially often when tooltip has class modified (like adding `ck-tooltip_multi-line`).\n        // See https://github.com/ckeditor/ckeditor5/issues/16365\n        this.balloonPanelView.pin({\n            target: targetDomElement,\n            positions: TooltipManager.getPositioningFunctions(position)\n        });\n        this._mutationObserver.attach(targetDomElement);\n        // Start responding to changes in editor UI or content layout. For instance, when collaborators change content\n        // and a contextual toolbar attached to a content starts to move (and so should move the tooltip).\n        // Note: Using low priority to let other listeners that position contextual toolbars etc. to react first.\n        for (const editor of TooltipManager._editors){\n            this.listenTo(editor.ui, 'update', this._updateTooltipPosition.bind(this), {\n                priority: 'low'\n            });\n        }\n        this._currentElementWithTooltip = targetDomElement;\n        this._currentTooltipPosition = position;\n    }\n    /**\n\t * Unpins the tooltip and cancels all queued pinning.\n\t */ _unpinTooltip() {\n        this._unpinTooltipDebounced.cancel();\n        this._pinTooltipDebounced.cancel();\n        this.balloonPanelView.unpin();\n        for (const editor of TooltipManager._editors){\n            this.stopListening(editor.ui, 'update');\n        }\n        this._currentElementWithTooltip = null;\n        this._currentTooltipPosition = null;\n        this.tooltipTextView.text = '';\n        this._mutationObserver.detach();\n    }\n    /**\n\t * Updates the position of the tooltip so it stays in sync with the element it is pinned to.\n\t *\n\t * Hides the tooltip when the element is no longer visible in DOM or the tooltip text was removed.\n\t */ _updateTooltipPosition() {\n        // The tooltip might get removed by focus listener triggered by the same UI `update` event.\n        // See https://github.com/ckeditor/ckeditor5/pull/16363.\n        if (!this._currentElementWithTooltip) {\n            return;\n        }\n        const tooltipData = getTooltipData(this._currentElementWithTooltip);\n        // This could happen if the tooltip was attached somewhere in a contextual content toolbar and the toolbar\n        // disappeared (e.g. removed an image), or the tooltip text was removed.\n        if (!isVisible(this._currentElementWithTooltip) || !tooltipData.text) {\n            this._unpinTooltip();\n            return;\n        }\n        this.balloonPanelView.pin({\n            target: this._currentElementWithTooltip,\n            positions: TooltipManager.getPositioningFunctions(tooltipData.position)\n        });\n    }\n}\nfunction getDescendantWithTooltip(element) {\n    if (!isElement(element)) {\n        return null;\n    }\n    return element.closest('[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])');\n}\nfunction getTooltipData(element) {\n    return {\n        text: element.dataset.ckeTooltipText,\n        position: element.dataset.ckeTooltipPosition || 's',\n        cssClass: element.dataset.ckeTooltipClass || ''\n    };\n}\n// Creates a simple `MutationObserver` instance wrapper that observes changes in the tooltip-related attributes of the given element.\n// Used instead of the `MutationObserver` from the engine for simplicity.\nfunction createMutationObserver(callback) {\n    const mutationObserver = new MutationObserver(()=>{\n        callback();\n    });\n    return {\n        attach (element) {\n            mutationObserver.observe(element, {\n                attributes: true,\n                attributeFilter: [\n                    'data-cke-tooltip-text',\n                    'data-cke-tooltip-position'\n                ]\n            });\n        },\n        detach () {\n            mutationObserver.disconnect();\n        }\n    };\n}\n\nvar poweredByIcon = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"53\\\" height=\\\"10\\\" viewBox=\\\"0 0 53 10\\\"><path fill=\\\"#1C2331\\\" d=\\\"M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z\\\"/><path fill=\\\"#AFE229\\\" d=\\\"M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z\\\"/><path fill=\\\"#771BFF\\\" d=\\\"m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z\\\"/></svg>\\n\";\n\nconst ICON_WIDTH = 53;\nconst ICON_HEIGHT = 10;\n// ⚠ Note, whenever changing the threshold, make sure to update the docs/support/managing-ckeditor-logo.md docs\n// as this information is also mentioned there ⚠.\nconst NARROW_ROOT_HEIGHT_THRESHOLD = 50;\nconst NARROW_ROOT_WIDTH_THRESHOLD = 350;\nconst DEFAULT_LABEL = 'Powered by';\n/**\n * A helper that enables the \"powered by\" feature in the editor and renders a link to the project's\n * webpage next to the bottom of the editable element (editor root, source editing area, etc.) when the editor is focused.\n *\n * @private\n */ class PoweredBy extends /* #__PURE__ */ DomEmitterMixin() {\n    /**\n\t * Editor instance the helper was created for.\n\t */ editor;\n    /**\n\t * A reference to the balloon panel hosting and positioning the \"powered by\" link and logo.\n\t */ _balloonView;\n    /**\n\t * A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.\n\t */ _showBalloonThrottled;\n    /**\n\t * A reference to the last editable element (root, source editing area, etc.) focused by the user.\n\t * Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the\n\t * right element whether the user is typing or using the UI.\n\t */ _lastFocusedEditableElement;\n    /**\n\t * Creates a \"powered by\" helper for a given editor. The feature is initialized on Editor#ready\n\t * event.\n\t *\n\t * @param editor\n\t */ constructor(editor){\n        super();\n        this.editor = editor;\n        this._balloonView = null;\n        this._lastFocusedEditableElement = null;\n        this._showBalloonThrottled = throttle(this._showBalloon.bind(this), 50, {\n            leading: true\n        });\n        editor.on('ready', this._handleEditorReady.bind(this));\n    }\n    /**\n\t * Destroys the \"powered by\" helper along with its view.\n\t */ destroy() {\n        const balloon = this._balloonView;\n        if (balloon) {\n            // Balloon gets destroyed by the body collection.\n            // The powered by view gets destroyed by the balloon.\n            balloon.unpin();\n            this._balloonView = null;\n        }\n        this._showBalloonThrottled.cancel();\n        this.stopListening();\n    }\n    /**\n\t * Enables \"powered by\" label once the editor (ui) is ready.\n\t */ _handleEditorReady() {\n        const editor = this.editor;\n        const forceVisible = !!editor.config.get('ui.poweredBy.forceVisible');\n        /* istanbul ignore next -- @preserve */ if (!forceVisible && verifyLicense(editor.config.get('licenseKey')) === 'VALID') {\n            return;\n        }\n        // No view means no body collection to append the powered by balloon to.\n        if (!editor.ui.view) {\n            return;\n        }\n        editor.ui.focusTracker.on('change:isFocused', (evt, data, isFocused)=>{\n            this._updateLastFocusedEditableElement();\n            if (isFocused) {\n                this._showBalloon();\n            } else {\n                this._hideBalloon();\n            }\n        });\n        editor.ui.focusTracker.on('change:focusedElement', (evt, data, focusedElement)=>{\n            this._updateLastFocusedEditableElement();\n            if (focusedElement) {\n                this._showBalloon();\n            }\n        });\n        editor.ui.on('update', ()=>{\n            this._showBalloonThrottled();\n        });\n    }\n    /**\n\t * Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}\n\t * with the \"powered by\" view inside ready for positioning.\n\t */ _createBalloonView() {\n        const editor = this.editor;\n        const balloon = this._balloonView = new BalloonPanelView();\n        const poweredByConfig = getNormalizedConfig(editor);\n        const view = new PoweredByView(editor.locale, poweredByConfig.label);\n        balloon.content.add(view);\n        balloon.set({\n            class: 'ck-powered-by-balloon'\n        });\n        editor.ui.view.body.add(balloon);\n        this._balloonView = balloon;\n    }\n    /**\n\t * Attempts to display the balloon with the \"powered by\" view.\n\t */ _showBalloon() {\n        if (!this._lastFocusedEditableElement) {\n            return;\n        }\n        const attachOptions = getBalloonAttachOptions(this.editor, this._lastFocusedEditableElement);\n        if (attachOptions) {\n            if (!this._balloonView) {\n                this._createBalloonView();\n            }\n            this._balloonView.pin(attachOptions);\n        }\n    }\n    /**\n\t * Hides the \"powered by\" balloon if already visible.\n\t */ _hideBalloon() {\n        if (this._balloonView) {\n            this._balloonView.unpin();\n        }\n    }\n    /**\n\t * Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.\n\t */ _updateLastFocusedEditableElement() {\n        const editor = this.editor;\n        const isFocused = editor.ui.focusTracker.isFocused;\n        const focusedElement = editor.ui.focusTracker.focusedElement;\n        if (!isFocused || !focusedElement) {\n            this._lastFocusedEditableElement = null;\n            return;\n        }\n        const editableEditorElements = Array.from(editor.ui.getEditableElementsNames()).map((name)=>{\n            return editor.ui.getEditableElement(name);\n        });\n        if (editableEditorElements.includes(focusedElement)) {\n            this._lastFocusedEditableElement = focusedElement;\n        } else {\n            // If it's none of the editable element, then the focus is somewhere in the UI. Let's display powered by\n            // over the first element then.\n            this._lastFocusedEditableElement = editableEditorElements[0];\n        }\n    }\n}\n/**\n * A view displaying a \"powered by\" label and project logo wrapped in a link.\n */ class PoweredByView extends View {\n    /**\n\t * Created an instance of the \"powered by\" view.\n\t *\n\t * @param locale The localization services instance.\n\t * @param label The label text.\n\t */ constructor(locale, label){\n        super(locale);\n        const iconView = new IconView();\n        const bind = this.bindTemplate;\n        iconView.set({\n            content: poweredByIcon,\n            isColorInherited: false\n        });\n        iconView.extendTemplate({\n            attributes: {\n                style: {\n                    width: ICON_WIDTH + 'px',\n                    height: ICON_HEIGHT + 'px'\n                }\n            }\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-powered-by'\n                ],\n                'aria-hidden': true\n            },\n            children: [\n                {\n                    tag: 'a',\n                    attributes: {\n                        href: 'https://ckeditor.com/?utm_source=ckeditor&' + 'utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo',\n                        target: '_blank',\n                        tabindex: '-1'\n                    },\n                    children: [\n                        ...label ? [\n                            {\n                                tag: 'span',\n                                attributes: {\n                                    class: [\n                                        'ck',\n                                        'ck-powered-by__label'\n                                    ]\n                                },\n                                children: [\n                                    label\n                                ]\n                            }\n                        ] : [],\n                        iconView\n                    ],\n                    on: {\n                        dragstart: bind.to((evt)=>evt.preventDefault())\n                    }\n                }\n            ]\n        });\n    }\n}\nfunction getBalloonAttachOptions(editor, focusedEditableElement) {\n    const poweredByConfig = getNormalizedConfig(editor);\n    const positioningFunction = poweredByConfig.side === 'right' ? getLowerRightCornerPosition(focusedEditableElement, poweredByConfig) : getLowerLeftCornerPosition(focusedEditableElement, poweredByConfig);\n    return {\n        target: focusedEditableElement,\n        positions: [\n            positioningFunction\n        ]\n    };\n}\nfunction getLowerRightCornerPosition(focusedEditableElement, config) {\n    return getLowerCornerPosition(focusedEditableElement, config, (rootRect, balloonRect)=>{\n        return rootRect.left + rootRect.width - balloonRect.width - config.horizontalOffset;\n    });\n}\nfunction getLowerLeftCornerPosition(focusedEditableElement, config) {\n    return getLowerCornerPosition(focusedEditableElement, config, (rootRect)=>rootRect.left + config.horizontalOffset);\n}\nfunction getLowerCornerPosition(focusedEditableElement, config, getBalloonLeft) {\n    return (visibleEditableElementRect, balloonRect)=>{\n        const editableElementRect = new Rect(focusedEditableElement);\n        if (editableElementRect.width < NARROW_ROOT_WIDTH_THRESHOLD || editableElementRect.height < NARROW_ROOT_HEIGHT_THRESHOLD) {\n            return null;\n        }\n        let balloonTop;\n        if (config.position === 'inside') {\n            balloonTop = editableElementRect.bottom - balloonRect.height;\n        } else {\n            balloonTop = editableElementRect.bottom - balloonRect.height / 2;\n        }\n        balloonTop -= config.verticalOffset;\n        const balloonLeft = getBalloonLeft(editableElementRect, balloonRect);\n        // Clone the editable element rect and place it where the balloon would be placed.\n        // This will allow getVisible() to work from editable element's perspective (rect source).\n        // and yield a result as if the balloon was on the same (scrollable) layer as the editable element.\n        const newBalloonPositionRect = visibleEditableElementRect.clone().moveTo(balloonLeft, balloonTop).getIntersection(balloonRect.clone().moveTo(balloonLeft, balloonTop));\n        const newBalloonPositionVisibleRect = newBalloonPositionRect.getVisible();\n        if (!newBalloonPositionVisibleRect || newBalloonPositionVisibleRect.getArea() < balloonRect.getArea()) {\n            return null;\n        }\n        return {\n            top: balloonTop,\n            left: balloonLeft,\n            name: `position_${config.position}-side_${config.side}`,\n            config: {\n                withArrow: false\n            }\n        };\n    };\n}\nfunction getNormalizedConfig(editor) {\n    const userConfig = editor.config.get('ui.poweredBy');\n    const position = userConfig && userConfig.position || 'border';\n    return {\n        position,\n        label: DEFAULT_LABEL,\n        verticalOffset: position === 'inside' ? 5 : 0,\n        horizontalOffset: 5,\n        side: editor.locale.contentLanguageDirection === 'ltr' ? 'right' : 'left',\n        ...userConfig\n    };\n}\n\n/**\n * The politeness level of an `aria-live` announcement.\n *\n * Available keys are:\n * * `AriaLiveAnnouncerPoliteness.POLITE`,\n * * `AriaLiveAnnouncerPoliteness.ASSERTIVE`\n *\n * [Learn more](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Politeness_levels).\n */ const AriaLiveAnnouncerPoliteness = {\n    POLITE: 'polite',\n    ASSERTIVE: 'assertive'\n};\n/**\n * An accessibility helper that manages all ARIA live regions associated with an editor instance. ARIA live regions announce changes\n * to the state of the editor features.\n *\n * These announcements are consumed and propagated by screen readers and give users a better understanding of the current\n * state of the editor.\n *\n * To announce a state change to an editor use the {@link #announce} method:\n *\n * ```ts\n * editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );\n * ```\n */ class AriaLiveAnnouncer {\n    /**\n\t * The editor instance.\n\t */ editor;\n    /**\n\t * The view that aggregates all `aria-live` regions.\n\t */ view;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        this.editor = editor;\n        /**\n\t\t * Some screen readers only look at changes in the aria-live region.\n\t\t * They might not read a region that already has content when it is added.\n\t\t * To stop this problem, make sure to set up regions for all politeness settings when the editor starts.\n\t\t */ editor.once('ready', ()=>{\n            for (const politeness of Object.values(AriaLiveAnnouncerPoliteness)){\n                this.announce('', politeness);\n            }\n        });\n    }\n    /**\n\t * Sets an announcement text to an aria region that is then announced by a screen reader to the user.\n\t *\n\t * If the aria region of a specified politeness does not exist, it will be created and can be re-used later.\n\t *\n\t * The default announcement politeness level is `'polite'`.\n\t *\n\t * ```ts\n\t * // Most screen readers will queue announcements from multiple aria-live regions and read them out in the order they were emitted.\n \t * editor.ui.ariaLiveAnnouncer.announce( 'Image uploaded.' );\n \t * editor.ui.ariaLiveAnnouncer.announce( 'Connection lost. Reconnecting.' );\n \t * ```\n\t */ announce(announcement, attributes = AriaLiveAnnouncerPoliteness.POLITE) {\n        const editor = this.editor;\n        if (!editor.ui.view) {\n            return;\n        }\n        if (!this.view) {\n            this.view = new AriaLiveAnnouncerView(editor.locale);\n            editor.ui.view.body.add(this.view);\n        }\n        const { politeness, isUnsafeHTML } = typeof attributes === 'string' ? {\n            politeness: attributes\n        } : attributes;\n        let politenessRegionView = this.view.regionViews.find((view)=>view.politeness === politeness);\n        if (!politenessRegionView) {\n            politenessRegionView = new AriaLiveAnnouncerRegionView(editor, politeness);\n            this.view.regionViews.add(politenessRegionView);\n        }\n        politenessRegionView.announce({\n            announcement,\n            isUnsafeHTML\n        });\n    }\n}\n/**\n * The view that aggregates all `aria-live` regions.\n */ class AriaLiveAnnouncerView extends View {\n    /**\n\t * A collection of all views that represent individual `aria-live` regions.\n\t */ regionViews;\n    constructor(locale){\n        super(locale);\n        this.regionViews = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-aria-live-announcer'\n                ]\n            },\n            children: this.regionViews\n        });\n    }\n}\n/**\n * The view that represents a single `aria-live`.\n */ class AriaLiveAnnouncerRegionView extends View {\n    /**\n\t * Current politeness level of the region.\n\t */ politeness;\n    /**\n\t * DOM converter used to sanitize unsafe HTML passed to {@link #announce} method.\n\t */ _domConverter;\n    /**\n\t * Interval used to remove additions. It prevents accumulation of added nodes in region.\n\t */ _pruneAnnouncementsInterval;\n    constructor(editor, politeness){\n        super(editor.locale);\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                'aria-live': politeness,\n                'aria-relevant': 'additions'\n            },\n            children: [\n                {\n                    tag: 'ul',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-aria-live-region-list'\n                        ]\n                    }\n                }\n            ]\n        });\n        editor.on('destroy', ()=>{\n            if (this._pruneAnnouncementsInterval !== null) {\n                clearInterval(this._pruneAnnouncementsInterval);\n                this._pruneAnnouncementsInterval = null;\n            }\n        });\n        this.politeness = politeness;\n        this._domConverter = editor.data.htmlProcessor.domConverter;\n        this._pruneAnnouncementsInterval = setInterval(()=>{\n            if (this.element && this._listElement.firstChild) {\n                this._listElement.firstChild.remove();\n            }\n        }, 5000);\n    }\n    /**\n\t * Appends new announcement to region.\n\t */ announce({ announcement, isUnsafeHTML }) {\n        if (!announcement.trim().length) {\n            return;\n        }\n        const messageListItem = document.createElement('li');\n        if (isUnsafeHTML) {\n            this._domConverter.setContentOf(messageListItem, announcement);\n        } else {\n            messageListItem.innerText = announcement;\n        }\n        this._listElement.appendChild(messageListItem);\n    }\n    /**\n\t * Return current announcements list HTML element.\n\t */ get _listElement() {\n        return this.element.querySelector('ul');\n    }\n}\n\n/**\n * A menu bar list item view, a child of {@link module:ui/menubar/menubarmenulistview~MenuBarMenuListView}.\n *\n * Populate this item with a {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} instance\n * or a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance to create a sub-menu.\n */ class MenuBarMenuListItemView extends ListItemView {\n    /**\n\t * Creates an instance of the list item view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale, parentMenuView){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-menu-bar__menu__item'\n                ]\n            },\n            on: {\n                'mouseenter': bind.to('mouseenter')\n            }\n        });\n        this.delegate('mouseenter').to(parentMenuView);\n    }\n}\n\nconst NESTED_PANEL_HORIZONTAL_OFFSET = 5;\n/**\n * Behaviors of the {@link module:ui/menubar/menubarview~MenuBarView} component.\n */ const MenuBarBehaviors = {\n    /**\n\t * When the bar is already open:\n\t * * Opens the menu when the user hovers over its button.\n\t * * Closes open menu when another menu's button gets hovered.\n\t */ toggleMenusAndFocusItemsOnHover (menuBarView) {\n        menuBarView.on('menu:mouseenter', (evt)=>{\n            // This behavior should be activated when one of condition is present:\n            // 1. The user opened any submenu of menubar and hover over items in the menu bar.\n            // 2. The user focused whole menubar using keyboard interaction and enabled focus borders and hover over items in the menu bar.\n            if (!menuBarView.isFocusBorderEnabled && !menuBarView.isOpen) {\n                return;\n            }\n            if (menuBarView.isOpen) {\n                for (const menuView of menuBarView.menus){\n                    // @if CK_DEBUG_MENU_BAR // const wasOpen = menuView.isOpen;\n                    const pathLeaf = evt.path[0];\n                    const isListItemContainingMenu = pathLeaf instanceof MenuBarMenuListItemView && pathLeaf.children.first === menuView;\n                    menuView.isOpen = (evt.path.includes(menuView) || isListItemContainingMenu) && menuView.isEnabled;\n                // @if CK_DEBUG_MENU_BAR // if ( wasOpen !== menuView.isOpen ) {\n                // @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] toggleMenusAndFocusItemsOnHover(): Toggle',\n                // @if CK_DEBUG_MENU_BAR // \tlogMenu( menuView ), 'isOpen', menuView.isOpen\n                // @if CK_DEBUG_MENU_BAR // );\n                // @if CK_DEBUG_MENU_BAR // }\n                }\n            }\n            evt.source.focus();\n        });\n    },\n    /**\n\t * Moves between top-level menus using the arrow left and right keys.\n\t *\n\t * If the menubar has already been open, the arrow keys move focus between top-level menu buttons and open them.\n\t * If the menubar is closed, the arrow keys only move focus between top-level menu buttons.\n\t */ focusCycleMenusOnArrows (menuBarView) {\n        const isContentRTL = menuBarView.locale.uiLanguageDirection === 'rtl';\n        menuBarView.on('menu:arrowright', (evt)=>{\n            cycleTopLevelMenus(evt.source, isContentRTL ? -1 : 1);\n        });\n        menuBarView.on('menu:arrowleft', (evt)=>{\n            cycleTopLevelMenus(evt.source, isContentRTL ? 1 : -1);\n        });\n        function cycleTopLevelMenus(currentMenuView, step) {\n            const currentIndex = menuBarView.children.getIndex(currentMenuView);\n            const isCurrentMenuViewOpen = currentMenuView.isOpen;\n            const menusCount = menuBarView.children.length;\n            const menuViewToOpen = menuBarView.children.get((currentIndex + menusCount + step) % menusCount);\n            currentMenuView.isOpen = false;\n            if (isCurrentMenuViewOpen) {\n                menuViewToOpen.isOpen = true;\n            }\n            menuViewToOpen.buttonView.focus();\n        }\n    },\n    /**\n\t * Closes the entire sub-menu structure when the bar is closed. This prevents sub-menus from being open if the user\n\t * closes the entire bar, and then re-opens some top-level menu.\n\t */ closeMenusWhenTheBarCloses (menuBarView) {\n        menuBarView.on('change:isOpen', ()=>{\n            if (!menuBarView.isOpen) {\n                menuBarView.menus.forEach((menuView)=>{\n                    menuView.isOpen = false;\n                // @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeMenusWhenTheBarCloses(): Closing', logMenu( menuView ) );\n                });\n            }\n        });\n    },\n    /**\n\t * Handles the following case:\n\t * 1. Hover to open a sub-menu (A). The button has focus.\n\t * 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t * 3. Press arrow right to open the sub-menu (B).\n\t * 4. The sub-menu (A) should close as it would with `toggleMenusAndFocusItemsOnHover()`.\n\t */ closeMenuWhenAnotherOnTheSameLevelOpens (menuBarView) {\n        menuBarView.on('menu:change:isOpen', (evt, name, isOpen)=>{\n            if (isOpen) {\n                menuBarView.menus.filter((menuView)=>{\n                    return evt.source.parentMenuView === menuView.parentMenuView && evt.source !== menuView && menuView.isOpen;\n                }).forEach((menuView)=>{\n                    menuView.isOpen = false;\n                // @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeMenuWhenAnotherOpens(): Closing', logMenu( menuView ) );\n                });\n            }\n        });\n    },\n    /**\n\t * Closes the bar when the user clicked outside of it (page body, editor root, etc.).\n\t */ closeOnClickOutside (menuBarView) {\n        clickOutsideHandler({\n            emitter: menuBarView,\n            activator: ()=>menuBarView.isOpen,\n            callback: ()=>menuBarView.close(),\n            contextElements: ()=>menuBarView.children.map((child)=>child.element)\n        });\n    },\n    /**\n\t * Tracks the keyboard focus interaction on the menu bar view. It is used to determine if the nested items\n\t * of the menu bar should render focus rings after first interaction with the keyboard.\n\t */ enableFocusHighlightOnInteraction (menuBarView) {\n        let isKeyPressed = false;\n        menuBarView.on('change:isOpen', (_, evt, isOpen)=>{\n            if (!isOpen) {\n                // Keep the focus border if the menu bar was closed by a keyboard interaction (Esc key).\n                // The user remains in the keyboard navigation mode and can traverse the main categories.\n                // See https://github.com/ckeditor/ckeditor5/issues/16719.\n                if (!isKeyPressed) {\n                    menuBarView.isFocusBorderEnabled = false;\n                }\n                // Reset the flag when the menu bar is closed, menu items tend to intercept `keyup` event\n                // and sometimes, after pressing `enter` on focused item, `isKeyPressed` stuck in `true` state.\n                isKeyPressed = false;\n            }\n        });\n        menuBarView.listenTo(menuBarView.element, 'keydown', ()=>{\n            isKeyPressed = true;\n        }, {\n            useCapture: true\n        });\n        menuBarView.listenTo(menuBarView.element, 'keyup', ()=>{\n            isKeyPressed = false;\n        }, {\n            useCapture: true\n        });\n        menuBarView.listenTo(menuBarView.element, 'focus', ()=>{\n            if (isKeyPressed) {\n                menuBarView.isFocusBorderEnabled = true;\n            }\n        }, {\n            useCapture: true\n        });\n    }\n};\n/**\n * Behaviors of the {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} component.\n */ const MenuBarMenuBehaviors = {\n    /**\n\t * If the button of the menu is focused, pressing the arrow down key should open the panel and focus it.\n\t * This is analogous to the {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t */ openAndFocusPanelOnArrowDownKey (menuView) {\n        menuView.keystrokes.set('arrowdown', (data, cancel)=>{\n            if (menuView.focusTracker.focusedElement === menuView.buttonView.element) {\n                if (!menuView.isOpen) {\n                    menuView.isOpen = true;\n                }\n                menuView.panelView.focus();\n                cancel();\n            }\n        });\n    },\n    /**\n\t * Open the menu on the right arrow key press. This allows for navigating to sub-menus using the keyboard.\n\t */ openOnArrowRightKey (menuView) {\n        const keystroke = menuView.locale.uiLanguageDirection === 'rtl' ? 'arrowleft' : 'arrowright';\n        menuView.keystrokes.set(keystroke, (data, cancel)=>{\n            if (menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled) {\n                return;\n            }\n            // @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] openOnArrowRightKey(): Opening', logMenu( menuView ) );\n            if (!menuView.isOpen) {\n                menuView.isOpen = true;\n            }\n            menuView.panelView.focus();\n            cancel();\n        });\n    },\n    /**\n\t * Opens the menu on its button click. Note that this behavior only opens but never closes the menu (unlike\n\t * {@link module:ui/dropdown/dropdownview~DropdownView}).\n\t */ openOnButtonClick (menuView) {\n        menuView.buttonView.on('execute', ()=>{\n            menuView.isOpen = true;\n        });\n    },\n    /**\n\t * Toggles the menu on its button click. This behavior is analogous to {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t */ toggleOnButtonClick (menuView) {\n        menuView.buttonView.on('execute', ()=>{\n            menuView.isOpen = !menuView.isOpen;\n        });\n    },\n    /**\n\t * Opens the menu and focuses the panel content upon pressing the Enter key.\n\t */ openAndFocusOnEnterKeyPress (menuView) {\n        menuView.keystrokes.set('enter', (data, cancel)=>{\n            // Engage only for Enter key press when the button is focused. The panel can contain\n            // other UI components and features that rely on the Enter key press.\n            if (menuView.focusTracker.focusedElement !== menuView.buttonView.element) {\n                return;\n            }\n            menuView.isOpen = true;\n            menuView.panelView.focus();\n            cancel();\n        });\n    },\n    /**\n\t * Closes the menu on the right left key press. This allows for navigating to sub-menus using the keyboard.\n\t */ closeOnArrowLeftKey (menuView) {\n        const keystroke = menuView.locale.uiLanguageDirection === 'rtl' ? 'arrowright' : 'arrowleft';\n        menuView.keystrokes.set(keystroke, (data, cancel)=>{\n            if (menuView.isOpen) {\n                menuView.isOpen = false;\n                menuView.focus();\n                cancel();\n            }\n        });\n    },\n    /**\n\t * Closes the menu on the esc key press. This allows for navigating to sub-menus using the keyboard.\n\t */ closeOnEscKey (menuView) {\n        menuView.keystrokes.set('esc', (data, cancel)=>{\n            if (menuView.isOpen) {\n                menuView.isOpen = false;\n                menuView.focus();\n                cancel();\n            }\n        });\n    },\n    /**\n\t * Closes the menu when its parent menu also closed. This prevents from orphaned open menus when the parent menu re-opens.\n\t */ closeOnParentClose (menuView) {\n        menuView.parentMenuView.on('change:isOpen', (evt, name, isOpen)=>{\n            if (!isOpen && evt.source === menuView.parentMenuView) {\n                // @if CK_DEBUG_MENU_BAR // console.log( '[BEHAVIOR] closeOnParentClose(): Closing', logMenu( menuView ) );\n                menuView.isOpen = false;\n            }\n        });\n    }\n};\n// @if CK_DEBUG_MENU_BAR // function logMenu( menuView: MenuBarMenuView ) {\n// @if CK_DEBUG_MENU_BAR //\treturn `\"${ menuView.buttonView.label }\"`;\n// @if CK_DEBUG_MENU_BAR // }\n/**\n * Contains every positioning function used by {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} that decides where the\n * {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} should be placed.\n *\n * Top-level menu positioning functions:\n *\n *\t┌──────┐\n *\t│      │\n *\t├──────┴────────┐\n *\t│               │\n *\t│               │\n *\t│               │\n *\t│            SE │\n *\t└───────────────┘\n *\n *\t         ┌──────┐\n *\t         │      │\n *\t┌────────┴──────┤\n *\t│               │\n *\t│               │\n *\t│               │\n *\t│ SW            │\n *\t└───────────────┘\n *\n *\t┌───────────────┐\n *\t│ NW            │\n *\t│               │\n *\t│               │\n *\t│               │\n *\t└────────┬──────┤\n *\t         │      │\n *\t         └──────┘\n *\n *\t┌───────────────┐\n *\t│            NE │\n *\t│               │\n *\t│               │\n *\t│               │\n *\t├──────┬────────┘\n *\t│      │\n *\t└──────┘\n *\n * Sub-menu positioning functions:\n *\n *\t┌──────┬───────────────┐\n *\t│      │               │\n *\t└──────┤               │\n *\t       │               │\n *\t       │            ES │\n *\t       └───────────────┘\n *\n *\t┌───────────────┬──────┐\n *\t│               │      │\n *\t│               ├──────┘\n *\t│               │\n *\t│ WS            │\n *\t└───────────────┘\n *\n *\t       ┌───────────────┐\n *\t       │            EN │\n *\t       │               │\n *\t┌──────┤               │\n *\t│      │               │\n *\t└──────┴───────────────┘\n *\n *\t┌───────────────┐\n *\t│ WN            │\n *\t│               │\n *\t│               ├──────┐\n *\t│               │      │\n *\t└───────────────┴──────┘\n */ const MenuBarMenuViewPanelPositioningFunctions = {\n    southEast: (buttonRect)=>{\n        return {\n            top: buttonRect.bottom,\n            left: buttonRect.left,\n            name: 'se'\n        };\n    },\n    southWest: (buttonRect, panelRect)=>{\n        return {\n            top: buttonRect.bottom,\n            left: buttonRect.left - panelRect.width + buttonRect.width,\n            name: 'sw'\n        };\n    },\n    northEast: (buttonRect, panelRect)=>{\n        return {\n            top: buttonRect.top - panelRect.height,\n            left: buttonRect.left,\n            name: 'ne'\n        };\n    },\n    northWest: (buttonRect, panelRect)=>{\n        return {\n            top: buttonRect.top - panelRect.height,\n            left: buttonRect.left - panelRect.width + buttonRect.width,\n            name: 'nw'\n        };\n    },\n    eastSouth: (buttonRect)=>{\n        return {\n            top: buttonRect.top,\n            left: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n            name: 'es'\n        };\n    },\n    eastNorth: (buttonRect, panelRect)=>{\n        return {\n            top: buttonRect.top - panelRect.height,\n            left: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n            name: 'en'\n        };\n    },\n    westSouth: (buttonRect, panelRect)=>{\n        return {\n            top: buttonRect.top,\n            left: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n            name: 'ws'\n        };\n    },\n    westNorth: (buttonRect, panelRect)=>{\n        return {\n            top: buttonRect.top - panelRect.height,\n            left: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n            name: 'wn'\n        };\n    }\n};\n/**\n * The default items {@link module:core/editor/editorconfig~EditorConfig#menuBar configuration} of the\n * {@link module:ui/menubar/menubarview~MenuBarView} component. It contains names of all menu bar components\n * registered in the {@link module:ui/componentfactory~ComponentFactory component factory} (available in the project).\n *\n * **Note**: Menu bar component names provided by core editor features are prefixed with `menuBar:` in order to distinguish\n * them from components referenced by the {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}, for instance,\n * `'menuBar:bold'` is a menu bar button but `'bold'` is a toolbar button.\n *\n * Below is the preset menu bar structure (the default value of `config.menuBar.items` property):\n *\n * ```ts\n * [\n * \t{\n * \t\tmenuId: 'file',\n * \t\tlabel: 'File',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'export',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:exportPdf',\n * \t\t\t\t\t'menuBar:exportWord'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'import',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:importWord'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'revisionHistory',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:revisionHistory'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'edit',\n * \t\tlabel: 'Edit',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'undo',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:undo',\n * \t\t\t\t\t'menuBar:redo'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'selectAll',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:selectAll'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'findAndReplace',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:findAndReplace'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'view',\n * \t\tlabel: 'View',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'sourceEditing',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:sourceEditing'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'showBlocks',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:showBlocks'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'previewMergeFields',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:previewMergeFields'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'restrictedEditingException',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:restrictedEditingException'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'insert',\n * \t\tlabel: 'Insert',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertMainWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:insertImage',\n * \t\t\t\t\t'menuBar:ckbox',\n * \t\t\t\t\t'menuBar:ckfinder',\n * \t\t\t\t\t'menuBar:insertTable'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertInline',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:link',\n * \t\t\t\t\t'menuBar:comment',\n * \t\t\t\t\t'menuBar:insertMergeField'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertMinorWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:mediaEmbed',\n * \t\t\t\t\t'menuBar:insertTemplate',\n * \t\t\t\t\t'menuBar:blockQuote',\n * \t\t\t\t\t'menuBar:codeBlock',\n * \t\t\t\t\t'menuBar:htmlEmbed'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'insertStructureWidgets',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:horizontalLine',\n * \t\t\t\t\t'menuBar:pageBreak',\n * \t\t\t\t\t'menuBar:tableOfContents'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'restrictedEditing',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:restrictedEditing'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'format',\n * \t\tlabel: 'Format',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'textAndFont',\n * \t\t\t\titems: [\n * \t\t\t\t\t{\n * \t\t\t\t\t\tmenuId: 'text',\n * \t\t\t\t\t\tlabel: 'Text',\n * \t\t\t\t\t\tgroups: [\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'basicStyles',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:bold',\n * \t\t\t\t\t\t\t\t\t'menuBar:italic',\n * \t\t\t\t\t\t\t\t\t'menuBar:underline',\n * \t\t\t\t\t\t\t\t\t'menuBar:strikethrough',\n * \t\t\t\t\t\t\t\t\t'menuBar:superscript',\n * \t\t\t\t\t\t\t\t\t'menuBar:subscript',\n * \t\t\t\t\t\t\t\t\t'menuBar:code'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'textPartLanguage',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:textPartLanguage'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t}\n * \t\t\t\t\t\t]\n * \t\t\t\t\t},\n * \t\t\t\t\t{\n * \t\t\t\t\t\tmenuId: 'font',\n * \t\t\t\t\t\tlabel: 'Font',\n * \t\t\t\t\t\tgroups: [\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'fontProperties',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:fontSize',\n * \t\t\t\t\t\t\t\t\t'menuBar:fontFamily'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'fontColors',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:fontColor',\n * \t\t\t\t\t\t\t\t\t'menuBar:fontBackgroundColor'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tgroupId: 'highlight',\n * \t\t\t\t\t\t\t\titems: [\n * \t\t\t\t\t\t\t\t\t'menuBar:highlight'\n * \t\t\t\t\t\t\t\t]\n * \t\t\t\t\t\t\t}\n * \t\t\t\t\t\t]\n * \t\t\t\t\t},\n * \t\t\t\t\t'menuBar:heading'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'list',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:bulletedList',\n * \t\t\t\t\t'menuBar:numberedList',\n * \t\t\t\t\t'menuBar:multiLevelList',\n * \t\t\t\t\t'menuBar:todoList'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'indent',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:alignment',\n * \t\t\t\t\t'menuBar:indent',\n * \t\t\t\t\t'menuBar:outdent'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'caseChange',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:caseChange'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'removeFormat',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:removeFormat'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'tools',\n * \t\tlabel: 'Tools',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'aiTools',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:aiAssistant',\n * \t\t\t\t\t'menuBar:aiCommands'\n * \t\t\t\t]\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\tgroupId: 'tools',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:trackChanges',\n * \t\t\t\t\t'menuBar:commentsArchive'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t},\n * \t{\n * \t\tmenuId: 'help',\n * \t\tlabel: 'Help',\n * \t\tgroups: [\n * \t\t\t{\n * \t\t\t\tgroupId: 'help',\n * \t\t\t\titems: [\n * \t\t\t\t\t'menuBar:accessibilityHelp'\n * \t\t\t\t]\n * \t\t\t}\n * \t\t]\n * \t}\n * ];\n * ```\n *\n * The menu bar can be customized using the `config.menuBar.removeItems` and `config.menuBar.addItems` properties.\n */ // **NOTE: Whenever you make changes to this value, reflect it in the documentation above!**\nconst DefaultMenuBarItems = [\n    {\n        menuId: 'file',\n        label: 'File',\n        groups: [\n            {\n                groupId: 'export',\n                items: [\n                    'menuBar:exportPdf',\n                    'menuBar:exportWord'\n                ]\n            },\n            {\n                groupId: 'import',\n                items: [\n                    'menuBar:importWord'\n                ]\n            },\n            {\n                groupId: 'revisionHistory',\n                items: [\n                    'menuBar:revisionHistory'\n                ]\n            }\n        ]\n    },\n    {\n        menuId: 'edit',\n        label: 'Edit',\n        groups: [\n            {\n                groupId: 'undo',\n                items: [\n                    'menuBar:undo',\n                    'menuBar:redo'\n                ]\n            },\n            {\n                groupId: 'selectAll',\n                items: [\n                    'menuBar:selectAll'\n                ]\n            },\n            {\n                groupId: 'findAndReplace',\n                items: [\n                    'menuBar:findAndReplace'\n                ]\n            }\n        ]\n    },\n    {\n        menuId: 'view',\n        label: 'View',\n        groups: [\n            {\n                groupId: 'sourceEditing',\n                items: [\n                    'menuBar:sourceEditing'\n                ]\n            },\n            {\n                groupId: 'showBlocks',\n                items: [\n                    'menuBar:showBlocks'\n                ]\n            },\n            {\n                groupId: 'previewMergeFields',\n                items: [\n                    'menuBar:previewMergeFields'\n                ]\n            },\n            {\n                groupId: 'restrictedEditing',\n                items: [\n                    'menuBar:restrictedEditing'\n                ]\n            }\n        ]\n    },\n    {\n        menuId: 'insert',\n        label: 'Insert',\n        groups: [\n            {\n                groupId: 'insertMainWidgets',\n                items: [\n                    'menuBar:insertImage',\n                    'menuBar:ckbox',\n                    'menuBar:ckfinder',\n                    'menuBar:insertTable'\n                ]\n            },\n            {\n                groupId: 'insertInline',\n                items: [\n                    'menuBar:link',\n                    'menuBar:comment',\n                    'menuBar:insertMergeField'\n                ]\n            },\n            {\n                groupId: 'insertMinorWidgets',\n                items: [\n                    'menuBar:mediaEmbed',\n                    'menuBar:insertTemplate',\n                    'menuBar:specialCharacters',\n                    'menuBar:blockQuote',\n                    'menuBar:codeBlock',\n                    'menuBar:htmlEmbed'\n                ]\n            },\n            {\n                groupId: 'insertStructureWidgets',\n                items: [\n                    'menuBar:horizontalLine',\n                    'menuBar:pageBreak',\n                    'menuBar:tableOfContents'\n                ]\n            },\n            {\n                groupId: 'restrictedEditingException',\n                items: [\n                    'menuBar:restrictedEditingException'\n                ]\n            }\n        ]\n    },\n    {\n        menuId: 'format',\n        label: 'Format',\n        groups: [\n            {\n                groupId: 'textAndFont',\n                items: [\n                    {\n                        menuId: 'text',\n                        label: 'Text',\n                        groups: [\n                            {\n                                groupId: 'basicStyles',\n                                items: [\n                                    'menuBar:bold',\n                                    'menuBar:italic',\n                                    'menuBar:underline',\n                                    'menuBar:strikethrough',\n                                    'menuBar:superscript',\n                                    'menuBar:subscript',\n                                    'menuBar:code'\n                                ]\n                            },\n                            {\n                                groupId: 'textPartLanguage',\n                                items: [\n                                    'menuBar:textPartLanguage'\n                                ]\n                            }\n                        ]\n                    },\n                    {\n                        menuId: 'font',\n                        label: 'Font',\n                        groups: [\n                            {\n                                groupId: 'fontProperties',\n                                items: [\n                                    'menuBar:fontSize',\n                                    'menuBar:fontFamily'\n                                ]\n                            },\n                            {\n                                groupId: 'fontColors',\n                                items: [\n                                    'menuBar:fontColor',\n                                    'menuBar:fontBackgroundColor'\n                                ]\n                            },\n                            {\n                                groupId: 'highlight',\n                                items: [\n                                    'menuBar:highlight'\n                                ]\n                            }\n                        ]\n                    },\n                    'menuBar:heading'\n                ]\n            },\n            {\n                groupId: 'list',\n                items: [\n                    'menuBar:bulletedList',\n                    'menuBar:numberedList',\n                    'menuBar:multiLevelList',\n                    'menuBar:todoList'\n                ]\n            },\n            {\n                groupId: 'indent',\n                items: [\n                    'menuBar:alignment',\n                    'menuBar:indent',\n                    'menuBar:outdent'\n                ]\n            },\n            {\n                groupId: 'caseChange',\n                items: [\n                    'menuBar:caseChange'\n                ]\n            },\n            {\n                groupId: 'removeFormat',\n                items: [\n                    'menuBar:removeFormat'\n                ]\n            }\n        ]\n    },\n    {\n        menuId: 'tools',\n        label: 'Tools',\n        groups: [\n            {\n                groupId: 'aiTools',\n                items: [\n                    'menuBar:aiAssistant',\n                    'menuBar:aiCommands'\n                ]\n            },\n            {\n                groupId: 'tools',\n                items: [\n                    'menuBar:trackChanges',\n                    'menuBar:commentsArchive'\n                ]\n            }\n        ]\n    },\n    {\n        menuId: 'help',\n        label: 'Help',\n        groups: [\n            {\n                groupId: 'help',\n                items: [\n                    'menuBar:accessibilityHelp'\n                ]\n            }\n        ]\n    }\n];\n/**\n * Performs a cleanup and normalization of the menu bar configuration.\n */ function normalizeMenuBarConfig(config) {\n    let configObject;\n    // The integrator specified the config as an object but without items. Let's give them defaults but respect their\n    // additions and removals.\n    if (!('items' in config) || !config.items) {\n        configObject = {\n            items: cloneDeep(DefaultMenuBarItems),\n            addItems: [],\n            removeItems: [],\n            isVisible: true,\n            isUsingDefaultConfig: true,\n            ...config\n        };\n    } else {\n        configObject = {\n            items: config.items,\n            removeItems: [],\n            addItems: [],\n            isVisible: true,\n            isUsingDefaultConfig: false,\n            ...config\n        };\n    }\n    return configObject;\n}\n/**\n * Processes a normalized menu bar config and returns a config clone with the following modifications:\n *\n * * Removed components that are not available in the component factory,\n * * Removed obsolete separators,\n * * Purged empty menus,\n * * Localized top-level menu labels.\n */ function processMenuBarConfig({ normalizedConfig, locale, componentFactory, extraItems }) {\n    const configClone = cloneDeep(normalizedConfig);\n    handleAdditions(normalizedConfig, configClone, extraItems);\n    handleRemovals(normalizedConfig, configClone);\n    handleAdditions(normalizedConfig, configClone, configClone.addItems);\n    purgeUnavailableComponents(normalizedConfig, configClone, componentFactory);\n    purgeEmptyMenus(normalizedConfig, configClone);\n    localizeMenuLabels(configClone, locale);\n    return configClone;\n}\n/**\n * Removes items from the menu bar config based on user `removeItems` configuration. Users can remove\n * individual items, groups, or entire menus. For each removed item, a warning is logged if the item\n * was not found in the configuration.\n */ function handleRemovals(originalConfig, config) {\n    const itemsToBeRemoved = config.removeItems;\n    const successfullyRemovedItems = [];\n    // Remove top-level menus.\n    config.items = config.items.filter(({ menuId })=>{\n        if (itemsToBeRemoved.includes(menuId)) {\n            successfullyRemovedItems.push(menuId);\n            return false;\n        }\n        return true;\n    });\n    walkConfigMenus(config.items, (menuDefinition)=>{\n        // Remove groups from menus.\n        menuDefinition.groups = menuDefinition.groups.filter(({ groupId })=>{\n            if (itemsToBeRemoved.includes(groupId)) {\n                successfullyRemovedItems.push(groupId);\n                return false;\n            }\n            return true;\n        });\n        // Remove sub-menus and items from groups.\n        for (const groupDefinition of menuDefinition.groups){\n            groupDefinition.items = groupDefinition.items.filter((item)=>{\n                const itemId = getIdFromGroupItem(item);\n                if (itemsToBeRemoved.includes(itemId)) {\n                    successfullyRemovedItems.push(itemId);\n                    return false;\n                }\n                return true;\n            });\n        }\n    });\n    for (const itemName of itemsToBeRemoved){\n        if (!successfullyRemovedItems.includes(itemName)) {\n            /**\n\t\t\t * There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t * name does could not be removed from the menu bar configuration.\n\t\t\t *\n\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t *\n\t\t\t * @error menu-bar-item-could-not-be-removed\n\t\t\t * @param menuBarConfig The full configuration of the menu bar.\n\t\t\t * @param itemName The name of the item that was not removed from the menu bar.\n\t\t\t */ logWarning('menu-bar-item-could-not-be-removed', {\n                menuBarConfig: originalConfig,\n                itemName\n            });\n        }\n    }\n}\n/**\n * Adds provided items to config. It allows for adding menus, groups, and items at arbitrary\n * positions in the menu bar. If the position does not exist, a warning is logged.\n */ function handleAdditions(originalConfig, config, items) {\n    const successFullyAddedItems = [];\n    if (items.length == 0) {\n        return;\n    }\n    for (const itemToAdd of items){\n        const relation = getRelationFromPosition(itemToAdd.position);\n        const relativeId = getRelativeIdFromPosition(itemToAdd.position);\n        // Adding a menu.\n        if (isMenuBarMenuAddition(itemToAdd)) {\n            if (!relativeId) {\n                // Adding a top-level menu at the beginning of the menu bar.\n                if (relation === 'start') {\n                    config.items.unshift(itemToAdd.menu);\n                    successFullyAddedItems.push(itemToAdd);\n                } else if (relation === 'end') {\n                    config.items.push(itemToAdd.menu);\n                    successFullyAddedItems.push(itemToAdd);\n                }\n            } else {\n                const topLevelMenuDefinitionIndex = config.items.findIndex((menuDefinition)=>menuDefinition.menuId === relativeId);\n                // Adding a top-level menu somewhere between existing menu bar menus.\n                if (topLevelMenuDefinitionIndex != -1) {\n                    if (relation === 'before') {\n                        config.items.splice(topLevelMenuDefinitionIndex, 0, itemToAdd.menu);\n                        successFullyAddedItems.push(itemToAdd);\n                    } else if (relation === 'after') {\n                        config.items.splice(topLevelMenuDefinitionIndex + 1, 0, itemToAdd.menu);\n                        successFullyAddedItems.push(itemToAdd);\n                    }\n                } else {\n                    const wasAdded = addMenuOrItemToGroup(config, itemToAdd.menu, relativeId, relation);\n                    if (wasAdded) {\n                        successFullyAddedItems.push(itemToAdd);\n                    }\n                }\n            }\n        } else if (isMenuBarMenuGroupAddition(itemToAdd)) {\n            walkConfigMenus(config.items, (menuDefinition)=>{\n                if (menuDefinition.menuId === relativeId) {\n                    // Add a group at the start of a menu.\n                    if (relation === 'start') {\n                        menuDefinition.groups.unshift(itemToAdd.group);\n                        successFullyAddedItems.push(itemToAdd);\n                    } else if (relation === 'end') {\n                        menuDefinition.groups.push(itemToAdd.group);\n                        successFullyAddedItems.push(itemToAdd);\n                    }\n                } else {\n                    const relativeGroupIndex = menuDefinition.groups.findIndex((group)=>group.groupId === relativeId);\n                    if (relativeGroupIndex !== -1) {\n                        // Add a group before an existing group in a menu.\n                        if (relation === 'before') {\n                            menuDefinition.groups.splice(relativeGroupIndex, 0, itemToAdd.group);\n                            successFullyAddedItems.push(itemToAdd);\n                        } else if (relation === 'after') {\n                            menuDefinition.groups.splice(relativeGroupIndex + 1, 0, itemToAdd.group);\n                            successFullyAddedItems.push(itemToAdd);\n                        }\n                    }\n                }\n            });\n        } else {\n            const wasAdded = addMenuOrItemToGroup(config, itemToAdd.item, relativeId, relation);\n            if (wasAdded) {\n                successFullyAddedItems.push(itemToAdd);\n            }\n        }\n    }\n    for (const addedItemConfig of items){\n        if (!successFullyAddedItems.includes(addedItemConfig)) {\n            /**\n\t\t\t * There was a problem processing the configuration of the menu bar. The configured item could not be added\n\t\t\t * because the position it was supposed to be added to does not exist.\n\t\t\t *\n\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t *\n\t\t\t * @error menu-bar-item-could-not-be-removed\n\t\t\t * @param menuBarConfig The full configuration of the menu bar.\n\t\t\t * @param itemName The name of the item that was not removed from the menu bar.\n\t\t\t */ logWarning('menu-bar-item-could-not-be-added', {\n                menuBarConfig: originalConfig,\n                addedItemConfig\n            });\n        }\n    }\n}\n/**\n * Handles adding a sub-menu or an item into a group. The logic is the same for both cases.\n */ function addMenuOrItemToGroup(config, itemOrMenuToAdd, relativeId, relation) {\n    let wasAdded = false;\n    walkConfigMenus(config.items, (menuDefinition)=>{\n        for (const { groupId, items: groupItems } of menuDefinition.groups){\n            // Avoid infinite loops.\n            if (wasAdded) {\n                return;\n            }\n            if (groupId === relativeId) {\n                // Adding an item/menu at the beginning of a group.\n                if (relation === 'start') {\n                    groupItems.unshift(itemOrMenuToAdd);\n                    wasAdded = true;\n                } else if (relation === 'end') {\n                    groupItems.push(itemOrMenuToAdd);\n                    wasAdded = true;\n                }\n            } else {\n                // Adding an item/menu relative to an existing item/menu.\n                const relativeItemIndex = groupItems.findIndex((groupItem)=>{\n                    return getIdFromGroupItem(groupItem) === relativeId;\n                });\n                if (relativeItemIndex !== -1) {\n                    if (relation === 'before') {\n                        groupItems.splice(relativeItemIndex, 0, itemOrMenuToAdd);\n                        wasAdded = true;\n                    } else if (relation === 'after') {\n                        groupItems.splice(relativeItemIndex + 1, 0, itemOrMenuToAdd);\n                        wasAdded = true;\n                    }\n                }\n            }\n        }\n    });\n    return wasAdded;\n}\n/**\n * Removes components from the menu bar configuration that are not available in the factory and would\n * not be instantiated. Warns about missing components if the menu bar configuration was specified by the user.\n */ function purgeUnavailableComponents(originalConfig, config, componentFactory) {\n    walkConfigMenus(config.items, (menuDefinition)=>{\n        for (const groupDefinition of menuDefinition.groups){\n            groupDefinition.items = groupDefinition.items.filter((item)=>{\n                const isItemUnavailable = typeof item === 'string' && !componentFactory.has(item);\n                // The default configuration contains all possible editor features. But integrators' editors rarely load\n                // every possible feature. This is why we do not want to log warnings about unavailable items for the default config\n                // because they would show up in almost every integration. If the configuration has been provided by\n                // the integrator, on the other hand, then these warnings bring value.\n                if (isItemUnavailable && !config.isUsingDefaultConfig) {\n                    /**\n\t\t\t\t\t * There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t\t\t * name does not exist so it was omitted when rendering the menu bar.\n\t\t\t\t\t *\n\t\t\t\t\t * This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t\t\t * to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t\t\t *\n\t\t\t\t\t * Make sure the plugin responsible for this menu bar item is loaded and the menu bar configuration\n\t\t\t\t\t * is correct, e.g. {@link module:basic-styles/bold/boldui~BoldUI} is loaded for the `'menuBar:bold'`\n\t\t\t\t\t * menu bar item.\n\t\t\t\t\t *\n\t\t\t\t\t * @error menu-bar-item-unavailable\n\t\t\t\t\t * @param menuBarConfig The full configuration of the menu bar.\n\t\t\t\t\t * @param parentMenuConfig The config of the menu the unavailable component was defined in.\n\t\t\t\t\t * @param componentName The name of the unavailable component.\n\t\t\t\t\t */ logWarning('menu-bar-item-unavailable', {\n                        menuBarConfig: originalConfig,\n                        parentMenuConfig: cloneDeep(menuDefinition),\n                        componentName: item\n                    });\n                }\n                return !isItemUnavailable;\n            });\n        }\n    });\n}\n/**\n * Removes empty menus from the menu bar configuration to improve the visual UX. Such menus can occur\n * when some plugins responsible for providing menu bar items have not been loaded and some part of\n * the configuration populated menus using these components exclusively.\n */ function purgeEmptyMenus(originalConfig, config) {\n    const isUsingDefaultConfig = config.isUsingDefaultConfig;\n    let wasSubMenuPurged = false;\n    // Purge top-level menus.\n    config.items = config.items.filter((menuDefinition)=>{\n        if (!menuDefinition.groups.length) {\n            warnAboutEmptyMenu(originalConfig, menuDefinition, isUsingDefaultConfig);\n            return false;\n        }\n        return true;\n    });\n    // Warn if there were no top-level menus left in the menu bar after purging.\n    if (!config.items.length) {\n        warnAboutEmptyMenu(originalConfig, originalConfig, isUsingDefaultConfig);\n        return;\n    }\n    // Purge sub-menus and groups.\n    walkConfigMenus(config.items, (menuDefinition)=>{\n        // Get rid of empty groups.\n        menuDefinition.groups = menuDefinition.groups.filter((groupDefinition)=>{\n            if (!groupDefinition.items.length) {\n                wasSubMenuPurged = true;\n                return false;\n            }\n            return true;\n        });\n        // Get rid of empty sub-menus.\n        for (const groupDefinition of menuDefinition.groups){\n            groupDefinition.items = groupDefinition.items.filter((item)=>{\n                // If no groups were left after removing empty ones.\n                if (isMenuDefinition(item) && !item.groups.length) {\n                    warnAboutEmptyMenu(originalConfig, item, isUsingDefaultConfig);\n                    wasSubMenuPurged = true;\n                    return false;\n                }\n                return true;\n            });\n        }\n    });\n    if (wasSubMenuPurged) {\n        // The config is walked from the root to the leaves so if anything gets removed, we need to re-run the\n        // whole process because it could've affected parents.\n        purgeEmptyMenus(originalConfig, config);\n    }\n}\nfunction warnAboutEmptyMenu(originalConfig, emptyMenuConfig, isUsingDefaultConfig) {\n    if (isUsingDefaultConfig) {\n        return;\n    }\n    /**\n\t * There was a problem processing the configuration of the menu bar. One of the menus\n\t * is empty so it was omitted when rendering the menu bar.\n\t *\n\t * This warning usually shows up when some {@link module:core/plugin~Plugin plugins} responsible for\n\t * providing menu bar items have not been loaded and the\n\t * {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration} was not updated.\n\t *\n\t * Make sure all necessary editor plugins are loaded and/or update the menu bar configuration\n\t * to account for the missing menu items.\n\t *\n\t * @error menu-bar-menu-empty\n\t * @param menuBarConfig The full configuration of the menu bar.\n\t * @param emptyMenuConfig The definition of the menu that has no child items.\n\t */ logWarning('menu-bar-menu-empty', {\n        menuBarConfig: originalConfig,\n        emptyMenuConfig\n    });\n}\n/**\n * Localizes the user-config using pre-defined localized category labels.\n */ function localizeMenuLabels(config, locale) {\n    const t = locale.t;\n    const localizedCategoryLabels = {\n        // Top-level categories.\n        'File': t({\n            string: 'File',\n            id: 'MENU_BAR_MENU_FILE'\n        }),\n        'Edit': t({\n            string: 'Edit',\n            id: 'MENU_BAR_MENU_EDIT'\n        }),\n        'View': t({\n            string: 'View',\n            id: 'MENU_BAR_MENU_VIEW'\n        }),\n        'Insert': t({\n            string: 'Insert',\n            id: 'MENU_BAR_MENU_INSERT'\n        }),\n        'Format': t({\n            string: 'Format',\n            id: 'MENU_BAR_MENU_FORMAT'\n        }),\n        'Tools': t({\n            string: 'Tools',\n            id: 'MENU_BAR_MENU_TOOLS'\n        }),\n        'Help': t({\n            string: 'Help',\n            id: 'MENU_BAR_MENU_HELP'\n        }),\n        // Sub-menus.\n        'Text': t({\n            string: 'Text',\n            id: 'MENU_BAR_MENU_TEXT'\n        }),\n        'Font': t({\n            string: 'Font',\n            id: 'MENU_BAR_MENU_FONT'\n        })\n    };\n    walkConfigMenus(config.items, (definition)=>{\n        if (definition.label in localizedCategoryLabels) {\n            definition.label = localizedCategoryLabels[definition.label];\n        }\n    });\n}\n/**\n * Recursively visits all menu definitions in the config and calls the callback for each of them.\n */ function walkConfigMenus(definition, callback) {\n    if (Array.isArray(definition)) {\n        for (const topLevelMenuDefinition of definition){\n            walk(topLevelMenuDefinition);\n        }\n    }\n    function walk(menuDefinition) {\n        callback(menuDefinition);\n        for (const groupDefinition of menuDefinition.groups){\n            for (const groupItem of groupDefinition.items){\n                if (isMenuDefinition(groupItem)) {\n                    walk(groupItem);\n                }\n            }\n        }\n    }\n}\nfunction isMenuBarMenuAddition(definition) {\n    return typeof definition === 'object' && 'menu' in definition;\n}\nfunction isMenuBarMenuGroupAddition(definition) {\n    return typeof definition === 'object' && 'group' in definition;\n}\nfunction getRelationFromPosition(position) {\n    if (position.startsWith('start')) {\n        return 'start';\n    } else if (position.startsWith('end')) {\n        return 'end';\n    } else if (position.startsWith('after')) {\n        return 'after';\n    } else {\n        return 'before';\n    }\n}\nfunction getRelativeIdFromPosition(position) {\n    const match = position.match(/^[^:]+:(.+)/);\n    if (match) {\n        return match[1];\n    }\n    return null;\n}\nfunction getIdFromGroupItem(item) {\n    return typeof item === 'string' ? item : item.menuId;\n}\nfunction isMenuDefinition(definition) {\n    return typeof definition === 'object' && 'menuId' in definition;\n}\n\n/**\n * A class providing the minimal interface that is required to successfully bootstrap any editor UI.\n */ class EditorUI extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * The editor that the UI belongs to.\n\t */ editor;\n    /**\n\t * An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins\n\t * to register factories of specific UI components.\n\t */ componentFactory;\n    /**\n\t * Stores the information about the editor UI focus and propagates it so various plugins and components\n\t * are unified as a focus group.\n\t */ focusTracker;\n    /**\n\t * Manages the tooltips displayed on mouseover and focus across the UI.\n\t */ tooltipManager;\n    /**\n\t * A helper that enables the \"powered by\" feature in the editor and renders a link to the project's webpage.\n\t */ poweredBy;\n    /**\n\t * A helper that manages the content of an `aria-live` regions used by editor features to announce status changes\n\t * to screen readers.\n\t */ ariaLiveAnnouncer;\n    /**\n\t * Indicates the UI is ready. Set `true` after {@link #event:ready} event is fired.\n\t *\n\t * @readonly\n\t * @default false\n\t */ isReady = false;\n    /**\n\t * Stores all editable elements used by the editor instance.\n\t */ _editableElementsMap = new Map();\n    /**\n\t * All available & focusable toolbars.\n\t */ _focusableToolbarDefinitions = [];\n    /**\n\t * All additional menu bar items, groups or menus that have their default location defined.\n\t */ _extraMenuBarElements = [];\n    /**\n\t * The last focused element to which focus should return on `Esc` press.\n\t */ _lastFocusedForeignElement = null;\n    /**\n\t * Creates an instance of the editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t */ constructor(editor){\n        super();\n        const editingView = editor.editing.view;\n        this.editor = editor;\n        this.componentFactory = new ComponentFactory(editor);\n        this.focusTracker = new FocusTracker();\n        this.tooltipManager = new TooltipManager(editor);\n        this.poweredBy = new PoweredBy(editor);\n        this.ariaLiveAnnouncer = new AriaLiveAnnouncer(editor);\n        this.set('viewportOffset', this._readViewportOffsetFromConfig());\n        this.once('ready', ()=>{\n            this._bindBodyCollectionWithFocusTracker();\n            this.isReady = true;\n        });\n        // Informs UI components that should be refreshed after layout change.\n        this.listenTo(editingView.document, 'layoutChanged', this.update.bind(this));\n        this.listenTo(editingView, 'scrollToTheSelection', this._handleScrollToTheSelection.bind(this));\n        this._initFocusTracking();\n    }\n    /**\n\t * The main (outermost) DOM element of the editor UI.\n\t *\n\t * For example, in {@link module:editor-classic/classiceditor~ClassicEditor} it is a `<div>` which\n\t * wraps the editable element and the toolbar. In {@link module:editor-inline/inlineeditor~InlineEditor}\n\t * it is the editable element itself (as there is no other wrapper). However, in\n\t * {@link module:editor-decoupled/decouplededitor~DecoupledEditor} it is set to `null` because this editor does not\n\t * come with a single \"main\" HTML element (its editable element and toolbar are separate).\n\t *\n\t * This property can be understood as a shorthand for retrieving the element that a specific editor integration\n\t * considers to be its main DOM element.\n\t */ get element() {\n        return null;\n    }\n    /**\n\t * Fires the {@link module:ui/editorui/editorui~EditorUI#event:update `update`} event.\n\t *\n\t * This method should be called when the editor UI (e.g. positions of its balloons) needs to be updated due to\n\t * some environmental change which CKEditor 5 is not aware of (e.g. resize of a container in which it is used).\n\t */ update() {\n        this.fire('update');\n    }\n    /**\n\t * Destroys the UI.\n\t */ destroy() {\n        this.stopListening();\n        this.focusTracker.destroy();\n        this.tooltipManager.destroy(this.editor);\n        this.poweredBy.destroy();\n        // Clean–up the references to the CKEditor instance stored in the native editable DOM elements.\n        for (const domElement of this._editableElementsMap.values()){\n            domElement.ckeditorInstance = null;\n            this.editor.keystrokes.stopListening(domElement);\n        }\n        this._editableElementsMap = new Map();\n        this._focusableToolbarDefinitions = [];\n    }\n    /**\n\t * Stores the native DOM editable element used by the editor under a unique name.\n\t *\n\t * Also, registers the element in the editor to maintain the accessibility of the UI. When the user is editing text in a focusable\n\t * editable area, they can use the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke to navigate over editor toolbars. See {@link #addToolbar}.\n\t *\n\t * @param rootName The unique name of the editable element.\n\t * @param domElement The native DOM editable element.\n\t */ setEditableElement(rootName, domElement) {\n        this._editableElementsMap.set(rootName, domElement);\n        // Put a reference to the CKEditor instance in the editable native DOM element.\n        // It helps 3rd–party software (browser extensions, other libraries) access and recognize\n        // CKEditor 5 instances (editing roots) and use their API (there is no global editor\n        // instance registry).\n        if (!domElement.ckeditorInstance) {\n            domElement.ckeditorInstance = this.editor;\n        }\n        // Register the element, so it becomes available for Alt+F10 and Esc navigation.\n        this.focusTracker.add(domElement);\n        const setUpKeystrokeHandler = ()=>{\n            // The editing view of the editor is already listening to keystrokes from DOM roots (see: KeyObserver).\n            // Do not duplicate listeners.\n            if (this.editor.editing.view.getDomRoot(rootName)) {\n                return;\n            }\n            this.editor.keystrokes.listenTo(domElement);\n        };\n        // For editable elements set by features after EditorUI is ready (e.g. source editing).\n        if (this.isReady) {\n            setUpKeystrokeHandler();\n        } else {\n            this.once('ready', setUpKeystrokeHandler);\n        }\n    }\n    /**\n\t * Removes the editable from the editor UI. Removes all handlers added by {@link #setEditableElement}.\n\t *\n\t * @param rootName The name of the editable element to remove.\n\t */ removeEditableElement(rootName) {\n        const domElement = this._editableElementsMap.get(rootName);\n        if (!domElement) {\n            return;\n        }\n        this._editableElementsMap.delete(rootName);\n        this.editor.keystrokes.stopListening(domElement);\n        this.focusTracker.remove(domElement);\n        domElement.ckeditorInstance = null;\n    }\n    /**\n\t * Returns the editable editor element with the given name or null if editable does not exist.\n\t *\n\t * @param rootName The editable name.\n\t */ getEditableElement(rootName = 'main') {\n        return this._editableElementsMap.get(rootName);\n    }\n    /**\n\t * Returns array of names of all editor editable elements.\n\t */ getEditableElementsNames() {\n        return this._editableElementsMap.keys();\n    }\n    /**\n\t * Adds a toolbar to the editor UI. Used primarily to maintain the accessibility of the UI.\n\t *\n\t * Focusable toolbars can be accessed (focused) by users by pressing the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke.\n\t * Successive keystroke presses navigate over available toolbars.\n\t *\n\t * @param toolbarView A instance of the toolbar to be registered.\n\t */ addToolbar(toolbarView, options = {}) {\n        if (toolbarView.isRendered) {\n            this.focusTracker.add(toolbarView.element);\n            this.editor.keystrokes.listenTo(toolbarView.element);\n        } else {\n            toolbarView.once('render', ()=>{\n                this.focusTracker.add(toolbarView.element);\n                this.editor.keystrokes.listenTo(toolbarView.element);\n            });\n        }\n        this._focusableToolbarDefinitions.push({\n            toolbarView,\n            options\n        });\n    }\n    /**\n\t * Registers an extra menu bar element, which could be a single item, a group of items, or a menu containing groups.\n\t *\n\t * ```ts\n\t * // Register a new menu bar item.\n\t * editor.ui.extendMenuBar( {\n\t *   item: 'menuBar:customFunctionButton',\n\t *   position: 'after:menuBar:bold'\n\t * } );\n\t *\n\t * // Register a new menu bar group.\n\t * editor.ui.extendMenuBar( {\n\t *   group: {\n\t *     groupId: 'customGroup',\n\t *     items: [\n\t *       'menuBar:customFunctionButton'\n\t *     ]\n\t *   },\n\t *   position: 'start:help'\n\t * } );\n\t *\n\t * // Register a new menu bar menu.\n\t * editor.ui.extendMenuBar( {\n\t *   menu: {\n\t *     menuId: 'customMenu',\n\t *     label: 'customMenu',\n\t *     groups: [\n\t *       {\n\t *         groupId: 'customGroup',\n\t *         items: [\n\t *           'menuBar:customFunctionButton'\n\t *         ]\n\t *       }\n\t *     ]\n\t *   },\n\t *   position: 'after:help'\n\t * } );\n\t * ```\n\t */ extendMenuBar(config) {\n        this._extraMenuBarElements.push(config);\n    }\n    /**\n\t * Stores all editable elements used by the editor instance.\n\t *\n\t * @deprecated\n\t */ get _editableElements() {\n        /**\n\t\t * The {@link module:ui/editorui/editorui~EditorUI#_editableElements `EditorUI#_editableElements`} property has been\n\t\t * deprecated and will be removed in the near future. Please use\n\t\t * {@link module:ui/editorui/editorui~EditorUI#setEditableElement `setEditableElement()`} and\n\t\t * {@link module:ui/editorui/editorui~EditorUI#getEditableElement `getEditableElement()`} methods instead.\n\t\t *\n\t\t * @error editor-ui-deprecated-editable-elements\n\t\t * @param editorUI Editor UI instance the deprecated property belongs to.\n\t\t */ console.warn('editor-ui-deprecated-editable-elements: ' + 'The EditorUI#_editableElements property has been deprecated and will be removed in the near future.', {\n            editorUI: this\n        });\n        return this._editableElementsMap;\n    }\n    /**\n\t * Initializes menu bar.\n\t */ _initMenuBar(menuBarView) {\n        const menuBarViewElement = menuBarView.element;\n        this.focusTracker.add(menuBarViewElement);\n        this.editor.keystrokes.listenTo(menuBarViewElement);\n        const normalizedMenuBarConfig = normalizeMenuBarConfig(this.editor.config.get('menuBar') || {});\n        menuBarView.fillFromConfig(normalizedMenuBarConfig, this.componentFactory, this._extraMenuBarElements);\n        this.editor.keystrokes.set('Esc', (data, cancel)=>{\n            if (!menuBarViewElement.contains(this.editor.ui.focusTracker.focusedElement)) {\n                return;\n            }\n            // Bring focus back to where it came from before focusing the toolbar:\n            // If it came from outside the engine view (e.g. source editing), move it there.\n            if (this._lastFocusedForeignElement) {\n                this._lastFocusedForeignElement.focus();\n                this._lastFocusedForeignElement = null;\n            } else {\n                this.editor.editing.view.focus();\n            }\n            cancel();\n        });\n        this.editor.keystrokes.set('Alt+F9', (data, cancel)=>{\n            // If menu bar is already focused do nothing.\n            if (menuBarViewElement.contains(this.editor.ui.focusTracker.focusedElement)) {\n                return;\n            }\n            this._saveLastFocusedForeignElement();\n            menuBarView.isFocusBorderEnabled = true;\n            menuBarView.focus();\n            cancel();\n        });\n    }\n    /**\n\t * Returns viewport offsets object:\n\t *\n\t * ```js\n\t * {\n\t * \ttop: Number,\n\t * \tright: Number,\n\t * \tbottom: Number,\n\t * \tleft: Number\n\t * }\n\t * ```\n\t *\n\t * Only top property is currently supported.\n\t */ _readViewportOffsetFromConfig() {\n        const editor = this.editor;\n        const viewportOffsetConfig = editor.config.get('ui.viewportOffset');\n        if (viewportOffsetConfig) {\n            return viewportOffsetConfig;\n        }\n        // Not present in EditorConfig type, because it's legacy. Hence the `as` expression.\n        const legacyOffsetConfig = editor.config.get('toolbar.viewportTopOffset');\n        // Fall back to deprecated toolbar config.\n        if (legacyOffsetConfig) {\n            /**\n\t\t\t * The {@link module:core/editor/editorconfig~EditorConfig#toolbar `EditorConfig#toolbar.viewportTopOffset`}\n\t\t\t * property has been deprecated and will be removed in the near future. Please use\n\t\t\t * {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset`} instead.\n\t\t\t *\n\t\t\t * @error editor-ui-deprecated-viewport-offset-config\n\t\t\t */ console.warn('editor-ui-deprecated-viewport-offset-config: ' + 'The `toolbar.vieportTopOffset` configuration option is deprecated. ' + 'It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead.');\n            return {\n                top: legacyOffsetConfig\n            };\n        }\n        // More keys to come in the future.\n        return {\n            top: 0\n        };\n    }\n    /**\n\t * Starts listening for <kbd>Alt</kbd> + <kbd>F10</kbd> and <kbd>Esc</kbd> keystrokes in the context of focusable\n\t * {@link #setEditableElement editable elements} and {@link #addToolbar toolbars}\n\t * to allow users navigate across the UI.\n\t */ _initFocusTracking() {\n        const editor = this.editor;\n        let candidateDefinitions;\n        // Focus the next focusable toolbar on <kbd>Alt</kbd> + <kbd>F10</kbd>.\n        editor.keystrokes.set('Alt+F10', (data, cancel)=>{\n            this._saveLastFocusedForeignElement();\n            const currentFocusedToolbarDefinition = this._getCurrentFocusedToolbarDefinition();\n            // * When focusing a toolbar for the first time, set the array of definitions for successive presses of Alt+F10.\n            // This ensures, the navigation works always the same and no pair of toolbars takes over\n            // (e.g. image and table toolbars when a selected image is inside a cell).\n            // * It could be that the focus went to the toolbar by clicking a toolbar item (e.g. a dropdown). In this case,\n            // there were no candidates so they must be obtained (#12339).\n            if (!currentFocusedToolbarDefinition || !candidateDefinitions) {\n                candidateDefinitions = this._getFocusableCandidateToolbarDefinitions();\n            }\n            // In a single Alt+F10 press, check all candidates but if none were focused, don't go any further.\n            // This prevents an infinite loop.\n            for(let i = 0; i < candidateDefinitions.length; i++){\n                const candidateDefinition = candidateDefinitions.shift();\n                // Put the first definition to the back of the array. This allows circular navigation over all toolbars\n                // on successive presses of Alt+F10.\n                candidateDefinitions.push(candidateDefinition);\n                // Don't focus the same toolbar again. If you did, this would move focus from the nth focused toolbar item back to the\n                // first item as per ToolbarView#focus() if the user navigated inside the toolbar.\n                if (candidateDefinition !== currentFocusedToolbarDefinition && this._focusFocusableCandidateToolbar(candidateDefinition)) {\n                    // Clean up after a current visible toolbar when switching to the next one.\n                    if (currentFocusedToolbarDefinition && currentFocusedToolbarDefinition.options.afterBlur) {\n                        currentFocusedToolbarDefinition.options.afterBlur();\n                    }\n                    break;\n                }\n            }\n            cancel();\n        });\n        // Blur the focused toolbar on <kbd>Esc</kbd> and bring the focus back to its origin.\n        editor.keystrokes.set('Esc', (data, cancel)=>{\n            const focusedToolbarDef = this._getCurrentFocusedToolbarDefinition();\n            if (!focusedToolbarDef) {\n                return;\n            }\n            // Bring focus back to where it came from before focusing the toolbar:\n            // 1. If it came from outside the engine view (e.g. source editing), move it there.\n            if (this._lastFocusedForeignElement) {\n                this._lastFocusedForeignElement.focus();\n                this._lastFocusedForeignElement = null;\n            } else {\n                editor.editing.view.focus();\n            }\n            // Clean up after the toolbar if there is anything to do there.\n            if (focusedToolbarDef.options.afterBlur) {\n                focusedToolbarDef.options.afterBlur();\n            }\n            cancel();\n        });\n    }\n    /**\n\t * Saves last focused element that doen not belong to editing view to restore focus on `Esc`.\n\t */ _saveLastFocusedForeignElement() {\n        const focusedElement = this.focusTracker.focusedElement;\n        // Focus moved out of a DOM element that\n        // * is not a toolbar,\n        // * does not belong to the editing view (e.g. source editing).\n        if (Array.from(this._editableElementsMap.values()).includes(focusedElement) && !Array.from(this.editor.editing.view.domRoots.values()).includes(focusedElement)) {\n            this._lastFocusedForeignElement = focusedElement;\n        }\n    }\n    /**\n\t * Returns definitions of toolbars that could potentially be focused, sorted by their importance for the user.\n\t *\n\t * Focusable toolbars candidates are either:\n\t * * already visible,\n\t * * have `beforeFocus()` set in their {@link module:ui/editorui/editorui~FocusableToolbarDefinition definition} that suggests that\n\t * they might show up when called. Keep in mind that determining whether a toolbar will show up (and become focusable) is impossible\n\t * at this stage because it depends on its implementation, that in turn depends on the editing context (selection).\n\t *\n\t * **Note**: Contextual toolbars take precedence over regular toolbars.\n\t */ _getFocusableCandidateToolbarDefinitions() {\n        const definitions = [];\n        for (const toolbarDef of this._focusableToolbarDefinitions){\n            const { toolbarView, options } = toolbarDef;\n            if (isVisible(toolbarView.element) || options.beforeFocus) {\n                definitions.push(toolbarDef);\n            }\n        }\n        // Contextual and already visible toolbars have higher priority. If both are true, the toolbar will always focus first.\n        // For instance, a selected widget toolbar vs inline editor toolbar: both are visible but the widget toolbar is contextual.\n        definitions.sort((defA, defB)=>getToolbarDefinitionWeight(defA) - getToolbarDefinitionWeight(defB));\n        return definitions;\n    }\n    /**\n\t * Returns a definition of the toolbar that is currently visible and focused (one of its children has focus).\n\t *\n\t * `null` is returned when no toolbar is currently focused.\n\t */ _getCurrentFocusedToolbarDefinition() {\n        for (const definition of this._focusableToolbarDefinitions){\n            if (definition.toolbarView.element && definition.toolbarView.element.contains(this.focusTracker.focusedElement)) {\n                return definition;\n            }\n        }\n        return null;\n    }\n    /**\n\t * Focuses a focusable toolbar candidate using its definition.\n\t *\n\t * @param candidateToolbarDefinition A definition of the toolbar to focus.\n\t * @returns `true` when the toolbar candidate was focused. `false` otherwise.\n\t */ _focusFocusableCandidateToolbar(candidateToolbarDefinition) {\n        const { toolbarView, options: { beforeFocus } } = candidateToolbarDefinition;\n        if (beforeFocus) {\n            beforeFocus();\n        }\n        // If it didn't show up after beforeFocus(), it's not focusable at all.\n        if (!isVisible(toolbarView.element)) {\n            return false;\n        }\n        toolbarView.focus();\n        return true;\n    }\n    /**\n\t * Provides an integration between {@link #viewportOffset} and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t * It allows the UI-agnostic engine method to consider user-configured viewport offsets specific for the integration.\n\t *\n\t * @param evt The `scrollToTheSelection` event info.\n\t * @param data The payload carried by the `scrollToTheSelection` event.\n\t */ _handleScrollToTheSelection(evt, data) {\n        const configuredViewportOffset = {\n            top: 0,\n            bottom: 0,\n            left: 0,\n            right: 0,\n            ...this.viewportOffset\n        };\n        data.viewportOffset.top += configuredViewportOffset.top;\n        data.viewportOffset.bottom += configuredViewportOffset.bottom;\n        data.viewportOffset.left += configuredViewportOffset.left;\n        data.viewportOffset.right += configuredViewportOffset.right;\n    }\n    /**\n\t * Ensures that the focus tracker is aware of all views' DOM elements in the body collection.\n\t */ _bindBodyCollectionWithFocusTracker() {\n        const body = this.view.body;\n        for (const view of body){\n            this.focusTracker.add(view.element);\n        }\n        body.on('add', (evt, view)=>{\n            this.focusTracker.add(view.element);\n        });\n        body.on('remove', (evt, view)=>{\n            this.focusTracker.remove(view.element);\n        });\n    }\n}\n/**\n * Returns a number (weight) for a toolbar definition. Visible toolbars have a higher priority and so do\n * contextual toolbars (displayed in the context of a content, for instance, an image toolbar).\n *\n * A standard invisible toolbar is the heaviest. A visible contextual toolbar is the lightest.\n *\n * @param toolbarDef A toolbar definition to be weighted.\n */ function getToolbarDefinitionWeight(toolbarDef) {\n    const { toolbarView, options } = toolbarDef;\n    let weight = 10;\n    // Prioritize already visible toolbars. They should get focused first.\n    if (isVisible(toolbarView.element)) {\n        weight--;\n    }\n    // Prioritize contextual toolbars. They are displayed at the selection.\n    if (options.isContextual) {\n        weight--;\n    }\n    return weight;\n}\n\n/**\n * The editor UI view class. Base class for the editor main views.\n */ class EditorUIView extends View {\n    /**\n\t * Collection of the child views, detached from the DOM\n\t * structure of the editor, like panels, icons etc.\n\t */ body;\n    /**\n\t * Menu bar view instance. May not be initialized in some editor types.\n\t */ menuBarView;\n    /**\n\t * Creates an instance of the editor UI view class.\n\t *\n\t * @param locale The locale instance.\n\t */ constructor(locale){\n        super(locale);\n        this.body = new BodyCollection(locale);\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.body.attachToDom();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this.body.detachFromDom();\n        return super.destroy();\n    }\n}\n\n/**\n * The boxed editor UI view class. This class represents an editor interface\n * consisting of a toolbar and an editable area, enclosed within a box.\n */ class BoxedEditorUIView extends EditorUIView {\n    /**\n\t * Collection of the child views located in the top (`.ck-editor__top`)\n\t * area of the UI.\n\t */ top;\n    /**\n\t * Collection of the child views located in the main (`.ck-editor__main`)\n\t * area of the UI.\n\t */ main;\n    /**\n\t * Voice label of the UI.\n\t */ _voiceLabelView;\n    /**\n\t * Creates an instance of the boxed editor UI view class.\n\t *\n\t * @param locale The locale instance..\n\t */ constructor(locale){\n        super(locale);\n        this.top = this.createCollection();\n        this.main = this.createCollection();\n        this._voiceLabelView = this._createVoiceLabel();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-reset',\n                    'ck-editor',\n                    'ck-rounded-corners'\n                ],\n                role: 'application',\n                dir: locale.uiLanguageDirection,\n                lang: locale.uiLanguage,\n                'aria-labelledby': this._voiceLabelView.id\n            },\n            children: [\n                this._voiceLabelView,\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-editor__top',\n                            'ck-reset_all'\n                        ],\n                        role: 'presentation'\n                    },\n                    children: this.top\n                },\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-editor__main'\n                        ],\n                        role: 'presentation'\n                    },\n                    children: this.main\n                }\n            ]\n        });\n    }\n    /**\n\t * Creates a voice label view instance.\n\t */ _createVoiceLabel() {\n        const t = this.t;\n        const voiceLabel = new LabelView();\n        voiceLabel.text = t('Rich Text Editor');\n        voiceLabel.extendTemplate({\n            attributes: {\n                class: 'ck-voice-label'\n            }\n        });\n        return voiceLabel;\n    }\n}\n\n/**\n * The editable UI view class.\n */ class EditableUIView extends View {\n    /**\n\t * The name of the editable UI view.\n\t */ name = null;\n    /**\n\t * The editing view instance the editable is related to. Editable uses the editing\n\t * view to dynamically modify its certain DOM attributes after {@link #render rendering}.\n\t *\n\t * **Note**: The DOM attributes are performed by the editing view and not UI\n\t * {@link module:ui/view~View#bindTemplate template bindings} because once rendered,\n\t * the editable DOM element must remain under the full control of the engine to work properly.\n\t */ _editingView;\n    /**\n\t * The element which is the main editable element (usually the one with `contentEditable=\"true\"`).\n\t */ _editableElement;\n    /**\n\t * Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t * the view will not render its {@link #template}.\n\t */ _hasExternalElement;\n    /**\n\t * Creates an instance of EditableUIView class.\n\t *\n\t * @param locale The locale instance.\n\t * @param editingView The editing view instance the editable is related to.\n\t * @param editableElement The editable element. If not specified, this view\n\t * should create it. Otherwise, the existing element should be used.\n\t */ constructor(locale, editingView, editableElement){\n        super(locale);\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-content',\n                    'ck-editor__editable',\n                    'ck-rounded-corners'\n                ],\n                lang: locale.contentLanguage,\n                dir: locale.contentLanguageDirection\n            }\n        });\n        this.set('isFocused', false);\n        this._editableElement = editableElement;\n        this._hasExternalElement = !!this._editableElement;\n        this._editingView = editingView;\n    }\n    /**\n\t * Renders the view by either applying the {@link #template} to the existing\n\t * {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}\n\t * as {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement}.\n\t */ render() {\n        super.render();\n        if (this._hasExternalElement) {\n            this.template.apply(this.element = this._editableElement);\n        } else {\n            this._editableElement = this.element;\n        }\n        this.on('change:isFocused', ()=>this._updateIsFocusedClasses());\n        this._updateIsFocusedClasses();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        if (this._hasExternalElement) {\n            this.template.revert(this._editableElement);\n        }\n        super.destroy();\n    }\n    /**\n\t * Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t * the view will not render its {@link #template}.\n\t */ get hasExternalElement() {\n        return this._hasExternalElement;\n    }\n    /**\n\t * Updates the `ck-focused` and `ck-blurred` CSS classes on the {@link #element} according to\n\t * the {@link #isFocused} property value using the {@link #_editingView editing view} API.\n\t */ _updateIsFocusedClasses() {\n        const editingView = this._editingView;\n        if (editingView.isRenderingInProgress) {\n            updateAfterRender(this);\n        } else {\n            update(this);\n        }\n        function update(view) {\n            editingView.change((writer)=>{\n                const viewRoot = editingView.document.getRoot(view.name);\n                writer.addClass(view.isFocused ? 'ck-focused' : 'ck-blurred', viewRoot);\n                writer.removeClass(view.isFocused ? 'ck-blurred' : 'ck-focused', viewRoot);\n            });\n        }\n        // In a case of a multi-root editor, a callback will be attached more than once (one callback for each root).\n        // While executing one callback the `isRenderingInProgress` observable is changing what causes executing another\n        // callback and render is called inside the already pending render.\n        // We need to be sure that callback is executed only when the value has changed from `true` to `false`.\n        // See https://github.com/ckeditor/ckeditor5/issues/1676.\n        function updateAfterRender(view) {\n            editingView.once('change:isRenderingInProgress', (evt, name, value)=>{\n                if (!value) {\n                    update(view);\n                } else {\n                    updateAfterRender(view);\n                }\n            });\n        }\n    }\n}\n\n/**\n * The inline editable UI class implementing an inline {@link module:ui/editableui/editableuiview~EditableUIView}.\n */ class InlineEditableUIView extends EditableUIView {\n    /**\n\t * The cached options object passed to the constructor.\n\t */ _options;\n    /**\n\t * Creates an instance of the InlineEditableUIView class.\n\t *\n\t * @param locale The locale instance.\n\t * @param editingView The editing view instance the editable is related to.\n\t * @param editableElement The editable element. If not specified, the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView}\n\t * will create it. Otherwise, the existing element will be used.\n\t * @param options Additional configuration of the view.\n\t * @param options.label The label of the editable for assistive technologies. If not provided, a default label is used or,\n\t * the existing `aria-label` attribute value from the specified `editableElement` is preserved.\n\t */ constructor(locale, editingView, editableElement, options = {}){\n        super(locale, editingView, editableElement);\n        this._options = options;\n        this.extendTemplate({\n            attributes: {\n                role: 'textbox',\n                class: 'ck-editor__editable_inline'\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        const editingView = this._editingView;\n        editingView.change((writer)=>{\n            const viewRoot = editingView.document.getRoot(this.name);\n            writer.setAttribute('aria-label', this.getEditableAriaLabel(), viewRoot);\n        });\n    }\n    /**\n\t * Returns a normalized label for the editable view based on the environment.\n\t */ getEditableAriaLabel() {\n        const t = this.locale.t;\n        const label = this._options.label;\n        const editableElement = this._editableElement;\n        const editableName = this.name;\n        if (typeof label == 'string') {\n            return label;\n        } else if (typeof label === 'object') {\n            return label[editableName];\n        } else if (typeof label === 'function') {\n            return label(this);\n        } else if (editableElement) {\n            const existingLabel = editableElement.getAttribute('aria-label');\n            if (existingLabel) {\n                return existingLabel;\n            }\n        }\n        return t('Rich Text Editor. Editing area: %0', editableName);\n    }\n}\n\n/**\n * The iframe view class.\n *\n * ```ts\n * const iframe = new IframeView();\n *\n * iframe.render();\n * document.body.appendChild( iframe.element );\n *\n * iframe.on( 'loaded', () => {\n * \tconsole.log( 'The iframe has loaded', iframe.element.contentWindow );\n * } );\n *\n * iframe.element.src = 'https://ckeditor.com';\n * ```\n */ class IframeView extends View {\n    /**\n\t * Creates a new instance of the iframe view.\n\t *\n\t * @param locale The locale instance.\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'iframe',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-reset_all'\n                ],\n                // It seems that we need to allow scripts in order to be able to listen to events.\n                // TODO: Research that. Perhaps the src must be set?\n                sandbox: 'allow-same-origin allow-scripts'\n            },\n            on: {\n                load: bind.to('loaded')\n            }\n        });\n    }\n    /**\n\t * Renders the iframe's {@link #element} and returns a `Promise` for asynchronous\n\t * child `contentDocument` loading process.\n\t *\n\t * @returns A promise which resolves once the iframe `contentDocument` has\n\t * been {@link #event:loaded}.\n\t */ render() {\n        return new Promise((resolve)=>{\n            this.on('loaded', resolve);\n            return super.render();\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module ui/search/filtergroupanditemnames\n */ /**\n * A filter function that returns matching item and group names in the list view.\n */ function filterGroupAndItemNames(regExp, items) {\n    let totalItemsCount = 0;\n    let resultsCount = 0;\n    for (const groupView of items){\n        const group = groupView;\n        const groupItems = group.items;\n        const isGroupLabelMatching = regExp && !!group.label.match(regExp);\n        group.labelView.highlightText(isGroupLabelMatching ? regExp : null);\n        for (const listItemView of groupItems){\n            const buttonView = listItemView.children.first;\n            const labelView = buttonView.labelView;\n            if (!regExp) {\n                listItemView.isVisible = true;\n                labelView.highlightText(null);\n            } else {\n                const isItemLabelMatching = !!buttonView.label.match(regExp);\n                labelView.highlightText(isItemLabelMatching ? regExp : null);\n                listItemView.isVisible = isGroupLabelMatching || isItemLabelMatching;\n            }\n        }\n        const visibleInGroupCount = groupItems.filter((listItemView)=>listItemView.isVisible).length;\n        totalItemsCount += group.items.length;\n        resultsCount += isGroupLabelMatching ? group.items.length : visibleInGroupCount;\n        group.isVisible = isGroupLabelMatching || !!visibleInGroupCount;\n    }\n    return {\n        resultsCount,\n        totalItemsCount\n    };\n}\n\n/**\n * The Notification plugin.\n *\n * This plugin sends a few types of notifications: `success`, `info` and `warning`. The notifications need to be\n * handled and displayed by a plugin responsible for showing the UI of the notifications. Using this plugin for dispatching\n * notifications makes it possible to switch the notifications UI.\n *\n * Note that every unhandled and not stopped `warning` notification will be displayed as a system alert.\n * See {@link module:ui/notification/notification~Notification#showWarning}.\n */ class Notification extends ContextPlugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Notification';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        // Each unhandled and not stopped `show:warning` event is displayed as a system alert.\n        this.on('show:warning', (evt, data)=>{\n            window.alert(data.message); // eslint-disable-line no-alert\n        }, {\n            priority: 'lowest'\n        });\n    }\n    /**\n\t * Shows a success notification.\n\t *\n\t * By default, it fires the {@link #event:show:success `show:success` event} with the given `data`. The event namespace can be extended\n\t * using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showSuccess( 'Image is uploaded.', {\n\t * \tnamespace: 'upload:image'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:success:upload:image` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showSuccess( 'Image is uploaded.', {\n\t * \ttitle: 'Image upload success'\n\t * } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */ showSuccess(message, data = {}) {\n        this._showNotification({\n            message,\n            type: 'success',\n            namespace: data.namespace,\n            title: data.title\n        });\n    }\n    /**\n\t * Shows an information notification.\n\t *\n\t * By default, it fires the {@link #event:show:info `show:info` event} with the given `data`. The event namespace can be extended\n\t * using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showInfo( 'Editor is offline.', {\n\t * \tnamespace: 'editor:status'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:info:editor:status` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showInfo( 'Editor is offline.', {\n\t * \ttitle: 'Network information'\n\t * } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */ showInfo(message, data = {}) {\n        this._showNotification({\n            message,\n            type: 'info',\n            namespace: data.namespace,\n            title: data.title\n        });\n    }\n    /**\n\t * Shows a warning notification.\n\t *\n\t * By default, it fires the {@link #event:show:warning `show:warning` event}\n\t * with the given `data`. The event namespace can be extended using the `data.namespace` option. For example:\n\t *\n\t * ```ts\n\t * showWarning( 'Image upload error.', {\n\t * \tnamespace: 'upload:image'\n\t * } );\n\t * ```\n\t *\n\t * will fire the `show:warning:upload:image` event.\n\t *\n\t * You can provide the title of the notification:\n\t *\n\t * ```ts\n\t * showWarning( 'Image upload error.', {\n\t * \ttitle: 'Upload failed'\n\t * } );\n\t * ```\n\t *\n\t * Note that each unhandled and not stopped `warning` notification will be displayed as a system alert.\n\t * The plugin responsible for displaying warnings should `stop()` the event to prevent displaying it as an alert:\n\t *\n\t * ```ts\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Do something with the data.\n\t *\n\t * \t// Stop this event to prevent displaying it as an alert.\n\t * \tevt.stop();\n\t * } );\n\t * ```\n\t *\n\t * You can attach many listeners to the same event and `stop()` this event in a listener with a low priority:\n\t *\n\t * ```ts\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Show the warning in the UI, but do not stop it.\n\t * } );\n\t *\n\t * notifications.on( 'show:warning', ( evt, data ) => {\n\t * \t// Log the warning to some error tracker.\n\t *\n\t * \t// Stop this event to prevent displaying it as an alert.\n\t * \tevt.stop();\n\t * }, { priority: 'low' } );\n\t * ```\n\t *\n\t * @param message The content of the notification.\n\t * @param data Additional data.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */ showWarning(message, data = {}) {\n        this._showNotification({\n            message,\n            type: 'warning',\n            namespace: data.namespace,\n            title: data.title\n        });\n    }\n    /**\n\t * Fires the `show` event with the specified type, namespace and message.\n\t *\n\t * @param data The message data.\n\t * @param data.message The content of the notification.\n\t * @param data.type The type of the message.\n\t * @param data.namespace Additional event namespace.\n\t * @param data.title The title of the notification.\n\t */ _showNotification(data) {\n        const event = data.namespace ? `show:${data.type}:${data.namespace}` : `show:${data.type}`;\n        this.fire(event, {\n            message: data.message,\n            type: data.type,\n            title: data.title || ''\n        });\n    }\n}\n\n/**\n * The base MVC model class.\n */ class Model extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * Creates a new Model instance.\n\t *\n\t * @param attributes The model state attributes to be defined during the instance creation.\n\t * @param properties The (out of state) properties to be appended to the instance during creation.\n\t */ constructor(attributes, properties){\n        super();\n        // Extend this instance with the additional (out of state) properties.\n        if (properties) {\n            extend(this, properties);\n        }\n        // Initialize the attributes.\n        if (attributes) {\n            this.set(attributes);\n        }\n    }\n}\n\nconst toPx$4 = /* #__PURE__ */ toUnit('px');\n/**\n * Provides the common contextual balloon for the editor.\n *\n * The role of this plugin is to unify the contextual balloons logic, simplify views management and help\n * avoid the unnecessary complexity of handling multiple {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n * instances in the editor.\n *\n * This plugin allows for creating single or multiple panel stacks.\n *\n * Each stack may have multiple views, with the one on the top being visible. When the visible view is removed from the stack,\n * the previous view becomes visible.\n *\n * It might be useful to implement nested navigation in a balloon. For instance, a toolbar view may contain a link button.\n * When you click it, a link view (which lets you set the URL) is created and put on top of the toolbar view, so the link panel\n * is displayed. When you finish editing the link and close (remove) the link view, the toolbar view is visible again.\n *\n * However, there are cases when there are multiple independent balloons to be displayed, for instance, if the selection\n * is inside two inline comments at the same time. For such cases, you can create two independent panel stacks.\n * The contextual balloon plugin will create a navigation bar to let the users switch between these panel stacks using the \"Next\"\n * and \"Previous\" buttons.\n *\n * If there are no views in the current stack, the balloon panel will try to switch to the next stack. If there are no\n * panels in any stack, the balloon panel will be hidden.\n *\n * **Note**: To force the balloon panel to show only one view, even if there are other stacks, use the `singleViewMode=true` option\n * when {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon#add adding} a view to a panel.\n *\n * From the implementation point of view, the contextual ballon plugin is reusing a single\n * {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} instance to display multiple contextual balloon\n * panels in the editor. It also creates a special {@link module:ui/panel/balloon/contextualballoon~RotatorView rotator view},\n * used to manage multiple panel stacks. Rotator view is a child of the balloon panel view and the parent of the specific\n * view you want to display. If there is more than one panel stack to be displayed, the rotator view will add a\n * navigation bar. If there is only one stack, the rotator view is transparent (it does not add any UI elements).\n */ class ContextualBalloon extends Plugin {\n    /**\n\t * The {@link module:utils/dom/position~Options#limiter position limiter}\n\t * for the {@link #view balloon}, used when no `limiter` has been passed into {@link #add}\n\t * or {@link #updatePosition}.\n\t *\n\t * By default, a function that obtains the farthest DOM\n\t * {@link module:engine/view/rooteditableelement~RootEditableElement}\n\t * of the {@link module:engine/view/document~Document#selection}.\n\t */ positionLimiter;\n    visibleStack;\n    /**\n\t * The map of views and their stacks.\n\t */ _viewToStack = new Map();\n    /**\n\t * The map of IDs and stacks.\n\t */ _idToStack = new Map();\n    /**\n\t * The common balloon panel view.\n\t */ _view = null;\n    /**\n\t * Rotator view embedded in the contextual balloon.\n\t * Displays the currently visible view in the balloon and provides navigation for switching stacks.\n\t */ _rotatorView = null;\n    /**\n\t * Displays fake panels under the balloon panel view when multiple stacks are added to the balloon.\n\t */ _fakePanelsView = null;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ContextualBalloon';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this.positionLimiter = ()=>{\n            const view = this.editor.editing.view;\n            const viewDocument = view.document;\n            const editableElement = viewDocument.selection.editableElement;\n            if (editableElement) {\n                return view.domConverter.mapViewToDom(editableElement.root);\n            }\n            return null;\n        };\n        this.decorate('getPositionOptions');\n        this.set('visibleView', null);\n        this.set('_numberOfStacks', 0);\n        this.set('_singleViewMode', false);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        if (this._view) {\n            this._view.destroy();\n        }\n        if (this._rotatorView) {\n            this._rotatorView.destroy();\n        }\n        if (this._fakePanelsView) {\n            this._fakePanelsView.destroy();\n        }\n    }\n    /**\n\t * The common balloon panel view.\n\t */ get view() {\n        if (!this._view) {\n            this._createPanelView();\n        }\n        return this._view;\n    }\n    /**\n\t * Returns `true` when the given view is in one of the stacks. Otherwise returns `false`.\n\t */ hasView(view) {\n        return Array.from(this._viewToStack.keys()).includes(view);\n    }\n    /**\n\t * Adds a new view to the stack and makes it visible if the current stack is visible\n\t * or it is the first view in the balloon.\n\t *\n\t * @param data The configuration of the view.\n\t * @param data.stackId The ID of the stack that the view is added to. Defaults to `'main'`.\n\t * @param data.view The content of the balloon.\n\t * @param data.position Positioning options.\n\t * @param data.balloonClassName An additional CSS class added to the {@link #view balloon} when visible.\n\t * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow. Defaults to `true`.\n\t * @param data.singleViewMode Whether the view should be the only visible view even if other stacks were added. Defaults to `false`.\n\t */ add(data) {\n        if (!this._view) {\n            this._createPanelView();\n        }\n        if (this.hasView(data.view)) {\n            /**\n\t\t\t * Trying to add configuration of the same view more than once.\n\t\t\t *\n\t\t\t * @error contextualballoon-add-view-exist\n\t\t\t */ throw new CKEditorError('contextualballoon-add-view-exist', [\n                this,\n                data\n            ]);\n        }\n        const stackId = data.stackId || 'main';\n        // If new stack is added, creates it and show view from this stack.\n        if (!this._idToStack.has(stackId)) {\n            this._idToStack.set(stackId, new Map([\n                [\n                    data.view,\n                    data\n                ]\n            ]));\n            this._viewToStack.set(data.view, this._idToStack.get(stackId));\n            this._numberOfStacks = this._idToStack.size;\n            if (!this._visibleStack || data.singleViewMode) {\n                this.showStack(stackId);\n            }\n            return;\n        }\n        const stack = this._idToStack.get(stackId);\n        if (data.singleViewMode) {\n            this.showStack(stackId);\n        }\n        // Add new view to the stack.\n        stack.set(data.view, data);\n        this._viewToStack.set(data.view, stack);\n        // And display it if is added to the currently visible stack.\n        if (stack === this._visibleStack) {\n            this._showView(data);\n        }\n    }\n    /**\n\t * Removes the given view from the stack. If the removed view was visible,\n\t * the view preceding it in the stack will become visible instead.\n\t * When there is no view in the stack, the next stack will be displayed.\n\t * When there are no more stacks, the balloon will hide.\n\t *\n\t * @param view A view to be removed from the balloon.\n\t */ remove(view) {\n        if (!this.hasView(view)) {\n            /**\n\t\t\t * Trying to remove the configuration of the view not defined in the stack.\n\t\t\t *\n\t\t\t * @error contextualballoon-remove-view-not-exist\n\t\t\t */ throw new CKEditorError('contextualballoon-remove-view-not-exist', [\n                this,\n                view\n            ]);\n        }\n        const stack = this._viewToStack.get(view);\n        if (this._singleViewMode && this.visibleView === view) {\n            this._singleViewMode = false;\n        }\n        // When visible view will be removed we need to show a preceding view or next stack\n        // if a view is the only view in the stack.\n        if (this.visibleView === view) {\n            if (stack.size === 1) {\n                if (this._idToStack.size > 1) {\n                    this._showNextStack();\n                } else {\n                    this.view.hide();\n                    this.visibleView = null;\n                    this._rotatorView.hideView();\n                }\n            } else {\n                this._showView(Array.from(stack.values())[stack.size - 2]);\n            }\n        }\n        if (stack.size === 1) {\n            this._idToStack.delete(this._getStackId(stack));\n            this._numberOfStacks = this._idToStack.size;\n        } else {\n            stack.delete(view);\n        }\n        this._viewToStack.delete(view);\n    }\n    /**\n\t * Updates the position of the balloon using the position data of the first visible view in the stack.\n\t * When new position data is given, the position data of the currently visible view will be updated.\n\t *\n\t * @param position Position options.\n\t */ updatePosition(position) {\n        if (position) {\n            this._visibleStack.get(this.visibleView).position = position;\n        }\n        this.view.pin(this.getPositionOptions());\n        this._fakePanelsView.updatePosition();\n    }\n    /**\n\t * Returns position options of the last view in the stack.\n\t * This keeps the balloon in the same position when the view is changed.\n\t */ getPositionOptions() {\n        let position = Array.from(this._visibleStack.values()).pop().position;\n        if (position) {\n            // Use the default limiter if none has been specified.\n            if (!position.limiter) {\n                // Don't modify the original options object.\n                position = Object.assign({}, position, {\n                    limiter: this.positionLimiter\n                });\n            }\n            // Don't modify the original options object.\n            position = Object.assign({}, position, {\n                viewportOffsetConfig: this.editor.ui.viewportOffset\n            });\n        }\n        return position;\n    }\n    /**\n\t * Shows the last view from the stack of a given ID.\n\t */ showStack(id) {\n        this.visibleStack = id;\n        const stack = this._idToStack.get(id);\n        if (!stack) {\n            /**\n\t\t\t * Trying to show a stack that does not exist.\n\t\t\t *\n\t\t\t * @error contextualballoon-showstack-stack-not-exist\n\t\t\t */ throw new CKEditorError('contextualballoon-showstack-stack-not-exist', this);\n        }\n        if (this._visibleStack === stack) {\n            return;\n        }\n        this._showView(Array.from(stack.values()).pop());\n    }\n    /**\n\t * Initializes view instances.\n\t */ _createPanelView() {\n        this._view = new BalloonPanelView(this.editor.locale);\n        this.editor.ui.view.body.add(this._view);\n        this._rotatorView = this._createRotatorView();\n        this._fakePanelsView = this._createFakePanelsView();\n    }\n    /**\n\t * Returns the stack of the currently visible view.\n\t */ get _visibleStack() {\n        return this._viewToStack.get(this.visibleView);\n    }\n    /**\n\t * Returns the ID of the given stack.\n\t */ _getStackId(stack) {\n        const entry = Array.from(this._idToStack.entries()).find((entry)=>entry[1] === stack);\n        return entry[0];\n    }\n    /**\n\t * Shows the last view from the next stack.\n\t */ _showNextStack() {\n        const stacks = Array.from(this._idToStack.values());\n        let nextIndex = stacks.indexOf(this._visibleStack) + 1;\n        if (!stacks[nextIndex]) {\n            nextIndex = 0;\n        }\n        this.showStack(this._getStackId(stacks[nextIndex]));\n    }\n    /**\n\t * Shows the last view from the previous stack.\n\t */ _showPrevStack() {\n        const stacks = Array.from(this._idToStack.values());\n        let nextIndex = stacks.indexOf(this._visibleStack) - 1;\n        if (!stacks[nextIndex]) {\n            nextIndex = stacks.length - 1;\n        }\n        this.showStack(this._getStackId(stacks[nextIndex]));\n    }\n    /**\n\t * Creates a rotator view.\n\t */ _createRotatorView() {\n        const view = new RotatorView(this.editor.locale);\n        const t = this.editor.locale.t;\n        this.view.content.add(view);\n        // Hide navigation when there is only a one stack & not in single view mode.\n        view.bind('isNavigationVisible').to(this, '_numberOfStacks', this, '_singleViewMode', (value, isSingleViewMode)=>{\n            return !isSingleViewMode && value > 1;\n        });\n        // Update balloon position after toggling navigation.\n        view.on('change:isNavigationVisible', ()=>this.updatePosition(), {\n            priority: 'low'\n        });\n        // Update stacks counter value.\n        view.bind('counter').to(this, 'visibleView', this, '_numberOfStacks', (visibleView, numberOfStacks)=>{\n            if (numberOfStacks < 2) {\n                return '';\n            }\n            const current = Array.from(this._idToStack.values()).indexOf(this._visibleStack) + 1;\n            return t('%0 of %1', [\n                current,\n                numberOfStacks\n            ]);\n        });\n        view.buttonNextView.on('execute', ()=>{\n            // When current view has a focus then move focus to the editable before removing it,\n            // otherwise editor will lost focus.\n            if (view.focusTracker.isFocused) {\n                this.editor.editing.view.focus();\n            }\n            this._showNextStack();\n        });\n        view.buttonPrevView.on('execute', ()=>{\n            // When current view has a focus then move focus to the editable before removing it,\n            // otherwise editor will lost focus.\n            if (view.focusTracker.isFocused) {\n                this.editor.editing.view.focus();\n            }\n            this._showPrevStack();\n        });\n        return view;\n    }\n    /**\n\t * Creates a fake panels view.\n\t */ _createFakePanelsView() {\n        const view = new FakePanelsView(this.editor.locale, this.view);\n        view.bind('numberOfPanels').to(this, '_numberOfStacks', this, '_singleViewMode', (number, isSingleViewMode)=>{\n            const showPanels = !isSingleViewMode && number >= 2;\n            return showPanels ? Math.min(number - 1, 2) : 0;\n        });\n        view.listenTo(this.view, 'change:top', ()=>view.updatePosition());\n        view.listenTo(this.view, 'change:left', ()=>view.updatePosition());\n        this.editor.ui.view.body.add(view);\n        return view;\n    }\n    /**\n\t * Sets the view as the content of the balloon and attaches the balloon using position\n\t * options of the first view.\n\t *\n\t * @param data Configuration.\n\t * @param data.view The view to show in the balloon.\n\t * @param data.balloonClassName Additional class name which will be added to the {@link #view balloon}.\n\t * @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow.\n\t */ _showView({ view, balloonClassName = '', withArrow = true, singleViewMode = false }) {\n        this.view.class = balloonClassName;\n        this.view.withArrow = withArrow;\n        this._rotatorView.showView(view);\n        this.visibleView = view;\n        this.view.pin(this.getPositionOptions());\n        this._fakePanelsView.updatePosition();\n        if (singleViewMode) {\n            this._singleViewMode = true;\n        }\n    }\n}\n/**\n * Rotator view is a helper class for the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon}.\n * It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.\n * See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.\n */ class RotatorView extends View {\n    /**\n\t * Used for checking if a view is focused or not.\n\t */ focusTracker;\n    /**\n\t * Navigation button for switching the stack to the previous one.\n\t */ buttonPrevView;\n    /**\n\t * Navigation button for switching the stack to the next one.\n\t */ buttonNextView;\n    /**\n\t * A collection of the child views that creates the rotator content.\n\t */ content;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const t = locale.t;\n        const bind = this.bindTemplate;\n        this.set('isNavigationVisible', true);\n        this.focusTracker = new FocusTracker();\n        this.buttonPrevView = this._createButtonView(t('Previous'), icons.previousArrow);\n        this.buttonNextView = this._createButtonView(t('Next'), icons.nextArrow);\n        this.content = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-balloon-rotator'\n                ],\n                'z-index': '-1'\n            },\n            children: [\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck-balloon-rotator__navigation',\n                            bind.to('isNavigationVisible', (value)=>value ? '' : 'ck-hidden')\n                        ]\n                    },\n                    children: [\n                        this.buttonPrevView,\n                        {\n                            tag: 'span',\n                            attributes: {\n                                class: [\n                                    'ck-balloon-rotator__counter'\n                                ]\n                            },\n                            children: [\n                                {\n                                    text: bind.to('counter')\n                                }\n                            ]\n                        },\n                        this.buttonNextView\n                    ]\n                },\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: 'ck-balloon-rotator__content'\n                    },\n                    children: this.content\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.focusTracker.add(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n    }\n    /**\n\t * Shows a given view.\n\t *\n\t * @param view The view to show.\n\t */ showView(view) {\n        this.hideView();\n        this.content.add(view);\n    }\n    /**\n\t * Hides the currently displayed view.\n\t */ hideView() {\n        this.content.clear();\n    }\n    /**\n\t * Creates a navigation button view.\n\t *\n\t * @param label The button label.\n\t * @param icon The button icon.\n\t */ _createButtonView(label, icon) {\n        const view = new ButtonView(this.locale);\n        view.set({\n            label,\n            icon,\n            tooltip: true\n        });\n        return view;\n    }\n}\n/**\n * Displays additional layers under the balloon when multiple stacks are added to the balloon.\n */ class FakePanelsView extends View {\n    /**\n\t * Collection of the child views which creates fake panel content.\n\t */ content;\n    /**\n\t * Context.\n\t */ _balloonPanelView;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, balloonPanelView){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('top', 0);\n        this.set('left', 0);\n        this.set('height', 0);\n        this.set('width', 0);\n        this.set('numberOfPanels', 0);\n        this.content = this.createCollection();\n        this._balloonPanelView = balloonPanelView;\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck-fake-panel',\n                    bind.to('numberOfPanels', (number)=>number ? '' : 'ck-hidden')\n                ],\n                style: {\n                    top: bind.to('top', toPx$4),\n                    left: bind.to('left', toPx$4),\n                    width: bind.to('width', toPx$4),\n                    height: bind.to('height', toPx$4)\n                }\n            },\n            children: this.content\n        });\n        this.on('change:numberOfPanels', (evt, name, next, prev)=>{\n            if (next > prev) {\n                this._addPanels(next - prev);\n            } else {\n                this._removePanels(prev - next);\n            }\n            this.updatePosition();\n        });\n    }\n    _addPanels(number) {\n        while(number--){\n            const view = new View();\n            view.setTemplate({\n                tag: 'div'\n            });\n            this.content.add(view);\n            this.registerChild(view);\n        }\n    }\n    _removePanels(number) {\n        while(number--){\n            const view = this.content.last;\n            this.content.remove(view);\n            this.deregisterChild(view);\n            view.destroy();\n        }\n    }\n    /**\n\t * Updates coordinates of fake panels.\n\t */ updatePosition() {\n        if (this.numberOfPanels) {\n            const { top, left } = this._balloonPanelView;\n            const { width, height } = new Rect(this._balloonPanelView.element);\n            Object.assign(this, {\n                top,\n                left,\n                width,\n                height\n            });\n        }\n    }\n}\n\nconst toPx$3 = /* #__PURE__ */ toUnit('px');\n/**\n * The sticky panel view class.\n */ class StickyPanelView extends View {\n    /**\n\t * Collection of the child views which creates balloon panel contents.\n\t */ content;\n    /**\n\t * The panel which accepts children into {@link #content} collection.\n\t * Also an element which is positioned when {@link #isSticky}.\n\t */ contentPanelElement;\n    /**\n\t * A dummy element which visually fills the space as long as the\n\t * actual panel is sticky. It prevents flickering of the UI.\n\t */ _contentPanelPlaceholder;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('isActive', false);\n        this.set('isSticky', false);\n        this.set('limiterElement', null);\n        this.set('limiterBottomOffset', 50);\n        this.set('viewportTopOffset', 0);\n        this.set('_marginLeft', null);\n        this.set('_isStickyToTheBottomOfLimiter', false);\n        this.set('_stickyTopOffset', null);\n        this.set('_stickyBottomOffset', null);\n        this.content = this.createCollection();\n        this._contentPanelPlaceholder = new Template({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-sticky-panel__placeholder'\n                ],\n                style: {\n                    display: bind.to('isSticky', (isSticky)=>isSticky ? 'block' : 'none'),\n                    height: bind.to('isSticky', (isSticky)=>{\n                        return isSticky ? toPx$3(this._contentPanelRect.height) : null;\n                    })\n                }\n            }\n        }).render();\n        this.contentPanelElement = new Template({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-sticky-panel__content',\n                    // Toggle class of the panel when \"sticky\" state changes in the view.\n                    bind.if('isSticky', 'ck-sticky-panel__content_sticky'),\n                    bind.if('_isStickyToTheBottomOfLimiter', 'ck-sticky-panel__content_sticky_bottom-limit')\n                ],\n                style: {\n                    width: bind.to('isSticky', (isSticky)=>{\n                        return isSticky ? toPx$3(this._contentPanelPlaceholder.getBoundingClientRect().width) : null;\n                    }),\n                    top: bind.to('_stickyTopOffset', (value)=>value ? toPx$3(value) : value),\n                    bottom: bind.to('_stickyBottomOffset', (value)=>value ? toPx$3(value) : value),\n                    marginLeft: bind.to('_marginLeft')\n                }\n            },\n            children: this.content\n        }).render();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-sticky-panel'\n                ]\n            },\n            children: [\n                this._contentPanelPlaceholder,\n                this.contentPanelElement\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        // Check if the panel should go into the sticky state immediately.\n        this.checkIfShouldBeSticky();\n        // Update sticky state of the panel as the window and ancestors are being scrolled.\n        this.listenTo(global.document, 'scroll', ()=>{\n            this.checkIfShouldBeSticky();\n        }, {\n            useCapture: true\n        });\n        // Synchronize with `model.isActive` because sticking an inactive panel is pointless.\n        this.listenTo(this, 'change:isActive', ()=>{\n            this.checkIfShouldBeSticky();\n        });\n    }\n    /**\n\t * Analyzes the environment to decide whether the panel should be sticky or not.\n\t * Then handles the positioning of the panel.\n\t */ checkIfShouldBeSticky() {\n        // @if CK_DEBUG_STICKYPANEL // RectDrawer.clear();\n        if (!this.limiterElement || !this.isActive) {\n            this._unstick();\n            return;\n        }\n        const limiterRect = new Rect(this.limiterElement);\n        let visibleLimiterRect = limiterRect.getVisible();\n        if (visibleLimiterRect) {\n            const windowRect = new Rect(global.window);\n            windowRect.top += this.viewportTopOffset;\n            windowRect.height -= this.viewportTopOffset;\n            visibleLimiterRect = visibleLimiterRect.getIntersection(windowRect);\n        }\n        // @if CK_DEBUG_STICKYPANEL // if ( visibleLimiterRect ) {\n        // @if CK_DEBUG_STICKYPANEL // \tRectDrawer.draw( visibleLimiterRect,\n        // @if CK_DEBUG_STICKYPANEL // \t\t{ outlineWidth: '3px', opacity: '.8', outlineColor: 'red', outlineOffset: '-3px' },\n        // @if CK_DEBUG_STICKYPANEL // \t\t'Visible anc'\n        // @if CK_DEBUG_STICKYPANEL // \t);\n        // @if CK_DEBUG_STICKYPANEL // }\n        // @if CK_DEBUG_STICKYPANEL //\n        // @if CK_DEBUG_STICKYPANEL // RectDrawer.draw( limiterRect,\n        // @if CK_DEBUG_STICKYPANEL // \t{ outlineWidth: '3px', opacity: '.8', outlineColor: 'green', outlineOffset: '-3px' },\n        // @if CK_DEBUG_STICKYPANEL // \t'Limiter'\n        // @if CK_DEBUG_STICKYPANEL // );\n        // Stick the panel only if\n        // * the limiter's ancestors are intersecting with each other so that some of their rects are visible,\n        // * and the limiter's top edge is above the visible ancestors' top edge.\n        if (visibleLimiterRect && limiterRect.top < visibleLimiterRect.top) {\n            // @if CK_DEBUG_STICKYPANEL // RectDrawer.draw( visibleLimiterRect,\n            // @if CK_DEBUG_STICKYPANEL // \t{ outlineWidth: '3px', opacity: '.8', outlineColor: 'fuchsia', outlineOffset: '-3px',\n            // @if CK_DEBUG_STICKYPANEL // \t\tbackgroundColor: 'rgba(255, 0, 255, .3)' },\n            // @if CK_DEBUG_STICKYPANEL // \t'Visible limiter'\n            // @if CK_DEBUG_STICKYPANEL // );\n            const visibleLimiterTop = visibleLimiterRect.top;\n            // Check if there's a change the panel can be sticky to the bottom of the limiter.\n            if (visibleLimiterTop + this._contentPanelRect.height + this.limiterBottomOffset > visibleLimiterRect.bottom) {\n                const stickyBottomOffset = Math.max(limiterRect.bottom - visibleLimiterRect.bottom, 0) + this.limiterBottomOffset;\n                // @if CK_DEBUG_STICKYPANEL // const stickyBottomOffsetRect = new Rect( {\n                // @if CK_DEBUG_STICKYPANEL // \ttop: limiterRect.bottom - stickyBottomOffset, left: 0, right: 2000,\n                // @if CK_DEBUG_STICKYPANEL // \tbottom: limiterRect.bottom - stickyBottomOffset, width: 2000, height: 1\n                // @if CK_DEBUG_STICKYPANEL // } );\n                // @if CK_DEBUG_STICKYPANEL // RectDrawer.draw( stickyBottomOffsetRect,\n                // @if CK_DEBUG_STICKYPANEL // \t{ outlineWidth: '1px', opacity: '.8', outlineColor: 'black' },\n                // @if CK_DEBUG_STICKYPANEL // \t'Sticky bottom offset'\n                // @if CK_DEBUG_STICKYPANEL // );\n                // Check if sticking the panel to the bottom of the limiter does not cause it to suddenly\n                // move upwards if there's not enough space for it.\n                if (limiterRect.bottom - stickyBottomOffset > limiterRect.top + this._contentPanelRect.height) {\n                    this._stickToBottomOfLimiter(stickyBottomOffset);\n                } else {\n                    this._unstick();\n                }\n            } else {\n                if (this._contentPanelRect.height + this.limiterBottomOffset < limiterRect.height) {\n                    this._stickToTopOfAncestors(visibleLimiterTop);\n                } else {\n                    this._unstick();\n                }\n            }\n        } else {\n            this._unstick();\n        }\n    // @if CK_DEBUG_STICKYPANEL // console.clear();\n    // @if CK_DEBUG_STICKYPANEL // console.log( 'isSticky', this.isSticky );\n    // @if CK_DEBUG_STICKYPANEL // console.log( '_isStickyToTheBottomOfLimiter', this._isStickyToTheBottomOfLimiter );\n    // @if CK_DEBUG_STICKYPANEL // console.log( '_stickyTopOffset', this._stickyTopOffset );\n    // @if CK_DEBUG_STICKYPANEL // console.log( '_stickyBottomOffset', this._stickyBottomOffset );\n    // @if CK_DEBUG_STICKYPANEL // if ( visibleLimiterRect ) {\n    // @if CK_DEBUG_STICKYPANEL // \tRectDrawer.draw( visibleLimiterRect,\n    // @if CK_DEBUG_STICKYPANEL // \t\t{ ...diagonalStylesBlack,\n    // @if CK_DEBUG_STICKYPANEL // \t\t\toutlineWidth: '3px', opacity: '.8', outlineColor: 'orange', outlineOffset: '-3px',\n    // @if CK_DEBUG_STICKYPANEL // \t\t\tbackgroundColor: 'rgba(0, 0, 255, .2)' },\n    // @if CK_DEBUG_STICKYPANEL // \t\t'visibleLimiterRect'\n    // @if CK_DEBUG_STICKYPANEL // \t);\n    // @if CK_DEBUG_STICKYPANEL // }\n    }\n    /**\n\t * Sticks the panel at the given CSS `top` offset.\n\t *\n\t * @private\n\t * @param topOffset\n\t */ _stickToTopOfAncestors(topOffset) {\n        this.isSticky = true;\n        this._isStickyToTheBottomOfLimiter = false;\n        this._stickyTopOffset = topOffset;\n        this._stickyBottomOffset = null;\n        this._marginLeft = toPx$3(-global.window.scrollX);\n    }\n    /**\n\t * Sticks the panel at the bottom of the limiter with a given CSS `bottom` offset.\n\t *\n\t * @private\n\t * @param stickyBottomOffset\n\t */ _stickToBottomOfLimiter(stickyBottomOffset) {\n        this.isSticky = true;\n        this._isStickyToTheBottomOfLimiter = true;\n        this._stickyTopOffset = null;\n        this._stickyBottomOffset = stickyBottomOffset;\n        this._marginLeft = toPx$3(-global.window.scrollX);\n    }\n    /**\n\t * Unsticks the panel putting it back to its original position.\n\t *\n\t * @private\n\t */ _unstick() {\n        this.isSticky = false;\n        this._isStickyToTheBottomOfLimiter = false;\n        this._stickyTopOffset = null;\n        this._stickyBottomOffset = null;\n        this._marginLeft = null;\n    }\n    /**\n\t * Returns the bounding rect of the {@link #contentPanelElement}.\n\t *\n\t * @private\n\t */ get _contentPanelRect() {\n        return new Rect(this.contentPanelElement);\n    }\n}\n\n/**\n * A search input field for the {@link module:ui/search/text/searchtextview~SearchTextView} component.\n *\n * @internal\n * @extends module:ui/labeledfield/labeledfieldview~LabeledFieldView\n */ class SearchTextQueryView extends LabeledFieldView {\n    /**\n\t * The loupe icon displayed next to the {@link #fieldView}.\n\t */ iconView;\n    /**\n\t * The button that clears and focuses the {@link #fieldView}.\n\t */ resetButtonView;\n    /**\n\t * A reference to the view configuration.\n\t */ _viewConfig;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, config){\n        const t = locale.t;\n        const viewConfig = Object.assign({}, {\n            showResetButton: true,\n            showIcon: true,\n            creator: createLabeledInputText\n        }, config);\n        super(locale, viewConfig.creator);\n        this.label = config.label;\n        this._viewConfig = viewConfig;\n        if (this._viewConfig.showIcon) {\n            this.iconView = new IconView();\n            this.iconView.content = icons.loupe;\n            this.fieldWrapperChildren.add(this.iconView, 0);\n            this.extendTemplate({\n                attributes: {\n                    class: 'ck-search__query_with-icon'\n                }\n            });\n        }\n        if (this._viewConfig.showResetButton) {\n            this.resetButtonView = new ButtonView(locale);\n            this.resetButtonView.set({\n                label: t('Clear'),\n                icon: icons.cancel,\n                class: 'ck-search__reset',\n                isVisible: false,\n                tooltip: true\n            });\n            this.resetButtonView.on('execute', ()=>{\n                this.reset();\n                this.focus();\n                this.fire('reset');\n            });\n            this.resetButtonView.bind('isVisible').to(this.fieldView, 'isEmpty', (isEmpty)=>!isEmpty);\n            this.fieldWrapperChildren.add(this.resetButtonView);\n            this.extendTemplate({\n                attributes: {\n                    class: 'ck-search__query_with-reset'\n                }\n            });\n        }\n    }\n    /**\n\t * Resets the search field to its default state.\n\t */ reset() {\n        this.fieldView.reset();\n        if (this._viewConfig.showResetButton) {\n            this.resetButtonView.isVisible = false;\n        }\n    }\n}\n\n/**\n * A view displaying an information text related to different states of {@link module:ui/search/text/searchtextview~SearchTextView}.\n *\n * @internal\n */ class SearchInfoView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        const bind = this.bindTemplate;\n        this.set({\n            isVisible: false,\n            primaryText: '',\n            secondaryText: ''\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-search__info',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ],\n                tabindex: -1\n            },\n            children: [\n                {\n                    tag: 'span',\n                    children: [\n                        {\n                            text: [\n                                bind.to('primaryText')\n                            ]\n                        }\n                    ]\n                },\n                {\n                    tag: 'span',\n                    children: [\n                        {\n                            text: [\n                                bind.to('secondaryText')\n                            ]\n                        }\n                    ]\n                }\n            ]\n        });\n    }\n    /**\n\t * Focuses the view\n\t */ focus() {\n        this.element.focus();\n    }\n}\n\n/**\n * A sub-component of {@link module:ui/search/text/searchtextview~SearchTextView}. It hosts the filtered and the information views.\n */ class SearchResultsView extends View {\n    /**\n\t * Tracks information about the DOM focus in the view.\n\t *\n\t * @readonly\n\t */ focusTracker;\n    /**\n\t * The collection of the child views inside of the list item {@link #element}.\n\t *\n\t * @readonly\n\t */ children;\n    /**\n\t * Provides the focus management (keyboard navigation) in the view.\n\t *\n\t * @readonly\n\t */ _focusCycler;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.children = this.createCollection();\n        this.focusTracker = new FocusTracker();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-search__results'\n                ],\n                tabindex: -1\n            },\n            children: this.children\n        });\n        this._focusCycler = new FocusCycler({\n            focusables: this.children,\n            focusTracker: this.focusTracker\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        for (const child of this.children){\n            this.focusTracker.add(child.element);\n        }\n    }\n    /**\n\t * Focuses the view.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Focuses the first child view.\n\t */ focusFirst() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Focuses the last child view.\n\t */ focusLast() {\n        this._focusCycler.focusLast();\n    }\n}\n\n/**\n * A search component that allows filtering of an arbitrary view based on a search query\n * specified by the user in a text field.\n *\n *```ts\n * // This view must specify the `filter()` and `focus()` methods.\n * const filteredView = ...;\n *\n * const searchView = new SearchTextView( locale, {\n * \tsearchFieldLabel: 'Search list items',\n * \tfilteredView\n * } );\n *\n * view.render();\n *\n * document.body.append( view.element );\n * ```\n */ class SearchTextView extends View {\n    /**\n\t * Tracks information about the DOM focus in the view.\n\t *\n\t * @readonly\n\t */ focusTracker;\n    /**\n\t * An instance of the keystroke handler managing user interaction and accessibility.\n\t *\n\t * @readonly\n\t */ keystrokes;\n    /**\n\t * A view hosting the {@link #filteredView} passed in the configuration and the {@link #infoView}.\n\t */ resultsView;\n    /**\n\t * The view that is filtered by the search query.\n\t */ filteredView;\n    /**\n\t * The view that displays the information about the search results.\n\t */ infoView;\n    /**\n\t * The view that allows the user to enter the search query.\n\t */ queryView;\n    /**\n\t * Provides the focus management (keyboard navigation) between {@link #queryView} and {@link #filteredView}.\n\t *\n\t * @readonly\n\t */ focusCycler;\n    /**\n\t * The cached configuration object.\n\t *\n\t * @internal\n\t */ _config;\n    /**\n\t * Creates an instance of the {@link module:ui/search/text/searchtextview~SearchTextView} class.\n\t *\n\t * @param locale The localization services instance.\n\t * @param config Configuration of the view.\n\t */ constructor(locale, config){\n        super(locale);\n        this._config = config;\n        this.filteredView = config.filteredView;\n        this.queryView = this._createSearchTextQueryView();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this.resultsView = new SearchResultsView(locale);\n        this.children = this.createCollection();\n        this.focusableChildren = this.createCollection([\n            this.queryView,\n            this.resultsView\n        ]);\n        this.set('isEnabled', true);\n        this.set('resultsCount', 0);\n        this.set('totalItemsCount', 0);\n        if (config.infoView && config.infoView.instance) {\n            this.infoView = config.infoView.instance;\n        } else {\n            this.infoView = new SearchInfoView();\n            this._enableDefaultInfoViewBehavior();\n            this.on('render', ()=>{\n                // Initial search that determines if there are any searchable items\n                // and displays the corresponding info text.\n                this.search('');\n            });\n        }\n        this.resultsView.children.addMany([\n            this.infoView,\n            this.filteredView\n        ]);\n        this.focusCycler = new FocusCycler({\n            focusables: this.focusableChildren,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        this.on('search', (evt, { resultsCount, totalItemsCount })=>{\n            this.resultsCount = resultsCount;\n            this.totalItemsCount = totalItemsCount;\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-search',\n                    config.class || null\n                ],\n                tabindex: '-1'\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.children.addMany([\n            this.queryView,\n            this.resultsView\n        ]);\n        const stopPropagation = (data)=>data.stopPropagation();\n        for (const focusableChild of this.focusableChildren){\n            this.focusTracker.add(focusableChild.element);\n        }\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n        // Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n        // keystroke handler would take over the key management in the URL input. We need to prevent\n        // this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n        this.keystrokes.set('arrowright', stopPropagation);\n        this.keystrokes.set('arrowleft', stopPropagation);\n        this.keystrokes.set('arrowup', stopPropagation);\n        this.keystrokes.set('arrowdown', stopPropagation);\n    }\n    /**\n\t * Focuses the {@link #queryView}.\n\t */ focus() {\n        this.queryView.focus();\n    }\n    /**\n\t * Resets the component to its initial state.\n\t */ reset() {\n        this.queryView.reset();\n        this.search('');\n        this.filteredView.element.scrollTo(0, 0);\n    }\n    /**\n\t * Searches the {@link #filteredView} for the given query.\n\t *\n\t * @internal\n\t * @param query The search query string.\n\t */ search(query) {\n        const regExp = query ? new RegExp(escapeRegExp(query), 'ig') : null;\n        const filteringResults = this.filteredView.filter(regExp);\n        this.fire('search', {\n            query,\n            ...filteringResults\n        });\n    }\n    /**\n\t * Creates a search field view based on configured creator..\n\t */ _createSearchTextQueryView() {\n        const queryView = new SearchTextQueryView(this.locale, this._config.queryView);\n        this.listenTo(queryView.fieldView, 'input', ()=>{\n            this.search(queryView.fieldView.element.value);\n        });\n        queryView.on('reset', ()=>this.reset());\n        queryView.bind('isEnabled').to(this);\n        return queryView;\n    }\n    /**\n\t * Initializes the default {@link #infoView} behavior with default text labels when no custom info view\n\t * was specified in the view config.\n\t */ _enableDefaultInfoViewBehavior() {\n        const t = this.locale.t;\n        const infoView = this.infoView;\n        this.on('search', (evt, data)=>{\n            if (!data.resultsCount) {\n                const defaultTextConfig = this._config.infoView && this._config.infoView.text;\n                let primaryText, secondaryText;\n                if (data.totalItemsCount) {\n                    if (defaultTextConfig && defaultTextConfig.notFound) {\n                        primaryText = defaultTextConfig.notFound.primary;\n                        secondaryText = defaultTextConfig.notFound.secondary;\n                    } else {\n                        primaryText = t('No results found');\n                        secondaryText = '';\n                    }\n                } else {\n                    if (defaultTextConfig && defaultTextConfig.noSearchableItems) {\n                        primaryText = defaultTextConfig.noSearchableItems.primary;\n                        secondaryText = defaultTextConfig.noSearchableItems.secondary;\n                    } else {\n                        primaryText = t('No searchable items');\n                        secondaryText = '';\n                    }\n                }\n                infoView.set({\n                    primaryText: normalizeInfoText(primaryText, data),\n                    secondaryText: normalizeInfoText(secondaryText, data),\n                    isVisible: true\n                });\n            } else {\n                infoView.set({\n                    isVisible: false\n                });\n            }\n        });\n        function normalizeInfoText(text, { query, resultsCount, totalItemsCount }) {\n            return typeof text === 'function' ? text(query, resultsCount, totalItemsCount) : text;\n        }\n    }\n}\n\n/**\n * The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class\n * with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur\n * the component.\n */ class AutocompleteView extends SearchTextView {\n    /**\n\t * The configuration of the autocomplete view.\n\t */ _config;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, config){\n        super(locale, config);\n        this._config = config;\n        const toPx = toUnit('px');\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-autocomplete'\n                ]\n            }\n        });\n        const bindResultsView = this.resultsView.bindTemplate;\n        this.resultsView.set('isVisible', false);\n        this.resultsView.set('_position', 's');\n        this.resultsView.set('_width', 0);\n        this.resultsView.extendTemplate({\n            attributes: {\n                class: [\n                    bindResultsView.if('isVisible', 'ck-hidden', (value)=>!value),\n                    bindResultsView.to('_position', (value)=>`ck-search__results_${value}`)\n                ],\n                style: {\n                    width: bindResultsView.to('_width', toPx)\n                }\n            }\n        });\n        // Update the visibility of the results view when the user focuses or blurs the component.\n        // This is also integration for the `resetOnBlur` configuration.\n        this.focusTracker.on('change:isFocused', (evt, name, isFocused)=>{\n            this._updateResultsVisibility();\n            if (isFocused) {\n                // Reset the scroll position of the results view whenever the autocomplete reopens.\n                this.resultsView.element.scrollTop = 0;\n            } else if (config.resetOnBlur) {\n                this.queryView.reset();\n            }\n        });\n        // Update the visibility of the results view when the user types in the query field.\n        // This is an integration for `queryMinChars` configuration.\n        // This is an integration for search results changing length and the #resultsView requiring to be repositioned.\n        this.on('search', ()=>{\n            this._updateResultsVisibility();\n            this._updateResultsViewWidthAndPosition();\n        });\n        // Hide the results view when the user presses the ESC key.\n        this.keystrokes.set('esc', (evt, cancel)=>{\n            // Let the DOM event pass through if the focus is in the query view.\n            if (!this.resultsView.isVisible) {\n                return;\n            }\n            // Focus the query view first and only then close the results view. Otherwise, if the focus\n            // was in the results view, it will get lost.\n            this.queryView.focus();\n            this.resultsView.isVisible = false;\n            cancel();\n        });\n        // Update the position of the results view when the user scrolls the page.\n        // TODO: This needs to be debounced down the road.\n        this.listenTo(global.document, 'scroll', ()=>{\n            this._updateResultsViewWidthAndPosition();\n        });\n        // Hide the results when the component becomes disabled.\n        this.on('change:isEnabled', ()=>{\n            this._updateResultsVisibility();\n        });\n        // Update the value of the query field when the user selects a result.\n        this.filteredView.on('execute', (evt, { value })=>{\n            // Focus the query view first to avoid losing the focus.\n            this.focus();\n            // Resetting the view will ensure that the #queryView will update its empty state correctly.\n            // This prevents bugs related to dynamic labels or auto-grow when re-setting the same value\n            // to #queryView.fieldView.value (which does not trigger empty state change) to an\n            // #queryView.fieldView.element that has been changed by the user.\n            this.reset();\n            // Update the value of the query field.\n            this.queryView.fieldView.value = this.queryView.fieldView.element.value = value;\n            // Finally, hide the results view. The focus has been moved earlier so this is safe.\n            this.resultsView.isVisible = false;\n        });\n        // Update the position and width of the results view when it becomes visible.\n        this.resultsView.on('change:isVisible', ()=>{\n            this._updateResultsViewWidthAndPosition();\n        });\n    }\n    /**\n\t * Updates the position of the results view on demand.\n\t */ _updateResultsViewWidthAndPosition() {\n        if (!this.resultsView.isVisible) {\n            return;\n        }\n        this.resultsView._width = new Rect(this.queryView.fieldView.element).width;\n        const optimalResultsPosition = AutocompleteView._getOptimalPosition({\n            element: this.resultsView.element,\n            target: this.queryView.element,\n            fitInViewport: true,\n            positions: AutocompleteView.defaultResultsPositions\n        });\n        // _getOptimalPosition will return null if there is no optimal position found (e.g. target is off the viewport).\n        this.resultsView._position = optimalResultsPosition ? optimalResultsPosition.name : 's';\n    }\n    /**\n\t * Updates the visibility of the results view on demand.\n\t */ _updateResultsVisibility() {\n        const queryMinChars = typeof this._config.queryMinChars === 'undefined' ? 0 : this._config.queryMinChars;\n        const queryLength = this.queryView.fieldView.element.value.length;\n        this.resultsView.isVisible = this.focusTracker.isFocused && this.isEnabled && queryLength >= queryMinChars;\n    }\n    /**\n\t * Positions for the autocomplete results view. Two positions are defined by default:\n\t * * `s` - below the search field,\n\t * * `n` - above the search field.\n\t */ static defaultResultsPositions = [\n        (fieldRect)=>{\n            return {\n                top: fieldRect.bottom,\n                left: fieldRect.left,\n                name: 's'\n            };\n        },\n        (fieldRect, resultsRect)=>{\n            return {\n                top: fieldRect.top - resultsRect.height,\n                left: fieldRect.left,\n                name: 'n'\n            };\n        }\n    ];\n    /**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t */ static _getOptimalPosition = getOptimalPosition;\n}\n\n/**\n * A class representing a view that displays a text which subset can be highlighted using the\n * {@link #highlightText} method.\n */ class HighlightedTextView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        this.set('text', undefined);\n        this.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-highlighted-text'\n                ]\n            }\n        });\n        this.on('render', ()=>{\n            // Classic setTemplate binding for #text will not work because highlightText() replaces the\n            // pre-rendered DOM text node new a new one (and <mark> elements).\n            this.on('change:text', ()=>{\n                this._updateInnerHTML(this.text);\n            });\n            this._updateInnerHTML(this.text);\n        });\n    }\n    /**\n\t * Highlights view's {@link #text} according to the specified `RegExp`. If the passed RegExp is `null`, the\n\t * highlighting is removed\n\t *\n\t * @param regExp\n\t */ highlightText(regExp) {\n        this._updateInnerHTML(markText(this.text || '', regExp));\n    }\n    /**\n\t * Updates element's `innerHTML` with the passed content.\n\t */ _updateInnerHTML(newInnerHTML) {\n        this.element.innerHTML = newInnerHTML || '';\n    }\n}\n/**\n * Replaces `regExp` occurrences with `<mark>` tags in a text.\n *\n * @param text A text to get marked.\n * @param regExp An optional `RegExp`. If not passed, this is a pass-through function.\n * @returns A text with `RegExp` occurrences marked by `<mark>`.\n */ function markText(text, regExp) {\n    if (!regExp) {\n        return escape(text);\n    }\n    const textParts = [];\n    let lastMatchEnd = 0;\n    let matchInfo = regExp.exec(text);\n    // Iterate over all matches and create an array of text parts. The idea is to mark which parts are query matches\n    // so that later on they can be highlighted.\n    while(matchInfo !== null){\n        const curMatchStart = matchInfo.index;\n        // Detect if there was something between last match and this one.\n        if (curMatchStart !== lastMatchEnd) {\n            textParts.push({\n                text: text.substring(lastMatchEnd, curMatchStart),\n                isMatch: false\n            });\n        }\n        textParts.push({\n            text: matchInfo[0],\n            isMatch: true\n        });\n        lastMatchEnd = regExp.lastIndex;\n        matchInfo = regExp.exec(text);\n    }\n    // Your match might not be the last part of a string. Be sure to add any plain text following the last match.\n    if (lastMatchEnd !== text.length) {\n        textParts.push({\n            text: text.substring(lastMatchEnd),\n            isMatch: false\n        });\n    }\n    const outputHtml = textParts// The entire text should be escaped.\n    .map((part)=>{\n        part.text = escape(part.text);\n        return part;\n    })// Only matched text should be wrapped with HTML mark element.\n    .map((part)=>part.isMatch ? `<mark>${part.text}</mark>` : part.text).join('');\n    return outputHtml;\n}\n\n/**\n * A button label view that can highlight a text fragment.\n */ class ButtonLabelWithHighlightView extends HighlightedTextView {\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        this.set({\n            style: undefined,\n            text: undefined,\n            id: undefined\n        });\n        const bind = this.bindTemplate;\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-button__label'\n                ],\n                style: bind.to('style'),\n                id: bind.to('id')\n            }\n        });\n    }\n}\n\n/**\n * A label view that can highlight a text fragment.\n */ class LabelWithHighlightView extends HighlightedTextView {\n    /**\n\t * @inheritDoc\n\t */ id;\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        this.set('for', undefined);\n        const bind = this.bindTemplate;\n        this.id = `ck-editor__label_${uid()}`;\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-label'\n                ],\n                id: this.id,\n                for: bind.to('for')\n            }\n        });\n    }\n}\n\n/**\n * The spinner view class.\n */ class SpinnerView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        this.set('isVisible', false);\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-spinner-container',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ]\n            },\n            children: [\n                {\n                    tag: 'span',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-spinner'\n                        ]\n                    }\n                }\n            ]\n        });\n    }\n}\n\nconst toPx$2 = /* #__PURE__ */ toUnit('px');\n/**\n * The contextual toolbar.\n *\n * It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */ class BalloonToolbar extends Plugin {\n    /**\n\t * The toolbar view displayed in the balloon.\n\t */ toolbarView;\n    /**\n\t * Tracks the focus of the {@link module:ui/editorui/editorui~EditorUI#getEditableElement editable element}\n\t * and the {@link #toolbarView}. When both are blurred then the toolbar should hide.\n\t */ focusTracker;\n    /**\n\t * A cached and normalized `config.balloonToolbar` object.\n\t */ _balloonConfig;\n    /**\n\t * An instance of the resize observer that allows to respond to changes in editable's geometry\n\t * so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t *\n\t * **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t * {@link module:core/editor/editorconfig~EditorConfig#balloonToolbar configuration}.\n\t *\n\t * **Note:** Created in {@link #init}.\n\t */ _resizeObserver = null;\n    /**\n\t * The contextual balloon plugin instance.\n\t */ _balloon;\n    /**\n\t * Fires `_selectionChangeDebounced` event using `lodash#debounce`.\n\t *\n\t * This event is an internal plugin event which is fired 200 ms after model selection last change.\n\t * This is to makes easy test debounced action without need to use `setTimeout`.\n\t *\n\t * This function is stored as a plugin property to make possible to cancel\n\t * trailing debounced invocation on destroy.\n\t */ _fireSelectionChangeDebounced;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'BalloonToolbar';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._balloonConfig = normalizeToolbarConfig(editor.config.get('balloonToolbar'));\n        this.toolbarView = this._createToolbarView();\n        this.focusTracker = new FocusTracker();\n        // Track focusable elements in the toolbar and the editable elements.\n        this._trackFocusableEditableElements();\n        this.focusTracker.add(this.toolbarView.element);\n        // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n        editor.ui.addToolbar(this.toolbarView, {\n            beforeFocus: ()=>this.show(true),\n            afterBlur: ()=>this.hide(),\n            isContextual: true\n        });\n        this._balloon = editor.plugins.get(ContextualBalloon);\n        this._fireSelectionChangeDebounced = debounce(()=>this.fire('_selectionChangeDebounced'), 200);\n        // The appearance of the BalloonToolbar method is event–driven.\n        // It is possible to stop the #show event and this prevent the toolbar from showing up.\n        this.decorate('show');\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        // Show/hide the toolbar on editable focus/blur.\n        this.listenTo(this.focusTracker, 'change:isFocused', (evt, name, isFocused)=>{\n            const isToolbarVisible = this._balloon.visibleView === this.toolbarView;\n            if (!isFocused && isToolbarVisible) {\n                this.hide();\n            } else if (isFocused) {\n                this.show();\n            }\n        });\n        // Hide the toolbar when the selection is changed by a direct change or has changed to collapsed.\n        this.listenTo(selection, 'change:range', (evt, data)=>{\n            if (data.directChange || selection.isCollapsed) {\n                this.hide();\n            }\n            // Fire internal `_selectionChangeDebounced` event to use it for showing\n            // the toolbar after the selection stops changing.\n            this._fireSelectionChangeDebounced();\n        });\n        // Show the toolbar when the selection stops changing.\n        this.listenTo(this, '_selectionChangeDebounced', ()=>{\n            if (this.editor.editing.view.document.isFocused) {\n                this.show();\n            }\n        });\n        if (!this._balloonConfig.shouldNotGroupWhenFull) {\n            this.listenTo(editor, 'ready', ()=>{\n                const editableElement = editor.ui.view.editable.element;\n                // Set #toolbarView's max-width on the initialization and update it on the editable resize.\n                this._resizeObserver = new ResizeObserver(editableElement, (entry)=>{\n                    // The max-width equals 90% of the editable's width for the best user experience.\n                    // The value keeps the balloon very close to the boundaries of the editable and limits the cases\n                    // when the balloon juts out from the editable element it belongs to.\n                    this.toolbarView.maxWidth = toPx$2(entry.contentRect.width * .9);\n                });\n            });\n        }\n        // Listen to the toolbar view and whenever it changes its geometry due to some items being\n        // grouped or ungrouped, update the position of the balloon because a shorter/longer toolbar\n        // means the balloon could be pointing at the wrong place. Once updated, the balloon will point\n        // at the right selection in the content again.\n        // https://github.com/ckeditor/ckeditor5/issues/6444\n        this.listenTo(this.toolbarView, 'groupedItemsUpdate', ()=>{\n            this._updatePosition();\n        });\n        // Creates toolbar components based on given configuration.\n        // This needs to be done when all plugins are ready.\n        editor.ui.once('ready', ()=>{\n            this.toolbarView.fillFromConfig(this._balloonConfig, this.editor.ui.componentFactory);\n        });\n    }\n    /**\n\t * Creates the toolbar view instance.\n\t */ _createToolbarView() {\n        const t = this.editor.locale.t;\n        const shouldGroupWhenFull = !this._balloonConfig.shouldNotGroupWhenFull;\n        const toolbarView = new ToolbarView(this.editor.locale, {\n            shouldGroupWhenFull,\n            isFloating: true\n        });\n        toolbarView.ariaLabel = t('Editor contextual toolbar');\n        toolbarView.render();\n        return toolbarView;\n    }\n    /**\n\t * Shows the toolbar and attaches it to the selection.\n\t *\n\t * Fires {@link #event:show} event which can be stopped to prevent the toolbar from showing up.\n\t *\n\t * @param showForCollapsedSelection When set `true`, the toolbar will show despite collapsed selection in the\n\t * editing view.\n\t */ show(showForCollapsedSelection = false) {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const schema = editor.model.schema;\n        // Do not add the toolbar to the balloon stack twice.\n        if (this._balloon.hasView(this.toolbarView)) {\n            return;\n        }\n        // Do not show the toolbar when the selection is collapsed.\n        if (selection.isCollapsed && !showForCollapsedSelection) {\n            return;\n        }\n        // Do not show the toolbar when there is more than one range in the selection and they fully contain selectable elements.\n        // See https://github.com/ckeditor/ckeditor5/issues/6443.\n        if (selectionContainsOnlyMultipleSelectables(selection, schema)) {\n            return;\n        }\n        // Do not show the toolbar when all components inside are disabled\n        // see https://github.com/ckeditor/ckeditor5-ui/issues/269.\n        if (Array.from(this.toolbarView.items).every((item)=>item.isEnabled !== undefined && !item.isEnabled)) {\n            return;\n        }\n        // Update the toolbar position when the editor ui should be refreshed.\n        this.listenTo(this.editor.ui, 'update', ()=>{\n            this._updatePosition();\n        });\n        // Add the toolbar to the common editor contextual balloon.\n        this._balloon.add({\n            view: this.toolbarView,\n            position: this._getBalloonPositionData(),\n            balloonClassName: 'ck-toolbar-container'\n        });\n    }\n    /**\n\t * Hides the toolbar.\n\t */ hide() {\n        if (this._balloon.hasView(this.toolbarView)) {\n            this.stopListening(this.editor.ui, 'update');\n            this._balloon.remove(this.toolbarView);\n        }\n    }\n    /**\n\t * Add or remove editable elements to the focus tracker. It watches added and removed roots\n\t * and adds or removes their editable elements to the focus tracker.\n\t */ _trackFocusableEditableElements() {\n        const { editor, focusTracker } = this;\n        const { editing } = editor;\n        editing.view.addObserver(class TrackEditableElements extends Observer {\n            /**\n\t\t\t * @inheritDoc\n\t\t\t */ observe(domElement) {\n                focusTracker.add(domElement);\n            }\n            /**\n\t\t\t * @inheritDoc\n\t\t\t */ stopObserving(domElement) {\n                focusTracker.remove(domElement);\n            }\n        });\n    }\n    /**\n\t * Returns positioning options for the {@link #_balloon}. They control the way balloon is attached\n\t * to the selection.\n\t */ _getBalloonPositionData() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const viewSelection = viewDocument.selection;\n        // Get direction of the selection.\n        const isBackward = viewDocument.selection.isBackward;\n        return {\n            // Because the target for BalloonPanelView is a Rect (not DOMRange), it's geometry will stay fixed\n            // as the window scrolls. To let the BalloonPanelView follow such Rect, is must be continuously\n            // computed and hence, the target is defined as a function instead of a static value.\n            // https://github.com/ckeditor/ckeditor5-ui/issues/195\n            target: ()=>{\n                const range = isBackward ? viewSelection.getFirstRange() : viewSelection.getLastRange();\n                const rangeRects = Rect.getDomRangeRects(view.domConverter.viewRangeToDom(range));\n                // Select the proper range rect depending on the direction of the selection.\n                if (isBackward) {\n                    return rangeRects[0];\n                } else {\n                    // Ditch the zero-width \"orphan\" rect in the next line for the forward selection if there's\n                    // another one preceding it. It is not rendered as a selection by the web browser anyway.\n                    // https://github.com/ckeditor/ckeditor5-ui/issues/308\n                    if (rangeRects.length > 1 && rangeRects[rangeRects.length - 1].width === 0) {\n                        rangeRects.pop();\n                    }\n                    return rangeRects[rangeRects.length - 1];\n                }\n            },\n            positions: this._getBalloonPositions(isBackward)\n        };\n    }\n    /**\n\t * Updates the position of the {@link #_balloon} to make up for changes:\n\t *\n\t * * in the geometry of the selection it is attached to (e.g. the selection moved in the viewport or expanded or shrunk),\n\t * * or the geometry of the balloon toolbar itself (e.g. the toolbar has grouped or ungrouped some items and it is shorter or longer).\n\t */ _updatePosition() {\n        this._balloon.updatePosition(this._getBalloonPositionData());\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.stopListening();\n        this._fireSelectionChangeDebounced.cancel();\n        this.toolbarView.destroy();\n        this.focusTracker.destroy();\n        if (this._resizeObserver) {\n            this._resizeObserver.destroy();\n        }\n    }\n    /**\n\t * Returns toolbar positions for the given direction of the selection.\n\t */ _getBalloonPositions(isBackward) {\n        const isSafariIniOS = env.isSafari && env.isiOS;\n        // https://github.com/ckeditor/ckeditor5/issues/7707\n        const positions = isSafariIniOS ? BalloonPanelView.generatePositions({\n            // 20px when zoomed out. Less then 20px when zoomed in; the \"radius\" of the native selection handle gets\n            // smaller as the user zooms in. No less than the default v-offset, though.\n            heightOffset: Math.max(BalloonPanelView.arrowHeightOffset, Math.round(20 / global.window.visualViewport.scale))\n        }) : BalloonPanelView.defaultPositions;\n        return isBackward ? [\n            positions.northWestArrowSouth,\n            positions.northWestArrowSouthWest,\n            positions.northWestArrowSouthEast,\n            positions.northWestArrowSouthMiddleEast,\n            positions.northWestArrowSouthMiddleWest,\n            positions.southWestArrowNorth,\n            positions.southWestArrowNorthWest,\n            positions.southWestArrowNorthEast,\n            positions.southWestArrowNorthMiddleWest,\n            positions.southWestArrowNorthMiddleEast\n        ] : [\n            positions.southEastArrowNorth,\n            positions.southEastArrowNorthEast,\n            positions.southEastArrowNorthWest,\n            positions.southEastArrowNorthMiddleEast,\n            positions.southEastArrowNorthMiddleWest,\n            positions.northEastArrowSouth,\n            positions.northEastArrowSouthEast,\n            positions.northEastArrowSouthWest,\n            positions.northEastArrowSouthMiddleEast,\n            positions.northEastArrowSouthMiddleWest\n        ];\n    }\n}\n/**\n * Returns \"true\" when the selection has multiple ranges and each range contains a selectable element\n * and nothing else.\n */ function selectionContainsOnlyMultipleSelectables(selection, schema) {\n    // It doesn't contain multiple objects if there is only one range.\n    if (selection.rangeCount === 1) {\n        return false;\n    }\n    return [\n        ...selection.getRanges()\n    ].every((range)=>{\n        const element = range.getContainedElement();\n        return element && schema.isSelectable(element);\n    });\n}\n\nconst toPx$1 = /* #__PURE__ */ toUnit('px');\n/**\n * The block button view class.\n *\n * This view represents a button attached next to block element where the selection is anchored.\n *\n * See {@link module:ui/toolbar/block/blocktoolbar~BlockToolbar}.\n */ class BlockButtonView extends ButtonView {\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        // Hide button on init.\n        this.isVisible = false;\n        this.isToggleable = true;\n        this.set('top', 0);\n        this.set('left', 0);\n        this.extendTemplate({\n            attributes: {\n                class: 'ck-block-toolbar-button',\n                style: {\n                    top: bind.to('top', (val)=>toPx$1(val)),\n                    left: bind.to('left', (val)=>toPx$1(val))\n                }\n            }\n        });\n    }\n}\n\nconst toPx = /* #__PURE__ */ toUnit('px');\n/**\n * The block toolbar plugin.\n *\n * This plugin provides a button positioned next to the block of content where the selection is anchored.\n * Upon clicking the button, a dropdown providing access to editor features shows up, as configured in\n * {@link module:core/editor/editorconfig~EditorConfig#blockToolbar}.\n *\n * By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~Schema}\n * as `$block` for which the toolbar provides at least one option.\n *\n * By default, the button is attached so its right boundary is touching the\n * {@link module:engine/view/editableelement~EditableElement}:\n *\n * ```\n *  __ |\n * |  ||  This is a block of content that the\n *  ¯¯ |  button is attached to. This is a\n *     |  block of content that the button is\n *     |  attached to.\n * ```\n *\n * The position of the button can be adjusted using the CSS `transform` property:\n *\n * ```css\n * .ck-block-toolbar-button {\n * \ttransform: translateX( -10px );\n * }\n * ```\n *\n * ```\n *  __   |\n * |  |  |  This is a block of content that the\n *  ¯¯   |  button is attached to. This is a\n *       |  block of content that the button is\n *       |  attached to.\n * ```\n *\n * **Note**: If you plan to run the editor in a right–to–left (RTL) language, keep in mind the button\n * will be attached to the **right** boundary of the editable area. In that case, make sure the\n * CSS position adjustment works properly by adding the following styles:\n *\n * ```css\n * .ck[dir=\"rtl\"] .ck-block-toolbar-button {\n * \ttransform: translateX( 10px );\n * }\n * ```\n */ class BlockToolbar extends Plugin {\n    /**\n\t * The toolbar view.\n\t */ toolbarView;\n    /**\n\t * The balloon panel view, containing the {@link #toolbarView}.\n\t */ panelView;\n    /**\n\t * The button view that opens the {@link #toolbarView}.\n\t */ buttonView;\n    /**\n\t * An instance of the resize observer that allows to respond to changes in editable's geometry\n\t * so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t *\n\t * **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t * {@link module:core/editor/editorconfig~EditorConfig#blockToolbar configuration}.\n\t */ _resizeObserver = null;\n    /**\n\t * A cached and normalized `config.blockToolbar` object.\n\t */ _blockToolbarConfig;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'BlockToolbar';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._blockToolbarConfig = normalizeToolbarConfig(this.editor.config.get('blockToolbar'));\n        this.toolbarView = this._createToolbarView();\n        this.panelView = this._createPanelView();\n        this.buttonView = this._createButtonView();\n        // Close the #panelView upon clicking outside of the plugin UI.\n        clickOutsideHandler({\n            emitter: this.panelView,\n            contextElements: [\n                this.panelView.element,\n                this.buttonView.element\n            ],\n            activator: ()=>this.panelView.isVisible,\n            callback: ()=>this._hidePanel()\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const editBlockText = t('Click to edit block');\n        const dragToMoveText = t('Drag to move');\n        const editBlockLabel = t('Edit block');\n        const isDragDropBlockToolbarPluginLoaded = editor.plugins.has('DragDropBlockToolbar');\n        const label = isDragDropBlockToolbarPluginLoaded ? `${editBlockText}\\n${dragToMoveText}` : editBlockLabel;\n        this.buttonView.label = label;\n        if (isDragDropBlockToolbarPluginLoaded) {\n            this.buttonView.element.dataset.ckeTooltipClass = 'ck-tooltip_multi-line';\n        }\n        // Hides panel on a direct selection change.\n        this.listenTo(editor.model.document.selection, 'change:range', (evt, data)=>{\n            if (data.directChange) {\n                this._hidePanel();\n            }\n        });\n        this.listenTo(editor.ui, 'update', ()=>this._updateButton());\n        // `low` priority is used because of https://github.com/ckeditor/ckeditor5-core/issues/133.\n        this.listenTo(editor, 'change:isReadOnly', ()=>this._updateButton(), {\n            priority: 'low'\n        });\n        this.listenTo(editor.ui.focusTracker, 'change:isFocused', ()=>this._updateButton());\n        // Reposition button on resize.\n        this.listenTo(this.buttonView, 'change:isVisible', (evt, name, isVisible)=>{\n            if (isVisible) {\n                // Keep correct position of button and panel on window#resize.\n                this.buttonView.listenTo(window, 'resize', ()=>this._updateButton());\n            } else {\n                // Stop repositioning button when is hidden.\n                this.buttonView.stopListening(window, 'resize');\n                // Hide the panel when the button disappears.\n                this._hidePanel();\n            }\n        });\n        // Reposition button on scroll.\n        this._repositionButtonOnScroll();\n        // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n        editor.ui.addToolbar(this.toolbarView, {\n            beforeFocus: ()=>this._showPanel(),\n            afterBlur: ()=>this._hidePanel()\n        });\n        // Fills the toolbar with its items based on the configuration.\n        // This needs to be done after all plugins are ready.\n        editor.ui.once('ready', ()=>{\n            this.toolbarView.fillFromConfig(this._blockToolbarConfig, this.editor.ui.componentFactory);\n            // Hide panel before executing each button in the panel.\n            for (const item of this.toolbarView.items){\n                item.on('execute', ()=>this._hidePanel(true), {\n                    priority: 'high'\n                });\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        // Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n        this.panelView.destroy();\n        this.buttonView.destroy();\n        this.toolbarView.destroy();\n        if (this._resizeObserver) {\n            this._resizeObserver.destroy();\n        }\n    }\n    /**\n\t * Creates the {@link #toolbarView}.\n\t */ _createToolbarView() {\n        const t = this.editor.locale.t;\n        const shouldGroupWhenFull = !this._blockToolbarConfig.shouldNotGroupWhenFull;\n        const toolbarView = new ToolbarView(this.editor.locale, {\n            shouldGroupWhenFull,\n            isFloating: true\n        });\n        toolbarView.ariaLabel = t('Editor block content toolbar');\n        return toolbarView;\n    }\n    /**\n\t * Creates the {@link #panelView}.\n\t */ _createPanelView() {\n        const editor = this.editor;\n        const panelView = new BalloonPanelView(editor.locale);\n        panelView.content.add(this.toolbarView);\n        panelView.class = 'ck-toolbar-container';\n        editor.ui.view.body.add(panelView);\n        // Close #panelView on `Esc` press.\n        this.toolbarView.keystrokes.set('Esc', (evt, cancel)=>{\n            this._hidePanel(true);\n            cancel();\n        });\n        return panelView;\n    }\n    /**\n\t * Creates the {@link #buttonView}.\n\t */ _createButtonView() {\n        const editor = this.editor;\n        const t = editor.t;\n        const buttonView = new BlockButtonView(editor.locale);\n        const iconFromConfig = this._blockToolbarConfig.icon;\n        const icon = NESTED_TOOLBAR_ICONS[iconFromConfig] || iconFromConfig || NESTED_TOOLBAR_ICONS.dragIndicator;\n        buttonView.set({\n            label: t('Edit block'),\n            icon,\n            withText: false\n        });\n        // Bind the panelView observable properties to the buttonView.\n        buttonView.bind('isOn').to(this.panelView, 'isVisible');\n        buttonView.bind('tooltip').to(this.panelView, 'isVisible', (isVisible)=>!isVisible);\n        // Toggle the panelView upon buttonView#execute.\n        this.listenTo(buttonView, 'execute', ()=>{\n            if (!this.panelView.isVisible) {\n                this._showPanel();\n            } else {\n                this._hidePanel(true);\n            }\n        });\n        // Hide the panelView when the buttonView is disabled. `isEnabled` flag might be changed when\n        // user scrolls the viewport and the button is no longer visible. In such case, the panel should be hidden\n        // otherwise it will be displayed in the wrong place.\n        this.listenTo(buttonView, 'change:isEnabled', (evt, name, isEnabled)=>{\n            if (!isEnabled && this.panelView.isVisible) {\n                this._hidePanel(false);\n            }\n        });\n        editor.ui.view.body.add(buttonView);\n        return buttonView;\n    }\n    /**\n\t * Shows or hides the button.\n\t * When all the conditions for displaying the button are matched, it shows the button. Hides otherwise.\n\t */ _updateButton() {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        // Hides the button when the editor is not focused.\n        if (!editor.ui.focusTracker.isFocused) {\n            this._hideButton();\n            return;\n        }\n        // Hides the button when the selection is in non-editable place.\n        if (!editor.model.canEditAt(editor.model.document.selection)) {\n            this._hideButton();\n            return;\n        }\n        // Get the first selected block, button will be attached to this element.\n        const modelTarget = Array.from(model.document.selection.getSelectedBlocks())[0];\n        // Hides the button when there is no enabled item in toolbar for the current block element.\n        if (!modelTarget || Array.from(this.toolbarView.items).every((item)=>!item.isEnabled)) {\n            this._hideButton();\n            return;\n        }\n        // Get DOM target element.\n        const domTarget = view.domConverter.mapViewToDom(editor.editing.mapper.toViewElement(modelTarget));\n        // Show block button.\n        this.buttonView.isVisible = true;\n        // Make sure that the block toolbar panel is resized properly.\n        this._setupToolbarResize();\n        // Attach block button to target DOM element.\n        this._attachButtonToElement(domTarget);\n        // When panel is opened then refresh it position to be properly aligned with block button.\n        if (this.panelView.isVisible) {\n            this._showPanel();\n        }\n    }\n    /**\n\t * Hides the button.\n\t */ _hideButton() {\n        this.buttonView.isVisible = false;\n    }\n    /**\n\t * Shows the {@link #toolbarView} attached to the {@link #buttonView}.\n\t * If the toolbar is already visible, then it simply repositions it.\n\t */ _showPanel() {\n        // Usually, the only way to show the toolbar is by pressing the block button. It makes it impossible for\n        // the toolbar to show up when the button is invisible (feature does not make sense for the selection then).\n        // The toolbar navigation using Alt+F10 does not access the button but shows the panel directly using this method.\n        // So we need to check whether this is possible first.\n        if (!this.buttonView.isVisible) {\n            return;\n        }\n        const wasVisible = this.panelView.isVisible;\n        // So here's the thing: If there was no initial panelView#show() or these two were in different order, the toolbar\n        // positioning will break in RTL editors. Weird, right? What you show know is that the toolbar\n        // grouping works thanks to:\n        //\n        // * the ResizeObserver, which kicks in as soon as the toolbar shows up in DOM (becomes visible again).\n        // * the observable ToolbarView#maxWidth, which triggers re-grouping when changed.\n        //\n        // Here are the possible scenarios:\n        //\n        // 1. (WRONG ❌) If the #maxWidth is set when the toolbar is invisible, it won't affect item grouping (no DOMRects, no grouping).\n        //    Then, when panelView.pin() is called, the position of the toolbar will be calculated for the old\n        //    items grouping state, and when finally ResizeObserver kicks in (hey, the toolbar is visible now, right?)\n        //    it will group/ungroup some items and the length of the toolbar will change. But since in RTL the toolbar\n        //    is attached on the right side and the positioning uses CSS \"left\", it will result in the toolbar shifting\n        //    to the left and being displayed in the wrong place.\n        // 2. (WRONG ❌) If the panelView.pin() is called first and #maxWidth set next, then basically the story repeats. The balloon\n        //    calculates the position for the old toolbar grouping state, then the toolbar re-groups items and because\n        //    it is positioned using CSS \"left\" it will move.\n        // 3. (RIGHT ✅) We show the panel first (the toolbar does re-grouping but it does not matter), then the #maxWidth\n        //    is set allowing the toolbar to re-group again and finally panelView.pin() does the positioning when the\n        //    items grouping state is stable and final.\n        //\n        // https://github.com/ckeditor/ckeditor5/issues/6449, https://github.com/ckeditor/ckeditor5/issues/6575\n        this.panelView.show();\n        const editableElement = this._getSelectedEditableElement();\n        this.toolbarView.maxWidth = this._getToolbarMaxWidth(editableElement);\n        this.panelView.pin({\n            target: this.buttonView.element,\n            limiter: editableElement\n        });\n        if (!wasVisible) {\n            this.toolbarView.items.get(0).focus();\n        }\n    }\n    /**\n\t * Returns currently selected editable, based on the model selection.\n\t */ _getSelectedEditableElement() {\n        const selectedModelRootName = this.editor.model.document.selection.getFirstRange().root.rootName;\n        return this.editor.ui.getEditableElement(selectedModelRootName);\n    }\n    /**\n\t * Hides the {@link #toolbarView}.\n\t *\n\t * @param focusEditable When `true`, the editable will be focused after hiding the panel.\n\t */ _hidePanel(focusEditable) {\n        this.panelView.isVisible = false;\n        if (focusEditable) {\n            this.editor.editing.view.focus();\n        }\n    }\n    /**\n\t * Repositions the button on scroll.\n\t */ _repositionButtonOnScroll() {\n        const { buttonView } = this;\n        let pendingAnimationFrame = false;\n        // Reposition the button on scroll, but do it only once per animation frame to avoid performance issues.\n        const repositionOnScroll = ()=>{\n            if (pendingAnimationFrame) {\n                return;\n            }\n            pendingAnimationFrame = true;\n            global.window.requestAnimationFrame(()=>{\n                this._updateButton();\n                pendingAnimationFrame = false;\n            });\n        };\n        // Watch scroll event only when the button is visible, it prevents attaching the scroll event listener\n        // to the document when the button is not visible.\n        buttonView.on('change:isVisible', (evt, name, isVisible)=>{\n            if (isVisible) {\n                buttonView.listenTo(global.document, 'scroll', repositionOnScroll, {\n                    useCapture: true,\n                    usePassive: true\n                });\n            } else {\n                buttonView.stopListening(global.document, 'scroll', repositionOnScroll);\n            }\n        });\n    }\n    /**\n\t * Attaches the {@link #buttonView} to the target block of content.\n\t *\n\t * @param targetElement Target element.\n\t */ _attachButtonToElement(targetElement) {\n        const buttonElement = this.buttonView.element;\n        const editableElement = this._getSelectedEditableElement();\n        const contentStyles = window.getComputedStyle(targetElement);\n        const editableRect = new Rect(editableElement);\n        const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n        // When line height is not an integer then treat it as \"normal\".\n        // MDN says that 'normal' == ~1.2 on desktop browsers.\n        const contentLineHeight = parseInt(contentStyles.lineHeight, 10) || parseInt(contentStyles.fontSize, 10) * 1.2;\n        const buttonRect = new Rect(buttonElement);\n        const contentRect = new Rect(targetElement);\n        let positionLeft;\n        if (this.editor.locale.uiLanguageDirection === 'ltr') {\n            positionLeft = editableRect.left - buttonRect.width;\n        } else {\n            positionLeft = editableRect.right;\n        }\n        const positionTop = contentRect.top + contentPaddingTop + (contentLineHeight - buttonRect.height) / 2;\n        buttonRect.moveTo(positionLeft, positionTop);\n        const absoluteButtonRect = buttonRect.toAbsoluteRect();\n        this.buttonView.top = absoluteButtonRect.top;\n        this.buttonView.left = absoluteButtonRect.left;\n        this._clipButtonToViewport(this.buttonView, editableElement);\n    }\n    /**\n\t * Clips the button element to the viewport of the editable element.\n\t *\n\t * \t* If the button overflows the editable viewport, it is clipped to make it look like it's cut off by the editable scrollable region.\n\t * \t* If the button is fully hidden by the top of the editable, it is not clickable but still visible in the DOM.\n\t *\n\t * @param buttonView The button view to clip.\n\t * @param editableElement The editable element whose viewport is used for clipping.\n\t */ _clipButtonToViewport(buttonView, editableElement) {\n        const absoluteButtonRect = new Rect(buttonView.element);\n        const scrollViewportRect = new Rect(editableElement).getVisible();\n        // Sets polygon clip path for the button element, if there is no argument provided, the clip path is removed.\n        const setButtonClipping = (...paths)=>{\n            buttonView.element.style.clipPath = paths.length ? `polygon(${paths.join(',')})` : '';\n        };\n        // Hide the button if it's fully hidden by the top of the editable.\n        // Note that the button is still visible in the DOM, but it's not clickable. It's because we don't\n        // want to hide the button completely, as there are plenty of `isVisible` watchers which toggles\n        // the button scroll listeners.\n        const markAsHidden = (isHidden)=>{\n            buttonView.isEnabled = !isHidden;\n            buttonView.element.style.pointerEvents = isHidden ? 'none' : '';\n        };\n        if (scrollViewportRect && scrollViewportRect.bottom < absoluteButtonRect.bottom) {\n            // Calculate the delta between the button bottom and the editable bottom, and clip the button\n            // to make it look like it's cut off by the editable scrollable region.\n            const delta = Math.min(absoluteButtonRect.height, absoluteButtonRect.bottom - scrollViewportRect.bottom);\n            markAsHidden(delta >= absoluteButtonRect.height);\n            setButtonClipping('0 0', '100% 0', `100% calc(100% - ${toPx(delta)})`, `0 calc(100% - ${toPx(delta)}`);\n        } else if (scrollViewportRect && scrollViewportRect.top > absoluteButtonRect.top) {\n            // Calculate the delta between the button top and the editable top, and clip the button\n            // to make it look like it's cut off by the editable scrollable region.\n            const delta = Math.min(absoluteButtonRect.height, scrollViewportRect.top - absoluteButtonRect.top);\n            markAsHidden(delta >= absoluteButtonRect.height);\n            setButtonClipping(`0 ${toPx(delta)}`, `100% ${toPx(delta)}`, '100% 100%', '0 100%');\n        } else {\n            // Reset the clip path if button is fully visible.\n            markAsHidden(false);\n            setButtonClipping();\n        }\n    }\n    /**\n\t * Creates a resize observer that observes selected editable and resizes the toolbar panel accordingly.\n\t */ _setupToolbarResize() {\n        const editableElement = this._getSelectedEditableElement();\n        // Do this only if the automatic grouping is turned on.\n        if (!this._blockToolbarConfig.shouldNotGroupWhenFull) {\n            // If resize observer is attached to a different editable than currently selected editable, re-attach it.\n            if (this._resizeObserver && this._resizeObserver.element !== editableElement) {\n                this._resizeObserver.destroy();\n                this._resizeObserver = null;\n            }\n            if (!this._resizeObserver) {\n                this._resizeObserver = new ResizeObserver(editableElement, ()=>{\n                    this.toolbarView.maxWidth = this._getToolbarMaxWidth(editableElement);\n                });\n            }\n        }\n    }\n    /**\n\t * Gets the {@link #toolbarView} max-width, based on given `editableElement` width plus the distance between the farthest\n\t * edge of the {@link #buttonView} and the editable.\n\t *\n\t * @returns A maximum width that toolbar can have, in pixels.\n\t */ _getToolbarMaxWidth(editableElement) {\n        const editableRect = new Rect(editableElement);\n        const buttonRect = new Rect(this.buttonView.element);\n        const isRTL = this.editor.locale.uiLanguageDirection === 'rtl';\n        const offset = isRTL ? buttonRect.left - editableRect.right + buttonRect.width : editableRect.left - buttonRect.left;\n        return toPx(editableRect.width + offset);\n    }\n}\n\n/**\n * A menu {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#buttonView} class. Buttons like this one\n * open both top-level bar menus as well as sub-menus.\n */ class MenuBarMenuButtonView extends ListItemButtonView {\n    /**\n\t * An icon that displays an arrow to indicate a direction of the menu.\n\t */ arrowView;\n    /**\n\t * Creates an instance of the menu bar button view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set({\n            withText: true,\n            role: 'menuitem'\n        });\n        this.arrowView = this._createArrowView();\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-menu-bar__menu__button'\n                ],\n                'aria-haspopup': true,\n                'aria-expanded': this.bindTemplate.to('isOn', (value)=>String(value)),\n                'data-cke-tooltip-disabled': bind.to('isOn')\n            },\n            on: {\n                'mouseenter': bind.to('mouseenter')\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.children.add(this.arrowView);\n    }\n    /**\n\t * Creates the {@link #arrowView} instance.\n\t */ _createArrowView() {\n        const arrowView = new IconView();\n        arrowView.content = dropdownArrowIcon;\n        arrowView.extendTemplate({\n            attributes: {\n                class: 'ck-menu-bar__menu__button__arrow'\n            }\n        });\n        return arrowView;\n    }\n}\n\n/**\n * A view representing a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} of a menu.\n */ class MenuBarMenuPanelView extends View {\n    /**\n\t * Collection of the child views in this panel.\n\t */ children;\n    /**\n\t * Creates an instance of the menu panel view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('isVisible', false);\n        this.set('position', 'se');\n        this.children = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-reset',\n                    'ck-menu-bar__menu__panel',\n                    bind.to('position', (value)=>`ck-menu-bar__menu__panel_position_${value}`),\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ],\n                tabindex: '-1'\n            },\n            children: this.children,\n            on: {\n                // Drag and drop in the panel should not break the selection in the editor.\n                // https://github.com/ckeditor/ckeditor5-ui/issues/228\n                selectstart: bind.to((evt)=>{\n                    if (evt.target.tagName.toLocaleLowerCase() === 'input') {\n                        return;\n                    }\n                    evt.preventDefault();\n                })\n            }\n        });\n    }\n    /**\n\t * Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t */ focus(direction = 1) {\n        if (this.children.length) {\n            if (direction === 1) {\n                this.children.first.focus();\n            } else {\n                this.children.last.focus();\n            }\n        }\n    }\n}\n\n/**\n * A menu view for the {@link module:ui/menubar/menubarview~MenuBarView}. Menus are building blocks of the menu bar,\n * they host other sub-menus and menu items (buttons) that users can interact with.\n */ class MenuBarMenuView extends View {\n    /**\n\t * Button of the menu view.\n\t */ buttonView;\n    /**\n\t * Panel of the menu. It hosts children of the menu.\n\t */ panelView;\n    /**\n\t * Tracks information about the DOM focus in the menu.\n\t */ focusTracker;\n    /**\n\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t * keystrokes of the menu.\n\t */ keystrokes;\n    /**\n\t * Creates an instance of the menu view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.buttonView = new MenuBarMenuButtonView(locale);\n        this.buttonView.delegate('mouseenter').to(this);\n        this.buttonView.bind('isOn', 'isEnabled').to(this, 'isOpen', 'isEnabled');\n        this.panelView = new MenuBarMenuPanelView(locale);\n        this.panelView.bind('isVisible').to(this, 'isOpen');\n        this.keystrokes = new KeystrokeHandler();\n        this.focusTracker = new FocusTracker();\n        this.set('isOpen', false);\n        this.set('isEnabled', true);\n        this.set('panelPosition', 'w');\n        this.set('class', undefined);\n        this.set('parentMenuView', null);\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-menu-bar__menu',\n                    bind.to('class'),\n                    bind.if('isEnabled', 'ck-disabled', (value)=>!value),\n                    bind.if('parentMenuView', 'ck-menu-bar__menu_top-level', (value)=>!value)\n                ]\n            },\n            children: [\n                this.buttonView,\n                this.panelView\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.focusTracker.add(this.buttonView.element);\n        this.focusTracker.add(this.panelView.element);\n        // Listen for keystrokes coming from within #element.\n        this.keystrokes.listenTo(this.element);\n        MenuBarMenuBehaviors.closeOnEscKey(this);\n        this._repositionPanelOnOpen();\n    }\n    // For now, this method cannot be called in the render process because the `parentMenuView` may be assigned\n    // after the rendering process.\n    //\n    // TODO: We should reconsider the way we handle this logic.\n    /**\n\t * Attach all keyboard behaviors for the menu bar view.\n\t *\n\t * @internal\n\t */ _attachBehaviors() {\n        // Top-level menus.\n        if (!this.parentMenuView) {\n            this._propagateArrowKeystrokeEvents();\n            MenuBarMenuBehaviors.openAndFocusPanelOnArrowDownKey(this);\n            MenuBarMenuBehaviors.toggleOnButtonClick(this);\n        } else {\n            MenuBarMenuBehaviors.openOnButtonClick(this);\n            MenuBarMenuBehaviors.openOnArrowRightKey(this);\n            MenuBarMenuBehaviors.closeOnArrowLeftKey(this);\n            MenuBarMenuBehaviors.openAndFocusOnEnterKeyPress(this);\n            MenuBarMenuBehaviors.closeOnParentClose(this);\n        }\n    }\n    /**\n\t * Fires `arrowright` and `arrowleft` events when the user pressed corresponding arrow keys.\n\t */ _propagateArrowKeystrokeEvents() {\n        this.keystrokes.set('arrowright', (data, cancel)=>{\n            this.fire('arrowright');\n            cancel();\n        });\n        this.keystrokes.set('arrowleft', (data, cancel)=>{\n            this.fire('arrowleft');\n            cancel();\n        });\n    }\n    /**\n\t * Sets the position of the panel when the menu opens. The panel is positioned\n\t * so that it optimally uses the available space in the viewport.\n\t */ _repositionPanelOnOpen() {\n        // Let the menu control the position of the panel. The position must be updated every time the menu is open.\n        this.on('change:isOpen', (evt, name, isOpen)=>{\n            if (!isOpen) {\n                return;\n            }\n            const optimalPanelPosition = MenuBarMenuView._getOptimalPosition({\n                element: this.panelView.element,\n                target: this.buttonView.element,\n                fitInViewport: true,\n                positions: this._panelPositions\n            });\n            this.panelView.position = optimalPanelPosition ? optimalPanelPosition.name : this._panelPositions[0].name;\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ focus() {\n        this.buttonView.focus();\n    }\n    /**\n\t * Positioning functions for the {@link #panelView} . They change depending on the role of the menu (top-level vs sub-menu) in\n\t * the {@link module:ui/menubar/menubarview~MenuBarView menu bar} and the UI language direction.\n\t */ get _panelPositions() {\n        const { southEast, southWest, northEast, northWest, westSouth, eastSouth, westNorth, eastNorth } = MenuBarMenuViewPanelPositioningFunctions;\n        if (this.locale.uiLanguageDirection === 'ltr') {\n            if (this.parentMenuView) {\n                return [\n                    eastSouth,\n                    eastNorth,\n                    westSouth,\n                    westNorth\n                ];\n            } else {\n                return [\n                    southEast,\n                    southWest,\n                    northEast,\n                    northWest\n                ];\n            }\n        } else {\n            if (this.parentMenuView) {\n                return [\n                    westSouth,\n                    westNorth,\n                    eastSouth,\n                    eastNorth\n                ];\n            } else {\n                return [\n                    southWest,\n                    southEast,\n                    northWest,\n                    northEast\n                ];\n            }\n        }\n    }\n    /**\n\t * A function used to calculate the optimal position for the dropdown panel.\n\t *\n\t * Referenced for unit testing purposes.\n\t */ static _getOptimalPosition = getOptimalPosition;\n}\n\n/**\n * A list of menu bar items, a child of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView}.\n *\n * Use this class to create a list of items (options, buttons) to be displayed in a menu bar.\n *\n * To populate this list, use {@link module:ui/menubar/menubarmenulistitemview~MenuBarMenuListItemView} instances.\n */ class MenuBarMenuListView extends ListView {\n    /**\n\t * Creates an instance of the list view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        this.role = 'menu';\n        this.items.on('change', this._setItemsCheckSpace.bind(this));\n    }\n    /**\n\t * This method adds empty space if there is any toggleable item in the list.\n\t * It makes the list properly aligned.\n\t */ _setItemsCheckSpace() {\n        const hasAnyToggleableItem = Array.from(this.items).some((item)=>{\n            const listButtonView = pickListButtonMenuViewIfPresent(item);\n            return listButtonView && listButtonView.isToggleable;\n        });\n        this.items.forEach((item)=>{\n            const listButtonView = pickListButtonMenuViewIfPresent(item);\n            if (listButtonView) {\n                listButtonView.hasCheckSpace = hasAnyToggleableItem;\n            }\n        });\n    }\n}\n/**\n * Picks the first button menu view from the given item if present.\n *\n * @param item The item to check for a button menu view.\n * @returns The first button menu view found in the item, or `null` if not found.\n */ function pickListButtonMenuViewIfPresent(item) {\n    if (!(item instanceof ListItemView)) {\n        return null;\n    }\n    return item.children.map((child)=>isNestedMenuLikeView(child) ? child.buttonView : child).find((item)=>item instanceof ListItemButtonView);\n}\n/**\n * Checks if the given item is a nested menu-like view. `MenuBarMenuView` imports this file\n * so to avoid circular dependencies, this function is defined in more generic way.\n *\n * @param item The item to check.\n * @returns `true` if the item is a nested menu-like view, `false` otherwise.\n */ function isNestedMenuLikeView(item) {\n    return typeof item === 'object' && 'buttonView' in item && item.buttonView instanceof ButtonView;\n}\n\n/**\n * A menu bar list file dialog button view. Buttons like this one execute user actions.\n *\n * This component provides a button that opens the native file selection dialog.\n */ class MenuBarMenuListItemFileDialogButtonView extends FileDialogListItemButtonView {\n    /**\n\t * Creates an instance of the menu bar list button view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        this.set({\n            withText: true,\n            withKeystroke: true,\n            tooltip: false,\n            role: 'menuitem'\n        });\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-menu-bar__menu__item__button'\n                ]\n            }\n        });\n    }\n}\n\nconst EVENT_NAME_DELEGATES = [\n    'mouseenter',\n    'arrowleft',\n    'arrowright',\n    'change:isOpen'\n];\n/**\n * The application menu bar component. It brings a set of top-level menus (and sub-menus) that can be used\n * to organize and access a large number of buttons.\n */ class MenuBarView extends View {\n    /**\n\t * Collection of the child views inside the {@link #element}.\n\t */ children;\n    /**\n\t * A list of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instances registered in the menu bar.\n\t *\n\t * @observable\n\t */ menus = [];\n    /**\n\t * Creates an instance of the menu bar view.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        const t = locale.t;\n        const bind = this.bindTemplate;\n        this.set({\n            isOpen: false,\n            isFocusBorderEnabled: false\n        });\n        this._setupIsOpenUpdater();\n        this.children = this.createCollection();\n        // @if CK_DEBUG_MENU_BAR // // Logs events in the main event bus of the component.\n        // @if CK_DEBUG_MENU_BAR // this.on( 'menu', ( evt, data ) => {\n        // @if CK_DEBUG_MENU_BAR // \tconsole.log( `MenuBarView:${ evt.name }`, evt.path.map( view => view.element ) );\n        // @if CK_DEBUG_MENU_BAR // } );\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-menu-bar',\n                    bind.if('isFocusBorderEnabled', 'ck-menu-bar_focus-border-enabled')\n                ],\n                'aria-label': t('Editor menu bar'),\n                role: 'menubar'\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * A utility that expands a plain menu bar configuration into a structure of menus (also: sub-menus)\n\t * and items using a given {@link module:ui/componentfactory~ComponentFactory component factory}.\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar} in the editor\n\t * configuration reference to learn how to configure the menu bar.\n\t */ fillFromConfig(config, componentFactory, extraItems = []) {\n        const locale = this.locale;\n        const processedConfig = processMenuBarConfig({\n            normalizedConfig: config,\n            locale,\n            componentFactory,\n            extraItems\n        });\n        const topLevelCategoryMenuViews = processedConfig.items.map((menuDefinition)=>this._createMenu({\n                componentFactory,\n                menuDefinition\n            }));\n        this.children.addMany(topLevelCategoryMenuViews);\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        MenuBarBehaviors.toggleMenusAndFocusItemsOnHover(this);\n        MenuBarBehaviors.closeMenusWhenTheBarCloses(this);\n        MenuBarBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens(this);\n        MenuBarBehaviors.focusCycleMenusOnArrows(this);\n        MenuBarBehaviors.closeOnClickOutside(this);\n        MenuBarBehaviors.enableFocusHighlightOnInteraction(this);\n    }\n    /**\n\t * Focuses the menu bar.\n\t */ focus() {\n        if (this.children.first) {\n            this.children.first.focus();\n        }\n    }\n    /**\n\t * Closes all menus in the bar.\n\t */ close() {\n        for (const topLevelCategoryMenuView of this.children){\n            topLevelCategoryMenuView.isOpen = false;\n        }\n    }\n    /**\n\t * Registers a menu view in the menu bar. Every {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance must be registered\n\t * in the menu bar to be properly managed.\n\t */ registerMenu(menuView, parentMenuView = null) {\n        if (parentMenuView) {\n            menuView.delegate(...EVENT_NAME_DELEGATES).to(parentMenuView);\n            menuView.parentMenuView = parentMenuView;\n        } else {\n            menuView.delegate(...EVENT_NAME_DELEGATES).to(this, (name)=>'menu:' + name);\n        }\n        menuView._attachBehaviors();\n        this.menus.push(menuView);\n    }\n    /**\n\t * Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} based on the given definition.\n\t */ _createMenu({ componentFactory, menuDefinition, parentMenuView }) {\n        const locale = this.locale;\n        const menuView = new MenuBarMenuView(locale);\n        this.registerMenu(menuView, parentMenuView);\n        menuView.buttonView.set({\n            label: menuDefinition.label\n        });\n        // Defer the creation of the menu structure until it gets open. This is a performance optimization\n        // that shortens the time needed to create the editor.\n        menuView.once('change:isOpen', ()=>{\n            const listView = new MenuBarMenuListView(locale);\n            listView.ariaLabel = menuDefinition.label;\n            menuView.panelView.children.add(listView);\n            listView.items.addMany(this._createMenuItems({\n                menuDefinition,\n                parentMenuView: menuView,\n                componentFactory\n            }));\n        });\n        return menuView;\n    }\n    /**\n\t * Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} items based on the given definition.\n\t */ _createMenuItems({ menuDefinition, parentMenuView, componentFactory }) {\n        const locale = this.locale;\n        const items = [];\n        for (const menuGroupDefinition of menuDefinition.groups){\n            for (const itemDefinition of menuGroupDefinition.items){\n                const menuItemView = new MenuBarMenuListItemView(locale, parentMenuView);\n                if (isObject(itemDefinition)) {\n                    menuItemView.children.add(this._createMenu({\n                        componentFactory,\n                        menuDefinition: itemDefinition,\n                        parentMenuView\n                    }));\n                } else {\n                    const componentView = this._createMenuItemContentFromFactory({\n                        componentName: itemDefinition,\n                        componentFactory,\n                        parentMenuView\n                    });\n                    if (!componentView) {\n                        continue;\n                    }\n                    menuItemView.children.add(componentView);\n                }\n                items.push(menuItemView);\n            }\n            // Separate groups with a separator.\n            if (menuGroupDefinition !== menuDefinition.groups[menuDefinition.groups.length - 1]) {\n                items.push(new ListSeparatorView(locale));\n            }\n        }\n        return items;\n    }\n    /**\n\t * Uses the component factory to create a content of the menu item (a button or a sub-menu).\n\t */ _createMenuItemContentFromFactory({ componentName, parentMenuView, componentFactory }) {\n        const componentView = componentFactory.create(componentName);\n        if (!(componentView instanceof MenuBarMenuView || componentView instanceof MenuBarMenuListItemButtonView || componentView instanceof MenuBarMenuListItemFileDialogButtonView)) {\n            /**\n\t\t\t * Adding unsupported components to the {@link module:ui/menubar/menubarview~MenuBarView} is not possible.\n\t\t\t *\n\t\t\t * A component should be either a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} (sub-menu) or a\n\t\t\t * {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} (button).\n\t\t\t *\n\t\t\t * @error menu-bar-component-unsupported\n\t\t\t * @param componentName A name of the unsupported component used in the configuration.\n\t\t\t * @param componentView An unsupported component view.\n\t\t\t */ logWarning('menu-bar-component-unsupported', {\n                componentName,\n                componentView\n            });\n            return null;\n        }\n        this._registerMenuTree(componentView, parentMenuView);\n        // Close the whole menu bar when a component is executed.\n        componentView.on('execute', ()=>{\n            this.close();\n        });\n        return componentView;\n    }\n    /**\n\t * Checks component and its children recursively and calls {@link #registerMenu}\n\t * for each item that is {@link module:ui/menubar/menubarmenuview~MenuBarMenuView}.\n\t *\n\t * @internal\n\t */ _registerMenuTree(componentView, parentMenuView) {\n        if (!(componentView instanceof MenuBarMenuView)) {\n            componentView.delegate('mouseenter').to(parentMenuView);\n            return;\n        }\n        this.registerMenu(componentView, parentMenuView);\n        const menuBarItemsList = componentView.panelView.children.filter((child)=>child instanceof MenuBarMenuListView)[0];\n        if (!menuBarItemsList) {\n            componentView.delegate('mouseenter').to(parentMenuView);\n            return;\n        }\n        const nonSeparatorItems = menuBarItemsList.items.filter((item)=>item instanceof ListItemView);\n        for (const item of nonSeparatorItems){\n            this._registerMenuTree(item.children.get(0), componentView);\n        }\n    }\n    /**\n\t * Manages the state of the {@link #isOpen} property of the menu bar. Because the state is a sum of individual\n\t * top-level menus' states, it's necessary to listen to their changes and update the state accordingly.\n\t *\n\t * Additionally, it prevents from unnecessary changes of `isOpen` when one top-level menu opens and another closes\n\t * (regardless of in which order), maintaining a stable `isOpen === true` in that situation.\n\t */ _setupIsOpenUpdater() {\n        let closeTimeout;\n        // TODO: This is not the prettiest approach but at least it's simple.\n        this.on('menu:change:isOpen', (evt, name, isOpen)=>{\n            clearTimeout(closeTimeout);\n            if (isOpen) {\n                this.isOpen = true;\n            } else {\n                closeTimeout = setTimeout(()=>{\n                    this.isOpen = Array.from(this.children).some((menuView)=>menuView.isOpen);\n                }, 0);\n            }\n        });\n    }\n}\n\nexport { AccessibilityHelp, AutocompleteView, BalloonPanelView, BalloonToolbar, BlockToolbar, BodyCollection, BoxedEditorUIView, ButtonLabelView, ButtonLabelWithHighlightView, ButtonView, CollapsibleView, ColorGridView, ColorPickerView, ColorSelectorView, ColorTileView, ComponentFactory, ContextualBalloon, CssTransitionDisablerMixin, DefaultMenuBarItems, Dialog, DialogView, DialogViewPosition, DropdownButtonView, DropdownMenuListItemButtonView, DropdownMenuListItemView, DropdownMenuListView, DropdownMenuNestedMenuView, DropdownMenuPanelPositioningFunctions, DropdownMenuRootListView, DropdownPanelView, DropdownView, EditorUI, EditorUIView, FileDialogButtonView, FileDialogListItemButtonView, FocusCycler, FormHeaderView, HighlightedTextView, IconView, IframeView, InlineEditableUIView, InputNumberView, InputTextView, InputView, LabelView, LabelWithHighlightView, LabeledFieldView, ListItemButtonView, ListItemGroupView, ListItemView, ListSeparatorView, ListView, MenuBarMenuListItemButtonView, MenuBarMenuListItemFileDialogButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, MenuBarView, Notification, SearchInfoView, SearchTextView, SpinnerView, SplitButtonView, StickyPanelView, SwitchButtonView, Template, TextareaView, ToolbarLineBreakView, ToolbarSeparatorView, ToolbarView, TooltipManager, View, ViewCollection, Model as ViewModel, addKeyboardHandlingForGrid, addListToDropdown, addMenuToDropdown, addToolbarToDropdown, clickOutsideHandler, createDropdown, createLabeledDropdown, createLabeledInputNumber, createLabeledInputText, createLabeledTextarea, filterGroupAndItemNames, focusChildOnDropdownOpen, getLocalizedColorOptions, injectCssTransitionDisabler, isFocusable, isViewWithFocusCycler, normalizeColorOptions, normalizeMenuBarConfig, normalizeSingleColorDefinition, normalizeToolbarConfig, submitHandler };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { logWarning, CKEditorError, first } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ButtonView, createDropdown, addToolbarToDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * @module alignment/utils\n */ /**\n * The list of supported alignment options:\n *\n * * `'left'`,\n * * `'right'`,\n * * `'center'`,\n * * `'justify'`\n */ const supportedOptions = [\n    'left',\n    'right',\n    'center',\n    'justify'\n];\n/**\n * Checks whether the passed option is supported by {@link module:alignment/alignmentediting~AlignmentEditing}.\n *\n * @param option The option value to check.\n */ function isSupported(option) {\n    return supportedOptions.includes(option);\n}\n/**\n * Checks whether alignment is the default one considering the direction\n * of the editor content.\n *\n * @param alignment The name of the alignment to check.\n * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n */ function isDefault(alignment, locale) {\n    // Right now only LTR is supported so the 'left' value is always the default one.\n    if (locale.contentLanguageDirection == 'rtl') {\n        return alignment === 'right';\n    } else {\n        return alignment === 'left';\n    }\n}\n/**\n * Brings the configuration to the common form, an array of objects.\n *\n * @param configuredOptions Alignment plugin configuration.\n * @returns Normalized object holding the configuration.\n */ function normalizeAlignmentOptions(configuredOptions) {\n    const normalizedOptions = configuredOptions.map((option)=>{\n        let result;\n        if (typeof option == 'string') {\n            result = {\n                name: option\n            };\n        } else {\n            result = option;\n        }\n        return result;\n    })// Remove all unknown options.\n    .filter((option)=>{\n        const isNameValid = supportedOptions.includes(option.name);\n        if (!isNameValid) {\n            /**\n\t\t\t\t * The `name` in one of the `alignment.options` is not recognized.\n\t\t\t\t * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-name-not-recognized\n\t\t\t\t * @param option Options with unknown value of the `name` property.\n\t\t\t\t */ logWarning('alignment-config-name-not-recognized', {\n                option\n            });\n        }\n        return isNameValid;\n    });\n    const classNameCount = normalizedOptions.filter((option)=>Boolean(option.className)).length;\n    // We either use classes for all styling options or for none.\n    if (classNameCount && classNameCount < normalizedOptions.length) {\n        /**\n\t\t * The `className` property has to be defined for all options once at least one option declares `className`.\n\t\t *\n\t\t * @error alignment-config-classnames-are-missing\n\t\t * @param configuredOptions Contents of `alignment.options`.\n\t\t */ throw new CKEditorError('alignment-config-classnames-are-missing', {\n            configuredOptions\n        });\n    }\n    // Validate resulting config.\n    normalizedOptions.forEach((option, index, allOptions)=>{\n        const succeedingOptions = allOptions.slice(index + 1);\n        const nameAlreadyExists = succeedingOptions.some((item)=>item.name == option.name);\n        if (nameAlreadyExists) {\n            /**\n\t\t\t * The same `name` in one of the `alignment.options` was already declared.\n\t\t\t * Each `name` representing one alignment option can be set exactly once.\n\t\t\t *\n\t\t\t * @error alignment-config-name-already-defined\n\t\t\t * @param option First option that declares given `name`.\n\t\t\t * @param configuredOptions Contents of `alignment.options`.\n\t\t\t */ throw new CKEditorError('alignment-config-name-already-defined', {\n                option,\n                configuredOptions\n            });\n        }\n        // The `className` property is present. Check for duplicates then.\n        if (option.className) {\n            const classNameAlreadyExists = succeedingOptions.some((item)=>item.className == option.className);\n            if (classNameAlreadyExists) {\n                /**\n\t\t\t\t * The same `className` in one of the `alignment.options` was already declared.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-classname-already-defined\n\t\t\t\t * @param option First option that declares given `className`.\n\t\t\t\t * @param configuredOptions\n\t\t\t\t * Contents of `alignment.options`.\n\t\t\t\t */ throw new CKEditorError('alignment-config-classname-already-defined', {\n                    option,\n                    configuredOptions\n                });\n            }\n        }\n    });\n    return normalizedOptions;\n}\n\nconst ALIGNMENT = 'alignment';\n/**\n * The alignment command plugin.\n */ class AlignmentCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const firstBlock = first(this.editor.model.document.selection.getSelectedBlocks());\n        // As first check whether to enable or disable the command as the value will always be false if the command cannot be enabled.\n        this.isEnabled = Boolean(firstBlock) && this._canBeAligned(firstBlock);\n        if (this.isEnabled && firstBlock.hasAttribute('alignment')) {\n            this.value = firstBlock.getAttribute('alignment');\n        } else {\n            this.value = locale.contentLanguageDirection === 'rtl' ? 'right' : 'left';\n        }\n    }\n    /**\n\t * Executes the command. Applies the alignment `value` to the selected blocks.\n\t * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,\n\t * the command will remove the attribute from the selected blocks.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.value The value to apply.\n\t * @fires execute\n\t */ execute(options = {}) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const model = editor.model;\n        const doc = model.document;\n        const value = options.value;\n        model.change((writer)=>{\n            // Get only those blocks from selected that can have alignment set\n            const blocks = Array.from(doc.selection.getSelectedBlocks()).filter((block)=>this._canBeAligned(block));\n            const currentAlignment = blocks[0].getAttribute('alignment');\n            // Remove alignment attribute if current alignment is:\n            // - default (should not be stored in model as it will bloat model data)\n            // - equal to currently set\n            // - or no value is passed - denotes default alignment.\n            const removeAlignment = isDefault(value, locale) || currentAlignment === value || !value;\n            if (removeAlignment) {\n                removeAlignmentFromSelection(blocks, writer);\n            } else {\n                setAlignmentOnSelection(blocks, writer, value);\n            }\n        });\n    }\n    /**\n\t * Checks whether a block can have alignment set.\n\t *\n\t * @param block The block to be checked.\n\t */ _canBeAligned(block) {\n        return this.editor.model.schema.checkAttribute(block, ALIGNMENT);\n    }\n}\n/**\n * Removes the alignment attribute from blocks.\n */ function removeAlignmentFromSelection(blocks, writer) {\n    for (const block of blocks){\n        writer.removeAttribute(ALIGNMENT, block);\n    }\n}\n/**\n * Sets the alignment attribute on blocks.\n */ function setAlignmentOnSelection(blocks, writer, alignment) {\n    for (const block of blocks){\n        writer.setAttribute(ALIGNMENT, alignment, block);\n    }\n}\n\n/**\n * The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds\n * the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.\n */ class AlignmentEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'AlignmentEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('alignment', {\n            options: supportedOptions.map((option)=>({\n                    name: option\n                }))\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const schema = editor.model.schema;\n        const options = normalizeAlignmentOptions(editor.config.get('alignment.options'));\n        // Filter out unsupported options and those that are redundant, e.g. `left` in LTR / `right` in RTL mode.\n        const optionsToConvert = options.filter((option)=>isSupported(option.name) && !isDefault(option.name, locale));\n        // Once there is at least one `className` defined, we switch to alignment with classes.\n        const shouldUseClasses = optionsToConvert.some((option)=>!!option.className);\n        // Allow alignment attribute on all blocks.\n        schema.extend('$block', {\n            allowAttributes: 'alignment'\n        });\n        editor.model.schema.setAttributeProperties('alignment', {\n            isFormatting: true\n        });\n        if (shouldUseClasses) {\n            editor.conversion.attributeToAttribute(buildClassDefinition(optionsToConvert));\n        } else {\n            // Downcast inline styles.\n            editor.conversion.for('downcast').attributeToAttribute(buildDowncastInlineDefinition(optionsToConvert));\n        }\n        const upcastInlineDefinitions = buildUpcastInlineDefinitions(optionsToConvert);\n        // Always upcast from inline styles.\n        for (const definition of upcastInlineDefinitions){\n            editor.conversion.for('upcast').attributeToAttribute(definition);\n        }\n        const upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions(optionsToConvert);\n        // Always upcast from deprecated `align` attribute.\n        for (const definition of upcastCompatibilityDefinitions){\n            editor.conversion.for('upcast').attributeToAttribute(definition);\n        }\n        editor.commands.add('alignment', new AlignmentCommand(editor));\n    }\n}\n/**\n * Prepare downcast conversion definition for inline alignment styling.\n */ function buildDowncastInlineDefinition(options) {\n    const view = {};\n    for (const { name } of options){\n        view[name] = {\n            key: 'style',\n            value: {\n                'text-align': name\n            }\n        };\n    }\n    const definition = {\n        model: {\n            key: 'alignment',\n            values: options.map((option)=>option.name)\n        },\n        view\n    };\n    return definition;\n}\n/**\n * Prepare upcast definitions for inline alignment styles.\n */ function buildUpcastInlineDefinitions(options) {\n    const definitions = [];\n    for (const { name } of options){\n        definitions.push({\n            view: {\n                key: 'style',\n                value: {\n                    'text-align': name\n                }\n            },\n            model: {\n                key: 'alignment',\n                value: name\n            }\n        });\n    }\n    return definitions;\n}\n/**\n * Prepare upcast definitions for deprecated `align` attribute.\n */ function buildUpcastCompatibilityDefinitions(options) {\n    const definitions = [];\n    for (const { name } of options){\n        definitions.push({\n            view: {\n                key: 'align',\n                value: name\n            },\n            model: {\n                key: 'alignment',\n                value: name\n            }\n        });\n    }\n    return definitions;\n}\n/**\n * Prepare conversion definitions for upcast and downcast alignment with classes.\n */ function buildClassDefinition(options) {\n    const view = {};\n    for (const option of options){\n        view[option.name] = {\n            key: 'class',\n            value: option.className\n        };\n    }\n    const definition = {\n        model: {\n            key: 'alignment',\n            values: options.map((option)=>option.name)\n        },\n        view\n    };\n    return definition;\n}\n\nconst iconsMap = /* #__PURE__ */ (()=>new Map([\n        [\n            'left',\n            icons.alignLeft\n        ],\n        [\n            'right',\n            icons.alignRight\n        ],\n        [\n            'center',\n            icons.alignCenter\n        ],\n        [\n            'justify',\n            icons.alignJustify\n        ]\n    ]))();\n/**\n * The default alignment UI plugin.\n *\n * It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons\n * and the `'alignment'` dropdown.\n */ class AlignmentUI extends Plugin {\n    /**\n\t * Returns the localized option titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:alignment/alignmentconfig~AlignmentConfig#options} are available:\n\t *\n\t * * `'left'`,\n\t * * `'right'`,\n\t * * `'center'`,\n\t * * `'justify'`.\n\t *\n\t * @readonly\n\t */ get localizedOptionTitles() {\n        const t = this.editor.t;\n        return {\n            'left': t('Align left'),\n            'right': t('Align right'),\n            'center': t('Align center'),\n            'justify': t('Justify')\n        };\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'AlignmentUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const options = normalizeAlignmentOptions(editor.config.get('alignment.options'));\n        options.map((option)=>option.name).filter(isSupported).forEach((option)=>this._addButton(option));\n        this._addToolbarDropdown(options);\n        this._addMenuBarMenu(options);\n    }\n    /**\n\t * Helper method for initializing the button and linking it with an appropriate command.\n\t *\n\t * @param option The name of the alignment option for which the button is added.\n\t */ _addButton(option) {\n        const editor = this.editor;\n        editor.ui.componentFactory.add(`alignment:${option}`, (locale)=>this._createButton(locale, option));\n    }\n    /**\n\t * Helper method for creating the button view element.\n\t *\n\t * @param locale Editor locale.\n\t * @param option The name of the alignment option for which the button is added.\n\t * @param buttonAttrs Optional parameters passed to button view instance.\n\t */ _createButton(locale, option, buttonAttrs = {}) {\n        const editor = this.editor;\n        const command = editor.commands.get('alignment');\n        const buttonView = new ButtonView(locale);\n        buttonView.set({\n            label: this.localizedOptionTitles[option],\n            icon: iconsMap.get(option),\n            tooltip: true,\n            isToggleable: true,\n            ...buttonAttrs\n        });\n        // Bind button model to command.\n        buttonView.bind('isEnabled').to(command);\n        buttonView.bind('isOn').to(command, 'value', (value)=>value === option);\n        // Execute command.\n        this.listenTo(buttonView, 'execute', ()=>{\n            editor.execute('alignment', {\n                value: option\n            });\n            editor.editing.view.focus();\n        });\n        return buttonView;\n    }\n    /**\n\t * Helper method for initializing the toolnar dropdown and linking it with an appropriate command.\n\t *\n\t * @param option The name of the alignment option for which the button is added.\n\t */ _addToolbarDropdown(options) {\n        const editor = this.editor;\n        const factory = editor.ui.componentFactory;\n        factory.add('alignment', (locale)=>{\n            const dropdownView = createDropdown(locale);\n            const tooltipPosition = locale.uiLanguageDirection === 'rtl' ? 'w' : 'e';\n            const t = locale.t;\n            // Add existing alignment buttons to dropdown's toolbar.\n            addToolbarToDropdown(dropdownView, ()=>options.map((option)=>this._createButton(locale, option.name, {\n                        tooltipPosition\n                    })), {\n                enableActiveItemFocusOnDropdownOpen: true,\n                isVertical: true,\n                ariaLabel: t('Text alignment toolbar')\n            });\n            // Configure dropdown properties an behavior.\n            dropdownView.buttonView.set({\n                label: t('Text alignment'),\n                tooltip: true\n            });\n            dropdownView.extendTemplate({\n                attributes: {\n                    class: 'ck-alignment-dropdown'\n                }\n            });\n            // The default icon depends on the direction of the content.\n            const defaultIcon = locale.contentLanguageDirection === 'rtl' ? iconsMap.get('right') : iconsMap.get('left');\n            const command = editor.commands.get('alignment');\n            // Change icon to reflect current selection's alignment.\n            dropdownView.buttonView.bind('icon').to(command, 'value', (value)=>iconsMap.get(value) || defaultIcon);\n            // Enable button if any of the buttons is enabled.\n            dropdownView.bind('isEnabled').to(command, 'isEnabled');\n            // Focus the editable after executing the command.\n            // Overrides a default behaviour where the focus is moved to the dropdown button (#12125).\n            this.listenTo(dropdownView, 'execute', ()=>{\n                editor.editing.view.focus();\n            });\n            return dropdownView;\n        });\n    }\n    /**\n\t * Creates a menu for all alignment options to use either in menu bar.\n\t *\n\t * @param options Normalized alignment options from config.\n\t */ _addMenuBarMenu(options) {\n        const editor = this.editor;\n        editor.ui.componentFactory.add('menuBar:alignment', (locale)=>{\n            const command = editor.commands.get('alignment');\n            const t = locale.t;\n            const menuView = new MenuBarMenuView(locale);\n            const listView = new MenuBarMenuListView(locale);\n            menuView.bind('isEnabled').to(command);\n            listView.set({\n                ariaLabel: t('Text alignment'),\n                role: 'menu'\n            });\n            menuView.buttonView.set({\n                label: t('Text alignment')\n            });\n            for (const option of options){\n                const listItemView = new MenuBarMenuListItemView(locale, menuView);\n                const buttonView = new MenuBarMenuListItemButtonView(locale);\n                buttonView.delegate('execute').to(menuView);\n                buttonView.set({\n                    label: this.localizedOptionTitles[option.name],\n                    icon: iconsMap.get(option.name),\n                    role: 'menuitemcheckbox',\n                    isToggleable: true\n                });\n                buttonView.on('execute', ()=>{\n                    editor.execute('alignment', {\n                        value: option.name\n                    });\n                    editor.editing.view.focus();\n                });\n                buttonView.bind('isOn').to(command, 'value', (value)=>value === option.name);\n                buttonView.bind('isEnabled').to(command, 'isEnabled');\n                listItemView.children.add(buttonView);\n                listView.items.add(listItemView);\n            }\n            menuView.panelView.children.add(listView);\n            return menuView;\n        });\n    }\n}\n\n/**\n * The text alignment plugin.\n *\n * For a detailed overview, check the {@glink features/text-alignment Text alignment} feature guide\n * and the {@glink api/alignment package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and\n * {@link module:alignment/alignmentui~AlignmentUI} plugins.\n */ class Alignment extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            AlignmentEditing,\n            AlignmentUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Alignment';\n    }\n}\n\nexport { Alignment, AlignmentEditing, AlignmentUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { env, EventInfo, count, keyCodes, isInsideSurrogatePair, isInsideCombinedSymbol, isInsideEmojiSequence, ObservableMixin } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { Observer, FocusObserver, DomEventData, LiveRange, BubblingEventInfo, MouseObserver } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { debounce, escapeRegExp } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module typing/utils/changebuffer\n */ /**\n * Change buffer allows to group atomic changes (like characters that have been typed) into\n * {@link module:engine/model/batch~Batch batches}.\n *\n * Batches represent single undo steps, hence changes added to one single batch are undone together.\n *\n * The buffer has a configurable limit of atomic changes that it can accommodate. After the limit was\n * exceeded (see {@link ~ChangeBuffer#input}), a new batch is created in {@link ~ChangeBuffer#batch}.\n *\n * To use the change buffer you need to let it know about the number of changes that were added to the batch:\n *\n * ```ts\n * const buffer = new ChangeBuffer( model, LIMIT );\n *\n * // Later on in your feature:\n * buffer.batch.insert( pos, insertedCharacters );\n * buffer.input( insertedCharacters.length );\n * ```\n */ class ChangeBuffer {\n    /**\n\t * The model instance.\n\t */ model;\n    /**\n\t * The maximum number of atomic changes which can be contained in one batch.\n\t */ limit;\n    /**\n\t * Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t */ _isLocked;\n    /**\n\t * The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t * the {@link #batch batch} is set to a new one.\n\t */ _size;\n    /**\n\t * The current batch instance.\n\t */ _batch = null;\n    /**\n\t * The callback to document the change event which later needs to be removed.\n\t */ _changeCallback;\n    /**\n\t * The callback to document selection `change:attribute` and `change:range` events which resets the buffer.\n\t */ _selectionChangeCallback;\n    /**\n\t * Creates a new instance of the change buffer.\n\t *\n\t * @param limit The maximum number of atomic changes which can be contained in one batch.\n\t */ constructor(model, limit = 20){\n        this.model = model;\n        this._size = 0;\n        this.limit = limit;\n        this._isLocked = false;\n        // The function to be called in order to notify the buffer about batches which appeared in the document.\n        // The callback will check whether it is a new batch and in that case the buffer will be flushed.\n        //\n        // The reason why the buffer needs to be flushed whenever a new batch appears is that the changes added afterwards\n        // should be added to a new batch. For instance, when the user types, then inserts an image, and then types again,\n        // the characters typed after inserting the image should be added to a different batch than the characters typed before.\n        this._changeCallback = (evt, batch)=>{\n            if (batch.isLocal && batch.isUndoable && batch !== this._batch) {\n                this._reset(true);\n            }\n        };\n        this._selectionChangeCallback = ()=>{\n            this._reset();\n        };\n        this.model.document.on('change', this._changeCallback);\n        this.model.document.selection.on('change:range', this._selectionChangeCallback);\n        this.model.document.selection.on('change:attribute', this._selectionChangeCallback);\n    }\n    /**\n\t * The current batch to which a feature should add its operations. Once the {@link #size}\n\t * is reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t */ get batch() {\n        if (!this._batch) {\n            this._batch = this.model.createBatch({\n                isTyping: true\n            });\n        }\n        return this._batch;\n    }\n    /**\n\t * The number of atomic changes in the buffer. Once it exceeds the {@link #limit},\n\t * the {@link #batch batch} is set to a new one.\n\t */ get size() {\n        return this._size;\n    }\n    /**\n\t * The input number of changes into the buffer. Once the {@link #size} is\n\t * reached or exceeds the {@link #limit}, the batch is set to a new instance and the size is reset.\n\t *\n\t * @param changeCount The number of atomic changes to input.\n\t */ input(changeCount) {\n        this._size += changeCount;\n        if (this._size >= this.limit) {\n            this._reset(true);\n        }\n    }\n    /**\n\t * Whether the buffer is locked. A locked buffer cannot be reset unless it gets unlocked.\n\t */ get isLocked() {\n        return this._isLocked;\n    }\n    /**\n\t * Locks the buffer.\n\t */ lock() {\n        this._isLocked = true;\n    }\n    /**\n\t * Unlocks the buffer.\n\t */ unlock() {\n        this._isLocked = false;\n    }\n    /**\n\t * Destroys the buffer.\n\t */ destroy() {\n        this.model.document.off('change', this._changeCallback);\n        this.model.document.selection.off('change:range', this._selectionChangeCallback);\n        this.model.document.selection.off('change:attribute', this._selectionChangeCallback);\n    }\n    /**\n\t * Resets the change buffer.\n\t *\n\t * @param ignoreLock Whether internal lock {@link #isLocked} should be ignored.\n\t */ _reset(ignoreLock = false) {\n        if (!this.isLocked || ignoreLock) {\n            this._batch = null;\n            this._size = 0;\n        }\n    }\n}\n\n/**\n * The insert text command. Used by the {@link module:typing/input~Input input feature} to handle typing.\n */ class InsertTextCommand extends Command {\n    /**\n\t * Typing's change buffer used to group subsequent changes into batches.\n\t */ _buffer;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param undoStepSize The maximum number of atomic changes\n\t * which can be contained in one batch in the command buffer.\n\t */ constructor(editor, undoStepSize){\n        super(editor);\n        this._buffer = new ChangeBuffer(editor.model, undoStepSize);\n        // Since this command may execute on different selectable than selection, it should be checked directly in execute block.\n        this._isEnabledBasedOnSelection = false;\n    }\n    /**\n\t * The current change buffer.\n\t */ get buffer() {\n        return this._buffer;\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this._buffer.destroy();\n    }\n    /**\n\t * Executes the input command. It replaces the content within the given range with the given text.\n\t * Replacing is a two step process, first the content within the range is removed and then the new text is inserted\n\t * at the beginning of the range (which after the removal is a collapsed range).\n\t *\n\t * @fires execute\n\t * @param options The command options.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const doc = model.document;\n        const text = options.text || '';\n        const textInsertions = text.length;\n        let selection = doc.selection;\n        if (options.selection) {\n            selection = options.selection;\n        } else if (options.range) {\n            selection = model.createSelection(options.range);\n        }\n        // Stop executing if selectable is in non-editable place.\n        if (!model.canEditAt(selection)) {\n            return;\n        }\n        const resultRange = options.resultRange;\n        model.enqueueChange(this._buffer.batch, (writer)=>{\n            this._buffer.lock();\n            // Store selection attributes before deleting old content to preserve formatting and link.\n            // This unifies the behavior between DocumentSelection and Selection provided as input option.\n            const selectionAttributes = Array.from(doc.selection.getAttributes());\n            model.deleteContent(selection);\n            if (text) {\n                model.insertContent(writer.createText(text, selectionAttributes), selection);\n            }\n            if (resultRange) {\n                writer.setSelection(resultRange);\n            } else if (!selection.is('documentSelection')) {\n                writer.setSelection(selection);\n            }\n            this._buffer.unlock();\n            this._buffer.input(textInsertions);\n        });\n    }\n}\n\nconst TYPING_INPUT_TYPES = [\n    // For collapsed range:\n    //\t- This one is a regular typing (all browsers, all systems).\n    //\t- This one is used by Chrome when typing accented letter – 2nd step when the user selects the accent (Mac).\n    // For non-collapsed range:\n    //\t- This one is used by Chrome when typing accented letter – when the selection box first appears (Mac).\n    //\t- This one is used by Safari when accepting spell check suggestions from the context menu (Mac).\n    'insertText',\n    // This one is used by Safari when typing accented letter (Mac).\n    // This one is used by Safari when accepting spell check suggestions from the autocorrection pop-up (Mac).\n    'insertReplacementText'\n];\nconst TYPING_INPUT_TYPES_ANDROID = [\n    ...TYPING_INPUT_TYPES,\n    'insertCompositionText'\n];\n/**\n * Text insertion observer introduces the {@link module:engine/view/document~Document#event:insertText} event.\n */ class InsertTextObserver extends Observer {\n    /**\n\t * Instance of the focus observer. Insert text observer calls\n\t * {@link module:engine/view/observer/focusobserver~FocusObserver#flush} to mark the latest focus change as complete.\n\t */ focusObserver;\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        this.focusObserver = view.getObserver(FocusObserver);\n        // On Android composition events should immediately be applied to the model. Rendering is not disabled.\n        // On non-Android the model is updated only on composition end.\n        // On Android we can't rely on composition start/end to update model.\n        const typingInputTypes = env.isAndroid ? TYPING_INPUT_TYPES_ANDROID : TYPING_INPUT_TYPES;\n        const viewDocument = view.document;\n        viewDocument.on('beforeinput', (evt, data)=>{\n            if (!this.isEnabled) {\n                return;\n            }\n            const { data: text, targetRanges, inputType, domEvent } = data;\n            if (!typingInputTypes.includes(inputType)) {\n                return;\n            }\n            // Mark the latest focus change as complete (we are typing in editable after the focus\n            // so the selection is in the focused element).\n            this.focusObserver.flush();\n            const eventInfo = new EventInfo(viewDocument, 'insertText');\n            viewDocument.fire(eventInfo, new DomEventData(view, domEvent, {\n                text,\n                selection: view.createSelection(targetRanges)\n            }));\n            // Stop the beforeinput event if `delete` event was stopped.\n            // https://github.com/ckeditor/ckeditor5/issues/753\n            if (eventInfo.stop.called) {\n                evt.stop();\n            }\n        });\n        // On Android composition events are immediately applied to the model.\n        // On non-Android the model is updated only on composition end.\n        // On Android we can't rely on composition start/end to update model.\n        if (!env.isAndroid) {\n            // Note: The priority must be lower than the CompositionObserver handler to call it after the renderer is unblocked.\n            // This is important for view to DOM position mapping.\n            // This causes the effect of first remove composed DOM and then reapply it after model modification.\n            viewDocument.on('compositionend', (evt, { data, domEvent })=>{\n                if (!this.isEnabled) {\n                    return;\n                }\n                // In case of aborted composition.\n                if (!data) {\n                    return;\n                }\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconsole.log( `%c[InsertTextObserver]%c Fire insertText event, %c${ JSON.stringify( data ) }`,\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-weight: bold', 'color: blue'\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // }\n                // How do we know where to insert the composed text?\n                // 1. The SelectionObserver is blocked and the view is not updated with the composition changes.\n                // 2. The last moment before it's locked is the `compositionstart` event.\n                // 3. The `SelectionObserver` is listening for `compositionstart` event and immediately converts\n                //    the selection. Handles this at the lowest priority so after the rendering is blocked.\n                viewDocument.fire('insertText', new DomEventData(view, domEvent, {\n                    text: data\n                }));\n            }, {\n                priority: 'lowest'\n            });\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ observe() {}\n    /**\n\t * @inheritDoc\n\t */ stopObserving() {}\n}\n\n/**\n * Handles text input coming from the keyboard or other input methods.\n */ class Input extends Plugin {\n    /**\n\t * The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t */ _compositionQueue;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Input';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        const mapper = editor.editing.mapper;\n        const modelSelection = model.document.selection;\n        this._compositionQueue = new CompositionQueue(editor);\n        view.addObserver(InsertTextObserver);\n        // TODO The above default configuration value should be defined using editor.config.define() once it's fixed.\n        const insertTextCommand = new InsertTextCommand(editor, editor.config.get('typing.undoStep') || 20);\n        // Register `insertText` command and add `input` command as an alias for backward compatibility.\n        editor.commands.add('insertText', insertTextCommand);\n        editor.commands.add('input', insertTextCommand);\n        this.listenTo(view.document, 'insertText', (evt, data)=>{\n            // Rendering is disabled while composing so prevent events that will be rendered by the engine\n            // and should not be applied by the browser.\n            if (!view.document.isComposing) {\n                data.preventDefault();\n            }\n            // Flush queue on the next beforeinput event because it could happen\n            // that the mutation observer does not notice the DOM change in time.\n            if (env.isAndroid && view.document.isComposing) {\n                this._compositionQueue.flush('next beforeinput');\n            }\n            const { text, selection: viewSelection } = data;\n            let modelRanges;\n            // If view selection was specified, translate it to model selection.\n            if (viewSelection) {\n                modelRanges = Array.from(viewSelection.getRanges()).map((viewRange)=>mapper.toModelRange(viewRange));\n            } else {\n                modelRanges = Array.from(modelSelection.getRanges());\n            }\n            let insertText = text;\n            // Typing in English on Android is firing composition events for the whole typed word.\n            // We need to check the target range text to only apply the difference.\n            if (env.isAndroid) {\n                const selectedText = Array.from(modelRanges[0].getItems()).reduce((rangeText, node)=>{\n                    return rangeText + (node.is('$textProxy') ? node.data : '');\n                }, '');\n                if (selectedText) {\n                    if (selectedText.length <= insertText.length) {\n                        if (insertText.startsWith(selectedText)) {\n                            insertText = insertText.substring(selectedText.length);\n                            modelRanges[0].start = modelRanges[0].start.getShiftedBy(selectedText.length);\n                        }\n                    } else {\n                        if (selectedText.startsWith(insertText)) {\n                            // TODO this should be mapped as delete?\n                            modelRanges[0].start = modelRanges[0].start.getShiftedBy(insertText.length);\n                            insertText = '';\n                        }\n                    }\n                }\n                if (insertText.length == 0 && modelRanges[0].isCollapsed) {\n                    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                    // @if CK_DEBUG_TYPING // \tconsole.log( '%c[Input]%c Ignore insertion of an empty data to the collapsed range.',\n                    // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-style: italic'\n                    // @if CK_DEBUG_TYPING // \t);\n                    // @if CK_DEBUG_TYPING // }\n                    return;\n                }\n            }\n            const commandData = {\n                text: insertText,\n                selection: model.createSelection(modelRanges)\n            };\n            // This is a composition event and those are not cancellable, so we need to wait until browser updates the DOM\n            // and we could apply changes to the model and verify if the DOM is valid.\n            // The browser applies changes to the DOM not immediately on beforeinput event.\n            // We just wait for mutation observer to notice changes or as a fallback a timeout.\n            if (env.isAndroid && view.document.isComposing) {\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconsole.log( `%c[Input]%c Queue insertText:%c \"${ commandData.text }\"%c ` +\n                // @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getFirstPosition().path }]-` +\n                // @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getLastPosition().path }]` +\n                // @if CK_DEBUG_TYPING // \t\t` queue size: ${ this._compositionQueue.length + 1 }`,\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-weight: bold', 'color: blue', ''\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // }\n                this._compositionQueue.push(commandData);\n            } else {\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconsole.log( `%c[Input]%c Execute insertText:%c \"${ commandData.text }\"%c ` +\n                // @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getFirstPosition().path }]-` +\n                // @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getLastPosition().path }]`,\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-weight: bold', 'color: blue', ''\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // }\n                editor.execute('insertText', commandData);\n                view.scrollToTheSelection();\n            }\n        });\n        // Delete selected content on composition start.\n        if (env.isAndroid) {\n            // On Android with English keyboard, the composition starts just by putting caret\n            // at the word end or by selecting a table column. This is not a real composition started.\n            // Trigger delete content on first composition key pressed.\n            this.listenTo(view.document, 'keydown', (evt, data)=>{\n                if (modelSelection.isCollapsed || data.keyCode != 229 || !view.document.isComposing) {\n                    return;\n                }\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconst firstPositionPath = modelSelection.getFirstPosition()!.path;\n                // @if CK_DEBUG_TYPING // \tconst lastPositionPath = modelSelection.getLastPosition()!.path;\n                // @if CK_DEBUG_TYPING // \tconsole.log( '%c[Input]%c KeyDown 229%c -> model.deleteContent() ' +\n                // @if CK_DEBUG_TYPING // \t\t`[${ firstPositionPath }]-[${ lastPositionPath }]`,\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-weight: bold', '',\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // }\n                deleteSelectionContent(model, insertTextCommand);\n            });\n        } else {\n            // Note: The priority must precede the CompositionObserver handler to call it before\n            // the renderer is blocked, because we want to render this change.\n            this.listenTo(view.document, 'compositionstart', ()=>{\n                if (modelSelection.isCollapsed) {\n                    return;\n                }\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconst firstPositionPath = modelSelection.getFirstPosition()!.path;\n                // @if CK_DEBUG_TYPING // \tconst lastPositionPath = modelSelection.getLastPosition()!.path;\n                // @if CK_DEBUG_TYPING // \tconsole.log( '%c[Input]%c Composition start%c -> model.deleteContent() ' +\n                // @if CK_DEBUG_TYPING // \t\t`[${ firstPositionPath }]-[${ lastPositionPath }]`,\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-weight: bold', '',\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // }\n                deleteSelectionContent(model, insertTextCommand);\n            });\n        }\n        // Apply composed changes to the model.\n        if (env.isAndroid) {\n            // Apply changes to the model as they are applied to the DOM by the browser.\n            // On beforeinput event, the DOM is not yet modified. We wait for detected mutations to apply model changes.\n            this.listenTo(view.document, 'mutations', (evt, { mutations })=>{\n                if (!view.document.isComposing) {\n                    return;\n                }\n                // Check if mutations are relevant for queued changes.\n                for (const { node } of mutations){\n                    const viewElement = findMappedViewAncestor(node, mapper);\n                    const modelElement = mapper.toModelElement(viewElement);\n                    if (this._compositionQueue.isComposedElement(modelElement)) {\n                        this._compositionQueue.flush('mutations');\n                        return;\n                    }\n                }\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.log( '%c[Input]%c Mutations not related to the composition.',\n            // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-style: italic'\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            });\n            // Make sure that all changes are applied to the model before the end of composition.\n            this.listenTo(view.document, 'compositionend', ()=>{\n                this._compositionQueue.flush('composition end');\n            });\n            // Trigger mutations check after the composition completes to fix all DOM changes that got ignored during composition.\n            // On Android the Renderer is not disabled while composing. While updating DOM nodes we ignore some changes\n            // that are not that important (like NBSP vs plain space character) and could break the composition flow.\n            // After composition is completed we trigger additional `mutations` event for elements affected by the composition\n            // so the Renderer can adjust the DOM to the expected structure without breaking the composition.\n            this.listenTo(view.document, 'compositionend', ()=>{\n                const mutations = [];\n                for (const element of this._compositionQueue.flushComposedElements()){\n                    const viewElement = mapper.toViewElement(element);\n                    if (!viewElement) {\n                        continue;\n                    }\n                    mutations.push({\n                        type: 'children',\n                        node: viewElement\n                    });\n                }\n                if (mutations.length) {\n                    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                    // @if CK_DEBUG_TYPING // \tconsole.group( '%c[Input]%c Fire post-composition mutation fixes.',\n                    // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green', 'font-weight: bold', ''\n                    // @if CK_DEBUG_TYPING // \t);\n                    // @if CK_DEBUG_TYPING // }\n                    view.document.fire('mutations', {\n                        mutations\n                    });\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n                // @if CK_DEBUG_TYPING // }\n                }\n            }, {\n                priority: 'lowest'\n            });\n        } else {\n            // After composition end we need to verify if there are no left-overs.\n            // Listening at the lowest priority so after the `InsertTextObserver` added above (all composed text\n            // should already be applied to the model, view, and DOM).\n            // On non-Android the `Renderer` is blocked while user is composing but the `MutationObserver` still collects\n            // mutated nodes and fires `mutations` events.\n            // Those events are recorded by the `Renderer` but not applied to the DOM while composing.\n            // We need to trigger those checks (and fixes) once again but this time without specifying the exact mutations\n            // since they are already recorded by the `Renderer`.\n            // It in the most cases just clears the internal record of mutated text nodes\n            // since all changes should already be applied to the DOM.\n            // This is especially needed when user cancels composition, so we can clear nodes marked to sync.\n            this.listenTo(view.document, 'compositionend', ()=>{\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconsole.group( '%c[Input]%c Force render after composition end.',\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green', 'font-weight: bold', ''\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // }\n                view.document.fire('mutations', {\n                    mutations: []\n                });\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n            // @if CK_DEBUG_TYPING // }\n            }, {\n                priority: 'lowest'\n            });\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this._compositionQueue.destroy();\n    }\n}\n/**\n * The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n */ class CompositionQueue {\n    /**\n\t * The editor instance.\n\t */ editor;\n    /**\n\t * Debounced queue flush as a safety mechanism for cases of mutation observer not triggering.\n\t */ flushDebounced = debounce(()=>this.flush('timeout'), 50);\n    /**\n\t * The queue of `insertText` command executions that are waiting for the DOM to get updated after beforeinput event.\n\t */ _queue = [];\n    /**\n\t * A set of model elements. The composition happened in those elements. It's used for mutations check.\n\t */ _compositionElements = new Set();\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        this.editor = editor;\n    }\n    /**\n\t * Destroys the helper object.\n\t */ destroy() {\n        this.flushDebounced.cancel();\n        this._compositionElements.clear();\n        while(this._queue.length){\n            this.shift();\n        }\n    }\n    /**\n\t * Returns the size of the queue.\n\t */ get length() {\n        return this._queue.length;\n    }\n    /**\n\t * Push next insertText command data to the queue.\n\t */ push(commandData) {\n        const commandLiveData = {\n            text: commandData.text\n        };\n        if (commandData.selection) {\n            commandLiveData.selectionRanges = [];\n            for (const range of commandData.selection.getRanges()){\n                commandLiveData.selectionRanges.push(LiveRange.fromRange(range));\n                // Keep reference to the model element for later mutation checks.\n                this._compositionElements.add(range.start.parent);\n            }\n        }\n        this._queue.push(commandLiveData);\n        this.flushDebounced();\n    }\n    /**\n\t * Shift the first item from the insertText command data queue.\n\t */ shift() {\n        const commandLiveData = this._queue.shift();\n        const commandData = {\n            text: commandLiveData.text\n        };\n        if (commandLiveData.selectionRanges) {\n            const ranges = commandLiveData.selectionRanges.map((liveRange)=>detachLiveRange(liveRange)).filter((range)=>!!range);\n            if (ranges.length) {\n                commandData.selection = this.editor.model.createSelection(ranges);\n            }\n        }\n        return commandData;\n    }\n    /**\n\t * Applies all queued insertText command executions.\n\t *\n\t * @param reason Used only for debugging.\n\t */ flush(reason) {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        this.flushDebounced.cancel();\n        if (!this._queue.length) {\n            return;\n        }\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.group( `%c[Input]%c Flush insertText queue on ${ reason }.`,\n        // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-weight: bold'\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        const insertTextCommand = editor.commands.get('insertText');\n        const buffer = insertTextCommand.buffer;\n        model.enqueueChange(buffer.batch, ()=>{\n            buffer.lock();\n            while(this._queue.length){\n                const commandData = this.shift();\n                // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n                // @if CK_DEBUG_TYPING // \tconsole.log( '%c[Input]%c Execute queued insertText:%c ' +\n                // @if CK_DEBUG_TYPING // \t\t`\"${ commandData.text }\"%c ` +\n                // @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getFirstPosition().path }]-` +\n                // @if CK_DEBUG_TYPING // \t\t`[${ commandData.selection.getLastPosition().path }]`,\n                // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', 'font-weight: bold', 'color: blue', ''\n                // @if CK_DEBUG_TYPING // \t);\n                // @if CK_DEBUG_TYPING // }\n                editor.execute('insertText', commandData);\n            }\n            buffer.unlock();\n        });\n        view.scrollToTheSelection();\n    // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n    // @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n    // @if CK_DEBUG_TYPING // }\n    }\n    /**\n\t * Returns `true` if the given model element is related to recent composition.\n\t */ isComposedElement(element) {\n        return this._compositionElements.has(element);\n    }\n    /**\n\t * Returns an array of composition-related elements and clears the internal list.\n\t */ flushComposedElements() {\n        const result = Array.from(this._compositionElements);\n        this._compositionElements.clear();\n        return result;\n    }\n}\n/**\n * Deletes the content selected by the document selection at the start of composition.\n */ function deleteSelectionContent(model, insertTextCommand) {\n    // By relying on the state of the input command we allow disabling the entire input easily\n    // by just disabling the input command. We could’ve used here the delete command but that\n    // would mean requiring the delete feature which would block loading one without the other.\n    // We could also check the editor.isReadOnly property, but that wouldn't allow to block\n    // the input without blocking other features.\n    if (!insertTextCommand.isEnabled) {\n        return;\n    }\n    const buffer = insertTextCommand.buffer;\n    buffer.lock();\n    model.enqueueChange(buffer.batch, ()=>{\n        model.deleteContent(model.document.selection);\n    });\n    buffer.unlock();\n}\n/**\n * Detaches a LiveRange and returns the static range from it.\n */ function detachLiveRange(liveRange) {\n    const range = liveRange.toRange();\n    liveRange.detach();\n    if (range.root.rootName == '$graveyard') {\n        return null;\n    }\n    return range;\n}\n/**\n * For the given `viewNode`, finds and returns the closest ancestor of this node that has a mapping to the model.\n */ function findMappedViewAncestor(viewNode, mapper) {\n    let node = viewNode.is('$text') ? viewNode.parent : viewNode;\n    while(!mapper.toModelElement(node)){\n        node = node.parent;\n    }\n    return node;\n}\n\n/**\n * The delete command. Used by the {@link module:typing/delete~Delete delete feature} to handle the <kbd>Delete</kbd> and\n * <kbd>Backspace</kbd> keys.\n */ class DeleteCommand extends Command {\n    /**\n\t * The directionality of the delete describing in what direction it should\n\t * consume the content when the selection is collapsed.\n\t */ direction;\n    /**\n\t * Delete's change buffer used to group subsequent changes into batches.\n\t */ _buffer;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param direction The directionality of the delete describing in what direction it\n\t * should consume the content when the selection is collapsed.\n\t */ constructor(editor, direction){\n        super(editor);\n        this.direction = direction;\n        this._buffer = new ChangeBuffer(editor.model, editor.config.get('typing.undoStep'));\n        // Since this command may execute on different selectable than selection, it should be checked directly in execute block.\n        this._isEnabledBasedOnSelection = false;\n    }\n    /**\n\t * The current change buffer.\n\t */ get buffer() {\n        return this._buffer;\n    }\n    /**\n\t * Executes the delete command. Depending on whether the selection is collapsed or not, deletes its content\n\t * or a piece of content in the {@link #direction defined direction}.\n\t *\n\t * @fires execute\n\t * @param options The command options.\n\t * @param options.unit See {@link module:engine/model/utils/modifyselection~modifySelection}'s options.\n\t * @param options.sequence A number describing which subsequent delete event it is without the key being released.\n\t * See the {@link module:engine/view/document~Document#event:delete} event data.\n\t * @param options.selection Selection to remove. If not set, current model selection will be used.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const doc = model.document;\n        model.enqueueChange(this._buffer.batch, (writer)=>{\n            this._buffer.lock();\n            const selection = writer.createSelection(options.selection || doc.selection);\n            // Don't execute command when selection is in non-editable place.\n            if (!model.canEditAt(selection)) {\n                return;\n            }\n            const sequence = options.sequence || 1;\n            // Do not replace the whole selected content if selection was collapsed.\n            // This prevents such situation:\n            //\n            // <h1></h1><p>[]</p>\t-->  <h1>[</h1><p>]</p> \t\t-->  <p></p>\n            // starting content\t\t-->   after `modifySelection`\t-->  after `deleteContent`.\n            const doNotResetEntireContent = selection.isCollapsed;\n            // Try to extend the selection in the specified direction.\n            if (selection.isCollapsed) {\n                model.modifySelection(selection, {\n                    direction: this.direction,\n                    unit: options.unit,\n                    treatEmojiAsSingleUnit: true\n                });\n            }\n            // Check if deleting in an empty editor. See #61.\n            if (this._shouldEntireContentBeReplacedWithParagraph(sequence)) {\n                this._replaceEntireContentWithParagraph(writer);\n                return;\n            }\n            // Check if deleting in the first empty block.\n            // See https://github.com/ckeditor/ckeditor5/issues/8137.\n            if (this._shouldReplaceFirstBlockWithParagraph(selection, sequence)) {\n                this.editor.execute('paragraph', {\n                    selection\n                });\n                return;\n            }\n            // If selection is still collapsed, then there's nothing to delete.\n            if (selection.isCollapsed) {\n                return;\n            }\n            let changeCount = 0;\n            selection.getFirstRange().getMinimalFlatRanges().forEach((range)=>{\n                changeCount += count(range.getWalker({\n                    singleCharacters: true,\n                    ignoreElementEnd: true,\n                    shallow: true\n                }));\n            });\n            // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n            // @if CK_DEBUG_TYPING // \tconsole.log( '%c[DeleteCommand]%c Delete content',\n            // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green;', '',\n            // @if CK_DEBUG_TYPING // \t\t`[${ selection.getFirstPosition()!.path }]-[${ selection.getLastPosition()!.path }]`, options\n            // @if CK_DEBUG_TYPING // \t);\n            // @if CK_DEBUG_TYPING // }\n            model.deleteContent(selection, {\n                doNotResetEntireContent,\n                direction: this.direction\n            });\n            this._buffer.input(changeCount);\n            writer.setSelection(selection);\n            this._buffer.unlock();\n        });\n    }\n    /**\n\t * If the user keeps <kbd>Backspace</kbd> or <kbd>Delete</kbd> key pressed, the content of the current\n\t * editable will be cleared. However, this will not yet lead to resetting the remaining block to a paragraph\n\t * (which happens e.g. when the user does <kbd>Ctrl</kbd> + <kbd>A</kbd>, <kbd>Backspace</kbd>).\n\t *\n\t * But, if the user pressed the key in an empty editable for the first time,\n\t * we want to replace the entire content with a paragraph if:\n\t *\n\t * * the current limit element is empty,\n\t * * the paragraph is allowed in the limit element,\n\t * * the limit doesn't already have a paragraph inside.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5-typing/issues/61.\n\t *\n\t * @param sequence A number describing which subsequent delete event it is without the key being released.\n\t */ _shouldEntireContentBeReplacedWithParagraph(sequence) {\n        // Does nothing if user pressed and held the \"Backspace\" or \"Delete\" key.\n        if (sequence > 1) {\n            return false;\n        }\n        const model = this.editor.model;\n        const doc = model.document;\n        const selection = doc.selection;\n        const limitElement = model.schema.getLimitElement(selection);\n        // If a collapsed selection contains the whole content it means that the content is empty\n        // (from the user perspective).\n        const limitElementIsEmpty = selection.isCollapsed && selection.containsEntireContent(limitElement);\n        if (!limitElementIsEmpty) {\n            return false;\n        }\n        if (!model.schema.checkChild(limitElement, 'paragraph')) {\n            return false;\n        }\n        const limitElementFirstChild = limitElement.getChild(0);\n        // Does nothing if the limit element already contains only a paragraph.\n        // We ignore the case when paragraph might have some inline elements (<p><inlineWidget>[]</inlineWidget></p>)\n        // because we don't support such cases yet and it's unclear whether inlineWidget shouldn't be a limit itself.\n        if (limitElementFirstChild && limitElementFirstChild.is('element', 'paragraph')) {\n            return false;\n        }\n        return true;\n    }\n    /**\n\t * The entire content is replaced with the paragraph. Selection is moved inside the paragraph.\n\t *\n\t * @param writer The model writer.\n\t */ _replaceEntireContentWithParagraph(writer) {\n        const model = this.editor.model;\n        const doc = model.document;\n        const selection = doc.selection;\n        const limitElement = model.schema.getLimitElement(selection);\n        const paragraph = writer.createElement('paragraph');\n        writer.remove(writer.createRangeIn(limitElement));\n        writer.insert(paragraph, limitElement);\n        writer.setSelection(paragraph, 0);\n    }\n    /**\n\t * Checks if the selection is inside an empty element that is the first child of the limit element\n\t * and should be replaced with a paragraph.\n\t *\n\t * @param selection The selection.\n\t * @param sequence A number describing which subsequent delete event it is without the key being released.\n\t */ _shouldReplaceFirstBlockWithParagraph(selection, sequence) {\n        const model = this.editor.model;\n        // Does nothing if user pressed and held the \"Backspace\" key or it was a \"Delete\" button.\n        if (sequence > 1 || this.direction != 'backward') {\n            return false;\n        }\n        if (!selection.isCollapsed) {\n            return false;\n        }\n        const position = selection.getFirstPosition();\n        const limitElement = model.schema.getLimitElement(position);\n        const limitElementFirstChild = limitElement.getChild(0);\n        // Only elements that are direct children of the limit element can be replaced.\n        // Unwrapping from a block quote should be handled in a dedicated feature.\n        if (position.parent != limitElementFirstChild) {\n            return false;\n        }\n        // A block should be replaced only if it was empty.\n        if (!selection.containsEntireContent(limitElementFirstChild)) {\n            return false;\n        }\n        // Replace with a paragraph only if it's allowed there.\n        if (!model.schema.checkChild(limitElement, 'paragraph')) {\n            return false;\n        }\n        // Does nothing if the limit element already contains only a paragraph.\n        if (limitElementFirstChild.name == 'paragraph') {\n            return false;\n        }\n        return true;\n    }\n}\n\nconst DELETE_CHARACTER = 'character';\nconst DELETE_WORD = 'word';\nconst DELETE_CODE_POINT = 'codePoint';\nconst DELETE_SELECTION = 'selection';\nconst DELETE_BACKWARD = 'backward';\nconst DELETE_FORWARD = 'forward';\nconst DELETE_EVENT_TYPES = {\n    // --------------------------------------- Backward delete types -----------------------------------------------------\n    // This happens in Safari on Mac when some content is selected and Ctrl + K is pressed.\n    deleteContent: {\n        unit: DELETE_SELECTION,\n        // According to the Input Events Level 2 spec, this delete type has no direction\n        // but to keep things simple, let's default to backward.\n        direction: DELETE_BACKWARD\n    },\n    // Chrome and Safari on Mac: Backspace or Ctrl + H\n    deleteContentBackward: {\n        // This kind of deletions must be done on the code point-level instead of target range provided by the DOM beforeinput event.\n        // Take for instance \"👨‍👩‍👧‍👧\", it equals:\n        //\n        //\t* [ \"👨\", \"ZERO WIDTH JOINER\", \"👩\", \"ZERO WIDTH JOINER\", \"👧\", \"ZERO WIDTH JOINER\", \"👧\" ]\n        //\t* or simply \"\\u{1F468}\\u200D\\u{1F469}\\u200D\\u{1F467}\\u200D\\u{1F467}\"\n        //\n        // The range provided by the browser would cause the entire multi-byte grapheme to disappear while the user\n        // intention when deleting backwards (\"👨‍👩‍👧‍👧[]\", then backspace) is gradual \"decomposition\" (first to \"👨‍👩‍👧‍[]\",\n        // then to \"👨‍👩‍[]\", etc.).\n        //\n        //\t* \"👨‍👩‍👧‍👧[]\" + backward delete (by code point)  -> results in \"👨‍👩‍👧[]\", removed the last \"👧\" 👍\n        //\t* \"👨‍👩‍👧‍👧[]\" + backward delete (by character)  -> results in \"[]\", removed the whole grapheme 👎\n        //\n        // Deleting by code-point is simply a better UX. See \"deleteContentForward\" to learn more.\n        unit: DELETE_CODE_POINT,\n        direction: DELETE_BACKWARD\n    },\n    // On Mac: Option + Backspace.\n    // On iOS: Hold the backspace for a while and the whole words will start to disappear.\n    deleteWordBackward: {\n        unit: DELETE_WORD,\n        direction: DELETE_BACKWARD\n    },\n    // Safari on Mac: Cmd + Backspace\n    deleteHardLineBackward: {\n        unit: DELETE_SELECTION,\n        direction: DELETE_BACKWARD\n    },\n    // Chrome on Mac: Cmd + Backspace.\n    deleteSoftLineBackward: {\n        unit: DELETE_SELECTION,\n        direction: DELETE_BACKWARD\n    },\n    // --------------------------------------- Forward delete types -----------------------------------------------------\n    // Chrome on Mac: Fn + Backspace or Ctrl + D\n    // Safari on Mac: Ctrl + K or Ctrl + D\n    deleteContentForward: {\n        // Unlike backward delete, this delete must be performed by character instead of by code point, which\n        // provides the best UX for working with accented letters.\n        // Take, for example \"b̂\" (\"\\u0062\\u0302\", or [ \"LATIN SMALL LETTER B\", \"COMBINING CIRCUMFLEX ACCENT\" ]):\n        //\n        //\t* \"b̂[]\" + backward delete (by code point)  -> results in \"b[]\", removed the combining mark 👍\n        //\t* \"[]b̂\" + forward delete (by code point)   -> results in \"[]^\", a bare combining mark does that not make sense when alone 👎\n        //\t* \"[]b̂\" + forward delete (by character)    -> results in \"[]\", removed both \"b\" and the combining mark 👍\n        //\n        // See: \"deleteContentBackward\" to learn more.\n        unit: DELETE_CHARACTER,\n        direction: DELETE_FORWARD\n    },\n    // On Mac: Fn + Option + Backspace.\n    deleteWordForward: {\n        unit: DELETE_WORD,\n        direction: DELETE_FORWARD\n    },\n    // Chrome on Mac: Ctrl + K (you have to disable the Link plugin first, though, because it uses the same keystroke)\n    // This is weird that it does not work in Safari on Mac despite being listed in the official shortcuts listing\n    // on Apple's webpage.\n    deleteHardLineForward: {\n        unit: DELETE_SELECTION,\n        direction: DELETE_FORWARD\n    },\n    // At this moment there is no known way to trigger this event type but let's keep it for the symmetry with\n    // deleteSoftLineBackward.\n    deleteSoftLineForward: {\n        unit: DELETE_SELECTION,\n        direction: DELETE_FORWARD\n    }\n};\n/**\n * Delete observer introduces the {@link module:engine/view/document~Document#event:delete} event.\n */ class DeleteObserver extends Observer {\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        const document = view.document;\n        // It matters how many subsequent deletions were made, e.g. when the backspace key was pressed and held\n        // by the user for some time. For instance, if such scenario ocurred and the heading the selection was\n        // anchored to was the only content of the editor, it will not be converted into a paragraph (the user\n        // wanted to clean it up, not remove it, it's about UX). Check out the DeleteCommand implementation to learn more.\n        //\n        // Fun fact: Safari on Mac won't fire beforeinput for backspace in an empty heading (only content).\n        let sequence = 0;\n        document.on('keydown', ()=>{\n            sequence++;\n        });\n        document.on('keyup', ()=>{\n            sequence = 0;\n        });\n        document.on('beforeinput', (evt, data)=>{\n            if (!this.isEnabled) {\n                return;\n            }\n            const { targetRanges, domEvent, inputType } = data;\n            const deleteEventSpec = DELETE_EVENT_TYPES[inputType];\n            if (!deleteEventSpec) {\n                return;\n            }\n            const deleteData = {\n                direction: deleteEventSpec.direction,\n                unit: deleteEventSpec.unit,\n                sequence\n            };\n            if (deleteData.unit == DELETE_SELECTION) {\n                deleteData.selectionToRemove = view.createSelection(targetRanges[0]);\n            }\n            // The default deletion unit for deleteContentBackward is a single code point\n            // but if the browser provides a wider target range then we should use it.\n            if (inputType === 'deleteContentBackward') {\n                // On Android, deleteContentBackward has sequence 1 by default.\n                if (env.isAndroid) {\n                    deleteData.sequence = 1;\n                }\n                // The beforeInput event wants more than a single character to be removed.\n                if (shouldUseTargetRanges(targetRanges)) {\n                    deleteData.unit = DELETE_SELECTION;\n                    deleteData.selectionToRemove = view.createSelection(targetRanges);\n                }\n            }\n            const eventInfo = new BubblingEventInfo(document, 'delete', targetRanges[0]);\n            document.fire(eventInfo, new DomEventData(view, domEvent, deleteData));\n            // Stop the beforeinput event if `delete` event was stopped.\n            // https://github.com/ckeditor/ckeditor5/issues/753\n            if (eventInfo.stop.called) {\n                evt.stop();\n            }\n        });\n        // TODO: to be removed when https://bugs.chromium.org/p/chromium/issues/detail?id=1365311 is solved.\n        if (env.isBlink) {\n            enableChromeWorkaround(this);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ observe() {}\n    /**\n\t * @inheritDoc\n\t */ stopObserving() {}\n}\n/**\n * Enables workaround for the issue https://github.com/ckeditor/ckeditor5/issues/11904.\n */ function enableChromeWorkaround(observer) {\n    const view = observer.view;\n    const document = view.document;\n    let pressedKeyCode = null;\n    let beforeInputReceived = false;\n    document.on('keydown', (evt, { keyCode })=>{\n        pressedKeyCode = keyCode;\n        beforeInputReceived = false;\n    });\n    document.on('keyup', (evt, { keyCode, domEvent })=>{\n        const selection = document.selection;\n        const shouldFireDeleteEvent = observer.isEnabled && keyCode == pressedKeyCode && isDeleteKeyCode(keyCode) && !selection.isCollapsed && !beforeInputReceived;\n        pressedKeyCode = null;\n        if (shouldFireDeleteEvent) {\n            const targetRange = selection.getFirstRange();\n            const eventInfo = new BubblingEventInfo(document, 'delete', targetRange);\n            const deleteData = {\n                unit: DELETE_SELECTION,\n                direction: getDeleteDirection(keyCode),\n                selectionToRemove: selection\n            };\n            document.fire(eventInfo, new DomEventData(view, domEvent, deleteData));\n        }\n    });\n    document.on('beforeinput', (evt, { inputType })=>{\n        const deleteEventSpec = DELETE_EVENT_TYPES[inputType];\n        const isMatchingBeforeInput = isDeleteKeyCode(pressedKeyCode) && deleteEventSpec && deleteEventSpec.direction == getDeleteDirection(pressedKeyCode);\n        if (isMatchingBeforeInput) {\n            beforeInputReceived = true;\n        }\n    }, {\n        priority: 'high'\n    });\n    document.on('beforeinput', (evt, { inputType, data })=>{\n        const shouldIgnoreBeforeInput = pressedKeyCode == keyCodes.delete && inputType == 'insertText' && data == '\\x7f'; // Delete character :P\n        if (shouldIgnoreBeforeInput) {\n            evt.stop();\n        }\n    }, {\n        priority: 'high'\n    });\n    function isDeleteKeyCode(keyCode) {\n        return keyCode == keyCodes.backspace || keyCode == keyCodes.delete;\n    }\n    function getDeleteDirection(keyCode) {\n        return keyCode == keyCodes.backspace ? DELETE_BACKWARD : DELETE_FORWARD;\n    }\n}\n/**\n * Verifies whether the given target ranges cover more than a single character and should be used instead of a single code-point deletion.\n */ function shouldUseTargetRanges(targetRanges) {\n    // The collapsed target range could happen for example while deleting inside an inline filler\n    // (it's mapped to collapsed position before an inline filler).\n    if (targetRanges.length != 1 || targetRanges[0].isCollapsed) {\n        return false;\n    }\n    const walker = targetRanges[0].getWalker({\n        direction: 'backward',\n        singleCharacters: true,\n        ignoreElementEnd: true\n    });\n    let count = 0;\n    for (const { nextPosition, item } of walker){\n        if (nextPosition.parent.is('$text')) {\n            const data = nextPosition.parent.data;\n            const offset = nextPosition.offset;\n            // Count combined symbols and emoji sequences as a single character.\n            if (isInsideSurrogatePair(data, offset) || isInsideCombinedSymbol(data, offset) || isInsideEmojiSequence(data, offset)) {\n                continue;\n            }\n            count++;\n        } else if (item.is('containerElement') || item.is('emptyElement')) {\n            count++;\n        }\n        if (count > 1) {\n            return true;\n        }\n    }\n    return false;\n}\n\n/**\n * The delete and backspace feature. Handles keys such as <kbd>Delete</kbd> and <kbd>Backspace</kbd>, other\n * keystrokes and user actions that result in deleting content in the editor.\n */ class Delete extends Plugin {\n    /**\n\t * Whether pressing backspace should trigger undo action\n\t */ _undoOnBackspace;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Delete';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const modelDocument = editor.model.document;\n        view.addObserver(DeleteObserver);\n        this._undoOnBackspace = false;\n        const deleteForwardCommand = new DeleteCommand(editor, 'forward');\n        // Register `deleteForward` command and add `forwardDelete` command as an alias for backward compatibility.\n        editor.commands.add('deleteForward', deleteForwardCommand);\n        editor.commands.add('forwardDelete', deleteForwardCommand);\n        editor.commands.add('delete', new DeleteCommand(editor, 'backward'));\n        this.listenTo(viewDocument, 'delete', (evt, data)=>{\n            // When not in composition, we handle the action, so prevent the default one.\n            // When in composition, it's the browser who modify the DOM (renderer is disabled).\n            if (!viewDocument.isComposing) {\n                data.preventDefault();\n            }\n            const { direction, sequence, selectionToRemove, unit } = data;\n            const commandName = direction === 'forward' ? 'deleteForward' : 'delete';\n            const commandData = {\n                sequence\n            };\n            if (unit == 'selection') {\n                const modelRanges = Array.from(selectionToRemove.getRanges()).map((viewRange)=>{\n                    return editor.editing.mapper.toModelRange(viewRange);\n                });\n                commandData.selection = editor.model.createSelection(modelRanges);\n            } else {\n                commandData.unit = unit;\n            }\n            editor.execute(commandName, commandData);\n            view.scrollToTheSelection();\n        }, {\n            priority: 'low'\n        });\n        if (this.editor.plugins.has('UndoEditing')) {\n            this.listenTo(viewDocument, 'delete', (evt, data)=>{\n                if (this._undoOnBackspace && data.direction == 'backward' && data.sequence == 1 && data.unit == 'codePoint') {\n                    this._undoOnBackspace = false;\n                    editor.execute('undo');\n                    data.preventDefault();\n                    evt.stop();\n                }\n            }, {\n                context: '$capture'\n            });\n            this.listenTo(modelDocument, 'change', ()=>{\n                this._undoOnBackspace = false;\n            });\n        }\n    }\n    /**\n\t * If the next user action after calling this method is pressing backspace, it would undo the last change.\n\t *\n\t * Requires {@link module:undo/undoediting~UndoEditing} plugin. If not loaded, does nothing.\n\t */ requestUndoOnBackspace() {\n        if (this.editor.plugins.has('UndoEditing')) {\n            this._undoOnBackspace = true;\n        }\n    }\n}\n\n/**\n * The typing feature. It handles typing.\n *\n * This is a \"glue\" plugin which loads the {@link module:typing/input~Input} and {@link module:typing/delete~Delete}\n * plugins.\n */ class Typing extends Plugin {\n    static get requires() {\n        return [\n            Input,\n            Delete\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Typing';\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module typing/utils/getlasttextline\n */ /**\n * Returns the last text line from the given range.\n *\n * \"The last text line\" is understood as text (from one or more text nodes) which is limited either by a parent block\n * or by inline elements (e.g. `<softBreak>`).\n *\n * ```ts\n * const rangeToCheck = model.createRange(\n * \tmodel.createPositionAt( paragraph, 0 ),\n * \tmodel.createPositionAt( paragraph, 'end' )\n * );\n *\n * const { text, range } = getLastTextLine( rangeToCheck, model );\n * ```\n *\n * For model below, the returned `text` will be \"Foo bar baz\" and `range` will be set on whole `<paragraph>` content:\n *\n * ```xml\n * <paragraph>Foo bar baz<paragraph>\n * ```\n *\n * However, in below case, `text` will be set to \"baz\" and `range` will be set only on \"baz\".\n *\n * ```xml\n * <paragraph>Foo<softBreak></softBreak>bar<softBreak></softBreak>baz<paragraph>\n * ```\n */ function getLastTextLine(range, model) {\n    let start = range.start;\n    const text = Array.from(range.getWalker({\n        ignoreElementEnd: false\n    })).reduce((rangeText, { item })=>{\n        // Trim text to a last occurrence of an inline element and update range start.\n        if (!(item.is('$text') || item.is('$textProxy'))) {\n            start = model.createPositionAfter(item);\n            return '';\n        }\n        return rangeText + item.data;\n    }, '');\n    return {\n        text,\n        range: model.createRange(start, range.end)\n    };\n}\n\n/**\n * The text watcher feature.\n *\n * Fires the {@link module:typing/textwatcher~TextWatcher#event:matched:data `matched:data`},\n * {@link module:typing/textwatcher~TextWatcher#event:matched:selection `matched:selection`} and\n * {@link module:typing/textwatcher~TextWatcher#event:unmatched `unmatched`} events on typing or selection changes.\n */ class TextWatcher extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * The editor's model.\n\t */ model;\n    /**\n\t * The function used to match the text.\n\t *\n\t * The test callback can return 3 values:\n\t *\n\t * * `false` if there is no match,\n\t * * `true` if there is a match,\n\t * * an object if there is a match and we want to pass some additional information to the {@link #event:matched:data} event.\n\t */ testCallback;\n    /**\n\t * Whether there is a match currently.\n\t */ _hasMatch;\n    /**\n\t * Creates a text watcher instance.\n\t *\n\t * @param testCallback See {@link module:typing/textwatcher~TextWatcher#testCallback}.\n\t */ constructor(model, testCallback){\n        super();\n        this.model = model;\n        this.testCallback = testCallback;\n        this._hasMatch = false;\n        this.set('isEnabled', true);\n        // Toggle text watching on isEnabled state change.\n        this.on('change:isEnabled', ()=>{\n            if (this.isEnabled) {\n                this._startListening();\n            } else {\n                this.stopListening(model.document.selection);\n                this.stopListening(model.document);\n            }\n        });\n        this._startListening();\n    }\n    /**\n\t * Flag indicating whether there is a match currently.\n\t */ get hasMatch() {\n        return this._hasMatch;\n    }\n    /**\n\t * Starts listening to the editor for typing and selection events.\n\t */ _startListening() {\n        const model = this.model;\n        const document = model.document;\n        this.listenTo(document.selection, 'change:range', (evt, { directChange })=>{\n            // Indirect changes (i.e. when the user types or external changes are applied) are handled in the document's change event.\n            if (!directChange) {\n                return;\n            }\n            // Act only on collapsed selection.\n            if (!document.selection.isCollapsed) {\n                if (this.hasMatch) {\n                    this.fire('unmatched');\n                    this._hasMatch = false;\n                }\n                return;\n            }\n            this._evaluateTextBeforeSelection('selection');\n        });\n        this.listenTo(document, 'change:data', (evt, batch)=>{\n            if (batch.isUndo || !batch.isLocal) {\n                return;\n            }\n            this._evaluateTextBeforeSelection('data', {\n                batch\n            });\n        });\n    }\n    /**\n\t * Checks the editor content for matched text.\n\t *\n\t * @fires matched:data\n\t * @fires matched:selection\n\t * @fires unmatched\n\t *\n\t * @param suffix A suffix used for generating the event name.\n\t * @param data Data object for event.\n\t */ _evaluateTextBeforeSelection(suffix, data = {}) {\n        const model = this.model;\n        const document = model.document;\n        const selection = document.selection;\n        const rangeBeforeSelection = model.createRange(model.createPositionAt(selection.focus.parent, 0), selection.focus);\n        const { text, range } = getLastTextLine(rangeBeforeSelection, model);\n        const testResult = this.testCallback(text);\n        if (!testResult && this.hasMatch) {\n            this.fire('unmatched');\n        }\n        this._hasMatch = !!testResult;\n        if (testResult) {\n            const eventData = Object.assign(data, {\n                text,\n                range\n            });\n            // If the test callback returns an object with additional data, assign the data as well.\n            if (typeof testResult == 'object') {\n                Object.assign(eventData, testResult);\n            }\n            this.fire(`matched:${suffix}`, eventData);\n        }\n    }\n}\n\n/**\n * This plugin enables the two-step caret (phantom) movement behavior for\n * {@link module:typing/twostepcaretmovement~TwoStepCaretMovement#registerAttribute registered attributes}\n * on arrow right (<kbd>→</kbd>) and left (<kbd>←</kbd>) key press.\n *\n * Thanks to this (phantom) caret movement the user is able to type before/after as well as at the\n * beginning/end of an attribute.\n *\n * **Note:** This plugin support right–to–left (Arabic, Hebrew, etc.) content by mirroring its behavior\n * but for the sake of simplicity examples showcase only left–to–right use–cases.\n *\n * # Forward movement\n *\n * ## \"Entering\" an attribute:\n *\n * When this plugin is enabled and registered for the `a` attribute and the selection is right before it\n * (at the attribute boundary), pressing the right arrow key will not move the selection but update its\n * attributes accordingly:\n *\n * * When enabled:\n *\n * ```xml\n * foo{}<$text a=\"true\">bar</$text>\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * foo<$text a=\"true\">{}bar</$text>\n * ```\n *\n * * When disabled:\n *\n * ```xml\n * foo{}<$text a=\"true\">bar</$text>\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * foo<$text a=\"true\">b{}ar</$text>\n * ```\n *\n *\n * ## \"Leaving\" an attribute:\n *\n * * When enabled:\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text>baz\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar</$text>{}baz\n * ```\n *\n * * When disabled:\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text>baz\n * ```\n *\n * \t<kbd>→</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar</$text>b{}az\n * ```\n *\n * # Backward movement\n *\n * * When enabled:\n *\n * ```xml\n * <$text a=\"true\">bar</$text>{}baz\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text>baz\n * ```\n *\n * * When disabled:\n *\n * ```xml\n * <$text a=\"true\">bar</$text>{}baz\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\">ba{}r</$text>b{}az\n * ```\n *\n * # Multiple attributes\n *\n * * When enabled and many attributes starts or ends at the same position:\n *\n * ```xml\n * <$text a=\"true\" b=\"true\">bar</$text>{}baz\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\" b=\"true\">bar{}</$text>baz\n * ```\n *\n * * When enabled and one procedes another:\n *\n * ```xml\n * <$text a=\"true\">bar</$text><$text b=\"true\">{}bar</$text>\n * ```\n *\n * \t<kbd>←</kbd>\n *\n * ```xml\n * <$text a=\"true\">bar{}</$text><$text b=\"true\">bar</$text>\n * ```\n *\n */ class TwoStepCaretMovement extends Plugin {\n    /**\n\t * A set of attributes to handle.\n\t */ attributes;\n    /**\n\t * The current UID of the overridden gravity, as returned by\n\t * {@link module:engine/model/writer~Writer#overrideSelectionGravity}.\n\t */ _overrideUid;\n    /**\n\t * A flag indicating that the automatic gravity restoration should not happen upon the next\n\t * gravity restoration.\n\t * {@link module:engine/model/selection~Selection#event:change:range} event.\n\t */ _isNextGravityRestorationSkipped = false;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TwoStepCaretMovement';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this.attributes = new Set();\n        this._overrideUid = null;\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        const locale = editor.locale;\n        const modelSelection = model.document.selection;\n        // Listen to keyboard events and handle the caret movement according to the 2-step caret logic.\n        this.listenTo(view.document, 'arrowKey', (evt, data)=>{\n            // This implementation works only for collapsed selection.\n            if (!modelSelection.isCollapsed) {\n                return;\n            }\n            // When user tries to expand the selection or jump over the whole word or to the beginning/end then\n            // two-steps movement is not necessary.\n            if (data.shiftKey || data.altKey || data.ctrlKey) {\n                return;\n            }\n            const arrowRightPressed = data.keyCode == keyCodes.arrowright;\n            const arrowLeftPressed = data.keyCode == keyCodes.arrowleft;\n            // When neither left or right arrow has been pressed then do noting.\n            if (!arrowRightPressed && !arrowLeftPressed) {\n                return;\n            }\n            const contentDirection = locale.contentLanguageDirection;\n            let isMovementHandled = false;\n            if (contentDirection === 'ltr' && arrowRightPressed || contentDirection === 'rtl' && arrowLeftPressed) {\n                isMovementHandled = this._handleForwardMovement(data);\n            } else {\n                isMovementHandled = this._handleBackwardMovement(data);\n            }\n            // Stop the keydown event if the two-step caret movement handled it. Avoid collisions\n            // with other features which may also take over the caret movement (e.g. Widget).\n            if (isMovementHandled === true) {\n                evt.stop();\n            }\n        }, {\n            context: '$text',\n            priority: 'highest'\n        });\n        // The automatic gravity restoration logic.\n        this.listenTo(modelSelection, 'change:range', (evt, data)=>{\n            // Skipping the automatic restoration is needed if the selection should change\n            // but the gravity must remain overridden afterwards. See the #handleBackwardMovement\n            // to learn more.\n            if (this._isNextGravityRestorationSkipped) {\n                this._isNextGravityRestorationSkipped = false;\n                return;\n            }\n            // Skip automatic restore when the gravity is not overridden — simply, there's nothing to restore\n            // at this moment.\n            if (!this._isGravityOverridden) {\n                return;\n            }\n            // Skip automatic restore when the change is indirect AND the selection is at the attribute boundary.\n            // It means that e.g. if the change was external (collaboration) and the user had their\n            // selection around the link, its gravity should remain intact in this change:range event.\n            if (!data.directChange && isBetweenDifferentAttributes(modelSelection.getFirstPosition(), this.attributes)) {\n                return;\n            }\n            this._restoreGravity();\n        });\n        // Handle a click at the beginning/end of a two-step element.\n        this._enableClickingAfterNode();\n        // Change the attributes of the selection in certain situations after the two-step node was inserted into the document.\n        this._enableInsertContentSelectionAttributesFixer();\n        // Handle removing the content after the two-step node.\n        this._handleDeleteContentAfterNode();\n    }\n    /**\n\t * Registers a given attribute for the two-step caret movement.\n\t *\n\t * @param attribute Name of the attribute to handle.\n\t */ registerAttribute(attribute) {\n        this.attributes.add(attribute);\n    }\n    /**\n\t * Updates the document selection and the view according to the two–step caret movement state\n\t * when moving **forwards**. Executed upon `keypress` in the {@link module:engine/view/view~View}.\n\t *\n\t * @param data Data of the key press.\n\t * @returns `true` when the handler prevented caret movement.\n\t */ _handleForwardMovement(data) {\n        const attributes = this.attributes;\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const position = selection.getFirstPosition();\n        // DON'T ENGAGE 2-SCM if gravity is already overridden. It means that we just entered\n        //\n        // \t\t<paragraph>foo<$text attribute>{}bar</$text>baz</paragraph>\n        //\n        // or left the attribute\n        //\n        // \t\t<paragraph>foo<$text attribute>bar</$text>{}baz</paragraph>\n        //\n        // and the gravity will be restored automatically.\n        if (this._isGravityOverridden) {\n            return false;\n        }\n        // DON'T ENGAGE 2-SCM when the selection is at the beginning of the block AND already has the\n        // attribute:\n        // * when the selection was initially set there using the mouse,\n        // * when the editor has just started\n        //\n        //\t\t<paragraph><$text attribute>{}bar</$text>baz</paragraph>\n        //\n        if (position.isAtStart && hasAnyAttribute(selection, attributes)) {\n            return false;\n        }\n        // ENGAGE 2-SCM When at least one of the observed attributes changes its value (incl. starts, ends).\n        //\n        //\t\t<paragraph>foo<$text attribute>bar{}</$text>baz</paragraph>\n        //\t\t<paragraph>foo<$text attribute>bar{}</$text><$text otherAttribute>baz</$text></paragraph>\n        //\t\t<paragraph>foo<$text attribute=1>bar{}</$text><$text attribute=2>baz</$text></paragraph>\n        //\t\t<paragraph>foo{}<$text attribute>bar</$text>baz</paragraph>\n        //\n        if (isBetweenDifferentAttributes(position, attributes)) {\n            preventCaretMovement(data);\n            // CLEAR 2-SCM attributes if we are at the end of one 2-SCM and before\n            // the next one with a different value of the same attribute.\n            //\n            //\t\t<paragraph>foo<$text attribute=1>bar{}</$text><$text attribute=2>bar</$text>baz</paragraph>\n            //\n            if (hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes, true)) {\n                clearSelectionAttributes(model, attributes);\n            } else {\n                this._overrideGravity();\n            }\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Updates the document selection and the view according to the two–step caret movement state\n\t * when moving **backwards**. Executed upon `keypress` in the {@link module:engine/view/view~View}.\n\t *\n\t * @param data Data of the key press.\n\t * @returns `true` when the handler prevented caret movement\n\t */ _handleBackwardMovement(data) {\n        const attributes = this.attributes;\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const position = selection.getFirstPosition();\n        // When the gravity is already overridden (by this plugin), it means we are on the two-step position.\n        // Prevent the movement, restore the gravity and update selection attributes.\n        //\n        //\t\t<paragraph>foo<$text attribute=1>bar</$text><$text attribute=2>{}baz</$text></paragraph>\n        //\t\t<paragraph>foo<$text attribute>bar</$text><$text otherAttribute>{}baz</$text></paragraph>\n        //\t\t<paragraph>foo<$text attribute>{}bar</$text>baz</paragraph>\n        //\t\t<paragraph>foo<$text attribute>bar</$text>{}baz</paragraph>\n        //\n        if (this._isGravityOverridden) {\n            preventCaretMovement(data);\n            this._restoreGravity();\n            // CLEAR 2-SCM attributes if we are at the end of one 2-SCM and before\n            // the next one with a different value of the same attribute.\n            //\n            //\t\t<paragraph>foo<$text attribute=1>bar</$text><$text attribute=2>{}bar</$text>baz</paragraph>\n            //\n            if (isBetweenDifferentAttributes(position, attributes, true)) {\n                clearSelectionAttributes(model, attributes);\n            } else {\n                setSelectionAttributesFromTheNodeBefore(model, attributes, position);\n            }\n            return true;\n        } else {\n            // REMOVE SELECTION ATTRIBUTE when restoring gravity towards a non-existent content at the\n            // beginning of the block.\n            //\n            // \t\t<paragraph>{}<$text attribute>bar</$text></paragraph>\n            //\n            if (position.isAtStart) {\n                if (hasAnyAttribute(selection, attributes)) {\n                    preventCaretMovement(data);\n                    setSelectionAttributesFromTheNodeBefore(model, attributes, position);\n                    return true;\n                }\n                return false;\n            }\n            // SET 2-SCM attributes if we are between nodes with the same attribute but with different values.\n            //\n            //\t\t<paragraph>foo<$text attribute=1>bar</$text>[]<$text attribute=2>bar</$text>baz</paragraph>\n            //\n            if (!hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes, true)) {\n                preventCaretMovement(data);\n                setSelectionAttributesFromTheNodeBefore(model, attributes, position);\n                return true;\n            }\n            // When we are moving from natural gravity, to the position of the 2SCM, we need to override the gravity,\n            // and make sure it won't be restored. Unless it's at the end of the block and an observed attribute.\n            // We need to check if the caret is a one position before the attribute boundary:\n            //\n            //\t\t<paragraph>foo<$text attribute=1>bar</$text><$text attribute=2>b{}az</$text></paragraph>\n            //\t\t<paragraph>foo<$text attribute>bar</$text><$text otherAttribute>b{}az</$text></paragraph>\n            //\t\t<paragraph>foo<$text attribute>b{}ar</$text>baz</paragraph>\n            //\t\t<paragraph>foo<$text attribute>bar</$text>b{}az</paragraph>\n            //\n            if (isStepAfterAnyAttributeBoundary(position, attributes)) {\n                // ENGAGE 2-SCM if the selection has no attribute. This may happen when the user\n                // left the attribute using a FORWARD 2-SCM.\n                //\n                // \t\t<paragraph><$text attribute>bar</$text>{}</paragraph>\n                //\n                if (position.isAtEnd && !hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes)) {\n                    preventCaretMovement(data);\n                    setSelectionAttributesFromTheNodeBefore(model, attributes, position);\n                    return true;\n                }\n                // Skip the automatic gravity restore upon the next selection#change:range event.\n                // If not skipped, it would automatically restore the gravity, which should remain\n                // overridden.\n                this._isNextGravityRestorationSkipped = true;\n                this._overrideGravity();\n                // Don't return \"true\" here because we didn't call _preventCaretMovement.\n                // Returning here will destabilize the filler logic, which also listens to\n                // keydown (and the event would be stopped).\n                return false;\n            }\n        }\n        return false;\n    }\n    /**\n\t * Starts listening to {@link module:engine/view/document~Document#event:mousedown} and\n\t * {@link module:engine/view/document~Document#event:selectionChange} and puts the selection before/after a 2-step node\n\t * if clicked at the beginning/ending of the 2-step node.\n\t *\n\t * The purpose of this action is to allow typing around the 2-step node directly after a click.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/1016.\n\t */ _enableClickingAfterNode() {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        const document = editor.editing.view.document;\n        editor.editing.view.addObserver(MouseObserver);\n        let clicked = false;\n        // Detect the click.\n        this.listenTo(document, 'mousedown', ()=>{\n            clicked = true;\n        });\n        // When the selection has changed...\n        this.listenTo(document, 'selectionChange', ()=>{\n            const attributes = this.attributes;\n            if (!clicked) {\n                return;\n            }\n            // ...and it was caused by the click...\n            clicked = false;\n            // ...and no text is selected...\n            if (!selection.isCollapsed) {\n                return;\n            }\n            // ...and clicked text is the 2-step node...\n            if (!hasAnyAttribute(selection, attributes)) {\n                return;\n            }\n            const position = selection.getFirstPosition();\n            if (!isBetweenDifferentAttributes(position, attributes)) {\n                return;\n            }\n            // The selection at the start of a block would use surrounding attributes\n            // from text after the selection so just clear 2-SCM attributes.\n            //\n            // Also, clear attributes for selection between same attribute with different values.\n            if (position.isAtStart || isBetweenDifferentAttributes(position, attributes, true)) {\n                clearSelectionAttributes(model, attributes);\n            } else if (!this._isGravityOverridden) {\n                this._overrideGravity();\n            }\n        });\n    }\n    /**\n\t * Starts listening to {@link module:engine/model/model~Model#event:insertContent} and corrects the model\n\t * selection attributes if the selection is at the end of a two-step node after inserting the content.\n\t *\n\t * The purpose of this action is to improve the overall UX because the user is no longer \"trapped\" by the\n\t * two-step attribute of the selection, and they can type a \"clean\" (`linkHref`–less) text right away.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/6053.\n\t */ _enableInsertContentSelectionAttributesFixer() {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        const attributes = this.attributes;\n        this.listenTo(model, 'insertContent', ()=>{\n            const position = selection.getFirstPosition();\n            if (hasAnyAttribute(selection, attributes) && isBetweenDifferentAttributes(position, attributes)) {\n                clearSelectionAttributes(model, attributes);\n            }\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether\n\t * removing a content right after the tow-step attribute.\n\t *\n\t * If so, the selection should not preserve the two-step attribute. However, if\n\t * the {@link module:typing/twostepcaretmovement~TwoStepCaretMovement} plugin is active and\n\t * the selection has the two-step attribute due to overridden gravity (at the end), the two-step attribute should stay untouched.\n\t *\n\t * The purpose of this action is to allow removing the link text and keep the selection outside the link.\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/7521.\n\t */ _handleDeleteContentAfterNode() {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        const view = editor.editing.view;\n        let isBackspace = false;\n        let shouldPreserveAttributes = false;\n        // Detect pressing `Backspace`.\n        this.listenTo(view.document, 'delete', (evt, data)=>{\n            isBackspace = data.direction === 'backward';\n        }, {\n            priority: 'high'\n        });\n        // Before removing the content, check whether the selection is inside a two-step attribute.\n        // If so, we want to preserve those attributes.\n        this.listenTo(model, 'deleteContent', ()=>{\n            if (!isBackspace) {\n                return;\n            }\n            const position = selection.getFirstPosition();\n            shouldPreserveAttributes = hasAnyAttribute(selection, this.attributes) && !isStepAfterAnyAttributeBoundary(position, this.attributes);\n        }, {\n            priority: 'high'\n        });\n        // After removing the content, check whether the current selection should preserve the `linkHref` attribute.\n        this.listenTo(model, 'deleteContent', ()=>{\n            if (!isBackspace) {\n                return;\n            }\n            isBackspace = false;\n            // Do not escape two-step attribute if it was inside it before content deletion.\n            if (shouldPreserveAttributes) {\n                return;\n            }\n            // Use `model.enqueueChange()` in order to execute the callback at the end of the changes process.\n            editor.model.enqueueChange(()=>{\n                const position = selection.getFirstPosition();\n                if (hasAnyAttribute(selection, this.attributes) && isBetweenDifferentAttributes(position, this.attributes)) {\n                    if (position.isAtStart || isBetweenDifferentAttributes(position, this.attributes, true)) {\n                        clearSelectionAttributes(model, this.attributes);\n                    } else if (!this._isGravityOverridden) {\n                        this._overrideGravity();\n                    }\n                }\n            });\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * `true` when the gravity is overridden for the plugin.\n\t */ get _isGravityOverridden() {\n        return !!this._overrideUid;\n    }\n    /**\n\t * Overrides the gravity using the {@link module:engine/model/writer~Writer model writer}\n\t * and stores the information about this fact in the {@link #_overrideUid}.\n\t *\n\t * A shorthand for {@link module:engine/model/writer~Writer#overrideSelectionGravity}.\n\t */ _overrideGravity() {\n        this._overrideUid = this.editor.model.change((writer)=>{\n            return writer.overrideSelectionGravity();\n        });\n    }\n    /**\n\t * Restores the gravity using the {@link module:engine/model/writer~Writer model writer}.\n\t *\n\t * A shorthand for {@link module:engine/model/writer~Writer#restoreSelectionGravity}.\n\t */ _restoreGravity() {\n        this.editor.model.change((writer)=>{\n            writer.restoreSelectionGravity(this._overrideUid);\n            this._overrideUid = null;\n        });\n    }\n}\n/**\n * Checks whether the selection has any of given attributes.\n */ function hasAnyAttribute(selection, attributes) {\n    for (const observedAttribute of attributes){\n        if (selection.hasAttribute(observedAttribute)) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Applies the given attributes to the current selection using using the\n * values from the node before the current position. Uses\n * the {@link module:engine/model/writer~Writer model writer}.\n */ function setSelectionAttributesFromTheNodeBefore(model, attributes, position) {\n    const nodeBefore = position.nodeBefore;\n    model.change((writer)=>{\n        if (nodeBefore) {\n            const attributes = [];\n            const isInlineObject = model.schema.isObject(nodeBefore) && model.schema.isInline(nodeBefore);\n            for (const [key, value] of nodeBefore.getAttributes()){\n                if (model.schema.checkAttribute('$text', key) && (!isInlineObject || model.schema.getAttributeProperties(key).copyFromObject !== false)) {\n                    attributes.push([\n                        key,\n                        value\n                    ]);\n                }\n            }\n            writer.setSelectionAttribute(attributes);\n        } else {\n            writer.removeSelectionAttribute(attributes);\n        }\n    });\n}\n/**\n * Removes 2-SCM attributes from the selection.\n */ function clearSelectionAttributes(model, attributes) {\n    model.change((writer)=>{\n        writer.removeSelectionAttribute(attributes);\n    });\n}\n/**\n * Prevents the caret movement in the view by calling `preventDefault` on the event data.\n *\n * @alias data.preventDefault\n */ function preventCaretMovement(data) {\n    data.preventDefault();\n}\n/**\n * Checks whether the step before `isBetweenDifferentAttributes()`.\n */ function isStepAfterAnyAttributeBoundary(position, attributes) {\n    const positionBefore = position.getShiftedBy(-1);\n    return isBetweenDifferentAttributes(positionBefore, attributes);\n}\n/**\n * Checks whether the given position is between different values of given attributes.\n */ function isBetweenDifferentAttributes(position, attributes, isStrict = false) {\n    const { nodeBefore, nodeAfter } = position;\n    for (const observedAttribute of attributes){\n        const attrBefore = nodeBefore ? nodeBefore.getAttribute(observedAttribute) : undefined;\n        const attrAfter = nodeAfter ? nodeAfter.getAttribute(observedAttribute) : undefined;\n        if (isStrict && (attrBefore === undefined || attrAfter === undefined)) {\n            continue;\n        }\n        if (attrAfter !== attrBefore) {\n            return true;\n        }\n    }\n    return false;\n}\n\n// All named transformations.\nconst TRANSFORMATIONS = {\n    // Common symbols:\n    copyright: {\n        from: '(c)',\n        to: '©'\n    },\n    registeredTrademark: {\n        from: '(r)',\n        to: '®'\n    },\n    trademark: {\n        from: '(tm)',\n        to: '™'\n    },\n    // Mathematical:\n    oneHalf: {\n        from: /(^|[^/a-z0-9])(1\\/2)([^/a-z0-9])$/i,\n        to: [\n            null,\n            '½',\n            null\n        ]\n    },\n    oneThird: {\n        from: /(^|[^/a-z0-9])(1\\/3)([^/a-z0-9])$/i,\n        to: [\n            null,\n            '⅓',\n            null\n        ]\n    },\n    twoThirds: {\n        from: /(^|[^/a-z0-9])(2\\/3)([^/a-z0-9])$/i,\n        to: [\n            null,\n            '⅔',\n            null\n        ]\n    },\n    oneForth: {\n        from: /(^|[^/a-z0-9])(1\\/4)([^/a-z0-9])$/i,\n        to: [\n            null,\n            '¼',\n            null\n        ]\n    },\n    threeQuarters: {\n        from: /(^|[^/a-z0-9])(3\\/4)([^/a-z0-9])$/i,\n        to: [\n            null,\n            '¾',\n            null\n        ]\n    },\n    lessThanOrEqual: {\n        from: '<=',\n        to: '≤'\n    },\n    greaterThanOrEqual: {\n        from: '>=',\n        to: '≥'\n    },\n    notEqual: {\n        from: '!=',\n        to: '≠'\n    },\n    arrowLeft: {\n        from: '<-',\n        to: '←'\n    },\n    arrowRight: {\n        from: '->',\n        to: '→'\n    },\n    // Typography:\n    horizontalEllipsis: {\n        from: '...',\n        to: '…'\n    },\n    enDash: {\n        from: /(^| )(--)( )$/,\n        to: [\n            null,\n            '–',\n            null\n        ]\n    },\n    emDash: {\n        from: /(^| )(---)( )$/,\n        to: [\n            null,\n            '—',\n            null\n        ]\n    },\n    // Quotations:\n    // English, US\n    quotesPrimary: {\n        from: buildQuotesRegExp('\"'),\n        to: [\n            null,\n            '“',\n            null,\n            '”'\n        ]\n    },\n    quotesSecondary: {\n        from: buildQuotesRegExp('\\''),\n        to: [\n            null,\n            '‘',\n            null,\n            '’'\n        ]\n    },\n    // English, UK\n    quotesPrimaryEnGb: {\n        from: buildQuotesRegExp('\\''),\n        to: [\n            null,\n            '‘',\n            null,\n            '’'\n        ]\n    },\n    quotesSecondaryEnGb: {\n        from: buildQuotesRegExp('\"'),\n        to: [\n            null,\n            '“',\n            null,\n            '”'\n        ]\n    },\n    // Polish\n    quotesPrimaryPl: {\n        from: buildQuotesRegExp('\"'),\n        to: [\n            null,\n            '„',\n            null,\n            '”'\n        ]\n    },\n    quotesSecondaryPl: {\n        from: buildQuotesRegExp('\\''),\n        to: [\n            null,\n            '‚',\n            null,\n            '’'\n        ]\n    }\n};\n// Transformation groups.\nconst TRANSFORMATION_GROUPS = {\n    symbols: [\n        'copyright',\n        'registeredTrademark',\n        'trademark'\n    ],\n    mathematical: [\n        'oneHalf',\n        'oneThird',\n        'twoThirds',\n        'oneForth',\n        'threeQuarters',\n        'lessThanOrEqual',\n        'greaterThanOrEqual',\n        'notEqual',\n        'arrowLeft',\n        'arrowRight'\n    ],\n    typography: [\n        'horizontalEllipsis',\n        'enDash',\n        'emDash'\n    ],\n    quotes: [\n        'quotesPrimary',\n        'quotesSecondary'\n    ]\n};\n// A set of default transformations provided by the feature.\nconst DEFAULT_TRANSFORMATIONS = [\n    'symbols',\n    'mathematical',\n    'typography',\n    'quotes'\n];\n/**\n * The text transformation plugin.\n */ class TextTransformation extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            'Delete',\n            'Input'\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TextTransformation';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('typing', {\n            transformations: {\n                include: DEFAULT_TRANSFORMATIONS\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const model = this.editor.model;\n        const modelSelection = model.document.selection;\n        modelSelection.on('change:range', ()=>{\n            // Disable plugin when selection is inside a code block.\n            this.isEnabled = !modelSelection.anchor.parent.is('element', 'codeBlock');\n        });\n        this._enableTransformationWatchers();\n    }\n    /**\n\t * Create new TextWatcher listening to the editor for typing and selection events.\n\t */ _enableTransformationWatchers() {\n        const editor = this.editor;\n        const model = editor.model;\n        const deletePlugin = editor.plugins.get('Delete');\n        const normalizedTransformations = normalizeTransformations(editor.config.get('typing.transformations'));\n        const testCallback = (text)=>{\n            for (const normalizedTransformation of normalizedTransformations){\n                const from = normalizedTransformation.from;\n                const match = from.test(text);\n                if (match) {\n                    return {\n                        normalizedTransformation\n                    };\n                }\n            }\n        };\n        const watcher = new TextWatcher(editor.model, testCallback);\n        watcher.on('matched:data', (evt, data)=>{\n            if (!data.batch.isTyping) {\n                return;\n            }\n            const { from, to } = data.normalizedTransformation;\n            const matches = from.exec(data.text);\n            const replaces = to(matches.slice(1));\n            const matchedRange = data.range;\n            let changeIndex = matches.index;\n            model.enqueueChange((writer)=>{\n                for(let i = 1; i < matches.length; i++){\n                    const match = matches[i];\n                    const replaceWith = replaces[i - 1];\n                    if (replaceWith == null) {\n                        changeIndex += match.length;\n                        continue;\n                    }\n                    const replacePosition = matchedRange.start.getShiftedBy(changeIndex);\n                    const replaceRange = model.createRange(replacePosition, replacePosition.getShiftedBy(match.length));\n                    const attributes = getTextAttributesAfterPosition(replacePosition);\n                    model.insertContent(writer.createText(replaceWith, attributes), replaceRange);\n                    changeIndex += replaceWith.length;\n                }\n                model.enqueueChange(()=>{\n                    deletePlugin.requestUndoOnBackspace();\n                });\n            });\n        });\n        watcher.bind('isEnabled').to(this);\n    }\n}\n/**\n * Normalizes the configuration `from` parameter value.\n * The normalized value for the `from` parameter is a RegExp instance. If the passed `from` is already a RegExp instance,\n * it is returned unchanged.\n */ function normalizeFrom(from) {\n    if (typeof from == 'string') {\n        return new RegExp(`(${escapeRegExp(from)})$`);\n    }\n    // `from` is already a regular expression.\n    return from;\n}\n/**\n * Normalizes the configuration `to` parameter value.\n * The normalized value for the `to` parameter is a function that takes an array and returns an array. See more in the\n * configuration description. If the passed `to` is already a function, it is returned unchanged.\n */ function normalizeTo(to) {\n    if (typeof to == 'string') {\n        return ()=>[\n                to\n            ];\n    } else if (to instanceof Array) {\n        return ()=>to;\n    }\n    // `to` is already a function.\n    return to;\n}\n/**\n * For given `position` returns attributes for the text that is after that position.\n * The text can be in the same text node as the position (`foo[]bar`) or in the next text node (`foo[]<$text bold=\"true\">bar</$text>`).\n */ function getTextAttributesAfterPosition(position) {\n    const textNode = position.textNode ? position.textNode : position.nodeAfter;\n    return textNode.getAttributes();\n}\n/**\n * Returns a RegExp pattern string that detects a sentence inside a quote.\n *\n * @param quoteCharacter The character to create a pattern for.\n */ function buildQuotesRegExp(quoteCharacter) {\n    return new RegExp(`(^|\\\\s)(${quoteCharacter})([^${quoteCharacter}]*)(${quoteCharacter})$`);\n}\n/**\n * Reads text transformation config and returns normalized array of transformations objects.\n */ function normalizeTransformations(config) {\n    const extra = config.extra || [];\n    const remove = config.remove || [];\n    const isNotRemoved = (transformation)=>!remove.includes(transformation);\n    const configured = config.include.concat(extra).filter(isNotRemoved);\n    return expandGroupsAndRemoveDuplicates(configured).filter(isNotRemoved) // Filter out 'remove' transformations as they might be set in group.\n    .map((transformation)=>typeof transformation == 'string' && TRANSFORMATIONS[transformation] ? TRANSFORMATIONS[transformation] : transformation)// Filter out transformations set as string that has not been found.\n    .filter((transformation)=>typeof transformation === 'object').map((transformation)=>({\n            from: normalizeFrom(transformation.from),\n            to: normalizeTo(transformation.to)\n        }));\n}\n/**\n * Reads definitions and expands named groups if needed to transformation names.\n * This method also removes duplicated named transformations if any.\n */ function expandGroupsAndRemoveDuplicates(definitions) {\n    // Set is using to make sure that transformation names are not duplicated.\n    const definedTransformations = new Set();\n    for (const transformationOrGroup of definitions){\n        if (typeof transformationOrGroup == 'string' && TRANSFORMATION_GROUPS[transformationOrGroup]) {\n            for (const transformation of TRANSFORMATION_GROUPS[transformationOrGroup]){\n                definedTransformations.add(transformation);\n            }\n        } else {\n            definedTransformations.add(transformationOrGroup);\n        }\n    }\n    return Array.from(definedTransformations);\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module typing/utils/findattributerange\n */ /**\n * Returns a model range that covers all consecutive nodes with the same `attributeName` and its `value`\n * that intersect the given `position`.\n *\n * It can be used e.g. to get the entire range on which the `linkHref` attribute needs to be changed when having a\n * selection inside a link.\n *\n * @param position The start position.\n * @param attributeName The attribute name.\n * @param value The attribute value.\n * @param model The model instance.\n * @returns The link range.\n */ function findAttributeRange(position, attributeName, value, model) {\n    return model.createRange(findAttributeRangeBound(position, attributeName, value, true, model), findAttributeRangeBound(position, attributeName, value, false, model));\n}\n/**\n * Walks forward or backward (depends on the `lookBack` flag), node by node, as long as they have the same attribute value\n * and returns a position just before or after (depends on the `lookBack` flag) the last matched node.\n *\n * @param position The start position.\n * @param attributeName The attribute name.\n * @param value The attribute value.\n * @param lookBack Whether the walk direction is forward (`false`) or backward (`true`).\n * @returns The position just before the last matched node.\n */ function findAttributeRangeBound(position, attributeName, value, lookBack, model) {\n    // Get node before or after position (depends on `lookBack` flag).\n    // When position is inside text node then start searching from text node.\n    let node = position.textNode || (lookBack ? position.nodeBefore : position.nodeAfter);\n    let lastNode = null;\n    while(node && node.getAttribute(attributeName) == value){\n        lastNode = node;\n        node = lookBack ? node.previousSibling : node.nextSibling;\n    }\n    return lastNode ? model.createPositionAt(lastNode, lookBack ? 'before' : 'after') : position;\n}\n\n/**\n * Adds a visual highlight style to an attribute element in which the selection is anchored.\n * Together with two-step caret movement, they indicate that the user is typing inside the element.\n *\n * Highlight is turned on by adding the given class to the attribute element in the view:\n *\n * * The class is removed before the conversion has started, as callbacks added with the `'highest'` priority\n * to {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} events.\n * * The class is added in the view post fixer, after other changes in the model tree were converted to the view.\n *\n * This way, adding and removing the highlight does not interfere with conversion.\n *\n * Usage:\n *\n * ```ts\n * import inlineHighlight from '@ckeditor/ckeditor5-typing/src/utils/inlinehighlight';\n *\n * // Make `ck-link_selected` class be applied on an `a` element\n * // whenever the corresponding `linkHref` attribute element is selected.\n * inlineHighlight( editor, 'linkHref', 'a', 'ck-link_selected' );\n * ```\n *\n * @param editor The editor instance.\n * @param attributeName The attribute name to check.\n * @param tagName The tagName of a view item.\n * @param className The class name to apply in the view.\n */ function inlineHighlight(editor, attributeName, tagName, className) {\n    const view = editor.editing.view;\n    const highlightedElements = new Set();\n    // Adding the class.\n    view.document.registerPostFixer((writer)=>{\n        const selection = editor.model.document.selection;\n        let changed = false;\n        if (selection.hasAttribute(attributeName)) {\n            const modelRange = findAttributeRange(selection.getFirstPosition(), attributeName, selection.getAttribute(attributeName), editor.model);\n            const viewRange = editor.editing.mapper.toViewRange(modelRange);\n            // There might be multiple view elements in the `viewRange`, for example, when the `a` element is\n            // broken by a UIElement.\n            for (const item of viewRange.getItems()){\n                if (item.is('element', tagName) && !item.hasClass(className)) {\n                    writer.addClass(className, item);\n                    highlightedElements.add(item);\n                    changed = true;\n                }\n            }\n        }\n        return changed;\n    });\n    // Removing the class.\n    editor.conversion.for('editingDowncast').add((dispatcher)=>{\n        // Make sure the highlight is removed on every possible event, before conversion is started.\n        dispatcher.on('insert', removeHighlight, {\n            priority: 'highest'\n        });\n        dispatcher.on('remove', removeHighlight, {\n            priority: 'highest'\n        });\n        dispatcher.on('attribute', removeHighlight, {\n            priority: 'highest'\n        });\n        dispatcher.on('selection', removeHighlight, {\n            priority: 'highest'\n        });\n        function removeHighlight() {\n            view.change((writer)=>{\n                for (const item of highlightedElements.values()){\n                    writer.removeClass(className, item);\n                    highlightedElements.delete(item);\n                }\n            });\n        }\n    });\n}\n\nexport { Delete, Input, InsertTextCommand, TextTransformation, TextWatcher, TwoStepCaretMovement, Typing, findAttributeRange, findAttributeRangeBound, getLastTextLine, inlineHighlight };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { MenuBarMenuListItemButtonView, ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { TwoStepCaretMovement, inlineHighlight } from '@ckeditor/ckeditor5-typing/dist/index.js';\n\n/**\n * An extension of the base {@link module:core/command~Command} class, which provides utilities for a command\n * that toggles a single attribute on a text or an element.\n *\n * `AttributeCommand` uses {@link module:engine/model/document~Document#selection}\n * to decide which nodes (if any) should be changed, and applies or removes the attribute from them.\n *\n * The command checks the {@link module:engine/model/model~Model#schema} to decide if it can be enabled\n * for the current selection and to which nodes the attribute can be applied.\n */ class AttributeCommand extends Command {\n    /**\n\t * The attribute that will be set by the command.\n\t */ attributeKey;\n    /**\n\t * @param attributeKey Attribute that will be set by the command.\n\t */ constructor(editor, attributeKey){\n        super(editor);\n        this.attributeKey = attributeKey;\n    }\n    /**\n\t * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n\t */ refresh() {\n        const model = this.editor.model;\n        const doc = model.document;\n        this.value = this._getValueFromFirstAllowedNode();\n        this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n    }\n    /**\n\t * Executes the command &ndash; applies the attribute to the selection or removes it from the selection.\n\t *\n\t * If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.\n\t *\n\t * The execution result differs, depending on the {@link module:engine/model/document~Document#selection}:\n\t *\n\t * * If the selection is on a range, the command applies the attribute to all nodes in that range\n\t * (if they are allowed to have this attribute by the {@link module:engine/model/schema~Schema schema}).\n\t * * If the selection is collapsed in a non-empty node, the command applies the attribute to the\n\t * {@link module:engine/model/document~Document#selection} itself (note that typed characters copy attributes from the selection).\n\t * * If the selection is collapsed in an empty node, the command applies the attribute to the parent node of the selection (note\n\t * that the selection inherits all attributes from a node if it is in an empty node).\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`,\n\t * the command will apply the attribute, otherwise the command will remove the attribute.\n\t * If not set, the command will look for its current value to decide what it should do.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const doc = model.document;\n        const selection = doc.selection;\n        const value = options.forceValue === undefined ? !this.value : options.forceValue;\n        model.change((writer)=>{\n            if (selection.isCollapsed) {\n                if (value) {\n                    writer.setSelectionAttribute(this.attributeKey, true);\n                } else {\n                    writer.removeSelectionAttribute(this.attributeKey);\n                }\n            } else {\n                const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n                for (const range of ranges){\n                    if (value) {\n                        writer.setAttribute(this.attributeKey, value, range);\n                    } else {\n                        writer.removeAttribute(this.attributeKey, range);\n                    }\n                }\n            }\n        });\n    }\n    /**\n\t * Checks the attribute value of the first node in the selection that allows the attribute.\n\t * For the collapsed selection returns the selection attribute.\n\t *\n\t * @returns The attribute value.\n\t */ _getValueFromFirstAllowedNode() {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const selection = model.document.selection;\n        if (selection.isCollapsed) {\n            return selection.hasAttribute(this.attributeKey);\n        }\n        for (const range of selection.getRanges()){\n            for (const item of range.getItems()){\n                if (schema.checkAttribute(item, this.attributeKey)) {\n                    return item.hasAttribute(this.attributeKey);\n                }\n            }\n        }\n        return false;\n    }\n}\n\nconst BOLD$1 = 'bold';\n/**\n * The bold editing feature.\n *\n * It registers the `'bold'` command and introduces the `bold` attribute in the model which renders to the view\n * as a `<strong>` element.\n */ class BoldEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'BoldEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        // Allow bold attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: BOLD$1\n        });\n        editor.model.schema.setAttributeProperties(BOLD$1, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        // Build converter from model to view for data and editing pipelines.\n        editor.conversion.attributeToElement({\n            model: BOLD$1,\n            view: 'strong',\n            upcastAlso: [\n                'b',\n                (viewElement)=>{\n                    const fontWeight = viewElement.getStyle('font-weight');\n                    if (!fontWeight) {\n                        return null;\n                    }\n                    // Value of the `font-weight` attribute can be defined as a string or a number.\n                    if (fontWeight == 'bold' || Number(fontWeight) >= 600) {\n                        return {\n                            name: true,\n                            styles: [\n                                'font-weight'\n                            ]\n                        };\n                    }\n                    return null;\n                }\n            ]\n        });\n        // Create bold command.\n        editor.commands.add(BOLD$1, new AttributeCommand(editor, BOLD$1));\n        // Set the Ctrl+B keystroke.\n        editor.keystrokes.set('CTRL+B', BOLD$1);\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Bold text'),\n                    keystroke: 'CTRL+B'\n                }\n            ]\n        });\n    }\n}\n\n/**\n * Returns a function that creates a (toolbar or menu bar) button for a basic style feature.\n */ function getButtonCreator({ editor, commandName, plugin, icon, label, keystroke }) {\n    return (ButtonClass)=>{\n        const command = editor.commands.get(commandName);\n        const view = new ButtonClass(editor.locale);\n        view.set({\n            label,\n            icon,\n            keystroke,\n            isToggleable: true\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        view.bind('isOn').to(command, 'value');\n        if (view instanceof MenuBarMenuListItemButtonView) {\n            view.set({\n                role: 'menuitemcheckbox'\n            });\n        } else {\n            view.set({\n                tooltip: true\n            });\n        }\n        // Execute the command.\n        plugin.listenTo(view, 'execute', ()=>{\n            editor.execute(commandName);\n            editor.editing.view.focus();\n        });\n        return view;\n    };\n}\n\nconst BOLD = 'bold';\n/**\n * The bold UI feature. It introduces the Bold button.\n */ class BoldUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'BoldUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const createButton = getButtonCreator({\n            editor,\n            commandName: BOLD,\n            plugin: this,\n            icon: icons.bold,\n            label: t('Bold'),\n            keystroke: 'CTRL+B'\n        });\n        // Add bold button to feature components.\n        editor.ui.componentFactory.add(BOLD, ()=>createButton(ButtonView));\n        editor.ui.componentFactory.add('menuBar:' + BOLD, ()=>createButton(MenuBarMenuListItemButtonView));\n    }\n}\n\n/**\n * The bold feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/bold/boldediting~BoldEditing bold editing feature}\n * and {@link module:basic-styles/bold/boldui~BoldUI bold UI feature}.\n */ class Bold extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            BoldEditing,\n            BoldUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Bold';\n    }\n}\n\nconst CODE$1 = 'code';\nconst HIGHLIGHT_CLASS = 'ck-code_selected';\n/**\n * The code editing feature.\n *\n * It registers the `'code'` command and introduces the `code` attribute in the model which renders to the view\n * as a `<code>` element.\n */ class CodeEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'CodeEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TwoStepCaretMovement\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        // Allow code attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: CODE$1\n        });\n        editor.model.schema.setAttributeProperties(CODE$1, {\n            isFormatting: true,\n            copyOnEnter: false\n        });\n        editor.conversion.attributeToElement({\n            model: CODE$1,\n            view: 'code',\n            upcastAlso: {\n                styles: {\n                    'word-wrap': 'break-word'\n                }\n            }\n        });\n        // Create code command.\n        editor.commands.add(CODE$1, new AttributeCommand(editor, CODE$1));\n        // Enable two-step caret movement for `code` attribute.\n        editor.plugins.get(TwoStepCaretMovement).registerAttribute(CODE$1);\n        // Setup highlight over selected element.\n        inlineHighlight(editor, CODE$1, 'code', HIGHLIGHT_CLASS);\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Move out of an inline code style'),\n                    keystroke: [\n                        [\n                            'arrowleft',\n                            'arrowleft'\n                        ],\n                        [\n                            'arrowright',\n                            'arrowright'\n                        ]\n                    ]\n                }\n            ]\n        });\n    }\n}\n\nvar codeIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z\\\"/></svg>\";\n\nconst CODE = 'code';\n/**\n * The code UI feature. It introduces the Code button.\n */ class CodeUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'CodeUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const createButton = getButtonCreator({\n            editor,\n            commandName: CODE,\n            plugin: this,\n            icon: codeIcon,\n            label: t('Code')\n        });\n        // Add code button to feature components.\n        editor.ui.componentFactory.add(CODE, ()=>createButton(ButtonView));\n        editor.ui.componentFactory.add('menuBar:' + CODE, ()=>createButton(MenuBarMenuListItemButtonView));\n    }\n}\n\n/**\n * The code feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/code/codeediting~CodeEditing code editing feature}\n * and {@link module:basic-styles/code/codeui~CodeUI code UI feature}.\n */ class Code extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            CodeEditing,\n            CodeUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Code';\n    }\n}\n\nconst ITALIC$1 = 'italic';\n/**\n * The italic editing feature.\n *\n * It registers the `'italic'` command, the <kbd>Ctrl+I</kbd> keystroke and introduces the `italic` attribute in the model\n * which renders to the view as an `<i>` element.\n */ class ItalicEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ItalicEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        // Allow italic attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: ITALIC$1\n        });\n        editor.model.schema.setAttributeProperties(ITALIC$1, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        editor.conversion.attributeToElement({\n            model: ITALIC$1,\n            view: 'i',\n            upcastAlso: [\n                'em',\n                {\n                    styles: {\n                        'font-style': 'italic'\n                    }\n                }\n            ]\n        });\n        // Create italic command.\n        editor.commands.add(ITALIC$1, new AttributeCommand(editor, ITALIC$1));\n        // Set the Ctrl+I keystroke.\n        editor.keystrokes.set('CTRL+I', ITALIC$1);\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Italic text'),\n                    keystroke: 'CTRL+I'\n                }\n            ]\n        });\n    }\n}\n\nvar italicIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z\\\"/></svg>\";\n\nconst ITALIC = 'italic';\n/**\n * The italic UI feature. It introduces the Italic button.\n */ class ItalicUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ItalicUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const createButton = getButtonCreator({\n            editor,\n            commandName: ITALIC,\n            plugin: this,\n            icon: italicIcon,\n            keystroke: 'CTRL+I',\n            label: t('Italic')\n        });\n        // Add bold button to feature components.\n        editor.ui.componentFactory.add(ITALIC, ()=>createButton(ButtonView));\n        editor.ui.componentFactory.add('menuBar:' + ITALIC, ()=>createButton(MenuBarMenuListItemButtonView));\n    }\n}\n\n/**\n * The italic feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/italic/italicediting~ItalicEditing} and\n * {@link module:basic-styles/italic/italicui~ItalicUI} plugins.\n */ class Italic extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ItalicEditing,\n            ItalicUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Italic';\n    }\n}\n\nconst STRIKETHROUGH$1 = 'strikethrough';\n/**\n * The strikethrough editing feature.\n *\n * It registers the `'strikethrough'` command, the <kbd>Ctrl+Shift+X</kbd> keystroke and introduces the\n * `strikethroughsthrough` attribute in the model which renders to the view\n * as a `<s>` element.\n */ class StrikethroughEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'StrikethroughEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        // Allow strikethrough attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: STRIKETHROUGH$1\n        });\n        editor.model.schema.setAttributeProperties(STRIKETHROUGH$1, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        editor.conversion.attributeToElement({\n            model: STRIKETHROUGH$1,\n            view: 's',\n            upcastAlso: [\n                'del',\n                'strike',\n                {\n                    styles: {\n                        'text-decoration': 'line-through'\n                    }\n                }\n            ]\n        });\n        // Create strikethrough command.\n        editor.commands.add(STRIKETHROUGH$1, new AttributeCommand(editor, STRIKETHROUGH$1));\n        // Set the Ctrl+Shift+X keystroke.\n        editor.keystrokes.set('CTRL+SHIFT+X', 'strikethrough');\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Strikethrough text'),\n                    keystroke: 'CTRL+SHIFT+X'\n                }\n            ]\n        });\n    }\n}\n\nvar strikethroughIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z\\\"/><path d=\\\"M3 10.5V9h14v1.5z\\\"/></svg>\";\n\nconst STRIKETHROUGH = 'strikethrough';\n/**\n * The strikethrough UI feature. It introduces the Strikethrough button.\n */ class StrikethroughUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'StrikethroughUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const createButton = getButtonCreator({\n            editor,\n            commandName: STRIKETHROUGH,\n            plugin: this,\n            icon: strikethroughIcon,\n            keystroke: 'CTRL+SHIFT+X',\n            label: t('Strikethrough')\n        });\n        // Add strikethrough button to feature components.\n        editor.ui.componentFactory.add(STRIKETHROUGH, ()=>createButton(ButtonView));\n        editor.ui.componentFactory.add('menuBar:' + STRIKETHROUGH, ()=>createButton(MenuBarMenuListItemButtonView));\n    }\n}\n\n/**\n * The strikethrough feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/strikethrough/strikethroughediting~StrikethroughEditing} and\n * {@link module:basic-styles/strikethrough/strikethroughui~StrikethroughUI} plugins.\n */ class Strikethrough extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            StrikethroughEditing,\n            StrikethroughUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Strikethrough';\n    }\n}\n\nconst SUBSCRIPT$1 = 'subscript';\n/**\n * The subscript editing feature.\n *\n * It registers the `sub` command and introduces the `sub` attribute in the model which renders to the view\n * as a `<sub>` element.\n */ class SubscriptEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SubscriptEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Allow sub attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: SUBSCRIPT$1\n        });\n        editor.model.schema.setAttributeProperties(SUBSCRIPT$1, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        // Build converter from model to view for data and editing pipelines.\n        editor.conversion.attributeToElement({\n            model: SUBSCRIPT$1,\n            view: 'sub',\n            upcastAlso: [\n                {\n                    styles: {\n                        'vertical-align': 'sub'\n                    }\n                }\n            ]\n        });\n        // Create sub command.\n        editor.commands.add(SUBSCRIPT$1, new AttributeCommand(editor, SUBSCRIPT$1));\n    }\n}\n\nvar subscriptIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z\\\"/></svg>\";\n\nconst SUBSCRIPT = 'subscript';\n/**\n * The subscript UI feature. It introduces the Subscript button.\n */ class SubscriptUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SubscriptUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const createButton = getButtonCreator({\n            editor,\n            commandName: SUBSCRIPT,\n            plugin: this,\n            icon: subscriptIcon,\n            label: t('Subscript')\n        });\n        // Add subscript button to feature components.\n        editor.ui.componentFactory.add(SUBSCRIPT, ()=>createButton(ButtonView));\n        editor.ui.componentFactory.add('menuBar:' + SUBSCRIPT, ()=>createButton(MenuBarMenuListItemButtonView));\n    }\n}\n\n/**\n * The subscript feature.\n *\n * It loads the {@link module:basic-styles/subscript/subscriptediting~SubscriptEditing} and\n * {@link module:basic-styles/subscript/subscriptui~SubscriptUI} plugins.\n */ class Subscript extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            SubscriptEditing,\n            SubscriptUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Subscript';\n    }\n}\n\nconst SUPERSCRIPT$1 = 'superscript';\n/**\n * The superscript editing feature.\n *\n * It registers the `super` command and introduces the `super` attribute in the model which renders to the view\n * as a `<super>` element.\n */ class SuperscriptEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SuperscriptEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Allow super attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: SUPERSCRIPT$1\n        });\n        editor.model.schema.setAttributeProperties(SUPERSCRIPT$1, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        // Build converter from model to view for data and editing pipelines.\n        editor.conversion.attributeToElement({\n            model: SUPERSCRIPT$1,\n            view: 'sup',\n            upcastAlso: [\n                {\n                    styles: {\n                        'vertical-align': 'super'\n                    }\n                }\n            ]\n        });\n        // Create super command.\n        editor.commands.add(SUPERSCRIPT$1, new AttributeCommand(editor, SUPERSCRIPT$1));\n    }\n}\n\nvar superscriptIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z\\\"/></svg>\";\n\nconst SUPERSCRIPT = 'superscript';\n/**\n * The superscript UI feature. It introduces the Superscript button.\n */ class SuperscriptUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SuperscriptUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const createButton = getButtonCreator({\n            editor,\n            commandName: SUPERSCRIPT,\n            plugin: this,\n            icon: superscriptIcon,\n            label: t('Superscript')\n        });\n        // Add superscript button to feature components.\n        editor.ui.componentFactory.add(SUPERSCRIPT, ()=>createButton(ButtonView));\n        editor.ui.componentFactory.add('menuBar:' + SUPERSCRIPT, ()=>createButton(MenuBarMenuListItemButtonView));\n    }\n}\n\n/**\n * The superscript feature.\n *\n * It loads the {@link module:basic-styles/superscript/superscriptediting~SuperscriptEditing} and\n * {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.\n */ class Superscript extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            SuperscriptEditing,\n            SuperscriptUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Superscript';\n    }\n}\n\nconst UNDERLINE$1 = 'underline';\n/**\n * The underline editing feature.\n *\n * It registers the `'underline'` command, the <kbd>Ctrl+U</kbd> keystroke\n * and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.\n */ class UnderlineEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'UnderlineEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        // Allow strikethrough attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: UNDERLINE$1\n        });\n        editor.model.schema.setAttributeProperties(UNDERLINE$1, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        editor.conversion.attributeToElement({\n            model: UNDERLINE$1,\n            view: 'u',\n            upcastAlso: {\n                styles: {\n                    'text-decoration': 'underline'\n                }\n            }\n        });\n        // Create underline command.\n        editor.commands.add(UNDERLINE$1, new AttributeCommand(editor, UNDERLINE$1));\n        // Set the Ctrl+U keystroke.\n        editor.keystrokes.set('CTRL+U', 'underline');\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Underline text'),\n                    keystroke: 'CTRL+U'\n                }\n            ]\n        });\n    }\n}\n\nvar underlineIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z\\\"/></svg>\";\n\nconst UNDERLINE = 'underline';\n/**\n * The underline UI feature. It introduces the Underline button.\n */ class UnderlineUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'UnderlineUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const createButton = getButtonCreator({\n            editor,\n            commandName: UNDERLINE,\n            plugin: this,\n            icon: underlineIcon,\n            label: t('Underline'),\n            keystroke: 'CTRL+U'\n        });\n        // Add bold button to feature components.\n        editor.ui.componentFactory.add(UNDERLINE, ()=>createButton(ButtonView));\n        editor.ui.componentFactory.add('menuBar:' + UNDERLINE, ()=>createButton(MenuBarMenuListItemButtonView));\n    }\n}\n\n/**\n * The underline feature.\n *\n * For a detailed overview check the {@glink features/basic-styles Basic styles feature} guide\n * and the {@glink api/basic-styles package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:basic-styles/underline/underlineediting~UnderlineEditing} and\n * {@link module:basic-styles/underline/underlineui~UnderlineUI} plugins.\n */ class Underline extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            UnderlineEditing,\n            UnderlineUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Underline';\n    }\n}\n\nexport { Bold, BoldEditing, BoldUI, Code, CodeEditing, CodeUI, Italic, ItalicEditing, ItalicUI, Strikethrough, StrikethroughEditing, StrikethroughUI, Subscript, SubscriptEditing, SubscriptUI, Superscript, SuperscriptEditing, SuperscriptUI, Underline, UnderlineEditing, UnderlineUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Observer, BubblingEventInfo, DomEventData } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { env } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module enter/utils\n */ /**\n * Returns attributes that should be preserved on the enter keystroke.\n *\n * Filtering is realized based on `copyOnEnter` attribute property. Read more about attribute properties\n * {@link module:engine/model/schema~Schema#setAttributeProperties here}.\n *\n * @param schema Model's schema.\n * @param allAttributes Attributes to filter.\n */ function* getCopyOnEnterAttributes(schema, allAttributes) {\n    for (const attribute of allAttributes){\n        if (attribute && schema.getAttributeProperties(attribute[0]).copyOnEnter) {\n            yield attribute;\n        }\n    }\n}\n\n/**\n * Enter command used by the {@link module:enter/enter~Enter Enter feature} to handle the <kbd>Enter</kbd> keystroke.\n */ class EnterCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        this.editor.model.change((writer)=>{\n            this.enterBlock(writer);\n            this.fire('afterExecute', {\n                writer\n            });\n        });\n    }\n    /**\n\t * Splits a block where the document selection is placed, in the way how the <kbd>Enter</kbd> key is expected to work:\n\t *\n\t * ```\n\t * <p>Foo[]bar</p>   ->   <p>Foo</p><p>[]bar</p>\n\t * <p>Foobar[]</p>   ->   <p>Foobar</p><p>[]</p>\n\t * <p>Fo[ob]ar</p>   ->   <p>Fo</p><p>[]ar</p>\n\t * ```\n\t *\n\t * In some cases, the split will not happen:\n\t *\n\t * ```\n\t * // The selection parent is a limit element:\n\t * <figcaption>A[bc]d</figcaption>   ->   <figcaption>A[]d</figcaption>\n\t *\n\t * // The selection spans over multiple elements:\n\t * <h>x[x</h><p>y]y<p>   ->   <h>x</h><p>[]y</p>\n\t * ```\n\t *\n\t * @param writer Writer to use when performing the enter action.\n\t * @returns Boolean indicating if the block was split.\n\t */ enterBlock(writer) {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const schema = model.schema;\n        const isSelectionEmpty = selection.isCollapsed;\n        const range = selection.getFirstRange();\n        const startElement = range.start.parent;\n        const endElement = range.end.parent;\n        // Don't touch the roots and other limit elements.\n        if (schema.isLimit(startElement) || schema.isLimit(endElement)) {\n            // Delete the selected content but only if inside a single limit element.\n            // Abort, when crossing limit elements boundary (e.g. <limit1>x[x</limit1>donttouchme<limit2>y]y</limit2>).\n            // This is an edge case and it's hard to tell what should actually happen because such a selection\n            // is not entirely valid.\n            if (!isSelectionEmpty && startElement == endElement) {\n                model.deleteContent(selection);\n            }\n            return false;\n        }\n        if (isSelectionEmpty) {\n            const attributesToCopy = getCopyOnEnterAttributes(writer.model.schema, selection.getAttributes());\n            splitBlock(writer, range.start);\n            writer.setSelectionAttribute(attributesToCopy);\n            return true;\n        } else {\n            const leaveUnmerged = !(range.start.isAtStart && range.end.isAtEnd);\n            const isContainedWithinOneElement = startElement == endElement;\n            model.deleteContent(selection, {\n                leaveUnmerged\n            });\n            if (leaveUnmerged) {\n                // Partially selected elements.\n                //\n                // <h>x[xx]x</h>\t\t-> <h>x^x</h>\t\t\t-> <h>x</h><h>^x</h>\n                if (isContainedWithinOneElement) {\n                    splitBlock(writer, selection.focus);\n                    return true;\n                } else {\n                    writer.setSelection(endElement, 0);\n                }\n            }\n        }\n        return false;\n    }\n}\nfunction splitBlock(writer, splitPos) {\n    writer.split(splitPos);\n    writer.setSelection(splitPos.parent.nextSibling, 0);\n}\n\nconst ENTER_EVENT_TYPES = {\n    insertParagraph: {\n        isSoft: false\n    },\n    insertLineBreak: {\n        isSoft: true\n    }\n};\n/**\n * Enter observer introduces the {@link module:engine/view/document~Document#event:enter `Document#enter`} event.\n */ class EnterObserver extends Observer {\n    /**\n\t * @inheritDoc\n\t */ constructor(view){\n        super(view);\n        const doc = this.document;\n        let shiftPressed = false;\n        doc.on('keydown', (evt, data)=>{\n            shiftPressed = data.shiftKey;\n        });\n        doc.on('beforeinput', (evt, data)=>{\n            if (!this.isEnabled) {\n                return;\n            }\n            let inputType = data.inputType;\n            // See https://github.com/ckeditor/ckeditor5/issues/13321.\n            if (env.isSafari && shiftPressed && inputType == 'insertParagraph') {\n                inputType = 'insertLineBreak';\n            }\n            const domEvent = data.domEvent;\n            const enterEventSpec = ENTER_EVENT_TYPES[inputType];\n            if (!enterEventSpec) {\n                return;\n            }\n            const event = new BubblingEventInfo(doc, 'enter', data.targetRanges[0]);\n            doc.fire(event, new DomEventData(view, domEvent, {\n                isSoft: enterEventSpec.isSoft\n            }));\n            // Stop `beforeinput` event if `enter` event was stopped.\n            // https://github.com/ckeditor/ckeditor5/issues/753\n            if (event.stop.called) {\n                evt.stop();\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ observe() {}\n    /**\n\t * @inheritDoc\n\t */ stopObserving() {}\n}\n\n/**\n * This plugin handles the <kbd>Enter</kbd> keystroke (hard line break) in the editor.\n *\n * See also the {@link module:enter/shiftenter~ShiftEnter} plugin.\n *\n * For more information about this feature see the {@glink api/enter package page}.\n */ class Enter extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Enter';\n    }\n    init() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const t = this.editor.t;\n        view.addObserver(EnterObserver);\n        editor.commands.add('enter', new EnterCommand(editor));\n        this.listenTo(viewDocument, 'enter', (evt, data)=>{\n            // When not in composition, we handle the action, so prevent the default one.\n            // When in composition, it's the browser who modify the DOM (renderer is disabled).\n            if (!viewDocument.isComposing) {\n                data.preventDefault();\n            }\n            // The soft enter key is handled by the ShiftEnter plugin.\n            if (data.isSoft) {\n                return;\n            }\n            editor.execute('enter');\n            view.scrollToTheSelection();\n        }, {\n            priority: 'low'\n        });\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Insert a hard break (a new paragraph)'),\n                    keystroke: 'Enter'\n                }\n            ]\n        });\n    }\n}\n\n/**\n * ShiftEnter command. It is used by the {@link module:enter/shiftenter~ShiftEnter ShiftEnter feature} to handle\n * the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke.\n */ class ShiftEnterCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const model = this.editor.model;\n        const doc = model.document;\n        model.change((writer)=>{\n            softBreakAction(model, writer, doc.selection);\n            this.fire('afterExecute', {\n                writer\n            });\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const doc = model.document;\n        this.isEnabled = isEnabled(model.schema, doc.selection);\n    }\n}\n/**\n * Checks whether the ShiftEnter command should be enabled in the specified selection.\n */ function isEnabled(schema, selection) {\n    // At this moment it is okay to support single range selections only.\n    // But in the future we may need to change that.\n    if (selection.rangeCount > 1) {\n        return false;\n    }\n    const anchorPos = selection.anchor;\n    // Check whether the break element can be inserted in the current selection anchor.\n    if (!anchorPos || !schema.checkChild(anchorPos, 'softBreak')) {\n        return false;\n    }\n    const range = selection.getFirstRange();\n    const startElement = range.start.parent;\n    const endElement = range.end.parent;\n    // Do not modify the content if selection is cross-limit elements.\n    if ((isInsideLimitElement(startElement, schema) || isInsideLimitElement(endElement, schema)) && startElement !== endElement) {\n        return false;\n    }\n    return true;\n}\n/**\n * Creates a break in the way that the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke is expected to work.\n */ function softBreakAction(model, writer, selection) {\n    const isSelectionEmpty = selection.isCollapsed;\n    const range = selection.getFirstRange();\n    const startElement = range.start.parent;\n    const endElement = range.end.parent;\n    const isContainedWithinOneElement = startElement == endElement;\n    if (isSelectionEmpty) {\n        const attributesToCopy = getCopyOnEnterAttributes(model.schema, selection.getAttributes());\n        insertBreak(model, writer, range.end);\n        writer.removeSelectionAttribute(selection.getAttributeKeys());\n        writer.setSelectionAttribute(attributesToCopy);\n    } else {\n        const leaveUnmerged = !(range.start.isAtStart && range.end.isAtEnd);\n        model.deleteContent(selection, {\n            leaveUnmerged\n        });\n        // Selection within one element:\n        //\n        // <h>x[xx]x</h>\t\t-> <h>x^x</h>\t\t\t-> <h>x<br>^x</h>\n        if (isContainedWithinOneElement) {\n            insertBreak(model, writer, selection.focus);\n        } else {\n            // Move the selection to the 2nd element (last step of the example above).\n            if (leaveUnmerged) {\n                writer.setSelection(endElement, 0);\n            }\n        }\n    }\n}\nfunction insertBreak(model, writer, position) {\n    const breakLineElement = writer.createElement('softBreak');\n    model.insertContent(breakLineElement, position);\n    writer.setSelection(breakLineElement, 'after');\n}\n/**\n * Checks whether the specified `element` is a child of the limit element.\n *\n * Checking whether the `<p>` element is inside a limit element:\n *   - `<$root><p>Text.</p></$root> => false`\n *   - `<$root><limitElement><p>Text</p></limitElement></$root> => true`\n */ function isInsideLimitElement(element, schema) {\n    // `$root` is a limit element but in this case is an invalid element.\n    if (element.is('rootElement')) {\n        return false;\n    }\n    return schema.isLimit(element) || isInsideLimitElement(element.parent, schema);\n}\n\n/**\n * This plugin handles the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke (soft line break) in the editor.\n *\n * See also the {@link module:enter/enter~Enter} plugin.\n *\n * For more information about this feature see the {@glink api/enter package page}.\n */ class ShiftEnter extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ShiftEnter';\n    }\n    init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const conversion = editor.conversion;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const t = this.editor.t;\n        // Configure the schema.\n        schema.register('softBreak', {\n            allowWhere: '$text',\n            isInline: true\n        });\n        // Configure converters.\n        conversion.for('upcast').elementToElement({\n            model: 'softBreak',\n            view: 'br'\n        });\n        conversion.for('downcast').elementToElement({\n            model: 'softBreak',\n            view: (modelElement, { writer })=>writer.createEmptyElement('br')\n        });\n        view.addObserver(EnterObserver);\n        editor.commands.add('shiftEnter', new ShiftEnterCommand(editor));\n        this.listenTo(viewDocument, 'enter', (evt, data)=>{\n            // When not in composition, we handle the action, so prevent the default one.\n            // When in composition, it's the browser who modify the DOM (renderer is disabled).\n            if (!viewDocument.isComposing) {\n                data.preventDefault();\n            }\n            // The hard enter key is handled by the Enter plugin.\n            if (!data.isSoft) {\n                return;\n            }\n            editor.execute('shiftEnter');\n            view.scrollToTheSelection();\n        }, {\n            priority: 'low'\n        });\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Insert a soft break (a <code>&lt;br&gt;</code> element)'),\n                    keystroke: 'Shift+Enter'\n                }\n            ]\n        });\n    }\n}\n\nexport { Enter, ShiftEnter };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Enter } from '@ckeditor/ckeditor5-enter/dist/index.js';\nimport { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * The block quote command plugin.\n *\n * @extends module:core/command~Command\n */ class BlockQuoteCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.value = this._getValue();\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Executes the command. When the command {@link #value is on}, all top-most block quotes within\n\t * the selection will be removed. If it is off, all selected blocks will be wrapped with\n\t * a block quote.\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,\n\t * otherwise the command will remove the block quote. If not set, the command will act basing on its current value.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const selection = model.document.selection;\n        const blocks = Array.from(selection.getSelectedBlocks());\n        const value = options.forceValue === undefined ? !this.value : options.forceValue;\n        model.change((writer)=>{\n            if (!value) {\n                this._removeQuote(writer, blocks.filter(findQuote));\n            } else {\n                const blocksToQuote = blocks.filter((block)=>{\n                    // Already quoted blocks needs to be considered while quoting too\n                    // in order to reuse their <bQ> elements.\n                    return findQuote(block) || checkCanBeQuoted(schema, block);\n                });\n                this._applyQuote(writer, blocksToQuote);\n            }\n        });\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t */ _getValue() {\n        const selection = this.editor.model.document.selection;\n        const firstBlock = first(selection.getSelectedBlocks());\n        // In the current implementation, the block quote must be an immediate parent of a block element.\n        return !!(firstBlock && findQuote(firstBlock));\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        if (this.value) {\n            return true;\n        }\n        const selection = this.editor.model.document.selection;\n        const schema = this.editor.model.schema;\n        const firstBlock = first(selection.getSelectedBlocks());\n        if (!firstBlock) {\n            return false;\n        }\n        return checkCanBeQuoted(schema, firstBlock);\n    }\n    /**\n\t * Removes the quote from given blocks.\n\t *\n\t * If blocks which are supposed to be \"unquoted\" are in the middle of a quote,\n\t * start it or end it, then the quote will be split (if needed) and the blocks\n\t * will be moved out of it, so other quoted blocks remained quoted.\n\t */ _removeQuote(writer, blocks) {\n        // Unquote all groups of block. Iterate in the reverse order to not break following ranges.\n        getRangesOfBlockGroups(writer, blocks).reverse().forEach((groupRange)=>{\n            if (groupRange.start.isAtStart && groupRange.end.isAtEnd) {\n                writer.unwrap(groupRange.start.parent);\n                return;\n            }\n            // The group of blocks are at the beginning of an <bQ> so let's move them left (out of the <bQ>).\n            if (groupRange.start.isAtStart) {\n                const positionBefore = writer.createPositionBefore(groupRange.start.parent);\n                writer.move(groupRange, positionBefore);\n                return;\n            }\n            // The blocks are in the middle of an <bQ> so we need to split the <bQ> after the last block\n            // so we move the items there.\n            if (!groupRange.end.isAtEnd) {\n                writer.split(groupRange.end);\n            }\n            // Now we are sure that groupRange.end.isAtEnd is true, so let's move the blocks right.\n            const positionAfter = writer.createPositionAfter(groupRange.end.parent);\n            writer.move(groupRange, positionAfter);\n        });\n    }\n    /**\n\t * Applies the quote to given blocks.\n\t */ _applyQuote(writer, blocks) {\n        const quotesToMerge = [];\n        // Quote all groups of block. Iterate in the reverse order to not break following ranges.\n        getRangesOfBlockGroups(writer, blocks).reverse().forEach((groupRange)=>{\n            let quote = findQuote(groupRange.start);\n            if (!quote) {\n                quote = writer.createElement('blockQuote');\n                writer.wrap(groupRange, quote);\n            }\n            quotesToMerge.push(quote);\n        });\n        // Merge subsequent <bQ> elements. Reverse the order again because this time we want to go through\n        // the <bQ> elements in the source order (due to how merge works – it moves the right element's content\n        // to the first element and removes the right one. Since we may need to merge a couple of subsequent `<bQ>` elements\n        // we want to keep the reference to the first (furthest left) one.\n        quotesToMerge.reverse().reduce((currentQuote, nextQuote)=>{\n            if (currentQuote.nextSibling == nextQuote) {\n                writer.merge(writer.createPositionAfter(currentQuote));\n                return currentQuote;\n            }\n            return nextQuote;\n        });\n    }\n}\nfunction findQuote(elementOrPosition) {\n    return elementOrPosition.parent.name == 'blockQuote' ? elementOrPosition.parent : null;\n}\n/**\n * Returns a minimal array of ranges containing groups of subsequent blocks.\n *\n * content:         abcdefgh\n * blocks:          [ a, b, d, f, g, h ]\n * output ranges:   [ab]c[d]e[fgh]\n */ function getRangesOfBlockGroups(writer, blocks) {\n    let startPosition;\n    let i = 0;\n    const ranges = [];\n    while(i < blocks.length){\n        const block = blocks[i];\n        const nextBlock = blocks[i + 1];\n        if (!startPosition) {\n            startPosition = writer.createPositionBefore(block);\n        }\n        if (!nextBlock || block.nextSibling != nextBlock) {\n            ranges.push(writer.createRange(startPosition, writer.createPositionAfter(block)));\n            startPosition = null;\n        }\n        i++;\n    }\n    return ranges;\n}\n/**\n * Checks whether <bQ> can wrap the block.\n */ function checkCanBeQuoted(schema, block) {\n    // TMP will be replaced with schema.checkWrap().\n    const isBQAllowed = schema.checkChild(block.parent, 'blockQuote');\n    const isBlockAllowedInBQ = schema.checkChild([\n        '$root',\n        'blockQuote'\n    ], block);\n    return isBQAllowed && isBlockAllowedInBQ;\n}\n\n/**\n * The block quote editing.\n *\n * Introduces the `'blockQuote'` command and the `'blockQuote'` model element.\n *\n * @extends module:core/plugin~Plugin\n */ class BlockQuoteEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'BlockQuoteEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Enter,\n            Delete\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        editor.commands.add('blockQuote', new BlockQuoteCommand(editor));\n        schema.register('blockQuote', {\n            inheritAllFrom: '$container'\n        });\n        editor.conversion.elementToElement({\n            model: 'blockQuote',\n            view: 'blockquote'\n        });\n        // Postfixer which cleans incorrect model states connected with block quotes.\n        editor.model.document.registerPostFixer((writer)=>{\n            const changes = editor.model.document.differ.getChanges();\n            for (const entry of changes){\n                if (entry.type == 'insert') {\n                    const element = entry.position.nodeAfter;\n                    if (!element) {\n                        continue;\n                    }\n                    if (element.is('element', 'blockQuote') && element.isEmpty) {\n                        // Added an empty blockQuote - remove it.\n                        writer.remove(element);\n                        return true;\n                    } else if (element.is('element', 'blockQuote') && !schema.checkChild(entry.position, element)) {\n                        // Added a blockQuote in incorrect place. Unwrap it so the content inside is not lost.\n                        writer.unwrap(element);\n                        return true;\n                    } else if (element.is('element')) {\n                        // Just added an element. Check that all children meet the scheme rules.\n                        const range = writer.createRangeIn(element);\n                        for (const child of range.getItems()){\n                            if (child.is('element', 'blockQuote') && !schema.checkChild(writer.createPositionBefore(child), child)) {\n                                writer.unwrap(child);\n                                return true;\n                            }\n                        }\n                    }\n                } else if (entry.type == 'remove') {\n                    const parent = entry.position.parent;\n                    if (parent.is('element', 'blockQuote') && parent.isEmpty) {\n                        // Something got removed and now blockQuote is empty. Remove the blockQuote as well.\n                        writer.remove(parent);\n                        return true;\n                    }\n                }\n            }\n            return false;\n        });\n        const viewDocument = this.editor.editing.view.document;\n        const selection = editor.model.document.selection;\n        const blockQuoteCommand = editor.commands.get('blockQuote');\n        // Overwrite default Enter key behavior.\n        // If Enter key is pressed with selection collapsed in empty block inside a quote, break the quote.\n        this.listenTo(viewDocument, 'enter', (evt, data)=>{\n            if (!selection.isCollapsed || !blockQuoteCommand.value) {\n                return;\n            }\n            const positionParent = selection.getLastPosition().parent;\n            if (positionParent.isEmpty) {\n                editor.execute('blockQuote');\n                editor.editing.view.scrollToTheSelection();\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: 'blockquote'\n        });\n        // Overwrite default Backspace key behavior.\n        // If Backspace key is pressed with selection collapsed in first empty block inside a quote, break the quote.\n        this.listenTo(viewDocument, 'delete', (evt, data)=>{\n            if (data.direction != 'backward' || !selection.isCollapsed || !blockQuoteCommand.value) {\n                return;\n            }\n            const positionParent = selection.getLastPosition().parent;\n            if (positionParent.isEmpty && !positionParent.previousSibling) {\n                editor.execute('blockQuote');\n                editor.editing.view.scrollToTheSelection();\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: 'blockquote'\n        });\n    }\n}\n\n/**\n * The block quote UI plugin.\n *\n * It introduces the `'blockQuote'` button.\n *\n * @extends module:core/plugin~Plugin\n */ class BlockQuoteUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'BlockQuoteUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        editor.ui.componentFactory.add('blockQuote', ()=>{\n            const buttonView = this._createButton(ButtonView);\n            buttonView.set({\n                tooltip: true\n            });\n            return buttonView;\n        });\n        editor.ui.componentFactory.add('menuBar:blockQuote', ()=>{\n            const buttonView = this._createButton(MenuBarMenuListItemButtonView);\n            buttonView.set({\n                role: 'menuitemcheckbox'\n            });\n            return buttonView;\n        });\n    }\n    /**\n\t * Creates a button for block quote command to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const command = editor.commands.get('blockQuote');\n        const view = new ButtonClass(editor.locale);\n        const t = locale.t;\n        view.set({\n            label: t('Block quote'),\n            icon: icons.quote,\n            isToggleable: true\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        view.bind('isOn').to(command, 'value');\n        // Execute the command.\n        this.listenTo(view, 'execute', ()=>{\n            editor.execute('blockQuote');\n            editor.editing.view.focus();\n        });\n        return view;\n    }\n}\n\n/**\n * The block quote plugin.\n *\n * For more information about this feature check the {@glink api/block-quote package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}\n * and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */ class BlockQuote extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            BlockQuoteEditing,\n            BlockQuoteUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'BlockQuote';\n    }\n}\n\nexport { BlockQuote, BlockQuoteEditing, BlockQuoteUI };\n//# sourceMappingURL=index.js.map\n","import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isObject from './isObject.js';\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\nexport default matchesStrictComparable;\n","import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\nexport default baseMatches;\n","import isStrictComparable from './_isStrictComparable.js';\nimport keys from './keys.js';\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\nexport default getMatchData;\n","import Stack from './_Stack.js';\nimport baseIsEqual from './_baseIsEqual.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nexport default baseIsMatch;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\nexport default baseHasIn;\n","import baseHasIn from './_baseHasIn.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\nexport default hasIn;\n","import castPath from './_castPath.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isIndex from './_isIndex.js';\nimport isLength from './isLength.js';\nimport toKey from './_toKey.js';\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      result = false;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result || ++index != length) {\n    return result;\n  }\n  length = object == null ? 0 : object.length;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\nexport default hasPath;\n","import baseProperty from './_baseProperty.js';\nimport basePropertyDeep from './_basePropertyDeep.js';\nimport isKey from './_isKey.js';\nimport toKey from './_toKey.js';\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nexport default property;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nexport default baseProperty;\n","import baseGet from './_baseGet.js';\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\nexport default basePropertyDeep;\n","import baseMatches from './_baseMatches.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport property from './property.js';\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\nexport default baseIteratee;\n","import baseIsEqual from './_baseIsEqual.js';\nimport get from './get.js';\nimport hasIn from './hasIn.js';\nimport isKey from './_isKey.js';\nimport isStrictComparable from './_isStrictComparable.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\nimport toKey from './_toKey.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n  };\n}\n\nexport default baseMatchesProperty;\n","import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n *   'fred':    { 'user': 'fred',    'age': 40 },\n *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n  var result = {};\n  iteratee = baseIteratee(iteratee, 3);\n\n  baseForOwn(object, function(value, key, object) {\n    baseAssignValue(result, key, iteratee(value, key, object));\n  });\n  return result;\n}\n\nexport default mapValues;\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { MouseObserver, TreeWalker } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { EmitterMixin, CKEditorError, Rect, toArray, isForwardArrowKeyCode, env, keyCodes, getLocalizedArrowKeyCodeDirection, getRangeFromMouseEvent, logWarning, ObservableMixin, compareArrays, global, DomEmitterMixin } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { IconView, Template, ContextualBalloon, ToolbarView, BalloonPanelView, View } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { Enter } from '@ckeditor/ckeditor5-enter/dist/index.js';\nimport { throttle } from 'lodash-es';\n\n/**\n * Class used to handle the correct order of highlights on elements.\n *\n * When different highlights are applied to same element the correct order should be preserved:\n *\n * * highlight with highest priority should be applied,\n * * if two highlights have same priority - sort by CSS class provided in\n * {@link module:engine/conversion/downcasthelpers~HighlightDescriptor}.\n *\n * This way, highlight will be applied with the same rules it is applied on texts.\n */ class HighlightStack extends /* #__PURE__ */ EmitterMixin() {\n    _stack = [];\n    /**\n\t * Adds highlight descriptor to the stack.\n\t *\n\t * @fires change:top\n\t */ add(descriptor, writer) {\n        const stack = this._stack;\n        // Save top descriptor and insert new one. If top is changed - fire event.\n        const oldTop = stack[0];\n        this._insertDescriptor(descriptor);\n        const newTop = stack[0];\n        // When new object is at the top and stores different information.\n        if (oldTop !== newTop && !compareDescriptors(oldTop, newTop)) {\n            this.fire('change:top', {\n                oldDescriptor: oldTop,\n                newDescriptor: newTop,\n                writer\n            });\n        }\n    }\n    /**\n\t * Removes highlight descriptor from the stack.\n\t *\n\t * @fires change:top\n\t * @param id Id of the descriptor to remove.\n\t */ remove(id, writer) {\n        const stack = this._stack;\n        const oldTop = stack[0];\n        this._removeDescriptor(id);\n        const newTop = stack[0];\n        // When new object is at the top and stores different information.\n        if (oldTop !== newTop && !compareDescriptors(oldTop, newTop)) {\n            this.fire('change:top', {\n                oldDescriptor: oldTop,\n                newDescriptor: newTop,\n                writer\n            });\n        }\n    }\n    /**\n\t * Inserts a given descriptor in correct place in the stack. It also takes care about updating information\n\t * when descriptor with same id is already present.\n\t */ _insertDescriptor(descriptor) {\n        const stack = this._stack;\n        const index = stack.findIndex((item)=>item.id === descriptor.id);\n        // Inserting exact same descriptor - do nothing.\n        if (compareDescriptors(descriptor, stack[index])) {\n            return;\n        }\n        // If descriptor with same id but with different information is on the stack - remove it.\n        if (index > -1) {\n            stack.splice(index, 1);\n        }\n        // Find correct place to insert descriptor in the stack.\n        // It has different information (for example priority) so it must be re-inserted in correct place.\n        let i = 0;\n        while(stack[i] && shouldABeBeforeB(stack[i], descriptor)){\n            i++;\n        }\n        stack.splice(i, 0, descriptor);\n    }\n    /**\n\t * Removes descriptor with given id from the stack.\n\t *\n\t * @param id Descriptor's id.\n\t */ _removeDescriptor(id) {\n        const stack = this._stack;\n        const index = stack.findIndex((item)=>item.id === id);\n        // If descriptor with same id is on the list - remove it.\n        if (index > -1) {\n            stack.splice(index, 1);\n        }\n    }\n}\n/**\n * Compares two descriptors by checking their priority and class list.\n *\n * @returns Returns true if both descriptors are defined and have same priority and classes.\n */ function compareDescriptors(a, b) {\n    return a && b && a.priority == b.priority && classesToString(a.classes) == classesToString(b.classes);\n}\n/**\n * Checks whenever first descriptor should be placed in the stack before second one.\n */ function shouldABeBeforeB(a, b) {\n    if (a.priority > b.priority) {\n        return true;\n    } else if (a.priority < b.priority) {\n        return false;\n    }\n    // When priorities are equal and names are different - use classes to compare.\n    return classesToString(a.classes) > classesToString(b.classes);\n}\n/**\n * Converts CSS classes passed with {@link module:engine/conversion/downcasthelpers~HighlightDescriptor} to\n * sorted string.\n */ function classesToString(classes) {\n    return Array.isArray(classes) ? classes.sort().join(',') : classes;\n}\n\nvar dragHandleIcon = \"<svg viewBox=\\\"0 0 16 16\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z\\\"/><path fill-opacity=\\\".256\\\" d=\\\"M1 1h14v14H1z\\\"/><g class=\\\"ck-icon__selected-indicator\\\"><path d=\\\"M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z\\\"/><path fill-opacity=\\\".254\\\" d=\\\"M1 1h14v14H1z\\\"/></g></svg>\";\n\n/**\n * CSS class added to each widget element.\n */ const WIDGET_CLASS_NAME = 'ck-widget';\n/**\n * CSS class added to currently selected widget element.\n */ const WIDGET_SELECTED_CLASS_NAME = 'ck-widget_selected';\n/**\n * Returns `true` if given {@link module:engine/view/node~Node} is an {@link module:engine/view/element~Element} and a widget.\n */ function isWidget(node) {\n    if (!node.is('element')) {\n        return false;\n    }\n    return !!node.getCustomProperty('widget');\n}\n/**\n * Converts the given {@link module:engine/view/element~Element} to a widget in the following way:\n *\n * * sets the `contenteditable` attribute to `\"false\"`,\n * * adds the `ck-widget` CSS class,\n * * adds a custom {@link module:engine/view/element~Element#getFillerOffset `getFillerOffset()`} method returning `null`,\n * * adds a custom property allowing to recognize widget elements by using {@link ~isWidget `isWidget()`},\n * * implements the {@link ~setHighlightHandling view highlight on widgets}.\n *\n * This function needs to be used in conjunction with\n * {@link module:engine/conversion/downcasthelpers~DowncastHelpers downcast conversion helpers}\n * like {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n * Moreover, typically you will want to use `toWidget()` only for `editingDowncast`, while keeping the `dataDowncast` clean.\n *\n * For example, in order to convert a `<widget>` model element to `<div class=\"widget\">` in the view, you can define\n * such converters:\n *\n * ```ts\n * editor.conversion.for( 'editingDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'widget',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\tconst div = writer.createContainerElement( 'div', { class: 'widget' } );\n *\n * \t\t\treturn toWidget( div, writer, { label: 'some widget' } );\n * \t\t}\n * \t} );\n *\n * editor.conversion.for( 'dataDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'widget',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\treturn writer.createContainerElement( 'div', { class: 'widget' } );\n * \t\t}\n * \t} );\n * ```\n *\n * See the full source code of the widget (with a nested editable) schema definition and converters in\n * [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n *\n * @param options Additional options.\n * @param options.label Element's label provided to the {@link ~setLabel} function. It can be passed as\n * a plain string or a function returning a string. It represents the widget for assistive technologies (like screen readers).\n * @param options.hasSelectionHandle If `true`, the widget will have a selection handle added.\n * @returns Returns the same element.\n */ function toWidget(element, writer, options = {}) {\n    if (!element.is('containerElement')) {\n        /**\n\t\t * The element passed to `toWidget()` must be a {@link module:engine/view/containerelement~ContainerElement}\n\t\t * instance.\n\t\t *\n\t\t * @error widget-to-widget-wrong-element-type\n\t\t * @param element The view element passed to `toWidget()`.\n\t\t */ throw new CKEditorError('widget-to-widget-wrong-element-type', null, {\n            element\n        });\n    }\n    writer.setAttribute('contenteditable', 'false', element);\n    writer.addClass(WIDGET_CLASS_NAME, element);\n    writer.setCustomProperty('widget', true, element);\n    element.getFillerOffset = getFillerOffset;\n    writer.setCustomProperty('widgetLabel', [], element);\n    if (options.label) {\n        setLabel(element, options.label);\n    }\n    if (options.hasSelectionHandle) {\n        addSelectionHandle(element, writer);\n    }\n    setHighlightHandling(element, writer);\n    return element;\n}\n/**\n * Default handler for adding a highlight on a widget.\n * It adds CSS class and attributes basing on the given highlight descriptor.\n */ function addHighlight(element, descriptor, writer) {\n    if (descriptor.classes) {\n        writer.addClass(toArray(descriptor.classes), element);\n    }\n    if (descriptor.attributes) {\n        for(const key in descriptor.attributes){\n            writer.setAttribute(key, descriptor.attributes[key], element);\n        }\n    }\n}\n/**\n * Default handler for removing a highlight from a widget.\n * It removes CSS class and attributes basing on the given highlight descriptor.\n */ function removeHighlight(element, descriptor, writer) {\n    if (descriptor.classes) {\n        writer.removeClass(toArray(descriptor.classes), element);\n    }\n    if (descriptor.attributes) {\n        for(const key in descriptor.attributes){\n            writer.removeAttribute(key, element);\n        }\n    }\n}\n/**\n * Sets highlight handling methods. Uses {@link module:widget/highlightstack~HighlightStack} to\n * properly determine which highlight descriptor should be used at given time.\n */ function setHighlightHandling(element, writer, add = addHighlight, remove = removeHighlight) {\n    const stack = new HighlightStack();\n    stack.on('change:top', (evt, data)=>{\n        if (data.oldDescriptor) {\n            remove(element, data.oldDescriptor, data.writer);\n        }\n        if (data.newDescriptor) {\n            add(element, data.newDescriptor, data.writer);\n        }\n    });\n    const addHighlightCallback = (element, descriptor, writer)=>stack.add(descriptor, writer);\n    const removeHighlightCallback = (element, id, writer)=>stack.remove(id, writer);\n    writer.setCustomProperty('addHighlight', addHighlightCallback, element);\n    writer.setCustomProperty('removeHighlight', removeHighlightCallback, element);\n}\n/**\n * Sets label for given element.\n * It can be passed as a plain string or a function returning a string. Function will be called each time label is retrieved by\n * {@link ~getLabel `getLabel()`}.\n */ function setLabel(element, labelOrCreator) {\n    const widgetLabel = element.getCustomProperty('widgetLabel');\n    widgetLabel.push(labelOrCreator);\n}\n/**\n * Returns the label of the provided element.\n */ function getLabel(element) {\n    const widgetLabel = element.getCustomProperty('widgetLabel');\n    return widgetLabel.reduce((prev, current)=>{\n        if (typeof current === 'function') {\n            return prev ? prev + '. ' + current() : current();\n        } else {\n            return prev ? prev + '. ' + current : current;\n        }\n    }, '');\n}\n/**\n * Adds functionality to the provided {@link module:engine/view/editableelement~EditableElement} to act as a widget's editable:\n *\n * * sets the `contenteditable` attribute to `true` when {@link module:engine/view/editableelement~EditableElement#isReadOnly} is `false`,\n * otherwise sets it to `false`,\n * * adds the `ck-editor__editable` and `ck-editor__nested-editable` CSS classes,\n * * adds the `ck-editor__nested-editable_focused` CSS class when the editable is focused and removes it when it is blurred.\n * * implements the {@link ~setHighlightHandling view highlight on widget's editable}.\n *\n * Similarly to {@link ~toWidget `toWidget()`} this function should be used in `editingDowncast` only and it is usually\n * used together with {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n *\n * For example, in order to convert a `<nested>` model element to `<div class=\"nested\">` in the view, you can define\n * such converters:\n *\n * ```ts\n * editor.conversion.for( 'editingDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'nested',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\tconst div = writer.createEditableElement( 'div', { class: 'nested' } );\n *\n * \t\t\treturn toWidgetEditable( nested, writer, { label: 'label for editable' } );\n * \t\t}\n * \t} );\n *\n * editor.conversion.for( 'dataDowncast' )\n * \t.elementToElement( {\n * \t\tmodel: 'nested',\n * \t\tview: ( modelItem, { writer } ) => {\n * \t\t\treturn writer.createContainerElement( 'div', { class: 'nested' } );\n * \t\t}\n * \t} );\n * ```\n *\n * See the full source code of the widget (with nested editable) schema definition and converters in\n * [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n *\n * @param options Additional options.\n * @param options.label Editable's label used by assistive technologies (e.g. screen readers).\n * @returns Returns the same element that was provided in the `editable` parameter\n */ function toWidgetEditable(editable, writer, options = {}) {\n    writer.addClass([\n        'ck-editor__editable',\n        'ck-editor__nested-editable'\n    ], editable);\n    writer.setAttribute('role', 'textbox', editable);\n    writer.setAttribute('tabindex', '-1', editable);\n    if (options.label) {\n        writer.setAttribute('aria-label', options.label, editable);\n    }\n    // Set initial contenteditable value.\n    writer.setAttribute('contenteditable', editable.isReadOnly ? 'false' : 'true', editable);\n    // Bind the contenteditable property to element#isReadOnly.\n    editable.on('change:isReadOnly', (evt, property, is)=>{\n        writer.setAttribute('contenteditable', is ? 'false' : 'true', editable);\n    });\n    editable.on('change:isFocused', (evt, property, is)=>{\n        if (is) {\n            writer.addClass('ck-editor__nested-editable_focused', editable);\n        } else {\n            writer.removeClass('ck-editor__nested-editable_focused', editable);\n        }\n    });\n    setHighlightHandling(editable, writer);\n    return editable;\n}\n/**\n * Returns a model range which is optimal (in terms of UX) for inserting a widget block.\n *\n * For instance, if a selection is in the middle of a paragraph, the collapsed range before this paragraph\n * will be returned so that it is not split. If the selection is at the end of a paragraph,\n * the collapsed range after this paragraph will be returned.\n *\n * Note: If the selection is placed in an empty block, the range in that block will be returned. If that range\n * is then passed to {@link module:engine/model/model~Model#insertContent}, the block will be fully replaced\n * by the inserted widget block.\n *\n * @param selection The selection based on which the insertion position should be calculated.\n * @param model Model instance.\n * @returns The optimal range.\n */ function findOptimalInsertionRange(selection, model) {\n    const selectedElement = selection.getSelectedElement();\n    if (selectedElement) {\n        const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(selection);\n        // If the WidgetTypeAround \"fake caret\" is displayed, use its position for the insertion\n        // to provide the most predictable UX (https://github.com/ckeditor/ckeditor5/issues/7438).\n        if (typeAroundFakeCaretPosition) {\n            return model.createRange(model.createPositionAt(selectedElement, typeAroundFakeCaretPosition));\n        }\n    }\n    return model.schema.findOptimalInsertionRange(selection);\n}\n/**\n * A util to be used in order to map view positions to correct model positions when implementing a widget\n * which renders non-empty view element for an empty model element.\n *\n * For example:\n *\n * ```\n * // Model:\n * <placeholder type=\"name\"></placeholder>\n *\n * // View:\n * <span class=\"placeholder\">name</span>\n * ```\n *\n * In such case, view positions inside `<span>` cannot be correctly mapped to the model (because the model element is empty).\n * To handle mapping positions inside `<span class=\"placeholder\">` to the model use this util as follows:\n *\n * ```ts\n * editor.editing.mapper.on(\n * \t'viewToModelPosition',\n * \tviewToModelPositionOutsideModelElement( model, viewElement => viewElement.hasClass( 'placeholder' ) )\n * );\n * ```\n *\n * The callback will try to map the view offset of selection to an expected model position.\n *\n * 1. When the position is at the end (or in the middle) of the inline widget:\n *\n * ```\n * // View:\n * <p>foo <span class=\"placeholder\">name|</span> bar</p>\n *\n * // Model:\n * <paragraph>foo <placeholder type=\"name\"></placeholder>| bar</paragraph>\n * ```\n *\n * 2. When the position is at the beginning of the inline widget:\n *\n * ```\n * // View:\n * <p>foo <span class=\"placeholder\">|name</span> bar</p>\n *\n * // Model:\n * <paragraph>foo |<placeholder type=\"name\"></placeholder> bar</paragraph>\n * ```\n *\n * @param model Model instance on which the callback operates.\n * @param viewElementMatcher Function that is passed a view element and should return `true` if the custom mapping\n * should be applied to the given view element.\n */ function viewToModelPositionOutsideModelElement(model, viewElementMatcher) {\n    return (evt, data)=>{\n        const { mapper, viewPosition } = data;\n        const viewParent = mapper.findMappedViewAncestor(viewPosition);\n        if (!viewElementMatcher(viewParent)) {\n            return;\n        }\n        const modelParent = mapper.toModelElement(viewParent);\n        data.modelPosition = model.createPositionAt(modelParent, viewPosition.isAtStart ? 'before' : 'after');\n    };\n}\n/**\n * Default filler offset function applied to all widget elements.\n */ function getFillerOffset() {\n    return null;\n}\n/**\n * Adds a drag handle to the widget.\n */ function addSelectionHandle(widgetElement, writer) {\n    const selectionHandle = writer.createUIElement('div', {\n        class: 'ck ck-widget__selection-handle'\n    }, function(domDocument) {\n        const domElement = this.toDomElement(domDocument);\n        // Use the IconView from the ui library.\n        const icon = new IconView();\n        icon.set('content', dragHandleIcon);\n        // Render the icon view right away to append its #element to the selectionHandle DOM element.\n        icon.render();\n        domElement.appendChild(icon.element);\n        return domElement;\n    });\n    // Append the selection handle into the widget wrapper.\n    writer.insert(writer.createPositionAt(widgetElement, 0), selectionHandle);\n    writer.addClass([\n        'ck-widget_with-selection-handle'\n    ], widgetElement);\n}\n/**\n * Starting from a DOM resize host element (an element that receives dimensions as a result of resizing),\n * this helper returns the width of the found ancestor element.\n *\n *\t* It searches up to 5 levels of ancestors only.\n *\n * @param domResizeHost Resize host DOM element that receives dimensions as a result of resizing.\n * @returns Width of ancestor element in pixels or 0 if no ancestor with a computed width has been found.\n */ function calculateResizeHostAncestorWidth(domResizeHost) {\n    const getElementComputedWidth = (element)=>{\n        const { width, paddingLeft, paddingRight } = element.ownerDocument.defaultView.getComputedStyle(element);\n        return parseFloat(width) - (parseFloat(paddingLeft) || 0) - (parseFloat(paddingRight) || 0);\n    };\n    const domResizeHostParent = domResizeHost.parentElement;\n    if (!domResizeHostParent) {\n        return 0;\n    }\n    // Need to use computed style as it properly excludes parent's paddings from the returned value.\n    let parentWidth = getElementComputedWidth(domResizeHostParent);\n    // Sometimes parent width cannot be accessed. If that happens we should go up in the elements tree\n    // and try to get width from next ancestor.\n    // https://github.com/ckeditor/ckeditor5/issues/10776\n    const ancestorLevelLimit = 5;\n    let currentLevel = 0;\n    let checkedElement = domResizeHostParent;\n    while(isNaN(parentWidth)){\n        checkedElement = checkedElement.parentElement;\n        if (++currentLevel > ancestorLevelLimit) {\n            return 0;\n        }\n        parentWidth = getElementComputedWidth(checkedElement);\n    }\n    return parentWidth;\n}\n/**\n * Calculates a relative width of a `domResizeHost` compared to its ancestor in percents.\n *\n * @param domResizeHost Resize host DOM element.\n * @returns Percentage value between 0 and 100.\n */ function calculateResizeHostPercentageWidth(domResizeHost, resizeHostRect = new Rect(domResizeHost)) {\n    const parentWidth = calculateResizeHostAncestorWidth(domResizeHost);\n    if (!parentWidth) {\n        return 0;\n    }\n    return resizeHostRect.width / parentWidth * 100;\n}\n\n/**\n * The name of the type around model selection attribute responsible for\n * displaying a fake caret next to a selected widget.\n */ const TYPE_AROUND_SELECTION_ATTRIBUTE = 'widget-type-around';\n/**\n * Checks if an element is a widget that qualifies to get the widget type around UI.\n */ function isTypeAroundWidget(viewElement, modelElement, schema) {\n    return !!viewElement && isWidget(viewElement) && !schema.isInline(modelElement);\n}\n/**\n * For the passed HTML element, this helper finds the closest widget type around button ancestor.\n */ function getClosestTypeAroundDomButton(domElement) {\n    return domElement.closest('.ck-widget__type-around__button');\n}\n/**\n * For the passed widget type around button element, this helper determines at which position\n * the paragraph would be inserted into the content if, for instance, the button was\n * clicked by the user.\n *\n * @returns The position of the button.\n */ function getTypeAroundButtonPosition(domElement) {\n    return domElement.classList.contains('ck-widget__type-around__button_before') ? 'before' : 'after';\n}\n/**\n * For the passed HTML element, this helper returns the closest view widget ancestor.\n */ function getClosestWidgetViewElement(domElement, domConverter) {\n    const widgetDomElement = domElement.closest('.ck-widget');\n    return domConverter.mapDomToView(widgetDomElement);\n}\n/**\n * For the passed selection instance, it returns the position of the fake caret displayed next to a widget.\n *\n * **Note**: If the fake caret is not currently displayed, `null` is returned.\n *\n * @returns The position of the fake caret or `null` when none is present.\n */ function getTypeAroundFakeCaretPosition(selection) {\n    return selection.getAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n}\n\nvar returnIcon = \"<svg viewBox=\\\"0 0 10 8\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038\\\"/></svg>\";\n\nconst POSSIBLE_INSERTION_POSITIONS = [\n    'before',\n    'after'\n];\n// Do the SVG parsing once and then clone the result <svg> DOM element for each new button.\nconst RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(returnIcon, 'image/svg+xml').firstChild;\nconst PLUGIN_DISABLED_EDITING_ROOT_CLASS = 'ck-widget__type-around_disabled';\n/**\n * A plugin that allows users to type around widgets where normally it is impossible to place the caret due\n * to limitations of web browsers. These \"tight spots\" occur, for instance, before (or after) a widget being\n * the first (or last) child of its parent or between two block widgets.\n *\n * This plugin extends the {@link module:widget/widget~Widget `Widget`} plugin and injects the user interface\n * with two buttons into each widget instance in the editor. Each of the buttons can be clicked by the\n * user if the widget is next to the \"tight spot\". Once clicked, a paragraph is created with the selection anchored\n * in it so that users can type (or insert content, paste, etc.) straight away.\n */ class WidgetTypeAround extends Plugin {\n    /**\n\t * A reference to the model widget element that has the fake caret active\n\t * on either side of it. It is later used to remove CSS classes associated with the fake caret\n\t * when the widget no longer needs it.\n\t */ _currentFakeCaretModelElement = null;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'WidgetTypeAround';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Enter,\n            Delete\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        // Set a CSS class on the view editing root when the plugin is disabled so all the buttons\n        // and lines visually disappear. All the interactions are disabled in individual plugin methods.\n        this.on('change:isEnabled', (evt, data, isEnabled)=>{\n            editingView.change((writer)=>{\n                for (const root of editingView.document.roots){\n                    if (isEnabled) {\n                        writer.removeClass(PLUGIN_DISABLED_EDITING_ROOT_CLASS, root);\n                    } else {\n                        writer.addClass(PLUGIN_DISABLED_EDITING_ROOT_CLASS, root);\n                    }\n                }\n            });\n            if (!isEnabled) {\n                editor.model.change((writer)=>{\n                    writer.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n                });\n            }\n        });\n        this._enableTypeAroundUIInjection();\n        this._enableInsertingParagraphsOnButtonClick();\n        this._enableInsertingParagraphsOnEnterKeypress();\n        this._enableInsertingParagraphsOnTypingKeystroke();\n        this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows();\n        this._enableDeleteIntegration();\n        this._enableInsertContentIntegration();\n        this._enableInsertObjectIntegration();\n        this._enableDeleteContentIntegration();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this._currentFakeCaretModelElement = null;\n    }\n    /**\n\t * Inserts a new paragraph next to a widget element with the selection anchored in it.\n\t *\n\t * **Note**: This method is heavily user-oriented and will both focus the editing view and scroll\n\t * the viewport to the selection in the inserted paragraph.\n\t *\n\t * @param widgetModelElement The model widget element next to which a paragraph is inserted.\n\t * @param position The position where the paragraph is inserted. Either `'before'` or `'after'` the widget.\n\t */ _insertParagraph(widgetModelElement, position) {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const attributesToCopy = editor.model.schema.getAttributesWithProperty(widgetModelElement, 'copyOnReplace', true);\n        editor.execute('insertParagraph', {\n            position: editor.model.createPositionAt(widgetModelElement, position),\n            attributes: attributesToCopy\n        });\n        editingView.focus();\n        editingView.scrollToTheSelection();\n    }\n    /**\n\t * A wrapper for the {@link module:utils/emittermixin~Emitter#listenTo} method that executes the callbacks only\n\t * when the plugin {@link #isEnabled is enabled}.\n\t *\n\t * @param emitter The object that fires the event.\n\t * @param event The name of the event.\n\t * @param callback The function to be called on event.\n\t * @param options Additional options.\n\t * @param options.priority The priority of this event callback. The higher the priority value the sooner\n\t * the callback will be fired. Events having the same priority are called in the order they were added.\n\t */ _listenToIfEnabled(emitter, event, callback, options) {\n        this.listenTo(emitter, event, (...args)=>{\n            // Do not respond if the plugin is disabled.\n            if (this.isEnabled) {\n                callback(...args);\n            }\n        }, options);\n    }\n    /**\n\t * Similar to {@link #_insertParagraph}, this method inserts a paragraph except that it\n\t * does not expect a position. Instead, it performs the insertion next to a selected widget\n\t * according to the `widget-type-around` model selection attribute value (fake caret position).\n\t *\n\t * Because this method requires the `widget-type-around` attribute to be set,\n\t * the insertion can only happen when the widget's fake caret is active (e.g. activated\n\t * using the keyboard).\n\t *\n\t * @returns Returns `true` when the paragraph was inserted (the attribute was present) and `false` otherwise.\n\t */ _insertParagraphAccordingToFakeCaretPosition() {\n        const editor = this.editor;\n        const model = editor.model;\n        const modelSelection = model.document.selection;\n        const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n        if (!typeAroundFakeCaretPosition) {\n            return false;\n        }\n        // @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n        // @if CK_DEBUG_TYPING // \tconsole.info( '%c[WidgetTypeAround]%c Fake caret -> insert paragraph',\n        // @if CK_DEBUG_TYPING // \t\t'font-weight: bold; color: green', ''\n        // @if CK_DEBUG_TYPING // \t);\n        // @if CK_DEBUG_TYPING // }\n        const selectedModelElement = modelSelection.getSelectedElement();\n        this._insertParagraph(selectedModelElement, typeAroundFakeCaretPosition);\n        return true;\n    }\n    /**\n\t * Creates a listener in the editing conversion pipeline that injects the widget type around\n\t * UI into every single widget instance created in the editor.\n\t *\n\t * The UI is delivered as a {@link module:engine/view/uielement~UIElement}\n\t * wrapper which renders DOM buttons that users can use to insert paragraphs.\n\t */ _enableTypeAroundUIInjection() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const t = editor.locale.t;\n        const buttonTitles = {\n            before: t('Insert paragraph before block'),\n            after: t('Insert paragraph after block')\n        };\n        editor.editing.downcastDispatcher.on('insert', (evt, data, conversionApi)=>{\n            const viewElement = conversionApi.mapper.toViewElement(data.item);\n            if (!viewElement) {\n                return;\n            }\n            // Filter out non-widgets and inline widgets.\n            if (isTypeAroundWidget(viewElement, data.item, schema)) {\n                injectUIIntoWidget(conversionApi.writer, buttonTitles, viewElement);\n                const widgetLabel = viewElement.getCustomProperty('widgetLabel');\n                widgetLabel.push(()=>{\n                    return this.isEnabled ? t('Press Enter to type after or press Shift + Enter to type before the widget') : '';\n                });\n            }\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * Brings support for the fake caret that appears when either:\n\t *\n\t * * the selection moves to a widget from a position next to it using arrow keys,\n\t * * the arrow key is pressed when the widget is already selected.\n\t *\n\t * The fake caret lets the user know that they can start typing or just press\n\t * <kbd>Enter</kbd> to insert a paragraph at the position next to a widget as suggested by the fake caret.\n\t *\n\t * The fake caret disappears when the user changes the selection or the editor\n\t * gets blurred.\n\t *\n\t * The whole idea is as follows:\n\t *\n\t * 1. A user does one of the 2 scenarios described at the beginning.\n\t * 2. The \"keydown\" listener is executed and the decision is made whether to show or hide the fake caret.\n\t * 3. If it should show up, the `widget-type-around` model selection attribute is set indicating\n\t *    on which side of the widget it should appear.\n\t * 4. The selection dispatcher reacts to the selection attribute and sets CSS classes responsible for the\n\t *    fake caret on the view widget.\n\t * 5. If the fake caret should disappear, the selection attribute is removed and the dispatcher\n\t *    does the CSS class clean-up in the view.\n\t * 6. Additionally, `change:range` and `FocusTracker#isFocused` listeners also remove the selection\n\t *    attribute (the former also removes widget CSS classes).\n\t */ _enableTypeAroundFakeCaretActivationUsingKeyboardArrows() {\n        const editor = this.editor;\n        const model = editor.model;\n        const modelSelection = model.document.selection;\n        const schema = model.schema;\n        const editingView = editor.editing.view;\n        // This is the main listener responsible for the fake caret.\n        // Note: The priority must precede the default Widget class keydown handler (\"high\").\n        this._listenToIfEnabled(editingView.document, 'arrowKey', (evt, domEventData)=>{\n            this._handleArrowKeyPress(evt, domEventData);\n        }, {\n            context: [\n                isWidget,\n                '$text'\n            ],\n            priority: 'high'\n        });\n        // This listener makes sure the widget type around selection attribute will be gone from the model\n        // selection as soon as the model range changes. This attribute only makes sense when a widget is selected\n        // (and the \"fake horizontal caret\" is visible) so whenever the range changes (e.g. selection moved somewhere else),\n        // let's get rid of the attribute so that the selection downcast dispatcher isn't even bothered.\n        this._listenToIfEnabled(modelSelection, 'change:range', (evt, data)=>{\n            // Do not reset the selection attribute when the change was indirect.\n            if (!data.directChange) {\n                return;\n            }\n            // Get rid of the widget type around attribute of the selection on every change:range.\n            // If the range changes, it means for sure, the user is no longer in the active (\"fake horizontal caret\") mode.\n            editor.model.change((writer)=>{\n                writer.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n            });\n        });\n        // Get rid of the widget type around attribute of the selection on every document change\n        // that makes widget not selected any more (i.e. widget was removed).\n        this._listenToIfEnabled(model.document, 'change:data', ()=>{\n            const selectedModelElement = modelSelection.getSelectedElement();\n            if (selectedModelElement) {\n                const selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n                if (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) {\n                    return;\n                }\n            }\n            editor.model.change((writer)=>{\n                writer.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n            });\n        });\n        // React to changes of the model selection attribute made by the arrow keys listener.\n        // If the block widget is selected and the attribute changes, downcast the attribute to special\n        // CSS classes associated with the active (\"fake horizontal caret\") mode of the widget.\n        this._listenToIfEnabled(editor.editing.downcastDispatcher, 'selection', (evt, data, conversionApi)=>{\n            const writer = conversionApi.writer;\n            if (this._currentFakeCaretModelElement) {\n                const selectedViewElement = conversionApi.mapper.toViewElement(this._currentFakeCaretModelElement);\n                if (selectedViewElement) {\n                    // Get rid of CSS classes associated with the active (\"fake horizontal caret\") mode from the view widget.\n                    writer.removeClass(POSSIBLE_INSERTION_POSITIONS.map(positionToWidgetCssClass), selectedViewElement);\n                    this._currentFakeCaretModelElement = null;\n                }\n            }\n            const selectedModelElement = data.selection.getSelectedElement();\n            if (!selectedModelElement) {\n                return;\n            }\n            const selectedViewElement = conversionApi.mapper.toViewElement(selectedModelElement);\n            if (!isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) {\n                return;\n            }\n            const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(data.selection);\n            if (!typeAroundFakeCaretPosition) {\n                return;\n            }\n            writer.addClass(positionToWidgetCssClass(typeAroundFakeCaretPosition), selectedViewElement);\n            // Remember the view widget that got the \"fake-caret\" CSS class. This class should be removed ASAP when the\n            // selection changes\n            this._currentFakeCaretModelElement = selectedModelElement;\n        });\n        this._listenToIfEnabled(editor.ui.focusTracker, 'change:isFocused', (evt, name, isFocused)=>{\n            if (!isFocused) {\n                editor.model.change((writer)=>{\n                    writer.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n                });\n            }\n        });\n        function positionToWidgetCssClass(position) {\n            return `ck-widget_type-around_show-fake-caret_${position}`;\n        }\n    }\n    /**\n\t * A listener executed on each \"keydown\" in the view document, a part of\n\t * {@link #_enableTypeAroundFakeCaretActivationUsingKeyboardArrows}.\n\t *\n\t * It decides whether the arrow keypress should activate the fake caret or not (also whether it should\n\t * be deactivated).\n\t *\n\t * The fake caret activation is done by setting the `widget-type-around` model selection attribute\n\t * in this listener, and stopping and preventing the event that would normally be handled by the widget\n\t * plugin that is responsible for the regular keyboard navigation near/across all widgets (that\n\t * includes inline widgets, which are ignored by the widget type around plugin).\n\t */ _handleArrowKeyPress(evt, domEventData) {\n        const editor = this.editor;\n        const model = editor.model;\n        const modelSelection = model.document.selection;\n        const schema = model.schema;\n        const editingView = editor.editing.view;\n        const keyCode = domEventData.keyCode;\n        const isForward = isForwardArrowKeyCode(keyCode, editor.locale.contentLanguageDirection);\n        const selectedViewElement = editingView.document.selection.getSelectedElement();\n        const selectedModelElement = editor.editing.mapper.toModelElement(selectedViewElement);\n        let shouldStopAndPreventDefault;\n        // Handle keyboard navigation when a type-around-compatible widget is currently selected.\n        if (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) {\n            shouldStopAndPreventDefault = this._handleArrowKeyPressOnSelectedWidget(isForward);\n        } else if (modelSelection.isCollapsed) {\n            shouldStopAndPreventDefault = this._handleArrowKeyPressWhenSelectionNextToAWidget(isForward);\n        } else if (!domEventData.shiftKey) {\n            shouldStopAndPreventDefault = this._handleArrowKeyPressWhenNonCollapsedSelection(isForward);\n        }\n        if (shouldStopAndPreventDefault) {\n            domEventData.preventDefault();\n            evt.stop();\n        }\n    }\n    /**\n\t * Handles the keyboard navigation on \"keydown\" when a widget is currently selected and activates or deactivates\n\t * the fake caret for that widget, depending on the current value of the `widget-type-around` model\n\t * selection attribute and the direction of the pressed arrow key.\n\t *\n\t * @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t * as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t * @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t * process the event any further. Returns `false` otherwise.\n\t */ _handleArrowKeyPressOnSelectedWidget(isForward) {\n        const editor = this.editor;\n        const model = editor.model;\n        const modelSelection = model.document.selection;\n        const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n        return model.change((writer)=>{\n            // If the fake caret is displayed...\n            if (typeAroundFakeCaretPosition) {\n                const isLeavingWidget = typeAroundFakeCaretPosition === (isForward ? 'after' : 'before');\n                // If the keyboard arrow works against the value of the selection attribute...\n                // then remove the selection attribute but prevent default DOM actions\n                // and do not let the Widget plugin listener move the selection. This brings\n                // the widget back to the state, for instance, like if was selected using the mouse.\n                //\n                // **Note**: If leaving the widget when the fake caret is active, then the default\n                // Widget handler will change the selection and, in turn, this will automatically discard\n                // the selection attribute.\n                if (!isLeavingWidget) {\n                    writer.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n                    return true;\n                }\n            } else {\n                writer.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? 'after' : 'before');\n                return true;\n            }\n            return false;\n        });\n    }\n    /**\n\t * Handles the keyboard navigation on \"keydown\" when **no** widget is selected but the selection is **directly** next\n\t * to one and upon the fake caret should become active for this widget upon arrow keypress\n\t * (AKA entering/selecting the widget).\n\t *\n\t * **Note**: This code mirrors the implementation from the widget plugin but also adds the selection attribute.\n\t * Unfortunately, there is no safe way to let the widget plugin do the selection part first and then just set the\n\t * selection attribute here in the widget type around plugin. This is why this code must duplicate some from the widget plugin.\n\t *\n\t * @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t * as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t * @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t * process the event any further. Returns `false` otherwise.\n\t */ _handleArrowKeyPressWhenSelectionNextToAWidget(isForward) {\n        const editor = this.editor;\n        const model = editor.model;\n        const schema = model.schema;\n        const widgetPlugin = editor.plugins.get('Widget');\n        // This is the widget the selection is about to be set on.\n        const modelElementNextToSelection = widgetPlugin._getObjectElementNextToSelection(isForward);\n        const viewElementNextToSelection = editor.editing.mapper.toViewElement(modelElementNextToSelection);\n        if (isTypeAroundWidget(viewElementNextToSelection, modelElementNextToSelection, schema)) {\n            model.change((writer)=>{\n                widgetPlugin._setSelectionOverElement(modelElementNextToSelection);\n                writer.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? 'before' : 'after');\n            });\n            // The change() block above does the same job as the Widget plugin. The event can\n            // be safely canceled.\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Handles the keyboard navigation on \"keydown\" when a widget is currently selected (together with some other content)\n\t * and the widget is the first or last element in the selection. It activates or deactivates the fake caret for that widget.\n\t *\n\t * @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t * as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t * @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t * process the event any further. Returns `false` otherwise.\n\t */ _handleArrowKeyPressWhenNonCollapsedSelection(isForward) {\n        const editor = this.editor;\n        const model = editor.model;\n        const schema = model.schema;\n        const mapper = editor.editing.mapper;\n        const modelSelection = model.document.selection;\n        const selectedModelNode = isForward ? modelSelection.getLastPosition().nodeBefore : modelSelection.getFirstPosition().nodeAfter;\n        const selectedViewNode = mapper.toViewElement(selectedModelNode);\n        // There is a widget at the collapse position so collapse the selection to the fake caret on it.\n        if (isTypeAroundWidget(selectedViewNode, selectedModelNode, schema)) {\n            model.change((writer)=>{\n                writer.setSelection(selectedModelNode, 'on');\n                writer.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? 'after' : 'before');\n            });\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Registers a `mousedown` listener for the view document which intercepts events\n\t * coming from the widget type around UI, which happens when a user clicks one of the buttons\n\t * that insert a paragraph next to a widget.\n\t */ _enableInsertingParagraphsOnButtonClick() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        this._listenToIfEnabled(editingView.document, 'mousedown', (evt, domEventData)=>{\n            const button = getClosestTypeAroundDomButton(domEventData.domTarget);\n            if (!button) {\n                return;\n            }\n            const buttonPosition = getTypeAroundButtonPosition(button);\n            const widgetViewElement = getClosestWidgetViewElement(button, editingView.domConverter);\n            const widgetModelElement = editor.editing.mapper.toModelElement(widgetViewElement);\n            this._insertParagraph(widgetModelElement, buttonPosition);\n            domEventData.preventDefault();\n            evt.stop();\n        });\n    }\n    /**\n\t * Creates the <kbd>Enter</kbd> key listener on the view document that allows the user to insert a paragraph\n\t * near the widget when either:\n\t *\n\t * * The fake caret was first activated using the arrow keys,\n\t * * The entire widget is selected in the model.\n\t *\n\t * In the first case, the new paragraph is inserted according to the `widget-type-around` selection\n\t * attribute (see {@link #_handleArrowKeyPress}).\n\t *\n\t * In the second case, the new paragraph is inserted based on whether a soft (<kbd>Shift</kbd>+<kbd>Enter</kbd>) keystroke\n\t * was pressed or not.\n\t */ _enableInsertingParagraphsOnEnterKeypress() {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const editingView = editor.editing.view;\n        this._listenToIfEnabled(editingView.document, 'enter', (evt, domEventData)=>{\n            // This event could be triggered from inside the widget but we are interested\n            // only when the widget is selected itself.\n            if (evt.eventPhase != 'atTarget') {\n                return;\n            }\n            const selectedModelElement = selection.getSelectedElement();\n            const selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n            const schema = editor.model.schema;\n            let wasHandled;\n            // First check if the widget is selected and there's a type around selection attribute associated\n            // with the fake caret that would tell where to insert a new paragraph.\n            if (this._insertParagraphAccordingToFakeCaretPosition()) {\n                wasHandled = true;\n            } else if (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) {\n                this._insertParagraph(selectedModelElement, domEventData.isSoft ? 'before' : 'after');\n                wasHandled = true;\n            }\n            if (wasHandled) {\n                domEventData.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: isWidget\n        });\n    }\n    /**\n\t * Similar to the {@link #_enableInsertingParagraphsOnEnterKeypress}, it allows the user\n\t * to insert a paragraph next to a widget when the fake caret was activated using arrow\n\t * keys but it responds to typing instead of <kbd>Enter</kbd>.\n\t *\n\t * Listener enabled by this method will insert a new paragraph according to the `widget-type-around`\n\t * model selection attribute as the user simply starts typing, which creates the impression that the fake caret\n\t * behaves like a real one rendered by the browser (AKA your text appears where the caret was).\n\t *\n\t * **Note**: At the moment this listener creates 2 undo steps: one for the `insertParagraph` command\n\t * and another one for actual typing. It is not a disaster but this may need to be fixed\n\t * sooner or later.\n\t */ _enableInsertingParagraphsOnTypingKeystroke() {\n        const editor = this.editor;\n        const viewDocument = editor.editing.view.document;\n        // Note: The priority must precede the default Input plugin insertText handler.\n        this._listenToIfEnabled(viewDocument, 'insertText', (evt, data)=>{\n            if (this._insertParagraphAccordingToFakeCaretPosition()) {\n                // The view selection in the event data contains the widget. If the new paragraph\n                // was inserted, modify the view selection passed along with the insertText event\n                // so the default event handler in the Input plugin starts typing inside the paragraph.\n                // Otherwise, the typing would be over the widget.\n                data.selection = viewDocument.selection;\n            }\n        }, {\n            priority: 'high'\n        });\n        if (env.isAndroid) {\n            // On Android with English keyboard, the composition starts just by putting caret\n            // at the word end or by selecting a table column. This is not a real composition started.\n            // Trigger delete content on first composition key pressed.\n            this._listenToIfEnabled(viewDocument, 'keydown', (evt, data)=>{\n                if (data.keyCode == 229) {\n                    this._insertParagraphAccordingToFakeCaretPosition();\n                }\n            });\n        } else {\n            // Note: The priority must precede the default Input plugin compositionstart handler (to call it before delete content).\n            this._listenToIfEnabled(viewDocument, 'compositionstart', ()=>{\n                this._insertParagraphAccordingToFakeCaretPosition();\n            }, {\n                priority: 'high'\n            });\n        }\n    }\n    /**\n\t * It creates a \"delete\" event listener on the view document to handle cases when the <kbd>Delete</kbd> or <kbd>Backspace</kbd>\n\t * is pressed and the fake caret is currently active.\n\t *\n\t * The fake caret should create an illusion of a real browser caret so that when it appears before or after\n\t * a widget, pressing <kbd>Delete</kbd> or <kbd>Backspace</kbd> should remove a widget or delete the content\n\t * before or after a widget (depending on the content surrounding the widget).\n\t */ _enableDeleteIntegration() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const model = editor.model;\n        const schema = model.schema;\n        this._listenToIfEnabled(editingView.document, 'delete', (evt, domEventData)=>{\n            // This event could be triggered from inside the widget but we are interested\n            // only when the widget is selected itself.\n            if (evt.eventPhase != 'atTarget') {\n                return;\n            }\n            const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(model.document.selection);\n            // This listener handles only these cases when the fake caret is active.\n            if (!typeAroundFakeCaretPosition) {\n                return;\n            }\n            const direction = domEventData.direction;\n            const selectedModelWidget = model.document.selection.getSelectedElement();\n            const isFakeCaretBefore = typeAroundFakeCaretPosition === 'before';\n            const isDeleteForward = direction == 'forward';\n            const shouldDeleteEntireWidget = isFakeCaretBefore === isDeleteForward;\n            if (shouldDeleteEntireWidget) {\n                editor.execute('delete', {\n                    selection: model.createSelection(selectedModelWidget, 'on')\n                });\n            } else {\n                const range = schema.getNearestSelectionRange(model.createPositionAt(selectedModelWidget, typeAroundFakeCaretPosition), direction);\n                // If there is somewhere to move selection to, then there will be something to delete.\n                if (range) {\n                    // If the range is NOT collapsed, then we know that the range contains an object (see getNearestSelectionRange() docs).\n                    if (!range.isCollapsed) {\n                        model.change((writer)=>{\n                            writer.setSelection(range);\n                            editor.execute(isDeleteForward ? 'deleteForward' : 'delete');\n                        });\n                    } else {\n                        const probe = model.createSelection(range.start);\n                        model.modifySelection(probe, {\n                            direction\n                        });\n                        // If the range is collapsed, let's see if a non-collapsed range exists that can could be deleted.\n                        // If such range exists, use the editor command because it it safe for collaboration (it merges where it can).\n                        if (!probe.focus.isEqual(range.start)) {\n                            model.change((writer)=>{\n                                writer.setSelection(range);\n                                editor.execute(isDeleteForward ? 'deleteForward' : 'delete');\n                            });\n                        } else {\n                            const deepestEmptyRangeAncestor = getDeepestEmptyElementAncestor(schema, range.start.parent);\n                            model.deleteContent(model.createSelection(deepestEmptyRangeAncestor, 'on'), {\n                                doNotAutoparagraph: true\n                            });\n                        }\n                    }\n                }\n            }\n            // If some content was deleted, don't let the handler from the Widget plugin kick in.\n            // If nothing was deleted, then the default handler will have nothing to do anyway.\n            domEventData.preventDefault();\n            evt.stop();\n        }, {\n            context: isWidget\n        });\n    }\n    /**\n\t * Attaches the {@link module:engine/model/model~Model#event:insertContent} event listener that, for instance, allows the user to paste\n\t * content near a widget when the fake caret is first activated using the arrow keys.\n\t *\n\t * The content is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t */ _enableInsertContentIntegration() {\n        const editor = this.editor;\n        const model = this.editor.model;\n        const documentSelection = model.document.selection;\n        this._listenToIfEnabled(editor.model, 'insertContent', (evt, [content, selectable])=>{\n            if (selectable && !selectable.is('documentSelection')) {\n                return;\n            }\n            const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(documentSelection);\n            if (!typeAroundFakeCaretPosition) {\n                return;\n            }\n            evt.stop();\n            return model.change((writer)=>{\n                const selectedElement = documentSelection.getSelectedElement();\n                const position = model.createPositionAt(selectedElement, typeAroundFakeCaretPosition);\n                const selection = writer.createSelection(position);\n                const result = model.insertContent(content, selection);\n                writer.setSelection(selection);\n                return result;\n            });\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * Attaches the {@link module:engine/model/model~Model#event:insertObject} event listener that modifies the\n\t * `options.findOptimalPosition`parameter to position of fake caret in relation to selected element\n\t * to reflect user's intent of desired insertion position.\n\t *\n\t * The object is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t */ _enableInsertObjectIntegration() {\n        const editor = this.editor;\n        const model = this.editor.model;\n        const documentSelection = model.document.selection;\n        this._listenToIfEnabled(editor.model, 'insertObject', (evt, args)=>{\n            const [, selectable, options = {}] = args;\n            if (selectable && !selectable.is('documentSelection')) {\n                return;\n            }\n            const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(documentSelection);\n            if (!typeAroundFakeCaretPosition) {\n                return;\n            }\n            options.findOptimalPosition = typeAroundFakeCaretPosition;\n            args[3] = options;\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * Attaches the {@link module:engine/model/model~Model#event:deleteContent} event listener to block the event when the fake\n\t * caret is active.\n\t *\n\t * This is required for cases that trigger {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}\n\t * before calling {@link module:engine/model/model~Model#insertContent `model.insertContent()`} like, for instance,\n\t * plain text pasting.\n\t */ _enableDeleteContentIntegration() {\n        const editor = this.editor;\n        const model = this.editor.model;\n        const documentSelection = model.document.selection;\n        this._listenToIfEnabled(editor.model, 'deleteContent', (evt, [selection])=>{\n            if (selection && !selection.is('documentSelection')) {\n                return;\n            }\n            const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(documentSelection);\n            // Disable removing the selection content while pasting plain text.\n            if (typeAroundFakeCaretPosition) {\n                evt.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n    }\n}\n/**\n * Injects the type around UI into a view widget instance.\n */ function injectUIIntoWidget(viewWriter, buttonTitles, widgetViewElement) {\n    const typeAroundWrapper = viewWriter.createUIElement('div', {\n        class: 'ck ck-reset_all ck-widget__type-around'\n    }, function(domDocument) {\n        const wrapperDomElement = this.toDomElement(domDocument);\n        injectButtons(wrapperDomElement, buttonTitles);\n        injectFakeCaret(wrapperDomElement);\n        return wrapperDomElement;\n    });\n    // Inject the type around wrapper into the widget's wrapper.\n    viewWriter.insert(viewWriter.createPositionAt(widgetViewElement, 'end'), typeAroundWrapper);\n}\n/**\n * FYI: Not using the IconView class because each instance would need to be destroyed to avoid memory leaks\n * and it's pretty hard to figure out when a view (widget) is gone for good so it's cheaper to use raw\n * <svg> here.\n */ function injectButtons(wrapperDomElement, buttonTitles) {\n    for (const position of POSSIBLE_INSERTION_POSITIONS){\n        const buttonTemplate = new Template({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-widget__type-around__button',\n                    `ck-widget__type-around__button_${position}`\n                ],\n                title: buttonTitles[position],\n                'aria-hidden': 'true'\n            },\n            children: [\n                wrapperDomElement.ownerDocument.importNode(RETURN_ARROW_ICON_ELEMENT, true)\n            ]\n        });\n        wrapperDomElement.appendChild(buttonTemplate.render());\n    }\n}\nfunction injectFakeCaret(wrapperDomElement) {\n    const caretTemplate = new Template({\n        tag: 'div',\n        attributes: {\n            class: [\n                'ck',\n                'ck-widget__type-around__fake-caret'\n            ]\n        }\n    });\n    wrapperDomElement.appendChild(caretTemplate.render());\n}\n/**\n * Returns the ancestor of an element closest to the root which is empty. For instance,\n * for `<baz>`:\n *\n * ```\n * <foo>abc<bar><baz></baz></bar></foo>\n * ```\n *\n * it returns `<bar>`.\n */ function getDeepestEmptyElementAncestor(schema, element) {\n    let deepestEmptyAncestor = element;\n    for (const ancestor of element.getAncestors({\n        parentFirst: true\n    })){\n        if (ancestor.childCount > 1 || schema.isLimit(ancestor)) {\n            break;\n        }\n        deepestEmptyAncestor = ancestor;\n    }\n    return deepestEmptyAncestor;\n}\n\n/**\n * Returns 'keydown' handler for up/down arrow keys that modifies the caret movement if it's in a text line next to an object.\n *\n * @param editing The editing controller.\n */ function verticalNavigationHandler(editing) {\n    const model = editing.model;\n    return (evt, data)=>{\n        const arrowUpPressed = data.keyCode == keyCodes.arrowup;\n        const arrowDownPressed = data.keyCode == keyCodes.arrowdown;\n        const expandSelection = data.shiftKey;\n        const selection = model.document.selection;\n        if (!arrowUpPressed && !arrowDownPressed) {\n            return;\n        }\n        const isForward = arrowDownPressed;\n        // Navigation is in the opposite direction than the selection direction so this is shrinking of the selection.\n        // Selection for sure will not approach any object.\n        if (expandSelection && selectionWillShrink(selection, isForward)) {\n            return;\n        }\n        // Find a range between selection and closest limit element.\n        const range = findTextRangeFromSelection(editing, selection, isForward);\n        // There is no selection position inside the limit element.\n        if (!range) {\n            return;\n        }\n        // If already at the edge of a limit element.\n        if (range.isCollapsed) {\n            // A collapsed selection at limit edge - nothing more to do.\n            if (selection.isCollapsed) {\n                return;\n            } else if (expandSelection) {\n                return;\n            }\n        }\n        // If the range is a single line (there is no word wrapping) then move the selection to the position closest to the limit element.\n        //\n        // We can't move the selection directly to the isObject element (eg. table cell) because of dual position at the end/beginning\n        // of wrapped line (it's at the same time at the end of one line and at the start of the next line).\n        if (range.isCollapsed || isSingleLineRange(editing, range, isForward)) {\n            model.change((writer)=>{\n                const newPosition = isForward ? range.end : range.start;\n                if (expandSelection) {\n                    const newSelection = model.createSelection(selection.anchor);\n                    newSelection.setFocus(newPosition);\n                    writer.setSelection(newSelection);\n                } else {\n                    writer.setSelection(newPosition);\n                }\n            });\n            evt.stop();\n            data.preventDefault();\n            data.stopPropagation();\n        }\n    };\n}\n/**\n * Finds the range between selection and closest limit element (in the direction of navigation).\n * The position next to limit element is adjusted to the closest allowed `$text` position.\n *\n * Returns `null` if, according to the schema, the resulting range cannot contain a `$text` element.\n *\n * @param editing The editing controller.\n * @param selection The current selection.\n * @param isForward The expected navigation direction.\n */ function findTextRangeFromSelection(editing, selection, isForward) {\n    const model = editing.model;\n    if (isForward) {\n        const startPosition = selection.isCollapsed ? selection.focus : selection.getLastPosition();\n        const endPosition = getNearestNonInlineLimit(model, startPosition, 'forward');\n        // There is no limit element, browser should handle this.\n        if (!endPosition) {\n            return null;\n        }\n        const range = model.createRange(startPosition, endPosition);\n        const lastRangePosition = getNearestTextPosition(model.schema, range, 'backward');\n        if (lastRangePosition) {\n            return model.createRange(startPosition, lastRangePosition);\n        }\n        return null;\n    } else {\n        const endPosition = selection.isCollapsed ? selection.focus : selection.getFirstPosition();\n        const startPosition = getNearestNonInlineLimit(model, endPosition, 'backward');\n        // There is no limit element, browser should handle this.\n        if (!startPosition) {\n            return null;\n        }\n        const range = model.createRange(startPosition, endPosition);\n        const firstRangePosition = getNearestTextPosition(model.schema, range, 'forward');\n        if (firstRangePosition) {\n            return model.createRange(firstRangePosition, endPosition);\n        }\n        return null;\n    }\n}\n/**\n * Finds the limit element position that is closest to startPosition.\n *\n * @param direction Search direction.\n */ function getNearestNonInlineLimit(model, startPosition, direction) {\n    const schema = model.schema;\n    const range = model.createRangeIn(startPosition.root);\n    const walkerValueType = direction == 'forward' ? 'elementStart' : 'elementEnd';\n    for (const { previousPosition, item, type } of range.getWalker({\n        startPosition,\n        direction\n    })){\n        if (schema.isLimit(item) && !schema.isInline(item)) {\n            return previousPosition;\n        }\n        // Stop looking for isLimit element if the next element is a block element (it is for sure not single line).\n        if (type == walkerValueType && schema.isBlock(item)) {\n            return null;\n        }\n    }\n    return null;\n}\n/**\n * Basing on the provided range, finds the first or last (depending on `direction`) position inside the range\n * that can contain `$text` (according to schema).\n *\n * @param schema The schema.\n * @param range The range to find the position in.\n * @param direction Search direction.\n * @returns The nearest selection position.\n *\n */ function getNearestTextPosition(schema, range, direction) {\n    const position = direction == 'backward' ? range.end : range.start;\n    if (schema.checkChild(position, '$text')) {\n        return position;\n    }\n    for (const { nextPosition } of range.getWalker({\n        direction\n    })){\n        if (schema.checkChild(nextPosition, '$text')) {\n            return nextPosition;\n        }\n    }\n    return null;\n}\n/**\n * Checks if the DOM range corresponding to the provided model range renders as a single line by analyzing DOMRects\n * (verifying if they visually wrap content to the next line).\n *\n * @param editing The editing controller.\n * @param modelRange The current table cell content range.\n * @param isForward The expected navigation direction.\n */ function isSingleLineRange(editing, modelRange, isForward) {\n    const model = editing.model;\n    const domConverter = editing.view.domConverter;\n    // Wrapped lines contain exactly the same position at the end of current line\n    // and at the beginning of next line. That position's client rect is at the end\n    // of current line. In case of caret at first position of the last line that 'dual'\n    // position would be detected as it's not the last line.\n    if (isForward) {\n        const probe = model.createSelection(modelRange.start);\n        model.modifySelection(probe);\n        // If the new position is at the end of the container then we can't use this position\n        // because it would provide incorrect result for eg caption of image and selection\n        // just before end of it. Also in this case there is no \"dual\" position.\n        if (!probe.focus.isAtEnd && !modelRange.start.isEqual(probe.focus)) {\n            modelRange = model.createRange(probe.focus, modelRange.end);\n        }\n    }\n    const viewRange = editing.mapper.toViewRange(modelRange);\n    const domRange = domConverter.viewRangeToDom(viewRange);\n    const rects = Rect.getDomRangeRects(domRange);\n    let boundaryVerticalPosition;\n    for (const rect of rects){\n        if (boundaryVerticalPosition === undefined) {\n            boundaryVerticalPosition = Math.round(rect.bottom);\n            continue;\n        }\n        // Let's check if this rect is in new line.\n        if (Math.round(rect.top) >= boundaryVerticalPosition) {\n            return false;\n        }\n        boundaryVerticalPosition = Math.max(boundaryVerticalPosition, Math.round(rect.bottom));\n    }\n    return true;\n}\nfunction selectionWillShrink(selection, isForward) {\n    return !selection.isCollapsed && selection.isBackward == isForward;\n}\n\n/**\n * The widget plugin. It enables base support for widgets.\n *\n * See {@glink api/widget package page} for more details and documentation.\n *\n * This plugin enables multiple behaviors required by widgets:\n *\n * * The model to view selection converter for the editing pipeline (it handles widget custom selection rendering).\n * If a converted selection wraps around a widget element, that selection is marked as\n * {@link module:engine/view/selection~Selection#isFake fake}. Additionally, the `ck-widget_selected` CSS class\n * is added to indicate that widget has been selected.\n * * The mouse and keyboard events handling on and around widget elements.\n */ class Widget extends Plugin {\n    /**\n\t * Holds previously selected widgets.\n\t */ _previouslySelected = new Set();\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Widget';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            WidgetTypeAround,\n            Delete\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const t = editor.t;\n        // Model to view selection converter.\n        // Converts selection placed over widget element to fake selection.\n        //\n        // By default, the selection is downcasted by the engine to surround the attribute element, even though its only\n        // child is an inline widget. A similar thing also happens when a collapsed marker is rendered as a UI element\n        // next to an inline widget: the view selection contains both the widget and the marker.\n        //\n        // This prevents creating a correct fake selection when this inline widget is selected. Normalize the selection\n        // in these cases based on the model:\n        //\n        //\t\t[<attributeElement><inlineWidget /></attributeElement>] -> <attributeElement>[<inlineWidget />]</attributeElement>\n        //\t\t[<uiElement></uiElement><inlineWidget />] -> <uiElement></uiElement>[<inlineWidget />]\n        //\n        // Thanks to this:\n        //\n        // * fake selection can be set correctly,\n        // * any logic depending on (View)Selection#getSelectedElement() also works OK.\n        //\n        // See https://github.com/ckeditor/ckeditor5/issues/9524.\n        this.editor.editing.downcastDispatcher.on('selection', (evt, data, conversionApi)=>{\n            const viewWriter = conversionApi.writer;\n            const modelSelection = data.selection;\n            // The collapsed selection can't contain any widget.\n            if (modelSelection.isCollapsed) {\n                return;\n            }\n            const selectedModelElement = modelSelection.getSelectedElement();\n            if (!selectedModelElement) {\n                return;\n            }\n            const selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n            if (!isWidget(selectedViewElement)) {\n                return;\n            }\n            if (!conversionApi.consumable.consume(modelSelection, 'selection')) {\n                return;\n            }\n            viewWriter.setSelection(viewWriter.createRangeOn(selectedViewElement), {\n                fake: true,\n                label: getLabel(selectedViewElement)\n            });\n        });\n        // Mark all widgets inside the selection with the css class.\n        // This handler is registered at the 'low' priority so it's triggered after the real selection conversion.\n        this.editor.editing.downcastDispatcher.on('selection', (evt, data, conversionApi)=>{\n            // Remove selected class from previously selected widgets.\n            this._clearPreviouslySelectedWidgets(conversionApi.writer);\n            const viewWriter = conversionApi.writer;\n            const viewSelection = viewWriter.document.selection;\n            let lastMarked = null;\n            for (const range of viewSelection.getRanges()){\n                // Note: There could be multiple selected widgets in a range but no fake selection.\n                // All of them must be marked as selected, for instance [<widget></widget><widget></widget>]\n                for (const value of range){\n                    const node = value.item;\n                    // Do not mark nested widgets in selected one. See: #4594\n                    if (isWidget(node) && !isChild(node, lastMarked)) {\n                        viewWriter.addClass(WIDGET_SELECTED_CLASS_NAME, node);\n                        this._previouslySelected.add(node);\n                        lastMarked = node;\n                    }\n                }\n            }\n        }, {\n            priority: 'low'\n        });\n        // If mouse down is pressed on widget - create selection over whole widget.\n        view.addObserver(MouseObserver);\n        this.listenTo(viewDocument, 'mousedown', (...args)=>this._onMousedown(...args));\n        // There are two keydown listeners working on different priorities. This allows other\n        // features such as WidgetTypeAround or TableKeyboard to attach their listeners in between\n        // and customize the behavior even further in different content/selection scenarios.\n        //\n        // * The first listener handles changing the selection on arrow key press\n        // if the widget is selected or if the selection is next to a widget and the widget\n        // should become selected upon the arrow key press.\n        //\n        // * The second (late) listener makes sure the default browser action on arrow key press is\n        // prevented when a widget is selected. This prevents the selection from being moved\n        // from a fake selection container.\n        this.listenTo(viewDocument, 'arrowKey', (...args)=>{\n            this._handleSelectionChangeOnArrowKeyPress(...args);\n        }, {\n            context: [\n                isWidget,\n                '$text'\n            ]\n        });\n        this.listenTo(viewDocument, 'arrowKey', (...args)=>{\n            this._preventDefaultOnArrowKeyPress(...args);\n        }, {\n            context: '$root'\n        });\n        this.listenTo(viewDocument, 'arrowKey', verticalNavigationHandler(this.editor.editing), {\n            context: '$text'\n        });\n        // Handle custom delete behaviour.\n        this.listenTo(viewDocument, 'delete', (evt, data)=>{\n            if (this._handleDelete(data.direction == 'forward')) {\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: '$root'\n        });\n        // Handle Tab key while a widget is selected.\n        this.listenTo(viewDocument, 'tab', (evt, data)=>{\n            // This event could be triggered from inside the widget, but we are interested\n            // only when the widget is selected itself.\n            if (evt.eventPhase != 'atTarget') {\n                return;\n            }\n            if (data.shiftKey) {\n                return;\n            }\n            if (this._selectFirstNestedEditable()) {\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: isWidget,\n            priority: 'low'\n        });\n        // Handle Shift+Tab key while caret inside a widget editable.\n        this.listenTo(viewDocument, 'tab', (evt, data)=>{\n            if (!data.shiftKey) {\n                return;\n            }\n            if (this._selectAncestorWidget()) {\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            priority: 'low'\n        });\n        // Handle Esc key while inside a nested editable.\n        this.listenTo(viewDocument, 'keydown', (evt, data)=>{\n            if (data.keystroke != keyCodes.esc) {\n                return;\n            }\n            if (this._selectAncestorWidget()) {\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            priority: 'low'\n        });\n        // Add the information about the keystrokes to the accessibility database.\n        editor.accessibility.addKeystrokeInfoGroup({\n            id: 'widget',\n            label: t('Keystrokes that can be used when a widget is selected (for example: image, table, etc.)'),\n            keystrokes: [\n                {\n                    label: t('Move focus from an editable area back to the parent widget'),\n                    keystroke: 'Esc'\n                },\n                {\n                    label: t('Insert a new paragraph directly after a widget'),\n                    keystroke: 'Enter'\n                },\n                {\n                    label: t('Insert a new paragraph directly before a widget'),\n                    keystroke: 'Shift+Enter'\n                },\n                {\n                    label: t('Move the caret to allow typing directly before a widget'),\n                    keystroke: [\n                        [\n                            'arrowup'\n                        ],\n                        [\n                            'arrowleft'\n                        ]\n                    ]\n                },\n                {\n                    label: t('Move the caret to allow typing directly after a widget'),\n                    keystroke: [\n                        [\n                            'arrowdown'\n                        ],\n                        [\n                            'arrowright'\n                        ]\n                    ]\n                }\n            ]\n        });\n    }\n    /**\n\t * Handles {@link module:engine/view/document~Document#event:mousedown mousedown} events on widget elements.\n\t */ _onMousedown(eventInfo, domEventData) {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        let element = domEventData.target;\n        // Some of DOM elements have no view element representation so it may be null.\n        if (!element) {\n            return;\n        }\n        // If triple click should select entire paragraph.\n        if (domEventData.domEvent.detail >= 3) {\n            if (this._selectBlockContent(element)) {\n                domEventData.preventDefault();\n            }\n            return;\n        }\n        // If target is not a widget element - check if one of the ancestors is.\n        if (!isWidget(element)) {\n            const editableOrWidgetElement = findClosestEditableOrWidgetAncestor(element);\n            if (!editableOrWidgetElement) {\n                return;\n            }\n            if (isWidget(editableOrWidgetElement)) {\n                element = editableOrWidgetElement;\n            } else {\n                // Pick view range from the point where the mouse was clicked.\n                const clickTargetFromPoint = getElementFromMouseEvent(view, domEventData);\n                if (clickTargetFromPoint && isWidget(clickTargetFromPoint)) {\n                    element = clickTargetFromPoint;\n                } else {\n                    return;\n                }\n            }\n        }\n        // On Android selection would jump to the first table cell, on other devices\n        // we can't block it (and don't need to) because of drag and drop support.\n        if (env.isAndroid) {\n            domEventData.preventDefault();\n        }\n        // Focus editor if is not focused already.\n        if (!viewDocument.isFocused) {\n            view.focus();\n        }\n        // Create model selection over widget.\n        const modelElement = editor.editing.mapper.toModelElement(element);\n        this._setSelectionOverElement(modelElement);\n    }\n    /**\n\t * Selects entire block content, e.g. on triple click it selects entire paragraph.\n\t */ _selectBlockContent(element) {\n        const editor = this.editor;\n        const model = editor.model;\n        const mapper = editor.editing.mapper;\n        const schema = model.schema;\n        const viewElement = mapper.findMappedViewAncestor(this.editor.editing.view.createPositionAt(element, 0));\n        const modelElement = findTextBlockAncestor(mapper.toModelElement(viewElement), model.schema);\n        if (!modelElement) {\n            return false;\n        }\n        model.change((writer)=>{\n            const nextTextBlock = !schema.isLimit(modelElement) ? findNextTextBlock(writer.createPositionAfter(modelElement), schema) : null;\n            const start = writer.createPositionAt(modelElement, 0);\n            const end = nextTextBlock ? writer.createPositionAt(nextTextBlock, 0) : writer.createPositionAt(modelElement, 'end');\n            writer.setSelection(writer.createRange(start, end));\n        });\n        return true;\n    }\n    /**\n\t * Handles {@link module:engine/view/document~Document#event:keydown keydown} events and changes\n\t * the model selection when:\n\t *\n\t * * arrow key is pressed when the widget is selected,\n\t * * the selection is next to a widget and the widget should become selected upon the arrow key press.\n\t *\n\t * See {@link #_preventDefaultOnArrowKeyPress}.\n\t */ _handleSelectionChangeOnArrowKeyPress(eventInfo, domEventData) {\n        const keyCode = domEventData.keyCode;\n        const model = this.editor.model;\n        const schema = model.schema;\n        const modelSelection = model.document.selection;\n        const objectElement = modelSelection.getSelectedElement();\n        const direction = getLocalizedArrowKeyCodeDirection(keyCode, this.editor.locale.contentLanguageDirection);\n        const isForward = direction == 'down' || direction == 'right';\n        const isVerticalNavigation = direction == 'up' || direction == 'down';\n        // If object element is selected.\n        if (objectElement && schema.isObject(objectElement)) {\n            const position = isForward ? modelSelection.getLastPosition() : modelSelection.getFirstPosition();\n            const newRange = schema.getNearestSelectionRange(position, isForward ? 'forward' : 'backward');\n            if (newRange) {\n                model.change((writer)=>{\n                    writer.setSelection(newRange);\n                });\n                domEventData.preventDefault();\n                eventInfo.stop();\n            }\n            return;\n        }\n        // Handle collapsing of the selection when there is any widget on the edge of selection.\n        // This is needed because browsers have problems with collapsing such selection.\n        if (!modelSelection.isCollapsed && !domEventData.shiftKey) {\n            const firstPosition = modelSelection.getFirstPosition();\n            const lastPosition = modelSelection.getLastPosition();\n            const firstSelectedNode = firstPosition.nodeAfter;\n            const lastSelectedNode = lastPosition.nodeBefore;\n            if (firstSelectedNode && schema.isObject(firstSelectedNode) || lastSelectedNode && schema.isObject(lastSelectedNode)) {\n                model.change((writer)=>{\n                    writer.setSelection(isForward ? lastPosition : firstPosition);\n                });\n                domEventData.preventDefault();\n                eventInfo.stop();\n            }\n            return;\n        }\n        // Return if not collapsed.\n        if (!modelSelection.isCollapsed) {\n            return;\n        }\n        // If selection is next to object element.\n        const objectElementNextToSelection = this._getObjectElementNextToSelection(isForward);\n        if (objectElementNextToSelection && schema.isObject(objectElementNextToSelection)) {\n            // Do not select an inline widget while handling up/down arrow.\n            if (schema.isInline(objectElementNextToSelection) && isVerticalNavigation) {\n                return;\n            }\n            this._setSelectionOverElement(objectElementNextToSelection);\n            domEventData.preventDefault();\n            eventInfo.stop();\n        }\n    }\n    /**\n\t * Handles {@link module:engine/view/document~Document#event:keydown keydown} events and prevents\n\t * the default browser behavior to make sure the fake selection is not being moved from a fake selection\n\t * container.\n\t *\n\t * See {@link #_handleSelectionChangeOnArrowKeyPress}.\n\t */ _preventDefaultOnArrowKeyPress(eventInfo, domEventData) {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const objectElement = model.document.selection.getSelectedElement();\n        // If object element is selected.\n        if (objectElement && schema.isObject(objectElement)) {\n            domEventData.preventDefault();\n            eventInfo.stop();\n        }\n    }\n    /**\n\t * Handles delete keys: backspace and delete.\n\t *\n\t * @param isForward Set to true if delete was performed in forward direction.\n\t * @returns Returns `true` if keys were handled correctly.\n\t */ _handleDelete(isForward) {\n        const modelDocument = this.editor.model.document;\n        const modelSelection = modelDocument.selection;\n        // Do nothing when the read only mode is enabled.\n        if (!this.editor.model.canEditAt(modelSelection)) {\n            return;\n        }\n        // Do nothing on non-collapsed selection.\n        if (!modelSelection.isCollapsed) {\n            return;\n        }\n        const objectElement = this._getObjectElementNextToSelection(isForward);\n        if (objectElement) {\n            this.editor.model.change((writer)=>{\n                let previousNode = modelSelection.anchor.parent;\n                // Remove previous element if empty.\n                while(previousNode.isEmpty){\n                    const nodeToRemove = previousNode;\n                    previousNode = nodeToRemove.parent;\n                    writer.remove(nodeToRemove);\n                }\n                this._setSelectionOverElement(objectElement);\n            });\n            return true;\n        }\n    }\n    /**\n\t * Sets {@link module:engine/model/selection~Selection document's selection} over given element.\n\t *\n\t * @internal\n\t */ _setSelectionOverElement(element) {\n        this.editor.model.change((writer)=>{\n            writer.setSelection(writer.createRangeOn(element));\n        });\n    }\n    /**\n\t * Checks if {@link module:engine/model/element~Element element} placed next to the current\n\t * {@link module:engine/model/selection~Selection model selection} exists and is marked in\n\t * {@link module:engine/model/schema~Schema schema} as `object`.\n\t *\n\t * @internal\n\t * @param forward Direction of checking.\n\t */ _getObjectElementNextToSelection(forward) {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const modelSelection = model.document.selection;\n        // Clone current selection to use it as a probe. We must leave default selection as it is so it can return\n        // to its current state after undo.\n        const probe = model.createSelection(modelSelection);\n        model.modifySelection(probe, {\n            direction: forward ? 'forward' : 'backward'\n        });\n        // The selection didn't change so there is nothing there.\n        if (probe.isEqual(modelSelection)) {\n            return null;\n        }\n        const objectElement = forward ? probe.focus.nodeBefore : probe.focus.nodeAfter;\n        if (!!objectElement && schema.isObject(objectElement)) {\n            return objectElement;\n        }\n        return null;\n    }\n    /**\n\t * Removes CSS class from previously selected widgets.\n\t */ _clearPreviouslySelectedWidgets(writer) {\n        for (const widget of this._previouslySelected){\n            writer.removeClass(WIDGET_SELECTED_CLASS_NAME, widget);\n        }\n        this._previouslySelected.clear();\n    }\n    /**\n\t * Moves the document selection into the first nested editable.\n\t */ _selectFirstNestedEditable() {\n        const editor = this.editor;\n        const view = this.editor.editing.view;\n        const viewDocument = view.document;\n        for (const item of viewDocument.selection.getFirstRange().getItems()){\n            if (item.is('editableElement')) {\n                const modelElement = editor.editing.mapper.toModelElement(item);\n                /* istanbul ignore next -- @preserve */ if (!modelElement) {\n                    continue;\n                }\n                const position = editor.model.createPositionAt(modelElement, 0);\n                const newRange = editor.model.schema.getNearestSelectionRange(position, 'forward');\n                editor.model.change((writer)=>{\n                    writer.setSelection(newRange);\n                });\n                return true;\n            }\n        }\n        return false;\n    }\n    /**\n\t * Updates the document selection so that it selects first ancestor widget.\n\t */ _selectAncestorWidget() {\n        const editor = this.editor;\n        const mapper = editor.editing.mapper;\n        const selection = editor.editing.view.document.selection;\n        const positionParent = selection.getFirstPosition().parent;\n        const positionParentElement = positionParent.is('$text') ? positionParent.parent : positionParent;\n        const viewElement = positionParentElement.findAncestor(isWidget);\n        if (!viewElement) {\n            return false;\n        }\n        const modelElement = mapper.toModelElement(viewElement);\n        /* istanbul ignore next -- @preserve */ if (!modelElement) {\n            return false;\n        }\n        editor.model.change((writer)=>{\n            writer.setSelection(modelElement, 'on');\n        });\n        return true;\n    }\n}\n/**\n * Finds the closest ancestor element that is either an editable element or a widget.\n *\n * @param element The element from which to start searching.\n * @returns The closest ancestor element that is either an editable element or a widget, or null if none is found.\n */ function findClosestEditableOrWidgetAncestor(element) {\n    let currentElement = element;\n    while(currentElement){\n        if (currentElement.is('editableElement') || isWidget(currentElement)) {\n            return currentElement;\n        }\n        currentElement = currentElement.parent;\n    }\n    return null;\n}\n/**\n * Retrieves the ViewElement associated with a mouse event in the editing view.\n *\n * @param view The editing view.\n * @param domEventData The DOM event data containing the mouse event.\n * @returns The ViewElement associated with the mouse event, or null if not found.\n */ function getElementFromMouseEvent(view, domEventData) {\n    const domRange = getRangeFromMouseEvent(domEventData.domEvent);\n    let viewRange = null;\n    if (domRange) {\n        viewRange = view.domConverter.domRangeToView(domRange);\n    } else {\n        // Fallback to create range in target element. It happens frequently on Safari browser.\n        // See more: https://github.com/ckeditor/ckeditor5/issues/16978\n        viewRange = view.createRange(view.createPositionAt(domEventData.target, 0));\n    }\n    if (!viewRange) {\n        return null;\n    }\n    const viewPosition = viewRange.start;\n    if (!viewPosition.parent) {\n        return null;\n    }\n    let viewNode = viewPosition.parent;\n    if (viewPosition.parent.is('editableElement')) {\n        if (viewPosition.isAtEnd && viewPosition.nodeBefore) {\n            // Click after a widget tend to return position at the end of the editable element\n            // so use the node before it if range is at the end of a parent.\n            viewNode = viewPosition.nodeBefore;\n        } else if (viewPosition.isAtStart && viewPosition.nodeAfter) {\n            // Click before a widget tend to return position at the start of the editable element\n            // so use the node after it if range is at the start of a parent.\n            // See more: https://github.com/ckeditor/ckeditor5/issues/16992\n            viewNode = viewPosition.nodeAfter;\n        }\n    }\n    if (viewNode.is('$text')) {\n        return viewNode.parent;\n    }\n    return viewNode;\n}\n/**\n * Checks whether the specified `element` is a child of the `parent` element.\n *\n * @param element An element to check.\n * @param parent A parent for the element.\n */ function isChild(element, parent) {\n    if (!parent) {\n        return false;\n    }\n    return Array.from(element.getAncestors()).includes(parent);\n}\n/**\n * Returns nearest text block ancestor.\n */ function findTextBlockAncestor(modelElement, schema) {\n    for (const element of modelElement.getAncestors({\n        includeSelf: true,\n        parentFirst: true\n    })){\n        if (schema.checkChild(element, '$text')) {\n            return element;\n        }\n        // Do not go beyond nested editable.\n        if (schema.isLimit(element) && !schema.isObject(element)) {\n            break;\n        }\n    }\n    return null;\n}\n/**\n * Returns next text block where could put selection.\n */ function findNextTextBlock(position, schema) {\n    const treeWalker = new TreeWalker({\n        startPosition: position\n    });\n    for (const { item } of treeWalker){\n        if (schema.isLimit(item) || !item.is('element')) {\n            return null;\n        }\n        if (schema.checkChild(item, '$text')) {\n            return item;\n        }\n    }\n    return null;\n}\n\n/**\n * Widget toolbar repository plugin. A central point for registering widget toolbars. This plugin handles the whole\n * toolbar rendering process and exposes a concise API.\n *\n * To add a toolbar for your widget use the {@link ~WidgetToolbarRepository#register `WidgetToolbarRepository#register()`} method.\n *\n * The following example comes from the {@link module:image/imagetoolbar~ImageToolbar} plugin:\n *\n * ```ts\n * class ImageToolbar extends Plugin {\n * \tstatic get requires() {\n * \t\treturn [ WidgetToolbarRepository ];\n * \t}\n *\n * \tafterInit() {\n * \t\tconst editor = this.editor;\n * \t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n *\n * \t\twidgetToolbarRepository.register( 'image', {\n * \t\t\titems: editor.config.get( 'image.toolbar' ),\n * \t\t\tgetRelatedElement: getClosestSelectedImageWidget\n * \t\t} );\n * \t}\n * }\n * ```\n */ class WidgetToolbarRepository extends Plugin {\n    /**\n\t * A map of toolbar definitions.\n\t */ _toolbarDefinitions = new Map();\n    _balloon;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'WidgetToolbarRepository';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Disables the default balloon toolbar for all widgets.\n        if (editor.plugins.has('BalloonToolbar')) {\n            const balloonToolbar = editor.plugins.get('BalloonToolbar');\n            this.listenTo(balloonToolbar, 'show', (evt)=>{\n                if (isWidgetSelected(editor.editing.view.document.selection)) {\n                    evt.stop();\n                }\n            }, {\n                priority: 'high'\n            });\n        }\n        this._balloon = this.editor.plugins.get('ContextualBalloon');\n        this.on('change:isEnabled', ()=>{\n            this._updateToolbarsVisibility();\n        });\n        this.listenTo(editor.ui, 'update', ()=>{\n            this._updateToolbarsVisibility();\n        });\n        // UI#update is not fired after focus is back in editor, we need to check if balloon panel should be visible.\n        this.listenTo(editor.ui.focusTracker, 'change:isFocused', ()=>{\n            this._updateToolbarsVisibility();\n        }, {\n            priority: 'low'\n        });\n    }\n    destroy() {\n        super.destroy();\n        for (const toolbarConfig of this._toolbarDefinitions.values()){\n            toolbarConfig.view.destroy();\n        }\n    }\n    /**\n\t * Registers toolbar in the WidgetToolbarRepository. It renders it in the `ContextualBalloon` based on the value of the invoked\n\t * `getRelatedElement` function. Toolbar items are gathered from `items` array.\n\t * The balloon's CSS class is by default `ck-toolbar-container` and may be override with the `balloonClassName` option.\n\t *\n\t * Note: This method should be called in the {@link module:core/plugin~PluginInterface#afterInit `Plugin#afterInit()`}\n\t * callback (or later) to make sure that the given toolbar items were already registered by other plugins.\n\t *\n\t * @param toolbarId An id for the toolbar. Used to\n\t * @param options.ariaLabel Label used by assistive technologies to describe this toolbar element.\n\t * @param options.items Array of toolbar items.\n\t * @param options.getRelatedElement Callback which returns an element the toolbar should be attached to.\n\t * @param options.balloonClassName CSS class for the widget balloon.\n\t */ register(toolbarId, { ariaLabel, items, getRelatedElement, balloonClassName = 'ck-toolbar-container' }) {\n        // Trying to register a toolbar without any item.\n        if (!items.length) {\n            /**\n\t\t\t * When {@link module:widget/widgettoolbarrepository~WidgetToolbarRepository#register registering} a new widget toolbar, you\n\t\t\t * need to provide a non-empty array with the items that will be inserted into the toolbar.\n\t\t\t *\n\t\t\t * If you see this error when integrating the editor, you likely forgot to configure one of the widget toolbars.\n\t\t\t *\n\t\t\t * See for instance:\n\t\t\t *\n\t\t\t * * {@link module:table/tableconfig~TableConfig#contentToolbar `config.table.contentToolbar`}\n\t\t\t * * {@link module:image/imageconfig~ImageConfig#toolbar `config.image.toolbar`}\n\t\t\t *\n\t\t\t * @error widget-toolbar-no-items\n\t\t\t * @param toolbarId The id of the toolbar that has not been configured correctly.\n\t\t\t */ logWarning('widget-toolbar-no-items', {\n                toolbarId\n            });\n            return;\n        }\n        const editor = this.editor;\n        const t = editor.t;\n        const toolbarView = new ToolbarView(editor.locale);\n        toolbarView.ariaLabel = ariaLabel || t('Widget toolbar');\n        if (this._toolbarDefinitions.has(toolbarId)) {\n            /**\n\t\t\t * Toolbar with the given id was already added.\n\t\t\t *\n\t\t\t * @error widget-toolbar-duplicated\n\t\t\t * @param toolbarId Toolbar id.\n\t\t\t */ throw new CKEditorError('widget-toolbar-duplicated', this, {\n                toolbarId\n            });\n        }\n        const toolbarDefinition = {\n            view: toolbarView,\n            getRelatedElement,\n            balloonClassName,\n            itemsConfig: items,\n            initialized: false\n        };\n        // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n        editor.ui.addToolbar(toolbarView, {\n            isContextual: true,\n            beforeFocus: ()=>{\n                const relatedElement = getRelatedElement(editor.editing.view.document.selection);\n                if (relatedElement) {\n                    this._showToolbar(toolbarDefinition, relatedElement);\n                }\n            },\n            afterBlur: ()=>{\n                this._hideToolbar(toolbarDefinition);\n            }\n        });\n        this._toolbarDefinitions.set(toolbarId, toolbarDefinition);\n    }\n    /**\n\t * Iterates over stored toolbars and makes them visible or hidden.\n\t */ _updateToolbarsVisibility() {\n        let maxRelatedElementDepth = 0;\n        let deepestRelatedElement = null;\n        let deepestToolbarDefinition = null;\n        for (const definition of this._toolbarDefinitions.values()){\n            const relatedElement = definition.getRelatedElement(this.editor.editing.view.document.selection);\n            if (!this.isEnabled || !relatedElement) {\n                if (this._isToolbarInBalloon(definition)) {\n                    this._hideToolbar(definition);\n                }\n            } else if (!this.editor.ui.focusTracker.isFocused) {\n                if (this._isToolbarVisible(definition)) {\n                    this._hideToolbar(definition);\n                }\n            } else {\n                const relatedElementDepth = relatedElement.getAncestors().length;\n                // Many toolbars can express willingness to be displayed but they do not know about\n                // each other. Figure out which toolbar is deepest in the view tree to decide which\n                // should be displayed. For instance, if a selected image is inside a table cell, display\n                // the ImageToolbar rather than the TableToolbar (#60).\n                if (relatedElementDepth > maxRelatedElementDepth) {\n                    maxRelatedElementDepth = relatedElementDepth;\n                    deepestRelatedElement = relatedElement;\n                    deepestToolbarDefinition = definition;\n                }\n            }\n        }\n        if (deepestToolbarDefinition) {\n            this._showToolbar(deepestToolbarDefinition, deepestRelatedElement);\n        }\n    }\n    /**\n\t * Hides the given toolbar.\n\t */ _hideToolbar(toolbarDefinition) {\n        this._balloon.remove(toolbarDefinition.view);\n        this.stopListening(this._balloon, 'change:visibleView');\n    }\n    /**\n\t * Shows up the toolbar if the toolbar is not visible.\n\t * Otherwise, repositions the toolbar's balloon when toolbar's view is the most top view in balloon stack.\n\t *\n\t * It might happen here that the toolbar's view is under another view. Then do nothing as the other toolbar view\n\t * should be still visible after the {@link module:ui/editorui/editorui~EditorUI#event:update}.\n\t */ _showToolbar(toolbarDefinition, relatedElement) {\n        if (this._isToolbarVisible(toolbarDefinition)) {\n            repositionContextualBalloon(this.editor, relatedElement);\n        } else if (!this._isToolbarInBalloon(toolbarDefinition)) {\n            if (!toolbarDefinition.initialized) {\n                toolbarDefinition.initialized = true;\n                toolbarDefinition.view.fillFromConfig(toolbarDefinition.itemsConfig, this.editor.ui.componentFactory);\n            }\n            this._balloon.add({\n                view: toolbarDefinition.view,\n                position: getBalloonPositionData(this.editor, relatedElement),\n                balloonClassName: toolbarDefinition.balloonClassName\n            });\n            // Update toolbar position each time stack with toolbar view is switched to visible.\n            // This is in a case target element has changed when toolbar was in invisible stack\n            // e.g. target image was wrapped by a block quote.\n            // See https://github.com/ckeditor/ckeditor5-widget/issues/92.\n            this.listenTo(this._balloon, 'change:visibleView', ()=>{\n                for (const definition of this._toolbarDefinitions.values()){\n                    if (this._isToolbarVisible(definition)) {\n                        const relatedElement = definition.getRelatedElement(this.editor.editing.view.document.selection);\n                        repositionContextualBalloon(this.editor, relatedElement);\n                    }\n                }\n            });\n        }\n    }\n    _isToolbarVisible(toolbar) {\n        return this._balloon.visibleView === toolbar.view;\n    }\n    _isToolbarInBalloon(toolbar) {\n        return this._balloon.hasView(toolbar.view);\n    }\n}\nfunction repositionContextualBalloon(editor, relatedElement) {\n    const balloon = editor.plugins.get('ContextualBalloon');\n    const position = getBalloonPositionData(editor, relatedElement);\n    balloon.updatePosition(position);\n}\nfunction getBalloonPositionData(editor, relatedElement) {\n    const editingView = editor.editing.view;\n    const defaultPositions = BalloonPanelView.defaultPositions;\n    return {\n        target: editingView.domConverter.mapViewToDom(relatedElement),\n        positions: [\n            defaultPositions.northArrowSouth,\n            defaultPositions.northArrowSouthWest,\n            defaultPositions.northArrowSouthEast,\n            defaultPositions.southArrowNorth,\n            defaultPositions.southArrowNorthWest,\n            defaultPositions.southArrowNorthEast,\n            defaultPositions.viewportStickyNorth\n        ]\n    };\n}\nfunction isWidgetSelected(selection) {\n    const viewElement = selection.getSelectedElement();\n    return !!(viewElement && isWidget(viewElement));\n}\n\n/**\n * Stores the internal state of a single resizable object.\n */ class ResizeState extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * The reference point of the resizer where the dragging started. It is used to measure the distance the user cursor\n\t * traveled, so how much the image should be enlarged.\n\t * This information is only known after the DOM was rendered, so it will be updated later.\n\t *\n\t * @internal\n\t */ _referenceCoordinates;\n    /**\n\t * Resizer options.\n\t */ _options;\n    /**\n\t * The original width (pixels) of the resized object when the resize process was started.\n\t *\n\t * @readonly\n\t */ _originalWidth;\n    /**\n\t * The original height (pixels) of the resized object when the resize process was started.\n\t *\n\t * @readonly\n\t */ _originalHeight;\n    /**\n\t * The original width (percents) of the resized object when the resize process was started.\n\t *\n\t * @readonly\n\t */ _originalWidthPercents;\n    /**\n\t * A width to height ratio of the resized image.\n\t *\n\t * @readonly\n\t */ _aspectRatio;\n    /**\n\t * @param options Resizer options.\n\t */ constructor(options){\n        super();\n        this.set('activeHandlePosition', null);\n        this.set('proposedWidthPercents', null);\n        this.set('proposedWidth', null);\n        this.set('proposedHeight', null);\n        this.set('proposedHandleHostWidth', null);\n        this.set('proposedHandleHostHeight', null);\n        this._options = options;\n        this._referenceCoordinates = null;\n    }\n    /**\n\t * The original width (pixels) of the resized object when the resize process was started.\n\t */ get originalWidth() {\n        return this._originalWidth;\n    }\n    /**\n\t * The original height (pixels) of the resized object when the resize process was started.\n\t */ get originalHeight() {\n        return this._originalHeight;\n    }\n    /**\n\t * The original width (percents) of the resized object when the resize process was started.\n\t */ get originalWidthPercents() {\n        return this._originalWidthPercents;\n    }\n    /**\n\t * A width to height ratio of the resized image.\n\t */ get aspectRatio() {\n        return this._aspectRatio;\n    }\n    /**\n\t *\n\t * @param domResizeHandle The handle used to calculate the reference point.\n\t */ begin(domResizeHandle, domHandleHost, domResizeHost) {\n        const clientRect = new Rect(domHandleHost);\n        this.activeHandlePosition = getHandlePosition(domResizeHandle);\n        this._referenceCoordinates = getAbsoluteBoundaryPoint(domHandleHost, getOppositePosition(this.activeHandlePosition));\n        this._originalWidth = clientRect.width;\n        this._originalHeight = clientRect.height;\n        this._aspectRatio = clientRect.width / clientRect.height;\n        const widthStyle = domResizeHost.style.width;\n        if (widthStyle && widthStyle.match(/^\\d+(\\.\\d*)?%$/)) {\n            this._originalWidthPercents = parseFloat(widthStyle);\n        } else {\n            this._originalWidthPercents = calculateResizeHostPercentageWidth(domResizeHost, clientRect);\n        }\n    }\n    update(newSize) {\n        this.proposedWidth = newSize.width;\n        this.proposedHeight = newSize.height;\n        this.proposedWidthPercents = newSize.widthPercents;\n        this.proposedHandleHostWidth = newSize.handleHostWidth;\n        this.proposedHandleHostHeight = newSize.handleHostHeight;\n    }\n}\n/**\n * Returns coordinates of the top-left corner of an element, relative to the document's top-left corner.\n *\n * @param resizerPosition The position of the resize handle, e.g. `\"top-left\"`, `\"bottom-right\"`.\n */ function getAbsoluteBoundaryPoint(element, resizerPosition) {\n    const elementRect = new Rect(element);\n    const positionParts = resizerPosition.split('-');\n    const ret = {\n        x: positionParts[1] == 'right' ? elementRect.right : elementRect.left,\n        y: positionParts[0] == 'bottom' ? elementRect.bottom : elementRect.top\n    };\n    ret.x += element.ownerDocument.defaultView.scrollX;\n    ret.y += element.ownerDocument.defaultView.scrollY;\n    return ret;\n}\n/**\n * @param resizerPosition The expected resizer position, like `\"top-left\"`, `\"bottom-right\"`.\n * @returns A prefixed HTML class name for the resizer element.\n */ function getResizerHandleClass(resizerPosition) {\n    return `ck-widget__resizer__handle-${resizerPosition}`;\n}\n/**\n * Determines the position of a given resize handle.\n *\n * @param domHandle Handle used to calculate the reference point.\n * @returns Returns a string like `\"top-left\"` or `undefined` if not matched.\n */ function getHandlePosition(domHandle) {\n    const resizerPositions = [\n        'top-left',\n        'top-right',\n        'bottom-right',\n        'bottom-left'\n    ];\n    for (const position of resizerPositions){\n        if (domHandle.classList.contains(getResizerHandleClass(position))) {\n            return position;\n        }\n    }\n}\n/**\n * @param position Like `\"top-left\"`.\n * @returns Inverted `position`, e.g. it returns `\"bottom-right\"` if `\"top-left\"` was given as `position`.\n */ function getOppositePosition(position) {\n    const parts = position.split('-');\n    const replacements = {\n        top: 'bottom',\n        bottom: 'top',\n        left: 'right',\n        right: 'left'\n    };\n    return `${replacements[parts[0]]}-${replacements[parts[1]]}`;\n}\n\n/**\n * A view displaying the proposed new element size during the resizing.\n */ class SizeView extends View {\n    constructor(){\n        super();\n        const bind = this.bindTemplate;\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-size-view',\n                    bind.to('_viewPosition', (value)=>value ? `ck-orientation-${value}` : '')\n                ],\n                style: {\n                    display: bind.if('_isVisible', 'none', (visible)=>!visible)\n                }\n            },\n            children: [\n                {\n                    text: bind.to('_label')\n                }\n            ]\n        });\n    }\n    /**\n\t * A method used for binding the `SizeView` instance properties to the `ResizeState` instance observable properties.\n\t *\n\t * @internal\n\t * @param options An object defining the resizer options, used for setting the proper size label.\n\t * @param resizeState The `ResizeState` class instance, used for keeping the `SizeView` state up to date.\n\t */ _bindToState(options, resizeState) {\n        this.bind('_isVisible').to(resizeState, 'proposedWidth', resizeState, 'proposedHeight', (width, height)=>width !== null && height !== null);\n        this.bind('_label').to(resizeState, 'proposedHandleHostWidth', resizeState, 'proposedHandleHostHeight', resizeState, 'proposedWidthPercents', (width, height, widthPercents)=>{\n            if (options.unit === 'px') {\n                return `${width}×${height}`;\n            } else {\n                return `${widthPercents}%`;\n            }\n        });\n        this.bind('_viewPosition').to(resizeState, 'activeHandlePosition', resizeState, 'proposedHandleHostWidth', resizeState, 'proposedHandleHostHeight', // If the widget is too small to contain the size label, display the label above.\n        (position, width, height)=>width < 50 || height < 50 ? 'above-center' : position);\n    }\n    /**\n\t * A method used for cleaning up. It removes the bindings and hides the view.\n\t *\n\t * @internal\n\t */ _dismiss() {\n        this.unbind();\n        this._isVisible = false;\n    }\n}\n\n/**\n * Represents a resizer for a single resizable object.\n */ class Resizer extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t *\n\t * Note that a new state is created for each resize transaction.\n\t */ _state;\n    /**\n\t * A view displaying the proposed new element size during the resizing.\n\t */ _sizeView;\n    /**\n\t * Options passed to the {@link #constructor}.\n\t */ _options;\n    /**\n\t * A wrapper that is controlled by the resizer. This is usually a widget element.\n\t */ _viewResizerWrapper = null;\n    /**\n\t * The width of the resized {@link module:widget/widgetresize~ResizerOptions#viewElement viewElement} before the resizing started.\n\t */ _initialViewWidth;\n    /**\n\t * @param options Resizer options.\n\t */ constructor(options){\n        super();\n        this._options = options;\n        this.set('isEnabled', true);\n        this.set('isSelected', false);\n        this.bind('isVisible').to(this, 'isEnabled', this, 'isSelected', (isEnabled, isSelected)=>isEnabled && isSelected);\n        this.decorate('begin');\n        this.decorate('cancel');\n        this.decorate('commit');\n        this.decorate('updateSize');\n        this.on('commit', (event)=>{\n            // State might not be initialized yet. In this case, prevent further handling and make sure that the resizer is\n            // cleaned up (#5195).\n            if (!this.state.proposedWidth && !this.state.proposedWidthPercents) {\n                this._cleanup();\n                event.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t *\n\t * Note that a new state is created for each resize transaction.\n\t */ get state() {\n        return this._state;\n    }\n    /**\n\t * Makes resizer visible in the UI.\n\t */ show() {\n        const editingView = this._options.editor.editing.view;\n        editingView.change((writer)=>{\n            writer.removeClass('ck-hidden', this._viewResizerWrapper);\n        });\n    }\n    /**\n\t * Hides resizer in the UI.\n\t */ hide() {\n        const editingView = this._options.editor.editing.view;\n        editingView.change((writer)=>{\n            writer.addClass('ck-hidden', this._viewResizerWrapper);\n        });\n    }\n    /**\n\t * Attaches the resizer to the DOM.\n\t */ attach() {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const that = this;\n        const widgetElement = this._options.viewElement;\n        const editingView = this._options.editor.editing.view;\n        editingView.change((writer)=>{\n            const viewResizerWrapper = writer.createUIElement('div', {\n                class: 'ck ck-reset_all ck-widget__resizer'\n            }, function(domDocument) {\n                const domElement = this.toDomElement(domDocument);\n                that._appendHandles(domElement);\n                that._appendSizeUI(domElement);\n                return domElement;\n            });\n            // Append the resizer wrapper to the widget's wrapper.\n            writer.insert(writer.createPositionAt(widgetElement, 'end'), viewResizerWrapper);\n            writer.addClass('ck-widget_with-resizer', widgetElement);\n            this._viewResizerWrapper = viewResizerWrapper;\n            if (!this.isVisible) {\n                this.hide();\n            }\n        });\n        this.on('change:isVisible', ()=>{\n            if (this.isVisible) {\n                this.show();\n                this.redraw();\n            } else {\n                this.hide();\n            }\n        });\n    }\n    /**\n\t * Starts the resizing process.\n\t *\n\t * Creates a new {@link #state} for the current process.\n\t *\n\t * @fires begin\n\t * @param domResizeHandle Clicked handle.\n\t */ begin(domResizeHandle) {\n        this._state = new ResizeState(this._options);\n        this._sizeView._bindToState(this._options, this.state);\n        this._initialViewWidth = this._options.viewElement.getStyle('width');\n        this.state.begin(domResizeHandle, this._getHandleHost(), this._getResizeHost());\n    }\n    /**\n\t * Updates the proposed size based on `domEventData`.\n\t *\n\t * @fires updateSize\n\t */ updateSize(domEventData) {\n        const newSize = this._proposeNewSize(domEventData);\n        const editingView = this._options.editor.editing.view;\n        editingView.change((writer)=>{\n            const unit = this._options.unit || '%';\n            const newWidth = (unit === '%' ? newSize.widthPercents : newSize.width) + unit;\n            writer.setStyle('width', newWidth, this._options.viewElement);\n        });\n        // Get an actual image width, and:\n        // * reflect this size to the resize wrapper\n        // * apply this **real** size to the state\n        const domHandleHost = this._getHandleHost();\n        const domHandleHostRect = new Rect(domHandleHost);\n        const handleHostWidth = Math.round(domHandleHostRect.width);\n        const handleHostHeight = Math.round(domHandleHostRect.height);\n        // Handle max-width limitation.\n        const domResizeHostRect = new Rect(domHandleHost);\n        newSize.width = Math.round(domResizeHostRect.width);\n        newSize.height = Math.round(domResizeHostRect.height);\n        this.redraw(domHandleHostRect);\n        this.state.update({\n            ...newSize,\n            handleHostWidth,\n            handleHostHeight\n        });\n    }\n    /**\n\t * Applies the geometry proposed with the resizer.\n\t *\n\t * @fires commit\n\t */ commit() {\n        const unit = this._options.unit || '%';\n        const newValue = (unit === '%' ? this.state.proposedWidthPercents : this.state.proposedWidth) + unit;\n        // Both cleanup and onCommit callback are very likely to make view changes. Ensure that it is made in a single step.\n        this._options.editor.editing.view.change(()=>{\n            this._cleanup();\n            this._options.onCommit(newValue);\n        });\n    }\n    /**\n\t * Cancels and rejects the proposed resize dimensions, hiding the UI.\n\t *\n\t * @fires cancel\n\t */ cancel() {\n        this._cleanup();\n    }\n    /**\n\t * Destroys the resizer.\n\t */ destroy() {\n        this.cancel();\n    }\n    /**\n\t * Redraws the resizer.\n\t *\n\t * @param handleHostRect Handle host rectangle might be given to improve performance.\n\t */ redraw(handleHostRect) {\n        const domWrapper = this._domResizerWrapper;\n        // Refresh only if resizer exists in the DOM.\n        if (!existsInDom(domWrapper)) {\n            return;\n        }\n        const widgetWrapper = domWrapper.parentElement;\n        const handleHost = this._getHandleHost();\n        const resizerWrapper = this._viewResizerWrapper;\n        const currentDimensions = [\n            resizerWrapper.getStyle('width'),\n            resizerWrapper.getStyle('height'),\n            resizerWrapper.getStyle('left'),\n            resizerWrapper.getStyle('top')\n        ];\n        let newDimensions;\n        if (widgetWrapper.isSameNode(handleHost)) {\n            const clientRect = handleHostRect || new Rect(handleHost);\n            newDimensions = [\n                clientRect.width + 'px',\n                clientRect.height + 'px',\n                undefined,\n                undefined\n            ];\n        } else {\n            newDimensions = [\n                handleHost.offsetWidth + 'px',\n                handleHost.offsetHeight + 'px',\n                handleHost.offsetLeft + 'px',\n                handleHost.offsetTop + 'px'\n            ];\n        }\n        // Make changes to the view only if the resizer should actually get new dimensions.\n        // Otherwise, if View#change() was always called, this would cause EditorUI#update\n        // loops because the WidgetResize plugin listens to EditorUI#update and updates\n        // the resizer.\n        // https://github.com/ckeditor/ckeditor5/issues/7633\n        if (compareArrays(currentDimensions, newDimensions) !== 'same') {\n            this._options.editor.editing.view.change((writer)=>{\n                writer.setStyle({\n                    width: newDimensions[0],\n                    height: newDimensions[1],\n                    left: newDimensions[2],\n                    top: newDimensions[3]\n                }, resizerWrapper);\n            });\n        }\n    }\n    containsHandle(domElement) {\n        return this._domResizerWrapper.contains(domElement);\n    }\n    static isResizeHandle(domElement) {\n        return domElement.classList.contains('ck-widget__resizer__handle');\n    }\n    /**\n\t * Cleans up the context state.\n\t */ _cleanup() {\n        this._sizeView._dismiss();\n        const editingView = this._options.editor.editing.view;\n        editingView.change((writer)=>{\n            writer.setStyle('width', this._initialViewWidth, this._options.viewElement);\n        });\n    }\n    /**\n\t * Calculates the proposed size as the resize handles are dragged.\n\t *\n\t * @param domEventData Event data that caused the size update request. It should be used to calculate the proposed size.\n\t */ _proposeNewSize(domEventData) {\n        const state = this.state;\n        const currentCoordinates = extractCoordinates(domEventData);\n        const isCentered = this._options.isCentered ? this._options.isCentered(this) : true;\n        // Enlargement defines how much the resize host has changed in a given axis. Naturally it could be a negative number\n        // meaning that it has been shrunk.\n        //\n        // +----------------+--+\n        // |                |  |\n        // |       img      |  |\n        // |  /handle host  |  |\n        // +----------------+  | ^\n        // |                   | | - enlarge y\n        // +-------------------+ v\n        // \t\t\t\t\t<-->\n        // \t\t\t\t\t enlarge x\n        const enlargement = {\n            x: state._referenceCoordinates.x - (currentCoordinates.x + state.originalWidth),\n            y: currentCoordinates.y - state.originalHeight - state._referenceCoordinates.y\n        };\n        if (isCentered && state.activeHandlePosition.endsWith('-right')) {\n            enlargement.x = currentCoordinates.x - (state._referenceCoordinates.x + state.originalWidth);\n        }\n        // Objects needs to be resized twice as much in horizontal axis if centered, since enlargement is counted from\n        // one resized corner to your cursor. It needs to be duplicated to compensate for the other side too.\n        if (isCentered) {\n            enlargement.x *= 2;\n        }\n        // const resizeHost = this._getResizeHost();\n        // The size proposed by the user. It does not consider the aspect ratio.\n        let width = Math.abs(state.originalWidth + enlargement.x);\n        let height = Math.abs(state.originalHeight + enlargement.y);\n        // Dominant determination must take the ratio into account.\n        const dominant = width / state.aspectRatio > height ? 'width' : 'height';\n        if (dominant == 'width') {\n            height = width / state.aspectRatio;\n        } else {\n            width = height * state.aspectRatio;\n        }\n        return {\n            width: Math.round(width),\n            height: Math.round(height),\n            widthPercents: Math.min(Math.round(state.originalWidthPercents / state.originalWidth * width * 100) / 100, 100)\n        };\n    }\n    /**\n\t * Obtains the resize host.\n\t *\n\t * Resize host is an object that receives dimensions which are the result of resizing.\n\t */ _getResizeHost() {\n        const widgetWrapper = this._domResizerWrapper.parentElement;\n        return this._options.getResizeHost(widgetWrapper);\n    }\n    /**\n\t * Obtains the handle host.\n\t *\n\t * Handle host is an object that the handles are aligned to.\n\t *\n\t * Handle host will not always be an entire widget itself. Take an image as an example. The image widget\n\t * contains an image and a caption. Only the image should be surrounded with handles.\n\t */ _getHandleHost() {\n        const widgetWrapper = this._domResizerWrapper.parentElement;\n        return this._options.getHandleHost(widgetWrapper);\n    }\n    /**\n\t * DOM container of the entire resize UI.\n\t *\n\t * Note that this property will have a value only after the element bound with the resizer is rendered\n\t * (otherwise `null`).\n\t */ get _domResizerWrapper() {\n        return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper);\n    }\n    /**\n\t * Renders the resize handles in the DOM.\n\t *\n\t * @param domElement The resizer wrapper.\n\t */ _appendHandles(domElement) {\n        const resizerPositions = [\n            'top-left',\n            'top-right',\n            'bottom-right',\n            'bottom-left'\n        ];\n        for (const currentPosition of resizerPositions){\n            domElement.appendChild(new Template({\n                tag: 'div',\n                attributes: {\n                    class: `ck-widget__resizer__handle ${getResizerClass(currentPosition)}`\n                }\n            }).render());\n        }\n    }\n    /**\n\t * Sets up the {@link #_sizeView} property and adds it to the passed `domElement`.\n\t */ _appendSizeUI(domElement) {\n        this._sizeView = new SizeView();\n        // Make sure icon#element is rendered before passing to appendChild().\n        this._sizeView.render();\n        domElement.appendChild(this._sizeView.element);\n    }\n}\n/**\n * @param resizerPosition Expected resizer position like `\"top-left\"`, `\"bottom-right\"`.\n * @returns A prefixed HTML class name for the resizer element\n */ function getResizerClass(resizerPosition) {\n    return `ck-widget__resizer__handle-${resizerPosition}`;\n}\nfunction extractCoordinates(event) {\n    return {\n        x: event.pageX,\n        y: event.pageY\n    };\n}\nfunction existsInDom(element) {\n    return element && element.ownerDocument && element.ownerDocument.contains(element);\n}\n\n/**\n * The widget resize feature plugin.\n *\n * Use the {@link module:widget/widgetresize~WidgetResize#attachTo} method to create a resizer for the specified widget.\n */ class WidgetResize extends Plugin {\n    /**\n\t * A map of resizers created using this plugin instance.\n\t */ _resizers = new Map();\n    _observer;\n    _redrawSelectedResizerThrottled;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'WidgetResize';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editing = this.editor.editing;\n        const domDocument = global.window.document;\n        this.set('selectedResizer', null);\n        this.set('_activeResizer', null);\n        editing.view.addObserver(MouseObserver);\n        this._observer = new (DomEmitterMixin())();\n        this.listenTo(editing.view.document, 'mousedown', this._mouseDownListener.bind(this), {\n            priority: 'high'\n        });\n        this._observer.listenTo(domDocument, 'mousemove', this._mouseMoveListener.bind(this));\n        this._observer.listenTo(domDocument, 'mouseup', this._mouseUpListener.bind(this));\n        this._redrawSelectedResizerThrottled = throttle(()=>this.redrawSelectedResizer(), 200);\n        // Redrawing on any change of the UI of the editor (including content changes).\n        this.editor.ui.on('update', this._redrawSelectedResizerThrottled);\n        // Remove view widget-resizer mappings for widgets that have been removed from the document.\n        // https://github.com/ckeditor/ckeditor5/issues/10156\n        // https://github.com/ckeditor/ckeditor5/issues/10266\n        this.editor.model.document.on('change', ()=>{\n            for (const [viewElement, resizer] of this._resizers){\n                if (!viewElement.isAttached()) {\n                    this._resizers.delete(viewElement);\n                    resizer.destroy();\n                }\n            }\n        }, {\n            priority: 'lowest'\n        });\n        // Resizers need to be redrawn upon window resize, because new window might shrink resize host.\n        this._observer.listenTo(global.window, 'resize', this._redrawSelectedResizerThrottled);\n        const viewSelection = this.editor.editing.view.document.selection;\n        viewSelection.on('change', ()=>{\n            const selectedElement = viewSelection.getSelectedElement();\n            const resizer = this.getResizerByViewElement(selectedElement) || null;\n            if (resizer) {\n                this.select(resizer);\n            } else {\n                this.deselect();\n            }\n        });\n    }\n    /**\n\t * Redraws the selected resizer if there is any selected resizer and if it is visible.\n\t */ redrawSelectedResizer() {\n        if (this.selectedResizer && this.selectedResizer.isVisible) {\n            this.selectedResizer.redraw();\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this._observer.stopListening();\n        for (const resizer of this._resizers.values()){\n            resizer.destroy();\n        }\n        this._redrawSelectedResizerThrottled.cancel();\n    }\n    /**\n\t * Marks resizer as selected.\n\t */ select(resizer) {\n        this.deselect();\n        this.selectedResizer = resizer;\n        this.selectedResizer.isSelected = true;\n    }\n    /**\n\t * Deselects currently set resizer.\n\t */ deselect() {\n        if (this.selectedResizer) {\n            this.selectedResizer.isSelected = false;\n        }\n        this.selectedResizer = null;\n    }\n    /**\n\t * @param options Resizer options.\n\t */ attachTo(options) {\n        const resizer = new Resizer(options);\n        const plugins = this.editor.plugins;\n        resizer.attach();\n        if (plugins.has('WidgetToolbarRepository')) {\n            // Hiding widget toolbar to improve the performance\n            // (https://github.com/ckeditor/ckeditor5-widget/pull/112#issuecomment-564528765).\n            const widgetToolbarRepository = plugins.get('WidgetToolbarRepository');\n            resizer.on('begin', ()=>{\n                widgetToolbarRepository.forceDisabled('resize');\n            }, {\n                priority: 'lowest'\n            });\n            resizer.on('cancel', ()=>{\n                widgetToolbarRepository.clearForceDisabled('resize');\n            }, {\n                priority: 'highest'\n            });\n            resizer.on('commit', ()=>{\n                widgetToolbarRepository.clearForceDisabled('resize');\n            }, {\n                priority: 'highest'\n            });\n        }\n        this._resizers.set(options.viewElement, resizer);\n        const viewSelection = this.editor.editing.view.document.selection;\n        const selectedElement = viewSelection.getSelectedElement();\n        // If the element the resizer is created for is currently focused, it should become visible.\n        if (this.getResizerByViewElement(selectedElement) == resizer) {\n            this.select(resizer);\n        }\n        return resizer;\n    }\n    /**\n\t * Returns a resizer created for a given view element (widget element).\n\t *\n\t * @param viewElement View element associated with the resizer.\n\t */ getResizerByViewElement(viewElement) {\n        return this._resizers.get(viewElement);\n    }\n    /**\n\t * Returns a resizer that contains a given resize handle.\n\t */ _getResizerByHandle(domResizeHandle) {\n        for (const resizer of this._resizers.values()){\n            if (resizer.containsHandle(domResizeHandle)) {\n                return resizer;\n            }\n        }\n    }\n    /**\n\t * @param domEventData Native DOM event.\n\t */ _mouseDownListener(event, domEventData) {\n        const resizeHandle = domEventData.domTarget;\n        if (!Resizer.isResizeHandle(resizeHandle)) {\n            return;\n        }\n        this._activeResizer = this._getResizerByHandle(resizeHandle) || null;\n        if (this._activeResizer) {\n            this._activeResizer.begin(resizeHandle);\n            // Do not call other events when resizing. See: #6755.\n            event.stop();\n            domEventData.preventDefault();\n        }\n    }\n    /**\n\t * @param domEventData Native DOM event.\n\t */ _mouseMoveListener(event, domEventData) {\n        if (this._activeResizer) {\n            this._activeResizer.updateSize(domEventData);\n        }\n    }\n    _mouseUpListener() {\n        if (this._activeResizer) {\n            this._activeResizer.commit();\n            this._activeResizer = null;\n        }\n    }\n}\n\nexport { WIDGET_CLASS_NAME, WIDGET_SELECTED_CLASS_NAME, Widget, WidgetResize, WidgetToolbarRepository, WidgetTypeAround, calculateResizeHostAncestorWidth, calculateResizeHostPercentageWidth, findOptimalInsertionRange, getLabel, isWidget, setHighlightHandling, setLabel, toWidget, toWidgetEditable, viewToModelPositionOutsideModelElement };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { EventInfo, getRangeFromMouseEvent, uid, toUnit, delay, DomEmitterMixin, global, Rect, ResizeObserver, env, createElement } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { DomEventObserver, DataTransfer, Range, MouseObserver, LiveRange } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { mapValues, throttle } from 'lodash-es';\nimport { Widget, isWidget } from '@ckeditor/ckeditor5-widget/dist/index.js';\nimport { View } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * Clipboard events observer.\n *\n * Fires the following events:\n *\n * * {@link module:engine/view/document~Document#event:clipboardInput},\n * * {@link module:engine/view/document~Document#event:paste},\n * * {@link module:engine/view/document~Document#event:copy},\n * * {@link module:engine/view/document~Document#event:cut},\n * * {@link module:engine/view/document~Document#event:drop},\n * * {@link module:engine/view/document~Document#event:dragover},\n * * {@link module:engine/view/document~Document#event:dragging},\n * * {@link module:engine/view/document~Document#event:dragstart},\n * * {@link module:engine/view/document~Document#event:dragend},\n * * {@link module:engine/view/document~Document#event:dragenter},\n * * {@link module:engine/view/document~Document#event:dragleave}.\n *\n * **Note**: This observer is not available by default (ckeditor5-engine does not add it on its own).\n * To make it available, it needs to be added to {@link module:engine/view/document~Document} by using\n * the {@link module:engine/view/view~View#addObserver `View#addObserver()`} method. Alternatively, you can load the\n * {@link module:clipboard/clipboard~Clipboard} plugin which adds this observer automatically (because it uses it).\n */ class ClipboardObserver extends DomEventObserver {\n    domEventType = [\n        'paste',\n        'copy',\n        'cut',\n        'drop',\n        'dragover',\n        'dragstart',\n        'dragend',\n        'dragenter',\n        'dragleave'\n    ];\n    constructor(view){\n        super(view);\n        const viewDocument = this.document;\n        this.listenTo(viewDocument, 'paste', handleInput('clipboardInput'), {\n            priority: 'low'\n        });\n        this.listenTo(viewDocument, 'drop', handleInput('clipboardInput'), {\n            priority: 'low'\n        });\n        this.listenTo(viewDocument, 'dragover', handleInput('dragging'), {\n            priority: 'low'\n        });\n        function handleInput(type) {\n            return (evt, data)=>{\n                data.preventDefault();\n                const targetRanges = data.dropRange ? [\n                    data.dropRange\n                ] : null;\n                const eventInfo = new EventInfo(viewDocument, type);\n                viewDocument.fire(eventInfo, {\n                    dataTransfer: data.dataTransfer,\n                    method: evt.name,\n                    targetRanges,\n                    target: data.target,\n                    domEvent: data.domEvent\n                });\n                // If CKEditor handled the input, do not bubble the original event any further.\n                // This helps external integrations recognize that fact and act accordingly.\n                // https://github.com/ckeditor/ckeditor5-upload/issues/92\n                if (eventInfo.stop.called) {\n                    data.stopPropagation();\n                }\n            };\n        }\n    }\n    onDomEvent(domEvent) {\n        const nativeDataTransfer = 'clipboardData' in domEvent ? domEvent.clipboardData : domEvent.dataTransfer;\n        const cacheFiles = domEvent.type == 'drop' || domEvent.type == 'paste';\n        const evtData = {\n            dataTransfer: new DataTransfer(nativeDataTransfer, {\n                cacheFiles\n            })\n        };\n        if (domEvent.type == 'drop' || domEvent.type == 'dragover') {\n            const domRange = getRangeFromMouseEvent(domEvent);\n            evtData.dropRange = domRange && this.view.domConverter.domRangeToView(domRange);\n        }\n        this.fire(domEvent.type, domEvent, evtData);\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module clipboard/utils/plaintexttohtml\n */ /**\n * Converts plain text to its HTML-ized version.\n *\n * @param text The plain text to convert.\n * @returns HTML generated from the plain text.\n */ function plainTextToHtml(text) {\n    text = text// Encode &.\n    .replace(/&/g, '&amp;')// Encode <>.\n    .replace(/</g, '&lt;').replace(/>/g, '&gt;')// Creates a paragraph for each double line break.\n    .replace(/\\r?\\n\\r?\\n/g, '</p><p>')// Creates a line break for each single line break.\n    .replace(/\\r?\\n/g, '<br>')// Replace tabs with four spaces.\n    .replace(/\\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;')// Preserve trailing spaces (only the first and last one – the rest is handled below).\n    .replace(/^\\s/, '&nbsp;').replace(/\\s$/, '&nbsp;')// Preserve other subsequent spaces now.\n    .replace(/\\s\\s/g, ' &nbsp;');\n    if (text.includes('</p><p>') || text.includes('<br>')) {\n        // If we created paragraphs above, add the trailing ones.\n        text = `<p>${text}</p>`;\n    }\n    // TODO:\n    // * What about '\\nfoo' vs ' foo'?\n    return text;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module clipboard/utils/normalizeclipboarddata\n */ /**\n * Removes some popular browser quirks out of the clipboard data (HTML).\n * Removes all HTML comments. These are considered an internal thing and it makes little sense if they leak into the editor data.\n *\n * @param data The HTML data to normalize.\n * @returns Normalized HTML.\n */ function normalizeClipboardData(data) {\n    return data.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g, (fullMatch, spaces)=>{\n        // Handle the most popular and problematic case when even a single space becomes an nbsp;.\n        // Decode those to normal spaces. Read more in https://github.com/ckeditor/ckeditor5-clipboard/issues/2.\n        if (spaces.length == 1) {\n            return ' ';\n        }\n        return spaces;\n    })// Remove all HTML comments.\n    .replace(/<!--[\\s\\S]*?-->/g, '');\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module clipboard/utils/viewtoplaintext\n */ // Elements which should not have empty-line padding.\n// Most `view.ContainerElement` want to be separate by new-line, but some are creating one structure\n// together (like `<li>`) so it is better to separate them by only one \"\\n\".\nconst smallPaddingElements = [\n    'figcaption',\n    'li'\n];\nconst listElements = [\n    'ol',\n    'ul'\n];\n/**\n * Converts {@link module:engine/view/item~Item view item} and all of its children to plain text.\n *\n * @param viewItem View item to convert.\n * @returns Plain text representation of `viewItem`.\n */ function viewToPlainText(viewItem) {\n    if (viewItem.is('$text') || viewItem.is('$textProxy')) {\n        return viewItem.data;\n    }\n    if (viewItem.is('element', 'img') && viewItem.hasAttribute('alt')) {\n        return viewItem.getAttribute('alt');\n    }\n    if (viewItem.is('element', 'br')) {\n        return '\\n'; // Convert soft breaks to single line break (#8045).\n    }\n    /**\n\t * Item is a document fragment, attribute element or container element. It doesn't\n\t * have it's own text value, so we need to convert its children elements.\n\t */ let text = '';\n    let prev = null;\n    for (const child of viewItem.getChildren()){\n        text += newLinePadding(child, prev) + viewToPlainText(child);\n        prev = child;\n    }\n    return text;\n}\n/**\n * Returns new line padding to prefix the given elements with.\n */ function newLinePadding(element, previous) {\n    if (!previous) {\n        // Don't add padding to first elements in a level.\n        return '';\n    }\n    if (element.is('element', 'li') && !element.isEmpty && element.getChild(0).is('containerElement')) {\n        // Separate document list items with empty lines.\n        return '\\n\\n';\n    }\n    if (listElements.includes(element.name) && listElements.includes(previous.name)) {\n        /**\n\t\t * Because `<ul>` and `<ol>` are AttributeElements, two consecutive lists will not have any padding between\n\t\t * them (see the `if` statement below). To fix this, we need to make an exception for this case.\n\t\t */ return '\\n\\n';\n    }\n    if (!element.is('containerElement') && !previous.is('containerElement')) {\n        // Don't add padding between non-container elements.\n        return '';\n    }\n    if (smallPaddingElements.includes(element.name) || smallPaddingElements.includes(previous.name)) {\n        // Add small padding between selected container elements.\n        return '\\n';\n    }\n    // Do not add padding around the elements that won't be rendered.\n    if (element.is('element') && element.getCustomProperty('dataPipeline:transparentRendering') || previous.is('element') && previous.getCustomProperty('dataPipeline:transparentRendering')) {\n        return '';\n    }\n    // Add empty lines between container elements.\n    return '\\n\\n';\n}\n\n/**\n * Part of the clipboard logic. Responsible for collecting markers from selected fragments\n * and restoring them with proper positions in pasted elements.\n *\n * @internal\n */ class ClipboardMarkersUtils extends Plugin {\n    /**\n\t * Map of marker names that can be copied.\n\t *\n\t * @internal\n\t */ _markersToCopy = new Map();\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ClipboardMarkersUtils';\n    }\n    /**\n\t * Registers marker name as copyable in clipboard pipeline.\n\t *\n\t * @param markerName Name of marker that can be copied.\n\t * @param config Configuration that describes what can be performed on specified marker.\n\t * @internal\n\t */ _registerMarkerToCopy(markerName, config) {\n        this._markersToCopy.set(markerName, config);\n    }\n    /**\n\t * Performs copy markers on provided selection and paste it to fragment returned from `getCopiedFragment`.\n\t *\n\t * \t1. Picks all markers in provided selection.\n\t * \t2. Inserts fake markers to document.\n\t * \t3. Gets copied selection fragment from document.\n\t * \t4. Removes fake elements from fragment and document.\n\t * \t5. Inserts markers in the place of removed fake markers.\n\t *\n\t * Due to selection modification, when inserting items, `getCopiedFragment` must *always* operate on `writer.model.document.selection'.\n\t * Do not use any other custom selection object within callback, as this will lead to out-of-bounds exceptions in rare scenarios.\n\t *\n\t * @param action Type of clipboard action.\n\t * @param writer An instance of the model writer.\n\t * @param selection Selection to be checked.\n\t * @param getCopiedFragment\tCallback that performs copy of selection and returns it as fragment.\n\t * @internal\n\t */ _copySelectedFragmentWithMarkers(action, selection, getCopiedFragment = (writer)=>writer.model.getSelectedContent(writer.model.document.selection)) {\n        return this.editor.model.change((writer)=>{\n            const oldSelection = writer.model.document.selection;\n            // In some scenarios, such like in drag & drop, passed `selection` parameter is not actually\n            // the same `selection` as the `writer.model.document.selection` which means that `_insertFakeMarkersToSelection`\n            // is not affecting passed `selection` `start` and `end` positions but rather modifies `writer.model.document.selection`.\n            //\n            // It is critical due to fact that when we have selection that starts [ 0, 0 ] and ends at [ 1, 0 ]\n            // and after inserting fake marker it will point to such marker instead of new widget position at start: [ 1, 0 ] end: [2, 0 ].\n            // `writer.insert` modifies only original `writer.model.document.selection`.\n            writer.setSelection(selection);\n            const sourceSelectionInsertedMarkers = this._insertFakeMarkersIntoSelection(writer, writer.model.document.selection, action);\n            const fragment = getCopiedFragment(writer);\n            const fakeMarkersRangesInsideRange = this._removeFakeMarkersInsideElement(writer, fragment);\n            // <fake-marker> [Foo] Bar</fake-marker>\n            //      ^                    ^\n            // In `_insertFakeMarkersIntoSelection` call we inserted fake marker just before first element.\n            // The problem is that the first element can be start position of selection so insertion fake-marker\n            // before such element shifts selection (so selection that was at [0, 0] now is at [0, 1]).\n            // It means that inserted fake-marker is no longer present inside such selection and is orphaned.\n            // This function checks special case of such problem. Markers that are orphaned at the start position\n            // and end position in the same time. Basically it means that they overlaps whole element.\n            for (const [markerName, elements] of Object.entries(sourceSelectionInsertedMarkers)){\n                fakeMarkersRangesInsideRange[markerName] ||= writer.createRangeIn(fragment);\n                for (const element of elements){\n                    writer.remove(element);\n                }\n            }\n            fragment.markers.clear();\n            for (const [markerName, range] of Object.entries(fakeMarkersRangesInsideRange)){\n                fragment.markers.set(markerName, range);\n            }\n            // Revert back selection to previous one.\n            writer.setSelection(oldSelection);\n            return fragment;\n        });\n    }\n    /**\n\t * Performs paste of markers on already pasted element.\n\t *\n\t * \t1. Inserts fake markers that are present in fragment element (such fragment will be processed in `getPastedDocumentElement`).\n\t * \t2. Calls `getPastedDocumentElement` and gets element that is inserted into root model.\n\t * \t3. Removes all fake markers present in transformed element.\n\t * \t4. Inserts new markers with removed fake markers ranges into pasted fragment.\n\t *\n\t * There are multiple edge cases that have to be considered before calling this function:\n\t *\n\t * \t* `markers` are inserted into the same element that must be later transformed inside `getPastedDocumentElement`.\n\t * \t* Fake marker elements inside `getPastedDocumentElement` can be cloned, but their ranges cannot overlap.\n\t * \t* If `duplicateOnPaste` is `true` in marker config then associated marker ID is regenerated before pasting.\n\t *\n\t * @param action Type of clipboard action.\n\t * @param markers Object that maps marker name to corresponding range.\n\t * @param getPastedDocumentElement Getter used to get target markers element.\n\t * @internal\n\t */ _pasteMarkersIntoTransformedElement(markers, getPastedDocumentElement) {\n        const pasteMarkers = this._getPasteMarkersFromRangeMap(markers);\n        return this.editor.model.change((writer)=>{\n            // Inserts fake markers into source fragment / element that is later transformed inside `getPastedDocumentElement`.\n            const sourceFragmentFakeMarkers = this._insertFakeMarkersElements(writer, pasteMarkers);\n            // Modifies document fragment (for example, cloning table cells) and then inserts it into the document.\n            const transformedElement = getPastedDocumentElement(writer);\n            // Removes markers in pasted and transformed fragment in root document.\n            const removedFakeMarkers = this._removeFakeMarkersInsideElement(writer, transformedElement);\n            // Cleans up fake markers inserted into source fragment (that one before transformation which is not pasted).\n            for (const element of Object.values(sourceFragmentFakeMarkers).flat()){\n                writer.remove(element);\n            }\n            // Inserts to root document fake markers.\n            for (const [markerName, range] of Object.entries(removedFakeMarkers)){\n                if (!writer.model.markers.has(markerName)) {\n                    writer.addMarker(markerName, {\n                        usingOperation: true,\n                        affectsData: true,\n                        range\n                    });\n                }\n            }\n            return transformedElement;\n        });\n    }\n    /**\n\t * Pastes document fragment with markers to document.\n\t * If `duplicateOnPaste` is `true` in marker config then associated markers IDs\n\t * are regenerated before pasting to avoid markers duplications in content.\n\t *\n\t * @param fragment Document fragment that should contain already processed by pipeline markers.\n\t * @internal\n\t */ _pasteFragmentWithMarkers(fragment) {\n        const pasteMarkers = this._getPasteMarkersFromRangeMap(fragment.markers);\n        fragment.markers.clear();\n        for (const copyableMarker of pasteMarkers){\n            fragment.markers.set(copyableMarker.name, copyableMarker.range);\n        }\n        return this.editor.model.insertContent(fragment);\n    }\n    /**\n\t * In some situations we have to perform copy on selected fragment with certain markers. This function allows to temporarily bypass\n\t * restrictions on markers that we want to copy.\n\t *\n\t * This function executes `executor()` callback. For the duration of the callback, if the clipboard pipeline is used to copy\n\t * content, markers with the specified name will be copied to the clipboard as well.\n\t *\n\t * @param markerName Which markers should be copied.\n\t * @param executor Callback executed.\n\t * @param config Optional configuration flags used to copy (such like partial copy flag).\n\t * @internal\n\t */ _forceMarkersCopy(markerName, executor, config = {\n        allowedActions: 'all',\n        copyPartiallySelected: true,\n        duplicateOnPaste: true\n    }) {\n        const before = this._markersToCopy.get(markerName);\n        this._markersToCopy.set(markerName, config);\n        executor();\n        if (before) {\n            this._markersToCopy.set(markerName, before);\n        } else {\n            this._markersToCopy.delete(markerName);\n        }\n    }\n    /**\n\t * Checks if marker can be copied.\n\t *\n\t * @param markerName Name of checked marker.\n\t * @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t * @internal\n\t */ _isMarkerCopyable(markerName, action) {\n        const config = this._getMarkerClipboardConfig(markerName);\n        if (!config) {\n            return false;\n        }\n        // If there is no action provided then only presence of marker is checked.\n        if (!action) {\n            return true;\n        }\n        const { allowedActions } = config;\n        return allowedActions === 'all' || allowedActions.includes(action);\n    }\n    /**\n\t * Checks if marker has any clipboard copy behavior configuration.\n\t *\n\t * @param markerName Name of checked marker.\n\t */ _hasMarkerConfiguration(markerName) {\n        return !!this._getMarkerClipboardConfig(markerName);\n    }\n    /**\n\t * Returns marker's configuration flags passed during registration.\n\t *\n\t * @param markerName Name of marker that should be returned.\n\t * @internal\n\t */ _getMarkerClipboardConfig(markerName) {\n        const [markerNamePrefix] = markerName.split(':');\n        return this._markersToCopy.get(markerNamePrefix) || null;\n    }\n    /**\n\t * First step of copying markers. It looks for markers intersecting with given selection and inserts `$marker` elements\n\t * at positions where document markers start or end. This way `$marker` elements can be easily copied together with\n\t * the rest of the content of the selection.\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param selection Selection to be checked.\n\t * @param action Type of clipboard action.\n\t */ _insertFakeMarkersIntoSelection(writer, selection, action) {\n        const copyableMarkers = this._getCopyableMarkersFromSelection(writer, selection, action);\n        return this._insertFakeMarkersElements(writer, copyableMarkers);\n    }\n    /**\n\t * Returns array of markers that can be copied in specified selection.\n\t *\n\t * If marker cannot be copied partially (according to `copyPartiallySelected` configuration flag) and\n\t * is not present entirely in any selection range then it will be skipped.\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param selection  Selection which will be checked.\n\t * @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t */ _getCopyableMarkersFromSelection(writer, selection, action) {\n        const selectionRanges = Array.from(selection.getRanges());\n        // Picks all markers in provided ranges. Ensures that there are no duplications if\n        // there are multiple ranges that intersects with the same marker.\n        const markersInRanges = new Set(selectionRanges.flatMap((selectionRange)=>Array.from(writer.model.markers.getMarkersIntersectingRange(selectionRange))));\n        const isSelectionMarkerCopyable = (marker)=>{\n            // Check if marker exists in configuration and provided action can be performed on it.\n            const isCopyable = this._isMarkerCopyable(marker.name, action);\n            if (!isCopyable) {\n                return false;\n            }\n            // Checks if configuration disallows to copy marker only if part of its content is selected.\n            //\n            // Example:\n            // \t<marker-a> Hello [ World ] </marker-a>\n            //\t\t\t\t\t\t^ selection\n            //\n            // In this scenario `marker-a` won't be copied because selection doesn't overlap its content entirely.\n            const { copyPartiallySelected } = this._getMarkerClipboardConfig(marker.name);\n            if (!copyPartiallySelected) {\n                const markerRange = marker.getRange();\n                return selectionRanges.some((selectionRange)=>selectionRange.containsRange(markerRange, true));\n            }\n            return true;\n        };\n        return Array.from(markersInRanges).filter(isSelectionMarkerCopyable).map((copyableMarker)=>{\n            // During `dragstart` event original marker is still present in tree.\n            // It is removed after the clipboard drop event, so none of the copied markers are inserted at the end.\n            // It happens because there already markers with specified `marker.name` when clipboard is trying to insert data\n            // and it aborts inserting.\n            const name = action === 'dragstart' ? this._getUniqueMarkerName(copyableMarker.name) : copyableMarker.name;\n            return {\n                name,\n                range: copyableMarker.getRange()\n            };\n        });\n    }\n    /**\n\t * Picks all markers from markers map that can be pasted.\n\t * If `duplicateOnPaste` is `true`, it regenerates their IDs to ensure uniqueness.\n\t * If marker is not registered, it will be kept in the array anyway.\n\t *\n\t * @param markers Object that maps marker name to corresponding range.\n\t * @param action Type of clipboard action. If null then checks only if marker is registered as copyable.\n\t */ _getPasteMarkersFromRangeMap(markers, action = null) {\n        const { model } = this.editor;\n        const entries = markers instanceof Map ? Array.from(markers.entries()) : Object.entries(markers);\n        return entries.flatMap(([markerName, range])=>{\n            if (!this._hasMarkerConfiguration(markerName)) {\n                return [\n                    {\n                        name: markerName,\n                        range\n                    }\n                ];\n            }\n            if (this._isMarkerCopyable(markerName, action)) {\n                const copyMarkerConfig = this._getMarkerClipboardConfig(markerName);\n                const isInGraveyard = model.markers.has(markerName) && model.markers.get(markerName).getRange().root.rootName === '$graveyard';\n                if (copyMarkerConfig.duplicateOnPaste || isInGraveyard) {\n                    markerName = this._getUniqueMarkerName(markerName);\n                }\n                return [\n                    {\n                        name: markerName,\n                        range\n                    }\n                ];\n            }\n            return [];\n        });\n    }\n    /**\n\t * Inserts specified array of fake markers elements to document and assigns them `type` and `name` attributes.\n\t * Fake markers elements are used to calculate position of markers on pasted fragment that were transformed during\n\t * steps between copy and paste.\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param markers Array of markers that will be inserted.\n\t */ _insertFakeMarkersElements(writer, markers) {\n        const mappedMarkers = {};\n        const sortedMarkers = markers.flatMap((marker)=>{\n            const { start, end } = marker.range;\n            return [\n                {\n                    position: start,\n                    marker,\n                    type: 'start'\n                },\n                {\n                    position: end,\n                    marker,\n                    type: 'end'\n                }\n            ];\n        })// Markers position is sorted backwards to ensure that the insertion of fake markers will not change\n        // the position of the next markers.\n        .sort(({ position: posA }, { position: posB })=>posA.isBefore(posB) ? 1 : -1);\n        for (const { position, marker, type } of sortedMarkers){\n            const fakeMarker = writer.createElement('$marker', {\n                'data-name': marker.name,\n                'data-type': type\n            });\n            if (!mappedMarkers[marker.name]) {\n                mappedMarkers[marker.name] = [];\n            }\n            mappedMarkers[marker.name].push(fakeMarker);\n            writer.insert(fakeMarker, position);\n        }\n        return mappedMarkers;\n    }\n    /**\n\t * Removes all `$marker` elements from the given document fragment.\n\t *\n\t * Returns an object where keys are marker names, and values are ranges corresponding to positions\n\t * where `$marker` elements were inserted.\n\t *\n\t * If the document fragment had only one `$marker` element for given marker (start or end) the other boundary is set automatically\n\t * (to the end or start of the document fragment, respectively).\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param rootElement The element to be checked.\n\t */ _removeFakeMarkersInsideElement(writer, rootElement) {\n        const fakeMarkersElements = this._getAllFakeMarkersFromElement(writer, rootElement);\n        const fakeMarkersRanges = fakeMarkersElements.reduce((acc, fakeMarker)=>{\n            const position = fakeMarker.markerElement && writer.createPositionBefore(fakeMarker.markerElement);\n            let prevFakeMarker = acc[fakeMarker.name];\n            // Handle scenario when tables clone cells with the same fake node. Example:\n            //\n            // <cell><fake-marker-a></cell> <cell><fake-marker-a></cell> <cell><fake-marker-a></cell>\n            //                                          ^ cloned                    ^ cloned\n            //\n            // The easiest way to bypass this issue is to rename already existing in map nodes and\n            // set them new unique name.\n            let skipAssign = false;\n            if (prevFakeMarker && prevFakeMarker.start && prevFakeMarker.end) {\n                const config = this._getMarkerClipboardConfig(fakeMarker.name);\n                if (config.duplicateOnPaste) {\n                    acc[this._getUniqueMarkerName(fakeMarker.name)] = acc[fakeMarker.name];\n                } else {\n                    skipAssign = true;\n                }\n                prevFakeMarker = null;\n            }\n            if (!skipAssign) {\n                acc[fakeMarker.name] = {\n                    ...prevFakeMarker,\n                    [fakeMarker.type]: position\n                };\n            }\n            if (fakeMarker.markerElement) {\n                writer.remove(fakeMarker.markerElement);\n            }\n            return acc;\n        }, {});\n        // We cannot construct ranges directly in previous reduce because element ranges can overlap.\n        // In other words lets assume we have such scenario:\n        // <fake-marker-start /> <paragraph /> <fake-marker-2-start /> <fake-marker-end /> <fake-marker-2-end />\n        //\n        // We have to remove `fake-marker-start` firstly and then remove `fake-marker-2-start`.\n        // Removal of `fake-marker-2-start` affects `fake-marker-end` position so we cannot create\n        // connection between `fake-marker-start` and `fake-marker-end` without iterating whole set firstly.\n        return mapValues(fakeMarkersRanges, (range)=>new Range(range.start || writer.createPositionFromPath(rootElement, [\n                0\n            ]), range.end || writer.createPositionAt(rootElement, 'end')));\n    }\n    /**\n\t * Returns array that contains list of fake markers with corresponding `$marker` elements.\n\t *\n\t * For each marker, there can be two `$marker` elements or only one (if the document fragment contained\n\t * only the beginning or only the end of a marker).\n\t *\n\t * @param writer An instance of the model writer.\n\t * @param rootElement The element to be checked.\n\t */ _getAllFakeMarkersFromElement(writer, rootElement) {\n        const foundFakeMarkers = Array.from(writer.createRangeIn(rootElement)).flatMap(({ item })=>{\n            if (!item.is('element', '$marker')) {\n                return [];\n            }\n            const name = item.getAttribute('data-name');\n            const type = item.getAttribute('data-type');\n            return [\n                {\n                    markerElement: item,\n                    name,\n                    type\n                }\n            ];\n        });\n        const prependFakeMarkers = [];\n        const appendFakeMarkers = [];\n        for (const fakeMarker of foundFakeMarkers){\n            if (fakeMarker.type === 'end') {\n                // <fake-marker> [ phrase</fake-marker> phrase ]\n                //   ^\n                // Handle case when marker is just before start of selection.\n                // Only end marker is inside selection.\n                const hasMatchingStartMarker = foundFakeMarkers.some((otherFakeMarker)=>otherFakeMarker.name === fakeMarker.name && otherFakeMarker.type === 'start');\n                if (!hasMatchingStartMarker) {\n                    prependFakeMarkers.push({\n                        markerElement: null,\n                        name: fakeMarker.name,\n                        type: 'start'\n                    });\n                }\n            }\n            if (fakeMarker.type === 'start') {\n                // [<fake-marker>phrase]</fake-marker>\n                //                           ^\n                // Handle case when fake marker is after selection.\n                // Only start marker is inside selection.\n                const hasMatchingEndMarker = foundFakeMarkers.some((otherFakeMarker)=>otherFakeMarker.name === fakeMarker.name && otherFakeMarker.type === 'end');\n                if (!hasMatchingEndMarker) {\n                    appendFakeMarkers.unshift({\n                        markerElement: null,\n                        name: fakeMarker.name,\n                        type: 'end'\n                    });\n                }\n            }\n        }\n        return [\n            ...prependFakeMarkers,\n            ...foundFakeMarkers,\n            ...appendFakeMarkers\n        ];\n    }\n    /**\n\t * When copy of markers occurs we have to make sure that pasted markers have different names\n\t * than source markers. This functions helps with assigning unique part to marker name to\n\t * prevent duplicated markers error.\n\t *\n\t * @param name Name of marker\n\t */ _getUniqueMarkerName(name) {\n        const parts = name.split(':');\n        const newId = uid().substring(1, 6);\n        // It looks like the marker already is UID marker so in this scenario just swap\n        // last part of marker name and assign new UID.\n        //\n        // example: comment:{ threadId }:{ id } => comment:{ threadId }:{ newId }\n        if (parts.length === 3) {\n            return `${parts.slice(0, 2).join(':')}:${newId}`;\n        }\n        // Assign new segment to marker name with id.\n        //\n        // example: comment => comment:{ newId }\n        return `${parts.join(':')}:${newId}`;\n    }\n}\n\n// Input pipeline events overview:\n//\n//              ┌──────────────────────┐          ┌──────────────────────┐\n//              │     view.Document    │          │     view.Document    │\n//              │         paste        │          │         drop         │\n//              └───────────┬──────────┘          └───────────┬──────────┘\n//                          │                                 │\n//                          └────────────────┌────────────────┘\n//                                           │\n//                                 ┌─────────V────────┐\n//                                 │   view.Document  │   Retrieves text/html or text/plain from data.dataTransfer\n//                                 │  clipboardInput  │   and processes it to view.DocumentFragment.\n//                                 └─────────┬────────┘\n//                                           │\n//                               ┌───────────V───────────┐\n//                               │   ClipboardPipeline   │   Converts view.DocumentFragment to model.DocumentFragment.\n//                               │  inputTransformation  │\n//                               └───────────┬───────────┘\n//                                           │\n//                                ┌──────────V──────────┐\n//                                │  ClipboardPipeline  │   Calls model.insertContent().\n//                                │   contentInsertion  │\n//                                └─────────────────────┘\n//\n//\n// Output pipeline events overview:\n//\n//              ┌──────────────────────┐          ┌──────────────────────┐\n//              │     view.Document    │          │     view.Document    │   Retrieves the selected model.DocumentFragment\n//              │         copy         │          │          cut         │   and fires the `outputTransformation` event.\n//              └───────────┬──────────┘          └───────────┬──────────┘\n//                          │                                 │\n//                          └────────────────┌────────────────┘\n//                                           │\n//                               ┌───────────V───────────┐\n//                               │   ClipboardPipeline   │   Processes model.DocumentFragment and converts it to\n//                               │  outputTransformation │   view.DocumentFragment.\n//                               └───────────┬───────────┘\n//                                           │\n//                                 ┌─────────V────────┐\n//                                 │   view.Document  │   Processes view.DocumentFragment to text/html and text/plain\n//                                 │  clipboardOutput │   and stores the results in data.dataTransfer.\n//                                 └──────────────────┘\n//\n/**\n * The clipboard pipeline feature. It is responsible for intercepting the `paste` and `drop` events and\n * passing the pasted content through a series of events in order to insert it into the editor's content.\n * It also handles the `cut` and `copy` events to fill the native clipboard with the serialized editor's data.\n *\n * # Input pipeline\n *\n * The behavior of the default handlers (all at a `low` priority):\n *\n * ## Event: `paste` or `drop`\n *\n * 1. Translates the event data.\n * 2. Fires the {@link module:engine/view/document~Document#event:clipboardInput `view.Document#clipboardInput`} event.\n *\n * ## Event: `view.Document#clipboardInput`\n *\n * 1. If the `data.content` event field is already set (by some listener on a higher priority), it takes this content and fires the event\n *    from the last point.\n * 2. Otherwise, it retrieves `text/html` or `text/plain` from `data.dataTransfer`.\n * 3. Normalizes the raw data by applying simple filters on string data.\n * 4. Processes the raw data to {@link module:engine/view/documentfragment~DocumentFragment `view.DocumentFragment`} with the\n *    {@link module:engine/controller/datacontroller~DataController#htmlProcessor `DataController#htmlProcessor`}.\n * 5. Fires the {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation\n *   `ClipboardPipeline#inputTransformation`} event with the view document fragment in the `data.content` event field.\n *\n * ## Event: `ClipboardPipeline#inputTransformation`\n *\n * 1. Converts {@link module:engine/view/documentfragment~DocumentFragment `view.DocumentFragment`} from the `data.content` field to\n *    {@link module:engine/model/documentfragment~DocumentFragment `model.DocumentFragment`}.\n * 2. Fires the {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:contentInsertion `ClipboardPipeline#contentInsertion`}\n *    event with the model document fragment in the `data.content` event field.\n *    **Note**: The `ClipboardPipeline#contentInsertion` event is fired within a model change block to allow other handlers\n *    to run in the same block without post-fixers called in between (i.e., the selection post-fixer).\n *\n * ## Event: `ClipboardPipeline#contentInsertion`\n *\n * 1. Calls {@link module:engine/model/model~Model#insertContent `model.insertContent()`} to insert `data.content`\n *    at the current selection position.\n *\n * # Output pipeline\n *\n * The behavior of the default handlers (all at a `low` priority):\n *\n * ## Event: `copy`, `cut` or `dragstart`\n *\n * 1. Retrieves the selected {@link module:engine/model/documentfragment~DocumentFragment `model.DocumentFragment`} by calling\n *    {@link module:engine/model/model~Model#getSelectedContent `model#getSelectedContent()`}.\n * 2. Converts the model document fragment to {@link module:engine/view/documentfragment~DocumentFragment `view.DocumentFragment`}.\n * 3. Fires the {@link module:engine/view/document~Document#event:clipboardOutput `view.Document#clipboardOutput`} event\n *    with the view document fragment in the `data.content` event field.\n *\n * ## Event: `view.Document#clipboardOutput`\n *\n * 1. Processes `data.content` to HTML and plain text with the\n *    {@link module:engine/controller/datacontroller~DataController#htmlProcessor `DataController#htmlProcessor`}.\n * 2. Updates the `data.dataTransfer` data for `text/html` and `text/plain` with the processed data.\n * 3. For the `cut` method, calls {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}\n *    on the current selection.\n *\n * Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n */ class ClipboardPipeline extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ClipboardPipeline';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ClipboardMarkersUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        view.addObserver(ClipboardObserver);\n        this._setupPasteDrop();\n        this._setupCopyCut();\n    }\n    /**\n\t * Fires Clipboard `'outputTransformation'` event for given parameters.\n\t *\n\t * @internal\n\t */ _fireOutputTransformationEvent(dataTransfer, selection, method) {\n        const clipboardMarkersUtils = this.editor.plugins.get('ClipboardMarkersUtils');\n        this.editor.model.enqueueChange({\n            isUndoable: method === 'cut'\n        }, ()=>{\n            const documentFragment = clipboardMarkersUtils._copySelectedFragmentWithMarkers(method, selection);\n            this.fire('outputTransformation', {\n                dataTransfer,\n                content: documentFragment,\n                method\n            });\n        });\n    }\n    /**\n\t * The clipboard paste pipeline.\n\t */ _setupPasteDrop() {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const clipboardMarkersUtils = this.editor.plugins.get('ClipboardMarkersUtils');\n        // Pasting is disabled when selection is in non-editable place.\n        // Dropping is disabled in drag and drop handler.\n        this.listenTo(viewDocument, 'clipboardInput', (evt, data)=>{\n            if (data.method == 'paste' && !editor.model.canEditAt(editor.model.document.selection)) {\n                evt.stop();\n            }\n        }, {\n            priority: 'highest'\n        });\n        this.listenTo(viewDocument, 'clipboardInput', (evt, data)=>{\n            const dataTransfer = data.dataTransfer;\n            let content;\n            // Some feature could already inject content in the higher priority event handler (i.e., codeBlock).\n            if (data.content) {\n                content = data.content;\n            } else {\n                let contentData = '';\n                if (dataTransfer.getData('text/html')) {\n                    contentData = normalizeClipboardData(dataTransfer.getData('text/html'));\n                } else if (dataTransfer.getData('text/plain')) {\n                    contentData = plainTextToHtml(dataTransfer.getData('text/plain'));\n                }\n                content = this.editor.data.htmlProcessor.toView(contentData);\n            }\n            const eventInfo = new EventInfo(this, 'inputTransformation');\n            this.fire(eventInfo, {\n                content,\n                dataTransfer,\n                targetRanges: data.targetRanges,\n                method: data.method\n            });\n            // If CKEditor handled the input, do not bubble the original event any further.\n            // This helps external integrations recognize this fact and act accordingly.\n            // https://github.com/ckeditor/ckeditor5-upload/issues/92\n            if (eventInfo.stop.called) {\n                evt.stop();\n            }\n            view.scrollToTheSelection();\n        }, {\n            priority: 'low'\n        });\n        this.listenTo(this, 'inputTransformation', (evt, data)=>{\n            if (data.content.isEmpty) {\n                return;\n            }\n            const dataController = this.editor.data;\n            // Convert the pasted content into a model document fragment.\n            // The conversion is contextual, but in this case an \"all allowed\" context is needed\n            // and for that we use the $clipboardHolder item.\n            const modelFragment = dataController.toModel(data.content, '$clipboardHolder');\n            if (modelFragment.childCount == 0) {\n                return;\n            }\n            evt.stop();\n            // Fire content insertion event in a single change block to allow other handlers to run in the same block\n            // without post-fixers called in between (i.e., the selection post-fixer).\n            model.change(()=>{\n                this.fire('contentInsertion', {\n                    content: modelFragment,\n                    method: data.method,\n                    dataTransfer: data.dataTransfer,\n                    targetRanges: data.targetRanges\n                });\n            });\n        }, {\n            priority: 'low'\n        });\n        this.listenTo(this, 'contentInsertion', (evt, data)=>{\n            data.resultRange = clipboardMarkersUtils._pasteFragmentWithMarkers(data.content);\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * The clipboard copy/cut pipeline.\n\t */ _setupCopyCut() {\n        const editor = this.editor;\n        const modelDocument = editor.model.document;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const onCopyCut = (evt, data)=>{\n            const dataTransfer = data.dataTransfer;\n            data.preventDefault();\n            this._fireOutputTransformationEvent(dataTransfer, modelDocument.selection, evt.name);\n        };\n        this.listenTo(viewDocument, 'copy', onCopyCut, {\n            priority: 'low'\n        });\n        this.listenTo(viewDocument, 'cut', (evt, data)=>{\n            // Cutting is disabled when selection is in non-editable place.\n            // See: https://github.com/ckeditor/ckeditor5-clipboard/issues/26.\n            if (!editor.model.canEditAt(editor.model.document.selection)) {\n                data.preventDefault();\n            } else {\n                onCopyCut(evt, data);\n            }\n        }, {\n            priority: 'low'\n        });\n        this.listenTo(this, 'outputTransformation', (evt, data)=>{\n            const content = editor.data.toView(data.content);\n            viewDocument.fire('clipboardOutput', {\n                dataTransfer: data.dataTransfer,\n                content,\n                method: data.method\n            });\n        }, {\n            priority: 'low'\n        });\n        this.listenTo(viewDocument, 'clipboardOutput', (evt, data)=>{\n            if (!data.content.isEmpty) {\n                data.dataTransfer.setData('text/html', this.editor.data.htmlProcessor.toData(data.content));\n                data.dataTransfer.setData('text/plain', viewToPlainText(data.content));\n            }\n            if (data.method == 'cut') {\n                editor.model.deleteContent(modelDocument.selection);\n            }\n        }, {\n            priority: 'low'\n        });\n    }\n}\n\nconst toPx = /* #__PURE__ */ toUnit('px');\n/**\n * The horizontal drop target line view.\n */ class LineView extends View {\n    /**\n\t * @inheritDoc\n\t */ constructor(){\n        super();\n        const bind = this.bindTemplate;\n        this.set({\n            isVisible: false,\n            left: null,\n            top: null,\n            width: null\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-clipboard-drop-target-line',\n                    bind.if('isVisible', 'ck-hidden', (value)=>!value)\n                ],\n                style: {\n                    left: bind.to('left', (left)=>toPx(left)),\n                    top: bind.to('top', (top)=>toPx(top)),\n                    width: bind.to('width', (width)=>toPx(width))\n                }\n            }\n        });\n    }\n}\n\n/**\n * Part of the Drag and Drop handling. Responsible for finding and displaying the drop target.\n *\n * @internal\n */ class DragDropTarget extends Plugin {\n    /**\n\t * A delayed callback removing the drop marker.\n\t *\n\t * @internal\n\t */ removeDropMarkerDelayed = delay(()=>this.removeDropMarker(), 40);\n    /**\n\t * A throttled callback updating the drop marker.\n\t */ _updateDropMarkerThrottled = throttle((targetRange)=>this._updateDropMarker(targetRange), 40);\n    /**\n\t * A throttled callback reconverting the drop parker.\n\t */ _reconvertMarkerThrottled = throttle(()=>{\n        if (this.editor.model.markers.has('drop-target')) {\n            this.editor.editing.reconvertMarker('drop-target');\n        }\n    }, 0);\n    /**\n\t * The horizontal drop target line view.\n\t */ _dropTargetLineView = new LineView();\n    /**\n\t * DOM Emitter.\n\t */ _domEmitter = new (DomEmitterMixin())();\n    /**\n\t * Map of document scrollable elements.\n\t */ _scrollables = new Map();\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'DragDropTarget';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        this._setupDropMarker();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this._domEmitter.stopListening();\n        for (const { resizeObserver } of this._scrollables.values()){\n            resizeObserver.destroy();\n        }\n        this._updateDropMarkerThrottled.cancel();\n        this.removeDropMarkerDelayed.cancel();\n        this._reconvertMarkerThrottled.cancel();\n        return super.destroy();\n    }\n    /**\n\t * Finds the drop target range and updates the drop marker.\n\t *\n\t * @internal\n\t */ updateDropMarker(targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange) {\n        this.removeDropMarkerDelayed.cancel();\n        const targetRange = findDropTargetRange(this.editor, targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange);\n        /* istanbul ignore next -- @preserve */ if (!targetRange) {\n            return;\n        }\n        if (draggedRange && draggedRange.containsRange(targetRange)) {\n            // Target range is inside the dragged range.\n            return this.removeDropMarker();\n        }\n        this._updateDropMarkerThrottled(targetRange);\n    }\n    /**\n\t * Finds the final drop target range.\n\t *\n\t * @internal\n\t */ getFinalDropRange(targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange) {\n        const targetRange = findDropTargetRange(this.editor, targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange);\n        // The dragging markers must be removed after searching for the target range because sometimes\n        // the target lands on the marker itself.\n        this.removeDropMarker();\n        return targetRange;\n    }\n    /**\n\t * Removes the drop target marker.\n\t *\n\t * @internal\n\t */ removeDropMarker() {\n        const model = this.editor.model;\n        this.removeDropMarkerDelayed.cancel();\n        this._updateDropMarkerThrottled.cancel();\n        this._dropTargetLineView.isVisible = false;\n        if (model.markers.has('drop-target')) {\n            model.change((writer)=>{\n                writer.removeMarker('drop-target');\n            });\n        }\n    }\n    /**\n\t * Creates downcast conversion for the drop target marker.\n\t */ _setupDropMarker() {\n        const editor = this.editor;\n        editor.ui.view.body.add(this._dropTargetLineView);\n        // Drop marker conversion for hovering over widgets.\n        editor.conversion.for('editingDowncast').markerToHighlight({\n            model: 'drop-target',\n            view: {\n                classes: [\n                    'ck-clipboard-drop-target-range'\n                ]\n            }\n        });\n        // Drop marker conversion for in text and block drop target.\n        editor.conversion.for('editingDowncast').markerToElement({\n            model: 'drop-target',\n            view: (data, { writer })=>{\n                // Inline drop.\n                if (editor.model.schema.checkChild(data.markerRange.start, '$text')) {\n                    this._dropTargetLineView.isVisible = false;\n                    return this._createDropTargetPosition(writer);\n                } else {\n                    if (data.markerRange.isCollapsed) {\n                        this._updateDropTargetLine(data.markerRange);\n                    } else {\n                        this._dropTargetLineView.isVisible = false;\n                    }\n                }\n            }\n        });\n    }\n    /**\n\t * Updates the drop target marker to the provided range.\n\t *\n\t * @param targetRange The range to set the marker to.\n\t */ _updateDropMarker(targetRange) {\n        const editor = this.editor;\n        const markers = editor.model.markers;\n        editor.model.change((writer)=>{\n            if (markers.has('drop-target')) {\n                if (!markers.get('drop-target').getRange().isEqual(targetRange)) {\n                    writer.updateMarker('drop-target', {\n                        range: targetRange\n                    });\n                }\n            } else {\n                writer.addMarker('drop-target', {\n                    range: targetRange,\n                    usingOperation: false,\n                    affectsData: false\n                });\n            }\n        });\n    }\n    /**\n\t * Creates the UI element for vertical (in-line) drop target.\n\t */ _createDropTargetPosition(writer) {\n        return writer.createUIElement('span', {\n            class: 'ck ck-clipboard-drop-target-position'\n        }, function(domDocument) {\n            const domElement = this.toDomElement(domDocument);\n            // Using word joiner to make this marker as high as text and also making text not break on marker.\n            domElement.append('\\u2060', domDocument.createElement('span'), '\\u2060');\n            return domElement;\n        });\n    }\n    /**\n\t * Updates the horizontal drop target line.\n\t */ _updateDropTargetLine(range) {\n        const editing = this.editor.editing;\n        const nodeBefore = range.start.nodeBefore;\n        const nodeAfter = range.start.nodeAfter;\n        const nodeParent = range.start.parent;\n        const viewElementBefore = nodeBefore ? editing.mapper.toViewElement(nodeBefore) : null;\n        const domElementBefore = viewElementBefore ? editing.view.domConverter.mapViewToDom(viewElementBefore) : null;\n        const viewElementAfter = nodeAfter ? editing.mapper.toViewElement(nodeAfter) : null;\n        const domElementAfter = viewElementAfter ? editing.view.domConverter.mapViewToDom(viewElementAfter) : null;\n        const viewElementParent = editing.mapper.toViewElement(nodeParent);\n        if (!viewElementParent) {\n            return;\n        }\n        const domElementParent = editing.view.domConverter.mapViewToDom(viewElementParent);\n        const domScrollableRect = this._getScrollableRect(viewElementParent);\n        const { scrollX, scrollY } = global.window;\n        const rectBefore = domElementBefore ? new Rect(domElementBefore) : null;\n        const rectAfter = domElementAfter ? new Rect(domElementAfter) : null;\n        const rectParent = new Rect(domElementParent).excludeScrollbarsAndBorders();\n        const above = rectBefore ? rectBefore.bottom : rectParent.top;\n        const below = rectAfter ? rectAfter.top : rectParent.bottom;\n        const parentStyle = global.window.getComputedStyle(domElementParent);\n        const top = above <= below ? (above + below) / 2 : below;\n        if (domScrollableRect.top < top && top < domScrollableRect.bottom) {\n            const left = rectParent.left + parseFloat(parentStyle.paddingLeft);\n            const right = rectParent.right - parseFloat(parentStyle.paddingRight);\n            const leftClamped = Math.max(left + scrollX, domScrollableRect.left);\n            const rightClamped = Math.min(right + scrollX, domScrollableRect.right);\n            this._dropTargetLineView.set({\n                isVisible: true,\n                left: leftClamped,\n                top: top + scrollY,\n                width: rightClamped - leftClamped\n            });\n        } else {\n            this._dropTargetLineView.isVisible = false;\n        }\n    }\n    /**\n\t * Finds the closest scrollable element rect for the given view element.\n\t */ _getScrollableRect(viewElement) {\n        const rootName = viewElement.root.rootName;\n        let domScrollable;\n        if (this._scrollables.has(rootName)) {\n            domScrollable = this._scrollables.get(rootName).domElement;\n        } else {\n            const domElement = this.editor.editing.view.domConverter.mapViewToDom(viewElement);\n            domScrollable = findScrollableElement(domElement);\n            this._domEmitter.listenTo(domScrollable, 'scroll', this._reconvertMarkerThrottled, {\n                usePassive: true\n            });\n            const resizeObserver = new ResizeObserver(domScrollable, this._reconvertMarkerThrottled);\n            this._scrollables.set(rootName, {\n                domElement: domScrollable,\n                resizeObserver\n            });\n        }\n        return new Rect(domScrollable).excludeScrollbarsAndBorders();\n    }\n}\n/**\n * Returns fixed selection range for given position and target element.\n */ function findDropTargetRange(editor, targetViewElement, targetViewRanges, clientX, clientY, blockMode, draggedRange) {\n    const model = editor.model;\n    const mapper = editor.editing.mapper;\n    const targetModelElement = getClosestMappedModelElement(editor, targetViewElement);\n    let modelElement = targetModelElement;\n    while(modelElement){\n        if (!blockMode) {\n            if (model.schema.checkChild(modelElement, '$text')) {\n                if (targetViewRanges) {\n                    const targetViewPosition = targetViewRanges[0].start;\n                    const targetModelPosition = mapper.toModelPosition(targetViewPosition);\n                    const canDropOnPosition = !draggedRange || Array.from(draggedRange.getItems()).every((item)=>model.schema.checkChild(targetModelPosition, item));\n                    if (canDropOnPosition) {\n                        if (model.schema.checkChild(targetModelPosition, '$text')) {\n                            return model.createRange(targetModelPosition);\n                        } else if (targetViewPosition) {\n                            // This is the case of dropping inside a span wrapper of an inline image.\n                            return findDropTargetRangeForElement(editor, getClosestMappedModelElement(editor, targetViewPosition.parent), clientX, clientY);\n                        }\n                    }\n                }\n            } else if (model.schema.isInline(modelElement)) {\n                return findDropTargetRangeForElement(editor, modelElement, clientX, clientY);\n            }\n        }\n        if (model.schema.isBlock(modelElement)) {\n            return findDropTargetRangeForElement(editor, modelElement, clientX, clientY);\n        } else if (model.schema.checkChild(modelElement, '$block')) {\n            const childNodes = Array.from(modelElement.getChildren()).filter((node)=>node.is('element') && !shouldIgnoreElement(editor, node));\n            let startIndex = 0;\n            let endIndex = childNodes.length;\n            if (endIndex == 0) {\n                return model.createRange(model.createPositionAt(modelElement, 'end'));\n            }\n            while(startIndex < endIndex - 1){\n                const middleIndex = Math.floor((startIndex + endIndex) / 2);\n                const side = findElementSide(editor, childNodes[middleIndex], clientX, clientY);\n                if (side == 'before') {\n                    endIndex = middleIndex;\n                } else {\n                    startIndex = middleIndex;\n                }\n            }\n            return findDropTargetRangeForElement(editor, childNodes[startIndex], clientX, clientY);\n        }\n        modelElement = modelElement.parent;\n    }\n    return null;\n}\n/**\n * Returns true for elements which should be ignored.\n */ function shouldIgnoreElement(editor, modelElement) {\n    const mapper = editor.editing.mapper;\n    const domConverter = editor.editing.view.domConverter;\n    const viewElement = mapper.toViewElement(modelElement);\n    if (!viewElement) {\n        return true;\n    }\n    const domElement = domConverter.mapViewToDom(viewElement);\n    return global.window.getComputedStyle(domElement).float != 'none';\n}\n/**\n * Returns target range relative to the given element.\n */ function findDropTargetRangeForElement(editor, modelElement, clientX, clientY) {\n    const model = editor.model;\n    return model.createRange(model.createPositionAt(modelElement, findElementSide(editor, modelElement, clientX, clientY)));\n}\n/**\n * Resolves whether drop marker should be before or after the given element.\n */ function findElementSide(editor, modelElement, clientX, clientY) {\n    const mapper = editor.editing.mapper;\n    const domConverter = editor.editing.view.domConverter;\n    const viewElement = mapper.toViewElement(modelElement);\n    const domElement = domConverter.mapViewToDom(viewElement);\n    const rect = new Rect(domElement);\n    if (editor.model.schema.isInline(modelElement)) {\n        return clientX < (rect.left + rect.right) / 2 ? 'before' : 'after';\n    } else {\n        return clientY < (rect.top + rect.bottom) / 2 ? 'before' : 'after';\n    }\n}\n/**\n * Returns the closest model element for the specified view element.\n */ function getClosestMappedModelElement(editor, element) {\n    const mapper = editor.editing.mapper;\n    const view = editor.editing.view;\n    const targetModelElement = mapper.toModelElement(element);\n    if (targetModelElement) {\n        return targetModelElement;\n    }\n    // Find mapped ancestor if the target is inside not mapped element (for example inline code element).\n    const viewPosition = view.createPositionBefore(element);\n    const viewElement = mapper.findMappedViewAncestor(viewPosition);\n    return mapper.toModelElement(viewElement);\n}\n/**\n * Returns the closest scrollable ancestor DOM element.\n *\n * It is assumed that `domNode` is attached to the document.\n */ function findScrollableElement(domNode) {\n    let domElement = domNode;\n    do {\n        domElement = domElement.parentElement;\n        const overflow = global.window.getComputedStyle(domElement).overflowY;\n        if (overflow == 'auto' || overflow == 'scroll') {\n            break;\n        }\n    }while (domElement.tagName != 'BODY')\n    return domElement;\n}\n\n/**\n * Integration of a block Drag and Drop support with the block toolbar.\n *\n * @internal\n */ class DragDropBlockToolbar extends Plugin {\n    /**\n\t * Whether current dragging is started by block toolbar button dragging.\n\t */ _isBlockDragging = false;\n    /**\n\t * DOM Emitter.\n\t */ _domEmitter = new (DomEmitterMixin())();\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'DragDropBlockToolbar';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        this.listenTo(editor, 'change:isReadOnly', (evt, name, isReadOnly)=>{\n            if (isReadOnly) {\n                this.forceDisabled('readOnlyMode');\n                this._isBlockDragging = false;\n            } else {\n                this.clearForceDisabled('readOnlyMode');\n            }\n        });\n        if (env.isAndroid) {\n            this.forceDisabled('noAndroidSupport');\n        }\n        if (editor.plugins.has('BlockToolbar')) {\n            const blockToolbar = editor.plugins.get('BlockToolbar');\n            const element = blockToolbar.buttonView.element;\n            this._domEmitter.listenTo(element, 'dragstart', (evt, data)=>this._handleBlockDragStart(data));\n            this._domEmitter.listenTo(global.document, 'dragover', (evt, data)=>this._handleBlockDragging(data));\n            this._domEmitter.listenTo(global.document, 'drop', (evt, data)=>this._handleBlockDragging(data));\n            this._domEmitter.listenTo(global.document, 'dragend', ()=>this._handleBlockDragEnd(), {\n                useCapture: true\n            });\n            if (this.isEnabled) {\n                element.setAttribute('draggable', 'true');\n            }\n            this.on('change:isEnabled', (evt, name, isEnabled)=>{\n                element.setAttribute('draggable', isEnabled ? 'true' : 'false');\n            });\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this._domEmitter.stopListening();\n        return super.destroy();\n    }\n    /**\n\t * The `dragstart` event handler.\n\t */ _handleBlockDragStart(domEvent) {\n        if (!this.isEnabled) {\n            return;\n        }\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const view = this.editor.editing.view;\n        const blocks = Array.from(selection.getSelectedBlocks());\n        const draggedRange = model.createRange(model.createPositionBefore(blocks[0]), model.createPositionAfter(blocks[blocks.length - 1]));\n        model.change((writer)=>writer.setSelection(draggedRange));\n        this._isBlockDragging = true;\n        view.focus();\n        view.getObserver(ClipboardObserver).onDomEvent(domEvent);\n    }\n    /**\n\t * The `dragover` and `drop` event handler.\n\t */ _handleBlockDragging(domEvent) {\n        if (!this.isEnabled || !this._isBlockDragging) {\n            return;\n        }\n        const clientX = domEvent.clientX + (this.editor.locale.contentLanguageDirection == 'ltr' ? 100 : -100);\n        const clientY = domEvent.clientY;\n        const target = document.elementFromPoint(clientX, clientY);\n        const view = this.editor.editing.view;\n        if (!target || !target.closest('.ck-editor__editable')) {\n            return;\n        }\n        view.getObserver(ClipboardObserver).onDomEvent({\n            ...domEvent,\n            type: domEvent.type,\n            dataTransfer: domEvent.dataTransfer,\n            target,\n            clientX,\n            clientY,\n            preventDefault: ()=>domEvent.preventDefault(),\n            stopPropagation: ()=>domEvent.stopPropagation()\n        });\n    }\n    /**\n\t * The `dragend` event handler.\n\t */ _handleBlockDragEnd() {\n        this._isBlockDragging = false;\n    }\n}\n\n// Drag and drop events overview:\n//\n//                ┌──────────────────┐\n//                │     mousedown    │   Sets the draggable attribute.\n//                └─────────┬────────┘\n//                          │\n//                          └─────────────────────┐\n//                          │                     │\n//                          │           ┌─────────V────────┐\n//                          │           │      mouseup     │   Dragging did not start, removes the draggable attribute.\n//                          │           └──────────────────┘\n//                          │\n//                ┌─────────V────────┐   Retrieves the selected model.DocumentFragment\n//                │     dragstart    │   and converts it to view.DocumentFragment.\n//                └─────────┬────────┘\n//                          │\n//                ┌─────────V────────┐   Processes view.DocumentFragment to text/html and text/plain\n//                │  clipboardOutput │   and stores the results in data.dataTransfer.\n//                └─────────┬────────┘\n//                          │\n//                          │   DOM dragover\n//                          ┌────────────┐\n//                          │            │\n//                ┌─────────V────────┐   │\n//                │     dragging     │   │   Updates the drop target marker.\n//                └─────────┬────────┘   │\n//                          │            │\n//            ┌─────────────└────────────┘\n//            │             │            │\n//            │   ┌─────────V────────┐   │\n//            │   │     dragleave    │   │   Removes the drop target marker.\n//            │   └─────────┬────────┘   │\n//            │             │            │\n//        ┌───│─────────────┘            │\n//        │   │             │            │\n//        │   │   ┌─────────V────────┐   │\n//        │   │   │     dragenter    │   │   Focuses the editor view.\n//        │   │   └─────────┬────────┘   │\n//        │   │             │            │\n//        │   │             └────────────┘\n//        │   │\n//        │   └─────────────┐\n//        │   │             │\n//        │   │   ┌─────────V────────┐\n//        └───┐   │       drop       │   (The default handler of the clipboard pipeline).\n//            │   └─────────┬────────┘\n//            │             │\n//            │   ┌─────────V────────┐   Resolves the final data.targetRanges.\n//            │   │  clipboardInput  │   Aborts if dropping on dragged content.\n//            │   └─────────┬────────┘\n//            │             │\n//            │   ┌─────────V────────┐\n//            │   │  clipboardInput  │   (The default handler of the clipboard pipeline).\n//            │   └─────────┬────────┘\n//            │             │\n//            │ ┌───────────V───────────┐\n//            │ │  inputTransformation  │   (The default handler of the clipboard pipeline).\n//            │ └───────────┬───────────┘\n//            │             │\n//            │  ┌──────────V──────────┐\n//            │  │   contentInsertion  │   Updates the document selection to drop range.\n//            │  └──────────┬──────────┘\n//            │             │\n//            │  ┌──────────V──────────┐\n//            │  │   contentInsertion  │   (The default handler of the clipboard pipeline).\n//            │  └──────────┬──────────┘\n//            │             │\n//            │  ┌──────────V──────────┐\n//            │  │   contentInsertion  │   Removes the content from the original range if the insertion was successful.\n//            │  └──────────┬──────────┘\n//            │             │\n//            └─────────────┐\n//                          │\n//                ┌─────────V────────┐\n//                │      dragend     │   Removes the drop marker and cleans the state.\n//                └──────────────────┘\n//\n/**\n * The drag and drop feature. It works on top of the {@link module:clipboard/clipboardpipeline~ClipboardPipeline}.\n *\n * Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n *\n * @internal\n */ class DragDrop extends Plugin {\n    /**\n\t * The live range over the original content that is being dragged.\n\t */ _draggedRange;\n    /**\n\t * The UID of current dragging that is used to verify if the drop started in the same editor as the drag start.\n\t *\n\t * **Note**: This is a workaround for broken 'dragend' events (they are not fired if the source text node got removed).\n\t */ _draggingUid;\n    /**\n\t * The reference to the model element that currently has a `draggable` attribute set (it is set while dragging).\n\t */ _draggableElement;\n    /**\n\t * A delayed callback removing draggable attributes.\n\t */ _clearDraggableAttributesDelayed = delay(()=>this._clearDraggableAttributes(), 40);\n    /**\n\t * Whether the dragged content can be dropped only in block context.\n\t */ // TODO handle drag from other editor instance\n    // TODO configure to use block, inline or both\n    _blockMode = false;\n    /**\n\t * DOM Emitter.\n\t */ _domEmitter = new (DomEmitterMixin())();\n    /**\n\t * The DOM element used to generate dragged preview image.\n\t */ _previewContainer;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'DragDrop';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ClipboardPipeline,\n            Widget,\n            DragDropTarget,\n            DragDropBlockToolbar\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        this._draggedRange = null;\n        this._draggingUid = '';\n        this._draggableElement = null;\n        view.addObserver(ClipboardObserver);\n        view.addObserver(MouseObserver);\n        this._setupDragging();\n        this._setupContentInsertionIntegration();\n        this._setupClipboardInputIntegration();\n        this._setupDraggableAttributeHandling();\n        this.listenTo(editor, 'change:isReadOnly', (evt, name, isReadOnly)=>{\n            if (isReadOnly) {\n                this.forceDisabled('readOnlyMode');\n            } else {\n                this.clearForceDisabled('readOnlyMode');\n            }\n        });\n        this.on('change:isEnabled', (evt, name, isEnabled)=>{\n            if (!isEnabled) {\n                this._finalizeDragging(false);\n            }\n        });\n        if (env.isAndroid) {\n            this.forceDisabled('noAndroidSupport');\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        if (this._draggedRange) {\n            this._draggedRange.detach();\n            this._draggedRange = null;\n        }\n        if (this._previewContainer) {\n            this._previewContainer.remove();\n        }\n        this._domEmitter.stopListening();\n        this._clearDraggableAttributesDelayed.cancel();\n        return super.destroy();\n    }\n    /**\n\t * Drag and drop events handling.\n\t */ _setupDragging() {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const dragDropTarget = editor.plugins.get(DragDropTarget);\n        // The handler for the drag start; it is responsible for setting data transfer object.\n        this.listenTo(viewDocument, 'dragstart', (evt, data)=>{\n            // Don't drag the editable element itself.\n            if (data.target && data.target.is('editableElement')) {\n                data.preventDefault();\n                return;\n            }\n            this._prepareDraggedRange(data.target);\n            if (!this._draggedRange) {\n                data.preventDefault();\n                return;\n            }\n            this._draggingUid = uid();\n            data.dataTransfer.effectAllowed = this.isEnabled ? 'copyMove' : 'copy';\n            data.dataTransfer.setData('application/ckeditor5-dragging-uid', this._draggingUid);\n            const draggedSelection = model.createSelection(this._draggedRange.toRange());\n            const clipboardPipeline = this.editor.plugins.get('ClipboardPipeline');\n            clipboardPipeline._fireOutputTransformationEvent(data.dataTransfer, draggedSelection, 'dragstart');\n            const { dataTransfer, domTarget, domEvent } = data;\n            const { clientX } = domEvent;\n            this._updatePreview({\n                dataTransfer,\n                domTarget,\n                clientX\n            });\n            data.stopPropagation();\n            if (!this.isEnabled) {\n                this._draggedRange.detach();\n                this._draggedRange = null;\n                this._draggingUid = '';\n            }\n        }, {\n            priority: 'low'\n        });\n        // The handler for finalizing drag and drop. It should always be triggered after dragging completes\n        // even if it was completed in a different application.\n        // Note: This is not fired if source text node got removed while downcasting a marker.\n        this.listenTo(viewDocument, 'dragend', (evt, data)=>{\n            this._finalizeDragging(!data.dataTransfer.isCanceled && data.dataTransfer.dropEffect == 'move');\n        }, {\n            priority: 'low'\n        });\n        // Reset block dragging mode even if dropped outside the editable.\n        this._domEmitter.listenTo(global.document, 'dragend', ()=>{\n            this._blockMode = false;\n        }, {\n            useCapture: true\n        });\n        // Dragging over the editable.\n        this.listenTo(viewDocument, 'dragenter', ()=>{\n            if (!this.isEnabled) {\n                return;\n            }\n            view.focus();\n        });\n        // Dragging out of the editable.\n        this.listenTo(viewDocument, 'dragleave', ()=>{\n            // We do not know if the mouse left the editor or just some element in it, so let us wait a few milliseconds\n            // to check if 'dragover' is not fired.\n            dragDropTarget.removeDropMarkerDelayed();\n        });\n        // Handler for moving dragged content over the target area.\n        this.listenTo(viewDocument, 'dragging', (evt, data)=>{\n            if (!this.isEnabled) {\n                data.dataTransfer.dropEffect = 'none';\n                return;\n            }\n            const { clientX, clientY } = data.domEvent;\n            dragDropTarget.updateDropMarker(data.target, data.targetRanges, clientX, clientY, this._blockMode, this._draggedRange);\n            // If this is content being dragged from another editor, moving out of current editor instance\n            // is not possible until 'dragend' event case will be fixed.\n            if (!this._draggedRange) {\n                data.dataTransfer.dropEffect = 'copy';\n            }\n            // In Firefox it is already set and effect allowed remains the same as originally set.\n            if (!env.isGecko) {\n                if (data.dataTransfer.effectAllowed == 'copy') {\n                    data.dataTransfer.dropEffect = 'copy';\n                } else if ([\n                    'all',\n                    'copyMove'\n                ].includes(data.dataTransfer.effectAllowed)) {\n                    data.dataTransfer.dropEffect = 'move';\n                }\n            }\n            evt.stop();\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * Integration with the `clipboardInput` event.\n\t */ _setupClipboardInputIntegration() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const dragDropTarget = editor.plugins.get(DragDropTarget);\n        // Update the event target ranges and abort dropping if dropping over itself.\n        this.listenTo(viewDocument, 'clipboardInput', (evt, data)=>{\n            if (data.method != 'drop') {\n                return;\n            }\n            const { clientX, clientY } = data.domEvent;\n            const targetRange = dragDropTarget.getFinalDropRange(data.target, data.targetRanges, clientX, clientY, this._blockMode, this._draggedRange);\n            if (!targetRange) {\n                this._finalizeDragging(false);\n                evt.stop();\n                return;\n            }\n            // Since we cannot rely on the drag end event, we must check if the local drag range is from the current drag and drop\n            // or it is from some previous not cleared one.\n            if (this._draggedRange && this._draggingUid != data.dataTransfer.getData('application/ckeditor5-dragging-uid')) {\n                this._draggedRange.detach();\n                this._draggedRange = null;\n                this._draggingUid = '';\n            }\n            // Do not do anything if some content was dragged within the same document to the same position.\n            const isMove = getFinalDropEffect(data.dataTransfer) == 'move';\n            if (isMove && this._draggedRange && this._draggedRange.containsRange(targetRange, true)) {\n                this._finalizeDragging(false);\n                evt.stop();\n                return;\n            }\n            // Override the target ranges with the one adjusted to the best one for a drop.\n            data.targetRanges = [\n                editor.editing.mapper.toViewRange(targetRange)\n            ];\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * Integration with the `contentInsertion` event of the clipboard pipeline.\n\t */ _setupContentInsertionIntegration() {\n        const clipboardPipeline = this.editor.plugins.get(ClipboardPipeline);\n        clipboardPipeline.on('contentInsertion', (evt, data)=>{\n            if (!this.isEnabled || data.method !== 'drop') {\n                return;\n            }\n            // Update the selection to the target range in the same change block to avoid selection post-fixing\n            // and to be able to clone text attributes for plain text dropping.\n            const ranges = data.targetRanges.map((viewRange)=>this.editor.editing.mapper.toModelRange(viewRange));\n            this.editor.model.change((writer)=>writer.setSelection(ranges));\n        }, {\n            priority: 'high'\n        });\n        clipboardPipeline.on('contentInsertion', (evt, data)=>{\n            if (!this.isEnabled || data.method !== 'drop') {\n                return;\n            }\n            // Remove dragged range content, remove markers, clean after dragging.\n            const isMove = getFinalDropEffect(data.dataTransfer) == 'move';\n            // Whether any content was inserted (insertion might fail if the schema is disallowing some elements\n            // (for example an image caption allows only the content of a block but not blocks themselves.\n            // Some integrations might not return valid range (i.e., table pasting).\n            const isSuccess = !data.resultRange || !data.resultRange.isCollapsed;\n            this._finalizeDragging(isSuccess && isMove);\n        }, {\n            priority: 'lowest'\n        });\n    }\n    /**\n\t * Adds listeners that add the `draggable` attribute to the elements while the mouse button is down so the dragging could start.\n\t */ _setupDraggableAttributeHandling() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        // Add the 'draggable' attribute to the widget while pressing the selection handle.\n        // This is required for widgets to be draggable. In Chrome it will enable dragging text nodes.\n        this.listenTo(viewDocument, 'mousedown', (evt, data)=>{\n            // The lack of data can be caused by editor tests firing fake mouse events. This should not occur\n            // in real-life scenarios but this greatly simplifies editor tests that would otherwise fail a lot.\n            if (env.isAndroid || !data) {\n                return;\n            }\n            this._clearDraggableAttributesDelayed.cancel();\n            // Check if this is a mousedown over the widget (but not a nested editable).\n            let draggableElement = findDraggableWidget(data.target);\n            // Note: There is a limitation that if more than a widget is selected (a widget and some text)\n            // and dragging starts on the widget, then only the widget is dragged.\n            // If this was not a widget then we should check if we need to drag some text content.\n            // In Chrome set a 'draggable' attribute on closest editable to allow immediate dragging of the selected text range.\n            // In Firefox this is not needed. In Safari it makes the whole editable draggable (not just textual content).\n            // Disabled in read-only mode because draggable=\"true\" + contenteditable=\"false\" results\n            // in not firing selectionchange event ever, which makes the selection stuck in read-only mode.\n            if (env.isBlink && !editor.isReadOnly && !draggableElement && !viewDocument.selection.isCollapsed) {\n                const selectedElement = viewDocument.selection.getSelectedElement();\n                if (!selectedElement || !isWidget(selectedElement)) {\n                    draggableElement = viewDocument.selection.editableElement;\n                }\n            }\n            if (draggableElement) {\n                view.change((writer)=>{\n                    writer.setAttribute('draggable', 'true', draggableElement);\n                });\n                // Keep the reference to the model element in case the view element gets removed while dragging.\n                this._draggableElement = editor.editing.mapper.toModelElement(draggableElement);\n            }\n        });\n        // Remove the draggable attribute in case no dragging started (only mousedown + mouseup).\n        this.listenTo(viewDocument, 'mouseup', ()=>{\n            if (!env.isAndroid) {\n                this._clearDraggableAttributesDelayed();\n            }\n        });\n    }\n    /**\n\t * Removes the `draggable` attribute from the element that was used for dragging.\n\t */ _clearDraggableAttributes() {\n        const editing = this.editor.editing;\n        editing.view.change((writer)=>{\n            // Remove 'draggable' attribute.\n            if (this._draggableElement && this._draggableElement.root.rootName != '$graveyard') {\n                writer.removeAttribute('draggable', editing.mapper.toViewElement(this._draggableElement));\n            }\n            this._draggableElement = null;\n        });\n    }\n    /**\n\t * Deletes the dragged content from its original range and clears the dragging state.\n\t *\n\t * @param moved Whether the move succeeded.\n\t */ _finalizeDragging(moved) {\n        const editor = this.editor;\n        const model = editor.model;\n        const dragDropTarget = editor.plugins.get(DragDropTarget);\n        dragDropTarget.removeDropMarker();\n        this._clearDraggableAttributes();\n        if (editor.plugins.has('WidgetToolbarRepository')) {\n            const widgetToolbarRepository = editor.plugins.get('WidgetToolbarRepository');\n            widgetToolbarRepository.clearForceDisabled('dragDrop');\n        }\n        this._draggingUid = '';\n        if (this._previewContainer) {\n            this._previewContainer.remove();\n            this._previewContainer = undefined;\n        }\n        if (!this._draggedRange) {\n            return;\n        }\n        // Delete moved content.\n        if (moved && this.isEnabled) {\n            model.change((writer)=>{\n                const selection = model.createSelection(this._draggedRange);\n                model.deleteContent(selection, {\n                    doNotAutoparagraph: true\n                });\n                // Check result selection if it does not require auto-paragraphing of empty container.\n                const selectionParent = selection.getFirstPosition().parent;\n                if (selectionParent.isEmpty && !model.schema.checkChild(selectionParent, '$text') && model.schema.checkChild(selectionParent, 'paragraph')) {\n                    writer.insertElement('paragraph', selectionParent, 0);\n                }\n            });\n        }\n        this._draggedRange.detach();\n        this._draggedRange = null;\n    }\n    /**\n\t * Sets the dragged source range based on event target and document selection.\n\t */ _prepareDraggedRange(target) {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        // Check if this is dragstart over the widget (but not a nested editable).\n        const draggableWidget = target ? findDraggableWidget(target) : null;\n        if (draggableWidget) {\n            const modelElement = editor.editing.mapper.toModelElement(draggableWidget);\n            this._draggedRange = LiveRange.fromRange(model.createRangeOn(modelElement));\n            this._blockMode = model.schema.isBlock(modelElement);\n            // Disable toolbars so they won't obscure the drop area.\n            if (editor.plugins.has('WidgetToolbarRepository')) {\n                const widgetToolbarRepository = editor.plugins.get('WidgetToolbarRepository');\n                widgetToolbarRepository.forceDisabled('dragDrop');\n            }\n            return;\n        }\n        // If this was not a widget we should check if we need to drag some text content.\n        if (selection.isCollapsed && !selection.getFirstPosition().parent.isEmpty) {\n            return;\n        }\n        const blocks = Array.from(selection.getSelectedBlocks());\n        const draggedRange = selection.getFirstRange();\n        if (blocks.length == 0) {\n            this._draggedRange = LiveRange.fromRange(draggedRange);\n            return;\n        }\n        const blockRange = getRangeIncludingFullySelectedParents(model, blocks);\n        if (blocks.length > 1) {\n            this._draggedRange = LiveRange.fromRange(blockRange);\n            this._blockMode = true;\n        // TODO block mode for dragging from outside editor? or inline? or both?\n        } else if (blocks.length == 1) {\n            const touchesBlockEdges = draggedRange.start.isTouching(blockRange.start) && draggedRange.end.isTouching(blockRange.end);\n            this._draggedRange = LiveRange.fromRange(touchesBlockEdges ? blockRange : draggedRange);\n            this._blockMode = touchesBlockEdges;\n        }\n        model.change((writer)=>writer.setSelection(this._draggedRange.toRange()));\n    }\n    /**\n\t * Updates the dragged preview image.\n\t */ _updatePreview({ dataTransfer, domTarget, clientX }) {\n        const view = this.editor.editing.view;\n        const editable = view.document.selection.editableElement;\n        const domEditable = view.domConverter.mapViewToDom(editable);\n        const computedStyle = global.window.getComputedStyle(domEditable);\n        if (!this._previewContainer) {\n            this._previewContainer = createElement(global.document, 'div', {\n                style: 'position: fixed; left: -999999px;'\n            });\n            global.document.body.appendChild(this._previewContainer);\n        } else if (this._previewContainer.firstElementChild) {\n            this._previewContainer.removeChild(this._previewContainer.firstElementChild);\n        }\n        const domRect = new Rect(domEditable);\n        // If domTarget is inside the editable root, browsers will display the preview correctly by themselves.\n        if (domEditable.contains(domTarget)) {\n            return;\n        }\n        const domEditablePaddingLeft = parseFloat(computedStyle.paddingLeft);\n        const preview = createElement(global.document, 'div');\n        preview.className = 'ck ck-content';\n        preview.style.width = computedStyle.width;\n        preview.style.paddingLeft = `${domRect.left - clientX + domEditablePaddingLeft}px`;\n        /**\n\t\t * Set white background in drag and drop preview if iOS.\n\t\t * Check: https://github.com/ckeditor/ckeditor5/issues/15085\n\t\t */ if (env.isiOS) {\n            preview.style.backgroundColor = 'white';\n        }\n        preview.innerHTML = dataTransfer.getData('text/html');\n        dataTransfer.setDragImage(preview, 0, 0);\n        this._previewContainer.appendChild(preview);\n    }\n}\n/**\n * Returns the drop effect that should be a result of dragging the content.\n * This function is handling a quirk when checking the effect in the 'drop' DOM event.\n */ function getFinalDropEffect(dataTransfer) {\n    if (env.isGecko) {\n        return dataTransfer.dropEffect;\n    }\n    return [\n        'all',\n        'copyMove'\n    ].includes(dataTransfer.effectAllowed) ? 'move' : 'copy';\n}\n/**\n * Returns a widget element that should be dragged.\n */ function findDraggableWidget(target) {\n    // This is directly an editable so not a widget for sure.\n    if (target.is('editableElement')) {\n        return null;\n    }\n    // TODO: Let's have a isWidgetSelectionHandleDomElement() helper in ckeditor5-widget utils.\n    if (target.hasClass('ck-widget__selection-handle')) {\n        return target.findAncestor(isWidget);\n    }\n    // Direct hit on a widget.\n    if (isWidget(target)) {\n        return target;\n    }\n    // Find closest ancestor that is either a widget or an editable element...\n    const ancestor = target.findAncestor((node)=>isWidget(node) || node.is('editableElement'));\n    // ...and if closer was the widget then enable dragging it.\n    if (isWidget(ancestor)) {\n        return ancestor;\n    }\n    return null;\n}\n/**\n * Recursively checks if common parent of provided elements doesn't have any other children. If that's the case,\n * it returns range including this parent. Otherwise, it returns only the range from first to last element.\n *\n * Example:\n *\n * <blockQuote>\n *   <paragraph>[Test 1</paragraph>\n *   <paragraph>Test 2</paragraph>\n *   <paragraph>Test 3]</paragraph>\n * <blockQuote>\n *\n * Because all elements inside the `blockQuote` are selected, the range is extended to include the `blockQuote` too.\n * If only first and second paragraphs would be selected, the range would not include it.\n */ function getRangeIncludingFullySelectedParents(model, elements) {\n    const firstElement = elements[0];\n    const lastElement = elements[elements.length - 1];\n    const parent = firstElement.getCommonAncestor(lastElement);\n    const startPosition = model.createPositionBefore(firstElement);\n    const endPosition = model.createPositionAfter(lastElement);\n    if (parent && parent.is('element') && !model.schema.isLimit(parent)) {\n        const parentRange = model.createRangeOn(parent);\n        const touchesStart = startPosition.isTouching(parentRange.start);\n        const touchesEnd = endPosition.isTouching(parentRange.end);\n        if (touchesStart && touchesEnd) {\n            // Selection includes all elements in the parent.\n            return getRangeIncludingFullySelectedParents(model, [\n                parent\n            ]);\n        }\n    }\n    return model.createRange(startPosition, endPosition);\n}\n\n/**\n * The plugin detects the user's intention to paste plain text.\n *\n * For example, it detects the <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> keystroke.\n */ class PastePlainText extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'PastePlainText';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ClipboardPipeline\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        const selection = model.document.selection;\n        view.addObserver(ClipboardObserver);\n        editor.plugins.get(ClipboardPipeline).on('contentInsertion', (evt, data)=>{\n            if (!isUnformattedInlineContent(data.content, model)) {\n                return;\n            }\n            model.change((writer)=>{\n                // Formatting attributes should be preserved.\n                const textAttributes = Array.from(selection.getAttributes()).filter(([key])=>model.schema.getAttributeProperties(key).isFormatting);\n                if (!selection.isCollapsed) {\n                    model.deleteContent(selection, {\n                        doNotAutoparagraph: true\n                    });\n                }\n                // Also preserve other attributes if they survived the content deletion (because they were not fully selected).\n                // For example linkHref is not a formatting attribute but it should be preserved if pasted text was in the middle\n                // of a link.\n                textAttributes.push(...selection.getAttributes());\n                const range = writer.createRangeIn(data.content);\n                for (const item of range.getItems()){\n                    for (const attribute of textAttributes){\n                        if (model.schema.checkAttribute(item, attribute[0])) {\n                            writer.setAttribute(attribute[0], attribute[1], item);\n                        }\n                    }\n                }\n            });\n        });\n    }\n}\n/**\n * Returns true if specified `documentFragment` represents the unformatted inline content.\n */ function isUnformattedInlineContent(documentFragment, model) {\n    let range = model.createRangeIn(documentFragment);\n    // We consider three scenarios here. The document fragment may include:\n    //\n    // 1. Only text and inline objects. Then it could be unformatted inline content.\n    // 2. Exactly one block element on top-level, eg. <p>Foobar</p> or <h2>Title</h2>.\n    //    In this case, check this element content, it could be treated as unformatted inline content.\n    // 3. More block elements or block objects, then it is not unformatted inline content.\n    //\n    // We will check for scenario 2. specifically, and if it happens, we will unwrap it and follow with the regular algorithm.\n    //\n    if (documentFragment.childCount == 1) {\n        const child = documentFragment.getChild(0);\n        if (child.is('element') && model.schema.isBlock(child) && !model.schema.isObject(child) && !model.schema.isLimit(child)) {\n            // Scenario 2. as described above.\n            range = model.createRangeIn(child);\n        }\n    }\n    for (const child of range.getItems()){\n        if (!model.schema.isInline(child)) {\n            return false;\n        }\n        const attributeKeys = Array.from(child.getAttributeKeys());\n        if (attributeKeys.find((key)=>model.schema.getAttributeProperties(key).isFormatting)) {\n            return false;\n        }\n    }\n    return true;\n}\n\n/**\n * The clipboard feature.\n *\n * Read more about the clipboard integration in the {@glink framework/deep-dive/clipboard clipboard deep-dive} guide.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n * * {@link module:clipboard/clipboardpipeline~ClipboardPipeline}\n * * {@link module:clipboard/dragdrop~DragDrop}\n * * {@link module:clipboard/pasteplaintext~PastePlainText}\n */ class Clipboard extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Clipboard';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ClipboardMarkersUtils,\n            ClipboardPipeline,\n            DragDrop,\n            PastePlainText\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        // Add the information about the keystrokes to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Copy selected content'),\n                    keystroke: 'CTRL+C'\n                },\n                {\n                    label: t('Paste content'),\n                    keystroke: 'CTRL+V'\n                },\n                {\n                    label: t('Paste content as plain text'),\n                    keystroke: 'CTRL+SHIFT+V'\n                }\n            ]\n        });\n    }\n}\n\nexport { Clipboard, ClipboardMarkersUtils, ClipboardPipeline, DragDrop, DragDropBlockToolbar, DragDropTarget, PastePlainText };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { EditorUI, normalizeToolbarConfig, DialogView, BoxedEditorUIView, StickyPanelView, ToolbarView, MenuBarView, InlineEditableUIView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { enablePlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { ElementReplacer, Rect, CKEditorError, getDataFromElement } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ElementApiMixin, Editor, attachToForm } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { isElement as isElement$1 } from 'lodash-es';\n\n/**\n * The classic editor UI class.\n */ class ClassicEditorUI extends EditorUI {\n    /**\n\t * The main (top–most) view of the editor UI.\n\t */ view;\n    /**\n\t * A normalized `config.toolbar` object.\n\t */ _toolbarConfig;\n    /**\n\t * The element replacer instance used to hide the editor's source element.\n\t */ _elementReplacer;\n    /**\n\t * Creates an instance of the classic editor UI class.\n\t *\n\t * @param editor The editor instance.\n\t * @param view The view of the UI.\n\t */ constructor(editor, view){\n        super(editor);\n        this.view = view;\n        this._toolbarConfig = normalizeToolbarConfig(editor.config.get('toolbar'));\n        this._elementReplacer = new ElementReplacer();\n        this.listenTo(editor.editing.view, 'scrollToTheSelection', this._handleScrollToTheSelectionWithStickyPanel.bind(this));\n    }\n    /**\n\t * @inheritDoc\n\t */ get element() {\n        return this.view.element;\n    }\n    /**\n\t * Initializes the UI.\n\t *\n\t * @param replacementElement The DOM element that will be the source for the created editor.\n\t */ init(replacementElement) {\n        const editor = this.editor;\n        const view = this.view;\n        const editingView = editor.editing.view;\n        const editable = view.editable;\n        const editingRoot = editingView.document.getRoot();\n        // The editable UI and editing root should share the same name. Then name is used\n        // to recognize the particular editable, for instance in ARIA attributes.\n        editable.name = editingRoot.rootName;\n        view.render();\n        // The editable UI element in DOM is available for sure only after the editor UI view has been rendered.\n        // But it can be available earlier if a DOM element has been passed to BalloonEditor.create().\n        const editableElement = editable.element;\n        // Register the editable UI view in the editor. A single editor instance can aggregate multiple\n        // editable areas (roots) but the classic editor has only one.\n        this.setEditableElement(editable.name, editableElement);\n        // Let the editable UI element respond to the changes in the global editor focus\n        // tracker. It has been added to the same tracker a few lines above but, in reality, there are\n        // many focusable areas in the editor, like balloons, toolbars or dropdowns and as long\n        // as they have focus, the editable should act like it is focused too (although technically\n        // it isn't), e.g. by setting the proper CSS class, visually announcing focus to the user.\n        // Doing otherwise will result in editable focus styles disappearing, once e.g. the\n        // toolbar gets focused.\n        view.editable.bind('isFocused').to(this.focusTracker);\n        // Bind the editable UI element to the editing view, making it an end– and entry–point\n        // of the editor's engine. This is where the engine meets the UI.\n        editingView.attachDomRoot(editableElement);\n        // If an element containing the initial data of the editor was provided, replace it with\n        // an editor instance's UI in DOM until the editor is destroyed. For instance, a <textarea>\n        // can be such element.\n        if (replacementElement) {\n            this._elementReplacer.replace(replacementElement, this.element);\n        }\n        this._initPlaceholder();\n        this._initToolbar();\n        if (view.menuBarView) {\n            this._initMenuBar(view.menuBarView);\n        }\n        this._initDialogPluginIntegration();\n        this._initContextualBalloonIntegration();\n        this.fire('ready');\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        const view = this.view;\n        const editingView = this.editor.editing.view;\n        this._elementReplacer.restore();\n        editingView.detachDomRoot(view.editable.name);\n        view.destroy();\n    }\n    /**\n\t * Initializes the editor toolbar.\n\t */ _initToolbar() {\n        const view = this.view;\n        // Set–up the sticky panel with toolbar.\n        view.stickyPanel.bind('isActive').to(this.focusTracker, 'isFocused');\n        view.stickyPanel.limiterElement = view.element;\n        view.stickyPanel.bind('viewportTopOffset').to(this, 'viewportOffset', ({ top })=>top || 0);\n        view.toolbar.fillFromConfig(this._toolbarConfig, this.componentFactory);\n        // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.\n        this.addToolbar(view.toolbar);\n    }\n    /**\n\t * Enable the placeholder text on the editing root.\n\t */ _initPlaceholder() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const editingRoot = editingView.document.getRoot();\n        const sourceElement = editor.sourceElement;\n        let placeholderText;\n        const placeholder = editor.config.get('placeholder');\n        if (placeholder) {\n            placeholderText = typeof placeholder === 'string' ? placeholder : placeholder[this.view.editable.name];\n        }\n        if (!placeholderText && sourceElement && sourceElement.tagName.toLowerCase() === 'textarea') {\n            placeholderText = sourceElement.getAttribute('placeholder');\n        }\n        if (placeholderText) {\n            editingRoot.placeholder = placeholderText;\n        }\n        enablePlaceholder({\n            view: editingView,\n            element: editingRoot,\n            isDirectHost: false,\n            keepOnFocus: true\n        });\n    }\n    /**\n\t * Provides an integration between the sticky toolbar and {@link module:ui/panel/balloon/contextualballoon contextual balloon plugin}.\n\t * It allows the contextual balloon to consider the height of the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel}. It prevents the balloon from overlapping\n\t * the sticky toolbar by adjusting the balloon's position using viewport offset configuration.\n\t */ _initContextualBalloonIntegration() {\n        if (!this.editor.plugins.has('ContextualBalloon')) {\n            return;\n        }\n        const { stickyPanel } = this.view;\n        const contextualBalloon = this.editor.plugins.get('ContextualBalloon');\n        contextualBalloon.on('getPositionOptions', (evt)=>{\n            const position = evt.return;\n            if (!position || !stickyPanel.isSticky || !stickyPanel.element) {\n                return;\n            }\n            // Measure toolbar (and menu bar) height.\n            const stickyPanelHeight = new Rect(stickyPanel.element).height;\n            // Handle edge case when the target element is larger than the limiter.\n            // It's an issue because the contextual balloon can overlap top table cells when the table is larger than the viewport\n            // and it's placed at the top of the editor. It's better to overlap toolbar in that situation.\n            // Check this issue: https://github.com/ckeditor/ckeditor5/issues/15744\n            const target = typeof position.target === 'function' ? position.target() : position.target;\n            const limiter = typeof position.limiter === 'function' ? position.limiter() : position.limiter;\n            if (target && limiter && new Rect(target).height >= new Rect(limiter).height - stickyPanelHeight) {\n                return;\n            }\n            // Ensure that viewport offset is present, it can be undefined according to the typing.\n            const viewportOffsetConfig = {\n                ...position.viewportOffsetConfig\n            };\n            const newTopViewportOffset = (viewportOffsetConfig.top || 0) + stickyPanelHeight;\n            evt.return = {\n                ...position,\n                viewportOffsetConfig: {\n                    ...viewportOffsetConfig,\n                    top: newTopViewportOffset\n                }\n            };\n        }, {\n            priority: 'low'\n        });\n        // Update balloon position when the toolbar becomes sticky or when ui viewportOffset changes.\n        const updateBalloonPosition = ()=>{\n            if (contextualBalloon.visibleView) {\n                contextualBalloon.updatePosition();\n            }\n        };\n        this.listenTo(stickyPanel, 'change:isSticky', updateBalloonPosition);\n        this.listenTo(this.editor.ui, 'change:viewportOffset', updateBalloonPosition);\n    }\n    /**\n\t * Provides an integration between the sticky toolbar and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t * It allows the UI-agnostic engine method to consider the geometry of the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel} that pins to the\n\t * edge of the viewport and can obscure the user caret after scrolling the window.\n\t *\n\t * @param evt The `scrollToTheSelection` event info.\n\t * @param data The payload carried by the `scrollToTheSelection` event.\n\t * @param originalArgs The original arguments passed to `scrollViewportToShowTarget()` method (see implementation to learn more).\n\t */ _handleScrollToTheSelectionWithStickyPanel(evt, data, originalArgs) {\n        const stickyPanel = this.view.stickyPanel;\n        if (stickyPanel.isSticky) {\n            const stickyPanelHeight = new Rect(stickyPanel.element).height;\n            data.viewportOffset.top += stickyPanelHeight;\n        } else {\n            const scrollViewportOnPanelGettingSticky = ()=>{\n                this.editor.editing.view.scrollToTheSelection(originalArgs);\n            };\n            this.listenTo(stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky);\n            // This works as a post-scroll-fixer because it's impossible predict whether the panel will be sticky after scrolling or not.\n            // Listen for a short period of time only and if the toolbar does not become sticky very soon, cancel the listener.\n            setTimeout(()=>{\n                this.stopListening(stickyPanel, 'change:isSticky', scrollViewportOnPanelGettingSticky);\n            }, 20);\n        }\n    }\n    /**\n\t * Provides an integration between the sticky toolbar and {@link module:ui/dialog/dialog the Dialog plugin}.\n\t *\n\t * It moves the dialog down to ensure that the\n\t * {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#stickyPanel sticky panel}\n\t * used by the editor UI will not get obscured by the dialog when the dialog uses one of its automatic positions.\n\t */ _initDialogPluginIntegration() {\n        if (!this.editor.plugins.has('Dialog')) {\n            return;\n        }\n        const stickyPanel = this.view.stickyPanel;\n        const dialogPlugin = this.editor.plugins.get('Dialog');\n        dialogPlugin.on('show', ()=>{\n            const dialogView = dialogPlugin.view;\n            dialogView.on('moveTo', (evt, data)=>{\n                // Engage only when the panel is sticky, and the dialog is using one of default positions.\n                if (!stickyPanel.isSticky || dialogView.wasMoved) {\n                    return;\n                }\n                const stickyPanelContentRect = new Rect(stickyPanel.contentPanelElement);\n                if (data[1] < stickyPanelContentRect.bottom + DialogView.defaultOffset) {\n                    data[1] = stickyPanelContentRect.bottom + DialogView.defaultOffset;\n                }\n            }, {\n                priority: 'high'\n            });\n        }, {\n            priority: 'low'\n        });\n    }\n}\n\n/**\n * Classic editor UI view. Uses an inline editable and a sticky toolbar, all\n * enclosed in a boxed UI view.\n */ class ClassicEditorUIView extends BoxedEditorUIView {\n    /**\n\t * Sticky panel view instance. This is a parent view of a {@link #toolbar}\n\t * that makes toolbar sticky.\n\t */ stickyPanel;\n    /**\n\t * Toolbar view instance.\n\t */ toolbar;\n    /**\n\t * Editable UI view.\n\t */ editable;\n    /**\n\t * Creates an instance of the classic editor UI view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param editingView The editing view instance this view is related to.\n\t * @param options Configuration options for the view instance.\n\t * @param options.shouldToolbarGroupWhenFull When set `true` enables automatic items grouping\n\t * in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.\n\t * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.\n\t * @param options.label When set, this value will be used as an accessible `aria-label` of the\n\t * {@link module:ui/editableui/editableuiview~EditableUIView editable view}.\n\t */ constructor(locale, editingView, options = {}){\n        super(locale);\n        this.stickyPanel = new StickyPanelView(locale);\n        this.toolbar = new ToolbarView(locale, {\n            shouldGroupWhenFull: options.shouldToolbarGroupWhenFull\n        });\n        if (options.useMenuBar) {\n            this.menuBarView = new MenuBarView(locale);\n        }\n        this.editable = new InlineEditableUIView(locale, editingView, undefined, {\n            label: options.label\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        if (this.menuBarView) {\n            // Set toolbar as a child of a stickyPanel and makes toolbar sticky.\n            this.stickyPanel.content.addMany([\n                this.menuBarView,\n                this.toolbar\n            ]);\n        } else {\n            this.stickyPanel.content.add(this.toolbar);\n        }\n        this.top.add(this.stickyPanel);\n        this.main.add(this.editable);\n    }\n}\n\n/**\n * The classic editor implementation. It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.\n * See the {@glink examples/builds/classic-editor demo}.\n *\n * In order to create a classic editor instance, use the static\n * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.\n */ class ClassicEditor extends /* #__PURE__ */ ElementApiMixin(Editor) {\n    /**\n\t * @inheritDoc\n\t */ ui;\n    /**\n\t * Creates an instance of the classic editor.\n\t *\n\t * **Note:** do not use the constructor to create editor instances. Use the static\n\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method instead.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data. For more information see\n\t * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.\n\t * @param config The editor configuration.\n\t */ constructor(sourceElementOrData, config = {}){\n        // If both `config.initialData` is set and initial data is passed as the constructor parameter, then throw.\n        if (!isElement(sourceElementOrData) && config.initialData !== undefined) {\n            // Documented in core/editor/editorconfig.jsdoc.\n            // eslint-disable-next-line ckeditor5-rules/ckeditor-error-message\n            throw new CKEditorError('editor-create-initial-data', null);\n        }\n        super(config);\n        this.config.define('menuBar.isVisible', false);\n        if (this.config.get('initialData') === undefined) {\n            this.config.set('initialData', getInitialData(sourceElementOrData));\n        }\n        if (isElement(sourceElementOrData)) {\n            this.sourceElement = sourceElementOrData;\n        }\n        this.model.document.createRoot();\n        const shouldToolbarGroupWhenFull = !this.config.get('toolbar.shouldNotGroupWhenFull');\n        const menuBarConfig = this.config.get('menuBar');\n        const view = new ClassicEditorUIView(this.locale, this.editing.view, {\n            shouldToolbarGroupWhenFull,\n            useMenuBar: menuBarConfig.isVisible,\n            label: this.config.get('label')\n        });\n        this.ui = new ClassicEditorUI(this, view);\n        attachToForm(this);\n    }\n    /**\n\t * Destroys the editor instance, releasing all resources used by it.\n\t *\n\t * Updates the original editor element with the data if the\n\t * {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}\n\t * configuration option is set to `true`.\n\t */ destroy() {\n        if (this.sourceElement) {\n            this.updateSourceElement();\n        }\n        this.ui.destroy();\n        return super.destroy();\n    }\n    /**\n\t * Creates a new classic editor instance.\n\t *\n\t * There are three ways how the editor can be initialized.\n\t *\n\t * # Replacing a DOM element (and loading data from it)\n\t *\n\t * You can initialize the editor using an existing DOM element:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( document.querySelector( '#editor' ) )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * The element's content will be used as the editor data and the element will be replaced by the editor UI.\n\t *\n\t * # Creating a detached editor\n\t *\n\t * Alternatively, you can initialize the editor by passing the initial data directly as a string.\n\t * In this case, the editor will render an element that must be inserted into the DOM:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( '<p>Hello world!</p>' )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t *\n\t * \t\t// Initial data was provided so the editor UI element needs to be added manually to the DOM.\n\t * \t\tdocument.body.appendChild( editor.ui.element );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your\n\t * web page content is generated on the client side and the DOM structure is not ready at the moment when you initialize the editor.\n\t *\n\t * # Replacing a DOM element (and data provided in `config.initialData`)\n\t *\n\t * You can also mix these two ways by providing a DOM element to be used and passing the initial data through the configuration:\n\t *\n\t * ```ts\n\t * ClassicEditor\n\t * \t.create( document.querySelector( '#editor' ), {\n\t * \t\tinitialData: '<h2>Initial data</h2><p>Foo bar.</p>'\n\t * \t} )\n\t * \t.then( editor => {\n\t * \t\tconsole.log( 'Editor was initialized', editor );\n\t * \t} )\n\t * \t.catch( err => {\n\t * \t\tconsole.error( err.stack );\n\t * \t} );\n\t * ```\n\t *\n\t * This method can be used to initialize the editor on an existing element with the specified content in case if your integration\n\t * makes it difficult to set the content of the source element.\n\t *\n\t * Note that an error will be thrown if you pass the initial data both as the first parameter and also in the configuration.\n\t *\n\t * # Configuring the editor\n\t *\n\t * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about\n\t * customizing plugins, toolbar and more.\n\t *\n\t * @param sourceElementOrData The DOM element that will be the source for the created editor\n\t * or the editor's initial data.\n\t *\n\t * If a DOM element is passed, its content will be automatically loaded to the editor upon initialization\n\t * and the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element editor element} will replace the passed element\n\t * in the DOM (the original one will be hidden and the editor will be injected next to it).\n\t *\n\t * If the {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy}\n\t * option is set to `true`, the editor data will be set back to the original element once the editor is destroyed and when a form,\n\t * in which this element is contained, is submitted (if the original element is a `<textarea>`). This ensures seamless integration\n\t * with native web forms.\n\t *\n\t * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually.\n\t * It is available under the {@link module:editor-classic/classiceditorui~ClassicEditorUI#element `editor.ui.element`} property.\n\t *\n\t * @param config The editor configuration.\n\t * @returns A promise resolved once the editor is ready. The promise resolves with the created editor instance.\n\t */ static create(sourceElementOrData, config = {}) {\n        return new Promise((resolve)=>{\n            const editor = new this(sourceElementOrData, config);\n            resolve(editor.initPlugins().then(()=>editor.ui.init(isElement(sourceElementOrData) ? sourceElementOrData : null)).then(()=>editor.data.init(editor.config.get('initialData'))).then(()=>editor.fire('ready')).then(()=>editor));\n        });\n    }\n}\nfunction getInitialData(sourceElementOrData) {\n    return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;\n}\nfunction isElement(value) {\n    return isElement$1(value);\n}\n\nexport { ClassicEditor };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { getCode, parseKeystroke } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * The select all command.\n *\n * It is used by the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature} to handle\n * the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke.\n *\n * Executing this command changes the {@glink framework/architecture/editing-engine#model model}\n * selection so it contains the entire content of the editable root of the editor the selection is\n * {@link module:engine/model/selection~Selection#anchor anchored} in.\n *\n * If the selection was anchored in a {@glink framework/tutorials/widgets/implementing-a-block-widget nested editable}\n * (e.g. a caption of an image), the new selection will contain its entire content. Successive executions of this command\n * will expand the selection to encompass more and more content up to the entire editable root of the editor.\n */ class SelectAllCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // It does not affect data so should be enabled in read-only mode.\n        this.affectsData = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        let scopeElement = model.schema.getLimitElement(selection);\n        // If an entire scope is selected, or the selection's ancestor is not a scope yet,\n        // browse through ancestors to find the enclosing parent scope.\n        if (selection.containsEntireContent(scopeElement) || !isSelectAllScope(model.schema, scopeElement)) {\n            do {\n                scopeElement = scopeElement.parent;\n                // Do nothing, if the entire `root` is already selected.\n                if (!scopeElement) {\n                    return;\n                }\n            }while (!isSelectAllScope(model.schema, scopeElement))\n        }\n        model.change((writer)=>{\n            writer.setSelection(scopeElement, 'in');\n        });\n    }\n}\n/**\n * Checks whether the element is a valid select-all scope. Returns true, if the element is a\n * {@link module:engine/model/schema~Schema#isLimit limit}, and can contain any text or paragraph.\n *\n * @param schema Schema to check against.\n * @param element Model element.\n */ function isSelectAllScope(schema, element) {\n    return schema.isLimit(element) && (schema.checkChild(element, '$text') || schema.checkChild(element, 'paragraph'));\n}\n\nconst SELECT_ALL_KEYSTROKE = /* #__PURE__ */ parseKeystroke('Ctrl+A');\n/**\n * The select all editing feature.\n *\n * It registers the `'selectAll'` {@link module:select-all/selectallcommand~SelectAllCommand command}\n * and the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke listener which executes it.\n */ class SelectAllEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SelectAllEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        editor.commands.add('selectAll', new SelectAllCommand(editor));\n        this.listenTo(viewDocument, 'keydown', (eventInfo, domEventData)=>{\n            if (getCode(domEventData) === SELECT_ALL_KEYSTROKE) {\n                editor.execute('selectAll');\n                domEventData.preventDefault();\n            }\n        });\n        // Add the information about the keystroke to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Select all'),\n                    keystroke: 'CTRL+A'\n                }\n            ]\n        });\n    }\n}\n\nvar selectAllIcon = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z\\\"/></svg>\";\n\n/**\n * The select all UI feature.\n *\n * It registers the `'selectAll'` UI button in the editor's\n * {@link module:ui/componentfactory~ComponentFactory component factory}. When clicked, the button\n * executes the {@link module:select-all/selectallcommand~SelectAllCommand select all command}.\n */ class SelectAllUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SelectAllUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        editor.ui.componentFactory.add('selectAll', ()=>{\n            const buttonView = this._createButton(ButtonView);\n            buttonView.set({\n                tooltip: true\n            });\n            return buttonView;\n        });\n        editor.ui.componentFactory.add('menuBar:selectAll', ()=>{\n            return this._createButton(MenuBarMenuListItemButtonView);\n        });\n    }\n    /**\n\t * Creates a button for select all command to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const command = editor.commands.get('selectAll');\n        const view = new ButtonClass(editor.locale);\n        const t = locale.t;\n        view.set({\n            label: t('Select all'),\n            icon: selectAllIcon,\n            keystroke: 'Ctrl+A'\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        // Execute the command.\n        this.listenTo(view, 'execute', ()=>{\n            editor.execute('selectAll');\n            editor.editing.view.focus();\n        });\n        return view;\n    }\n}\n\n/**\n * The select all feature.\n *\n * This is a \"glue\" plugin which loads the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature}\n * and the {@link module:select-all/selectallui~SelectAllUI select all UI feature}.\n *\n * Please refer to the documentation of individual features to learn more.\n */ class SelectAll extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            SelectAllEditing,\n            SelectAllUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SelectAll';\n    }\n}\n\nexport { SelectAll, SelectAllEditing, SelectAllUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { transformSets, NoOperation } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * Base class for the undo feature commands: {@link module:undo/undocommand~UndoCommand} and {@link module:undo/redocommand~RedoCommand}.\n */ class BaseCommand extends Command {\n    /**\n\t * Stack of items stored by the command. These are pairs of:\n\t *\n\t * * {@link module:engine/model/batch~Batch batch} saved by the command,\n\t * * {@link module:engine/model/selection~Selection selection} state at the moment of saving the batch.\n\t */ _stack = [];\n    /**\n\t * Stores all batches that were created by this command.\n\t *\n\t * @internal\n\t */ _createdBatches = new WeakSet();\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // Refresh state, so the command is inactive right after initialization.\n        this.refresh();\n        // This command should not depend on selection change.\n        this._isEnabledBasedOnSelection = false;\n        // Set the transparent batch for the `editor.data.set()` call if the\n        // batch type is not set already.\n        this.listenTo(editor.data, 'set', (evt, data)=>{\n            // Create a shallow copy of the options to not change the original args.\n            // And make sure that an object is assigned to data[ 1 ].\n            data[1] = {\n                ...data[1]\n            };\n            const options = data[1];\n            // If batch type is not set, default to non-undoable batch.\n            if (!options.batchType) {\n                options.batchType = {\n                    isUndoable: false\n                };\n            }\n        }, {\n            priority: 'high'\n        });\n        // Clear the stack for the `transparent` batches.\n        this.listenTo(editor.data, 'set', (evt, data)=>{\n            // We can assume that the object exists and it has a `batchType` property.\n            // It was ensured with a higher priority listener before.\n            const options = data[1];\n            if (!options.batchType.isUndoable) {\n                this.clearStack();\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.isEnabled = this._stack.length > 0;\n    }\n    /**\n\t * Returns all batches created by this command.\n\t */ get createdBatches() {\n        return this._createdBatches;\n    }\n    /**\n\t * Stores a batch in the command, together with the selection state of the {@link module:engine/model/document~Document document}\n\t * created by the editor which this command is registered to.\n\t *\n\t * @param batch The batch to add.\n\t */ addBatch(batch) {\n        const docSelection = this.editor.model.document.selection;\n        const selection = {\n            ranges: docSelection.hasOwnRange ? Array.from(docSelection.getRanges()) : [],\n            isBackward: docSelection.isBackward\n        };\n        this._stack.push({\n            batch,\n            selection\n        });\n        this.refresh();\n    }\n    /**\n\t * Removes all items from the stack.\n\t */ clearStack() {\n        this._stack = [];\n        this.refresh();\n    }\n    /**\n\t * Restores the {@link module:engine/model/document~Document#selection document selection} state after a batch was undone.\n\t *\n\t * @param ranges Ranges to be restored.\n\t * @param isBackward A flag describing whether the restored range was selected forward or backward.\n\t * @param operations Operations which has been applied since selection has been stored.\n\t */ _restoreSelection(ranges, isBackward, operations) {\n        const model = this.editor.model;\n        const document = model.document;\n        // This will keep the transformed selection ranges.\n        const selectionRanges = [];\n        // Transform all ranges from the restored selection.\n        const transformedRangeGroups = ranges.map((range)=>range.getTransformedByOperations(operations));\n        const allRanges = transformedRangeGroups.flat();\n        for (const rangeGroup of transformedRangeGroups){\n            // While transforming there could appear ranges that are contained by other ranges, we shall ignore them.\n            const transformed = rangeGroup.filter((range)=>range.root != document.graveyard).filter((range)=>!isRangeContainedByAnyOtherRange(range, allRanges));\n            // All the transformed ranges ended up in graveyard.\n            if (!transformed.length) {\n                continue;\n            }\n            // After the range got transformed, we have an array of ranges. Some of those\n            // ranges may be \"touching\" -- they can be next to each other and could be merged.\n            normalizeRanges(transformed);\n            // For each `range` from `ranges`, we take only one transformed range.\n            // This is because we want to prevent situation where single-range selection\n            // got transformed to multi-range selection.\n            selectionRanges.push(transformed[0]);\n        }\n        // @if CK_DEBUG_ENGINE // console.log( `Restored selection by undo: ${ selectionRanges.join( ', ' ) }` );\n        // `selectionRanges` may be empty if all ranges ended up in graveyard. If that is the case, do not restore selection.\n        if (selectionRanges.length) {\n            model.change((writer)=>{\n                writer.setSelection(selectionRanges, {\n                    backward: isBackward\n                });\n            });\n        }\n    }\n    /**\n\t * Undoes a batch by reversing that batch, transforming reversed batch and finally applying it.\n\t * This is a helper method for {@link #execute}.\n\t *\n\t * @param batchToUndo The batch to be undone.\n\t * @param undoingBatch The batch that will contain undoing changes.\n\t */ _undo(batchToUndo, undoingBatch) {\n        const model = this.editor.model;\n        const document = model.document;\n        // All changes done by the command execution will be saved as one batch.\n        this._createdBatches.add(undoingBatch);\n        const operationsToUndo = batchToUndo.operations.slice().filter((operation)=>operation.isDocumentOperation);\n        operationsToUndo.reverse();\n        // We will process each operation from `batchToUndo`, in reverse order. If there were operations A, B and C in undone batch,\n        // we need to revert them in reverse order, so first C' (reversed C), then B', then A'.\n        for (const operationToUndo of operationsToUndo){\n            const nextBaseVersion = operationToUndo.baseVersion + 1;\n            const historyOperations = Array.from(document.history.getOperations(nextBaseVersion));\n            const transformedSets = transformSets([\n                operationToUndo.getReversed()\n            ], historyOperations, {\n                useRelations: true,\n                document: this.editor.model.document,\n                padWithNoOps: false,\n                forceWeakRemove: true\n            });\n            const reversedOperations = transformedSets.operationsA;\n            // After reversed operation has been transformed by all history operations, apply it.\n            for (let operation of reversedOperations){\n                // Do not apply any operation on non-editable space.\n                const affectedSelectable = operation.affectedSelectable;\n                if (affectedSelectable && !model.canEditAt(affectedSelectable)) {\n                    operation = new NoOperation(operation.baseVersion);\n                }\n                // Before applying, add the operation to the `undoingBatch`.\n                undoingBatch.addOperation(operation);\n                model.applyOperation(operation);\n                document.history.setOperationAsUndone(operationToUndo, operation);\n            }\n        }\n    }\n}\n/**\n * Normalizes list of ranges by joining intersecting or \"touching\" ranges.\n *\n * @param ranges Ranges to be normalized.\n */ function normalizeRanges(ranges) {\n    ranges.sort((a, b)=>a.start.isBefore(b.start) ? -1 : 1);\n    for(let i = 1; i < ranges.length; i++){\n        const previousRange = ranges[i - 1];\n        const joinedRange = previousRange.getJoined(ranges[i], true);\n        if (joinedRange) {\n            // Replace the ranges on the list with the new joined range.\n            i--;\n            ranges.splice(i, 2, joinedRange);\n        }\n    }\n}\nfunction isRangeContainedByAnyOtherRange(range, ranges) {\n    return ranges.some((otherRange)=>otherRange !== range && otherRange.containsRange(range, true));\n}\n\n/**\n * The undo command stores {@link module:engine/model/batch~Batch batches} applied to the\n * {@link module:engine/model/document~Document document} and is able to undo a batch by reversing it and transforming by\n * batches from {@link module:engine/model/document~Document#history history} that happened after the reversed batch.\n *\n * The undo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.\n */ class UndoCommand extends BaseCommand {\n    /**\n\t * Executes the command. This method reverts a {@link module:engine/model/batch~Batch batch} added to the command's stack, transforms\n\t * and applies the reverted version on the {@link module:engine/model/document~Document document} and removes the batch from the stack.\n\t * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.\n\t *\n\t * @fires execute\n\t * @fires revert\n\t * @param batch A batch that should be undone. If not set, the last added batch will be undone.\n\t */ execute(batch = null) {\n        // If batch is not given, set `batchIndex` to the last index in command stack.\n        const batchIndex = batch ? this._stack.findIndex((a)=>a.batch == batch) : this._stack.length - 1;\n        const item = this._stack.splice(batchIndex, 1)[0];\n        const undoingBatch = this.editor.model.createBatch({\n            isUndo: true\n        });\n        // All changes have to be done in one `enqueueChange` callback so other listeners will not\n        // step between consecutive operations, or won't do changes to the document before selection is properly restored.\n        this.editor.model.enqueueChange(undoingBatch, ()=>{\n            this._undo(item.batch, undoingBatch);\n            const operations = this.editor.model.document.history.getOperations(item.batch.baseVersion);\n            this._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);\n        });\n        // Firing `revert` event after the change block to make sure that it includes all changes from post-fixers\n        // and make sure that the selection is \"stabilized\" (the selection range is saved after undo is executed and then\n        // restored on redo, so it is important that the selection range is saved after post-fixers are done).\n        this.fire('revert', item.batch, undoingBatch);\n        this.refresh();\n    }\n}\n\n/**\n * The redo command stores {@link module:engine/model/batch~Batch batches} that were used to undo a batch by\n * {@link module:undo/undocommand~UndoCommand}. It is able to redo a previously undone batch by reversing the undoing\n * batches created by `UndoCommand`. The reversed batch is transformed by all the batches from\n * {@link module:engine/model/document~Document#history history} that happened after the reversed undo batch.\n *\n * The redo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.\n */ class RedoCommand extends BaseCommand {\n    /**\n\t * Executes the command. This method reverts the last {@link module:engine/model/batch~Batch batch} added to\n\t * the command's stack, applies the reverted and transformed version on the\n\t * {@link module:engine/model/document~Document document} and removes the batch from the stack.\n\t * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const item = this._stack.pop();\n        const redoingBatch = this.editor.model.createBatch({\n            isUndo: true\n        });\n        // All changes have to be done in one `enqueueChange` callback so other listeners will not step between consecutive\n        // operations, or won't do changes to the document before selection is properly restored.\n        this.editor.model.enqueueChange(redoingBatch, ()=>{\n            const lastOperation = item.batch.operations[item.batch.operations.length - 1];\n            const nextBaseVersion = lastOperation.baseVersion + 1;\n            const operations = this.editor.model.document.history.getOperations(nextBaseVersion);\n            this._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);\n            this._undo(item.batch, redoingBatch);\n        });\n        this.refresh();\n    }\n}\n\n/**\n * The undo engine feature.\n *\n * It introduces the `'undo'` and `'redo'` commands to the editor.\n */ class UndoEditing extends Plugin {\n    /**\n\t * The command that manages the undo {@link module:engine/model/batch~Batch batches} stack (history).\n\t * Created and registered during the {@link #init feature initialization}.\n\t */ _undoCommand;\n    /**\n\t * The command that manages the redo {@link module:engine/model/batch~Batch batches} stack (history).\n\t * Created and registered during the {@link #init feature initialization}.\n\t */ _redoCommand;\n    /**\n\t * Keeps track of which batches were registered in undo.\n\t */ _batchRegistry = new WeakSet();\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'UndoEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        // Create commands.\n        this._undoCommand = new UndoCommand(editor);\n        this._redoCommand = new RedoCommand(editor);\n        // Register command to the editor.\n        editor.commands.add('undo', this._undoCommand);\n        editor.commands.add('redo', this._redoCommand);\n        this.listenTo(editor.model, 'applyOperation', (evt, args)=>{\n            const operation = args[0];\n            // Do not register batch if the operation is not a document operation.\n            // This prevents from creating empty undo steps, where all operations where non-document operations.\n            // Non-document operations creates and alters content in detached tree fragments (for example, document fragments).\n            // Most of time this is preparing data before it is inserted into actual tree (for example during copy & paste).\n            // Such operations should not be reversed.\n            if (!operation.isDocumentOperation) {\n                return;\n            }\n            const batch = operation.batch;\n            const isRedoBatch = this._redoCommand.createdBatches.has(batch);\n            const isUndoBatch = this._undoCommand.createdBatches.has(batch);\n            const wasProcessed = this._batchRegistry.has(batch);\n            // Skip the batch if it was already processed.\n            if (wasProcessed) {\n                return;\n            }\n            // Add the batch to the registry so it will not be processed again.\n            this._batchRegistry.add(batch);\n            if (!batch.isUndoable) {\n                return;\n            }\n            if (isRedoBatch) {\n                // If this batch comes from `redoCommand`, add it to the `undoCommand` stack.\n                this._undoCommand.addBatch(batch);\n            } else if (!isUndoBatch) {\n                // If the batch comes neither  from `redoCommand` nor from `undoCommand` then it is a new, regular batch.\n                // Add the batch to the `undoCommand` stack and clear the `redoCommand` stack.\n                this._undoCommand.addBatch(batch);\n                this._redoCommand.clearStack();\n            }\n        }, {\n            priority: 'highest'\n        });\n        this.listenTo(this._undoCommand, 'revert', (evt, undoneBatch, undoingBatch)=>{\n            this._redoCommand.addBatch(undoingBatch);\n        });\n        editor.keystrokes.set('CTRL+Z', 'undo');\n        editor.keystrokes.set('CTRL+Y', 'redo');\n        editor.keystrokes.set('CTRL+SHIFT+Z', 'redo');\n        // Add the information about the keystrokes to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Undo'),\n                    keystroke: 'CTRL+Z'\n                },\n                {\n                    label: t('Redo'),\n                    keystroke: [\n                        [\n                            'CTRL+Y'\n                        ],\n                        [\n                            'CTRL+SHIFT+Z'\n                        ]\n                    ]\n                }\n            ]\n        });\n    }\n}\n\n/**\n * The undo UI feature. It introduces the `'undo'` and `'redo'` buttons to the editor.\n */ class UndoUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'UndoUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const t = editor.t;\n        const localizedUndoIcon = locale.uiLanguageDirection == 'ltr' ? icons.undo : icons.redo;\n        const localizedRedoIcon = locale.uiLanguageDirection == 'ltr' ? icons.redo : icons.undo;\n        this._addButtonsToFactory('undo', t('Undo'), 'CTRL+Z', localizedUndoIcon);\n        this._addButtonsToFactory('redo', t('Redo'), 'CTRL+Y', localizedRedoIcon);\n    }\n    /**\n\t * Creates a button for the specified command.\n\t *\n\t * @param name Command name.\n\t * @param label Button label.\n\t * @param keystroke Command keystroke.\n\t * @param Icon Source of the icon.\n\t */ _addButtonsToFactory(name, label, keystroke, Icon) {\n        const editor = this.editor;\n        editor.ui.componentFactory.add(name, ()=>{\n            const buttonView = this._createButton(ButtonView, name, label, keystroke, Icon);\n            buttonView.set({\n                tooltip: true\n            });\n            return buttonView;\n        });\n        editor.ui.componentFactory.add('menuBar:' + name, ()=>{\n            return this._createButton(MenuBarMenuListItemButtonView, name, label, keystroke, Icon);\n        });\n    }\n    /**\n\t * TODO\n\t */ _createButton(ButtonClass, name, label, keystroke, Icon) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const command = editor.commands.get(name);\n        const view = new ButtonClass(locale);\n        view.set({\n            label,\n            icon: Icon,\n            keystroke\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        this.listenTo(view, 'execute', ()=>{\n            editor.execute(name);\n            editor.editing.view.focus();\n        });\n        return view;\n    }\n}\n\n/**\n * The undo feature.\n *\n * This is a \"glue\" plugin which loads the {@link module:undo/undoediting~UndoEditing undo editing feature}\n * and the {@link module:undo/undoui~UndoUI undo UI feature}.\n *\n * Below is an explanation of the undo mechanism working together with {@link module:engine/model/history~History History}:\n *\n * Whenever an {@link module:engine/model/operation/operation~Operation operation} is applied to the\n * {@link module:engine/model/document~Document document}, it is saved to `History` as is.\n * The {@link module:engine/model/batch~Batch batch} that owns that operation is also saved, in\n * {@link module:undo/undocommand~UndoCommand}, together with the selection that was present in the document before the\n * operation was applied. A batch is saved instead of the operation because changes are undone batch-by-batch, not operation-by-operation\n * and a batch is seen as one undo step.\n *\n * After changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:\n *\n * ```\n *    History                            Undo stack\n * ==============             ==================================\n * [operation A1]                      [  batch A  ]\n * [operation B1]                      [  batch B  ]\n * [operation B2]                      [  batch C  ]\n * [operation C1]\n * [operation C2]\n * [operation B3]\n * [operation C3]\n * ```\n *\n * Where operations starting with the same letter are from same batch.\n *\n * Undoing a batch means that a set of operations which will reverse the effects of that batch needs to be generated.\n * For example, if a batch added several letters, undoing the batch should remove them. It is important to apply undoing\n * operations in the reversed order, so if a batch has operation `X`, `Y`, `Z`, reversed operations `Zr`, `Yr` and `Xr`\n * need to be applied. Otherwise reversed operation `Xr` would operate on a wrong document state, because operation `X`\n * does not know that operations `Y` and `Z` happened.\n *\n * After operations from an undone batch got {@link module:engine/model/operation/operation~Operation#getReversed reversed},\n * one needs to make sure if they are ready to be applied. In the scenario above, operation `C3` is the last operation and `C3r`\n * bases on up-to-date document state, so it can be applied to the document.\n *\n * ```\n *      History                             Undo stack\n * =================             ==================================\n * [ operation A1  ]                      [  batch A  ]\n * [ operation B1  ]                      [  batch B  ]\n * [ operation B2  ]             [   processing undoing batch C   ]\n * [ operation C1  ]\n * [ operation C2  ]\n * [ operation B3  ]\n * [ operation C3  ]\n * [ operation C3r ]\n * ```\n *\n * Next is operation `C2`, reversed to `C2r`. `C2r` bases on `C2`, so it bases on the wrong document state. It needs to be\n * transformed by operations from history that happened after it, so it \"knows\" about them. Let us assume that `C2' = C2r * B3 * C3 * C3r`,\n * where `*` means \"transformed by\". Rest of operations from that batch are processed in the same fashion.\n *\n * ```\n *      History                             Undo stack                                      Redo stack\n * =================             ==================================             ==================================\n * [ operation A1  ]                      [  batch A  ]                                    [ batch Cr ]\n * [ operation B1  ]                      [  batch B  ]\n * [ operation B2  ]\n * [ operation C1  ]\n * [ operation C2  ]\n * [ operation B3  ]\n * [ operation C3  ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * ```\n *\n * Selective undo works on the same basis, however, instead of undoing the last batch in the undo stack, any batch can be undone.\n * The same algorithm applies: operations from a batch (i.e. `A1`) are reversed and then transformed by operations stored in history.\n *\n * Redo also is very similar to undo. It has its own stack that is filled with undoing (reversed batches). Operations from\n * the batch that is re-done are reversed-back, transformed in proper order and applied to the document.\n *\n * ```\n *      History                             Undo stack                                      Redo stack\n * =================             ==================================             ==================================\n * [ operation A1  ]                      [  batch A  ]\n * [ operation B1  ]                      [  batch B  ]\n * [ operation B2  ]                      [ batch Crr ]\n * [ operation C1  ]\n * [ operation C2  ]\n * [ operation B3  ]\n * [ operation C3  ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * [ operation C1'r]\n * [ operation C2'r]\n * [ operation C3rr]\n * ```\n */ class Undo extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            UndoEditing,\n            UndoUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Undo';\n    }\n}\n\nexport { Undo, UndoEditing, UndoUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { ColorSelectorView, createDropdown, addListToDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, MenuBarMenuListItemButtonView, ViewModel, normalizeColorOptions, getLocalizedColorOptions, focusChildOnDropdownOpen } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { Collection, CKEditorError } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { isLength, isPercentage, addBackgroundRules } from '@ckeditor/ckeditor5-engine/dist/index.js';\n\n/**\n * The base font command.\n */ class FontCommand extends Command {\n    /**\n\t * A model attribute on which this command operates.\n\t */ attributeKey;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor Editor instance.\n\t * @param attributeKey The name of a model attribute on which this command operates.\n\t */ constructor(editor, attributeKey){\n        super(editor);\n        this.attributeKey = attributeKey;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const doc = model.document;\n        this.value = doc.selection.getAttribute(this.attributeKey);\n        this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n    }\n    /**\n\t * Executes the command. Applies the `value` of the {@link #attributeKey} to the selection.\n\t * If no `value` is passed, it removes the attribute from the selection.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.value The value to apply.\n\t * @fires execute\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        const selection = document.selection;\n        const value = options.value;\n        const batch = options.batch;\n        const updateAttribute = (writer)=>{\n            if (selection.isCollapsed) {\n                if (value) {\n                    writer.setSelectionAttribute(this.attributeKey, value);\n                } else {\n                    writer.removeSelectionAttribute(this.attributeKey);\n                }\n            } else {\n                const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n                for (const range of ranges){\n                    if (value) {\n                        writer.setAttribute(this.attributeKey, value, range);\n                    } else {\n                        writer.removeAttribute(this.attributeKey, range);\n                    }\n                }\n            }\n        };\n        // In some scenarios, you may want to use a single undo step for multiple changes (e.g. in color picker).\n        if (batch) {\n            model.enqueueChange(batch, (writer)=>{\n                updateAttribute(writer);\n            });\n        } else {\n            model.change((writer)=>{\n                updateAttribute(writer);\n            });\n        }\n    }\n}\n\n/**\n * The name of the font size plugin.\n */ const FONT_SIZE = 'fontSize';\n/**\n * The name of the font family plugin.\n */ const FONT_FAMILY = 'fontFamily';\n/**\n * The name of the font color plugin.\n */ const FONT_COLOR = 'fontColor';\n/**\n * The name of the font background color plugin.\n */ const FONT_BACKGROUND_COLOR = 'fontBackgroundColor';\n/**\n * Builds a proper converter definition out of input data.\n */ function buildDefinition(modelAttributeKey, options) {\n    const definition = {\n        model: {\n            key: modelAttributeKey,\n            values: []\n        },\n        view: {},\n        upcastAlso: {}\n    };\n    for (const option of options){\n        definition.model.values.push(option.model);\n        definition.view[option.model] = option.view;\n        if (option.upcastAlso) {\n            definition.upcastAlso[option.model] = option.upcastAlso;\n        }\n    }\n    return definition;\n}\n/**\n * A {@link module:font/fontcolor~FontColor font color} and\n * {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper\n * responsible for upcasting data to the model.\n *\n * **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.\n */ function renderUpcastAttribute(styleAttr) {\n    return (viewElement)=>normalizeColorCode(viewElement.getStyle(styleAttr));\n}\n/**\n * A {@link module:font/fontcolor~FontColor font color} and\n * {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper\n * responsible for downcasting a color attribute to a `<span>` element.\n *\n * **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.\n */ function renderDowncastElement(styleAttr) {\n    return (modelAttributeValue, { writer })=>writer.createAttributeElement('span', {\n            style: `${styleAttr}:${modelAttributeValue}`\n        }, {\n            priority: 7\n        });\n}\n/**\n * A helper that adds {@link module:ui/colorselector/colorselectorview~ColorSelectorView} to the color dropdown with proper initial values.\n *\n * @param config.dropdownView The dropdown view to which a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}\n * will be added.\n * @param config.colors An array with definitions representing colors to be displayed in the color selector.\n * @param config.removeButtonLabel The label for the button responsible for removing the color.\n * @param config.documentColorsLabel The label for the section with document colors.\n * @param config.documentColorsCount The number of document colors inside the dropdown.\n * @param config.colorPickerViewConfig Configuration of the color picker view.\n * @returns The new color selector view.\n */ function addColorSelectorToDropdown({ dropdownView, colors, columns, removeButtonLabel, colorPickerLabel, documentColorsLabel, documentColorsCount, colorPickerViewConfig }) {\n    const locale = dropdownView.locale;\n    const colorSelectorView = new ColorSelectorView(locale, {\n        colors,\n        columns,\n        removeButtonLabel,\n        colorPickerLabel,\n        documentColorsLabel,\n        documentColorsCount,\n        colorPickerViewConfig\n    });\n    dropdownView.colorSelectorView = colorSelectorView;\n    dropdownView.panelView.children.add(colorSelectorView);\n    return colorSelectorView;\n}\n/**\n * Fixes the color value string.\n */ function normalizeColorCode(value) {\n    return value.replace(/\\s/g, '');\n}\n\n/**\n * The font family command. It is used by {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing}\n * to apply the font family.\n *\n * ```ts\n * editor.execute( 'fontFamily', { value: 'Arial' } );\n * ```\n *\n * **Note**: Executing the command without the value removes the attribute from the model.\n */ class FontFamilyCommand extends FontCommand {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor, FONT_FAMILY);\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module font/fontfamily/utils\n */ /**\n * Normalizes the {@link module:font/fontconfig~FontFamilyConfig#options configuration options}\n * to the {@link module:font/fontconfig~FontFamilyOption} format.\n *\n * @param configuredOptions An array of options taken from the configuration.\n */ function normalizeOptions$1(configuredOptions) {\n    // Convert options to objects.\n    return configuredOptions.map(getOptionDefinition$1)// Filter out undefined values that `getOptionDefinition` might return.\n    .filter((option)=>option !== undefined);\n}\n/**\n * Returns an option definition either created from string shortcut.\n * If object is passed then this method will return it without alternating it. Returns undefined for item than cannot be parsed.\n *\n */ function getOptionDefinition$1(option) {\n    // Treat any object as full item definition provided by user in configuration.\n    if (typeof option === 'object') {\n        return option;\n    }\n    // Handle 'default' string as a special case. It will be used to remove the fontFamily attribute.\n    if (option === 'default') {\n        return {\n            title: 'Default',\n            model: undefined\n        };\n    }\n    // Ignore values that we cannot parse to a definition.\n    if (typeof option !== 'string') {\n        return undefined;\n    }\n    // Return font family definition from font string.\n    return generateFontPreset(option);\n}\n/**\n * Creates a predefined preset for pixel size. It deconstructs font-family like string into full configuration option.\n * A font definition is passed as coma delimited set of font family names. Font names might be quoted.\n *\n * @param fontDefinition A font definition form configuration.\n */ function generateFontPreset(fontDefinition) {\n    // Remove quotes from font names. They will be normalized later.\n    const fontNames = fontDefinition.replace(/\"|'/g, '').split(',');\n    // The first matched font name will be used as dropdown list item title and as model value.\n    const firstFontName = fontNames[0];\n    // CSS-compatible font names.\n    const cssFontNames = fontNames.map(normalizeFontNameForCSS).join(', ');\n    return {\n        title: firstFontName,\n        model: cssFontNames,\n        view: {\n            name: 'span',\n            styles: {\n                'font-family': cssFontNames\n            },\n            priority: 7\n        }\n    };\n}\n/**\n * Normalizes font name for the style attribute. It adds braces (') if font name contains spaces.\n */ function normalizeFontNameForCSS(fontName) {\n    fontName = fontName.trim();\n    // Compound font names should be quoted.\n    if (fontName.indexOf(' ') > 0) {\n        fontName = `'${fontName}'`;\n    }\n    return fontName;\n}\n\n/**\n * The font family editing feature.\n *\n * It introduces the {@link module:font/fontfamily/fontfamilycommand~FontFamilyCommand command} and\n * the `fontFamily` attribute in the {@link module:engine/model/model~Model model} which renders\n * in the {@link module:engine/view/view view} as an inline `<span>` element (`<span style=\"font-family: Arial\">`),\n * depending on the {@link module:font/fontconfig~FontFamilyConfig configuration}.\n */ class FontFamilyEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontFamilyEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // Define default configuration using font families shortcuts.\n        editor.config.define(FONT_FAMILY, {\n            options: [\n                'default',\n                'Arial, Helvetica, sans-serif',\n                'Courier New, Courier, monospace',\n                'Georgia, serif',\n                'Lucida Sans Unicode, Lucida Grande, sans-serif',\n                'Tahoma, Geneva, sans-serif',\n                'Times New Roman, Times, serif',\n                'Trebuchet MS, Helvetica, sans-serif',\n                'Verdana, Geneva, sans-serif'\n            ],\n            supportAllValues: false\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Allow fontFamily attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: FONT_FAMILY\n        });\n        editor.model.schema.setAttributeProperties(FONT_FAMILY, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        // Get configured font family options without \"default\" option.\n        const options = normalizeOptions$1(editor.config.get('fontFamily.options')).filter((item)=>item.model);\n        const definition = buildDefinition(FONT_FAMILY, options);\n        // Set-up the two-way conversion.\n        if (editor.config.get('fontFamily.supportAllValues')) {\n            this._prepareAnyValueConverters();\n            this._prepareCompatibilityConverter();\n        } else {\n            editor.conversion.attributeToElement(definition);\n        }\n        editor.commands.add(FONT_FAMILY, new FontFamilyCommand(editor));\n    }\n    /**\n\t * These converters enable keeping any value found as `style=\"font-family: *\"` as a value of an attribute on a text even\n\t * if it is not defined in the plugin configuration.\n\t */ _prepareAnyValueConverters() {\n        const editor = this.editor;\n        editor.conversion.for('downcast').attributeToElement({\n            model: FONT_FAMILY,\n            view: (attributeValue, { writer })=>{\n                return writer.createAttributeElement('span', {\n                    style: 'font-family:' + attributeValue\n                }, {\n                    priority: 7\n                });\n            }\n        });\n        editor.conversion.for('upcast').elementToAttribute({\n            model: {\n                key: FONT_FAMILY,\n                value: (viewElement)=>viewElement.getStyle('font-family')\n            },\n            view: {\n                name: 'span',\n                styles: {\n                    'font-family': /.*/\n                }\n            }\n        });\n    }\n    /**\n\t * Adds support for legacy `<font face=\"..\">` formatting.\n\t */ _prepareCompatibilityConverter() {\n        const editor = this.editor;\n        editor.conversion.for('upcast').elementToAttribute({\n            view: {\n                name: 'font',\n                attributes: {\n                    'face': /.*/\n                }\n            },\n            model: {\n                key: FONT_FAMILY,\n                value: (viewElement)=>viewElement.getAttribute('face')\n            }\n        });\n    }\n}\n\nvar fontFamilyIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z\\\"/></svg>\";\n\n/**\n * The font family UI plugin. It introduces the `'fontFamily'` dropdown.\n */ class FontFamilyUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontFamilyUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const options = this._getLocalizedOptions();\n        const command = editor.commands.get(FONT_FAMILY);\n        const accessibleLabel = t('Font Family');\n        const listOptions = _prepareListOptions$1(options, command);\n        // Register UI component.\n        editor.ui.componentFactory.add(FONT_FAMILY, (locale)=>{\n            const dropdownView = createDropdown(locale);\n            addListToDropdown(dropdownView, listOptions, {\n                role: 'menu',\n                ariaLabel: accessibleLabel\n            });\n            dropdownView.buttonView.set({\n                label: accessibleLabel,\n                icon: fontFamilyIcon,\n                tooltip: true\n            });\n            dropdownView.extendTemplate({\n                attributes: {\n                    class: 'ck-font-family-dropdown'\n                }\n            });\n            dropdownView.bind('isEnabled').to(command);\n            // Execute command when an item from the dropdown is selected.\n            this.listenTo(dropdownView, 'execute', (evt)=>{\n                editor.execute(evt.source.commandName, {\n                    value: evt.source.commandParam\n                });\n                editor.editing.view.focus();\n            });\n            return dropdownView;\n        });\n        editor.ui.componentFactory.add(`menuBar:${FONT_FAMILY}`, (locale)=>{\n            const menuView = new MenuBarMenuView(locale);\n            menuView.buttonView.set({\n                label: accessibleLabel,\n                icon: fontFamilyIcon\n            });\n            menuView.bind('isEnabled').to(command);\n            const listView = new MenuBarMenuListView(locale);\n            for (const definition of listOptions){\n                const listItemView = new MenuBarMenuListItemView(locale, menuView);\n                const buttonView = new MenuBarMenuListItemButtonView(locale);\n                buttonView.set({\n                    role: 'menuitemradio',\n                    isToggleable: true\n                });\n                buttonView.bind(...Object.keys(definition.model)).to(definition.model);\n                buttonView.delegate('execute').to(menuView);\n                buttonView.on('execute', ()=>{\n                    editor.execute(definition.model.commandName, {\n                        value: definition.model.commandParam\n                    });\n                    editor.editing.view.focus();\n                });\n                listItemView.children.add(buttonView);\n                listView.items.add(listItemView);\n            }\n            menuView.panelView.children.add(listView);\n            return menuView;\n        });\n    }\n    /**\n\t * Returns options as defined in `config.fontFamily.options` but processed to account for\n\t * editor localization, i.e. to display {@link module:font/fontconfig~FontFamilyOption}\n\t * in the correct language.\n\t *\n\t * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n\t * when the user configuration is defined because the editor does not exist yet.\n\t */ _getLocalizedOptions() {\n        const editor = this.editor;\n        const t = editor.t;\n        const options = normalizeOptions$1(editor.config.get(FONT_FAMILY).options);\n        return options.map((option)=>{\n            // The only title to localize is \"Default\" others are font names.\n            if (option.title === 'Default') {\n                option.title = t('Default');\n            }\n            return option;\n        });\n    }\n}\n/**\n * Prepares FontFamily dropdown items.\n */ function _prepareListOptions$1(options, command) {\n    const itemDefinitions = new Collection();\n    // Create dropdown items.\n    for (const option of options){\n        const def = {\n            type: 'button',\n            model: new ViewModel({\n                commandName: FONT_FAMILY,\n                commandParam: option.model,\n                label: option.title,\n                role: 'menuitemradio',\n                withText: true\n            })\n        };\n        def.model.bind('isOn').to(command, 'value', (value)=>{\n            // \"Default\" or check in strict font-family converters mode.\n            if (value === option.model) {\n                return true;\n            }\n            if (!value || !option.model) {\n                return false;\n            }\n            return value.split(',')[0].replace(/'/g, '').toLowerCase() === option.model.toLowerCase();\n        });\n        // Try to set a dropdown list item style.\n        if (option.view && typeof option.view !== 'string' && option.view.styles) {\n            def.model.set('labelStyle', `font-family: ${option.view.styles['font-family']}`);\n        }\n        itemDefinitions.add(def);\n    }\n    return itemDefinitions;\n}\n\n/**\n * The font family plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentatiom\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing} and\n * {@link module:font/fontfamily/fontfamilyui~FontFamilyUI} features in the editor.\n */ class FontFamily extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            FontFamilyEditing,\n            FontFamilyUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontFamily';\n    }\n}\n\n/**\n * The font size command. It is used by {@link module:font/fontsize/fontsizeediting~FontSizeEditing}\n * to apply the font size.\n *\n * ```ts\n * editor.execute( 'fontSize', { value: 'small' } );\n * ```\n *\n * **Note**: Executing the command without the value removes the attribute from the model.\n */ class FontSizeCommand extends FontCommand {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor, FONT_SIZE);\n    }\n}\n\n/**\n * Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options}\n * to the {@link module:font/fontconfig~FontSizeOption} format.\n *\n * @param configuredOptions An array of options taken from the configuration.\n */ function normalizeOptions(configuredOptions) {\n    // Convert options to objects.\n    return configuredOptions.map((item)=>getOptionDefinition(item))// Filter out undefined values that `getOptionDefinition` might return.\n    .filter((option)=>option !== undefined);\n}\n// Default named presets map. Always create a new instance of the preset object in order to avoid modifying references.\nconst namedPresets = {\n    get tiny () {\n        return {\n            title: 'Tiny',\n            model: 'tiny',\n            view: {\n                name: 'span',\n                classes: 'text-tiny',\n                priority: 7\n            }\n        };\n    },\n    get small () {\n        return {\n            title: 'Small',\n            model: 'small',\n            view: {\n                name: 'span',\n                classes: 'text-small',\n                priority: 7\n            }\n        };\n    },\n    get big () {\n        return {\n            title: 'Big',\n            model: 'big',\n            view: {\n                name: 'span',\n                classes: 'text-big',\n                priority: 7\n            }\n        };\n    },\n    get huge () {\n        return {\n            title: 'Huge',\n            model: 'huge',\n            view: {\n                name: 'span',\n                classes: 'text-huge',\n                priority: 7\n            }\n        };\n    }\n};\n/**\n * Returns an option definition either from preset or creates one from number shortcut.\n * If object is passed then this method will return it without alternating it. Returns undefined for item than cannot be parsed.\n */ function getOptionDefinition(option) {\n    if (typeof option === 'number') {\n        option = String(option);\n    }\n    // Check whether passed option is a full item definition provided by user in configuration.\n    if (typeof option === 'object' && isFullItemDefinition(option)) {\n        return attachPriority(option);\n    }\n    const preset = findPreset(option);\n    // Item is a named preset.\n    if (preset) {\n        return attachPriority(preset);\n    }\n    // 'Default' font size. It will be used to remove the fontSize attribute.\n    if (option === 'default') {\n        return {\n            model: undefined,\n            title: 'Default'\n        };\n    }\n    // At this stage we probably have numerical value to generate a preset so parse it's value.\n    // Discard any faulty values.\n    if (isNumericalDefinition(option)) {\n        return undefined;\n    }\n    // Return font size definition from size value.\n    return generatePixelPreset(option);\n}\n/**\n * Creates a predefined preset for pixel size.\n * @param definition Font size in pixels.\n * @returns\n */ function generatePixelPreset(definition) {\n    // Extend a short (numeric value) definition.\n    if (typeof definition === 'string') {\n        definition = {\n            title: definition,\n            model: `${parseFloat(definition)}px`\n        };\n    }\n    definition.view = {\n        name: 'span',\n        styles: {\n            'font-size': definition.model\n        }\n    };\n    return attachPriority(definition);\n}\n/**\n * Adds the priority to the view element definition if missing. It's required due to ckeditor/ckeditor5#2291\n */ function attachPriority(definition) {\n    if (definition.view && typeof definition.view !== 'string' && !definition.view.priority) {\n        definition.view.priority = 7;\n    }\n    return definition;\n}\n/**\n * Returns a prepared preset definition. If passed an object, a name of preset should be defined as `model` value.\n *\n * @param definition.model A preset name.\n */ function findPreset(definition) {\n    return typeof definition === 'string' ? namedPresets[definition] : namedPresets[definition.model];\n}\n/**\n * We treat `definition` as completed if it is an object that contains `title`, `model` and `view` values.\n */ function isFullItemDefinition(definition) {\n    return definition.title && definition.model && definition.view;\n}\nfunction isNumericalDefinition(definition) {\n    let numberValue;\n    if (typeof definition === 'object') {\n        if (!definition.model) {\n            /**\n\t\t\t * Provided value as an option for {@link module:font/fontsize~FontSize} seems to invalid.\n\t\t\t *\n\t\t\t * See valid examples described in the {@link module:font/fontconfig~FontSizeConfig#options plugin configuration}.\n\t\t\t *\n\t\t\t * @error font-size-invalid-definition\n\t\t\t */ throw new CKEditorError('font-size-invalid-definition', null, definition);\n        } else {\n            numberValue = parseFloat(definition.model);\n        }\n    } else {\n        numberValue = parseFloat(definition);\n    }\n    return isNaN(numberValue);\n}\n\n// Mapping of `<font size=\"..\">` styling to CSS's `font-size` values.\nconst styleFontSize = [\n    'x-small',\n    'x-small',\n    'small',\n    'medium',\n    'large',\n    'x-large',\n    'xx-large',\n    'xxx-large'\n];\n/**\n * The font size editing feature.\n *\n * It introduces the {@link module:font/fontsize/fontsizecommand~FontSizeCommand command} and the `fontSize`\n * attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}\n * as a `<span>` element with either:\n * * a style attribute (`<span style=\"font-size:12px\">...</span>`),\n * * or a class attribute (`<span class=\"text-small\">...</span>`)\n *\n * depending on the {@link module:font/fontconfig~FontSizeConfig configuration}.\n */ class FontSizeEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontSizeEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // Define default configuration using named presets.\n        editor.config.define(FONT_SIZE, {\n            options: [\n                'tiny',\n                'small',\n                'default',\n                'big',\n                'huge'\n            ],\n            supportAllValues: false\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Allow fontSize attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: FONT_SIZE\n        });\n        editor.model.schema.setAttributeProperties(FONT_SIZE, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n        const supportAllValues = editor.config.get('fontSize.supportAllValues');\n        // Define view to model conversion.\n        const options = normalizeOptions(this.editor.config.get('fontSize.options')).filter((item)=>item.model);\n        const definition = buildDefinition(FONT_SIZE, options);\n        // Set-up the two-way conversion.\n        if (supportAllValues) {\n            this._prepareAnyValueConverters(definition);\n            this._prepareCompatibilityConverter();\n        } else {\n            editor.conversion.attributeToElement(definition);\n        }\n        // Add FontSize command.\n        editor.commands.add(FONT_SIZE, new FontSizeCommand(editor));\n    }\n    /**\n\t * These converters enable keeping any value found as `style=\"font-size: *\"` as a value of an attribute on a text even\n\t * if it is not defined in the plugin configuration.\n\t *\n\t * @param definition Converter definition out of input data.\n\t */ _prepareAnyValueConverters(definition) {\n        const editor = this.editor;\n        // If `fontSize.supportAllValues=true`, we do not allow to use named presets in the plugin's configuration.\n        const presets = definition.model.values.filter((value)=>{\n            return !isLength(String(value)) && !isPercentage(String(value));\n        });\n        if (presets.length) {\n            /**\n\t\t\t * If {@link module:font/fontconfig~FontSizeConfig#supportAllValues `config.fontSize.supportAllValues`} is `true`,\n\t\t\t * you need to use numerical values as font size options.\n\t\t\t *\n\t\t\t * See valid examples described in the {@link module:font/fontconfig~FontSizeConfig#options plugin configuration}.\n\t\t\t *\n\t\t\t * @error font-size-invalid-use-of-named-presets\n\t\t\t * @param {Array.<String>} presets Invalid values.\n\t\t\t */ throw new CKEditorError('font-size-invalid-use-of-named-presets', null, {\n                presets\n            });\n        }\n        editor.conversion.for('downcast').attributeToElement({\n            model: FONT_SIZE,\n            view: (attributeValue, { writer })=>{\n                if (!attributeValue) {\n                    return;\n                }\n                return writer.createAttributeElement('span', {\n                    style: 'font-size:' + attributeValue\n                }, {\n                    priority: 7\n                });\n            }\n        });\n        editor.conversion.for('upcast').elementToAttribute({\n            model: {\n                key: FONT_SIZE,\n                value: (viewElement)=>viewElement.getStyle('font-size')\n            },\n            view: {\n                name: 'span',\n                styles: {\n                    'font-size': /.*/\n                }\n            }\n        });\n    }\n    /**\n\t * Adds support for legacy `<font size=\"..\">` formatting.\n\t */ _prepareCompatibilityConverter() {\n        const editor = this.editor;\n        editor.conversion.for('upcast').elementToAttribute({\n            view: {\n                name: 'font',\n                attributes: {\n                    // Documentation mentions sizes from 1 to 7. To handle old content we support all values\n                    // up to 999 but clamp it to the valid range. Why 999? It should cover accidental values\n                    // similar to percentage, e.g. 100%, 200% which could be the usual mistake for font size.\n                    'size': /^[+-]?\\d{1,3}$/\n                }\n            },\n            model: {\n                key: FONT_SIZE,\n                value: (viewElement)=>{\n                    const value = viewElement.getAttribute('size');\n                    const isRelative = value[0] === '-' || value[0] === '+';\n                    let size = parseInt(value, 10);\n                    if (isRelative) {\n                        // Add relative size (which can be negative) to the default size = 3.\n                        size = 3 + size;\n                    }\n                    const maxSize = styleFontSize.length - 1;\n                    const clampedSize = Math.min(Math.max(size, 0), maxSize);\n                    return styleFontSize[clampedSize];\n                }\n            }\n        });\n    }\n}\n\nvar fontSizeIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z\\\"/></svg>\";\n\n/**\n * The font size UI plugin. It introduces the `'fontSize'` dropdown.\n */ class FontSizeUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontSizeUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const options = this._getLocalizedOptions();\n        const command = editor.commands.get(FONT_SIZE);\n        const accessibleLabel = t('Font Size');\n        const listOptions = _prepareListOptions(options, command);\n        // Register UI component.\n        editor.ui.componentFactory.add(FONT_SIZE, (locale)=>{\n            const dropdownView = createDropdown(locale);\n            addListToDropdown(dropdownView, listOptions, {\n                role: 'menu',\n                ariaLabel: accessibleLabel\n            });\n            // Create dropdown model.\n            dropdownView.buttonView.set({\n                label: accessibleLabel,\n                icon: fontSizeIcon,\n                tooltip: true\n            });\n            dropdownView.extendTemplate({\n                attributes: {\n                    class: [\n                        'ck-font-size-dropdown'\n                    ]\n                }\n            });\n            dropdownView.bind('isEnabled').to(command);\n            // Execute command when an item from the dropdown is selected.\n            this.listenTo(dropdownView, 'execute', (evt)=>{\n                editor.execute(evt.source.commandName, {\n                    value: evt.source.commandParam\n                });\n                editor.editing.view.focus();\n            });\n            return dropdownView;\n        });\n        editor.ui.componentFactory.add(`menuBar:${FONT_SIZE}`, (locale)=>{\n            const menuView = new MenuBarMenuView(locale);\n            menuView.buttonView.set({\n                label: accessibleLabel,\n                icon: fontSizeIcon\n            });\n            menuView.bind('isEnabled').to(command);\n            const listView = new MenuBarMenuListView(locale);\n            for (const definition of listOptions){\n                const listItemView = new MenuBarMenuListItemView(locale, menuView);\n                const buttonView = new MenuBarMenuListItemButtonView(locale);\n                buttonView.set({\n                    role: 'menuitemradio',\n                    isToggleable: true\n                });\n                buttonView.bind(...Object.keys(definition.model)).to(definition.model);\n                buttonView.delegate('execute').to(menuView);\n                buttonView.on('execute', ()=>{\n                    editor.execute(definition.model.commandName, {\n                        value: definition.model.commandParam\n                    });\n                    editor.editing.view.focus();\n                });\n                listItemView.children.add(buttonView);\n                listView.items.add(listItemView);\n            }\n            menuView.panelView.children.add(listView);\n            return menuView;\n        });\n    }\n    /**\n\t * Returns options as defined in `config.fontSize.options` but processed to account for\n\t * editor localization, i.e. to display {@link module:font/fontconfig~FontSizeOption}\n\t * in the correct language.\n\t *\n\t * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n\t * when the user configuration is defined because the editor does not exist yet.\n\t */ _getLocalizedOptions() {\n        const editor = this.editor;\n        const t = editor.t;\n        const localizedTitles = {\n            Default: t('Default'),\n            Tiny: t('Tiny'),\n            Small: t('Small'),\n            Big: t('Big'),\n            Huge: t('Huge')\n        };\n        const options = normalizeOptions(editor.config.get(FONT_SIZE).options);\n        return options.map((option)=>{\n            const title = localizedTitles[option.title];\n            if (title && title != option.title) {\n                // Clone the option to avoid altering the original `namedPresets` from `./utils.js`.\n                option = Object.assign({}, option, {\n                    title\n                });\n            }\n            return option;\n        });\n    }\n}\n/**\n * Prepares FontSize dropdown items.\n */ function _prepareListOptions(options, command) {\n    const itemDefinitions = new Collection();\n    for (const option of options){\n        const def = {\n            type: 'button',\n            model: new ViewModel({\n                commandName: FONT_SIZE,\n                commandParam: option.model,\n                label: option.title,\n                class: 'ck-fontsize-option',\n                role: 'menuitemradio',\n                withText: true\n            })\n        };\n        if (option.view && typeof option.view !== 'string') {\n            if (option.view.styles) {\n                def.model.set('labelStyle', `font-size:${option.view.styles['font-size']}`);\n            }\n            if (option.view.classes) {\n                def.model.set('class', `${def.model.class} ${option.view.classes}`);\n            }\n        }\n        def.model.bind('isOn').to(command, 'value', (value)=>value === option.model);\n        // Add the option to the collection.\n        itemDefinitions.add(def);\n    }\n    return itemDefinitions;\n}\n\n/**\n * The font size plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentation\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:font/fontsize/fontsizeediting~FontSizeEditing} and\n * {@link module:font/fontsize/fontsizeui~FontSizeUI} features in the editor.\n */ class FontSize extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            FontSizeEditing,\n            FontSizeUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontSize';\n    }\n    /**\n\t * Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options}\n\t * to the {@link module:font/fontconfig~FontSizeOption} format.\n\t *\n\t * @param configuredOptions An array of options taken from the configuration.\n\t */ normalizeSizeOptions(options) {\n        return normalizeOptions(options);\n    }\n}\n\n/**\n * The font color command. It is used by {@link module:font/fontcolor/fontcolorediting~FontColorEditing}\n * to apply the font color.\n *\n * ```ts\n * editor.execute( 'fontColor', { value: 'rgb(250, 20, 20)' } );\n * ```\n *\n * **Note**: Executing the command with the `null` value removes the attribute from the model.\n */ class FontColorCommand extends FontCommand {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor, FONT_COLOR);\n    }\n}\n\n/**\n * The font color editing feature.\n *\n * It introduces the {@link module:font/fontcolor/fontcolorcommand~FontColorCommand command} and\n * the `fontColor` attribute in the {@link module:engine/model/model~Model model} which renders\n * in the {@link module:engine/view/view view} as a `<span>` element (`<span style=\"color: ...\">`),\n * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.\n */ class FontColorEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontColorEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define(FONT_COLOR, {\n            colors: [\n                {\n                    color: 'hsl(0, 0%, 0%)',\n                    label: 'Black'\n                },\n                {\n                    color: 'hsl(0, 0%, 30%)',\n                    label: 'Dim grey'\n                },\n                {\n                    color: 'hsl(0, 0%, 60%)',\n                    label: 'Grey'\n                },\n                {\n                    color: 'hsl(0, 0%, 90%)',\n                    label: 'Light grey'\n                },\n                {\n                    color: 'hsl(0, 0%, 100%)',\n                    label: 'White',\n                    hasBorder: true\n                },\n                {\n                    color: 'hsl(0, 75%, 60%)',\n                    label: 'Red'\n                },\n                {\n                    color: 'hsl(30, 75%, 60%)',\n                    label: 'Orange'\n                },\n                {\n                    color: 'hsl(60, 75%, 60%)',\n                    label: 'Yellow'\n                },\n                {\n                    color: 'hsl(90, 75%, 60%)',\n                    label: 'Light green'\n                },\n                {\n                    color: 'hsl(120, 75%, 60%)',\n                    label: 'Green'\n                },\n                {\n                    color: 'hsl(150, 75%, 60%)',\n                    label: 'Aquamarine'\n                },\n                {\n                    color: 'hsl(180, 75%, 60%)',\n                    label: 'Turquoise'\n                },\n                {\n                    color: 'hsl(210, 75%, 60%)',\n                    label: 'Light blue'\n                },\n                {\n                    color: 'hsl(240, 75%, 60%)',\n                    label: 'Blue'\n                },\n                {\n                    color: 'hsl(270, 75%, 60%)',\n                    label: 'Purple'\n                }\n            ],\n            columns: 5\n        });\n        editor.conversion.for('upcast').elementToAttribute({\n            view: {\n                name: 'span',\n                styles: {\n                    'color': /[\\s\\S]+/\n                }\n            },\n            model: {\n                key: FONT_COLOR,\n                value: renderUpcastAttribute('color')\n            }\n        });\n        // Support legacy `<font color=\"..\">` formatting.\n        editor.conversion.for('upcast').elementToAttribute({\n            view: {\n                name: 'font',\n                attributes: {\n                    'color': /^#?\\w+$/\n                }\n            },\n            model: {\n                key: FONT_COLOR,\n                value: (viewElement)=>viewElement.getAttribute('color')\n            }\n        });\n        editor.conversion.for('downcast').attributeToElement({\n            model: FONT_COLOR,\n            view: renderDowncastElement('color')\n        });\n        editor.commands.add(FONT_COLOR, new FontColorCommand(editor));\n        // Allow the font color attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: FONT_COLOR\n        });\n        editor.model.schema.setAttributeProperties(FONT_COLOR, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n    }\n}\n\n/**\n * The color UI plugin which isolates the common logic responsible for displaying dropdowns with color grids.\n *\n * It is used to create the `'fontBackgroundColor'` and `'fontColor'` dropdowns, each hosting\n * a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n */ class ColorUI extends Plugin {\n    /**\n\t * The name of the command which will be executed when a color tile is clicked.\n\t */ commandName;\n    /**\n\t * The name of this component in the {@link module:ui/componentfactory~ComponentFactory}.\n\t * Also the configuration scope name in `editor.config`.\n\t */ componentName;\n    /**\n\t * The SVG icon used by the dropdown.\n\t */ icon;\n    /**\n\t * The label used by the dropdown.\n\t */ dropdownLabel;\n    /**\n\t * The number of columns in the color grid.\n\t */ columns;\n    /**\n\t * Creates a plugin which introduces a dropdown with a pre–configured\n\t * {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n\t *\n\t * @param config The configuration object.\n\t * @param config.commandName The name of the command which will be executed when a color tile is clicked.\n\t * @param config.componentName The name of the dropdown in the {@link module:ui/componentfactory~ComponentFactory}\n\t * and the configuration scope name in `editor.config`.\n\t * @param config.icon The SVG icon used by the dropdown.\n\t * @param config.dropdownLabel The label used by the dropdown.\n\t */ constructor(editor, { commandName, componentName, icon, dropdownLabel }){\n        super(editor);\n        this.commandName = commandName;\n        this.componentName = componentName;\n        this.icon = icon;\n        this.dropdownLabel = dropdownLabel;\n        this.columns = editor.config.get(`${this.componentName}.columns`);\n    }\n    /**\n\t* @inheritDoc\n\t*/ init() {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const t = locale.t;\n        const command = editor.commands.get(this.commandName);\n        const componentConfig = editor.config.get(this.componentName);\n        const colorsConfig = normalizeColorOptions(componentConfig.colors);\n        const localizedColors = getLocalizedColorOptions(locale, colorsConfig);\n        const documentColorsCount = componentConfig.documentColors;\n        const hasColorPicker = componentConfig.colorPicker !== false;\n        // Register the UI component.\n        editor.ui.componentFactory.add(this.componentName, (locale)=>{\n            const dropdownView = createDropdown(locale);\n            // Font color dropdown rendering is deferred once it gets open to improve performance (#6192).\n            let dropdownContentRendered = false;\n            const colorSelectorView = addColorSelectorToDropdown({\n                dropdownView,\n                colors: localizedColors.map((option)=>({\n                        label: option.label,\n                        color: option.model,\n                        options: {\n                            hasBorder: option.hasBorder\n                        }\n                    })),\n                columns: this.columns,\n                removeButtonLabel: t('Remove color'),\n                colorPickerLabel: t('Color picker'),\n                documentColorsLabel: documentColorsCount !== 0 ? t('Document colors') : '',\n                documentColorsCount: documentColorsCount === undefined ? this.columns : documentColorsCount,\n                colorPickerViewConfig: hasColorPicker ? componentConfig.colorPicker || {} : false\n            });\n            colorSelectorView.bind('selectedColor').to(command, 'value');\n            dropdownView.buttonView.set({\n                label: this.dropdownLabel,\n                icon: this.icon,\n                tooltip: true\n            });\n            dropdownView.extendTemplate({\n                attributes: {\n                    class: 'ck-color-ui-dropdown'\n                }\n            });\n            dropdownView.bind('isEnabled').to(command);\n            colorSelectorView.on('execute', (evt, data)=>{\n                if (dropdownView.isOpen) {\n                    editor.execute(this.commandName, {\n                        value: data.value,\n                        batch: this._undoStepBatch\n                    });\n                }\n                if (data.source !== 'colorPicker') {\n                    editor.editing.view.focus();\n                }\n                if (data.source === 'colorPickerSaveButton') {\n                    dropdownView.isOpen = false;\n                }\n            });\n            colorSelectorView.on('colorPicker:show', ()=>{\n                this._undoStepBatch = editor.model.createBatch();\n            });\n            colorSelectorView.on('colorPicker:cancel', ()=>{\n                if (this._undoStepBatch.operations.length) {\n                    // We need to close the dropdown before the undo batch.\n                    // Otherwise, ColorUI treats undo as a selected color change,\n                    // propagating the update to the whole selection.\n                    // That's an issue if spans with various colors were selected.\n                    dropdownView.isOpen = false;\n                    editor.execute('undo', this._undoStepBatch);\n                }\n                editor.editing.view.focus();\n            });\n            dropdownView.on('change:isOpen', (evt, name, isVisible)=>{\n                if (!dropdownContentRendered) {\n                    dropdownContentRendered = true;\n                    dropdownView.colorSelectorView.appendUI();\n                }\n                if (isVisible) {\n                    if (documentColorsCount !== 0) {\n                        colorSelectorView.updateDocumentColors(editor.model, this.componentName);\n                    }\n                    colorSelectorView.updateSelectedColors();\n                    colorSelectorView.showColorGridsFragment();\n                }\n            });\n            // Accessibility: focus the first active color when opening the dropdown.\n            focusChildOnDropdownOpen(dropdownView, ()=>dropdownView.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find((item)=>item.isOn));\n            return dropdownView;\n        });\n        // Register menu bar button..\n        editor.ui.componentFactory.add(`menuBar:${this.componentName}`, (locale)=>{\n            const menuView = new MenuBarMenuView(locale);\n            menuView.buttonView.set({\n                label: this.dropdownLabel,\n                icon: this.icon\n            });\n            menuView.bind('isEnabled').to(command);\n            // Font color sub-menu rendering is deferred once it gets open to improve performance (#6192).\n            let contentRendered = false;\n            const colorSelectorView = new ColorSelectorView(locale, {\n                colors: localizedColors.map((option)=>({\n                        label: option.label,\n                        color: option.model,\n                        options: {\n                            hasBorder: option.hasBorder\n                        }\n                    })),\n                columns: this.columns,\n                removeButtonLabel: t('Remove color'),\n                colorPickerLabel: t('Color picker'),\n                documentColorsLabel: documentColorsCount !== 0 ? t('Document colors') : '',\n                documentColorsCount: documentColorsCount === undefined ? this.columns : documentColorsCount,\n                colorPickerViewConfig: false\n            });\n            colorSelectorView.bind('selectedColor').to(command, 'value');\n            colorSelectorView.delegate('execute').to(menuView);\n            colorSelectorView.on('execute', (evt, data)=>{\n                editor.execute(this.commandName, {\n                    value: data.value,\n                    batch: this._undoStepBatch\n                });\n                editor.editing.view.focus();\n            });\n            menuView.on('change:isOpen', (evt, name, isVisible)=>{\n                if (!contentRendered) {\n                    contentRendered = true;\n                    colorSelectorView.appendUI();\n                }\n                if (isVisible) {\n                    if (documentColorsCount !== 0) {\n                        colorSelectorView.updateDocumentColors(editor.model, this.componentName);\n                    }\n                    colorSelectorView.updateSelectedColors();\n                    colorSelectorView.showColorGridsFragment();\n                }\n            });\n            menuView.panelView.children.add(colorSelectorView);\n            return menuView;\n        });\n    }\n}\n\nvar fontColorIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z\\\"/></svg>\";\n\n/**\n * The font color UI plugin. It introduces the `'fontColor'` dropdown.\n */ class FontColorUI extends ColorUI {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        const t = editor.locale.t;\n        super(editor, {\n            commandName: FONT_COLOR,\n            componentName: FONT_COLOR,\n            icon: fontColorIcon,\n            dropdownLabel: t('Font Color')\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontColorUI';\n    }\n}\n\n/**\n * The font color plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentation\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:font/fontcolor/fontcolorediting~FontColorEditing} and\n * {@link module:font/fontcolor/fontcolorui~FontColorUI} features in the editor.\n */ class FontColor extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            FontColorEditing,\n            FontColorUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontColor';\n    }\n}\n\n/**\n * The font background color command. It is used by\n * {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing}\n * to apply the font background color.\n *\n * ```ts\n * editor.execute( 'fontBackgroundColor', { value: 'rgb(250, 20, 20)' } );\n * ```\n *\n * **Note**: Executing the command with the `null` value removes the attribute from the model.\n */ class FontBackgroundColorCommand extends FontCommand {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor, FONT_BACKGROUND_COLOR);\n    }\n}\n\n/**\n * The font background color editing feature.\n *\n * It introduces the {@link module:font/fontbackgroundcolor/fontbackgroundcolorcommand~FontBackgroundColorCommand command} and\n * the `fontBackgroundColor` attribute in the {@link module:engine/model/model~Model model} which renders\n * in the {@link module:engine/view/view view} as a `<span>` element (`<span style=\"background-color: ...\">`),\n * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.\n */ class FontBackgroundColorEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontBackgroundColorEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define(FONT_BACKGROUND_COLOR, {\n            colors: [\n                {\n                    color: 'hsl(0, 0%, 0%)',\n                    label: 'Black'\n                },\n                {\n                    color: 'hsl(0, 0%, 30%)',\n                    label: 'Dim grey'\n                },\n                {\n                    color: 'hsl(0, 0%, 60%)',\n                    label: 'Grey'\n                },\n                {\n                    color: 'hsl(0, 0%, 90%)',\n                    label: 'Light grey'\n                },\n                {\n                    color: 'hsl(0, 0%, 100%)',\n                    label: 'White',\n                    hasBorder: true\n                },\n                {\n                    color: 'hsl(0, 75%, 60%)',\n                    label: 'Red'\n                },\n                {\n                    color: 'hsl(30, 75%, 60%)',\n                    label: 'Orange'\n                },\n                {\n                    color: 'hsl(60, 75%, 60%)',\n                    label: 'Yellow'\n                },\n                {\n                    color: 'hsl(90, 75%, 60%)',\n                    label: 'Light green'\n                },\n                {\n                    color: 'hsl(120, 75%, 60%)',\n                    label: 'Green'\n                },\n                {\n                    color: 'hsl(150, 75%, 60%)',\n                    label: 'Aquamarine'\n                },\n                {\n                    color: 'hsl(180, 75%, 60%)',\n                    label: 'Turquoise'\n                },\n                {\n                    color: 'hsl(210, 75%, 60%)',\n                    label: 'Light blue'\n                },\n                {\n                    color: 'hsl(240, 75%, 60%)',\n                    label: 'Blue'\n                },\n                {\n                    color: 'hsl(270, 75%, 60%)',\n                    label: 'Purple'\n                }\n            ],\n            columns: 5\n        });\n        editor.data.addStyleProcessorRules(addBackgroundRules);\n        editor.conversion.for('upcast').elementToAttribute({\n            view: {\n                name: 'span',\n                styles: {\n                    'background-color': /[\\s\\S]+/\n                }\n            },\n            model: {\n                key: FONT_BACKGROUND_COLOR,\n                value: renderUpcastAttribute('background-color')\n            }\n        });\n        editor.conversion.for('downcast').attributeToElement({\n            model: FONT_BACKGROUND_COLOR,\n            view: renderDowncastElement('background-color')\n        });\n        editor.commands.add(FONT_BACKGROUND_COLOR, new FontBackgroundColorCommand(editor));\n        // Allow the font backgroundColor attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: FONT_BACKGROUND_COLOR\n        });\n        editor.model.schema.setAttributeProperties(FONT_BACKGROUND_COLOR, {\n            isFormatting: true,\n            copyOnEnter: true\n        });\n    }\n}\n\nvar fontBackgroundColorIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z\\\"/></svg>\";\n\n/**\n * The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.\n */ class FontBackgroundColorUI extends ColorUI {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        const t = editor.locale.t;\n        super(editor, {\n            commandName: FONT_BACKGROUND_COLOR,\n            componentName: FONT_BACKGROUND_COLOR,\n            icon: fontBackgroundColorIcon,\n            dropdownLabel: t('Font Background Color')\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontBackgroundColorUI';\n    }\n}\n\n/**\n * The font background color plugin.\n *\n * For a detailed overview, check the {@glink features/font font feature} documentation\n * and the {@glink api/font package page}.\n *\n * This is a \"glue\" plugin which loads\n * the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} and\n * {@link module:font/fontbackgroundcolor/fontbackgroundcolorui~FontBackgroundColorUI} features in the editor.\n */ class FontBackgroundColor extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            FontBackgroundColorEditing,\n            FontBackgroundColorUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'FontBackgroundColor';\n    }\n}\n\n/**\n * A plugin that enables a set of text styling features:\n *\n * * {@link module:font/fontsize~FontSize},\n * * {@link module:font/fontfamily~FontFamily}.\n * * {@link module:font/fontcolor~FontColor},\n * * {@link module:font/fontbackgroundcolor~FontBackgroundColor}.\n *\n * For a detailed overview, check the {@glink features/font Font feature} documentation\n * and the {@glink api/font package page}.\n */ class Font extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            FontFamily,\n            FontSize,\n            FontColor,\n            FontBackgroundColor\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Font';\n    }\n}\n\nexport { Font, FontBackgroundColor, FontBackgroundColorEditing, FontBackgroundColorUI, FontColor, FontColorEditing, FontColorUI, FontFamily, FontFamilyEditing, FontFamilyUI, FontSize, FontSizeEditing, FontSizeUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * The paragraph command.\n */ class ParagraphCommand extends Command {\n    constructor(editor){\n        super(editor);\n        // Since this command may pass selection in execution block, it should be checked directly.\n        this._isEnabledBasedOnSelection = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const document = model.document;\n        const block = first(document.selection.getSelectedBlocks());\n        this.value = !!block && block.is('element', 'paragraph');\n        this.isEnabled = !!block && checkCanBecomeParagraph(block, model.schema);\n    }\n    /**\n\t * Executes the command. All the blocks (see {@link module:engine/model/schema~Schema}) in the selection\n\t * will be turned to paragraphs.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.selection The selection that the command should be applied to. By default,\n\t * if not provided, the command is applied to the {@link module:engine/model/document~Document#selection}.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        const selection = options.selection || document.selection;\n        // Don't execute command if selection is in non-editable place.\n        if (!model.canEditAt(selection)) {\n            return;\n        }\n        model.change((writer)=>{\n            const blocks = selection.getSelectedBlocks();\n            for (const block of blocks){\n                if (!block.is('element', 'paragraph') && checkCanBecomeParagraph(block, model.schema)) {\n                    writer.rename(block, 'paragraph');\n                }\n            }\n        });\n    }\n}\n/**\n * Checks whether the given block can be replaced by a paragraph.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */ function checkCanBecomeParagraph(block, schema) {\n    return schema.checkChild(block.parent, 'paragraph') && !schema.isObject(block);\n}\n\n/**\n * The insert paragraph command. It inserts a new paragraph at a specific\n * {@link module:engine/model/position~Position document position}.\n *\n * ```ts\n * // Insert a new paragraph before an element in the document.\n * editor.execute( 'insertParagraph', {\n *   position: editor.model.createPositionBefore( element )\n * } );\n * ```\n *\n * If a paragraph is disallowed in the context of the specific position, the command\n * will attempt to split position ancestors to find a place where it is possible\n * to insert a paragraph.\n *\n * **Note**: This command moves the selection to the inserted paragraph.\n */ class InsertParagraphCommand extends Command {\n    constructor(editor){\n        super(editor);\n        // Since this command passes position in execution block instead of selection, it should be checked directly.\n        this._isEnabledBasedOnSelection = false;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.position The model position at which the new paragraph will be inserted.\n\t * @param options.attributes Attributes keys and values to set on a inserted paragraph.\n\t * @fires execute\n\t */ execute(options) {\n        const model = this.editor.model;\n        const attributes = options.attributes;\n        let position = options.position;\n        // Don't execute command if position is in non-editable place.\n        if (!model.canEditAt(position)) {\n            return;\n        }\n        model.change((writer)=>{\n            position = this._findPositionToInsertParagraph(position, writer);\n            if (!position) {\n                return;\n            }\n            const paragraph = writer.createElement('paragraph');\n            if (attributes) {\n                model.schema.setAllowedAttributes(paragraph, attributes, writer);\n            }\n            model.insertContent(paragraph, position);\n            writer.setSelection(paragraph, 'in');\n        });\n    }\n    /**\n\t * Returns the best position to insert a new paragraph.\n\t */ _findPositionToInsertParagraph(position, writer) {\n        const model = this.editor.model;\n        if (model.schema.checkChild(position, 'paragraph')) {\n            return position;\n        }\n        const allowedParent = model.schema.findAllowedParent(position, 'paragraph');\n        // It could be there's no ancestor limit that would allow paragraph.\n        // In theory, \"paragraph\" could be disallowed even in the \"$root\".\n        if (!allowedParent) {\n            return null;\n        }\n        const positionParent = position.parent;\n        const isTextAllowed = model.schema.checkChild(positionParent, '$text');\n        // At empty $block or at the end of $block.\n        // <paragraph>[]</paragraph> ---> <paragraph></paragraph><paragraph>[]</paragraph>\n        // <paragraph>foo[]</paragraph> ---> <paragraph>foo</paragraph><paragraph>[]</paragraph>\n        if (positionParent.isEmpty || isTextAllowed && position.isAtEnd) {\n            return model.createPositionAfter(positionParent);\n        }\n        // At the start of $block with text.\n        // <paragraph>[]foo</paragraph> ---> <paragraph>[]</paragraph><paragraph>foo</paragraph>\n        if (!positionParent.isEmpty && isTextAllowed && position.isAtStart) {\n            return model.createPositionBefore(positionParent);\n        }\n        return writer.split(position, allowedParent).position;\n    }\n}\n\n/**\n * The paragraph feature for the editor.\n *\n * It introduces the `<paragraph>` element in the model which renders as a `<p>` element in the DOM and data.\n *\n * It also brings two editors commands:\n *\n * * The {@link module:paragraph/paragraphcommand~ParagraphCommand `'paragraph'`} command that converts all\n * blocks in the model selection into paragraphs.\n * * The {@link module:paragraph/insertparagraphcommand~InsertParagraphCommand `'insertParagraph'`} command\n * that inserts a new paragraph at a specified location in the model.\n */ class Paragraph extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Paragraph';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        editor.commands.add('paragraph', new ParagraphCommand(editor));\n        editor.commands.add('insertParagraph', new InsertParagraphCommand(editor));\n        // Schema.\n        model.schema.register('paragraph', {\n            inheritAllFrom: '$block'\n        });\n        editor.conversion.elementToElement({\n            model: 'paragraph',\n            view: 'p'\n        });\n        // Conversion for paragraph-like elements which has not been converted by any plugin.\n        editor.conversion.for('upcast').elementToElement({\n            model: (viewElement, { writer })=>{\n                if (!Paragraph.paragraphLikeElements.has(viewElement.name)) {\n                    return null;\n                }\n                // Do not auto-paragraph empty elements.\n                if (viewElement.isEmpty) {\n                    return null;\n                }\n                return writer.createElement('paragraph');\n            },\n            view: /.+/,\n            converterPriority: 'low'\n        });\n    }\n    /**\n\t * A list of element names which should be treated by the autoparagraphing algorithms as\n\t * paragraph-like. This means that e.g. the following content:\n\t *\n\t * ```html\n\t * <h1>Foo</h1>\n\t * <table>\n\t *   <tr>\n\t *     <td>X</td>\n\t *     <td>\n\t *       <ul>\n\t *         <li>Y</li>\n\t *         <li>Z</li>\n\t *       </ul>\n\t *     </td>\n\t *   </tr>\n\t * </table>\n\t * ```\n\t *\n\t * contains five paragraph-like elements: `<h1>`, two `<td>`s and two `<li>`s.\n\t * Hence, if none of the features is going to convert those elements the above content will be automatically handled\n\t * by the paragraph feature and converted to:\n\t *\n\t * ```html\n\t * <p>Foo</p>\n\t * <p>X</p>\n\t * <p>Y</p>\n\t * <p>Z</p>\n\t * ```\n\t *\n\t * Note: The `<td>` containing two `<li>` elements was ignored as the innermost paragraph-like elements\n\t * have a priority upon conversion.\n\t */ static paragraphLikeElements = new Set([\n        'blockquote',\n        'dd',\n        'div',\n        'dt',\n        'h1',\n        'h2',\n        'h3',\n        'h4',\n        'h5',\n        'h6',\n        'li',\n        'p',\n        'td',\n        'th'\n    ]);\n}\n\n/**\n * This plugin defines the `'paragraph'` button. It can be used together with\n * {@link module:heading/headingbuttonsui~HeadingButtonsUI} to replace the standard heading dropdown.\n *\n * This plugin is not loaded automatically by the {@link module:paragraph/paragraph~Paragraph} plugin. It must\n * be added manually.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n *     toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class ParagraphButtonUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Paragraph\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        editor.ui.componentFactory.add('paragraph', (locale)=>{\n            const view = new ButtonView(locale);\n            const command = editor.commands.get('paragraph');\n            view.label = t('Paragraph');\n            view.icon = icons.paragraph;\n            view.tooltip = true;\n            view.isToggleable = true;\n            view.bind('isEnabled').to(command);\n            view.bind('isOn').to(command, 'value');\n            view.on('execute', ()=>{\n                editor.execute('paragraph');\n            });\n            return view;\n        });\n    }\n}\n\nexport { Paragraph, ParagraphButtonUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Paragraph } from '@ckeditor/ckeditor5-paragraph/dist/index.js';\nimport { first, priorities, Collection } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ViewModel, createDropdown, addListToDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, MenuBarMenuListItemButtonView, ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { DowncastWriter, enablePlaceholder, hidePlaceholder, needsPlaceholder, showPlaceholder } from '@ckeditor/ckeditor5-engine/dist/index.js';\n\n/**\n * The heading command. It is used by the {@link module:heading/heading~Heading heading feature} to apply headings.\n */ class HeadingCommand extends Command {\n    /**\n\t * Set of defined model's elements names that this command support.\n\t * See {@link module:heading/headingconfig~HeadingOption}.\n\t */ modelElements;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor Editor instance.\n\t * @param modelElements Names of the element which this command can apply in the model.\n\t */ constructor(editor, modelElements){\n        super(editor);\n        this.modelElements = modelElements;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const block = first(this.editor.model.document.selection.getSelectedBlocks());\n        this.value = !!block && this.modelElements.includes(block.name) && block.name;\n        this.isEnabled = !!block && this.modelElements.some((heading)=>checkCanBecomeHeading(block, heading, this.editor.model.schema));\n    }\n    /**\n\t * Executes the command. Applies the heading to the selected blocks or, if the first selected\n\t * block is a heading already, turns selected headings (of this level only) to paragraphs.\n\t *\n\t * @param options.value Name of the element which this command will apply in the model.\n\t * @fires execute\n\t */ execute(options) {\n        const model = this.editor.model;\n        const document = model.document;\n        const modelElement = options.value;\n        model.change((writer)=>{\n            const blocks = Array.from(document.selection.getSelectedBlocks()).filter((block)=>{\n                return checkCanBecomeHeading(block, modelElement, model.schema);\n            });\n            for (const block of blocks){\n                if (!block.is('element', modelElement)) {\n                    writer.rename(block, modelElement);\n                }\n            }\n        });\n    }\n}\n/**\n * Checks whether the given block can be replaced by a specific heading.\n *\n * @param block A block to be tested.\n * @param heading Command element name in the model.\n * @param schema The schema of the document.\n */ function checkCanBecomeHeading(block, heading, schema) {\n    return schema.checkChild(block.parent, heading) && !schema.isObject(block);\n}\n\nconst defaultModelElement = 'paragraph';\n/**\n * The headings engine feature. It handles switching between block formats &ndash; headings and paragraph.\n * This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.\n * It introduces `heading1`-`headingN` commands which allow to convert paragraphs into headings.\n */ class HeadingEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'HeadingEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('heading', {\n            options: [\n                {\n                    model: 'paragraph',\n                    title: 'Paragraph',\n                    class: 'ck-heading_paragraph'\n                },\n                {\n                    model: 'heading1',\n                    view: 'h2',\n                    title: 'Heading 1',\n                    class: 'ck-heading_heading1'\n                },\n                {\n                    model: 'heading2',\n                    view: 'h3',\n                    title: 'Heading 2',\n                    class: 'ck-heading_heading2'\n                },\n                {\n                    model: 'heading3',\n                    view: 'h4',\n                    title: 'Heading 3',\n                    class: 'ck-heading_heading3'\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Paragraph\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const options = editor.config.get('heading.options');\n        const modelElements = [];\n        for (const option of options){\n            // Skip paragraph - it is defined in required Paragraph feature.\n            if (option.model === 'paragraph') {\n                continue;\n            }\n            // Schema.\n            editor.model.schema.register(option.model, {\n                inheritAllFrom: '$block'\n            });\n            editor.conversion.elementToElement(option);\n            modelElements.push(option.model);\n        }\n        this._addDefaultH1Conversion(editor);\n        // Register the heading command for this option.\n        editor.commands.add('heading', new HeadingCommand(editor, modelElements));\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        // If the enter command is added to the editor, alter its behavior.\n        // Enter at the end of a heading element should create a paragraph.\n        const editor = this.editor;\n        const enterCommand = editor.commands.get('enter');\n        const options = editor.config.get('heading.options');\n        if (enterCommand) {\n            this.listenTo(enterCommand, 'afterExecute', (evt, data)=>{\n                const positionParent = editor.model.document.selection.getFirstPosition().parent;\n                const isHeading = options.some((option)=>positionParent.is('element', option.model));\n                if (isHeading && !positionParent.is('element', defaultModelElement) && positionParent.childCount === 0) {\n                    data.writer.rename(positionParent, defaultModelElement);\n                }\n            });\n        }\n    }\n    /**\n\t * Adds default conversion for `h1` -> `heading1` with a low priority.\n\t *\n\t * @param editor Editor instance on which to add the `h1` conversion.\n\t */ _addDefaultH1Conversion(editor) {\n        editor.conversion.for('upcast').elementToElement({\n            model: 'heading1',\n            view: 'h1',\n            // With a `low` priority, `paragraph` plugin autoparagraphing mechanism is executed. Make sure\n            // this listener is called before it. If not, `h1` will be transformed into a paragraph.\n            converterPriority: priorities.low + 1\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module heading/utils\n */ /**\n * Returns heading options as defined in `config.heading.options` but processed to consider\n * the editor localization, i.e. to display {@link module:heading/headingconfig~HeadingOption}\n * in the correct language.\n *\n * Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n * when the user configuration is defined because the editor does not exist yet.\n */ function getLocalizedOptions(editor) {\n    const t = editor.t;\n    const localizedTitles = {\n        'Paragraph': t('Paragraph'),\n        'Heading 1': t('Heading 1'),\n        'Heading 2': t('Heading 2'),\n        'Heading 3': t('Heading 3'),\n        'Heading 4': t('Heading 4'),\n        'Heading 5': t('Heading 5'),\n        'Heading 6': t('Heading 6')\n    };\n    return editor.config.get('heading.options').map((option)=>{\n        const title = localizedTitles[option.title];\n        if (title && title != option.title) {\n            option.title = title;\n        }\n        return option;\n    });\n}\n\n/**\n * The headings UI feature. It introduces the `headings` dropdown.\n */ class HeadingUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'HeadingUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const options = getLocalizedOptions(editor);\n        const defaultTitle = t('Choose heading');\n        const accessibleLabel = t('Heading');\n        // Register UI component.\n        editor.ui.componentFactory.add('heading', (locale)=>{\n            const titles = {};\n            const itemDefinitions = new Collection();\n            const headingCommand = editor.commands.get('heading');\n            const paragraphCommand = editor.commands.get('paragraph');\n            const commands = [\n                headingCommand\n            ];\n            for (const option of options){\n                const def = {\n                    type: 'button',\n                    model: new ViewModel({\n                        label: option.title,\n                        class: option.class,\n                        role: 'menuitemradio',\n                        withText: true\n                    })\n                };\n                if (option.model === 'paragraph') {\n                    def.model.bind('isOn').to(paragraphCommand, 'value');\n                    def.model.set('commandName', 'paragraph');\n                    commands.push(paragraphCommand);\n                } else {\n                    def.model.bind('isOn').to(headingCommand, 'value', (value)=>value === option.model);\n                    def.model.set({\n                        commandName: 'heading',\n                        commandValue: option.model\n                    });\n                }\n                // Add the option to the collection.\n                itemDefinitions.add(def);\n                titles[option.model] = option.title;\n            }\n            const dropdownView = createDropdown(locale);\n            addListToDropdown(dropdownView, itemDefinitions, {\n                ariaLabel: accessibleLabel,\n                role: 'menu'\n            });\n            dropdownView.buttonView.set({\n                ariaLabel: accessibleLabel,\n                ariaLabelledBy: undefined,\n                isOn: false,\n                withText: true,\n                tooltip: accessibleLabel\n            });\n            dropdownView.extendTemplate({\n                attributes: {\n                    class: [\n                        'ck-heading-dropdown'\n                    ]\n                }\n            });\n            dropdownView.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled)=>{\n                return areEnabled.some((isEnabled)=>isEnabled);\n            });\n            dropdownView.buttonView.bind('label').to(headingCommand, 'value', paragraphCommand, 'value', (heading, paragraph)=>{\n                const whichModel = paragraph ? 'paragraph' : heading;\n                if (typeof whichModel === 'boolean') {\n                    return defaultTitle;\n                }\n                // If none of the commands is active, display default title.\n                if (!titles[whichModel]) {\n                    return defaultTitle;\n                }\n                return titles[whichModel];\n            });\n            dropdownView.buttonView.bind('ariaLabel').to(headingCommand, 'value', paragraphCommand, 'value', (heading, paragraph)=>{\n                const whichModel = paragraph ? 'paragraph' : heading;\n                if (typeof whichModel === 'boolean') {\n                    return accessibleLabel;\n                }\n                // If none of the commands is active, display default title.\n                if (!titles[whichModel]) {\n                    return accessibleLabel;\n                }\n                return `${titles[whichModel]}, ${accessibleLabel}`;\n            });\n            // Execute command when an item from the dropdown is selected.\n            this.listenTo(dropdownView, 'execute', (evt)=>{\n                const { commandName, commandValue } = evt.source;\n                editor.execute(commandName, commandValue ? {\n                    value: commandValue\n                } : undefined);\n                editor.editing.view.focus();\n            });\n            return dropdownView;\n        });\n        editor.ui.componentFactory.add('menuBar:heading', (locale)=>{\n            const menuView = new MenuBarMenuView(locale);\n            const headingCommand = editor.commands.get('heading');\n            const paragraphCommand = editor.commands.get('paragraph');\n            const commands = [\n                headingCommand\n            ];\n            const listView = new MenuBarMenuListView(locale);\n            menuView.set({\n                class: 'ck-heading-dropdown'\n            });\n            listView.set({\n                ariaLabel: t('Heading'),\n                role: 'menu'\n            });\n            menuView.buttonView.set({\n                label: t('Heading')\n            });\n            menuView.panelView.children.add(listView);\n            for (const option of options){\n                const listItemView = new MenuBarMenuListItemView(locale, menuView);\n                const buttonView = new MenuBarMenuListItemButtonView(locale);\n                listItemView.children.add(buttonView);\n                listView.items.add(listItemView);\n                buttonView.set({\n                    isToggleable: true,\n                    label: option.title,\n                    role: 'menuitemradio',\n                    class: option.class\n                });\n                buttonView.delegate('execute').to(menuView);\n                buttonView.on('execute', ()=>{\n                    const commandName = option.model === 'paragraph' ? 'paragraph' : 'heading';\n                    editor.execute(commandName, {\n                        value: option.model\n                    });\n                    editor.editing.view.focus();\n                });\n                if (option.model === 'paragraph') {\n                    buttonView.bind('isOn').to(paragraphCommand, 'value');\n                    commands.push(paragraphCommand);\n                } else {\n                    buttonView.bind('isOn').to(headingCommand, 'value', (value)=>value === option.model);\n                }\n            }\n            menuView.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled)=>{\n                return areEnabled.some((isEnabled)=>isEnabled);\n            });\n            return menuView;\n        });\n    }\n}\n\n/**\n * The headings feature.\n *\n * For a detailed overview, check the {@glink features/headings Headings feature} guide\n * and the {@glink api/heading package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:heading/headingediting~HeadingEditing heading editing feature}\n * and {@link module:heading/headingui~HeadingUI heading UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */ class Heading extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            HeadingEditing,\n            HeadingUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Heading';\n    }\n}\n\nconst defaultIcons = /* #__PURE__ */ (()=>({\n        heading1: icons.heading1,\n        heading2: icons.heading2,\n        heading3: icons.heading3,\n        heading4: icons.heading4,\n        heading5: icons.heading5,\n        heading6: icons.heading6\n    }))();\n/**\n * The `HeadingButtonsUI` plugin defines a set of UI buttons that can be used instead of the\n * standard drop down component.\n *\n * This feature is not enabled by default by the {@link module:heading/heading~Heading} plugin and needs to be\n * installed manually to the editor configuration.\n *\n * Plugin introduces button UI elements, which names are same as `model` property from {@link module:heading/headingconfig~HeadingOption}.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]\n *     heading: {\n *       options: [\n *         { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },\n *         { model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },\n *         { model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },\n *         { model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' }\n *       ]\n *      },\n *      toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n *\n * NOTE: The `'paragraph'` button is defined in by the {@link module:paragraph/paragraphbuttonui~ParagraphButtonUI} plugin\n * which needs to be loaded manually as well.\n *\n * It is possible to use custom icons by providing `icon` config option in {@link module:heading/headingconfig~HeadingOption}.\n * For the default configuration standard icons are used.\n */ class HeadingButtonsUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const options = getLocalizedOptions(this.editor);\n        options.filter((item)=>item.model !== 'paragraph').map((item)=>this._createButton(item));\n    }\n    /**\n\t * Creates single button view from provided configuration option.\n\t */ _createButton(option) {\n        const editor = this.editor;\n        editor.ui.componentFactory.add(option.model, (locale)=>{\n            const view = new ButtonView(locale);\n            const command = editor.commands.get('heading');\n            view.label = option.title;\n            view.icon = option.icon || defaultIcons[option.model];\n            view.tooltip = true;\n            view.isToggleable = true;\n            view.bind('isEnabled').to(command);\n            view.bind('isOn').to(command, 'value', (value)=>value == option.model);\n            view.on('execute', ()=>{\n                editor.execute('heading', {\n                    value: option.model\n                });\n                editor.editing.view.focus();\n            });\n            return view;\n        });\n    }\n}\n\n// A list of element names that should be treated by the Title plugin as title-like.\n// This means that an element of a type from this list will be changed to a title element\n// when it is the first element in the root.\nconst titleLikeElements = new Set([\n    'paragraph',\n    'heading1',\n    'heading2',\n    'heading3',\n    'heading4',\n    'heading5',\n    'heading6'\n]);\n/**\n * The Title plugin.\n *\n * It splits the document into `Title` and `Body` sections.\n */ class Title extends Plugin {\n    /**\n\t * A reference to an empty paragraph in the body\n\t * created when there is no element in the body for the placeholder purposes.\n\t */ _bodyPlaceholder = new Map();\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Title';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            'Paragraph'\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        // To use the schema for disabling some features when the selection is inside the title element\n        // it is needed to create the following structure:\n        //\n        // <title>\n        //     <title-content>The title text</title-content>\n        // </title>\n        //\n        // See: https://github.com/ckeditor/ckeditor5/issues/2005.\n        model.schema.register('title', {\n            isBlock: true,\n            allowIn: '$root'\n        });\n        model.schema.register('title-content', {\n            isBlock: true,\n            allowIn: 'title',\n            allowAttributes: [\n                'alignment'\n            ]\n        });\n        model.schema.extend('$text', {\n            allowIn: 'title-content'\n        });\n        // Disallow all attributes in `title-content`.\n        model.schema.addAttributeCheck((context)=>{\n            if (context.endsWith('title-content $text')) {\n                return false;\n            }\n        });\n        // Because `title` is represented by two elements in the model\n        // but only one in the view, it is needed to adjust Mapper.\n        editor.editing.mapper.on('modelToViewPosition', mapModelPositionToView(editor.editing.view));\n        editor.data.mapper.on('modelToViewPosition', mapModelPositionToView(editor.editing.view));\n        // Conversion.\n        editor.conversion.for('downcast').elementToElement({\n            model: 'title-content',\n            view: 'h1'\n        });\n        editor.conversion.for('downcast').add((dispatcher)=>dispatcher.on('insert:title', (evt, data, conversionApi)=>{\n                conversionApi.consumable.consume(data.item, evt.name);\n            }));\n        // Custom converter is used for data v -> m conversion to avoid calling post-fixer when setting data.\n        // See https://github.com/ckeditor/ckeditor5/issues/2036.\n        editor.data.upcastDispatcher.on('element:h1', dataViewModelH1Insertion, {\n            priority: 'high'\n        });\n        editor.data.upcastDispatcher.on('element:h2', dataViewModelH1Insertion, {\n            priority: 'high'\n        });\n        editor.data.upcastDispatcher.on('element:h3', dataViewModelH1Insertion, {\n            priority: 'high'\n        });\n        // Take care about correct `title` element structure.\n        model.document.registerPostFixer((writer)=>this._fixTitleContent(writer));\n        // Create and take care of correct position of a `title` element.\n        model.document.registerPostFixer((writer)=>this._fixTitleElement(writer));\n        // Create element for `Body` placeholder if it is missing.\n        model.document.registerPostFixer((writer)=>this._fixBodyElement(writer));\n        // Prevent from adding extra at the end of the document.\n        model.document.registerPostFixer((writer)=>this._fixExtraParagraph(writer));\n        // Attach `Title` and `Body` placeholders to the empty title and/or content.\n        this._attachPlaceholders();\n        // Attach Tab handling.\n        this._attachTabPressHandling();\n    }\n    /**\n\t * Returns the title of the document. Note that because this plugin does not allow any formatting inside\n\t * the title element, the output of this method will be a plain text, with no HTML tags.\n\t *\n\t * It is not recommended to use this method together with features that insert markers to the\n\t * data output, like comments or track changes features. If such markers start in the title and end in the\n\t * body, the result of this method might be incorrect.\n\t *\n\t * @param options Additional configuration passed to the conversion process.\n\t * See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n\t * @returns The title of the document.\n\t */ getTitle(options = {}) {\n        const rootName = options.rootName ? options.rootName : undefined;\n        const titleElement = this._getTitleElement(rootName);\n        const titleContentElement = titleElement.getChild(0);\n        return this.editor.data.stringify(titleContentElement, options);\n    }\n    /**\n\t * Returns the body of the document.\n\t *\n\t * Note that it is not recommended to use this method together with features that insert markers to the\n\t * data output, like comments or track changes features. If such markers start in the title and end in the\n\t * body, the result of this method might be incorrect.\n\t *\n\t * @param options Additional configuration passed to the conversion process.\n\t * See {@link module:engine/controller/datacontroller~DataController#get `DataController#get`}.\n\t * @returns The body of the document.\n\t */ getBody(options = {}) {\n        const editor = this.editor;\n        const data = editor.data;\n        const model = editor.model;\n        const rootName = options.rootName ? options.rootName : undefined;\n        const root = editor.model.document.getRoot(rootName);\n        const view = editor.editing.view;\n        const viewWriter = new DowncastWriter(view.document);\n        const rootRange = model.createRangeIn(root);\n        const viewDocumentFragment = viewWriter.createDocumentFragment();\n        // Find all markers that intersects with body.\n        const bodyStartPosition = model.createPositionAfter(root.getChild(0));\n        const bodyRange = model.createRange(bodyStartPosition, model.createPositionAt(root, 'end'));\n        const markers = new Map();\n        for (const marker of model.markers){\n            const intersection = bodyRange.getIntersection(marker.getRange());\n            if (intersection) {\n                markers.set(marker.name, intersection);\n            }\n        }\n        // Convert the entire root to view.\n        data.mapper.clearBindings();\n        data.mapper.bindElements(root, viewDocumentFragment);\n        data.downcastDispatcher.convert(rootRange, markers, viewWriter, options);\n        // Remove title element from view.\n        viewWriter.remove(viewWriter.createRangeOn(viewDocumentFragment.getChild(0)));\n        // view -> data\n        return editor.data.processor.toData(viewDocumentFragment);\n    }\n    /**\n\t * Returns the `title` element when it is in the document. Returns `undefined` otherwise.\n\t */ _getTitleElement(rootName) {\n        const root = this.editor.model.document.getRoot(rootName);\n        for (const child of root.getChildren()){\n            if (isTitle(child)) {\n                return child;\n            }\n        }\n    }\n    /**\n\t * Model post-fixer callback that ensures that `title` has only one `title-content` child.\n\t * All additional children should be moved after the `title` element and renamed to a paragraph.\n\t */ _fixTitleContent(writer) {\n        let changed = false;\n        for (const rootName of this.editor.model.document.getRootNames()){\n            const title = this._getTitleElement(rootName);\n            // If there is no title in the content it will be created by `_fixTitleElement` post-fixer.\n            // If the title has just one element, then it is correct. No fixing.\n            if (!title || title.maxOffset === 1) {\n                continue;\n            }\n            const titleChildren = Array.from(title.getChildren());\n            // Skip first child because it is an allowed element.\n            titleChildren.shift();\n            for (const titleChild of titleChildren){\n                writer.move(writer.createRangeOn(titleChild), title, 'after');\n                writer.rename(titleChild, 'paragraph');\n            }\n            changed = true;\n        }\n        return changed;\n    }\n    /**\n\t * Model post-fixer callback that creates a title element when it is missing,\n\t * takes care of the correct position of it and removes additional title elements.\n\t */ _fixTitleElement(writer) {\n        let changed = false;\n        const model = this.editor.model;\n        for (const modelRoot of this.editor.model.document.getRoots()){\n            const titleElements = Array.from(modelRoot.getChildren()).filter(isTitle);\n            const firstTitleElement = titleElements[0];\n            const firstRootChild = modelRoot.getChild(0);\n            // When title element is at the beginning of the document then try to fix additional title elements (if there are any).\n            if (firstRootChild.is('element', 'title')) {\n                if (titleElements.length > 1) {\n                    fixAdditionalTitleElements(titleElements, writer, model);\n                    changed = true;\n                }\n                continue;\n            }\n            // When there is no title in the document and first element in the document cannot be changed\n            // to the title then create an empty title element at the beginning of the document.\n            if (!firstTitleElement && !titleLikeElements.has(firstRootChild.name)) {\n                const title = writer.createElement('title');\n                writer.insert(title, modelRoot);\n                writer.insertElement('title-content', title);\n                changed = true;\n                continue;\n            }\n            if (titleLikeElements.has(firstRootChild.name)) {\n                // Change the first element in the document to the title if it can be changed (is title-like).\n                changeElementToTitle(firstRootChild, writer, model);\n            } else {\n                // Otherwise, move the first occurrence of the title element to the beginning of the document.\n                writer.move(writer.createRangeOn(firstTitleElement), modelRoot, 0);\n            }\n            fixAdditionalTitleElements(titleElements, writer, model);\n            changed = true;\n        }\n        return changed;\n    }\n    /**\n\t * Model post-fixer callback that adds an empty paragraph at the end of the document\n\t * when it is needed for the placeholder purposes.\n\t */ _fixBodyElement(writer) {\n        let changed = false;\n        for (const rootName of this.editor.model.document.getRootNames()){\n            const modelRoot = this.editor.model.document.getRoot(rootName);\n            if (modelRoot.childCount < 2) {\n                const placeholder = writer.createElement('paragraph');\n                writer.insert(placeholder, modelRoot, 1);\n                this._bodyPlaceholder.set(rootName, placeholder);\n                changed = true;\n            }\n        }\n        return changed;\n    }\n    /**\n\t * Model post-fixer callback that removes a paragraph from the end of the document\n\t * if it was created for the placeholder purposes and is not needed anymore.\n\t */ _fixExtraParagraph(writer) {\n        let changed = false;\n        for (const rootName of this.editor.model.document.getRootNames()){\n            const root = this.editor.model.document.getRoot(rootName);\n            const placeholder = this._bodyPlaceholder.get(rootName);\n            if (shouldRemoveLastParagraph(placeholder, root)) {\n                this._bodyPlaceholder.delete(rootName);\n                writer.remove(placeholder);\n                changed = true;\n            }\n        }\n        return changed;\n    }\n    /**\n\t * Attaches the `Title` and `Body` placeholders to the title and/or content.\n\t */ _attachPlaceholders() {\n        const editor = this.editor;\n        const t = editor.t;\n        const view = editor.editing.view;\n        const sourceElement = editor.sourceElement;\n        const titlePlaceholder = editor.config.get('title.placeholder') || t('Type your title');\n        const bodyPlaceholder = editor.config.get('placeholder') || sourceElement && sourceElement.tagName.toLowerCase() === 'textarea' && sourceElement.getAttribute('placeholder') || t('Type or paste your content here.');\n        // Attach placeholder to the view title element.\n        editor.editing.downcastDispatcher.on('insert:title-content', (evt, data, conversionApi)=>{\n            const element = conversionApi.mapper.toViewElement(data.item);\n            element.placeholder = titlePlaceholder;\n            enablePlaceholder({\n                view,\n                element,\n                keepOnFocus: true\n            });\n        });\n        // Attach placeholder to first element after a title element and remove it if it's not needed anymore.\n        // First element after title can change, so we need to observe all changes keep placeholder in sync.\n        const bodyViewElements = new Map();\n        // This post-fixer runs after the model post-fixer, so we can assume that the second child in view root will always exist.\n        view.document.registerPostFixer((writer)=>{\n            let hasChanged = false;\n            for (const viewRoot of view.document.roots){\n                // `viewRoot` can be empty despite the model post-fixers if the model root was detached.\n                if (viewRoot.isEmpty) {\n                    continue;\n                }\n                // If `viewRoot` is not empty, then we can expect at least two elements in it.\n                const body = viewRoot.getChild(1);\n                const oldBody = bodyViewElements.get(viewRoot.rootName);\n                // If body element has changed we need to disable placeholder on the previous element and enable on the new one.\n                if (body !== oldBody) {\n                    if (oldBody) {\n                        hidePlaceholder(writer, oldBody);\n                        writer.removeAttribute('data-placeholder', oldBody);\n                    }\n                    writer.setAttribute('data-placeholder', bodyPlaceholder, body);\n                    bodyViewElements.set(viewRoot.rootName, body);\n                    hasChanged = true;\n                }\n                // Then we need to display placeholder if it is needed.\n                // See: https://github.com/ckeditor/ckeditor5/issues/8689.\n                if (needsPlaceholder(body, true) && viewRoot.childCount === 2 && body.name === 'p') {\n                    hasChanged = showPlaceholder(writer, body) ? true : hasChanged;\n                } else {\n                    // Or hide if it is not needed.\n                    hasChanged = hidePlaceholder(writer, body) ? true : hasChanged;\n                }\n            }\n            return hasChanged;\n        });\n    }\n    /**\n\t * Creates navigation between the title and body sections using <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.\n\t */ _attachTabPressHandling() {\n        const editor = this.editor;\n        const model = editor.model;\n        // Pressing <kbd>Tab</kbd> inside the title should move the caret to the body.\n        editor.keystrokes.set('TAB', (data, cancel)=>{\n            model.change((writer)=>{\n                const selection = model.document.selection;\n                const selectedElements = Array.from(selection.getSelectedBlocks());\n                if (selectedElements.length === 1 && selectedElements[0].is('element', 'title-content')) {\n                    const root = selection.getFirstPosition().root;\n                    const firstBodyElement = root.getChild(1);\n                    writer.setSelection(firstBodyElement, 0);\n                    cancel();\n                }\n            });\n        });\n        // Pressing <kbd>Shift</kbd>+<kbd>Tab</kbd> at the beginning of the body should move the caret to the title.\n        editor.keystrokes.set('SHIFT + TAB', (data, cancel)=>{\n            model.change((writer)=>{\n                const selection = model.document.selection;\n                if (!selection.isCollapsed) {\n                    return;\n                }\n                const selectedElement = first(selection.getSelectedBlocks());\n                const selectionPosition = selection.getFirstPosition();\n                const root = editor.model.document.getRoot(selectionPosition.root.rootName);\n                const title = root.getChild(0);\n                const body = root.getChild(1);\n                if (selectedElement === body && selectionPosition.isAtStart) {\n                    writer.setSelection(title.getChild(0), 0);\n                    cancel();\n                }\n            });\n        });\n    }\n}\n/**\n * A view-to-model converter for the h1 that appears at the beginning of the document (a title element).\n *\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n * @param evt An object containing information about the fired event.\n * @param data An object containing conversion input, a placeholder for conversion output and possibly other values.\n * @param conversionApi Conversion interface to be used by the callback.\n */ function dataViewModelH1Insertion(evt, data, conversionApi) {\n    const modelCursor = data.modelCursor;\n    const viewItem = data.viewItem;\n    if (!modelCursor.isAtStart || !modelCursor.parent.is('element', '$root')) {\n        return;\n    }\n    if (!conversionApi.consumable.consume(viewItem, {\n        name: true\n    })) {\n        return;\n    }\n    const modelWriter = conversionApi.writer;\n    const title = modelWriter.createElement('title');\n    const titleContent = modelWriter.createElement('title-content');\n    modelWriter.append(titleContent, title);\n    modelWriter.insert(title, modelCursor);\n    conversionApi.convertChildren(viewItem, titleContent);\n    conversionApi.updateConversionResult(title, data);\n}\n/**\n * Maps position from the beginning of the model `title` element to the beginning of the view `h1` element.\n *\n * ```html\n * <title>^<title-content>Foo</title-content></title> -> <h1>^Foo</h1>\n * ```\n */ function mapModelPositionToView(editingView) {\n    return (evt, data)=>{\n        const positionParent = data.modelPosition.parent;\n        if (!positionParent.is('element', 'title')) {\n            return;\n        }\n        const modelTitleElement = positionParent.parent;\n        const viewElement = data.mapper.toViewElement(modelTitleElement);\n        data.viewPosition = editingView.createPositionAt(viewElement, 0);\n        evt.stop();\n    };\n}\n/**\n * @returns Returns true when given element is a title. Returns false otherwise.\n */ function isTitle(element) {\n    return element.is('element', 'title');\n}\n/**\n * Changes the given element to the title element.\n */ function changeElementToTitle(element, writer, model) {\n    const title = writer.createElement('title');\n    writer.insert(title, element, 'before');\n    writer.insert(element, title, 0);\n    writer.rename(element, 'title-content');\n    model.schema.removeDisallowedAttributes([\n        element\n    ], writer);\n}\n/**\n * Loops over the list of title elements and fixes additional ones.\n *\n * @returns Returns true when there was any change. Returns false otherwise.\n */ function fixAdditionalTitleElements(titleElements, writer, model) {\n    let hasChanged = false;\n    for (const title of titleElements){\n        if (title.index !== 0) {\n            fixTitleElement(title, writer, model);\n            hasChanged = true;\n        }\n    }\n    return hasChanged;\n}\n/**\n * Changes given title element to a paragraph or removes it when it is empty.\n */ function fixTitleElement(title, writer, model) {\n    const child = title.getChild(0);\n    // Empty title should be removed.\n    // It is created as a result of pasting to the title element.\n    if (child.isEmpty) {\n        writer.remove(title);\n        return;\n    }\n    writer.move(writer.createRangeOn(child), title, 'before');\n    writer.rename(child, 'paragraph');\n    writer.remove(title);\n    model.schema.removeDisallowedAttributes([\n        child\n    ], writer);\n}\n/**\n * Returns true when the last paragraph in the document was created only for the placeholder\n * purpose and it's not needed anymore. Returns false otherwise.\n */ function shouldRemoveLastParagraph(placeholder, root) {\n    if (!placeholder || !placeholder.is('element', 'paragraph') || placeholder.childCount) {\n        return false;\n    }\n    if (root.childCount <= 2 || root.getChild(root.childCount - 1) !== placeholder) {\n        return false;\n    }\n    return true;\n}\n\nexport { Heading, HeadingButtonsUI, HeadingEditing, HeadingUI, Title };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { ButtonView, createDropdown, SplitButtonView, addToolbarToDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, MenuBarMenuListItemButtonView, ListSeparatorView, ToolbarSeparatorView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * The highlight command. It is used by the {@link module:highlight/highlightediting~HighlightEditing highlight feature}\n * to apply the text highlighting.\n *\n * ```ts\n * editor.execute( 'highlight', { value: 'greenMarker' } );\n * ```\n *\n * **Note**: Executing the command without a value removes the attribute from the model. If the selection is collapsed\n * inside a text with the highlight attribute, the command will remove the attribute from the entire range\n * of that text.\n */ class HighlightCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const doc = model.document;\n        this.value = doc.selection.getAttribute('highlight');\n        this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, 'highlight');\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.value The value to apply.\n\t *\n\t * @fires execute\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        const selection = document.selection;\n        const highlighter = options.value;\n        model.change((writer)=>{\n            if (selection.isCollapsed) {\n                const position = selection.getFirstPosition();\n                // When selection is inside text with `highlight` attribute.\n                if (selection.hasAttribute('highlight')) {\n                    // Find the full highlighted range.\n                    const isSameHighlight = (value)=>{\n                        return value.item.hasAttribute('highlight') && value.item.getAttribute('highlight') === this.value;\n                    };\n                    const highlightStart = position.getLastMatchingPosition(isSameHighlight, {\n                        direction: 'backward'\n                    });\n                    const highlightEnd = position.getLastMatchingPosition(isSameHighlight);\n                    const highlightRange = writer.createRange(highlightStart, highlightEnd);\n                    // Then depending on current value...\n                    if (!highlighter || this.value === highlighter) {\n                        // ...remove attribute when passing highlighter different then current or executing \"eraser\".\n                        // If we're at the end of the highlighted range, we don't want to remove highlight of the range.\n                        if (!position.isEqual(highlightEnd)) {\n                            writer.removeAttribute('highlight', highlightRange);\n                        }\n                        writer.removeSelectionAttribute('highlight');\n                    } else {\n                        // ...update `highlight` value.\n                        // If we're at the end of the highlighted range, we don't want to change the highlight of the range.\n                        if (!position.isEqual(highlightEnd)) {\n                            writer.setAttribute('highlight', highlighter, highlightRange);\n                        }\n                        writer.setSelectionAttribute('highlight', highlighter);\n                    }\n                } else if (highlighter) {\n                    writer.setSelectionAttribute('highlight', highlighter);\n                }\n            } else {\n                const ranges = model.schema.getValidRanges(selection.getRanges(), 'highlight');\n                for (const range of ranges){\n                    if (highlighter) {\n                        writer.setAttribute('highlight', highlighter, range);\n                    } else {\n                        writer.removeAttribute('highlight', range);\n                    }\n                }\n            }\n        });\n    }\n}\n\n/**\n * The highlight editing feature. It introduces the {@link module:highlight/highlightcommand~HighlightCommand command} and the `highlight`\n * attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}\n * as a `<mark>` element with a `class` attribute (`<mark class=\"marker-green\">...</mark>`) depending\n * on the {@link module:highlight/highlightconfig~HighlightConfig configuration}.\n */ class HighlightEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'HighlightEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('highlight', {\n            options: [\n                {\n                    model: 'yellowMarker',\n                    class: 'marker-yellow',\n                    title: 'Yellow marker',\n                    color: 'var(--ck-highlight-marker-yellow)',\n                    type: 'marker'\n                },\n                {\n                    model: 'greenMarker',\n                    class: 'marker-green',\n                    title: 'Green marker',\n                    color: 'var(--ck-highlight-marker-green)',\n                    type: 'marker'\n                },\n                {\n                    model: 'pinkMarker',\n                    class: 'marker-pink',\n                    title: 'Pink marker',\n                    color: 'var(--ck-highlight-marker-pink)',\n                    type: 'marker'\n                },\n                {\n                    model: 'blueMarker',\n                    class: 'marker-blue',\n                    title: 'Blue marker',\n                    color: 'var(--ck-highlight-marker-blue)',\n                    type: 'marker'\n                },\n                {\n                    model: 'redPen',\n                    class: 'pen-red',\n                    title: 'Red pen',\n                    color: 'var(--ck-highlight-pen-red)',\n                    type: 'pen'\n                },\n                {\n                    model: 'greenPen',\n                    class: 'pen-green',\n                    title: 'Green pen',\n                    color: 'var(--ck-highlight-pen-green)',\n                    type: 'pen'\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Allow highlight attribute on text nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: 'highlight'\n        });\n        const options = editor.config.get('highlight.options');\n        // Set-up the two-way conversion.\n        editor.conversion.attributeToElement(_buildDefinition(options));\n        editor.commands.add('highlight', new HighlightCommand(editor));\n    }\n}\n/**\n * Converts the options array to a converter definition.\n *\n * @param options An array with configured options.\n */ function _buildDefinition(options) {\n    const definition = {\n        model: {\n            key: 'highlight',\n            values: []\n        },\n        view: {}\n    };\n    for (const option of options){\n        definition.model.values.push(option.model);\n        definition.view[option.model] = {\n            name: 'mark',\n            classes: option.class\n        };\n    }\n    return definition;\n}\n\nvar markerIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path class=\\\"ck-icon__fill\\\" d=\\\"M10.798 1.59 3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z\\\"/><path d=\\\"m2.556 16.727.234-.348c-.297-.151-.462-.293-.498-.426-.036-.137.002-.416.115-.837.094-.25.15-.449.169-.595a4.495 4.495 0 0 0 0-.725c-.209-.621-.303-1.041-.284-1.26.02-.218.178-.506.475-.862l6.77-9.414c.539-.91 1.605-.85 3.199.18 1.594 1.032 2.188 1.928 1.784 2.686l-5.877 10.36c-.158.412-.333.673-.526.782-.193.108-.604.179-1.232.21-.362.131-.608.237-.738.318-.13.081-.305.238-.526.47-.293.265-.504.397-.632.397-.096 0-.27-.075-.524-.226l-.31.41-1.6-1.12zm-.279.415 1.575 1.103-.392.515H1.19l1.087-1.618zm8.1-13.656-4.953 6.9L8.75 12.57l4.247-7.574c.175-.25-.188-.647-1.092-1.192-.903-.546-1.412-.652-1.528-.32zM8.244 18.5 9.59 17h9.406v1.5H8.245z\\\"/></svg>\";\n\nvar penIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path class=\\\"ck-icon__fill\\\" d=\\\"M10.126 2.268 2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568-2.801-.645z\\\"/><path d=\\\"m4.5 18.088-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97c.165-.233.356-.417.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005-3.055.797H4.5zm-.634.166-1.976.516-.026-1.918 2.002 1.402zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349zM8.245 18.5 9.59 17h9.406v1.5H8.245z\\\"/></svg>\";\n\n/**\n * The default highlight UI plugin. It introduces:\n *\n * * The `'highlight'` dropdown,\n * * The `'removeHighlight'` and `'highlight:*'` buttons.\n *\n * The default configuration includes the following buttons:\n *\n * * `'highlight:yellowMarker'`\n * * `'highlight:greenMarker'`\n * * `'highlight:pinkMarker'`\n * * `'highlight:blueMarker'`\n * * `'highlight:redPen'`\n * * `'highlight:greenPen'`\n *\n * See the {@link module:highlight/highlightconfig~HighlightConfig#options configuration} to learn more\n * about the defaults.\n */ class HighlightUI extends Plugin {\n    /**\n\t * Returns the localized option titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with default\n\t * {@link module:highlight/highlightconfig~HighlightConfig#options} are available:\n\t *\n\t * * `'Yellow marker'`,\n\t * * `'Green marker'`,\n\t * * `'Pink marker'`,\n\t * * `'Blue marker'`,\n\t * * `'Red pen'`,\n\t * * `'Green pen'`.\n\t */ get localizedOptionTitles() {\n        const t = this.editor.t;\n        return {\n            'Yellow marker': t('Yellow marker'),\n            'Green marker': t('Green marker'),\n            'Pink marker': t('Pink marker'),\n            'Blue marker': t('Blue marker'),\n            'Red pen': t('Red pen'),\n            'Green pen': t('Green pen')\n        };\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'HighlightUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const options = this.editor.config.get('highlight.options');\n        for (const option of options){\n            this._addHighlighterButton(option);\n        }\n        this._addRemoveHighlightButton();\n        this._addDropdown(options);\n        this._addMenuBarButton(options);\n    }\n    /**\n\t * Creates the \"Remove highlight\" button.\n\t */ _addRemoveHighlightButton() {\n        const t = this.editor.t;\n        const command = this.editor.commands.get('highlight');\n        this._addButton('removeHighlight', t('Remove highlight'), icons.eraser, null, (button)=>{\n            button.bind('isEnabled').to(command, 'isEnabled');\n        });\n    }\n    /**\n\t * Creates a toolbar button from the provided highlight option.\n\t */ _addHighlighterButton(option) {\n        const command = this.editor.commands.get('highlight');\n        // TODO: change naming\n        this._addButton('highlight:' + option.model, option.title, getIconForType(option.type), option.model, decorateHighlightButton);\n        function decorateHighlightButton(button) {\n            button.bind('isEnabled').to(command, 'isEnabled');\n            button.bind('isOn').to(command, 'value', (value)=>value === option.model);\n            button.iconView.fillColor = option.color;\n            button.isToggleable = true;\n        }\n    }\n    /**\n\t * Internal method for creating highlight buttons.\n\t *\n\t * @param name The name of the button.\n\t * @param label The label for the button.\n\t * @param icon The button icon.\n\t * @param value The `value` property passed to the executed command.\n\t * @param decorateButton A callback getting ButtonView instance so that it can be further customized.\n\t */ _addButton(name, label, icon, value, decorateButton) {\n        const editor = this.editor;\n        editor.ui.componentFactory.add(name, (locale)=>{\n            const buttonView = new ButtonView(locale);\n            const localized = this.localizedOptionTitles[label] ? this.localizedOptionTitles[label] : label;\n            buttonView.set({\n                label: localized,\n                icon,\n                tooltip: true\n            });\n            buttonView.on('execute', ()=>{\n                editor.execute('highlight', {\n                    value\n                });\n                editor.editing.view.focus();\n            });\n            // Add additional behavior for buttonView.\n            decorateButton(buttonView);\n            return buttonView;\n        });\n    }\n    /**\n\t * Creates the split button dropdown UI from the provided highlight options.\n\t */ _addDropdown(options) {\n        const editor = this.editor;\n        const t = editor.t;\n        const componentFactory = editor.ui.componentFactory;\n        const startingHighlighter = options[0];\n        const optionsMap = options.reduce((retVal, option)=>{\n            retVal[option.model] = option;\n            return retVal;\n        }, {});\n        componentFactory.add('highlight', (locale)=>{\n            const command = editor.commands.get('highlight');\n            const dropdownView = createDropdown(locale, SplitButtonView);\n            const splitButtonView = dropdownView.buttonView;\n            splitButtonView.set({\n                label: t('Highlight'),\n                tooltip: true,\n                // Holds last executed highlighter.\n                lastExecuted: startingHighlighter.model,\n                // Holds current highlighter to execute (might be different then last used).\n                commandValue: startingHighlighter.model,\n                isToggleable: true\n            });\n            // Dropdown button changes to selection (command.value):\n            // - If selection is in highlight it get active highlight appearance (icon, color) and is activated.\n            // - Otherwise it gets appearance (icon, color) of last executed highlight.\n            splitButtonView.bind('icon').to(command, 'value', (value)=>getIconForType(getActiveOption(value, 'type')));\n            splitButtonView.bind('color').to(command, 'value', (value)=>getActiveOption(value, 'color'));\n            splitButtonView.bind('commandValue').to(command, 'value', (value)=>getActiveOption(value, 'model'));\n            splitButtonView.bind('isOn').to(command, 'value', (value)=>!!value);\n            splitButtonView.delegate('execute').to(dropdownView);\n            // Create buttons array.\n            const buttonsCreator = ()=>{\n                const buttons = options.map((option)=>{\n                    // Get existing highlighter button.\n                    const buttonView = componentFactory.create('highlight:' + option.model);\n                    // Update lastExecutedHighlight on execute.\n                    this.listenTo(buttonView, 'execute', ()=>{\n                        dropdownView.buttonView.set({\n                            lastExecuted: option.model\n                        });\n                    });\n                    return buttonView;\n                });\n                // Add separator and eraser buttons to dropdown.\n                buttons.push(new ToolbarSeparatorView());\n                buttons.push(componentFactory.create('removeHighlight'));\n                return buttons;\n            };\n            // Make toolbar button enabled when any button in dropdown is enabled before adding separator and eraser.\n            dropdownView.bind('isEnabled').to(command, 'isEnabled');\n            addToolbarToDropdown(dropdownView, buttonsCreator, {\n                enableActiveItemFocusOnDropdownOpen: true,\n                ariaLabel: t('Text highlight toolbar')\n            });\n            bindToolbarIconStyleToActiveColor(dropdownView);\n            // Execute current action from dropdown's split button action button.\n            splitButtonView.on('execute', ()=>{\n                editor.execute('highlight', {\n                    value: splitButtonView.commandValue\n                });\n            });\n            // Focus the editable after executing the command.\n            // It overrides a default behaviour where the focus is moved to the dropdown button (#12125).\n            this.listenTo(dropdownView, 'execute', ()=>{\n                editor.editing.view.focus();\n            });\n            /**\n\t\t\t * Returns active highlighter option depending on current command value.\n\t\t\t * If current is not set or it is the same as last execute this method will return the option key (like icon or color)\n\t\t\t * of last executed highlighter. Otherwise it will return option key for current one.\n\t\t\t */ function getActiveOption(current, key) {\n                const whichHighlighter = !current || current === splitButtonView.lastExecuted ? splitButtonView.lastExecuted : current;\n                return optionsMap[whichHighlighter][key];\n            }\n            return dropdownView;\n        });\n    }\n    /**\n\t * Creates the menu bar button for highlight including submenu with available options.\n\t */ _addMenuBarButton(options) {\n        const editor = this.editor;\n        const t = editor.t;\n        const command = editor.commands.get('highlight');\n        editor.ui.componentFactory.add('menuBar:highlight', (locale)=>{\n            const menuView = new MenuBarMenuView(locale);\n            menuView.buttonView.set({\n                label: t('Highlight'),\n                icon: getIconForType('marker')\n            });\n            menuView.bind('isEnabled').to(command);\n            menuView.buttonView.iconView.fillColor = 'transparent';\n            const listView = new MenuBarMenuListView(locale);\n            for (const option of options){\n                const listItemView = new MenuBarMenuListItemView(locale, menuView);\n                const buttonView = new MenuBarMenuListItemButtonView(locale);\n                buttonView.set({\n                    label: option.title,\n                    icon: getIconForType(option.type),\n                    role: 'menuitemradio',\n                    isToggleable: true\n                });\n                buttonView.iconView.fillColor = option.color;\n                buttonView.delegate('execute').to(menuView);\n                buttonView.bind('isOn').to(command, 'value', (value)=>value === option.model);\n                buttonView.on('execute', ()=>{\n                    editor.execute('highlight', {\n                        value: option.model\n                    });\n                    editor.editing.view.focus();\n                });\n                listItemView.children.add(buttonView);\n                listView.items.add(listItemView);\n            }\n            // Add remove highlight button\n            listView.items.add(new ListSeparatorView(locale));\n            const listItemView = new MenuBarMenuListItemView(locale, menuView);\n            const buttonView = new MenuBarMenuListItemButtonView(locale);\n            buttonView.set({\n                label: t('Remove highlight'),\n                icon: icons.eraser\n            });\n            buttonView.delegate('execute').to(menuView);\n            buttonView.on('execute', ()=>{\n                editor.execute('highlight', {\n                    value: null\n                });\n                editor.editing.view.focus();\n            });\n            listItemView.children.add(buttonView);\n            listView.items.add(listItemView);\n            menuView.panelView.children.add(listView);\n            return menuView;\n        });\n    }\n}\n/**\n * Extends split button icon style to reflect last used button style.\n */ function bindToolbarIconStyleToActiveColor(dropdownView) {\n    const actionView = dropdownView.buttonView.actionView;\n    actionView.iconView.bind('fillColor').to(dropdownView.buttonView, 'color');\n}\n/**\n * Returns icon for given highlighter type.\n */ function getIconForType(type) {\n    return type === 'marker' ? markerIcon : penIcon;\n}\n\n/**\n * The highlight plugin.\n *\n * For a detailed overview, check the {@glink features/highlight Highlight feature} documentation.\n *\n * This is a \"glue\" plugin which loads the {@link module:highlight/highlightediting~HighlightEditing} and\n * {@link module:highlight/highlightui~HighlightUI} plugins.\n */ class Highlight extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            HighlightEditing,\n            HighlightUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Highlight';\n    }\n}\n\nexport { Highlight, HighlightEditing, HighlightUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { findOptimalInsertionRange, toWidget, Widget } from '@ckeditor/ckeditor5-widget/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * The horizontal line command.\n *\n * The command is registered by {@link module:horizontal-line/horizontallineediting~HorizontalLineEditing} as `'horizontalLine'`.\n *\n * To insert a horizontal line at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'horizontalLine' );\n * ```\n */ class HorizontalLineCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const selection = model.document.selection;\n        this.isEnabled = isHorizontalLineAllowedInParent(selection, schema, model);\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const model = this.editor.model;\n        model.change((writer)=>{\n            const horizontalElement = writer.createElement('horizontalLine');\n            model.insertObject(horizontalElement, null, null, {\n                setSelection: 'after'\n            });\n        });\n    }\n}\n/**\n * Checks if a horizontal line is allowed by the schema in the optimal insertion parent.\n *\n * @param model Model instance.\n */ function isHorizontalLineAllowedInParent(selection, schema, model) {\n    const parent = getInsertHorizontalLineParent(selection, model);\n    return schema.checkChild(parent, 'horizontalLine');\n}\n/**\n * Returns a node that will be used to insert a horizontal line with `model.insertContent` to check if the horizontal line can be\n * placed there.\n *\n * @param model Model instance.\n */ function getInsertHorizontalLineParent(selection, model) {\n    const insertionRange = findOptimalInsertionRange(selection, model);\n    const parent = insertionRange.start.parent;\n    if (parent.isEmpty && !parent.is('element', '$root')) {\n        return parent.parent;\n    }\n    return parent;\n}\n\n/**\n * The horizontal line editing feature.\n */ class HorizontalLineEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'HorizontalLineEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const t = editor.t;\n        const conversion = editor.conversion;\n        schema.register('horizontalLine', {\n            inheritAllFrom: '$blockObject'\n        });\n        conversion.for('dataDowncast').elementToElement({\n            model: 'horizontalLine',\n            view: (modelElement, { writer })=>{\n                return writer.createEmptyElement('hr');\n            }\n        });\n        conversion.for('editingDowncast').elementToStructure({\n            model: 'horizontalLine',\n            view: (modelElement, { writer })=>{\n                const label = t('Horizontal line');\n                const viewWrapper = writer.createContainerElement('div', null, writer.createEmptyElement('hr'));\n                writer.addClass('ck-horizontal-line', viewWrapper);\n                writer.setCustomProperty('hr', true, viewWrapper);\n                return toHorizontalLineWidget(viewWrapper, writer, label);\n            }\n        });\n        conversion.for('upcast').elementToElement({\n            view: 'hr',\n            model: 'horizontalLine'\n        });\n        editor.commands.add('horizontalLine', new HorizontalLineCommand(editor));\n    }\n}\n/**\n * Converts a given {@link module:engine/view/element~Element} to a horizontal line widget:\n * * Adds a {@link module:engine/view/element~Element#_setCustomProperty custom property} allowing to\n *   recognize the horizontal line widget element.\n * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n *\n * @param writer An instance of the view writer.\n */ function toHorizontalLineWidget(viewElement, writer, label) {\n    writer.setCustomProperty('horizontalLine', true, viewElement);\n    return toWidget(viewElement, writer, {\n        label\n    });\n}\n\n/**\n * The horizontal line UI plugin.\n */ class HorizontalLineUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'HorizontalLineUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Add the `horizontalLine` button to feature components.\n        editor.ui.componentFactory.add('horizontalLine', ()=>{\n            const buttonView = this._createButton(ButtonView);\n            buttonView.set({\n                tooltip: true\n            });\n            return buttonView;\n        });\n        editor.ui.componentFactory.add('menuBar:horizontalLine', ()=>{\n            return this._createButton(MenuBarMenuListItemButtonView);\n        });\n    }\n    /**\n\t * Creates a button for horizontal line command to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const command = editor.commands.get('horizontalLine');\n        const view = new ButtonClass(editor.locale);\n        const t = locale.t;\n        view.set({\n            label: t('Horizontal line'),\n            icon: icons.horizontalLine\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        // Execute the command.\n        this.listenTo(view, 'execute', ()=>{\n            editor.execute('horizontalLine');\n            editor.editing.view.focus();\n        });\n        return view;\n    }\n}\n\n/**\n * The horizontal line feature.\n *\n * It provides the possibility to insert a horizontal line into the rich-text editor.\n *\n * For a detailed overview, check the {@glink features/horizontal-line Horizontal line feature} documentation.\n */ class HorizontalLine extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            HorizontalLineEditing,\n            HorizontalLineUI,\n            Widget\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'HorizontalLine';\n    }\n}\n\nexport { HorizontalLine, HorizontalLineEditing, HorizontalLineUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin, Command, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Clipboard, ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\nimport { LivePosition, LiveRange, Observer, UpcastWriter, enablePlaceholder, Element } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { Undo } from '@ckeditor/ckeditor5-undo/dist/index.js';\nimport { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { first, DomEmitterMixin, global, FocusTracker, KeystrokeHandler, logWarning, toArray, env, CKEditorError, Collection, Rect } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { toWidget, isWidget, findOptimalInsertionRange, Widget, toWidgetEditable, WidgetResize, calculateResizeHostAncestorWidth, WidgetToolbarRepository } from '@ckeditor/ckeditor5-widget/dist/index.js';\nimport { View, ViewCollection, FocusCycler, submitHandler, ButtonView, LabeledFieldView, createLabeledInputText, BalloonPanelView, ContextualBalloon, CssTransitionDisablerMixin, clickOutsideHandler, CollapsibleView, SplitButtonView, createDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, FileDialogButtonView, MenuBarMenuListItemFileDialogButtonView, Notification, Dialog, MenuBarMenuListItemButtonView, ViewModel, DropdownButtonView, addListToDropdown, createLabeledInputNumber, addToolbarToDropdown } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { FileRepository } from '@ckeditor/ckeditor5-upload/dist/index.js';\nimport { map, isObject, identity } from 'lodash-es';\n\n/**\n * Creates a view element representing the inline image.\n *\n * ```html\n * <span class=\"image-inline\"><img></img></span>\n * ```\n *\n * Note that `alt` and `src` attributes are converted separately, so they are not included.\n *\n * @internal\n */ function createInlineImageViewElement(writer) {\n    return writer.createContainerElement('span', {\n        class: 'image-inline'\n    }, writer.createEmptyElement('img'));\n}\n/**\n * Creates a view element representing the block image.\n *\n * ```html\n * <figure class=\"image\"><img></img></figure>\n * ```\n *\n * Note that `alt` and `src` attributes are converted separately, so they are not included.\n *\n * @internal\n */ function createBlockImageViewElement(writer) {\n    return writer.createContainerElement('figure', {\n        class: 'image'\n    }, [\n        writer.createEmptyElement('img'),\n        writer.createSlot('children')\n    ]);\n}\n/**\n * A function returning a `MatcherPattern` for a particular type of View images.\n *\n * @internal\n * @param matchImageType The type of created image.\n */ function getImgViewElementMatcher(editor, matchImageType) {\n    const imageUtils = editor.plugins.get('ImageUtils');\n    const areBothImagePluginsLoaded = editor.plugins.has('ImageInlineEditing') && editor.plugins.has('ImageBlockEditing');\n    return (element)=>{\n        // Check if the matched view element is an <img>.\n        if (!imageUtils.isInlineImageView(element)) {\n            return null;\n        }\n        // If just one of the plugins is loaded (block or inline), it will match all kinds of images.\n        if (!areBothImagePluginsLoaded) {\n            return getPositiveMatchPattern(element);\n        }\n        // The <img> can be standalone, wrapped in <figure>...</figure> (ImageBlock plugin) or\n        // wrapped in <figure><a>...</a></figure> (LinkImage plugin).\n        const imageType = element.getStyle('display') == 'block' || element.findAncestor(imageUtils.isBlockImageView) ? 'imageBlock' : 'imageInline';\n        if (imageType !== matchImageType) {\n            return null;\n        }\n        return getPositiveMatchPattern(element);\n    };\n    function getPositiveMatchPattern(element) {\n        const pattern = {\n            name: true\n        };\n        // This will trigger src consumption (See https://github.com/ckeditor/ckeditor5/issues/11530).\n        if (element.hasAttribute('src')) {\n            pattern.attributes = [\n                'src'\n            ];\n        }\n        return pattern;\n    }\n}\n/**\n * Considering the current model selection, it returns the name of the model image element\n * (`'imageBlock'` or `'imageInline'`) that will make most sense from the UX perspective if a new\n * image was inserted (also: uploaded, dropped, pasted) at that selection.\n *\n * The assumption is that inserting images into empty blocks or on other block widgets should\n * produce block images. Inline images should be inserted in other cases, e.g. in paragraphs\n * that already contain some text.\n *\n * @internal\n */ function determineImageTypeForInsertionAtSelection(schema, selection) {\n    const firstBlock = first(selection.getSelectedBlocks());\n    // Insert a block image if the selection is not in/on block elements or it's on a block widget.\n    if (!firstBlock || schema.isObject(firstBlock)) {\n        return 'imageBlock';\n    }\n    // A block image should also be inserted into an empty block element\n    // (that is not an empty list item so the list won't get split).\n    if (firstBlock.isEmpty && firstBlock.name != 'listItem') {\n        return 'imageBlock';\n    }\n    // Otherwise insert an inline image.\n    return 'imageInline';\n}\n/**\n * Returns parsed value of the size, but only if it contains unit: px.\n */ function getSizeValueIfInPx(size) {\n    if (size && size.endsWith('px')) {\n        return parseInt(size);\n    }\n    return null;\n}\n/**\n * Returns true if both styles (width and height) are set.\n *\n * If both image styles: width & height are set, they will override the image width & height attributes in the\n * browser. In this case, the image looks the same as if these styles were applied to attributes instead of styles.\n * That's why we can upcast these styles to width & height attributes instead of resizedWidth and resizedHeight.\n */ function widthAndHeightStylesAreBothSet(viewElement) {\n    const widthStyle = getSizeValueIfInPx(viewElement.getStyle('width'));\n    const heightStyle = getSizeValueIfInPx(viewElement.getStyle('height'));\n    return !!(widthStyle && heightStyle);\n}\n\nconst IMAGE_WIDGETS_CLASSES_MATCH_REGEXP = /^(image|image-inline)$/;\n/**\n * A set of helpers related to images.\n */ class ImageUtils extends Plugin {\n    /**\n\t * DOM Emitter.\n\t */ _domEmitter = new (DomEmitterMixin())();\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageUtils';\n    }\n    /**\n\t * Checks if the provided model element is an `image` or `imageInline`.\n\t */ isImage(modelElement) {\n        return this.isInlineImage(modelElement) || this.isBlockImage(modelElement);\n    }\n    /**\n\t * Checks if the provided view element represents an inline image.\n\t *\n\t * Also, see {@link module:image/imageutils~ImageUtils#isImageWidget}.\n\t */ isInlineImageView(element) {\n        return !!element && element.is('element', 'img');\n    }\n    /**\n\t * Checks if the provided view element represents a block image.\n\t *\n\t * Also, see {@link module:image/imageutils~ImageUtils#isImageWidget}.\n\t */ isBlockImageView(element) {\n        return !!element && element.is('element', 'figure') && element.hasClass('image');\n    }\n    /**\n\t * Handles inserting single file. This method unifies image insertion using {@link module:widget/utils~findOptimalInsertionRange}\n\t * method.\n\t *\n\t * ```ts\n\t * const imageUtils = editor.plugins.get( 'ImageUtils' );\n\t *\n\t * imageUtils.insertImage( { src: 'path/to/image.jpg' } );\n\t * ```\n\t *\n\t * @param attributes Attributes of the inserted image.\n\t * This method filters out the attributes which are disallowed by the {@link module:engine/model/schema~Schema}.\n\t * @param selectable Place to insert the image. If not specified,\n\t * the {@link module:widget/utils~findOptimalInsertionRange} logic will be applied for the block images\n\t * and `model.document.selection` for the inline images.\n\t *\n\t * **Note**: If `selectable` is passed, this helper will not be able to set selection attributes (such as `linkHref`)\n\t * and apply them to the new image. In this case, make sure all selection attributes are passed in `attributes`.\n\t *\n\t * @param imageType Image type of inserted image. If not specified,\n\t * it will be determined automatically depending of editor config or place of the insertion.\n\t * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t * The default is `true`.\n\t * @return The inserted model image element.\n\t */ insertImage(attributes = {}, selectable = null, imageType = null, options = {}) {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        const determinedImageType = determineImageTypeForInsertion(editor, selectable || selection, imageType);\n        // Mix declarative attributes with selection attributes because the new image should \"inherit\"\n        // the latter for best UX. For instance, inline images inserted into existing links\n        // should not split them. To do that, they need to have \"linkHref\" inherited from the selection.\n        attributes = {\n            ...Object.fromEntries(selection.getAttributes()),\n            ...attributes\n        };\n        for(const attributeName in attributes){\n            if (!model.schema.checkAttribute(determinedImageType, attributeName)) {\n                delete attributes[attributeName];\n            }\n        }\n        return model.change((writer)=>{\n            const { setImageSizes = true } = options;\n            const imageElement = writer.createElement(determinedImageType, attributes);\n            model.insertObject(imageElement, selectable, null, {\n                setSelection: 'on',\n                // If we want to insert a block image (for whatever reason) then we don't want to split text blocks.\n                // This applies only when we don't have the selectable specified (i.e., we insert multiple block images at once).\n                findOptimalPosition: !selectable && determinedImageType != 'imageInline' ? 'auto' : undefined\n            });\n            // Inserting an image might've failed due to schema regulations.\n            if (imageElement.parent) {\n                if (setImageSizes) {\n                    this.setImageNaturalSizeAttributes(imageElement);\n                }\n                return imageElement;\n            }\n            return null;\n        });\n    }\n    /**\n\t * Reads original image sizes and sets them as `width` and `height`.\n\t *\n\t * The `src` attribute may not be available if the user is using an upload adapter. In such a case,\n\t * this method is called again after the upload process is complete and the `src` attribute is available.\n\t */ setImageNaturalSizeAttributes(imageElement) {\n        const src = imageElement.getAttribute('src');\n        if (!src) {\n            return;\n        }\n        if (imageElement.getAttribute('width') || imageElement.getAttribute('height')) {\n            return;\n        }\n        this.editor.model.change((writer)=>{\n            const img = new global.window.Image();\n            this._domEmitter.listenTo(img, 'load', ()=>{\n                if (!imageElement.getAttribute('width') && !imageElement.getAttribute('height')) {\n                    // We use writer.batch to be able to undo (in a single step) width and height setting\n                    // along with any change that triggered this action (e.g. image resize or image style change).\n                    this.editor.model.enqueueChange(writer.batch, (writer)=>{\n                        writer.setAttribute('width', img.naturalWidth, imageElement);\n                        writer.setAttribute('height', img.naturalHeight, imageElement);\n                    });\n                }\n                this._domEmitter.stopListening(img, 'load');\n            });\n            img.src = src;\n        });\n    }\n    /**\n\t * Returns an image widget editing view element if one is selected or is among the selection's ancestors.\n\t */ getClosestSelectedImageWidget(selection) {\n        const selectionPosition = selection.getFirstPosition();\n        if (!selectionPosition) {\n            return null;\n        }\n        const viewElement = selection.getSelectedElement();\n        if (viewElement && this.isImageWidget(viewElement)) {\n            return viewElement;\n        }\n        let parent = selectionPosition.parent;\n        while(parent){\n            if (parent.is('element') && this.isImageWidget(parent)) {\n                return parent;\n            }\n            parent = parent.parent;\n        }\n        return null;\n    }\n    /**\n\t * Returns a image model element if one is selected or is among the selection's ancestors.\n\t */ getClosestSelectedImageElement(selection) {\n        const selectedElement = selection.getSelectedElement();\n        return this.isImage(selectedElement) ? selectedElement : selection.getFirstPosition().findAncestor('imageBlock');\n    }\n    /**\n\t * Returns an image widget editing view based on the passed image view.\n\t */ getImageWidgetFromImageView(imageView) {\n        return imageView.findAncestor({\n            classes: IMAGE_WIDGETS_CLASSES_MATCH_REGEXP\n        });\n    }\n    /**\n\t * Checks if image can be inserted at current model selection.\n\t *\n\t * @internal\n\t */ isImageAllowed() {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        return isImageAllowedInParent(this.editor, selection) && isNotInsideImage(selection);\n    }\n    /**\n\t * Converts a given {@link module:engine/view/element~Element} to an image widget:\n\t * * Adds a {@link module:engine/view/element~Element#_setCustomProperty custom property} allowing to recognize the image widget\n\t * element.\n\t * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n\t *\n\t * @param writer An instance of the view writer.\n\t * @param label The element's label. It will be concatenated with the image `alt` attribute if one is present.\n\t */ toImageWidget(viewElement, writer, label) {\n        writer.setCustomProperty('image', true, viewElement);\n        const labelCreator = ()=>{\n            const imgElement = this.findViewImgElement(viewElement);\n            const altText = imgElement.getAttribute('alt');\n            return altText ? `${altText} ${label}` : label;\n        };\n        return toWidget(viewElement, writer, {\n            label: labelCreator\n        });\n    }\n    /**\n\t * Checks if a given view element is an image widget.\n\t */ isImageWidget(viewElement) {\n        return !!viewElement.getCustomProperty('image') && isWidget(viewElement);\n    }\n    /**\n\t * Checks if the provided model element is an `image`.\n\t */ isBlockImage(modelElement) {\n        return !!modelElement && modelElement.is('element', 'imageBlock');\n    }\n    /**\n\t * Checks if the provided model element is an `imageInline`.\n\t */ isInlineImage(modelElement) {\n        return !!modelElement && modelElement.is('element', 'imageInline');\n    }\n    /**\n\t * Get the view `<img>` from another view element, e.g. a widget (`<figure class=\"image\">`), a link (`<a>`).\n\t *\n\t * The `<img>` can be located deep in other elements, so this helper performs a deep tree search.\n\t */ findViewImgElement(figureView) {\n        if (this.isInlineImageView(figureView)) {\n            return figureView;\n        }\n        const editingView = this.editor.editing.view;\n        for (const { item } of editingView.createRangeIn(figureView)){\n            if (this.isInlineImageView(item)) {\n                return item;\n            }\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this._domEmitter.stopListening();\n        return super.destroy();\n    }\n}\n/**\n * Checks if image is allowed by schema in optimal insertion parent.\n */ function isImageAllowedInParent(editor, selection) {\n    const imageType = determineImageTypeForInsertion(editor, selection, null);\n    if (imageType == 'imageBlock') {\n        const parent = getInsertImageParent(selection, editor.model);\n        if (editor.model.schema.checkChild(parent, 'imageBlock')) {\n            return true;\n        }\n    } else if (editor.model.schema.checkChild(selection.focus, 'imageInline')) {\n        return true;\n    }\n    return false;\n}\n/**\n * Checks if selection is not placed inside an image (e.g. its caption).\n */ function isNotInsideImage(selection) {\n    return [\n        ...selection.focus.getAncestors()\n    ].every((ancestor)=>!ancestor.is('element', 'imageBlock'));\n}\n/**\n * Returns a node that will be used to insert image with `model.insertContent`.\n */ function getInsertImageParent(selection, model) {\n    const insertionRange = findOptimalInsertionRange(selection, model);\n    const parent = insertionRange.start.parent;\n    if (parent.isEmpty && !parent.is('element', '$root')) {\n        return parent.parent;\n    }\n    return parent;\n}\n/**\n * Determine image element type name depending on editor config or place of insertion.\n *\n * @param imageType Image element type name. Used to force return of provided element name,\n * but only if there is proper plugin enabled.\n */ function determineImageTypeForInsertion(editor, selectable, imageType) {\n    const schema = editor.model.schema;\n    const configImageInsertType = editor.config.get('image.insert.type');\n    if (!editor.plugins.has('ImageBlockEditing')) {\n        return 'imageInline';\n    }\n    if (!editor.plugins.has('ImageInlineEditing')) {\n        return 'imageBlock';\n    }\n    if (imageType) {\n        return imageType;\n    }\n    if (configImageInsertType === 'inline') {\n        return 'imageInline';\n    }\n    if (configImageInsertType !== 'auto') {\n        return 'imageBlock';\n    }\n    // Try to replace the selected widget (e.g. another image).\n    if (selectable.is('selection')) {\n        return determineImageTypeForInsertionAtSelection(schema, selectable);\n    }\n    return schema.checkChild(selectable, 'imageInline') ? 'imageInline' : 'imageBlock';\n}\n\n// Implements the pattern: http(s)://(www.)example.com/path/to/resource.ext?query=params&maybe=too.\nconst IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\\/\\/)?[\\w-]+\\.[\\w.~:/[\\]@!$&'()*+,;=%-]+/.source + /\\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source + /(\\?[\\w.~:/[\\]@!$&'()*+,;=%-]*)?/.source + /(#[\\w.~:/[\\]@!$&'()*+,;=%-]*)?$/.source));\n/**\n * The auto-image plugin. It recognizes image links in the pasted content and embeds\n * them shortly after they are injected into the document.\n */ class AutoImage extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Clipboard,\n            ImageUtils,\n            Undo,\n            Delete\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'AutoImage';\n    }\n    /**\n\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t * cleaning of the timeout.\n\t */ _timeoutId;\n    /**\n\t * The position where the `<imageBlock>` element will be inserted after the timeout,\n\t * determined each time a new content is pasted into the document.\n\t */ _positionToInsert;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._timeoutId = null;\n        this._positionToInsert = null;\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const modelDocument = editor.model.document;\n        const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n        // We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n        // After pasting, the content between those positions will be checked for a URL that could be transformed\n        // into an image.\n        this.listenTo(clipboardPipeline, 'inputTransformation', ()=>{\n            const firstRange = modelDocument.selection.getFirstRange();\n            const leftLivePosition = LivePosition.fromPosition(firstRange.start);\n            leftLivePosition.stickiness = 'toPrevious';\n            const rightLivePosition = LivePosition.fromPosition(firstRange.end);\n            rightLivePosition.stickiness = 'toNext';\n            modelDocument.once('change:data', ()=>{\n                this._embedImageBetweenPositions(leftLivePosition, rightLivePosition);\n                leftLivePosition.detach();\n                rightLivePosition.detach();\n            }, {\n                priority: 'high'\n            });\n        });\n        editor.commands.get('undo').on('execute', ()=>{\n            if (this._timeoutId) {\n                global.window.clearTimeout(this._timeoutId);\n                this._positionToInsert.detach();\n                this._timeoutId = null;\n                this._positionToInsert = null;\n            }\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * Analyzes the part of the document between provided positions in search for a URL representing an image.\n\t * When the URL is found, it is automatically converted into an image.\n\t *\n\t * @param leftPosition Left position of the selection.\n\t * @param rightPosition Right position of the selection.\n\t */ _embedImageBetweenPositions(leftPosition, rightPosition) {\n        const editor = this.editor;\n        // TODO: Use a marker instead of LiveRange & LivePositions.\n        const urlRange = new LiveRange(leftPosition, rightPosition);\n        const walker = urlRange.getWalker({\n            ignoreElementEnd: true\n        });\n        const selectionAttributes = Object.fromEntries(editor.model.document.selection.getAttributes());\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        let src = '';\n        for (const node of walker){\n            if (node.item.is('$textProxy')) {\n                src += node.item.data;\n            }\n        }\n        src = src.trim();\n        // If the URL does not match the image URL regexp, let's skip that.\n        if (!src.match(IMAGE_URL_REGEXP)) {\n            urlRange.detach();\n            return;\n        }\n        // Position will not be available in the `setTimeout` function so let's clone it.\n        this._positionToInsert = LivePosition.fromPosition(leftPosition);\n        // This action mustn't be executed if undo was called between pasting and auto-embedding.\n        this._timeoutId = setTimeout(()=>{\n            // Do nothing if image element cannot be inserted at the current position.\n            // See https://github.com/ckeditor/ckeditor5/issues/2763.\n            // Condition must be checked after timeout - pasting may take place on an element, replacing it. The final position matters.\n            const imageCommand = editor.commands.get('insertImage');\n            if (!imageCommand.isEnabled) {\n                urlRange.detach();\n                return;\n            }\n            editor.model.change((writer)=>{\n                this._timeoutId = null;\n                writer.remove(urlRange);\n                urlRange.detach();\n                let insertionPosition;\n                // Check if the position where the element should be inserted is still valid.\n                // Otherwise leave it as undefined to use the logic of insertImage().\n                if (this._positionToInsert.root.rootName !== '$graveyard') {\n                    insertionPosition = this._positionToInsert.toPosition();\n                }\n                imageUtils.insertImage({\n                    ...selectionAttributes,\n                    src\n                }, insertionPosition);\n                this._positionToInsert.detach();\n                this._positionToInsert = null;\n            });\n            const deletePlugin = editor.plugins.get('Delete');\n            deletePlugin.requestUndoOnBackspace();\n        }, 100);\n    }\n}\n\n/**\n * The image text alternative command. It is used to change the `alt` attribute of `<imageBlock>` and `<imageInline>` model elements.\n */ class ImageTextAlternativeCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const element = imageUtils.getClosestSelectedImageElement(this.editor.model.document.selection);\n        this.isEnabled = !!element;\n        if (this.isEnabled && element.hasAttribute('alt')) {\n            this.value = element.getAttribute('alt');\n        } else {\n            this.value = false;\n        }\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options\n\t * @param options.newValue The new value of the `alt` attribute to set.\n\t */ execute(options) {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const model = editor.model;\n        const imageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n        model.change((writer)=>{\n            writer.setAttribute('alt', options.newValue, imageElement);\n        });\n    }\n}\n\n/**\n * The image text alternative editing plugin.\n *\n * Registers the `'imageTextAlternative'` command.\n */ class ImageTextAlternativeEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageTextAlternativeEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        this.editor.commands.add('imageTextAlternative', new ImageTextAlternativeCommand(this.editor));\n    }\n}\n\n/**\n * The TextAlternativeFormView class.\n */ class TextAlternativeFormView extends View {\n    /**\n\t * Tracks information about the DOM focus in the form.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * An input with a label.\n\t */ labeledInput;\n    /**\n\t * A button used to submit the form.\n\t */ saveButtonView;\n    /**\n\t * A button used to cancel the form.\n\t */ cancelButtonView;\n    /**\n\t * A collection of views which can be focused in the form.\n\t */ _focusables;\n    /**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */ _focusCycler;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const t = this.locale.t;\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this.labeledInput = this._createLabeledInputView();\n        this.saveButtonView = this._createButton(t('Save'), icons.check, 'ck-button-save');\n        this.saveButtonView.type = 'submit';\n        this.cancelButtonView = this._createButton(t('Cancel'), icons.cancel, 'ck-button-cancel', 'cancel');\n        this._focusables = new ViewCollection();\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        this.setTemplate({\n            tag: 'form',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-text-alternative-form',\n                    'ck-responsive-form'\n                ],\n                // https://github.com/ckeditor/ckeditor5-image/issues/40\n                tabindex: '-1'\n            },\n            children: [\n                this.labeledInput,\n                this.saveButtonView,\n                this.cancelButtonView\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.keystrokes.listenTo(this.element);\n        submitHandler({\n            view: this\n        });\n        [\n            this.labeledInput,\n            this.saveButtonView,\n            this.cancelButtonView\n        ].forEach((v)=>{\n            // Register the view as focusable.\n            this._focusables.add(v);\n            // Register the view in the focus tracker.\n            this.focusTracker.add(v.element);\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Creates the button view.\n\t *\n\t * @param label The button label\n\t * @param icon The button's icon.\n\t * @param className The additional button CSS class name.\n\t * @param eventName The event name that the ButtonView#execute event will be delegated to.\n\t * @returns The button view instance.\n\t */ _createButton(label, icon, className, eventName) {\n        const button = new ButtonView(this.locale);\n        button.set({\n            label,\n            icon,\n            tooltip: true\n        });\n        button.extendTemplate({\n            attributes: {\n                class: className\n            }\n        });\n        if (eventName) {\n            button.delegate('execute').to(this, eventName);\n        }\n        return button;\n    }\n    /**\n\t * Creates an input with a label.\n\t *\n\t * @returns Labeled field view instance.\n\t */ _createLabeledInputView() {\n        const t = this.locale.t;\n        const labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n        labeledInput.label = t('Text alternative');\n        return labeledInput;\n    }\n}\n\n/**\n * A helper utility that positions the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance\n * with respect to the image in the editor content, if one is selected.\n *\n * @param editor The editor instance.\n */ function repositionContextualBalloon(editor) {\n    const balloon = editor.plugins.get('ContextualBalloon');\n    const imageUtils = editor.plugins.get('ImageUtils');\n    if (imageUtils.getClosestSelectedImageWidget(editor.editing.view.document.selection)) {\n        const position = getBalloonPositionData(editor);\n        balloon.updatePosition(position);\n    }\n}\n/**\n * Returns the positioning options that control the geometry of the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n * to the selected element in the editor content.\n *\n * @param editor The editor instance.\n */ function getBalloonPositionData(editor) {\n    const editingView = editor.editing.view;\n    const defaultPositions = BalloonPanelView.defaultPositions;\n    const imageUtils = editor.plugins.get('ImageUtils');\n    return {\n        target: editingView.domConverter.mapViewToDom(imageUtils.getClosestSelectedImageWidget(editingView.document.selection)),\n        positions: [\n            defaultPositions.northArrowSouth,\n            defaultPositions.northArrowSouthWest,\n            defaultPositions.northArrowSouthEast,\n            defaultPositions.southArrowNorth,\n            defaultPositions.southArrowNorthWest,\n            defaultPositions.southArrowNorthEast,\n            defaultPositions.viewportStickyNorth\n        ]\n    };\n}\n\n/**\n * The image text alternative UI plugin.\n *\n * The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n */ class ImageTextAlternativeUI extends Plugin {\n    /**\n\t * The contextual balloon plugin instance.\n\t */ _balloon;\n    /**\n\t * A form containing a textarea and buttons, used to change the `alt` text value.\n\t */ _form;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageTextAlternativeUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        this._createButton();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        // Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n        if (this._form) {\n            this._form.destroy();\n        }\n    }\n    /**\n\t * Creates a button showing the balloon panel for changing the image text alternative and\n\t * registers it in the editor {@link module:ui/componentfactory~ComponentFactory ComponentFactory}.\n\t */ _createButton() {\n        const editor = this.editor;\n        const t = editor.t;\n        editor.ui.componentFactory.add('imageTextAlternative', (locale)=>{\n            const command = editor.commands.get('imageTextAlternative');\n            const view = new ButtonView(locale);\n            view.set({\n                label: t('Change image text alternative'),\n                icon: icons.textAlternative,\n                tooltip: true\n            });\n            view.bind('isEnabled').to(command, 'isEnabled');\n            view.bind('isOn').to(command, 'value', (value)=>!!value);\n            this.listenTo(view, 'execute', ()=>{\n                this._showForm();\n            });\n            return view;\n        });\n    }\n    /**\n\t * Creates the {@link module:image/imagetextalternative/ui/textalternativeformview~TextAlternativeFormView}\n\t * form.\n\t */ _createForm() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        this._balloon = this.editor.plugins.get('ContextualBalloon');\n        this._form = new (CssTransitionDisablerMixin(TextAlternativeFormView))(editor.locale);\n        // Render the form so its #element is available for clickOutsideHandler.\n        this._form.render();\n        this.listenTo(this._form, 'submit', ()=>{\n            editor.execute('imageTextAlternative', {\n                newValue: this._form.labeledInput.fieldView.element.value\n            });\n            this._hideForm(true);\n        });\n        this.listenTo(this._form, 'cancel', ()=>{\n            this._hideForm(true);\n        });\n        // Close the form on Esc key press.\n        this._form.keystrokes.set('Esc', (data, cancel)=>{\n            this._hideForm(true);\n            cancel();\n        });\n        // Reposition the balloon or hide the form if an image widget is no longer selected.\n        this.listenTo(editor.ui, 'update', ()=>{\n            if (!imageUtils.getClosestSelectedImageWidget(viewDocument.selection)) {\n                this._hideForm(true);\n            } else if (this._isVisible) {\n                repositionContextualBalloon(editor);\n            }\n        });\n        // Close on click outside of balloon panel element.\n        clickOutsideHandler({\n            emitter: this._form,\n            activator: ()=>this._isVisible,\n            contextElements: ()=>[\n                    this._balloon.view.element\n                ],\n            callback: ()=>this._hideForm()\n        });\n    }\n    /**\n\t * Shows the {@link #_form} in the {@link #_balloon}.\n\t */ _showForm() {\n        if (this._isVisible) {\n            return;\n        }\n        if (!this._form) {\n            this._createForm();\n        }\n        const editor = this.editor;\n        const command = editor.commands.get('imageTextAlternative');\n        const labeledInput = this._form.labeledInput;\n        this._form.disableCssTransitions();\n        if (!this._isInBalloon) {\n            this._balloon.add({\n                view: this._form,\n                position: getBalloonPositionData(editor)\n            });\n        }\n        // Make sure that each time the panel shows up, the field remains in sync with the value of\n        // the command. If the user typed in the input, then canceled the balloon (`labeledInput#value`\n        // stays unaltered) and re-opened it without changing the value of the command, they would see the\n        // old value instead of the actual value of the command.\n        // https://github.com/ckeditor/ckeditor5-image/issues/114\n        labeledInput.fieldView.value = labeledInput.fieldView.element.value = command.value || '';\n        this._form.labeledInput.fieldView.select();\n        this._form.enableCssTransitions();\n    }\n    /**\n\t * Removes the {@link #_form} from the {@link #_balloon}.\n\t *\n\t * @param focusEditable Controls whether the editing view is focused afterwards.\n\t */ _hideForm(focusEditable = false) {\n        if (!this._isInBalloon) {\n            return;\n        }\n        // Blur the input element before removing it from DOM to prevent issues in some browsers.\n        // See https://github.com/ckeditor/ckeditor5/issues/1501.\n        if (this._form.focusTracker.isFocused) {\n            this._form.saveButtonView.focus();\n        }\n        this._balloon.remove(this._form);\n        if (focusEditable) {\n            this.editor.editing.view.focus();\n        }\n    }\n    /**\n\t * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t */ get _isVisible() {\n        return !!this._balloon && this._balloon.visibleView === this._form;\n    }\n    /**\n\t * Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t */ get _isInBalloon() {\n        return !!this._balloon && this._balloon.hasView(this._form);\n    }\n}\n\n/**\n * The image text alternative plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-styles image styles} documentation.\n *\n * This is a \"glue\" plugin which loads the\n *  {@link module:image/imagetextalternative/imagetextalternativeediting~ImageTextAlternativeEditing}\n * and {@link module:image/imagetextalternative/imagetextalternativeui~ImageTextAlternativeUI} plugins.\n */ class ImageTextAlternative extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageTextAlternativeEditing,\n            ImageTextAlternativeUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageTextAlternative';\n    }\n}\n\n/**\n * Returns a function that converts the image view representation:\n *\n * ```html\n * <figure class=\"image\"><img src=\"...\" alt=\"...\"></img></figure>\n * ```\n *\n * to the model representation:\n *\n * ```html\n * <imageBlock src=\"...\" alt=\"...\"></imageBlock>\n * ```\n *\n * The entire content of the `<figure>` element except the first `<img>` is being converted as children\n * of the `<imageBlock>` model element.\n *\n * @internal\n */ function upcastImageFigure(imageUtils) {\n    const converter = (evt, data, conversionApi)=>{\n        // Do not convert if this is not an \"image figure\".\n        if (!conversionApi.consumable.test(data.viewItem, {\n            name: true,\n            classes: 'image'\n        })) {\n            return;\n        }\n        // Find an image element inside the figure element.\n        const viewImage = imageUtils.findViewImgElement(data.viewItem);\n        // Do not convert if image element is absent or was already converted.\n        if (!viewImage || !conversionApi.consumable.test(viewImage, {\n            name: true\n        })) {\n            return;\n        }\n        // Consume the figure to prevent other converters from processing it again.\n        conversionApi.consumable.consume(data.viewItem, {\n            name: true,\n            classes: 'image'\n        });\n        // Convert view image to model image.\n        const conversionResult = conversionApi.convertItem(viewImage, data.modelCursor);\n        // Get image element from conversion result.\n        const modelImage = first(conversionResult.modelRange.getItems());\n        // When image wasn't successfully converted then finish conversion.\n        if (!modelImage) {\n            // Revert consumed figure so other features can convert it.\n            conversionApi.consumable.revert(data.viewItem, {\n                name: true,\n                classes: 'image'\n            });\n            return;\n        }\n        // Convert rest of the figure element's children as an image children.\n        conversionApi.convertChildren(data.viewItem, modelImage);\n        conversionApi.updateConversionResult(modelImage, data);\n    };\n    return (dispatcher)=>{\n        dispatcher.on('element:figure', converter);\n    };\n}\n/**\n * Returns a function that converts the image view representation:\n *\n * ```html\n * <picture><source ... /><source ... />...<img ... /></picture>\n * ```\n *\n * to the model representation as the `sources` attribute:\n *\n * ```html\n * <image[Block|Inline] ... sources=\"...\"></image[Block|Inline]>\n * ```\n *\n * @internal\n */ function upcastPicture(imageUtils) {\n    const sourceAttributeNames = [\n        'srcset',\n        'media',\n        'type',\n        'sizes'\n    ];\n    const converter = (evt, data, conversionApi)=>{\n        const pictureViewElement = data.viewItem;\n        // Do not convert <picture> if already consumed.\n        if (!conversionApi.consumable.test(pictureViewElement, {\n            name: true\n        })) {\n            return;\n        }\n        const sources = new Map();\n        // Collect all <source /> elements attribute values.\n        for (const childSourceElement of pictureViewElement.getChildren()){\n            if (childSourceElement.is('element', 'source')) {\n                const attributes = {};\n                for (const name of sourceAttributeNames){\n                    if (childSourceElement.hasAttribute(name)) {\n                        // Don't collect <source /> attribute if already consumed somewhere else.\n                        if (conversionApi.consumable.test(childSourceElement, {\n                            attributes: name\n                        })) {\n                            attributes[name] = childSourceElement.getAttribute(name);\n                        }\n                    }\n                }\n                if (Object.keys(attributes).length) {\n                    sources.set(childSourceElement, attributes);\n                }\n            }\n        }\n        const imgViewElement = imageUtils.findViewImgElement(pictureViewElement);\n        // Don't convert when a picture has no <img/> inside (it is broken).\n        if (!imgViewElement) {\n            return;\n        }\n        let modelImage = data.modelCursor.parent;\n        // - In case of an inline image (cursor parent in a <paragraph>), the <img/> must be converted right away\n        // because no converter handled it yet and otherwise there would be no model element to set the sources attribute on.\n        // - In case of a block image, the <figure class=\"image\"> converter (in ImageBlockEditing) converts the\n        // <img/> right away on its own and the modelCursor is already inside an imageBlock and there's nothing special\n        // to do here.\n        if (!modelImage.is('element', 'imageBlock')) {\n            const conversionResult = conversionApi.convertItem(imgViewElement, data.modelCursor);\n            // Set image range as conversion result.\n            data.modelRange = conversionResult.modelRange;\n            // Continue conversion where image conversion ends.\n            data.modelCursor = conversionResult.modelCursor;\n            modelImage = first(conversionResult.modelRange.getItems());\n        }\n        conversionApi.consumable.consume(pictureViewElement, {\n            name: true\n        });\n        // Consume only these <source/> attributes that were actually collected and will be passed on\n        // to the image model element.\n        for (const [sourceElement, attributes] of sources){\n            conversionApi.consumable.consume(sourceElement, {\n                attributes: Object.keys(attributes)\n            });\n        }\n        if (sources.size) {\n            conversionApi.writer.setAttribute('sources', Array.from(sources.values()), modelImage);\n        }\n        // Convert rest of the <picture> children as an image children. Other converters may want to consume them.\n        conversionApi.convertChildren(pictureViewElement, modelImage);\n    };\n    return (dispatcher)=>{\n        dispatcher.on('element:picture', converter);\n    };\n}\n/**\n * Converter used to convert the `srcset` model image attribute to the `srcset` and `sizes` attributes in the view.\n *\n * @internal\n * @param imageType The type of the image.\n */ function downcastSrcsetAttribute(imageUtils, imageType) {\n    const converter = (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        const writer = conversionApi.writer;\n        const element = conversionApi.mapper.toViewElement(data.item);\n        const img = imageUtils.findViewImgElement(element);\n        if (data.attributeNewValue === null) {\n            writer.removeAttribute('srcset', img);\n            writer.removeAttribute('sizes', img);\n        } else {\n            if (data.attributeNewValue) {\n                writer.setAttribute('srcset', data.attributeNewValue, img);\n                // Always outputting `100vw`. See https://github.com/ckeditor/ckeditor5-image/issues/2.\n                writer.setAttribute('sizes', '100vw', img);\n            }\n        }\n    };\n    return (dispatcher)=>{\n        dispatcher.on(`attribute:srcset:${imageType}`, converter);\n    };\n}\n/**\n * Converts the `source` model attribute to the `<picture><source /><source />...<img /></picture>`\n * view structure.\n *\n * @internal\n */ function downcastSourcesAttribute(imageUtils) {\n    const converter = (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        const viewWriter = conversionApi.writer;\n        const element = conversionApi.mapper.toViewElement(data.item);\n        const imgElement = imageUtils.findViewImgElement(element);\n        const attributeNewValue = data.attributeNewValue;\n        if (attributeNewValue && attributeNewValue.length) {\n            // Make sure <picture> does not break attribute elements, for instance <a> in linked images.\n            const pictureElement = viewWriter.createContainerElement('picture', null, attributeNewValue.map((sourceAttributes)=>{\n                return viewWriter.createEmptyElement('source', sourceAttributes);\n            }));\n            // Collect all wrapping attribute elements.\n            const attributeElements = [];\n            let viewElement = imgElement.parent;\n            while(viewElement && viewElement.is('attributeElement')){\n                const parentElement = viewElement.parent;\n                viewWriter.unwrap(viewWriter.createRangeOn(imgElement), viewElement);\n                attributeElements.unshift(viewElement);\n                viewElement = parentElement;\n            }\n            // Insert the picture and move img into it.\n            viewWriter.insert(viewWriter.createPositionBefore(imgElement), pictureElement);\n            viewWriter.move(viewWriter.createRangeOn(imgElement), viewWriter.createPositionAt(pictureElement, 'end'));\n            // Apply collected attribute elements over the new picture element.\n            for (const attributeElement of attributeElements){\n                viewWriter.wrap(viewWriter.createRangeOn(pictureElement), attributeElement);\n            }\n        } else if (imgElement.parent.is('element', 'picture')) {\n            const pictureElement = imgElement.parent;\n            viewWriter.move(viewWriter.createRangeOn(imgElement), viewWriter.createPositionBefore(pictureElement));\n            viewWriter.remove(pictureElement);\n        }\n    };\n    return (dispatcher)=>{\n        dispatcher.on('attribute:sources:imageBlock', converter);\n        dispatcher.on('attribute:sources:imageInline', converter);\n    };\n}\n/**\n * Converter used to convert a given image attribute from the model to the view.\n *\n * @internal\n * @param imageType The type of the image.\n * @param attributeKey The name of the attribute to convert.\n */ function downcastImageAttribute(imageUtils, imageType, attributeKey) {\n    const converter = (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        const viewWriter = conversionApi.writer;\n        const element = conversionApi.mapper.toViewElement(data.item);\n        const img = imageUtils.findViewImgElement(element);\n        viewWriter.setAttribute(data.attributeKey, data.attributeNewValue || '', img);\n    };\n    return (dispatcher)=>{\n        dispatcher.on(`attribute:${attributeKey}:${imageType}`, converter);\n    };\n}\n\n/**\n * Observes all new images added to the {@link module:engine/view/document~Document},\n * fires {@link module:engine/view/document~Document#event:imageLoaded} and\n * {@link module:engine/view/document~Document#event:layoutChanged} event every time when the new image\n * has been loaded.\n *\n * **Note:** This event is not fired for images that has been added to the document and rendered as `complete` (already loaded).\n */ class ImageLoadObserver extends Observer {\n    /**\n\t * @inheritDoc\n\t */ observe(domRoot) {\n        this.listenTo(domRoot, 'load', (event, domEvent)=>{\n            const domElement = domEvent.target;\n            if (this.checkShouldIgnoreEventFromTarget(domElement)) {\n                return;\n            }\n            if (domElement.tagName == 'IMG') {\n                this._fireEvents(domEvent);\n            }\n        // Use capture phase for better performance (#4504).\n        }, {\n            useCapture: true\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ stopObserving(domRoot) {\n        this.stopListening(domRoot);\n    }\n    /**\n\t * Fires {@link module:engine/view/document~Document#event:layoutChanged} and\n\t * {@link module:engine/view/document~Document#event:imageLoaded}\n\t * if observer {@link #isEnabled is enabled}.\n\t *\n\t * @param domEvent The DOM event.\n\t */ _fireEvents(domEvent) {\n        if (this.isEnabled) {\n            this.document.fire('layoutChanged');\n            this.document.fire('imageLoaded', domEvent);\n        }\n    }\n}\n\n/**\n * Insert image command.\n *\n * The command is registered by the {@link module:image/image/imageediting~ImageEditing} plugin as `insertImage`\n * and it is also available via aliased `imageInsert` name.\n *\n * In order to insert an image at the current selection position\n * (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),\n * execute the command and specify the image source:\n *\n * ```ts\n * editor.execute( 'insertImage', { source: 'http://url.to.the/image' } );\n * ```\n *\n * It is also possible to insert multiple images at once:\n *\n * ```ts\n * editor.execute( 'insertImage', {\n * \tsource:  [\n * \t\t'path/to/image.jpg',\n * \t\t'path/to/other-image.jpg'\n * \t]\n * } );\n * ```\n *\n * If you want to take the full control over the process, you can specify individual model attributes:\n *\n * ```ts\n * editor.execute( 'insertImage', {\n * \tsource:  [\n * \t\t{ src: 'path/to/image.jpg', alt: 'First alt text' },\n * \t\t{ src: 'path/to/other-image.jpg', alt: 'Second alt text', customAttribute: 'My attribute value' }\n * \t]\n * } );\n * ```\n */ class InsertImageCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        const configImageInsertType = editor.config.get('image.insert.type');\n        if (!editor.plugins.has('ImageBlockEditing')) {\n            if (configImageInsertType === 'block') {\n                /**\n\t\t\t\t * The {@link module:image/imageblock~ImageBlock} plugin must be enabled to allow inserting block images. See\n\t\t\t\t * {@link module:image/imageconfig~ImageInsertConfig#type} to learn more.\n\t\t\t\t *\n\t\t\t\t * @error image-block-plugin-required\n\t\t\t\t */ logWarning('image-block-plugin-required');\n            }\n        }\n        if (!editor.plugins.has('ImageInlineEditing')) {\n            if (configImageInsertType === 'inline') {\n                /**\n\t\t\t\t * The {@link module:image/imageinline~ImageInline} plugin must be enabled to allow inserting inline images. See\n\t\t\t\t * {@link module:image/imageconfig~ImageInsertConfig#type} to learn more.\n\t\t\t\t *\n\t\t\t\t * @error image-inline-plugin-required\n\t\t\t\t */ logWarning('image-inline-plugin-required');\n            }\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        this.isEnabled = imageUtils.isImageAllowed();\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.source The image source or an array of image sources to insert.\n\t * See the documentation of the command to learn more about accepted formats.\n\t */ execute(options) {\n        const sourceDefinitions = toArray(options.source);\n        const selection = this.editor.model.document.selection;\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        // In case of multiple images, each image (starting from the 2nd) will be inserted at a position that\n        // follows the previous one. That will move the selection and, to stay on the safe side and make sure\n        // all images inherit the same selection attributes, they are collected beforehand.\n        //\n        // Applying these attributes ensures, for instance, that inserting an (inline) image into a link does\n        // not split that link but preserves its continuity.\n        //\n        // Note: Selection attributes that do not make sense for images will be filtered out by insertImage() anyway.\n        const selectionAttributes = Object.fromEntries(selection.getAttributes());\n        sourceDefinitions.forEach((sourceDefinition, index)=>{\n            const selectedElement = selection.getSelectedElement();\n            if (typeof sourceDefinition === 'string') {\n                sourceDefinition = {\n                    src: sourceDefinition\n                };\n            }\n            // Inserting of an inline image replace the selected element and make a selection on the inserted image.\n            // Therefore inserting multiple inline images requires creating position after each element.\n            if (index && selectedElement && imageUtils.isImage(selectedElement)) {\n                const position = this.editor.model.createPositionAfter(selectedElement);\n                imageUtils.insertImage({\n                    ...sourceDefinition,\n                    ...selectionAttributes\n                }, position);\n            } else {\n                imageUtils.insertImage({\n                    ...sourceDefinition,\n                    ...selectionAttributes\n                });\n            }\n        });\n    }\n}\n\n/**\n * @module image/image/replaceimagesourcecommand\n */ /**\n * Replace image source command.\n *\n * Changes image source to the one provided. Can be executed as follows:\n *\n * ```ts\n * editor.execute( 'replaceImageSource', { source: 'http://url.to.the/image' } );\n * ```\n */ class ReplaceImageSourceCommand extends Command {\n    constructor(editor){\n        super(editor);\n        this.decorate('cleanupImage');\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const element = this.editor.model.document.selection.getSelectedElement();\n        this.isEnabled = imageUtils.isImage(element);\n        this.value = this.isEnabled ? element.getAttribute('src') : null;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.source The image source to replace.\n\t */ execute(options) {\n        const image = this.editor.model.document.selection.getSelectedElement();\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        this.editor.model.change((writer)=>{\n            writer.setAttribute('src', options.source, image);\n            this.cleanupImage(writer, image);\n            imageUtils.setImageNaturalSizeAttributes(image);\n        });\n    }\n    /**\n\t * Cleanup image attributes that are not relevant to the new source.\n\t *\n\t * Removed attributes are: 'srcset', 'sizes', 'sources', 'width', 'height', 'alt'.\n\t *\n\t * This method is decorated, to allow custom cleanup logic.\n\t * For example, to remove 'myImageId' attribute after 'src' has changed:\n\t *\n\t * ```ts\n\t * replaceImageSourceCommand.on( 'cleanupImage', ( eventInfo, [ writer, image ] ) => {\n\t * \twriter.removeAttribute( 'myImageId', image );\n\t * } );\n\t * ```\n\t */ cleanupImage(writer, image) {\n        writer.removeAttribute('srcset', image);\n        writer.removeAttribute('sizes', image);\n        /**\n\t\t * In case responsive images some attributes should be cleaned up.\n\t\t * Check: https://github.com/ckeditor/ckeditor5/issues/15093\n\t\t */ writer.removeAttribute('sources', image);\n        writer.removeAttribute('width', image);\n        writer.removeAttribute('height', image);\n        writer.removeAttribute('alt', image);\n    }\n}\n\n/**\n * The image engine plugin. This module loads common code shared between\n * {@link module:image/image/imageinlineediting~ImageInlineEditing} and\n * {@link module:image/image/imageblockediting~ImageBlockEditing} plugins.\n *\n * This plugin registers the {@link module:image/image/insertimagecommand~InsertImageCommand 'insertImage'} command.\n */ class ImageEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const conversion = editor.conversion;\n        // See https://github.com/ckeditor/ckeditor5-image/issues/142.\n        editor.editing.view.addObserver(ImageLoadObserver);\n        conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: 'img',\n                key: 'alt'\n            },\n            model: 'alt'\n        }).attributeToAttribute({\n            view: {\n                name: 'img',\n                key: 'srcset'\n            },\n            model: 'srcset'\n        });\n        const insertImageCommand = new InsertImageCommand(editor);\n        const replaceImageSourceCommand = new ReplaceImageSourceCommand(editor);\n        editor.commands.add('insertImage', insertImageCommand);\n        editor.commands.add('replaceImageSource', replaceImageSourceCommand);\n        // `imageInsert` is an alias for backward compatibility.\n        editor.commands.add('imageInsert', insertImageCommand);\n    }\n}\n\n/**\n * This plugin enables `width` and `height` attributes in inline and block image elements.\n */ class ImageSizeAttributes extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageSizeAttributes';\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        this._registerSchema();\n        this._registerConverters('imageBlock');\n        this._registerConverters('imageInline');\n    }\n    /**\n\t * Registers the `width` and `height` attributes for inline and block images.\n\t */ _registerSchema() {\n        if (this.editor.plugins.has('ImageBlockEditing')) {\n            this.editor.model.schema.extend('imageBlock', {\n                allowAttributes: [\n                    'width',\n                    'height'\n                ]\n            });\n        }\n        if (this.editor.plugins.has('ImageInlineEditing')) {\n            this.editor.model.schema.extend('imageInline', {\n                allowAttributes: [\n                    'width',\n                    'height'\n                ]\n            });\n        }\n    }\n    /**\n\t * Registers converters for `width` and `height` attributes.\n\t */ _registerConverters(imageType) {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const viewElementName = imageType === 'imageBlock' ? 'figure' : 'img';\n        editor.conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: viewElementName,\n                styles: {\n                    width: /.+/\n                }\n            },\n            model: {\n                key: 'width',\n                value: (viewElement)=>{\n                    if (widthAndHeightStylesAreBothSet(viewElement)) {\n                        return getSizeValueIfInPx(viewElement.getStyle('width'));\n                    }\n                    return null;\n                }\n            }\n        }).attributeToAttribute({\n            view: {\n                name: viewElementName,\n                key: 'width'\n            },\n            model: 'width'\n        }).attributeToAttribute({\n            view: {\n                name: viewElementName,\n                styles: {\n                    height: /.+/\n                }\n            },\n            model: {\n                key: 'height',\n                value: (viewElement)=>{\n                    if (widthAndHeightStylesAreBothSet(viewElement)) {\n                        return getSizeValueIfInPx(viewElement.getStyle('height'));\n                    }\n                    return null;\n                }\n            }\n        }).attributeToAttribute({\n            view: {\n                name: viewElementName,\n                key: 'height'\n            },\n            model: 'height'\n        });\n        // Dedicated converters to propagate attributes to the <img> element.\n        editor.conversion.for('editingDowncast').add((dispatcher)=>{\n            attachDowncastConverter(dispatcher, 'width', 'width', true);\n            attachDowncastConverter(dispatcher, 'height', 'height', true);\n        });\n        editor.conversion.for('dataDowncast').add((dispatcher)=>{\n            attachDowncastConverter(dispatcher, 'width', 'width', false);\n            attachDowncastConverter(dispatcher, 'height', 'height', false);\n        });\n        function attachDowncastConverter(dispatcher, modelAttributeName, viewAttributeName, setRatioForInlineImage) {\n            dispatcher.on(`attribute:${modelAttributeName}:${imageType}`, (evt, data, conversionApi)=>{\n                if (!conversionApi.consumable.consume(data.item, evt.name)) {\n                    return;\n                }\n                const viewWriter = conversionApi.writer;\n                const viewElement = conversionApi.mapper.toViewElement(data.item);\n                const img = imageUtils.findViewImgElement(viewElement);\n                if (data.attributeNewValue !== null) {\n                    viewWriter.setAttribute(viewAttributeName, data.attributeNewValue, img);\n                } else {\n                    viewWriter.removeAttribute(viewAttributeName, img);\n                }\n                // Do not set aspect-ratio for pictures. See https://github.com/ckeditor/ckeditor5/issues/14579.\n                if (data.item.hasAttribute('sources')) {\n                    return;\n                }\n                const isResized = data.item.hasAttribute('resizedWidth');\n                // Do not set aspect ratio for inline images which are not resized (data pipeline).\n                if (imageType === 'imageInline' && !isResized && !setRatioForInlineImage) {\n                    return;\n                }\n                const width = data.item.getAttribute('width');\n                const height = data.item.getAttribute('height');\n                if (width && height) {\n                    viewWriter.setStyle('aspect-ratio', `${width}/${height}`, img);\n                }\n            });\n        }\n    }\n}\n\n/**\n * The image type command. It changes the type of a selected image, depending on the configuration.\n */ class ImageTypeCommand extends Command {\n    /**\n\t * Model element name the command converts to.\n\t */ _modelElementName;\n    /**\n\t * @inheritDoc\n\t *\n\t * @param modelElementName Model element name the command converts to.\n\t */ constructor(editor, modelElementName){\n        super(editor);\n        this._modelElementName = modelElementName;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const element = imageUtils.getClosestSelectedImageElement(this.editor.model.document.selection);\n        if (this._modelElementName === 'imageBlock') {\n            this.isEnabled = imageUtils.isInlineImage(element);\n        } else {\n            this.isEnabled = imageUtils.isBlockImage(element);\n        }\n    }\n    /**\n\t * Executes the command and changes the type of a selected image.\n\t *\n\t * @fires execute\n\t * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t * The default is `true`.\n\t * @returns An object containing references to old and new model image elements\n\t * (for before and after the change) so external integrations can hook into the decorated\n\t * `execute` event and handle this change. `null` if the type change failed.\n\t */ execute(options = {}) {\n        const editor = this.editor;\n        const model = this.editor.model;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const oldElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n        const attributes = Object.fromEntries(oldElement.getAttributes());\n        // Don't change image type if \"src\" is missing (a broken image), unless there's \"uploadId\" set.\n        // This state may happen during image upload (before it finishes) and it should be possible to change type\n        // of the image in the meantime.\n        if (!attributes.src && !attributes.uploadId) {\n            return null;\n        }\n        return model.change((writer)=>{\n            const { setImageSizes = true } = options;\n            // Get all markers that contain the old image element.\n            const markers = Array.from(model.markers).filter((marker)=>marker.getRange().containsItem(oldElement));\n            const newElement = imageUtils.insertImage(attributes, model.createSelection(oldElement, 'on'), this._modelElementName, {\n                setImageSizes\n            });\n            if (!newElement) {\n                return null;\n            }\n            const newElementRange = writer.createRangeOn(newElement);\n            // Expand the previously intersecting markers' ranges to include the new image element.\n            for (const marker of markers){\n                const markerRange = marker.getRange();\n                // Join the survived part of the old marker range with the new element range\n                // (loosely because there could be some new paragraph or the existing one might got split).\n                const range = markerRange.root.rootName != '$graveyard' ? markerRange.getJoined(newElementRange, true) : newElementRange;\n                writer.updateMarker(marker, {\n                    range\n                });\n            }\n            return {\n                oldElement,\n                newElement\n            };\n        });\n    }\n}\n\n/**\n * Adds support for image placeholder that is automatically removed when the image is loaded.\n */ class ImagePlaceholder extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImagePlaceholder';\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        this._setupSchema();\n        this._setupConversion();\n        this._setupLoadListener();\n    }\n    /**\n\t * Extends model schema.\n\t */ _setupSchema() {\n        const schema = this.editor.model.schema;\n        // Wait for ImageBlockEditing or ImageInlineEditing to register their elements first,\n        // that's why doing this in afterInit() instead of init().\n        if (schema.isRegistered('imageBlock')) {\n            schema.extend('imageBlock', {\n                allowAttributes: [\n                    'placeholder'\n                ]\n            });\n        }\n        if (schema.isRegistered('imageInline')) {\n            schema.extend('imageInline', {\n                allowAttributes: [\n                    'placeholder'\n                ]\n            });\n        }\n    }\n    /**\n\t * Registers converters.\n\t */ _setupConversion() {\n        const editor = this.editor;\n        const conversion = editor.conversion;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        conversion.for('editingDowncast').add((dispatcher)=>{\n            dispatcher.on('attribute:placeholder', (evt, data, conversionApi)=>{\n                if (!conversionApi.consumable.test(data.item, evt.name)) {\n                    return;\n                }\n                if (!data.item.is('element', 'imageBlock') && !data.item.is('element', 'imageInline')) {\n                    return;\n                }\n                conversionApi.consumable.consume(data.item, evt.name);\n                const viewWriter = conversionApi.writer;\n                const element = conversionApi.mapper.toViewElement(data.item);\n                const img = imageUtils.findViewImgElement(element);\n                if (data.attributeNewValue) {\n                    viewWriter.addClass('image_placeholder', img);\n                    viewWriter.setStyle('background-image', `url(${data.attributeNewValue})`, img);\n                    viewWriter.setCustomProperty('editingPipeline:doNotReuseOnce', true, img);\n                } else {\n                    viewWriter.removeClass('image_placeholder', img);\n                    viewWriter.removeStyle('background-image', img);\n                }\n            });\n        });\n    }\n    /**\n\t * Prepares listener for image load.\n\t */ _setupLoadListener() {\n        const editor = this.editor;\n        const model = editor.model;\n        const editing = editor.editing;\n        const editingView = editing.view;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        editingView.addObserver(ImageLoadObserver);\n        this.listenTo(editingView.document, 'imageLoaded', (evt, domEvent)=>{\n            const imgViewElement = editingView.domConverter.mapDomToView(domEvent.target);\n            if (!imgViewElement) {\n                return;\n            }\n            const viewElement = imageUtils.getImageWidgetFromImageView(imgViewElement);\n            if (!viewElement) {\n                return;\n            }\n            const modelElement = editing.mapper.toModelElement(viewElement);\n            if (!modelElement || !modelElement.hasAttribute('placeholder')) {\n                return;\n            }\n            model.enqueueChange({\n                isUndoable: false\n            }, (writer)=>{\n                writer.removeAttribute('placeholder', modelElement);\n            });\n        });\n    }\n}\n\n/**\n * The image block plugin.\n *\n * It registers:\n *\n * * `<imageBlock>` as a block element in the document schema, and allows `alt`, `src` and `srcset` attributes.\n * * converters for editing and data pipelines.,\n * * {@link module:image/image/imagetypecommand~ImageTypeCommand `'imageTypeBlock'`} command that converts inline images into\n * block images.\n */ class ImageBlockEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageEditing,\n            ImageSizeAttributes,\n            ImageUtils,\n            ImagePlaceholder,\n            ClipboardPipeline\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageBlockEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        // Converters 'alt' and 'srcset' are added in 'ImageEditing' plugin.\n        schema.register('imageBlock', {\n            inheritAllFrom: '$blockObject',\n            allowAttributes: [\n                'alt',\n                'src',\n                'srcset'\n            ]\n        });\n        this._setupConversion();\n        if (editor.plugins.has('ImageInlineEditing')) {\n            editor.commands.add('imageTypeBlock', new ImageTypeCommand(this.editor, 'imageBlock'));\n            this._setupClipboardIntegration();\n        }\n    }\n    /**\n\t * Configures conversion pipelines to support upcasting and downcasting\n\t * block images (block image widgets) and their attributes.\n\t */ _setupConversion() {\n        const editor = this.editor;\n        const t = editor.t;\n        const conversion = editor.conversion;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        conversion.for('dataDowncast').elementToStructure({\n            model: 'imageBlock',\n            view: (modelElement, { writer })=>createBlockImageViewElement(writer)\n        });\n        conversion.for('editingDowncast').elementToStructure({\n            model: 'imageBlock',\n            view: (modelElement, { writer })=>imageUtils.toImageWidget(createBlockImageViewElement(writer), writer, t('image widget'))\n        });\n        conversion.for('downcast').add(downcastImageAttribute(imageUtils, 'imageBlock', 'src')).add(downcastImageAttribute(imageUtils, 'imageBlock', 'alt')).add(downcastSrcsetAttribute(imageUtils, 'imageBlock'));\n        // More image related upcasts are in 'ImageEditing' plugin.\n        conversion.for('upcast').elementToElement({\n            view: getImgViewElementMatcher(editor, 'imageBlock'),\n            model: (viewImage, { writer })=>writer.createElement('imageBlock', viewImage.hasAttribute('src') ? {\n                    src: viewImage.getAttribute('src')\n                } : undefined)\n        }).add(upcastImageFigure(imageUtils));\n    }\n    /**\n\t * Integrates the plugin with the clipboard pipeline.\n\t *\n\t * Idea is that the feature should recognize the user's intent when an **inline** image is\n\t * pasted or dropped. If such an image is pasted/dropped:\n\t *\n\t * * into an empty block (e.g. an empty paragraph),\n\t * * on another object (e.g. some block widget).\n\t *\n\t * it gets converted into a block image on the fly. We assume this is the user's intent\n\t * if they decided to put their image there.\n\t *\n\t * See the `ImageInlineEditing` for the similar integration that works in the opposite direction.\n\t *\n\t * The feature also sets image `width` and `height` attributes on paste.\n\t */ _setupClipboardIntegration() {\n        const editor = this.editor;\n        const model = editor.model;\n        const editingView = editor.editing.view;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n        this.listenTo(clipboardPipeline, 'inputTransformation', (evt, data)=>{\n            const docFragmentChildren = Array.from(data.content.getChildren());\n            let modelRange;\n            // Make sure only <img> elements are dropped or pasted. Otherwise, if there some other HTML\n            // mixed up, this should be handled as a regular paste.\n            if (!docFragmentChildren.every(imageUtils.isInlineImageView)) {\n                return;\n            }\n            // When drag and dropping, data.targetRanges specifies where to drop because\n            // this is usually a different place than the current model selection (the user\n            // uses a drop marker to specify the drop location).\n            if (data.targetRanges) {\n                modelRange = editor.editing.mapper.toModelRange(data.targetRanges[0]);\n            } else {\n                modelRange = model.document.selection.getFirstRange();\n            }\n            const selection = model.createSelection(modelRange);\n            // Convert inline images into block images only when the currently selected block is empty\n            // (e.g. an empty paragraph) or some object is selected (to replace it).\n            if (determineImageTypeForInsertionAtSelection(model.schema, selection) === 'imageBlock') {\n                const writer = new UpcastWriter(editingView.document);\n                // Wrap <img ... /> -> <figure class=\"image\"><img .../></figure>\n                const blockViewImages = docFragmentChildren.map((inlineViewImage)=>writer.createElement('figure', {\n                        class: 'image'\n                    }, inlineViewImage));\n                data.content = writer.createDocumentFragment(blockViewImages);\n            }\n        });\n        this.listenTo(clipboardPipeline, 'contentInsertion', (evt, data)=>{\n            if (data.method !== 'paste') {\n                return;\n            }\n            model.change((writer)=>{\n                const range = writer.createRangeIn(data.content);\n                for (const item of range.getItems()){\n                    if (item.is('element', 'imageBlock')) {\n                        imageUtils.setImageNaturalSizeAttributes(item);\n                    }\n                }\n            });\n        });\n    }\n}\n\n/**\n * The view displayed in the insert image dropdown.\n *\n * See {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n */ class ImageInsertFormView extends View {\n    /**\n\t * Tracks information about DOM focus in the form.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * A collection of views that can be focused in the form.\n\t */ _focusables;\n    /**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */ _focusCycler;\n    /**\n\t * A collection of the defined integrations for inserting the images.\n\t */ children;\n    /**\n\t * Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param integrations An integrations object that contains components (or tokens for components) to be shown in the panel view.\n\t */ constructor(locale, integrations = []){\n        super(locale);\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this._focusables = new ViewCollection();\n        this.children = this.createCollection();\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        for (const view of integrations){\n            this.children.add(view);\n            this._focusables.add(view);\n            if (view instanceof CollapsibleView) {\n                this._focusables.addMany(view.children);\n            }\n        }\n        this.setTemplate({\n            tag: 'form',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-image-insert-form'\n                ],\n                tabindex: -1\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        submitHandler({\n            view: this\n        });\n        for (const view of this._focusables){\n            this.focusTracker.add(view.element);\n        }\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n        const stopPropagation = (data)=>data.stopPropagation();\n        // Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n        // keystroke handler would take over the key management in the URL input. We need to prevent\n        // this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n        this.keystrokes.set('arrowright', stopPropagation);\n        this.keystrokes.set('arrowleft', stopPropagation);\n        this.keystrokes.set('arrowup', stopPropagation);\n        this.keystrokes.set('arrowdown', stopPropagation);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the first {@link #_focusables focusable} in the form.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n}\n\n/**\n * The image insert dropdown plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}\n * and {@glink features/images/images-inserting Insert images via source URL} documentation.\n *\n * Adds the `'insertImage'` dropdown to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n * and also the `imageInsert` dropdown as an alias for backward compatibility.\n *\n * Adds the `'menuBar:insertImage'` sub-menu to the {@link module:ui/componentfactory~ComponentFactory UI component factory}, which is\n * by default added to the `'Insert'` menu.\n */ class ImageInsertUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageInsertUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * The dropdown view responsible for displaying the image insert UI.\n\t */ dropdownView;\n    /**\n\t * Registered integrations map.\n\t */ _integrations = new Map();\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('image.insert.integrations', [\n            'upload',\n            'assetManager',\n            'url'\n        ]);\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        this.set('isImageSelected', false);\n        this.listenTo(editor.model.document, 'change', ()=>{\n            this.isImageSelected = imageUtils.isImage(selection.getSelectedElement());\n        });\n        const componentCreator = (locale)=>this._createToolbarComponent(locale);\n        const menuBarComponentCreator = (locale)=>this._createMenuBarComponent(locale);\n        // Register `insertImage` dropdown and add `imageInsert` dropdown as an alias for backward compatibility.\n        editor.ui.componentFactory.add('insertImage', componentCreator);\n        editor.ui.componentFactory.add('imageInsert', componentCreator);\n        editor.ui.componentFactory.add('menuBar:insertImage', menuBarComponentCreator);\n    }\n    /**\n\t * Registers the insert image dropdown integration.\n\t */ registerIntegration({ name, observable, buttonViewCreator, formViewCreator, menuBarButtonViewCreator, requiresForm = false }) {\n        if (this._integrations.has(name)) {\n            /**\n\t\t\t * There are two insert-image integrations registered with the same name.\n\t\t\t *\n\t\t\t * Make sure that you do not load multiple asset manager plugins.\n\t\t\t *\n\t\t\t * @error image-insert-integration-exists\n\t\t\t */ logWarning('image-insert-integration-exists', {\n                name\n            });\n        }\n        this._integrations.set(name, {\n            observable,\n            buttonViewCreator,\n            menuBarButtonViewCreator,\n            formViewCreator,\n            requiresForm\n        });\n    }\n    /**\n\t * Creates the toolbar component.\n\t */ _createToolbarComponent(locale) {\n        const editor = this.editor;\n        const t = locale.t;\n        const integrations = this._prepareIntegrations();\n        if (!integrations.length) {\n            return null;\n        }\n        let dropdownButton;\n        const firstIntegration = integrations[0];\n        if (integrations.length == 1) {\n            // Do not use dropdown for a single integration button (integration that does not require form view).\n            if (!firstIntegration.requiresForm) {\n                return firstIntegration.buttonViewCreator(true);\n            }\n            dropdownButton = firstIntegration.buttonViewCreator(true);\n        } else {\n            const actionButton = firstIntegration.buttonViewCreator(false);\n            dropdownButton = new SplitButtonView(locale, actionButton);\n            dropdownButton.tooltip = true;\n            dropdownButton.bind('label').to(this, 'isImageSelected', (isImageSelected)=>isImageSelected ? t('Replace image') : t('Insert image'));\n        }\n        const dropdownView = this.dropdownView = createDropdown(locale, dropdownButton);\n        const observables = integrations.map(({ observable })=>typeof observable == 'function' ? observable() : observable);\n        dropdownView.bind('isEnabled').toMany(observables, 'isEnabled', (...isEnabled)=>isEnabled.some((isEnabled)=>isEnabled));\n        dropdownView.once('change:isOpen', ()=>{\n            const integrationViews = integrations.map(({ formViewCreator })=>formViewCreator(integrations.length == 1));\n            const imageInsertFormView = new ImageInsertFormView(editor.locale, integrationViews);\n            dropdownView.panelView.children.add(imageInsertFormView);\n        });\n        return dropdownView;\n    }\n    /**\n\t * Creates the menu bar component.\n\t */ _createMenuBarComponent(locale) {\n        const t = locale.t;\n        const integrations = this._prepareIntegrations();\n        if (!integrations.length) {\n            return null;\n        }\n        let resultView;\n        const firstIntegration = integrations[0];\n        if (integrations.length == 1) {\n            resultView = firstIntegration.menuBarButtonViewCreator(true);\n        } else {\n            resultView = new MenuBarMenuView(locale);\n            const listView = new MenuBarMenuListView(locale);\n            resultView.panelView.children.add(listView);\n            resultView.buttonView.set({\n                icon: icons.image,\n                label: t('Image')\n            });\n            for (const integration of integrations){\n                const listItemView = new MenuBarMenuListItemView(locale, resultView);\n                const buttonView = integration.menuBarButtonViewCreator(false);\n                listItemView.children.add(buttonView);\n                listView.items.add(listItemView);\n            }\n        }\n        return resultView;\n    }\n    /**\n\t * Validates the integrations list.\n\t */ _prepareIntegrations() {\n        const editor = this.editor;\n        const items = editor.config.get('image.insert.integrations');\n        const result = [];\n        if (!items.length) {\n            /**\n\t\t\t * The insert image feature requires a list of integrations to be provided in the editor configuration.\n\t\t\t *\n\t\t\t * The default list of integrations is `upload`, `assetManager`, `url`. Those integrations are included\n\t\t\t * in the insert image dropdown if the given feature plugin is loaded. You should omit the `integrations`\n\t\t\t * configuration key to use the default set or provide a selected list of integrations that should be used.\n\t\t\t *\n\t\t\t * @error image-insert-integrations-not-specified\n\t\t\t */ logWarning('image-insert-integrations-not-specified');\n            return result;\n        }\n        for (const item of items){\n            if (!this._integrations.has(item)) {\n                if (![\n                    'upload',\n                    'assetManager',\n                    'url'\n                ].includes(item)) {\n                    /**\n\t\t\t\t\t * The specified insert image integration name is unknown or the providing plugin is not loaded in the editor.\n\t\t\t\t\t *\n\t\t\t\t\t * @error image-insert-unknown-integration\n\t\t\t\t\t */ logWarning('image-insert-unknown-integration', {\n                        item\n                    });\n                }\n                continue;\n            }\n            result.push(this._integrations.get(item));\n        }\n        if (!result.length) {\n            /**\n\t\t\t * The image insert feature requires integrations to be registered by separate features.\n\t\t\t *\n\t\t\t * The `insertImage` toolbar button requires integrations to be registered by other features.\n\t\t\t * For example {@link module:image/imageupload~ImageUpload ImageUpload},\n\t\t\t * {@link module:image/imageinsert~ImageInsert ImageInsert},\n\t\t\t * {@link module:image/imageinsertviaurl~ImageInsertViaUrl ImageInsertViaUrl},\n\t\t\t * {@link module:ckbox/ckbox~CKBox CKBox}\n\t\t\t *\n\t\t\t * @error image-insert-integrations-not-registered\n\t\t\t */ logWarning('image-insert-integrations-not-registered');\n        }\n        return result;\n    }\n}\n\n/**\n * The image block plugin.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * {@link module:image/image/imageblockediting~ImageBlockEditing},\n * * {@link module:image/imagetextalternative~ImageTextAlternative}.\n *\n * Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n * for more information.\n */ class ImageBlock extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageBlockEditing,\n            Widget,\n            ImageTextAlternative,\n            ImageInsertUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageBlock';\n    }\n}\n\n/**\n * The image inline plugin.\n *\n * It registers:\n *\n * * `<imageInline>` as an inline element in the document schema, and allows `alt`, `src` and `srcset` attributes.\n * * converters for editing and data pipelines.\n * * {@link module:image/image/imagetypecommand~ImageTypeCommand `'imageTypeInline'`} command that converts block images into\n * inline images.\n */ class ImageInlineEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageEditing,\n            ImageSizeAttributes,\n            ImageUtils,\n            ImagePlaceholder,\n            ClipboardPipeline\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageInlineEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        // Converters 'alt' and 'srcset' are added in 'ImageEditing' plugin.\n        schema.register('imageInline', {\n            inheritAllFrom: '$inlineObject',\n            allowAttributes: [\n                'alt',\n                'src',\n                'srcset'\n            ],\n            // Disallow inline images in captions (at least for now).\n            // This is the best spot to do that because independent packages can introduce captions (ImageCaption, TableCaption, etc.).\n            disallowIn: [\n                'caption'\n            ]\n        });\n        this._setupConversion();\n        if (editor.plugins.has('ImageBlockEditing')) {\n            editor.commands.add('imageTypeInline', new ImageTypeCommand(this.editor, 'imageInline'));\n            this._setupClipboardIntegration();\n        }\n    }\n    /**\n\t * Configures conversion pipelines to support upcasting and downcasting\n\t * inline images (inline image widgets) and their attributes.\n\t */ _setupConversion() {\n        const editor = this.editor;\n        const t = editor.t;\n        const conversion = editor.conversion;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        conversion.for('dataDowncast').elementToElement({\n            model: 'imageInline',\n            view: (modelElement, { writer })=>writer.createEmptyElement('img')\n        });\n        conversion.for('editingDowncast').elementToStructure({\n            model: 'imageInline',\n            view: (modelElement, { writer })=>imageUtils.toImageWidget(createInlineImageViewElement(writer), writer, t('image widget'))\n        });\n        conversion.for('downcast').add(downcastImageAttribute(imageUtils, 'imageInline', 'src')).add(downcastImageAttribute(imageUtils, 'imageInline', 'alt')).add(downcastSrcsetAttribute(imageUtils, 'imageInline'));\n        // More image related upcasts are in 'ImageEditing' plugin.\n        conversion.for('upcast').elementToElement({\n            view: getImgViewElementMatcher(editor, 'imageInline'),\n            model: (viewImage, { writer })=>writer.createElement('imageInline', viewImage.hasAttribute('src') ? {\n                    src: viewImage.getAttribute('src')\n                } : undefined)\n        });\n    }\n    /**\n\t * Integrates the plugin with the clipboard pipeline.\n\t *\n\t * Idea is that the feature should recognize the user's intent when an **block** image is\n\t * pasted or dropped. If such an image is pasted/dropped into a non-empty block\n\t * (e.g. a paragraph with some text) it gets converted into an inline image on the fly.\n\t *\n\t * We assume this is the user's intent if they decided to put their image there.\n\t *\n\t * **Note**: If a block image has a caption, it will not be converted to an inline image\n\t * to avoid the confusion. Captions are added on purpose and they should never be lost\n\t * in the clipboard pipeline.\n\t *\n\t * See the `ImageBlockEditing` for the similar integration that works in the opposite direction.\n\t *\n\t * The feature also sets image `width` and `height` attributes when pasting.\n\t */ _setupClipboardIntegration() {\n        const editor = this.editor;\n        const model = editor.model;\n        const editingView = editor.editing.view;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n        this.listenTo(clipboardPipeline, 'inputTransformation', (evt, data)=>{\n            const docFragmentChildren = Array.from(data.content.getChildren());\n            let modelRange;\n            // Make sure only <figure class=\"image\"></figure> elements are dropped or pasted. Otherwise, if there some other HTML\n            // mixed up, this should be handled as a regular paste.\n            if (!docFragmentChildren.every(imageUtils.isBlockImageView)) {\n                return;\n            }\n            // When drag and dropping, data.targetRanges specifies where to drop because\n            // this is usually a different place than the current model selection (the user\n            // uses a drop marker to specify the drop location).\n            if (data.targetRanges) {\n                modelRange = editor.editing.mapper.toModelRange(data.targetRanges[0]);\n            } else {\n                modelRange = model.document.selection.getFirstRange();\n            }\n            const selection = model.createSelection(modelRange);\n            // Convert block images into inline images only when pasting or dropping into non-empty blocks\n            // and when the block is not an object (e.g. pasting to replace another widget).\n            if (determineImageTypeForInsertionAtSelection(model.schema, selection) === 'imageInline') {\n                const writer = new UpcastWriter(editingView.document);\n                // Unwrap <figure class=\"image\"><img .../></figure> -> <img ... />\n                // but <figure class=\"image\"><img .../><figcaption>...</figcaption></figure> -> stays the same\n                const inlineViewImages = docFragmentChildren.map((blockViewImage)=>{\n                    // If there's just one child, it can be either <img /> or <a><img></a>.\n                    // If there are other children than <img>, this means that the block image\n                    // has a caption or some other features and this kind of image should be\n                    // pasted/dropped without modifications.\n                    if (blockViewImage.childCount === 1) {\n                        // Pass the attributes which are present only in the <figure> to the <img>\n                        // (e.g. the style=\"width:10%\" attribute applied by the ImageResize plugin).\n                        Array.from(blockViewImage.getAttributes()).forEach((attribute)=>writer.setAttribute(...attribute, imageUtils.findViewImgElement(blockViewImage)));\n                        return blockViewImage.getChild(0);\n                    } else {\n                        return blockViewImage;\n                    }\n                });\n                data.content = writer.createDocumentFragment(inlineViewImages);\n            }\n        });\n        this.listenTo(clipboardPipeline, 'contentInsertion', (evt, data)=>{\n            if (data.method !== 'paste') {\n                return;\n            }\n            model.change((writer)=>{\n                const range = writer.createRangeIn(data.content);\n                for (const item of range.getItems()){\n                    if (item.is('element', 'imageInline')) {\n                        imageUtils.setImageNaturalSizeAttributes(item);\n                    }\n                }\n            });\n        });\n    }\n}\n\n/**\n * The image inline plugin.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * {@link module:image/image/imageinlineediting~ImageInlineEditing},\n * * {@link module:image/imagetextalternative~ImageTextAlternative}.\n *\n * Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n * for more information.\n */ class ImageInline extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageInlineEditing,\n            Widget,\n            ImageTextAlternative,\n            ImageInsertUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageInline';\n    }\n}\n\n/**\n * The image plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-overview image feature} documentation.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * {@link module:image/imageblock~ImageBlock},\n * * {@link module:image/imageinline~ImageInline},\n *\n * Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}\n * for more information.\n */ class Image extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageBlock,\n            ImageInline\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Image';\n    }\n}\n\n/**\n * The image caption utilities plugin.\n */ class ImageCaptionUtils extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageCaptionUtils';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * Returns the caption model element from a given image element. Returns `null` if no caption is found.\n\t */ getCaptionFromImageModelElement(imageModelElement) {\n        for (const node of imageModelElement.getChildren()){\n            if (!!node && node.is('element', 'caption')) {\n                return node;\n            }\n        }\n        return null;\n    }\n    /**\n\t * Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.\n\t */ getCaptionFromModelSelection(selection) {\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        const captionElement = selection.getFirstPosition().findAncestor('caption');\n        if (!captionElement) {\n            return null;\n        }\n        if (imageUtils.isBlockImage(captionElement.parent)) {\n            return captionElement;\n        }\n        return null;\n    }\n    /**\n\t * {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a `<figcaption>` element that is placed\n\t * inside the image `<figure>` element.\n\t * @returns Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element\n\t * cannot be matched.\n\t */ matchImageCaptionViewElement(element) {\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        // Convert only captions for images.\n        if (element.name == 'figcaption' && imageUtils.isBlockImageView(element.parent)) {\n            return {\n                name: true\n            };\n        }\n        return null;\n    }\n}\n\n/**\n * The toggle image caption command.\n *\n * This command is registered by {@link module:image/imagecaption/imagecaptionediting~ImageCaptionEditing} as the\n * `'toggleImageCaption'` editor command.\n *\n * Executing this command:\n *\n * * either adds or removes the image caption of a selected image (depending on whether the caption is present or not),\n * * removes the image caption if the selection is anchored in one.\n *\n * ```ts\n * // Toggle the presence of the caption.\n * editor.execute( 'toggleImageCaption' );\n * ```\n *\n * **Note**: Upon executing this command, the selection will be set on the image if previously anchored in the caption element.\n *\n * **Note**: You can move the selection to the caption right away as it shows up upon executing this command by using\n * the `focusCaptionOnShow` option:\n *\n * ```ts\n * editor.execute( 'toggleImageCaption', { focusCaptionOnShow: true } );\n * ```\n */ class ToggleImageCaptionCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const imageCaptionUtils = editor.plugins.get('ImageCaptionUtils');\n        const imageUtils = editor.plugins.get('ImageUtils');\n        // Only block images can get captions.\n        if (!editor.plugins.has(ImageBlockEditing)) {\n            this.isEnabled = false;\n            this.value = false;\n            return;\n        }\n        const selection = editor.model.document.selection;\n        const selectedElement = selection.getSelectedElement();\n        if (!selectedElement) {\n            const ancestorCaptionElement = imageCaptionUtils.getCaptionFromModelSelection(selection);\n            this.isEnabled = !!ancestorCaptionElement;\n            this.value = !!ancestorCaptionElement;\n            return;\n        }\n        // Block images support captions by default but the command should also be enabled for inline\n        // images because toggling the caption when one is selected should convert it into a block image.\n        this.isEnabled = imageUtils.isImage(selectedElement);\n        if (!this.isEnabled) {\n            this.value = false;\n        } else {\n            this.value = !!imageCaptionUtils.getCaptionFromImageModelElement(selectedElement);\n        }\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * ```ts\n\t * editor.execute( 'toggleImageCaption' );\n\t * ```\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.focusCaptionOnShow When true and the caption shows up, the selection will be moved into it straight away.\n\t * @fires execute\n\t */ execute(options = {}) {\n        const { focusCaptionOnShow } = options;\n        this.editor.model.change((writer)=>{\n            if (this.value) {\n                this._hideImageCaption(writer);\n            } else {\n                this._showImageCaption(writer, focusCaptionOnShow);\n            }\n        });\n    }\n    /**\n\t * Shows the caption of the `<imageBlock>` or `<imageInline>`. Also:\n\t *\n\t * * it converts `<imageInline>` to `<imageBlock>` to show the caption,\n\t * * it attempts to restore the caption content from the `ImageCaptionEditing` caption registry,\n\t * * it moves the selection to the caption right away, it the `focusCaptionOnShow` option was set.\n\t */ _showImageCaption(writer, focusCaptionOnShow) {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const imageCaptionEditing = this.editor.plugins.get('ImageCaptionEditing');\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        let selectedImage = selection.getSelectedElement();\n        const savedCaption = imageCaptionEditing._getSavedCaption(selectedImage);\n        // Convert imageInline -> image first.\n        if (imageUtils.isInlineImage(selectedImage)) {\n            this.editor.execute('imageTypeBlock');\n            // Executing the command created a new model element. Let's pick it again.\n            selectedImage = selection.getSelectedElement();\n        }\n        // Try restoring the caption from the ImageCaptionEditing plugin storage.\n        const newCaptionElement = savedCaption || writer.createElement('caption');\n        writer.append(newCaptionElement, selectedImage);\n        if (focusCaptionOnShow) {\n            writer.setSelection(newCaptionElement, 'in');\n        }\n    }\n    /**\n\t * Hides the caption of a selected image (or an image caption the selection is anchored to).\n\t *\n\t * The content of the caption is stored in the `ImageCaptionEditing` caption registry to make this\n\t * a reversible action.\n\t */ _hideImageCaption(writer) {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const imageCaptionEditing = editor.plugins.get('ImageCaptionEditing');\n        const imageCaptionUtils = editor.plugins.get('ImageCaptionUtils');\n        let selectedImage = selection.getSelectedElement();\n        let captionElement;\n        if (selectedImage) {\n            captionElement = imageCaptionUtils.getCaptionFromImageModelElement(selectedImage);\n        } else {\n            captionElement = imageCaptionUtils.getCaptionFromModelSelection(selection);\n            selectedImage = captionElement.parent;\n        }\n        // Store the caption content so it can be restored quickly if the user changes their mind even if they toggle image<->imageInline.\n        imageCaptionEditing._saveCaption(selectedImage, captionElement);\n        writer.setSelection(selectedImage, 'on');\n        writer.remove(captionElement);\n    }\n}\n\n/**\n * The image caption engine plugin. It is responsible for:\n *\n * * registering converters for the caption element,\n * * registering converters for the caption model attribute,\n * * registering the {@link module:image/imagecaption/toggleimagecaptioncommand~ToggleImageCaptionCommand `toggleImageCaption`} command.\n */ class ImageCaptionEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils,\n            ImageCaptionUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageCaptionEditing';\n    }\n    /**\n\t * A map that keeps saved JSONified image captions and image model elements they are\n\t * associated with.\n\t *\n\t * To learn more about this system, see {@link #_saveCaption}.\n\t */ _savedCaptionsMap;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._savedCaptionsMap = new WeakMap();\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        // Schema configuration.\n        if (!schema.isRegistered('caption')) {\n            schema.register('caption', {\n                allowIn: 'imageBlock',\n                allowContentOf: '$block',\n                isLimit: true\n            });\n        } else {\n            schema.extend('caption', {\n                allowIn: 'imageBlock'\n            });\n        }\n        editor.commands.add('toggleImageCaption', new ToggleImageCaptionCommand(this.editor));\n        this._setupConversion();\n        this._setupImageTypeCommandsIntegration();\n        this._registerCaptionReconversion();\n    }\n    /**\n\t * Configures conversion pipelines to support upcasting and downcasting\n\t * image captions.\n\t */ _setupConversion() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const imageCaptionUtils = editor.plugins.get('ImageCaptionUtils');\n        const t = editor.t;\n        // View -> model converter for the data pipeline.\n        editor.conversion.for('upcast').elementToElement({\n            view: (element)=>imageCaptionUtils.matchImageCaptionViewElement(element),\n            model: 'caption'\n        });\n        // Model -> view converter for the data pipeline.\n        editor.conversion.for('dataDowncast').elementToElement({\n            model: 'caption',\n            view: (modelElement, { writer })=>{\n                if (!imageUtils.isBlockImage(modelElement.parent)) {\n                    return null;\n                }\n                return writer.createContainerElement('figcaption');\n            }\n        });\n        // Model -> view converter for the editing pipeline.\n        editor.conversion.for('editingDowncast').elementToElement({\n            model: 'caption',\n            view: (modelElement, { writer })=>{\n                if (!imageUtils.isBlockImage(modelElement.parent)) {\n                    return null;\n                }\n                const figcaptionElement = writer.createEditableElement('figcaption');\n                writer.setCustomProperty('imageCaption', true, figcaptionElement);\n                figcaptionElement.placeholder = t('Enter image caption');\n                enablePlaceholder({\n                    view,\n                    element: figcaptionElement,\n                    keepOnFocus: true\n                });\n                const imageAlt = modelElement.parent.getAttribute('alt');\n                const label = imageAlt ? t('Caption for image: %0', [\n                    imageAlt\n                ]) : t('Caption for the image');\n                return toWidgetEditable(figcaptionElement, writer, {\n                    label\n                });\n            }\n        });\n    }\n    /**\n\t * Integrates with {@link module:image/image/imagetypecommand~ImageTypeCommand image type commands}\n\t * to make sure the caption is preserved when the type of an image changes so it can be restored\n\t * in the future if the user decides they want their caption back.\n\t */ _setupImageTypeCommandsIntegration() {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const imageCaptionUtils = editor.plugins.get('ImageCaptionUtils');\n        const imageTypeInlineCommand = editor.commands.get('imageTypeInline');\n        const imageTypeBlockCommand = editor.commands.get('imageTypeBlock');\n        const handleImageTypeChange = (evt)=>{\n            // The image type command execution can be unsuccessful.\n            if (!evt.return) {\n                return;\n            }\n            const { oldElement, newElement } = evt.return;\n            /* istanbul ignore if: paranoid check -- @preserve */ if (!oldElement) {\n                return;\n            }\n            if (imageUtils.isBlockImage(oldElement)) {\n                const oldCaptionElement = imageCaptionUtils.getCaptionFromImageModelElement(oldElement);\n                // If the old element was a captioned block image (the caption was visible),\n                // simply save it so it can be restored.\n                if (oldCaptionElement) {\n                    this._saveCaption(newElement, oldCaptionElement);\n                    return;\n                }\n            }\n            const savedOldElementCaption = this._getSavedCaption(oldElement);\n            // If either:\n            //\n            // * the block image didn't have a visible caption,\n            // * the block image caption was hidden (and already saved),\n            // * the inline image was passed\n            //\n            // just try to \"pass\" the saved caption from the old image to the new image\n            // so it can be retrieved in the future if the user wants it back.\n            if (savedOldElementCaption) {\n                // Note: Since we're writing to a WeakMap, we don't bother with removing the\n                // [ oldElement, savedOldElementCaption ] pair from it.\n                this._saveCaption(newElement, savedOldElementCaption);\n            }\n        };\n        // Presence of the commands depends on the Image(Inline|Block)Editing plugins loaded in the editor.\n        if (imageTypeInlineCommand) {\n            this.listenTo(imageTypeInlineCommand, 'execute', handleImageTypeChange, {\n                priority: 'low'\n            });\n        }\n        if (imageTypeBlockCommand) {\n            this.listenTo(imageTypeBlockCommand, 'execute', handleImageTypeChange, {\n                priority: 'low'\n            });\n        }\n    }\n    /**\n\t * Returns the saved {@link module:engine/model/element~Element#toJSON JSONified} caption\n\t * of an image model element.\n\t *\n\t * See {@link #_saveCaption}.\n\t *\n\t * @internal\n\t * @param imageModelElement The model element the caption should be returned for.\n\t * @returns The model caption element or `null` if there is none.\n\t */ _getSavedCaption(imageModelElement) {\n        const jsonObject = this._savedCaptionsMap.get(imageModelElement);\n        return jsonObject ? Element.fromJSON(jsonObject) : null;\n    }\n    /**\n\t * Saves a {@link module:engine/model/element~Element#toJSON JSONified} caption for\n\t * an image element to allow restoring it in the future.\n\t *\n\t * A caption is saved every time it gets hidden and/or the type of an image changes. The\n\t * user should be able to restore it on demand.\n\t *\n\t * **Note**: The caption cannot be stored in the image model element attribute because,\n\t * for instance, when the model state propagates to collaborators, the attribute would get\n\t * lost (mainly because it does not convert to anything when the caption is hidden) and\n\t * the states of collaborators' models would de-synchronize causing numerous issues.\n\t *\n\t * See {@link #_getSavedCaption}.\n\t *\n\t * @internal\n\t * @param imageModelElement The model element the caption is saved for.\n\t * @param caption The caption model element to be saved.\n\t */ _saveCaption(imageModelElement, caption) {\n        this._savedCaptionsMap.set(imageModelElement, caption.toJSON());\n    }\n    /**\n\t * Reconverts image caption when image alt attribute changes.\n\t * The change of alt attribute is reflected in caption's aria-label attribute.\n\t */ _registerCaptionReconversion() {\n        const editor = this.editor;\n        const model = editor.model;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const imageCaptionUtils = editor.plugins.get('ImageCaptionUtils');\n        model.document.on('change:data', ()=>{\n            const changes = model.document.differ.getChanges();\n            for (const change of changes){\n                if (change.attributeKey !== 'alt') {\n                    continue;\n                }\n                const image = change.range.start.nodeAfter;\n                if (imageUtils.isBlockImage(image)) {\n                    const caption = imageCaptionUtils.getCaptionFromImageModelElement(image);\n                    if (!caption) {\n                        return;\n                    }\n                    editor.editing.reconvertItem(caption);\n                }\n            }\n        });\n    }\n}\n\n/**\n * The image caption UI plugin. It introduces the `'toggleImageCaption'` UI button.\n */ class ImageCaptionUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageCaptionUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageCaptionUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const imageCaptionUtils = editor.plugins.get('ImageCaptionUtils');\n        const t = editor.t;\n        editor.ui.componentFactory.add('toggleImageCaption', (locale)=>{\n            const command = editor.commands.get('toggleImageCaption');\n            const view = new ButtonView(locale);\n            view.set({\n                icon: icons.caption,\n                tooltip: true,\n                isToggleable: true\n            });\n            view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');\n            view.bind('label').to(command, 'value', (value)=>value ? t('Toggle caption off') : t('Toggle caption on'));\n            this.listenTo(view, 'execute', ()=>{\n                editor.execute('toggleImageCaption', {\n                    focusCaptionOnShow: true\n                });\n                // Scroll to the selection and highlight the caption if the caption showed up.\n                const modelCaptionElement = imageCaptionUtils.getCaptionFromModelSelection(editor.model.document.selection);\n                if (modelCaptionElement) {\n                    const figcaptionElement = editor.editing.mapper.toViewElement(modelCaptionElement);\n                    editingView.scrollToTheSelection();\n                    editingView.change((writer)=>{\n                        writer.addClass('image__caption_highlighted', figcaptionElement);\n                    });\n                }\n                editor.editing.view.focus();\n            });\n            return view;\n        });\n    }\n}\n\n/**\n * The image caption plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-captions image caption} documentation.\n */ class ImageCaption extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageCaptionEditing,\n            ImageCaptionUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageCaption';\n    }\n}\n\n/**\n * Creates a regular expression used to test for image files.\n *\n * ```ts\n * const imageType = createImageTypeRegExp( [ 'png', 'jpeg', 'svg+xml', 'vnd.microsoft.icon' ] );\n *\n * console.log( 'is supported image', imageType.test( file.type ) );\n * ```\n */ function createImageTypeRegExp(types) {\n    // Sanitize the MIME type name which may include: \"+\", \"-\" or \".\".\n    const regExpSafeNames = types.map((type)=>type.replace('+', '\\\\+'));\n    return new RegExp(`^image\\\\/(${regExpSafeNames.join('|')})$`);\n}\n/**\n * Creates a promise that fetches the image local source (Base64 or blob) and resolves with a `File` object.\n *\n * @param image Image whose source to fetch.\n * @returns A promise which resolves when an image source is fetched and converted to a `File` instance.\n * It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\n */ function fetchLocalImage(image) {\n    return new Promise((resolve, reject)=>{\n        const imageSrc = image.getAttribute('src');\n        // Fetch works asynchronously and so does not block browser UI when processing data.\n        fetch(imageSrc).then((resource)=>resource.blob()).then((blob)=>{\n            const mimeType = getImageMimeType(blob, imageSrc);\n            const ext = mimeType.replace('image/', '');\n            const filename = `image.${ext}`;\n            const file = new File([\n                blob\n            ], filename, {\n                type: mimeType\n            });\n            resolve(file);\n        }).catch((err)=>{\n            // Fetch fails only, if it can't make a request due to a network failure or if anything prevented the request\n            // from completing, i.e. the Content Security Policy rules. It is not possible to detect the exact cause of failure,\n            // so we are just trying the fallback solution, if general TypeError is thrown.\n            return err && err.name === 'TypeError' ? convertLocalImageOnCanvas(imageSrc).then(resolve).catch(reject) : reject(err);\n        });\n    });\n}\n/**\n * Checks whether a given node is an image element with a local source (Base64 or blob).\n *\n * @param node The node to check.\n */ function isLocalImage(imageUtils, node) {\n    if (!imageUtils.isInlineImageView(node) || !node.getAttribute('src')) {\n        return false;\n    }\n    return !!node.getAttribute('src').match(/^data:image\\/\\w+;base64,/g) || !!node.getAttribute('src').match(/^blob:/g);\n}\n/**\n * Extracts an image type based on its blob representation or its source.\n * @param blob Image blob representation.\n * @param src Image `src` attribute value.\n */ function getImageMimeType(blob, src) {\n    if (blob.type) {\n        return blob.type;\n    } else if (src.match(/data:(image\\/\\w+);base64/)) {\n        return src.match(/data:(image\\/\\w+);base64/)[1].toLowerCase();\n    } else {\n        // Fallback to 'jpeg' as common extension.\n        return 'image/jpeg';\n    }\n}\n/**\n * Creates a promise that converts the image local source (Base64 or blob) to a blob using canvas and resolves\n * with a `File` object.\n * @param imageSrc Image `src` attribute value.\n * @returns A promise which resolves when an image source is converted to a `File` instance.\n * It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.\n */ function convertLocalImageOnCanvas(imageSrc) {\n    return getBlobFromCanvas(imageSrc).then((blob)=>{\n        const mimeType = getImageMimeType(blob, imageSrc);\n        const ext = mimeType.replace('image/', '');\n        const filename = `image.${ext}`;\n        return new File([\n            blob\n        ], filename, {\n            type: mimeType\n        });\n    });\n}\n/**\n * Creates a promise that resolves with a `Blob` object converted from the image source (Base64 or blob).\n * @param imageSrc Image `src` attribute value.\n */ function getBlobFromCanvas(imageSrc) {\n    return new Promise((resolve, reject)=>{\n        const image = global.document.createElement('img');\n        image.addEventListener('load', ()=>{\n            const canvas = global.document.createElement('canvas');\n            canvas.width = image.width;\n            canvas.height = image.height;\n            const ctx = canvas.getContext('2d');\n            ctx.drawImage(image, 0, 0);\n            canvas.toBlob((blob)=>blob ? resolve(blob) : reject());\n        });\n        image.addEventListener('error', ()=>reject());\n        image.src = imageSrc;\n    });\n}\n\n/**\n * The image upload button plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature} documentation.\n *\n * Adds the `'uploadImage'` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}\n * and also the `imageUpload` button as an alias for backward compatibility.\n *\n * Adds the `'menuBar:uploadImage'` menu button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}.\n *\n * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are the default components\n * through which image upload is available.\n */ class ImageUploadUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageUploadUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Setup `uploadImage` button and add `imageUpload` button as an alias for backward compatibility.\n        editor.ui.componentFactory.add('uploadImage', ()=>this._createToolbarButton());\n        editor.ui.componentFactory.add('imageUpload', ()=>this._createToolbarButton());\n        editor.ui.componentFactory.add('menuBar:uploadImage', ()=>this._createMenuBarButton('standalone'));\n        if (editor.plugins.has('ImageInsertUI')) {\n            editor.plugins.get('ImageInsertUI').registerIntegration({\n                name: 'upload',\n                observable: ()=>editor.commands.get('uploadImage'),\n                buttonViewCreator: ()=>this._createToolbarButton(),\n                formViewCreator: ()=>this._createDropdownButton(),\n                menuBarButtonViewCreator: (isOnly)=>this._createMenuBarButton(isOnly ? 'insertOnly' : 'insertNested')\n            });\n        }\n    }\n    /**\n\t * Creates the base for various kinds of the button component provided by this feature.\n\t */ _createButton(ButtonClass) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const command = editor.commands.get('uploadImage');\n        const imageTypes = editor.config.get('image.upload.types');\n        const imageTypesRegExp = createImageTypeRegExp(imageTypes);\n        const view = new ButtonClass(editor.locale);\n        const t = locale.t;\n        view.set({\n            acceptedType: imageTypes.map((type)=>`image/${type}`).join(','),\n            allowMultipleFiles: true,\n            label: t('Upload from computer'),\n            icon: icons.imageUpload\n        });\n        view.bind('isEnabled').to(command);\n        view.on('done', (evt, files)=>{\n            const imagesToUpload = Array.from(files).filter((file)=>imageTypesRegExp.test(file.type));\n            if (imagesToUpload.length) {\n                editor.execute('uploadImage', {\n                    file: imagesToUpload\n                });\n                editor.editing.view.focus();\n            }\n        });\n        return view;\n    }\n    /**\n\t * Creates a simple toolbar button, with an icon and a tooltip.\n\t */ _createToolbarButton() {\n        const t = this.editor.locale.t;\n        const imageInsertUI = this.editor.plugins.get('ImageInsertUI');\n        const uploadImageCommand = this.editor.commands.get('uploadImage');\n        const button = this._createButton(FileDialogButtonView);\n        button.tooltip = true;\n        button.bind('label').to(imageInsertUI, 'isImageSelected', uploadImageCommand, 'isAccessAllowed', (isImageSelected, isAccessAllowed)=>{\n            if (!isAccessAllowed) {\n                return t('You have no image upload permissions.');\n            }\n            return isImageSelected ? t('Replace image from computer') : t('Upload image from computer');\n        });\n        return button;\n    }\n    /**\n\t * Creates a button for the dropdown view, with an icon, text and no tooltip.\n\t */ _createDropdownButton() {\n        const t = this.editor.locale.t;\n        const imageInsertUI = this.editor.plugins.get('ImageInsertUI');\n        const button = this._createButton(FileDialogButtonView);\n        button.withText = true;\n        button.bind('label').to(imageInsertUI, 'isImageSelected', (isImageSelected)=>isImageSelected ? t('Replace from computer') : t('Upload from computer'));\n        button.on('execute', ()=>{\n            imageInsertUI.dropdownView.isOpen = false;\n        });\n        return button;\n    }\n    /**\n\t * Creates a button for the menu bar.\n\t */ _createMenuBarButton(type) {\n        const t = this.editor.locale.t;\n        const button = this._createButton(MenuBarMenuListItemFileDialogButtonView);\n        button.withText = true;\n        switch(type){\n            case 'standalone':\n                button.label = t('Image from computer');\n                break;\n            case 'insertOnly':\n                button.label = t('Image');\n                break;\n            case 'insertNested':\n                button.label = t('From computer');\n                break;\n        }\n        return button;\n    }\n}\n\n/**\n * The image upload progress plugin.\n * It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.\n */ class ImageUploadProgress extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageUploadProgress';\n    }\n    /**\n\t * The image placeholder that is displayed before real image data can be accessed.\n\t *\n\t * For the record, this image is a 1x1 px GIF with an aspect ratio set by CSS.\n\t */ placeholder;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this.placeholder = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Upload status change - update image's view according to that status.\n        if (editor.plugins.has('ImageBlockEditing')) {\n            editor.editing.downcastDispatcher.on('attribute:uploadStatus:imageBlock', this.uploadStatusChange);\n        }\n        if (editor.plugins.has('ImageInlineEditing')) {\n            editor.editing.downcastDispatcher.on('attribute:uploadStatus:imageInline', this.uploadStatusChange);\n        }\n    }\n    /**\n\t * This method is called each time the image `uploadStatus` attribute is changed.\n\t *\n\t * @param evt An object containing information about the fired event.\n\t * @param data Additional information about the change.\n\t */ uploadStatusChange = (evt, data, conversionApi)=>{\n        const editor = this.editor;\n        const modelImage = data.item;\n        const uploadId = modelImage.getAttribute('uploadId');\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const fileRepository = editor.plugins.get(FileRepository);\n        const status = uploadId ? data.attributeNewValue : null;\n        const placeholder = this.placeholder;\n        const viewFigure = editor.editing.mapper.toViewElement(modelImage);\n        const viewWriter = conversionApi.writer;\n        if (status == 'reading') {\n            // Start \"appearing\" effect and show placeholder with infinite progress bar on the top\n            // while image is read from disk.\n            _startAppearEffect(viewFigure, viewWriter);\n            _showPlaceholder(imageUtils, placeholder, viewFigure, viewWriter);\n            return;\n        }\n        // Show progress bar on the top of the image when image is uploading.\n        if (status == 'uploading') {\n            const loader = fileRepository.loaders.get(uploadId);\n            // Start appear effect if needed - see https://github.com/ckeditor/ckeditor5-image/issues/191.\n            _startAppearEffect(viewFigure, viewWriter);\n            if (!loader) {\n                // There is no loader associated with uploadId - this means that image came from external changes.\n                // In such cases we still want to show the placeholder until image is fully uploaded.\n                // Show placeholder if needed - see https://github.com/ckeditor/ckeditor5-image/issues/191.\n                _showPlaceholder(imageUtils, placeholder, viewFigure, viewWriter);\n            } else {\n                // Hide placeholder and initialize progress bar showing upload progress.\n                _hidePlaceholder(viewFigure, viewWriter);\n                _showProgressBar(viewFigure, viewWriter, loader, editor.editing.view);\n                _displayLocalImage(imageUtils, viewFigure, viewWriter, loader);\n            }\n            return;\n        }\n        if (status == 'complete' && fileRepository.loaders.get(uploadId)) {\n            _showCompleteIcon(viewFigure, viewWriter, editor.editing.view);\n        }\n        // Clean up.\n        _hideProgressBar(viewFigure, viewWriter);\n        _hidePlaceholder(viewFigure, viewWriter);\n        _stopAppearEffect(viewFigure, viewWriter);\n    };\n}\n/**\n * Adds ck-appear class to the image figure if one is not already applied.\n */ function _startAppearEffect(viewFigure, writer) {\n    if (!viewFigure.hasClass('ck-appear')) {\n        writer.addClass('ck-appear', viewFigure);\n    }\n}\n/**\n * Removes ck-appear class to the image figure if one is not already removed.\n */ function _stopAppearEffect(viewFigure, writer) {\n    writer.removeClass('ck-appear', viewFigure);\n}\n/**\n * Shows placeholder together with infinite progress bar on given image figure.\n */ function _showPlaceholder(imageUtils, placeholder, viewFigure, writer) {\n    if (!viewFigure.hasClass('ck-image-upload-placeholder')) {\n        writer.addClass('ck-image-upload-placeholder', viewFigure);\n    }\n    const viewImg = imageUtils.findViewImgElement(viewFigure);\n    if (viewImg.getAttribute('src') !== placeholder) {\n        writer.setAttribute('src', placeholder, viewImg);\n    }\n    if (!_getUIElement(viewFigure, 'placeholder')) {\n        writer.insert(writer.createPositionAfter(viewImg), _createPlaceholder(writer));\n    }\n}\n/**\n * Removes placeholder together with infinite progress bar on given image figure.\n */ function _hidePlaceholder(viewFigure, writer) {\n    if (viewFigure.hasClass('ck-image-upload-placeholder')) {\n        writer.removeClass('ck-image-upload-placeholder', viewFigure);\n    }\n    _removeUIElement(viewFigure, writer, 'placeholder');\n}\n/**\n * Shows progress bar displaying upload progress.\n * Attaches it to the file loader to update when upload percentace is changed.\n */ function _showProgressBar(viewFigure, writer, loader, view) {\n    const progressBar = _createProgressBar(writer);\n    writer.insert(writer.createPositionAt(viewFigure, 'end'), progressBar);\n    // Update progress bar width when uploadedPercent is changed.\n    loader.on('change:uploadedPercent', (evt, name, value)=>{\n        view.change((writer)=>{\n            writer.setStyle('width', value + '%', progressBar);\n        });\n    });\n}\n/**\n * Hides upload progress bar.\n */ function _hideProgressBar(viewFigure, writer) {\n    _removeUIElement(viewFigure, writer, 'progressBar');\n}\n/**\n * Shows complete icon and hides after a certain amount of time.\n */ function _showCompleteIcon(viewFigure, writer, view) {\n    const completeIcon = writer.createUIElement('div', {\n        class: 'ck-image-upload-complete-icon'\n    });\n    writer.insert(writer.createPositionAt(viewFigure, 'end'), completeIcon);\n    setTimeout(()=>{\n        view.change((writer)=>writer.remove(writer.createRangeOn(completeIcon)));\n    }, 3000);\n}\n/**\n * Create progress bar element using {@link module:engine/view/uielement~UIElement}.\n */ function _createProgressBar(writer) {\n    const progressBar = writer.createUIElement('div', {\n        class: 'ck-progress-bar'\n    });\n    writer.setCustomProperty('progressBar', true, progressBar);\n    return progressBar;\n}\n/**\n * Create placeholder element using {@link module:engine/view/uielement~UIElement}.\n */ function _createPlaceholder(writer) {\n    const placeholder = writer.createUIElement('div', {\n        class: 'ck-upload-placeholder-loader'\n    });\n    writer.setCustomProperty('placeholder', true, placeholder);\n    return placeholder;\n}\n/**\n * Returns {@link module:engine/view/uielement~UIElement} of given unique property from image figure element.\n * Returns `undefined` if element is not found.\n */ function _getUIElement(imageFigure, uniqueProperty) {\n    for (const child of imageFigure.getChildren()){\n        if (child.getCustomProperty(uniqueProperty)) {\n            return child;\n        }\n    }\n}\n/**\n * Removes {@link module:engine/view/uielement~UIElement} of given unique property from image figure element.\n */ function _removeUIElement(viewFigure, writer, uniqueProperty) {\n    const element = _getUIElement(viewFigure, uniqueProperty);\n    if (element) {\n        writer.remove(writer.createRangeOn(element));\n    }\n}\n/**\n * Displays local data from file loader.\n */ function _displayLocalImage(imageUtils, viewFigure, writer, loader) {\n    if (loader.data) {\n        const viewImg = imageUtils.findViewImgElement(viewFigure);\n        writer.setAttribute('src', loader.data, viewImg);\n    }\n}\n\n/**\n * @module image/imageupload/uploadimagecommand\n */ /**\n * The upload image command.\n *\n * The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin as `uploadImage`\n * and it is also available via aliased `imageUpload` name.\n *\n * In order to upload an image at the current selection position\n * (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),\n * execute the command and pass the native image file instance:\n *\n * ```ts\n * this.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {\n * \t// Assuming that only images were pasted:\n * \tconst images = Array.from( data.dataTransfer.files );\n *\n * \t// Upload the first image:\n * \teditor.execute( 'uploadImage', { file: images[ 0 ] } );\n * } );\n * ```\n *\n * It is also possible to insert multiple images at once:\n *\n * ```ts\n * editor.execute( 'uploadImage', {\n * \tfile: [\n * \t\tfile1,\n * \t\tfile2\n * \t]\n * } );\n * ```\n */ class UploadImageCommand extends Command {\n    /**\n\t * Creates an instance of the `imageUlpoad` command. When executed, the command upload one of\n\t * the currently selected image from computer.\n\t *\n\t * @param editor The editor instance.\n\t */ constructor(editor){\n        super(editor);\n        this.set('isAccessAllowed', true);\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const selectedElement = editor.model.document.selection.getSelectedElement();\n        // TODO: This needs refactoring.\n        this.isEnabled = imageUtils.isImageAllowed() || imageUtils.isImage(selectedElement);\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options Options for the executed command.\n\t * @param options.file The image file or an array of image files to upload.\n\t */ execute(options) {\n        const files = toArray(options.file);\n        const selection = this.editor.model.document.selection;\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        // In case of multiple files, each file (starting from the 2nd) will be inserted at a position that\n        // follows the previous one. That will move the selection and, to stay on the safe side and make sure\n        // all images inherit the same selection attributes, they are collected beforehand.\n        //\n        // Applying these attributes ensures, for instance, that inserting an (inline) image into a link does\n        // not split that link but preserves its continuity.\n        //\n        // Note: Selection attributes that do not make sense for images will be filtered out by insertImage() anyway.\n        const selectionAttributes = Object.fromEntries(selection.getAttributes());\n        files.forEach((file, index)=>{\n            const selectedElement = selection.getSelectedElement();\n            // Inserting of an inline image replace the selected element and make a selection on the inserted image.\n            // Therefore inserting multiple inline images requires creating position after each element.\n            if (index && selectedElement && imageUtils.isImage(selectedElement)) {\n                const position = this.editor.model.createPositionAfter(selectedElement);\n                this._uploadImage(file, selectionAttributes, position);\n            } else {\n                this._uploadImage(file, selectionAttributes);\n            }\n        });\n    }\n    /**\n\t * Handles uploading single file.\n\t */ _uploadImage(file, attributes, position) {\n        const editor = this.editor;\n        const fileRepository = editor.plugins.get(FileRepository);\n        const loader = fileRepository.createLoader(file);\n        const imageUtils = editor.plugins.get('ImageUtils');\n        // Do not throw when upload adapter is not set. FileRepository will log an error anyway.\n        if (!loader) {\n            return;\n        }\n        imageUtils.insertImage({\n            ...attributes,\n            uploadId: loader.id\n        }, position);\n    }\n}\n\n/**\n * The editing part of the image upload feature. It registers the `'uploadImage'` command\n * and the `imageUpload` command as an aliased name.\n *\n * When an image is uploaded, it fires the {@link ~ImageUploadEditing#event:uploadComplete `uploadComplete`} event\n * that allows adding custom attributes to the {@link module:engine/model/element~Element image element}.\n */ class ImageUploadEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            FileRepository,\n            Notification,\n            ClipboardPipeline,\n            ImageUtils\n        ];\n    }\n    static get pluginName() {\n        return 'ImageUploadEditing';\n    }\n    /**\n\t * An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and\n\t * model elements during the upload.\n\t *\n\t * Model element of the uploaded image can change, for instance, when {@link module:image/image/imagetypecommand~ImageTypeCommand}\n\t * is executed as a result of adding caption or changing image style. As a result, the upload logic must keep track of the model\n\t * element (reference) and resolve the upload for the correct model element (instead of the one that landed in the `$graveyard`\n\t * after image type changed).\n\t */ _uploadImageElements;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('image', {\n            upload: {\n                types: [\n                    'jpeg',\n                    'png',\n                    'gif',\n                    'bmp',\n                    'webp',\n                    'tiff'\n                ]\n            }\n        });\n        this._uploadImageElements = new Map();\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const doc = editor.model.document;\n        const conversion = editor.conversion;\n        const fileRepository = editor.plugins.get(FileRepository);\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n        const imageTypes = createImageTypeRegExp(editor.config.get('image.upload.types'));\n        const uploadImageCommand = new UploadImageCommand(editor);\n        // Register `uploadImage` command and add `imageUpload` command as an alias for backward compatibility.\n        editor.commands.add('uploadImage', uploadImageCommand);\n        editor.commands.add('imageUpload', uploadImageCommand);\n        // Register upcast converter for uploadId.\n        conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: 'img',\n                key: 'uploadId'\n            },\n            model: 'uploadId'\n        });\n        // Handle pasted images.\n        // For every image file, a new file loader is created and a placeholder image is\n        // inserted into the content. Then, those images are uploaded once they appear in the model\n        // (see Document#change listener below).\n        this.listenTo(editor.editing.view.document, 'clipboardInput', (evt, data)=>{\n            // Skip if non empty HTML data is included.\n            // https://github.com/ckeditor/ckeditor5-upload/issues/68\n            if (isHtmlIncluded(data.dataTransfer)) {\n                return;\n            }\n            const images = Array.from(data.dataTransfer.files).filter((file)=>{\n                // See https://github.com/ckeditor/ckeditor5-image/pull/254.\n                if (!file) {\n                    return false;\n                }\n                return imageTypes.test(file.type);\n            });\n            if (!images.length) {\n                return;\n            }\n            evt.stop();\n            editor.model.change((writer)=>{\n                // Set selection to paste target.\n                if (data.targetRanges) {\n                    writer.setSelection(data.targetRanges.map((viewRange)=>editor.editing.mapper.toModelRange(viewRange)));\n                }\n                editor.execute('uploadImage', {\n                    file: images\n                });\n            });\n            const uploadImageCommand = editor.commands.get('uploadImage');\n            if (!uploadImageCommand.isAccessAllowed) {\n                const notification = editor.plugins.get('Notification');\n                const t = editor.locale.t;\n                // eslint-disable-next-line max-len\n                notification.showWarning(t('You have no image upload permissions.'), {\n                    namespace: 'image'\n                });\n            }\n        });\n        // Handle HTML pasted with images with base64 or blob sources.\n        // For every image file, a new file loader is created and a placeholder image is\n        // inserted into the content. Then, those images are uploaded once they appear in the model\n        // (see Document#change listener below).\n        this.listenTo(clipboardPipeline, 'inputTransformation', (evt, data)=>{\n            const fetchableImages = Array.from(editor.editing.view.createRangeIn(data.content)).map((value)=>value.item).filter((viewElement)=>isLocalImage(imageUtils, viewElement) && !viewElement.getAttribute('uploadProcessed')).map((viewElement)=>{\n                return {\n                    promise: fetchLocalImage(viewElement),\n                    imageElement: viewElement\n                };\n            });\n            if (!fetchableImages.length) {\n                return;\n            }\n            const writer = new UpcastWriter(editor.editing.view.document);\n            for (const fetchableImage of fetchableImages){\n                // Set attribute marking that the image was processed already.\n                writer.setAttribute('uploadProcessed', true, fetchableImage.imageElement);\n                const loader = fileRepository.createLoader(fetchableImage.promise);\n                if (loader) {\n                    writer.setAttribute('src', '', fetchableImage.imageElement);\n                    writer.setAttribute('uploadId', loader.id, fetchableImage.imageElement);\n                }\n            }\n        });\n        // Prevents from the browser redirecting to the dropped image.\n        editor.editing.view.document.on('dragover', (evt, data)=>{\n            data.preventDefault();\n        });\n        // Upload placeholder images that appeared in the model.\n        doc.on('change', ()=>{\n            // Note: Reversing changes to start with insertions and only then handle removals. If it was the other way around,\n            // loaders for **all** images that land in the $graveyard would abort while in fact only those that were **not** replaced\n            // by other images should be aborted.\n            const changes = doc.differ.getChanges({\n                includeChangesInGraveyard: true\n            }).reverse();\n            const insertedImagesIds = new Set();\n            for (const entry of changes){\n                if (entry.type == 'insert' && entry.name != '$text') {\n                    const item = entry.position.nodeAfter;\n                    const isInsertedInGraveyard = entry.position.root.rootName == '$graveyard';\n                    for (const imageElement of getImagesFromChangeItem(editor, item)){\n                        // Check if the image element still has upload id.\n                        const uploadId = imageElement.getAttribute('uploadId');\n                        if (!uploadId) {\n                            continue;\n                        }\n                        // Check if the image is loaded on this client.\n                        const loader = fileRepository.loaders.get(uploadId);\n                        if (!loader) {\n                            continue;\n                        }\n                        if (isInsertedInGraveyard) {\n                            // If the image was inserted to the graveyard for good (**not** replaced by another image),\n                            // only then abort the loading process.\n                            if (!insertedImagesIds.has(uploadId)) {\n                                loader.abort();\n                            }\n                        } else {\n                            // Remember the upload id of the inserted image. If it acted as a replacement for another\n                            // image (which landed in the $graveyard), the related loader will not be aborted because\n                            // this is still the same image upload.\n                            insertedImagesIds.add(uploadId);\n                            // Keep the mapping between the upload ID and the image model element so the upload\n                            // can later resolve in the context of the correct model element. The model element could\n                            // change for the same upload if one image was replaced by another (e.g. image type was changed),\n                            // so this may also replace an existing mapping.\n                            this._uploadImageElements.set(uploadId, imageElement);\n                            if (loader.status == 'idle') {\n                                // If the image was inserted into content and has not been loaded yet, start loading it.\n                                this._readAndUpload(loader);\n                            }\n                        }\n                    }\n                }\n            }\n        });\n        // Set the default handler for feeding the image element with `src` and `srcset` attributes.\n        // Also set the natural `width` and `height` attributes (if not already set).\n        this.on('uploadComplete', (evt, { imageElement, data })=>{\n            const urls = data.urls ? data.urls : data;\n            this.editor.model.change((writer)=>{\n                writer.setAttribute('src', urls.default, imageElement);\n                this._parseAndSetSrcsetAttributeOnImage(urls, imageElement, writer);\n                imageUtils.setImageNaturalSizeAttributes(imageElement);\n            });\n        }, {\n            priority: 'low'\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const schema = this.editor.model.schema;\n        // Setup schema to allow uploadId and uploadStatus for images.\n        // Wait for ImageBlockEditing or ImageInlineEditing to register their elements first,\n        // that's why doing this in afterInit() instead of init().\n        if (this.editor.plugins.has('ImageBlockEditing')) {\n            schema.extend('imageBlock', {\n                allowAttributes: [\n                    'uploadId',\n                    'uploadStatus'\n                ]\n            });\n        }\n        if (this.editor.plugins.has('ImageInlineEditing')) {\n            schema.extend('imageInline', {\n                allowAttributes: [\n                    'uploadId',\n                    'uploadStatus'\n                ]\n            });\n        }\n    }\n    /**\n\t * Reads and uploads an image.\n\t *\n\t * The image is read from the disk and as a Base64-encoded string it is set temporarily to\n\t * `image[src]`. When the image is successfully uploaded, the temporary data is replaced with the target\n\t * image's URL (the URL to the uploaded image on the server).\n\t */ _readAndUpload(loader) {\n        const editor = this.editor;\n        const model = editor.model;\n        const t = editor.locale.t;\n        const fileRepository = editor.plugins.get(FileRepository);\n        const notification = editor.plugins.get(Notification);\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const imageUploadElements = this._uploadImageElements;\n        model.enqueueChange({\n            isUndoable: false\n        }, (writer)=>{\n            writer.setAttribute('uploadStatus', 'reading', imageUploadElements.get(loader.id));\n        });\n        return loader.read().then(()=>{\n            const promise = loader.upload();\n            const imageElement = imageUploadElements.get(loader.id);\n            // Force re–paint in Safari. Without it, the image will display with a wrong size.\n            // https://github.com/ckeditor/ckeditor5/issues/1975\n            /* istanbul ignore next -- @preserve */ if (env.isSafari) {\n                const viewFigure = editor.editing.mapper.toViewElement(imageElement);\n                const viewImg = imageUtils.findViewImgElement(viewFigure);\n                editor.editing.view.once('render', ()=>{\n                    // Early returns just to be safe. There might be some code ran\n                    // in between the outer scope and this callback.\n                    if (!viewImg.parent) {\n                        return;\n                    }\n                    const domFigure = editor.editing.view.domConverter.mapViewToDom(viewImg.parent);\n                    if (!domFigure) {\n                        return;\n                    }\n                    const originalDisplay = domFigure.style.display;\n                    domFigure.style.display = 'none';\n                    // Make sure this line will never be removed during minification for having \"no effect\".\n                    domFigure._ckHack = domFigure.offsetHeight;\n                    domFigure.style.display = originalDisplay;\n                });\n            }\n            if (editor.ui) {\n                editor.ui.ariaLiveAnnouncer.announce(t('Uploading image'));\n            }\n            model.enqueueChange({\n                isUndoable: false\n            }, (writer)=>{\n                writer.setAttribute('uploadStatus', 'uploading', imageElement);\n            });\n            return promise;\n        }).then((data)=>{\n            model.enqueueChange({\n                isUndoable: false\n            }, (writer)=>{\n                const imageElement = imageUploadElements.get(loader.id);\n                writer.setAttribute('uploadStatus', 'complete', imageElement);\n                if (editor.ui) {\n                    editor.ui.ariaLiveAnnouncer.announce(t('Image upload complete'));\n                }\n                this.fire('uploadComplete', {\n                    data,\n                    imageElement\n                });\n            });\n            clean();\n        }).catch((error)=>{\n            if (editor.ui) {\n                editor.ui.ariaLiveAnnouncer.announce(t('Error during image upload'));\n            }\n            // If status is not 'error' nor 'aborted' - throw error because it means that something else went wrong,\n            // it might be generic error and it would be real pain to find what is going on.\n            if (loader.status !== 'error' && loader.status !== 'aborted') {\n                throw error;\n            }\n            // Might be 'aborted'.\n            if (loader.status == 'error' && error) {\n                notification.showWarning(error, {\n                    title: t('Upload failed'),\n                    namespace: 'upload'\n                });\n            }\n            // Permanently remove image from insertion batch.\n            model.enqueueChange({\n                isUndoable: false\n            }, (writer)=>{\n                writer.remove(imageUploadElements.get(loader.id));\n            });\n            clean();\n        });\n        function clean() {\n            model.enqueueChange({\n                isUndoable: false\n            }, (writer)=>{\n                const imageElement = imageUploadElements.get(loader.id);\n                writer.removeAttribute('uploadId', imageElement);\n                writer.removeAttribute('uploadStatus', imageElement);\n                imageUploadElements.delete(loader.id);\n            });\n            fileRepository.destroyLoader(loader);\n        }\n    }\n    /**\n\t * Creates the `srcset` attribute based on a given file upload response and sets it as an attribute to a specific image element.\n\t *\n\t * @param data Data object from which `srcset` will be created.\n\t * @param image The image element on which the `srcset` attribute will be set.\n\t */ _parseAndSetSrcsetAttributeOnImage(data, image, writer) {\n        // Srcset attribute for responsive images support.\n        let maxWidth = 0;\n        const srcsetAttribute = Object.keys(data)// Filter out keys that are not integers.\n        .filter((key)=>{\n            const width = parseInt(key, 10);\n            if (!isNaN(width)) {\n                maxWidth = Math.max(maxWidth, width);\n                return true;\n            }\n        })// Convert each key to srcset entry.\n        .map((key)=>`${data[key]} ${key}w`)// Join all entries.\n        .join(', ');\n        if (srcsetAttribute != '') {\n            const attributes = {\n                srcset: srcsetAttribute\n            };\n            if (!image.hasAttribute('width') && !image.hasAttribute('height')) {\n                attributes.width = maxWidth;\n            }\n            writer.setAttributes(attributes, image);\n        }\n    }\n}\n/**\n * Returns `true` if non-empty `text/html` is included in the data transfer.\n */ function isHtmlIncluded(dataTransfer) {\n    return Array.from(dataTransfer.types).includes('text/html') && dataTransfer.getData('text/html') !== '';\n}\nfunction getImagesFromChangeItem(editor, item) {\n    const imageUtils = editor.plugins.get('ImageUtils');\n    return Array.from(editor.model.createRangeOn(item)).filter((value)=>imageUtils.isImage(value.item)).map((value)=>value.item);\n}\n\n/**\n * The image upload plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload image upload feature} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins to enable image uploading:\n *\n * * {@link module:image/imageupload/imageuploadediting~ImageUploadEditing},\n * * {@link module:image/imageupload/imageuploadui~ImageUploadUI},\n * * {@link module:image/imageupload/imageuploadprogress~ImageUploadProgress}.\n */ class ImageUpload extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageUpload';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUploadEditing,\n            ImageUploadUI,\n            ImageUploadProgress\n        ];\n    }\n}\n\n/**\n * The insert an image via URL view.\n *\n * See {@link module:image/imageinsert/imageinsertviaurlui~ImageInsertViaUrlUI}.\n */ class ImageInsertUrlView extends View {\n    /**\n\t * The URL input field view.\n\t */ urlInputView;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        this.set('imageURLInputValue', '');\n        this.set('isImageSelected', false);\n        this.set('isEnabled', true);\n        this.keystrokes = new KeystrokeHandler();\n        this.urlInputView = this._createUrlInputView();\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-image-insert-url'\n                ]\n            },\n            children: [\n                this.urlInputView,\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-image-insert-url__action-row'\n                        ]\n                    }\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Creates the {@link #urlInputView}.\n\t */ _createUrlInputView() {\n        const locale = this.locale;\n        const t = locale.t;\n        const urlInputView = new LabeledFieldView(locale, createLabeledInputText);\n        urlInputView.bind('label').to(this, 'isImageSelected', (value)=>value ? t('Update image URL') : t('Insert image via URL'));\n        urlInputView.bind('isEnabled').to(this);\n        urlInputView.fieldView.inputMode = 'url';\n        urlInputView.fieldView.placeholder = 'https://example.com/image.png';\n        urlInputView.fieldView.bind('value').to(this, 'imageURLInputValue', (value)=>value || '');\n        urlInputView.fieldView.on('input', ()=>{\n            this.imageURLInputValue = urlInputView.fieldView.element.value.trim();\n        });\n        return urlInputView;\n    }\n    /**\n\t * Focuses the view.\n\t */ focus() {\n        this.urlInputView.focus();\n    }\n}\n\n/**\n * The image insert via URL plugin (UI part).\n *\n * The plugin introduces two UI components to the {@link module:ui/componentfactory~ComponentFactory UI component factory}:\n *\n * * the `'insertImageViaUrl'` toolbar button,\n * * the `'menuBar:insertImageViaUrl'` menu bar component.\n *\n * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are default components\n * through which inserting image via URL is available.\n */ class ImageInsertViaUrlUI extends Plugin {\n    _imageInsertUI;\n    _formView;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageInsertViaUrlUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageInsertUI,\n            Dialog\n        ];\n    }\n    init() {\n        this.editor.ui.componentFactory.add('insertImageViaUrl', ()=>this._createToolbarButton());\n        this.editor.ui.componentFactory.add('menuBar:insertImageViaUrl', ()=>this._createMenuBarButton('standalone'));\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        this._imageInsertUI = this.editor.plugins.get('ImageInsertUI');\n        this._imageInsertUI.registerIntegration({\n            name: 'url',\n            observable: ()=>this.editor.commands.get('insertImage'),\n            buttonViewCreator: ()=>this._createToolbarButton(),\n            formViewCreator: ()=>this._createDropdownButton(),\n            menuBarButtonViewCreator: (isOnly)=>this._createMenuBarButton(isOnly ? 'insertOnly' : 'insertNested')\n        });\n    }\n    /**\n\t * Creates the base for various kinds of the button component provided by this feature.\n\t */ _createInsertUrlButton(ButtonClass) {\n        const button = new ButtonClass(this.editor.locale);\n        button.icon = icons.imageUrl;\n        button.on('execute', ()=>{\n            this._showModal();\n        });\n        return button;\n    }\n    /**\n\t * Creates a simple toolbar button, with an icon and a tooltip.\n\t */ _createToolbarButton() {\n        const t = this.editor.locale.t;\n        const button = this._createInsertUrlButton(ButtonView);\n        button.tooltip = true;\n        button.bind('label').to(this._imageInsertUI, 'isImageSelected', (isImageSelected)=>isImageSelected ? t('Update image URL') : t('Insert image via URL'));\n        return button;\n    }\n    /**\n\t * Creates a button for the dropdown view, with an icon, text and no tooltip.\n\t */ _createDropdownButton() {\n        const t = this.editor.locale.t;\n        const button = this._createInsertUrlButton(ButtonView);\n        button.withText = true;\n        button.bind('label').to(this._imageInsertUI, 'isImageSelected', (isImageSelected)=>isImageSelected ? t('Update image URL') : t('Insert via URL'));\n        return button;\n    }\n    /**\n\t * Creates a button for the menu bar.\n\t */ _createMenuBarButton(type) {\n        const t = this.editor.locale.t;\n        const button = this._createInsertUrlButton(MenuBarMenuListItemButtonView);\n        button.withText = true;\n        switch(type){\n            case 'standalone':\n                button.label = t('Image via URL');\n                break;\n            case 'insertOnly':\n                button.label = t('Image');\n                break;\n            case 'insertNested':\n                button.label = t('Via URL');\n                break;\n        }\n        return button;\n    }\n    /**\n\t * Creates the form view used to submit the image URL.\n\t */ _createInsertUrlView() {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const replaceImageSourceCommand = editor.commands.get('replaceImageSource');\n        const insertImageCommand = editor.commands.get('insertImage');\n        const imageInsertUrlView = new ImageInsertUrlView(locale);\n        imageInsertUrlView.bind('isImageSelected').to(this._imageInsertUI);\n        imageInsertUrlView.bind('isEnabled').toMany([\n            insertImageCommand,\n            replaceImageSourceCommand\n        ], 'isEnabled', (...isEnabled)=>isEnabled.some((isCommandEnabled)=>isCommandEnabled));\n        return imageInsertUrlView;\n    }\n    /**\n\t * Shows the insert image via URL form view in a modal.\n\t */ _showModal() {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const t = locale.t;\n        const dialog = editor.plugins.get('Dialog');\n        if (!this._formView) {\n            this._formView = this._createInsertUrlView();\n            this._formView.on('submit', ()=>this._handleSave());\n        }\n        const replaceImageSourceCommand = editor.commands.get('replaceImageSource');\n        this._formView.imageURLInputValue = replaceImageSourceCommand.value || '';\n        dialog.show({\n            id: 'insertImageViaUrl',\n            title: this._imageInsertUI.isImageSelected ? t('Update image URL') : t('Insert image via URL'),\n            isModal: true,\n            content: this._formView,\n            actionButtons: [\n                {\n                    label: t('Cancel'),\n                    withText: true,\n                    onExecute: ()=>dialog.hide()\n                },\n                {\n                    label: t('Accept'),\n                    class: 'ck-button-action',\n                    withText: true,\n                    onExecute: ()=>this._handleSave()\n                }\n            ]\n        });\n    }\n    /**\n\t * Executes appropriate command depending on selection and form value.\n\t */ _handleSave() {\n        const replaceImageSourceCommand = this.editor.commands.get('replaceImageSource');\n        // If an image element is currently selected, we want to replace its source attribute (instead of inserting a new image).\n        // We detect if an image is selected by checking `replaceImageSource` command state.\n        if (replaceImageSourceCommand.isEnabled) {\n            this.editor.execute('replaceImageSource', {\n                source: this._formView.imageURLInputValue\n            });\n        } else {\n            this.editor.execute('insertImage', {\n                source: this._formView.imageURLInputValue\n            });\n        }\n        this.editor.plugins.get('Dialog').hide();\n    }\n}\n\n/**\n * The image insert via URL plugin.\n *\n * For a detailed overview, check the {@glink features/images/images-inserting\n * Insert images via source URL} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins\n * to enable image inserting via implemented integrations:\n *\n * * {@link module:image/imageinsert/imageinsertui~ImageInsertUI},\n */ class ImageInsertViaUrl extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageInsertViaUrl';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageInsertViaUrlUI,\n            ImageInsertUI\n        ];\n    }\n}\n\n/**\n * The image insert plugin.\n *\n * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}\n * and {@glink features/images/images-inserting Insert images via source URL} documentation.\n *\n * This plugin does not do anything directly, but it loads a set of specific plugins\n * to enable image uploading or inserting via implemented integrations:\n *\n * * {@link module:image/imageupload~ImageUpload}\n * * {@link module:image/imageinsert/imageinsertui~ImageInsertUI}\n */ class ImageInsert extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageInsert';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUpload,\n            ImageInsertViaUrl,\n            ImageInsertUI\n        ];\n    }\n}\n\n/**\n * The resize image command. Currently, it only supports the width attribute.\n */ class ResizeImageCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const element = imageUtils.getClosestSelectedImageElement(editor.model.document.selection);\n        this.isEnabled = !!element;\n        if (!element || !element.hasAttribute('resizedWidth')) {\n            this.value = null;\n        } else {\n            this.value = {\n                width: element.getAttribute('resizedWidth'),\n                height: null\n            };\n        }\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * ```ts\n\t * // Sets the width to 50%:\n\t * editor.execute( 'resizeImage', { width: '50%' } );\n\t *\n\t * // Removes the width attribute:\n\t * editor.execute( 'resizeImage', { width: null } );\n\t * ```\n\t *\n\t * @param options\n\t * @param options.width The new width of the image.\n\t * @fires execute\n\t */ execute(options) {\n        const editor = this.editor;\n        const model = editor.model;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const imageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n        this.value = {\n            width: options.width,\n            height: null\n        };\n        if (imageElement) {\n            model.change((writer)=>{\n                writer.setAttribute('resizedWidth', options.width, imageElement);\n                writer.removeAttribute('resizedHeight', imageElement);\n                imageUtils.setImageNaturalSizeAttributes(imageElement);\n            });\n        }\n    }\n}\n\n/**\n * The image resize editing feature.\n *\n * It adds the ability to resize each image using handles or manually by\n * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n */ class ImageResizeEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageResizeEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('image', {\n            resizeUnit: '%',\n            resizeOptions: [\n                {\n                    name: 'resizeImage:original',\n                    value: null,\n                    icon: 'original'\n                },\n                {\n                    name: 'resizeImage:custom',\n                    value: 'custom',\n                    icon: 'custom'\n                },\n                {\n                    name: 'resizeImage:25',\n                    value: '25',\n                    icon: 'small'\n                },\n                {\n                    name: 'resizeImage:50',\n                    value: '50',\n                    icon: 'medium'\n                },\n                {\n                    name: 'resizeImage:75',\n                    value: '75',\n                    icon: 'large'\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const resizeImageCommand = new ResizeImageCommand(editor);\n        this._registerConverters('imageBlock');\n        this._registerConverters('imageInline');\n        // Register `resizeImage` command and add `imageResize` command as an alias for backward compatibility.\n        editor.commands.add('resizeImage', resizeImageCommand);\n        editor.commands.add('imageResize', resizeImageCommand);\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        this._registerSchema();\n    }\n    _registerSchema() {\n        if (this.editor.plugins.has('ImageBlockEditing')) {\n            this.editor.model.schema.extend('imageBlock', {\n                allowAttributes: [\n                    'resizedWidth',\n                    'resizedHeight'\n                ]\n            });\n        }\n        if (this.editor.plugins.has('ImageInlineEditing')) {\n            this.editor.model.schema.extend('imageInline', {\n                allowAttributes: [\n                    'resizedWidth',\n                    'resizedHeight'\n                ]\n            });\n        }\n    }\n    /**\n\t * Registers image resize converters.\n\t *\n\t * @param imageType The type of the image.\n\t */ _registerConverters(imageType) {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        // Dedicated converter to propagate image's attribute to the img tag.\n        editor.conversion.for('downcast').add((dispatcher)=>dispatcher.on(`attribute:resizedWidth:${imageType}`, (evt, data, conversionApi)=>{\n                if (!conversionApi.consumable.consume(data.item, evt.name)) {\n                    return;\n                }\n                const viewWriter = conversionApi.writer;\n                const viewImg = conversionApi.mapper.toViewElement(data.item);\n                if (data.attributeNewValue !== null) {\n                    viewWriter.setStyle('width', data.attributeNewValue, viewImg);\n                    viewWriter.addClass('image_resized', viewImg);\n                } else {\n                    viewWriter.removeStyle('width', viewImg);\n                    viewWriter.removeClass('image_resized', viewImg);\n                }\n            }));\n        editor.conversion.for('dataDowncast').attributeToAttribute({\n            model: {\n                name: imageType,\n                key: 'resizedHeight'\n            },\n            view: (modelAttributeValue)=>({\n                    key: 'style',\n                    value: {\n                        'height': modelAttributeValue\n                    }\n                })\n        });\n        editor.conversion.for('editingDowncast').add((dispatcher)=>dispatcher.on(`attribute:resizedHeight:${imageType}`, (evt, data, conversionApi)=>{\n                if (!conversionApi.consumable.consume(data.item, evt.name)) {\n                    return;\n                }\n                const viewWriter = conversionApi.writer;\n                const viewImg = conversionApi.mapper.toViewElement(data.item);\n                const target = imageType === 'imageInline' ? imageUtils.findViewImgElement(viewImg) : viewImg;\n                if (data.attributeNewValue !== null) {\n                    viewWriter.setStyle('height', data.attributeNewValue, target);\n                } else {\n                    viewWriter.removeStyle('height', target);\n                }\n            }));\n        editor.conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: imageType === 'imageBlock' ? 'figure' : 'img',\n                styles: {\n                    width: /.+/\n                }\n            },\n            model: {\n                key: 'resizedWidth',\n                value: (viewElement)=>{\n                    if (widthAndHeightStylesAreBothSet(viewElement)) {\n                        return null;\n                    }\n                    return viewElement.getStyle('width');\n                }\n            }\n        });\n        editor.conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: imageType === 'imageBlock' ? 'figure' : 'img',\n                styles: {\n                    height: /.+/\n                }\n            },\n            model: {\n                key: 'resizedHeight',\n                value: (viewElement)=>{\n                    if (widthAndHeightStylesAreBothSet(viewElement)) {\n                        return null;\n                    }\n                    return viewElement.getStyle('height');\n                }\n            }\n        });\n    }\n}\n\nconst RESIZE_ICONS = /* #__PURE__ */ (()=>({\n        small: icons.objectSizeSmall,\n        medium: icons.objectSizeMedium,\n        large: icons.objectSizeLarge,\n        custom: icons.objectSizeCustom,\n        original: icons.objectSizeFull\n    }))();\n/**\n * The image resize buttons plugin.\n *\n * It adds a possibility to resize images using the toolbar dropdown or individual buttons, depending on the plugin configuration.\n */ class ImageResizeButtons extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageResizeEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageResizeButtons';\n    }\n    /**\n\t * The resize unit.\n\t * @default '%'\n\t */ _resizeUnit;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._resizeUnit = editor.config.get('image.resizeUnit');\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const options = editor.config.get('image.resizeOptions');\n        const command = editor.commands.get('resizeImage');\n        this.bind('isEnabled').to(command);\n        for (const option of options){\n            this._registerImageResizeButton(option);\n        }\n        this._registerImageResizeDropdown(options);\n    }\n    /**\n\t * A helper function that creates a standalone button component for the plugin.\n\t *\n\t * @param resizeOption A model of the resize option.\n\t */ _registerImageResizeButton(option) {\n        const editor = this.editor;\n        const { name, value, icon } = option;\n        editor.ui.componentFactory.add(name, (locale)=>{\n            const button = new ButtonView(locale);\n            const command = editor.commands.get('resizeImage');\n            const labelText = this._getOptionLabelValue(option, true);\n            if (!RESIZE_ICONS[icon]) {\n                /**\n\t\t\t\t * When configuring {@link module:image/imageconfig~ImageConfig#resizeOptions `config.image.resizeOptions`} for standalone\n\t\t\t\t * buttons, a valid `icon` token must be set for each option.\n\t\t\t\t *\n\t\t\t\t * See all valid options described in the\n\t\t\t\t * {@link module:image/imageconfig~ImageResizeOption plugin configuration}.\n\t\t\t\t *\n\t\t\t\t * @error imageresizebuttons-missing-icon\n\t\t\t\t * @param option Invalid image resize option.\n\t\t\t\t*/ throw new CKEditorError('imageresizebuttons-missing-icon', editor, option);\n            }\n            button.set({\n                // Use the `label` property for a verbose description (because of ARIA).\n                label: labelText,\n                icon: RESIZE_ICONS[icon],\n                tooltip: labelText,\n                isToggleable: true\n            });\n            // Bind button to the command.\n            button.bind('isEnabled').to(this);\n            if (editor.plugins.has('ImageCustomResizeUI') && isCustomImageResizeOption(option)) {\n                const customResizeUI = editor.plugins.get('ImageCustomResizeUI');\n                this.listenTo(button, 'execute', ()=>{\n                    customResizeUI._showForm(this._resizeUnit);\n                });\n            } else {\n                const optionValueWithUnit = value ? value + this._resizeUnit : null;\n                button.bind('isOn').to(command, 'value', getIsOnButtonCallback(optionValueWithUnit));\n                this.listenTo(button, 'execute', ()=>{\n                    editor.execute('resizeImage', {\n                        width: optionValueWithUnit\n                    });\n                });\n            }\n            return button;\n        });\n    }\n    /**\n\t * A helper function that creates a dropdown component for the plugin containing all the resize options defined in\n\t * the editor configuration.\n\t *\n\t * @param options An array of configured options.\n\t */ _registerImageResizeDropdown(options) {\n        const editor = this.editor;\n        const t = editor.t;\n        const originalSizeOption = options.find((option)=>!option.value);\n        const componentCreator = (locale)=>{\n            const command = editor.commands.get('resizeImage');\n            const dropdownView = createDropdown(locale, DropdownButtonView);\n            const dropdownButton = dropdownView.buttonView;\n            const accessibleLabel = t('Resize image');\n            dropdownButton.set({\n                tooltip: accessibleLabel,\n                commandValue: originalSizeOption.value,\n                icon: RESIZE_ICONS.medium,\n                isToggleable: true,\n                label: this._getOptionLabelValue(originalSizeOption),\n                withText: true,\n                class: 'ck-resize-image-button',\n                ariaLabel: accessibleLabel,\n                ariaLabelledBy: undefined\n            });\n            dropdownButton.bind('label').to(command, 'value', (commandValue)=>{\n                if (commandValue && commandValue.width) {\n                    return commandValue.width;\n                } else {\n                    return this._getOptionLabelValue(originalSizeOption);\n                }\n            });\n            dropdownView.bind('isEnabled').to(this);\n            addListToDropdown(dropdownView, ()=>this._getResizeDropdownListItemDefinitions(options, command), {\n                ariaLabel: t('Image resize list'),\n                role: 'menu'\n            });\n            // Execute command when an item from the dropdown is selected.\n            this.listenTo(dropdownView, 'execute', (evt)=>{\n                if ('onClick' in evt.source) {\n                    evt.source.onClick();\n                } else {\n                    editor.execute(evt.source.commandName, {\n                        width: evt.source.commandValue\n                    });\n                    editor.editing.view.focus();\n                }\n            });\n            return dropdownView;\n        };\n        // Register `resizeImage` dropdown and add `imageResize` dropdown as an alias for backward compatibility.\n        editor.ui.componentFactory.add('resizeImage', componentCreator);\n        editor.ui.componentFactory.add('imageResize', componentCreator);\n    }\n    /**\n\t * A helper function for creating an option label value string.\n\t *\n\t * @param option A resize option object.\n\t * @param forTooltip An optional flag for creating a tooltip label.\n\t * @returns A user-defined label combined from the numeric value and the resize unit or the default label\n\t * for reset options (`Original`).\n\t */ _getOptionLabelValue(option, forTooltip = false) {\n        const t = this.editor.t;\n        if (option.label) {\n            return option.label;\n        } else if (forTooltip) {\n            if (isCustomImageResizeOption(option)) {\n                return t('Custom image size');\n            } else if (option.value) {\n                return t('Resize image to %0', option.value + this._resizeUnit);\n            } else {\n                return t('Resize image to the original size');\n            }\n        } else {\n            if (isCustomImageResizeOption(option)) {\n                return t('Custom');\n            } else if (option.value) {\n                return option.value + this._resizeUnit;\n            } else {\n                return t('Original');\n            }\n        }\n    }\n    /**\n\t * A helper function that parses the resize options and returns list item definitions ready for use in the dropdown.\n\t *\n\t * @param options The resize options.\n\t * @param command The resize image command.\n\t * @returns Dropdown item definitions.\n\t */ _getResizeDropdownListItemDefinitions(options, command) {\n        const { editor } = this;\n        const itemDefinitions = new Collection();\n        const optionsWithSerializedValues = options.map((option)=>{\n            if (isCustomImageResizeOption(option)) {\n                return {\n                    ...option,\n                    valueWithUnits: 'custom'\n                };\n            }\n            if (!option.value) {\n                return {\n                    ...option,\n                    valueWithUnits: null\n                };\n            }\n            return {\n                ...option,\n                valueWithUnits: `${option.value}${this._resizeUnit}`\n            };\n        });\n        for (const option of optionsWithSerializedValues){\n            let definition = null;\n            if (editor.plugins.has('ImageCustomResizeUI') && isCustomImageResizeOption(option)) {\n                const customResizeUI = editor.plugins.get('ImageCustomResizeUI');\n                definition = {\n                    type: 'button',\n                    model: new ViewModel({\n                        label: this._getOptionLabelValue(option),\n                        role: 'menuitemradio',\n                        withText: true,\n                        icon: null,\n                        onClick: ()=>{\n                            customResizeUI._showForm(this._resizeUnit);\n                        }\n                    })\n                };\n                const allDropdownValues = map(optionsWithSerializedValues, 'valueWithUnits');\n                definition.model.bind('isOn').to(command, 'value', getIsOnCustomButtonCallback(allDropdownValues));\n            } else {\n                definition = {\n                    type: 'button',\n                    model: new ViewModel({\n                        commandName: 'resizeImage',\n                        commandValue: option.valueWithUnits,\n                        label: this._getOptionLabelValue(option),\n                        role: 'menuitemradio',\n                        withText: true,\n                        icon: null\n                    })\n                };\n                definition.model.bind('isOn').to(command, 'value', getIsOnButtonCallback(option.valueWithUnits));\n            }\n            definition.model.bind('isEnabled').to(command, 'isEnabled');\n            itemDefinitions.add(definition);\n        }\n        return itemDefinitions;\n    }\n}\n/**\n * A helper that checks if provided option triggers custom resize balloon.\n */ function isCustomImageResizeOption(option) {\n    return option.value === 'custom';\n}\n/**\n * A helper function for setting the `isOn` state of buttons in value bindings.\n */ function getIsOnButtonCallback(value) {\n    return (commandValue)=>{\n        const objectCommandValue = commandValue;\n        if (value === null && objectCommandValue === value) {\n            return true;\n        }\n        return objectCommandValue !== null && objectCommandValue.width === value;\n    };\n}\n/**\n * A helper function for setting the `isOn` state of custom size button in value bindings.\n */ function getIsOnCustomButtonCallback(allDropdownValues) {\n    return (commandValue)=>!allDropdownValues.some((dropdownValue)=>getIsOnButtonCallback(dropdownValue)(commandValue));\n}\n\nconst RESIZABLE_IMAGES_CSS_SELECTOR = 'figure.image.ck-widget > img,' + 'figure.image.ck-widget > picture > img,' + 'figure.image.ck-widget > a > img,' + 'figure.image.ck-widget > a > picture > img,' + 'span.image-inline.ck-widget > img,' + 'span.image-inline.ck-widget > picture > img';\nconst RESIZED_IMAGE_CLASS = 'image_resized';\n/**\n * The image resize by handles feature.\n *\n * It adds the ability to resize each image using handles or manually by\n * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.\n */ class ImageResizeHandles extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            WidgetResize,\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageResizeHandles';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const command = this.editor.commands.get('resizeImage');\n        this.bind('isEnabled').to(command);\n        this._setupResizerCreator();\n    }\n    /**\n\t * Attaches the listeners responsible for creating a resizer for each image, except for images inside the HTML embed preview.\n\t */ _setupResizerCreator() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        editingView.addObserver(ImageLoadObserver);\n        this.listenTo(editingView.document, 'imageLoaded', (evt, domEvent)=>{\n            // The resizer must be attached only to images loaded by the `ImageInsert`, `ImageUpload` or `LinkImage` plugins.\n            if (!domEvent.target.matches(RESIZABLE_IMAGES_CSS_SELECTOR)) {\n                return;\n            }\n            const domConverter = editor.editing.view.domConverter;\n            const imageView = domConverter.domToView(domEvent.target);\n            const widgetView = imageUtils.getImageWidgetFromImageView(imageView);\n            let resizer = this.editor.plugins.get(WidgetResize).getResizerByViewElement(widgetView);\n            if (resizer) {\n                // There are rare cases when the image will be triggered multiple times for the same widget, e.g. when\n                // the image's source was changed after upload (https://github.com/ckeditor/ckeditor5/pull/8108#issuecomment-708302992).\n                resizer.redraw();\n                return;\n            }\n            const mapper = editor.editing.mapper;\n            const imageModel = mapper.toModelElement(widgetView);\n            resizer = editor.plugins.get(WidgetResize).attachTo({\n                unit: editor.config.get('image.resizeUnit'),\n                modelElement: imageModel,\n                viewElement: widgetView,\n                editor,\n                getHandleHost (domWidgetElement) {\n                    return domWidgetElement.querySelector('img');\n                },\n                getResizeHost () {\n                    return domConverter.mapViewToDom(mapper.toViewElement(imageModel));\n                },\n                isCentered () {\n                    const imageStyle = imageModel.getAttribute('imageStyle');\n                    return imageStyle == 'alignCenter';\n                },\n                onCommit (newValue) {\n                    // Get rid of the CSS class in case the command execution that follows is unsuccessful\n                    // (e.g. Track Changes can override it and the new dimensions will not apply). Otherwise,\n                    // the presence of the class and the absence of the width style will cause it to take 100%\n                    // of the horizontal space.\n                    editingView.change((writer)=>{\n                        writer.removeClass(RESIZED_IMAGE_CLASS, widgetView);\n                    });\n                    editor.execute('resizeImage', {\n                        width: newValue\n                    });\n                }\n            });\n            resizer.on('updateSize', ()=>{\n                if (!widgetView.hasClass(RESIZED_IMAGE_CLASS)) {\n                    editingView.change((writer)=>{\n                        writer.addClass(RESIZED_IMAGE_CLASS, widgetView);\n                    });\n                }\n                const target = imageModel.name === 'imageInline' ? imageView : widgetView;\n                if (target.getStyle('height')) {\n                    editingView.change((writer)=>{\n                        writer.removeStyle('height', target);\n                    });\n                }\n            });\n            resizer.bind('isEnabled').to(this);\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module image/imageresize/utils/tryparsedimensionwithunit\n */ /**\n * Parses provided string with dimension value and returns extracted numeric value and unit.\n *\n * \t* If non-string dimension is passed then `null` value is returned.\n * \t* If unit is missing then `null` is returned.\n * \t* If numeric value part of string is not a number then `null` is returned.\n *\n * Example:\n * \t`\"222px\"` => `{ value: 222, unit: \"px\" }`\n *\t`\"99%\"` => `{ value: 99, unit: \"%\" }`\n\n * @param dimension Unsafe string with dimension.\n * @returns Parsed dimension with extracted numeric value and units.\n */ function tryParseDimensionWithUnit(dimension) {\n    if (!dimension) {\n        return null;\n    }\n    const [, rawValue, unit] = dimension.trim().match(/([.,\\d]+)(%|px)$/) || [];\n    const parsedValue = Number.parseFloat(rawValue);\n    if (Number.isNaN(parsedValue)) {\n        return null;\n    }\n    return {\n        value: parsedValue,\n        unit\n    };\n}\n/**\n * Converts dimension between `px` -> `%` and `%` -> `px`.\n *\n * @param parentDimensionPx\tDimension of parent element that contains measured element.\n * @param dimension Measured element dimension.\n * @returns Casted dimension.\n */ function tryCastDimensionsToUnit(parentDimensionPx, dimension, targetUnit) {\n    // \"%\" -> \"px\" conversion\n    if (targetUnit === 'px') {\n        return {\n            value: dimension.value,\n            unit: 'px'\n        };\n    }\n    // \"px\" -> \"%\" conversion\n    return {\n        value: dimension.value / parentDimensionPx * 100,\n        unit: '%'\n    };\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module image/imageresize/utils/getselectedimageeditornodes\n */ /**\n * Finds model, view and DOM element for selected image element. Returns `null` if there is no image selected.\n *\n * @param editor Editor instance.\n */ function getSelectedImageEditorNodes(editor) {\n    const { editing } = editor;\n    const imageUtils = editor.plugins.get('ImageUtils');\n    const imageModelElement = imageUtils.getClosestSelectedImageElement(editor.model.document.selection);\n    if (!imageModelElement) {\n        return null;\n    }\n    const imageViewElement = editing.mapper.toViewElement(imageModelElement);\n    const imageDOMElement = editing.view.domConverter.mapViewToDom(imageViewElement);\n    return {\n        model: imageModelElement,\n        view: imageViewElement,\n        dom: imageDOMElement\n    };\n}\n\n/**\n * Returns image width in specified units. It is width of image after resize.\n *\n * \t* If image is not selected or command is disabled then `null` will be returned.\n * \t* If image is not fully loaded (and it is impossible to determine its natural size) then `null` will be returned.\n *\t* If `targetUnit` percentage is passed then it will return width percentage of image related to its accessors.\n *\n * @param editor Editor instance.\n * @param targetUnit Unit in which dimension will be returned.\n * @returns Parsed image width after resize (with unit).\n */ function getSelectedImageWidthInUnits(editor, targetUnit) {\n    const imageNodes = getSelectedImageEditorNodes(editor);\n    if (!imageNodes) {\n        return null;\n    }\n    const parsedResizedWidth = tryParseDimensionWithUnit(imageNodes.model.getAttribute('resizedWidth') || null);\n    if (!parsedResizedWidth) {\n        return null;\n    }\n    if (parsedResizedWidth.unit === targetUnit) {\n        return parsedResizedWidth;\n    }\n    const imageParentWidthPx = calculateResizeHostAncestorWidth(imageNodes.dom);\n    const imageHolderDimension = {\n        unit: 'px',\n        value: new Rect(imageNodes.dom).width\n    };\n    return tryCastDimensionsToUnit(imageParentWidthPx, imageHolderDimension, targetUnit);\n}\n\n/**\n * The ImageCustomResizeFormView class.\n */ class ImageCustomResizeFormView extends View {\n    /**\n\t * Tracks information about the DOM focus in the form.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * Resize unit shortcut.\n\t */ unit;\n    /**\n\t * An input with a label.\n\t */ labeledInput;\n    /**\n\t * A button used to submit the form.\n\t */ saveButtonView;\n    /**\n\t * A button used to cancel the form.\n\t */ cancelButtonView;\n    /**\n\t * A collection of views which can be focused in the form.\n\t */ _focusables;\n    /**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */ _focusCycler;\n    /**\n\t * An array of form validators used by {@link #isValid}.\n\t */ _validators;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, unit, validators){\n        super(locale);\n        const t = this.locale.t;\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this.unit = unit;\n        this.labeledInput = this._createLabeledInputView();\n        this.saveButtonView = this._createButton(t('Save'), icons.check, 'ck-button-save');\n        this.saveButtonView.type = 'submit';\n        this.cancelButtonView = this._createButton(t('Cancel'), icons.cancel, 'ck-button-cancel', 'cancel');\n        this._focusables = new ViewCollection();\n        this._validators = validators;\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        this.setTemplate({\n            tag: 'form',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-image-custom-resize-form',\n                    'ck-responsive-form'\n                ],\n                // https://github.com/ckeditor/ckeditor5-image/issues/40\n                tabindex: '-1'\n            },\n            children: [\n                this.labeledInput,\n                this.saveButtonView,\n                this.cancelButtonView\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.keystrokes.listenTo(this.element);\n        submitHandler({\n            view: this\n        });\n        [\n            this.labeledInput,\n            this.saveButtonView,\n            this.cancelButtonView\n        ].forEach((v)=>{\n            // Register the view as focusable.\n            this._focusables.add(v);\n            // Register the view in the focus tracker.\n            this.focusTracker.add(v.element);\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Creates the button view.\n\t *\n\t * @param label The button label\n\t * @param icon The button's icon.\n\t * @param className The additional button CSS class name.\n\t * @param eventName The event name that the ButtonView#execute event will be delegated to.\n\t * @returns The button view instance.\n\t */ _createButton(label, icon, className, eventName) {\n        const button = new ButtonView(this.locale);\n        button.set({\n            label,\n            icon,\n            tooltip: true\n        });\n        button.extendTemplate({\n            attributes: {\n                class: className\n            }\n        });\n        if (eventName) {\n            button.delegate('execute').to(this, eventName);\n        }\n        return button;\n    }\n    /**\n\t * Creates an input with a label.\n\t *\n\t * @returns Labeled field view instance.\n\t */ _createLabeledInputView() {\n        const t = this.locale.t;\n        const labeledInput = new LabeledFieldView(this.locale, createLabeledInputNumber);\n        labeledInput.label = t('Resize image (in %0)', this.unit);\n        labeledInput.fieldView.set({\n            step: 0.1\n        });\n        return labeledInput;\n    }\n    /**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */ isValid() {\n        this.resetFormStatus();\n        for (const validator of this._validators){\n            const errorText = validator(this);\n            // One error per field is enough.\n            if (errorText) {\n                // Apply updated error.\n                this.labeledInput.errorText = errorText;\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Cleans up the supplementary error and information text of the {@link #labeledInput}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */ resetFormStatus() {\n        this.labeledInput.errorText = null;\n    }\n    /**\n\t * The native DOM `value` of the input element of {@link #labeledInput}.\n\t */ get rawSize() {\n        const { element } = this.labeledInput.fieldView;\n        if (!element) {\n            return null;\n        }\n        return element.value;\n    }\n    /**\n\t * Get numeric value of size. Returns `null` if value of size input element in {@link #labeledInput}.is not a number.\n\t */ get parsedSize() {\n        const { rawSize } = this;\n        if (rawSize === null) {\n            return null;\n        }\n        const parsed = Number.parseFloat(rawSize);\n        if (Number.isNaN(parsed)) {\n            return null;\n        }\n        return parsed;\n    }\n    /**\n\t * Returns serialized image input size with unit.\n\t * Returns `null` if value of size input element in {@link #labeledInput}.is not a number.\n\t */ get sizeWithUnits() {\n        const { parsedSize, unit } = this;\n        if (parsedSize === null) {\n            return null;\n        }\n        return `${parsedSize}${unit}`;\n    }\n}\n\n/**\n * Returns min and max value of resize image in specified unit.\n *\n * @param editor Editor instance.\n * @param targetUnit Unit in which dimension will be returned.\n * @returns Possible resize range in numeric form.\n */ function getSelectedImagePossibleResizeRange(editor, targetUnit) {\n    const imageNodes = getSelectedImageEditorNodes(editor);\n    if (!imageNodes) {\n        return null;\n    }\n    const imageParentWidthPx = calculateResizeHostAncestorWidth(imageNodes.dom);\n    const minimumImageWidth = tryParseDimensionWithUnit(window.getComputedStyle(imageNodes.dom).minWidth) || {\n        value: 1,\n        unit: 'px'\n    };\n    const lower = Math.max(0.1, tryCastDimensionsToUnit(imageParentWidthPx, minimumImageWidth, targetUnit).value);\n    const upper = targetUnit === 'px' ? imageParentWidthPx : 100;\n    return {\n        unit: targetUnit,\n        lower,\n        upper\n    };\n}\n\n/**\n * The custom resize image UI plugin.\n *\n * The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n */ class ImageCustomResizeUI extends Plugin {\n    /**\n\t * The contextual balloon plugin instance.\n\t */ _balloon;\n    /**\n\t * A form containing a textarea and buttons, used to change the `alt` text value.\n\t */ _form;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageCustomResizeUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        // Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n        if (this._form) {\n            this._form.destroy();\n        }\n    }\n    /**\n\t * Creates the {@link module:image/imageresize/ui/imagecustomresizeformview~ImageCustomResizeFormView}\n\t * form.\n\t */ _createForm(unit) {\n        const editor = this.editor;\n        this._balloon = this.editor.plugins.get('ContextualBalloon');\n        this._form = new (CssTransitionDisablerMixin(ImageCustomResizeFormView))(editor.locale, unit, getFormValidators(editor));\n        // Render the form so its #element is available for clickOutsideHandler.\n        this._form.render();\n        this.listenTo(this._form, 'submit', ()=>{\n            if (this._form.isValid()) {\n                editor.execute('resizeImage', {\n                    width: this._form.sizeWithUnits\n                });\n                this._hideForm(true);\n            }\n        });\n        // Update balloon position when form error label is added .\n        this.listenTo(this._form.labeledInput, 'change:errorText', ()=>{\n            editor.ui.update();\n        });\n        this.listenTo(this._form, 'cancel', ()=>{\n            this._hideForm(true);\n        });\n        // Close the form on Esc key press.\n        this._form.keystrokes.set('Esc', (data, cancel)=>{\n            this._hideForm(true);\n            cancel();\n        });\n        // Close on click outside of balloon panel element.\n        clickOutsideHandler({\n            emitter: this._form,\n            activator: ()=>this._isVisible,\n            contextElements: ()=>[\n                    this._balloon.view.element\n                ],\n            callback: ()=>this._hideForm()\n        });\n    }\n    /**\n\t * Shows the {@link #_form} in the {@link #_balloon}.\n\t *\n\t * @internal\n\t */ _showForm(unit) {\n        if (this._isVisible) {\n            return;\n        }\n        if (!this._form) {\n            this._createForm(unit);\n        }\n        const editor = this.editor;\n        const labeledInput = this._form.labeledInput;\n        this._form.disableCssTransitions();\n        this._form.resetFormStatus();\n        if (!this._isInBalloon) {\n            this._balloon.add({\n                view: this._form,\n                position: getBalloonPositionData(editor)\n            });\n        }\n        // Make sure that each time the panel shows up, the field remains in sync with the value of\n        // the command. If the user typed in the input, then canceled the balloon (`labeledInput#value`\n        // stays unaltered) and re-opened it without changing the value of the command, they would see the\n        // old value instead of the actual value of the command.\n        const currentParsedWidth = getSelectedImageWidthInUnits(editor, unit);\n        const initialInputValue = currentParsedWidth ? currentParsedWidth.value.toFixed(1) : '';\n        const possibleRange = getSelectedImagePossibleResizeRange(editor, unit);\n        labeledInput.fieldView.value = labeledInput.fieldView.element.value = initialInputValue;\n        if (possibleRange) {\n            Object.assign(labeledInput.fieldView, {\n                min: possibleRange.lower.toFixed(1),\n                max: Math.ceil(possibleRange.upper).toFixed(1)\n            });\n        }\n        this._form.labeledInput.fieldView.select();\n        this._form.enableCssTransitions();\n    }\n    /**\n\t * Removes the {@link #_form} from the {@link #_balloon}.\n\t *\n\t * @param focusEditable Controls whether the editing view is focused afterwards.\n\t */ _hideForm(focusEditable = false) {\n        if (!this._isInBalloon) {\n            return;\n        }\n        // Blur the input element before removing it from DOM to prevent issues in some browsers.\n        // See https://github.com/ckeditor/ckeditor5/issues/1501.\n        if (this._form.focusTracker.isFocused) {\n            this._form.saveButtonView.focus();\n        }\n        this._balloon.remove(this._form);\n        if (focusEditable) {\n            this.editor.editing.view.focus();\n        }\n    }\n    /**\n\t * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.\n\t */ get _isVisible() {\n        return !!this._balloon && this._balloon.visibleView === this._form;\n    }\n    /**\n\t * Returns `true` when the {@link #_form} is in the {@link #_balloon}.\n\t */ get _isInBalloon() {\n        return !!this._balloon && this._balloon.hasView(this._form);\n    }\n}\n/**\n * Returns image resize form validation callbacks.\n *\n * @param editor Editor instance.\n */ function getFormValidators(editor) {\n    const t = editor.t;\n    return [\n        (form)=>{\n            if (form.rawSize.trim() === '') {\n                return t('The value must not be empty.');\n            }\n            if (form.parsedSize === null) {\n                return t('The value should be a plain number.');\n            }\n        }\n    ];\n}\n\n/**\n * The image resize plugin.\n *\n * It adds a possibility to resize each image using handles.\n */ class ImageResize extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageResizeEditing,\n            ImageResizeHandles,\n            ImageCustomResizeUI,\n            ImageResizeButtons\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageResize';\n    }\n}\n\n/**\n * The image style command. It is used to apply {@link module:image/imageconfig~ImageStyleConfig#options image style option}\n * to a selected image.\n *\n * **Note**: Executing this command may change the image model element if the desired style requires an image of a different\n * type. See {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute} to learn more.\n */ class ImageStyleCommand extends Command {\n    /**\n\t * An object containing names of default style options for the inline and block images.\n\t * If there is no default style option for the given image type in the configuration,\n\t * the name will be `false`.\n\t */ _defaultStyles;\n    /**\n\t * The styles handled by this command.\n\t */ _styles;\n    /**\n\t * Creates an instance of the image style command. When executed, the command applies one of\n\t * {@link module:image/imageconfig~ImageStyleConfig#options style options} to the currently selected image.\n\t *\n\t * @param editor The editor instance.\n\t * @param styles The style options that this command supports.\n\t */ constructor(editor, styles){\n        super(editor);\n        this._defaultStyles = {\n            imageBlock: false,\n            imageInline: false\n        };\n        this._styles = new Map(styles.map((style)=>{\n            if (style.isDefault) {\n                for (const modelElementName of style.modelElements){\n                    this._defaultStyles[modelElementName] = style.name;\n                }\n            }\n            return [\n                style.name,\n                style\n            ];\n        }));\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        const element = imageUtils.getClosestSelectedImageElement(this.editor.model.document.selection);\n        this.isEnabled = !!element;\n        if (!this.isEnabled) {\n            this.value = false;\n        } else if (element.hasAttribute('imageStyle')) {\n            this.value = element.getAttribute('imageStyle');\n        } else {\n            this.value = this._defaultStyles[element.name];\n        }\n    }\n    /**\n\t * Executes the command and applies the style to the currently selected image:\n\t *\n\t * ```ts\n\t * editor.execute( 'imageStyle', { value: 'side' } );\n\t * ```\n\t *\n\t * **Note**: Executing this command may change the image model element if the desired style requires an image\n\t * of a different type. Learn more about {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements model element}\n\t * configuration for the style option.\n\t *\n\t * @param options.value The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).\n\t * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.\n\t * The default is `true`.\n\t * @fires execute\n\t */ execute(options = {}) {\n        const editor = this.editor;\n        const model = editor.model;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        model.change((writer)=>{\n            const requestedStyle = options.value;\n            const { setImageSizes = true } = options;\n            let imageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n            // Change the image type if a style requires it.\n            if (requestedStyle && this.shouldConvertImageType(requestedStyle, imageElement)) {\n                this.editor.execute(imageUtils.isBlockImage(imageElement) ? 'imageTypeInline' : 'imageTypeBlock', {\n                    setImageSizes\n                });\n                // Update the imageElement to the newly created image.\n                imageElement = imageUtils.getClosestSelectedImageElement(model.document.selection);\n            }\n            // Default style means that there is no `imageStyle` attribute in the model.\n            // https://github.com/ckeditor/ckeditor5-image/issues/147\n            if (!requestedStyle || this._styles.get(requestedStyle).isDefault) {\n                writer.removeAttribute('imageStyle', imageElement);\n            } else {\n                writer.setAttribute('imageStyle', requestedStyle, imageElement);\n            }\n            if (setImageSizes) {\n                imageUtils.setImageNaturalSizeAttributes(imageElement);\n            }\n        });\n    }\n    /**\n\t * Returns `true` if requested style change would trigger the image type change.\n\t *\n\t * @param requestedStyle The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).\n\t * @param imageElement The image model element.\n\t */ shouldConvertImageType(requestedStyle, imageElement) {\n        const supportedTypes = this._styles.get(requestedStyle).modelElements;\n        return !supportedTypes.includes(imageElement.name);\n    }\n}\n\n/**\n * Default image style options provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}\n * configuration.\n *\n * There are available 5 styles focused on formatting:\n *\n * * **`'alignLeft'`** aligns the inline or block image to the left and wraps it with the text using the `image-style-align-left` class,\n * * **`'alignRight'`** aligns the inline or block image to the right and wraps it with the text using the `image-style-align-right` class,\n * * **`'alignCenter'`** centers the block image using the `image-style-align-center` class,\n * * **`'alignBlockLeft'`** aligns the block image to the left using the `image-style-block-align-left` class,\n * * **`'alignBlockRight'`** aligns the block image to the right using the `image-style-block-align-right` class,\n *\n * and 3 semantic styles:\n *\n * * **`'inline'`** is an inline image without any CSS class,\n * * **`'block'`** is a block image without any CSS class,\n * * **`'side'`** is a block image styled with the `image-style-side` CSS class.\n */ const DEFAULT_OPTIONS = {\n    // This style represents an image placed in the line of text.\n    get inline () {\n        return {\n            name: 'inline',\n            title: 'In line',\n            icon: icons.objectInline,\n            modelElements: [\n                'imageInline'\n            ],\n            isDefault: true\n        };\n    },\n    // This style represents an image aligned to the left and wrapped with text.\n    get alignLeft () {\n        return {\n            name: 'alignLeft',\n            title: 'Left aligned image',\n            icon: icons.objectLeft,\n            modelElements: [\n                'imageBlock',\n                'imageInline'\n            ],\n            className: 'image-style-align-left'\n        };\n    },\n    // This style represents an image aligned to the left.\n    get alignBlockLeft () {\n        return {\n            name: 'alignBlockLeft',\n            title: 'Left aligned image',\n            icon: icons.objectBlockLeft,\n            modelElements: [\n                'imageBlock'\n            ],\n            className: 'image-style-block-align-left'\n        };\n    },\n    // This style represents a centered image.\n    get alignCenter () {\n        return {\n            name: 'alignCenter',\n            title: 'Centered image',\n            icon: icons.objectCenter,\n            modelElements: [\n                'imageBlock'\n            ],\n            className: 'image-style-align-center'\n        };\n    },\n    // This style represents an image aligned to the right and wrapped with text.\n    get alignRight () {\n        return {\n            name: 'alignRight',\n            title: 'Right aligned image',\n            icon: icons.objectRight,\n            modelElements: [\n                'imageBlock',\n                'imageInline'\n            ],\n            className: 'image-style-align-right'\n        };\n    },\n    // This style represents an image aligned to the right.\n    get alignBlockRight () {\n        return {\n            name: 'alignBlockRight',\n            title: 'Right aligned image',\n            icon: icons.objectBlockRight,\n            modelElements: [\n                'imageBlock'\n            ],\n            className: 'image-style-block-align-right'\n        };\n    },\n    // This option is equal to the situation when no style is applied.\n    get block () {\n        return {\n            name: 'block',\n            title: 'Centered image',\n            icon: icons.objectCenter,\n            modelElements: [\n                'imageBlock'\n            ],\n            isDefault: true\n        };\n    },\n    // This represents a side image.\n    get side () {\n        return {\n            name: 'side',\n            title: 'Side image',\n            icon: icons.objectRight,\n            modelElements: [\n                'imageBlock'\n            ],\n            className: 'image-style-side'\n        };\n    }\n};\n/**\n * Default image style icons provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}\n * configuration.\n *\n * See {@link module:image/imageconfig~ImageStyleOptionDefinition#icon} to learn more.\n *\n * There are 7 default icons available: `'full'`, `'left'`, `'inlineLeft'`, `'center'`, `'right'`, `'inlineRight'`, and `'inline'`.\n */ const DEFAULT_ICONS = /* #__PURE__ */ (()=>({\n        full: icons.objectFullWidth,\n        left: icons.objectBlockLeft,\n        right: icons.objectBlockRight,\n        center: icons.objectCenter,\n        inlineLeft: icons.objectLeft,\n        inlineRight: icons.objectRight,\n        inline: icons.objectInline\n    }))();\n/**\n * Default drop-downs provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#toolbar}\n * configuration. The drop-downs are containers for the {@link module:image/imageconfig~ImageStyleConfig#options image style options}.\n *\n * If both of the `ImageEditing` plugins are loaded, there are 2 predefined drop-downs available:\n *\n * * **`'imageStyle:wrapText'`**, which contains the `alignLeft` and `alignRight` options, that is,\n * those that wraps the text around the image,\n * * **`'imageStyle:breakText'`**, which contains the `alignBlockLeft`, `alignCenter` and `alignBlockRight` options, that is,\n * those that breaks the text around the image.\n */ const DEFAULT_DROPDOWN_DEFINITIONS = [\n    {\n        name: 'imageStyle:wrapText',\n        title: 'Wrap text',\n        defaultItem: 'imageStyle:alignLeft',\n        items: [\n            'imageStyle:alignLeft',\n            'imageStyle:alignRight'\n        ]\n    },\n    {\n        name: 'imageStyle:breakText',\n        title: 'Break text',\n        defaultItem: 'imageStyle:block',\n        items: [\n            'imageStyle:alignBlockLeft',\n            'imageStyle:block',\n            'imageStyle:alignBlockRight'\n        ]\n    }\n];\n/**\n * Returns a list of the normalized and validated image style options.\n *\n * @param config\n * @param config.isInlinePluginLoaded\n * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.\n * @param config.isBlockPluginLoaded\n * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.\n * @param config.configuredStyles\n * The image styles configuration provided in the image styles {@link module:image/imageconfig~ImageConfig#styles configuration}\n * as a default or custom value.\n * @returns\n * * Each of options contains a complete icon markup.\n * * The image style options not supported by any of the loaded plugins are filtered out.\n */ function normalizeStyles(config) {\n    const configuredStyles = config.configuredStyles.options || [];\n    const styles = configuredStyles.map((arrangement)=>normalizeDefinition(arrangement)).filter((arrangement)=>isValidOption(arrangement, config));\n    return styles;\n}\n/**\n * Returns the default image styles configuration depending on the loaded image editing plugins.\n *\n * @param isInlinePluginLoaded\n * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.\n *\n * @param isBlockPluginLoaded\n * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.\n *\n * @returns\n * It returns an object with the lists of the image style options and groups defined as strings related to the\n * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default options}\n */ function getDefaultStylesConfiguration(isBlockPluginLoaded, isInlinePluginLoaded) {\n    if (isBlockPluginLoaded && isInlinePluginLoaded) {\n        return {\n            options: [\n                'inline',\n                'alignLeft',\n                'alignRight',\n                'alignCenter',\n                'alignBlockLeft',\n                'alignBlockRight',\n                'block',\n                'side'\n            ]\n        };\n    } else if (isBlockPluginLoaded) {\n        return {\n            options: [\n                'block',\n                'side'\n            ]\n        };\n    } else if (isInlinePluginLoaded) {\n        return {\n            options: [\n                'inline',\n                'alignLeft',\n                'alignRight'\n            ]\n        };\n    }\n    return {};\n}\n/**\n * Returns a list of the available predefined drop-downs' definitions depending on the loaded image editing plugins.\n */ function getDefaultDropdownDefinitions(pluginCollection) {\n    if (pluginCollection.has('ImageBlockEditing') && pluginCollection.has('ImageInlineEditing')) {\n        return [\n            ...DEFAULT_DROPDOWN_DEFINITIONS\n        ];\n    } else {\n        return [];\n    }\n}\n/**\n * Normalizes an image style option or group provided in the {@link module:image/imageconfig~ImageConfig#styles}\n * and returns it in a {@link module:image/imageconfig~ImageStyleOptionDefinition}/\n */ function normalizeDefinition(definition) {\n    if (typeof definition === 'string') {\n        // Just the name of the style has been passed, but none of the defaults.\n        if (!DEFAULT_OPTIONS[definition]) {\n            // Normalize the style anyway to prevent errors.\n            definition = {\n                name: definition\n            };\n        } else {\n            definition = {\n                ...DEFAULT_OPTIONS[definition]\n            };\n        }\n    } else {\n        // If an object style has been passed and if the name matches one of the defaults,\n        // extend it with defaults – the user wants to customize a default style.\n        // Note: Don't override the user–defined style object, clone it instead.\n        definition = extendStyle(DEFAULT_OPTIONS[definition.name], definition);\n    }\n    // If an icon is defined as a string and correspond with a name\n    // in default icons, use the default icon provided by the plugin.\n    if (typeof definition.icon === 'string') {\n        definition.icon = DEFAULT_ICONS[definition.icon] || definition.icon;\n    }\n    return definition;\n}\n/**\n * Checks if the image style option is valid:\n * * if it has the modelElements fields defined and filled,\n * * if the defined modelElements are supported by any of the loaded image editing plugins.\n * It also displays a console warning these conditions are not met.\n *\n * @param option image style option\n */ function isValidOption(option, { isBlockPluginLoaded, isInlinePluginLoaded }) {\n    const { modelElements, name } = option;\n    if (!modelElements || !modelElements.length || !name) {\n        warnInvalidStyle({\n            style: option\n        });\n        return false;\n    } else {\n        const supportedElements = [\n            isBlockPluginLoaded ? 'imageBlock' : null,\n            isInlinePluginLoaded ? 'imageInline' : null\n        ];\n        // Check if the option is supported by any of the loaded plugins.\n        if (!modelElements.some((elementName)=>supportedElements.includes(elementName))) {\n            /**\n\t\t\t * In order to work correctly, each image style {@link module:image/imageconfig~ImageStyleOptionDefinition option}\n\t\t\t * requires specific model elements (also: types of images) to be supported by the editor.\n\t\t\t *\n\t\t\t * Model element names to which the image style option can be applied are defined in the\n\t\t\t * {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements} property of the style option\n\t\t\t * definition.\n\t\t\t *\n\t\t\t * Explore the warning in the console to find out precisely which option is not supported and which editor plugins\n\t\t\t * are missing. Make sure these plugins are loaded in your editor to get this image style option working.\n\t\t\t *\n\t\t\t * @error image-style-missing-dependency\n\t\t\t * @param {String} [option] The name of the unsupported option.\n\t\t\t * @param {String} [missingPlugins] The names of the plugins one of which has to be loaded for the particular option.\n\t\t\t */ logWarning('image-style-missing-dependency', {\n                style: option,\n                missingPlugins: modelElements.map((name)=>name === 'imageBlock' ? 'ImageBlockEditing' : 'ImageInlineEditing')\n            });\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Extends the default style with a style provided by the developer.\n * Note: Don't override the custom–defined style object, clone it instead.\n */ function extendStyle(source, style) {\n    const extendedStyle = {\n        ...style\n    };\n    for(const prop in source){\n        if (!Object.prototype.hasOwnProperty.call(style, prop)) {\n            extendedStyle[prop] = source[prop];\n        }\n    }\n    return extendedStyle;\n}\n/**\n * Displays a console warning with the 'image-style-configuration-definition-invalid' error.\n */ function warnInvalidStyle(info) {\n    /**\n\t * The image style definition provided in the configuration is invalid.\n\t *\n\t * Please make sure the definition implements properly one of the following:\n\t *\n\t * * {@link module:image/imageconfig~ImageStyleOptionDefinition image style option definition},\n\t * * {@link module:image/imageconfig~ImageStyleDropdownDefinition image style dropdown definition}\n\t *\n\t * @error image-style-configuration-definition-invalid\n\t * @param {String} [dropdown] The name of the invalid drop-down\n\t * @param {String} [style] The name of the invalid image style option\n\t */ logWarning('image-style-configuration-definition-invalid', info);\n}\nvar utils = {\n    normalizeStyles,\n    getDefaultStylesConfiguration,\n    getDefaultDropdownDefinitions,\n    warnInvalidStyle,\n    DEFAULT_OPTIONS,\n    DEFAULT_ICONS,\n    DEFAULT_DROPDOWN_DEFINITIONS\n};\n\n/**\n * @module image/imagestyle/converters\n */ /**\n * Returns a converter for the `imageStyle` attribute. It can be used for adding, changing and removing the attribute.\n *\n * @param styles An array containing available image style options.\n * @returns A model-to-view attribute converter.\n */ function modelToViewStyleAttribute(styles) {\n    return (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        // Check if there is class name associated with given value.\n        const newStyle = getStyleDefinitionByName(data.attributeNewValue, styles);\n        const oldStyle = getStyleDefinitionByName(data.attributeOldValue, styles);\n        const viewElement = conversionApi.mapper.toViewElement(data.item);\n        const viewWriter = conversionApi.writer;\n        if (oldStyle) {\n            viewWriter.removeClass(oldStyle.className, viewElement);\n        }\n        if (newStyle) {\n            viewWriter.addClass(newStyle.className, viewElement);\n        }\n    };\n}\n/**\n * Returns a view-to-model converter converting image CSS classes to a proper value in the model.\n *\n * @param styles Image style options for which the converter is created.\n * @returns A view-to-model converter.\n */ function viewToModelStyleAttribute(styles) {\n    // Convert only non–default styles.\n    const nonDefaultStyles = {\n        imageInline: styles.filter((style)=>!style.isDefault && style.modelElements.includes('imageInline')),\n        imageBlock: styles.filter((style)=>!style.isDefault && style.modelElements.includes('imageBlock'))\n    };\n    return (evt, data, conversionApi)=>{\n        if (!data.modelRange) {\n            return;\n        }\n        const viewElement = data.viewItem;\n        const modelImageElement = first(data.modelRange.getItems());\n        // Run this converter only if an image has been found in the model.\n        // In some cases it may not be found (for example if we run this on a figure with different type than image).\n        if (!modelImageElement) {\n            return;\n        }\n        // ...and the `imageStyle` attribute is allowed for that element, otherwise stop conversion early.\n        if (!conversionApi.schema.checkAttribute(modelImageElement, 'imageStyle')) {\n            return;\n        }\n        // Convert styles one by one.\n        for (const style of nonDefaultStyles[modelImageElement.name]){\n            // Try to consume class corresponding with the style.\n            if (conversionApi.consumable.consume(viewElement, {\n                classes: style.className\n            })) {\n                // And convert this style to model attribute.\n                conversionApi.writer.setAttribute('imageStyle', style.name, modelImageElement);\n            }\n        }\n    };\n}\n/**\n * Returns the style with a given `name` from an array of styles.\n */ function getStyleDefinitionByName(name, styles) {\n    for (const style of styles){\n        if (style.name === name) {\n            return style;\n        }\n    }\n}\n\n/**\n * The image style engine plugin. It sets the default configuration, creates converters and registers\n * {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}.\n */ class ImageStyleEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageStyleEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageUtils\n        ];\n    }\n    /**\n\t * It contains a list of the normalized and validated style options.\n\t *\n\t * * Each option contains a complete icon markup.\n\t * * The style options not supported by any of the loaded image editing plugins (\n\t * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} or\n\t * {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`}) are filtered out.\n\t *\n\t * @internal\n\t * @readonly\n\t */ normalizedStyles;\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const { normalizeStyles, getDefaultStylesConfiguration } = utils;\n        const editor = this.editor;\n        const isBlockPluginLoaded = editor.plugins.has('ImageBlockEditing');\n        const isInlinePluginLoaded = editor.plugins.has('ImageInlineEditing');\n        editor.config.define('image.styles', getDefaultStylesConfiguration(isBlockPluginLoaded, isInlinePluginLoaded));\n        this.normalizedStyles = normalizeStyles({\n            configuredStyles: editor.config.get('image.styles'),\n            isBlockPluginLoaded,\n            isInlinePluginLoaded\n        });\n        this._setupConversion(isBlockPluginLoaded, isInlinePluginLoaded);\n        this._setupPostFixer();\n        // Register imageStyle command.\n        editor.commands.add('imageStyle', new ImageStyleCommand(editor, this.normalizedStyles));\n    }\n    /**\n\t * Sets the editor conversion taking the presence of\n\t * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`}\n\t * and {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugins into consideration.\n\t */ _setupConversion(isBlockPluginLoaded, isInlinePluginLoaded) {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const modelToViewConverter = modelToViewStyleAttribute(this.normalizedStyles);\n        const viewToModelConverter = viewToModelStyleAttribute(this.normalizedStyles);\n        editor.editing.downcastDispatcher.on('attribute:imageStyle', modelToViewConverter);\n        editor.data.downcastDispatcher.on('attribute:imageStyle', modelToViewConverter);\n        // Allow imageStyle attribute in image and imageInline.\n        // We could call it 'style' but https://github.com/ckeditor/ckeditor5-engine/issues/559.\n        if (isBlockPluginLoaded) {\n            schema.extend('imageBlock', {\n                allowAttributes: 'imageStyle'\n            });\n            // Converter for figure element from view to model.\n            editor.data.upcastDispatcher.on('element:figure', viewToModelConverter, {\n                priority: 'low'\n            });\n        }\n        if (isInlinePluginLoaded) {\n            schema.extend('imageInline', {\n                allowAttributes: 'imageStyle'\n            });\n            // Converter for the img element from view to model.\n            editor.data.upcastDispatcher.on('element:img', viewToModelConverter, {\n                priority: 'low'\n            });\n        }\n    }\n    /**\n\t * Registers a post-fixer that will make sure that the style attribute value is correct for a specific image type (block vs inline).\n\t */ _setupPostFixer() {\n        const editor = this.editor;\n        const document = editor.model.document;\n        const imageUtils = editor.plugins.get(ImageUtils);\n        const stylesMap = new Map(this.normalizedStyles.map((style)=>[\n                style.name,\n                style\n            ]));\n        // Make sure that style attribute is valid for the image type.\n        document.registerPostFixer((writer)=>{\n            let changed = false;\n            for (const change of document.differ.getChanges()){\n                if (change.type == 'insert' || change.type == 'attribute' && change.attributeKey == 'imageStyle') {\n                    let element = change.type == 'insert' ? change.position.nodeAfter : change.range.start.nodeAfter;\n                    if (element && element.is('element', 'paragraph') && element.childCount > 0) {\n                        element = element.getChild(0);\n                    }\n                    if (!imageUtils.isImage(element)) {\n                        continue;\n                    }\n                    const imageStyle = element.getAttribute('imageStyle');\n                    if (!imageStyle) {\n                        continue;\n                    }\n                    const imageStyleDefinition = stylesMap.get(imageStyle);\n                    if (!imageStyleDefinition || !imageStyleDefinition.modelElements.includes(element.name)) {\n                        writer.removeAttribute('imageStyle', element);\n                        changed = true;\n                    }\n                }\n            }\n            return changed;\n        });\n    }\n}\n\n/**\n * The image style UI plugin.\n *\n * It registers buttons corresponding to the {@link module:image/imageconfig~ImageConfig#styles} configuration.\n * It also registers the {@link module:image/imagestyle/utils#DEFAULT_DROPDOWN_DEFINITIONS default drop-downs} and the\n * custom drop-downs defined by the developer in the {@link module:image/imageconfig~ImageConfig#toolbar} configuration.\n */ class ImageStyleUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageStyleEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageStyleUI';\n    }\n    /**\n\t * Returns the default localized style titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS} are available:\n\t *\n\t * * `'Wrap text'`,\n\t * * `'Break text'`,\n\t * * `'In line'`,\n\t * * `'Full size image'`,\n\t * * `'Side image'`,\n\t * * `'Left aligned image'`,\n\t * * `'Centered image'`,\n\t * * `'Right aligned image'`\n\t */ get localizedDefaultStylesTitles() {\n        const t = this.editor.t;\n        return {\n            'Wrap text': t('Wrap text'),\n            'Break text': t('Break text'),\n            'In line': t('In line'),\n            'Full size image': t('Full size image'),\n            'Side image': t('Side image'),\n            'Left aligned image': t('Left aligned image'),\n            'Centered image': t('Centered image'),\n            'Right aligned image': t('Right aligned image')\n        };\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const plugins = this.editor.plugins;\n        const toolbarConfig = this.editor.config.get('image.toolbar') || [];\n        const imageStyleEditing = plugins.get('ImageStyleEditing');\n        const definedStyles = translateStyles(imageStyleEditing.normalizedStyles, this.localizedDefaultStylesTitles);\n        for (const styleConfig of definedStyles){\n            this._createButton(styleConfig);\n        }\n        const definedDropdowns = translateStyles([\n            ...toolbarConfig.filter(isObject),\n            ...utils.getDefaultDropdownDefinitions(plugins)\n        ], this.localizedDefaultStylesTitles);\n        for (const dropdownConfig of definedDropdowns){\n            this._createDropdown(dropdownConfig, definedStyles);\n        }\n    }\n    /**\n\t * Creates a dropdown and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.\n\t */ _createDropdown(dropdownConfig, definedStyles) {\n        const factory = this.editor.ui.componentFactory;\n        factory.add(dropdownConfig.name, (locale)=>{\n            let defaultButton;\n            const { defaultItem, items, title } = dropdownConfig;\n            const buttonViews = items.filter((itemName)=>definedStyles.find(({ name })=>getUIComponentName(name) === itemName)).map((buttonName)=>{\n                const button = factory.create(buttonName);\n                if (buttonName === defaultItem) {\n                    defaultButton = button;\n                }\n                return button;\n            });\n            if (items.length !== buttonViews.length) {\n                utils.warnInvalidStyle({\n                    dropdown: dropdownConfig\n                });\n            }\n            const dropdownView = createDropdown(locale, SplitButtonView);\n            const splitButtonView = dropdownView.buttonView;\n            const splitButtonViewArrow = splitButtonView.arrowView;\n            addToolbarToDropdown(dropdownView, buttonViews, {\n                enableActiveItemFocusOnDropdownOpen: true\n            });\n            splitButtonView.set({\n                label: getDropdownButtonTitle(title, defaultButton.label),\n                class: null,\n                tooltip: true\n            });\n            splitButtonViewArrow.unbind('label');\n            splitButtonViewArrow.set({\n                label: title\n            });\n            splitButtonView.bind('icon').toMany(buttonViews, 'isOn', (...areOn)=>{\n                const index = areOn.findIndex(identity);\n                return index < 0 ? defaultButton.icon : buttonViews[index].icon;\n            });\n            splitButtonView.bind('label').toMany(buttonViews, 'isOn', (...areOn)=>{\n                const index = areOn.findIndex(identity);\n                return getDropdownButtonTitle(title, index < 0 ? defaultButton.label : buttonViews[index].label);\n            });\n            splitButtonView.bind('isOn').toMany(buttonViews, 'isOn', (...areOn)=>areOn.some(identity));\n            splitButtonView.bind('class').toMany(buttonViews, 'isOn', (...areOn)=>areOn.some(identity) ? 'ck-splitbutton_flatten' : undefined);\n            splitButtonView.on('execute', ()=>{\n                if (!buttonViews.some(({ isOn })=>isOn)) {\n                    defaultButton.fire('execute');\n                } else {\n                    dropdownView.isOpen = !dropdownView.isOpen;\n                }\n            });\n            dropdownView.bind('isEnabled').toMany(buttonViews, 'isEnabled', (...areEnabled)=>areEnabled.some(identity));\n            // Focus the editable after executing the command.\n            // Overrides a default behaviour where the focus is moved to the dropdown button (#12125).\n            this.listenTo(dropdownView, 'execute', ()=>{\n                this.editor.editing.view.focus();\n            });\n            return dropdownView;\n        });\n    }\n    /**\n\t * Creates a button and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.\n\t */ _createButton(buttonConfig) {\n        const buttonName = buttonConfig.name;\n        this.editor.ui.componentFactory.add(getUIComponentName(buttonName), (locale)=>{\n            const command = this.editor.commands.get('imageStyle');\n            const view = new ButtonView(locale);\n            view.set({\n                label: buttonConfig.title,\n                icon: buttonConfig.icon,\n                tooltip: true,\n                isToggleable: true\n            });\n            view.bind('isEnabled').to(command, 'isEnabled');\n            view.bind('isOn').to(command, 'value', (value)=>value === buttonName);\n            view.on('execute', this._executeCommand.bind(this, buttonName));\n            return view;\n        });\n    }\n    _executeCommand(name) {\n        this.editor.execute('imageStyle', {\n            value: name\n        });\n        this.editor.editing.view.focus();\n    }\n}\n/**\n * Returns the translated `title` from the passed styles array.\n */ function translateStyles(styles, titles) {\n    for (const style of styles){\n        // Localize the titles of the styles, if a title corresponds with\n        // a localized default provided by the plugin.\n        if (titles[style.title]) {\n            style.title = titles[style.title];\n        }\n    }\n    return styles;\n}\n/**\n * Returns the image style component name with the \"imageStyle:\" prefix.\n */ function getUIComponentName(name) {\n    return `imageStyle:${name}`;\n}\n/**\n * Returns title for the splitbutton containing the dropdown title and default action item title.\n */ function getDropdownButtonTitle(dropdownTitle, buttonTitle) {\n    return (dropdownTitle ? dropdownTitle + ': ' : '') + buttonTitle;\n}\n\n/**\n * The image style plugin.\n *\n * For a detailed overview of the image styles feature, check the {@glink features/images/images-styles documentation}.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n * * {@link module:image/imagestyle/imagestyleediting~ImageStyleEditing},\n * * {@link module:image/imagestyle/imagestyleui~ImageStyleUI}\n *\n * It provides a default configuration, which can be extended or overwritten.\n * Read more about the {@link module:image/imageconfig~ImageConfig#styles image styles configuration}.\n */ class ImageStyle extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageStyleEditing,\n            ImageStyleUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageStyle';\n    }\n}\n\n/**\n * The image toolbar plugin. It creates and manages the image toolbar (the toolbar displayed when an image is selected).\n *\n * For an overview, check the {@glink features/images/images-overview#image-contextual-toolbar image contextual toolbar} documentation.\n *\n * Instances of toolbar components (e.g. buttons) are created using the editor's\n * {@link module:ui/componentfactory~ComponentFactory component factory}\n * based on the {@link module:image/imageconfig~ImageConfig#toolbar `image.toolbar` configuration option}.\n *\n * The toolbar uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.\n */ class ImageToolbar extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            WidgetToolbarRepository,\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ImageToolbar';\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const editor = this.editor;\n        const t = editor.t;\n        const widgetToolbarRepository = editor.plugins.get(WidgetToolbarRepository);\n        const imageUtils = editor.plugins.get('ImageUtils');\n        widgetToolbarRepository.register('image', {\n            ariaLabel: t('Image toolbar'),\n            items: normalizeDeclarativeConfig(editor.config.get('image.toolbar') || []),\n            getRelatedElement: (selection)=>imageUtils.getClosestSelectedImageWidget(selection)\n        });\n    }\n}\n/**\n * Convert the dropdown definitions to their keys registered in the ComponentFactory.\n * The registration precess should be handled by the plugin which handles the UI of a particular feature.\n */ function normalizeDeclarativeConfig(config) {\n    return config.map((item)=>isObject(item) ? item.name : item);\n}\n\n/**\n * This plugin enables the [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture) element support in the editor.\n *\n * * It enables the `sources` model attribute on `imageBlock` and `imageInline` model elements\n * (brought by {@link module:image/imageblock~ImageBlock} and {@link module:image/imageinline~ImageInline}, respectively).\n * * It translates the `sources` model element to the view (also: data) structure that may look as follows:\n *\n * ```html\n * <p>Inline image using picture:\n * \t<picture>\n * \t\t<source media=\"(min-width: 800px)\" srcset=\"image-large.webp\" type=\"image/webp\">\n * \t\t<source media=\"(max-width: 800px)\" srcset=\"image-small.webp\" type=\"image/webp\">\n * \t\t<!-- Other sources as specified in the \"sources\" model attribute... -->\n * \t\t<img src=\"image.png\" alt=\"An image using picture\" />\n * \t</picture>\n * </p>\n *\n * <p>Block image using picture:</p>\n * <figure class=\"image\">\n * \t<picture>\n * \t\t<source media=\"(min-width: 800px)\" srcset=\"image-large.webp\" type=\"image/webp\">\n * \t\t<source media=\"(max-width: 800px)\" srcset=\"image-small.webp\" type=\"image/webp\">\n * \t\t<!-- Other sources as specified in the \"sources\" model attribute... -->\n * \t\t<img src=\"image.png\" alt=\"An image using picture\" />\n * \t</picture>\n * \t<figcaption>Caption of the image</figcaption>\n * </figure>\n * ```\n *\n * **Note:** The value of the `sources` {@glink framework/architecture/editing-engine#changing-the-model model attribute}\n * in both examples equals:\n *\n * ```css\n * [\n * \t{\n * \t\tmedia: '(min-width: 800px)',\n * \t\tsrcset: 'image-large.webp',\n * \t\ttype: 'image/webp'\n * \t},\n * \t{\n * \t\tmedia: '(max-width: 800px)',\n * \t\tsrcset: 'image-small.webp',\n * \t\ttype: 'image/webp'\n * \t}\n * ]\n * ```\n *\n * * It integrates with the {@link module:image/imageupload~ImageUpload} plugin so images uploaded in the editor\n * automatically render using `<picture>` if the {@glink features/images/image-upload/image-upload upload adapter}\n * supports image sources and provides neccessary data.\n *\n * @private\n */ class PictureEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ImageEditing,\n            ImageUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'PictureEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const editor = this.editor;\n        if (editor.plugins.has('ImageBlockEditing')) {\n            editor.model.schema.extend('imageBlock', {\n                allowAttributes: [\n                    'sources'\n                ]\n            });\n        }\n        if (editor.plugins.has('ImageInlineEditing')) {\n            editor.model.schema.extend('imageInline', {\n                allowAttributes: [\n                    'sources'\n                ]\n            });\n        }\n        this._setupConversion();\n        this._setupImageUploadEditingIntegration();\n    }\n    /**\n\t * Configures conversion pipelines to support upcasting and downcasting images using the `<picture>` view element\n\t * and the model `sources` attribute.\n\t */ _setupConversion() {\n        const editor = this.editor;\n        const conversion = editor.conversion;\n        const imageUtils = editor.plugins.get('ImageUtils');\n        conversion.for('upcast').add(upcastPicture(imageUtils));\n        conversion.for('downcast').add(downcastSourcesAttribute(imageUtils));\n    }\n    /**\n\t * Makes it possible for uploaded images to get the `sources` model attribute and the `<picture>...</picture>`\n\t * view structure out-of-the-box if relevant data is provided along the\n\t * {@link module:image/imageupload/imageuploadediting~ImageUploadEditing#event:uploadComplete} event.\n\t */ _setupImageUploadEditingIntegration() {\n        const editor = this.editor;\n        if (!editor.plugins.has('ImageUploadEditing')) {\n            return;\n        }\n        const imageUploadEditing = editor.plugins.get('ImageUploadEditing');\n        this.listenTo(imageUploadEditing, 'uploadComplete', (evt, { imageElement, data })=>{\n            const sources = data.sources;\n            if (!sources) {\n                return;\n            }\n            editor.model.change((writer)=>{\n                writer.setAttributes({\n                    sources\n                }, imageElement);\n            });\n        });\n    }\n}\n\nexport { AutoImage, Image, ImageBlock, ImageBlockEditing, ImageCaption, ImageCaptionEditing, ImageCaptionUI, ImageCaptionUtils, ImageCustomResizeUI, ImageEditing, ImageInline, ImageInsert, ImageInsertUI, ImageInsertViaUrl, ImageResize, ImageResizeButtons, ImageResizeEditing, ImageResizeHandles, ImageSizeAttributes, ImageStyle, ImageStyleEditing, ImageStyleUI, ImageTextAlternative, ImageTextAlternativeEditing, ImageTextAlternativeUI, ImageToolbar, ImageUpload, ImageUploadEditing, ImageUploadProgress, ImageUploadUI, ImageUtils, PictureEditing };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin, MultiCommand, icons, Command } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { addMarginRules } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\n/**\n * The indent editing feature.\n *\n * This plugin registers the `'indent'` and `'outdent'` commands.\n *\n * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in the\n * {@link module:indent/indent~Indent indent feature} API documentation.\n */ class IndentEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'IndentEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        editor.commands.add('indent', new MultiCommand(editor));\n        editor.commands.add('outdent', new MultiCommand(editor));\n    }\n}\n\n/**\n * The indent UI feature.\n *\n * This plugin registers the `'indent'` and `'outdent'` buttons.\n *\n * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in\n * the {@link module:indent/indent~Indent indent feature} API documentation.\n */ class IndentUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'IndentUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const t = editor.t;\n        const localizedIndentIcon = locale.uiLanguageDirection == 'ltr' ? icons.indent : icons.outdent;\n        const localizedOutdentIcon = locale.uiLanguageDirection == 'ltr' ? icons.outdent : icons.indent;\n        this._defineButton('indent', t('Increase indent'), localizedIndentIcon);\n        this._defineButton('outdent', t('Decrease indent'), localizedOutdentIcon);\n    }\n    /**\n\t * Defines UI buttons for both toolbar and menu bar.\n\t */ _defineButton(commandName, label, icon) {\n        const editor = this.editor;\n        editor.ui.componentFactory.add(commandName, ()=>{\n            const buttonView = this._createButton(ButtonView, commandName, label, icon);\n            buttonView.set({\n                tooltip: true\n            });\n            return buttonView;\n        });\n        editor.ui.componentFactory.add('menuBar:' + commandName, ()=>{\n            return this._createButton(MenuBarMenuListItemButtonView, commandName, label, icon);\n        });\n    }\n    /**\n\t * Creates a button to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass, commandName, label, icon) {\n        const editor = this.editor;\n        const command = editor.commands.get(commandName);\n        const view = new ButtonClass(editor.locale);\n        view.set({\n            label,\n            icon\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        // Execute the command.\n        this.listenTo(view, 'execute', ()=>{\n            editor.execute(commandName);\n            editor.editing.view.focus();\n        });\n        return view;\n    }\n}\n\n/**\n * The indent feature.\n *\n * This plugin acts as a single entry point plugin for other features that implement indentation of elements like lists or paragraphs.\n *\n * The compatible features are:\n *\n * * The {@link module:list/list~List} or {@link module:list/list/listediting~ListEditing} feature for list indentation.\n * * The {@link module:indent/indentblock~IndentBlock} feature for block indentation.\n *\n * This is a \"glue\" plugin that loads the following plugins:\n *\n * * The {@link module:indent/indentediting~IndentEditing indent editing feature}.\n * * The {@link module:indent/indentui~IndentUI indent UI feature}.\n *\n * The dependent plugins register the `'indent'` and `'outdent'` commands and introduce the `'indent'` and `'outdent'` buttons\n * that allow to increase or decrease text indentation of supported elements.\n *\n * **Note**: In order for the commands and buttons to work, at least one of compatible features is required.\n */ class Indent extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Indent';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            IndentEditing,\n            IndentUI\n        ];\n    }\n}\n\n/**\n * The indent block command.\n *\n * The command is registered by the {@link module:indent/indentblock~IndentBlock} as `'indentBlock'` for indenting blocks and\n * `'outdentBlock'` for outdenting blocks.\n *\n * To increase block indentation at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'indentBlock' );\n * ```\n *\n * To decrease block indentation at the current selection, execute the command:\n *\n * ```ts\n * editor.execute( 'outdentBlock' );\n * ```\n */ class IndentBlockCommand extends Command {\n    /**\n\t * The command's indentation behavior.\n\t */ _indentBehavior;\n    /**\n\t * Creates an instance of the command.\n\t */ constructor(editor, indentBehavior){\n        super(editor);\n        this._indentBehavior = indentBehavior;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const model = editor.model;\n        const block = first(model.document.selection.getSelectedBlocks());\n        if (!block || !this._isIndentationChangeAllowed(block)) {\n            this.isEnabled = false;\n            return;\n        }\n        this.isEnabled = this._indentBehavior.checkEnabled(block.getAttribute('blockIndent'));\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const model = this.editor.model;\n        const blocksToChange = this._getBlocksToChange();\n        model.change((writer)=>{\n            for (const block of blocksToChange){\n                const currentIndent = block.getAttribute('blockIndent');\n                const nextIndent = this._indentBehavior.getNextIndent(currentIndent);\n                if (nextIndent) {\n                    writer.setAttribute('blockIndent', nextIndent, block);\n                } else {\n                    writer.removeAttribute('blockIndent', block);\n                }\n            }\n        });\n    }\n    /**\n\t * Returns blocks from selection that should have blockIndent selection set.\n\t */ _getBlocksToChange() {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const blocksInSelection = Array.from(selection.getSelectedBlocks());\n        return blocksInSelection.filter((block)=>this._isIndentationChangeAllowed(block));\n    }\n    /**\n\t * Returns false if indentation cannot be applied, i.e.:\n\t * - for blocks disallowed by schema declaration\n\t * - for blocks in Document Lists (disallowed forward indentation only). See https://github.com/ckeditor/ckeditor5/issues/14155.\n\t * Otherwise returns true.\n\t */ _isIndentationChangeAllowed(element) {\n        const editor = this.editor;\n        if (!editor.model.schema.checkAttribute(element, 'blockIndent')) {\n            return false;\n        }\n        if (!editor.plugins.has('ListUtils')) {\n            return true;\n        }\n        // Only forward indentation is disallowed in list items. This allows the user to outdent blocks that are already indented.\n        if (!this._indentBehavior.isForward) {\n            return true;\n        }\n        const documentListUtils = editor.plugins.get('ListUtils');\n        return !documentListUtils.isListItemBlock(element);\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module indent/indentcommandbehavior/indentusingoffset\n */ /**\n * The block indentation behavior that uses offsets to set indentation.\n */ class IndentUsingOffset {\n    /**\n\t * The direction of indentation.\n\t */ isForward;\n    /**\n\t * The offset of the next indentation step.\n\t */ offset;\n    /**\n\t * Indentation unit.\n\t */ unit;\n    /**\n\t * Creates an instance of the indentation behavior.\n\t *\n\t * @param config.direction The direction of indentation.\n\t * @param config.offset The offset of the next indentation step.\n\t * @param config.unit Indentation unit.\n\t */ constructor(config){\n        this.isForward = config.direction === 'forward';\n        this.offset = config.offset;\n        this.unit = config.unit;\n    }\n    /**\n\t * @inheritDoc\n\t */ checkEnabled(indentAttributeValue) {\n        const currentOffset = parseFloat(indentAttributeValue || '0');\n        // The command is always enabled for forward indentation.\n        return this.isForward || currentOffset > 0;\n    }\n    /**\n\t * @inheritDoc\n\t */ getNextIndent(indentAttributeValue) {\n        const currentOffset = parseFloat(indentAttributeValue || '0');\n        const isSameUnit = !indentAttributeValue || indentAttributeValue.endsWith(this.unit);\n        if (!isSameUnit) {\n            return this.isForward ? this.offset + this.unit : undefined;\n        }\n        const nextOffset = this.isForward ? this.offset : -this.offset;\n        const offsetToSet = currentOffset + nextOffset;\n        return offsetToSet > 0 ? offsetToSet + this.unit : undefined;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module indent/indentcommandbehavior/indentusingclasses\n */ /**\n * The block indentation behavior that uses classes to set indentation.\n */ class IndentUsingClasses {\n    /**\n\t * The direction of indentation.\n\t */ isForward;\n    /**\n\t * A list of classes used for indentation.\n\t */ classes;\n    /**\n\t * Creates an instance of the indentation behavior.\n\t *\n\t * @param config.direction The direction of indentation.\n\t * @param config.classes A list of classes used for indentation.\n\t */ constructor(config){\n        this.isForward = config.direction === 'forward';\n        this.classes = config.classes;\n    }\n    /**\n\t * @inheritDoc\n\t */ checkEnabled(indentAttributeValue) {\n        const currentIndex = this.classes.indexOf(indentAttributeValue);\n        if (this.isForward) {\n            return currentIndex < this.classes.length - 1;\n        } else {\n            return currentIndex >= 0;\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ getNextIndent(indentAttributeValue) {\n        const currentIndex = this.classes.indexOf(indentAttributeValue);\n        const indexStep = this.isForward ? 1 : -1;\n        return this.classes[currentIndex + indexStep];\n    }\n}\n\nconst DEFAULT_ELEMENTS = [\n    'paragraph',\n    'heading1',\n    'heading2',\n    'heading3',\n    'heading4',\n    'heading5',\n    'heading6'\n];\n/**\n * The block indentation feature.\n *\n * It registers the `'indentBlock'` and `'outdentBlock'` commands.\n *\n * If the plugin {@link module:indent/indent~Indent} is defined, it also attaches the `'indentBlock'` and `'outdentBlock'` commands to\n * the `'indent'` and `'outdent'` commands.\n */ class IndentBlock extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('indentBlock', {\n            offset: 40,\n            unit: 'px'\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'IndentBlock';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const configuration = editor.config.get('indentBlock');\n        if (configuration.classes && configuration.classes.length) {\n            this._setupConversionUsingClasses(configuration.classes);\n            editor.commands.add('indentBlock', new IndentBlockCommand(editor, new IndentUsingClasses({\n                direction: 'forward',\n                classes: configuration.classes\n            })));\n            editor.commands.add('outdentBlock', new IndentBlockCommand(editor, new IndentUsingClasses({\n                direction: 'backward',\n                classes: configuration.classes\n            })));\n        } else {\n            editor.data.addStyleProcessorRules(addMarginRules);\n            this._setupConversionUsingOffset();\n            editor.commands.add('indentBlock', new IndentBlockCommand(editor, new IndentUsingOffset({\n                direction: 'forward',\n                offset: configuration.offset,\n                unit: configuration.unit\n            })));\n            editor.commands.add('outdentBlock', new IndentBlockCommand(editor, new IndentUsingOffset({\n                direction: 'backward',\n                offset: configuration.offset,\n                unit: configuration.unit\n            })));\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const indentCommand = editor.commands.get('indent');\n        const outdentCommand = editor.commands.get('outdent');\n        // Enable block indentation to heading configuration options. If it is not defined enable in paragraph and default headings.\n        const options = editor.config.get('heading.options');\n        const configuredElements = options && options.map((option)=>option.model);\n        const knownElements = configuredElements || DEFAULT_ELEMENTS;\n        knownElements.forEach((elementName)=>{\n            if (schema.isRegistered(elementName)) {\n                schema.extend(elementName, {\n                    allowAttributes: 'blockIndent'\n                });\n            }\n        });\n        schema.setAttributeProperties('blockIndent', {\n            isFormatting: true\n        });\n        indentCommand.registerChildCommand(editor.commands.get('indentBlock'));\n        outdentCommand.registerChildCommand(editor.commands.get('outdentBlock'));\n    }\n    /**\n\t * Setups conversion for using offset indents.\n\t */ _setupConversionUsingOffset() {\n        const conversion = this.editor.conversion;\n        const locale = this.editor.locale;\n        const marginProperty = locale.contentLanguageDirection === 'rtl' ? 'margin-right' : 'margin-left';\n        conversion.for('upcast').attributeToAttribute({\n            view: {\n                styles: {\n                    [marginProperty]: /[\\s\\S]+/\n                }\n            },\n            model: {\n                key: 'blockIndent',\n                value: (viewElement)=>{\n                    // Do not indent block elements in Document Lists. See https://github.com/ckeditor/ckeditor5/issues/12466.\n                    if (!viewElement.is('element', 'li')) {\n                        return viewElement.getStyle(marginProperty);\n                    }\n                }\n            }\n        });\n        conversion.for('downcast').attributeToAttribute({\n            model: 'blockIndent',\n            view: (modelAttributeValue)=>{\n                return {\n                    key: 'style',\n                    value: {\n                        [marginProperty]: modelAttributeValue\n                    }\n                };\n            }\n        });\n    }\n    /**\n\t * Setups conversion for using classes.\n\t */ _setupConversionUsingClasses(classes) {\n        const definition = {\n            model: {\n                key: 'blockIndent',\n                values: []\n            },\n            view: {}\n        };\n        for (const className of classes){\n            definition.model.values.push(className);\n            definition.view[className] = {\n                key: 'class',\n                value: [\n                    className\n                ]\n            };\n        }\n        this.editor.conversion.attributeToAttribute(definition);\n    }\n}\n\nexport { Indent, IndentBlock, IndentEditing, IndentUI };\n//# sourceMappingURL=index.js.map\n","import baseSlice from './_baseSlice.js';\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n  var length = array.length;\n  end = end === undefined ? length : end;\n  return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nexport default castSlice;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n  return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n    rsComboMarksRange = '\\\\u0300-\\\\u036f',\n    reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n    rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n    rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n    rsCombo = '[' + rsComboRange + ']',\n    rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n    rsNonAstral = '[^' + rsAstralRange + ']',\n    rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n    rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n    rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n    rsOptVar = '[' + rsVarRange + ']?',\n    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n    rsSeq = rsOptVar + reOptMod + rsOptJoin,\n    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n  return string.match(reUnicode) || [];\n}\n\nexport default unicodeToArray;\n","import asciiToArray from './_asciiToArray.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeToArray from './_unicodeToArray.js';\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n  return hasUnicode(string)\n    ? unicodeToArray(string)\n    : asciiToArray(string);\n}\n\nexport default stringToArray;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n  return string.split('');\n}\n\nexport default asciiToArray;\n","import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nexport default upperFirst;\n","import castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n  return function(string) {\n    string = toString(string);\n\n    var strSymbols = hasUnicode(string)\n      ? stringToArray(string)\n      : undefined;\n\n    var chr = strSymbols\n      ? strSymbols[0]\n      : string.charAt(0);\n\n    var trailing = strSymbols\n      ? castSlice(strSymbols, 1).join('')\n      : string.slice(1);\n\n    return chr[methodName]() + trailing;\n  };\n}\n\nexport default createCaseFirst;\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { findAttributeRange, TwoStepCaretMovement, Input, inlineHighlight, Delete, TextWatcher, getLastTextLine } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\nimport { toMap, Collection, first, ObservableMixin, env, keyCodes, FocusTracker, KeystrokeHandler } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { upperFirst } from 'lodash-es';\nimport { ClickObserver, Matcher } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { View, ViewCollection, FocusCycler, submitHandler, LabeledFieldView, createLabeledInputText, ButtonView, SwitchButtonView, ContextualBalloon, CssTransitionDisablerMixin, MenuBarMenuListItemButtonView, clickOutsideHandler } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { isWidget } from '@ckeditor/ckeditor5-widget/dist/index.js';\n\n/**\n * Helper class that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition} and provides\n * the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement downcast dispatchers} for them.\n */ class AutomaticDecorators {\n    /**\n\t * Stores the definition of {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}.\n\t * This data is used as a source for a downcast dispatcher to create a proper conversion to output data.\n\t */ _definitions = new Set();\n    /**\n\t * Gives information about the number of decorators stored in the {@link module:link/utils/automaticdecorators~AutomaticDecorators}\n\t * instance.\n\t */ get length() {\n        return this._definitions.size;\n    }\n    /**\n\t * Adds automatic decorator objects or an array with them to be used during downcasting.\n\t *\n\t * @param item A configuration object of automatic rules for decorating links. It might also be an array of such objects.\n\t */ add(item) {\n        if (Array.isArray(item)) {\n            item.forEach((item)=>this._definitions.add(item));\n        } else {\n            this._definitions.add(item);\n        }\n    }\n    /**\n\t * Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method.\n\t *\n\t * @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n\t */ getDispatcher() {\n        return (dispatcher)=>{\n            dispatcher.on('attribute:linkHref', (evt, data, conversionApi)=>{\n                // There is only test as this behavior decorates links and\n                // it is run before dispatcher which actually consumes this node.\n                // This allows on writing own dispatcher with highest priority,\n                // which blocks both native converter and this additional decoration.\n                if (!conversionApi.consumable.test(data.item, 'attribute:linkHref')) {\n                    return;\n                }\n                // Automatic decorators for block links are handled e.g. in LinkImageEditing.\n                if (!(data.item.is('selection') || conversionApi.schema.isInline(data.item))) {\n                    return;\n                }\n                const viewWriter = conversionApi.writer;\n                const viewSelection = viewWriter.document.selection;\n                for (const item of this._definitions){\n                    const viewElement = viewWriter.createAttributeElement('a', item.attributes, {\n                        priority: 5\n                    });\n                    if (item.classes) {\n                        viewWriter.addClass(item.classes, viewElement);\n                    }\n                    for(const key in item.styles){\n                        viewWriter.setStyle(key, item.styles[key], viewElement);\n                    }\n                    viewWriter.setCustomProperty('link', true, viewElement);\n                    if (item.callback(data.attributeNewValue)) {\n                        if (data.item.is('selection')) {\n                            viewWriter.wrap(viewSelection.getFirstRange(), viewElement);\n                        } else {\n                            viewWriter.wrap(conversionApi.mapper.toViewRange(data.range), viewElement);\n                        }\n                    } else {\n                        viewWriter.unwrap(conversionApi.mapper.toViewRange(data.range), viewElement);\n                    }\n                }\n            }, {\n                priority: 'high'\n            });\n        };\n    }\n    /**\n\t * Provides the conversion helper used in the {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add} method\n\t * when linking images.\n\t *\n\t * @returns A dispatcher function used as conversion helper in {@link module:engine/conversion/downcasthelpers~DowncastHelpers#add}.\n\t */ getDispatcherForLinkedImage() {\n        return (dispatcher)=>{\n            dispatcher.on('attribute:linkHref:imageBlock', (evt, data, { writer, mapper })=>{\n                const viewFigure = mapper.toViewElement(data.item);\n                const linkInImage = Array.from(viewFigure.getChildren()).find((child)=>child.is('element', 'a'));\n                for (const item of this._definitions){\n                    const attributes = toMap(item.attributes);\n                    if (item.callback(data.attributeNewValue)) {\n                        for (const [key, val] of attributes){\n                            // Left for backward compatibility. Since v30 decorator should\n                            // accept `classes` and `styles` separately from `attributes`.\n                            if (key === 'class') {\n                                writer.addClass(val, linkInImage);\n                            } else {\n                                writer.setAttribute(key, val, linkInImage);\n                            }\n                        }\n                        if (item.classes) {\n                            writer.addClass(item.classes, linkInImage);\n                        }\n                        for(const key in item.styles){\n                            writer.setStyle(key, item.styles[key], linkInImage);\n                        }\n                    } else {\n                        for (const [key, val] of attributes){\n                            if (key === 'class') {\n                                writer.removeClass(val, linkInImage);\n                            } else {\n                                writer.removeAttribute(key, linkInImage);\n                            }\n                        }\n                        if (item.classes) {\n                            writer.removeClass(item.classes, linkInImage);\n                        }\n                        for(const key in item.styles){\n                            writer.removeStyle(key, linkInImage);\n                        }\n                    }\n                }\n            });\n        };\n    }\n}\n\nconst ATTRIBUTE_WHITESPACES = /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g; // eslint-disable-line no-control-regex\nconst SAFE_URL_TEMPLATE = '^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))';\n// Simplified email test - should be run over previously found URL.\nconst EMAIL_REG_EXP = /^[\\S]+@((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+(?:[a-z\\u00a1-\\uffff]{2,})$/i;\n// The regex checks for the protocol syntax ('xxxx://' or 'xxxx:')\n// or non-word characters at the beginning of the link ('/', '#' etc.).\nconst PROTOCOL_REG_EXP = /^((\\w+:(\\/{2,})?)|(\\W))/i;\nconst DEFAULT_LINK_PROTOCOLS = [\n    'https?',\n    'ftps?',\n    'mailto'\n];\n/**\n * A keystroke used by the {@link module:link/linkui~LinkUI link UI feature}.\n */ const LINK_KEYSTROKE = 'Ctrl+K';\n/**\n * Returns `true` if a given view node is the link element.\n */ function isLinkElement(node) {\n    return node.is('attributeElement') && !!node.getCustomProperty('link');\n}\n/**\n * Creates a link {@link module:engine/view/attributeelement~AttributeElement} with the provided `href` attribute.\n */ function createLinkElement(href, { writer }) {\n    // Priority 5 - https://github.com/ckeditor/ckeditor5-link/issues/121.\n    const linkElement = writer.createAttributeElement('a', {\n        href\n    }, {\n        priority: 5\n    });\n    writer.setCustomProperty('link', true, linkElement);\n    return linkElement;\n}\n/**\n * Returns a safe URL based on a given value.\n *\n * A URL is considered safe if it is safe for the user (does not contain any malicious code).\n *\n * If a URL is considered unsafe, a simple `\"#\"` is returned.\n *\n * @internal\n */ function ensureSafeUrl(url, allowedProtocols = DEFAULT_LINK_PROTOCOLS) {\n    const urlString = String(url);\n    const protocolsList = allowedProtocols.join('|');\n    const customSafeRegex = new RegExp(`${SAFE_URL_TEMPLATE.replace('<protocols>', protocolsList)}`, 'i');\n    return isSafeUrl(urlString, customSafeRegex) ? urlString : '#';\n}\n/**\n * Checks whether the given URL is safe for the user (does not contain any malicious code).\n */ function isSafeUrl(url, customRegexp) {\n    const normalizedUrl = url.replace(ATTRIBUTE_WHITESPACES, '');\n    return !!normalizedUrl.match(customRegexp);\n}\n/**\n * Returns the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration processed\n * to respect the locale of the editor, i.e. to display the {@link module:link/linkconfig~LinkDecoratorManualDefinition label}\n * in the correct language.\n *\n * **Note**: Only the few most commonly used labels are translated automatically. Other labels should be manually\n * translated in the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} configuration.\n *\n * @param t Shorthand for {@link module:utils/locale~Locale#t Locale#t}.\n * @param decorators The decorator reference where the label values should be localized.\n */ function getLocalizedDecorators(t, decorators) {\n    const localizedDecoratorsLabels = {\n        'Open in a new tab': t('Open in a new tab'),\n        'Downloadable': t('Downloadable')\n    };\n    decorators.forEach((decorator)=>{\n        if ('label' in decorator && localizedDecoratorsLabels[decorator.label]) {\n            decorator.label = localizedDecoratorsLabels[decorator.label];\n        }\n        return decorator;\n    });\n    return decorators;\n}\n/**\n * Converts an object with defined decorators to a normalized array of decorators. The `id` key is added for each decorator and\n * is used as the attribute's name in the model.\n */ function normalizeDecorators(decorators) {\n    const retArray = [];\n    if (decorators) {\n        for (const [key, value] of Object.entries(decorators)){\n            const decorator = Object.assign({}, value, {\n                id: `link${upperFirst(key)}`\n            });\n            retArray.push(decorator);\n        }\n    }\n    return retArray;\n}\n/**\n * Returns `true` if the specified `element` can be linked (the element allows the `linkHref` attribute).\n */ function isLinkableElement(element, schema) {\n    if (!element) {\n        return false;\n    }\n    return schema.checkAttribute(element.name, 'linkHref');\n}\n/**\n * Returns `true` if the specified `value` is an email.\n */ function isEmail(value) {\n    return EMAIL_REG_EXP.test(value);\n}\n/**\n * Adds the protocol prefix to the specified `link` when:\n *\n * * it does not contain it already, and there is a {@link module:link/linkconfig~LinkConfig#defaultProtocol `defaultProtocol` }\n * configuration value provided,\n * * or the link is an email address.\n */ function addLinkProtocolIfApplicable(link, defaultProtocol) {\n    const protocol = isEmail(link) ? 'mailto:' : defaultProtocol;\n    const isProtocolNeeded = !!protocol && !linkHasProtocol(link);\n    return link && isProtocolNeeded ? protocol + link : link;\n}\n/**\n * Checks if protocol is already included in the link.\n */ function linkHasProtocol(link) {\n    return PROTOCOL_REG_EXP.test(link);\n}\n/**\n * Opens the link in a new browser tab.\n */ function openLink(link) {\n    window.open(link, '_blank', 'noopener');\n}\n\n/**\n * The link command. It is used by the {@link module:link/link~Link link feature}.\n */ class LinkCommand extends Command {\n    /**\n\t * A collection of {@link module:link/utils/manualdecorator~ManualDecorator manual decorators}\n\t * corresponding to the {@link module:link/linkconfig~LinkConfig#decorators decorator configuration}.\n\t *\n\t * You can consider it a model with states of manual decorators added to the currently selected link.\n\t */ manualDecorators = new Collection();\n    /**\n\t * An instance of the helper that ties together all {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition}\n\t * that are used by the {@glink features/link link} and the {@glink features/images/images-linking linking images} features.\n\t */ automaticDecorators = new AutomaticDecorators();\n    /**\n\t * Synchronizes the state of {@link #manualDecorators} with the currently present elements in the model.\n\t */ restoreManualDecoratorStates() {\n        for (const manualDecorator of this.manualDecorators){\n            manualDecorator.value = this._getDecoratorStateFromModel(manualDecorator.id);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const selectedElement = selection.getSelectedElement() || first(selection.getSelectedBlocks());\n        // A check for any integration that allows linking elements (e.g. `LinkImage`).\n        // Currently the selection reads attributes from text nodes only. See #7429 and #7465.\n        if (isLinkableElement(selectedElement, model.schema)) {\n            this.value = selectedElement.getAttribute('linkHref');\n            this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');\n        } else {\n            this.value = selection.getAttribute('linkHref');\n            this.isEnabled = model.schema.checkAttributeInSelection(selection, 'linkHref');\n        }\n        for (const manualDecorator of this.manualDecorators){\n            manualDecorator.value = this._getDecoratorStateFromModel(manualDecorator.id);\n        }\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * When the selection is non-collapsed, the `linkHref` attribute will be applied to nodes inside the selection, but only to\n\t * those nodes where the `linkHref` attribute is allowed (disallowed nodes will be omitted).\n\t *\n\t * When the selection is collapsed and is not inside the text with the `linkHref` attribute, a\n\t * new {@link module:engine/model/text~Text text node} with the `linkHref` attribute will be inserted in place of the caret, but\n\t * only if such element is allowed in this place. The `_data` of the inserted text will equal the `href` parameter.\n\t * The selection will be updated to wrap the just inserted text node.\n\t *\n\t * When the selection is collapsed and inside the text with the `linkHref` attribute, the attribute value will be updated.\n\t *\n\t * # Decorators and model attribute management\n\t *\n\t * There is an optional argument to this command that applies or removes model\n\t * {@glink framework/architecture/editing-engine#text-attributes text attributes} brought by\n\t * {@link module:link/utils/manualdecorator~ManualDecorator manual link decorators}.\n\t *\n\t * Text attribute names in the model correspond to the entries in the {@link module:link/linkconfig~LinkConfig#decorators\n\t * configuration}.\n\t * For every decorator configured, a model text attribute exists with the \"link\" prefix. For example, a `'linkMyDecorator'` attribute\n\t * corresponds to `'myDecorator'` in the configuration.\n\t *\n\t * To learn more about link decorators, check out the {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`}\n\t * documentation.\n\t *\n\t * Here is how to manage decorator attributes with the link command:\n\t *\n\t * ```ts\n\t * const linkCommand = editor.commands.get( 'link' );\n\t *\n\t * // Adding a new decorator attribute.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: true\n\t * } );\n\t *\n\t * // Removing a decorator attribute from the selection.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: false\n\t * } );\n\t *\n\t * // Adding multiple decorator attributes at the same time.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: true,\n\t * \tlinkIsDownloadable: true,\n\t * } );\n\t *\n\t * // Removing and adding decorator attributes at the same time.\n\t * linkCommand.execute( 'http://example.com', {\n\t * \tlinkIsExternal: false,\n\t * \tlinkFoo: true,\n\t * \tlinkIsDownloadable: false,\n\t * } );\n\t * ```\n\t *\n\t * **Note**: If the decorator attribute name is not specified, its state remains untouched.\n\t *\n\t * **Note**: {@link module:link/unlinkcommand~UnlinkCommand#execute `UnlinkCommand#execute()`} removes all\n\t * decorator attributes.\n\t *\n\t * @fires execute\n\t * @param href Link destination.\n\t * @param manualDecoratorIds The information about manual decorator attributes to be applied or removed upon execution.\n\t */ execute(href, manualDecoratorIds = {}) {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        // Stores information about manual decorators to turn them on/off when command is applied.\n        const truthyManualDecorators = [];\n        const falsyManualDecorators = [];\n        for(const name in manualDecoratorIds){\n            if (manualDecoratorIds[name]) {\n                truthyManualDecorators.push(name);\n            } else {\n                falsyManualDecorators.push(name);\n            }\n        }\n        model.change((writer)=>{\n            // If selection is collapsed then update selected link or insert new one at the place of caret.\n            if (selection.isCollapsed) {\n                const position = selection.getFirstPosition();\n                // When selection is inside text with `linkHref` attribute.\n                if (selection.hasAttribute('linkHref')) {\n                    const linkText = extractTextFromSelection(selection);\n                    // Then update `linkHref` value.\n                    let linkRange = findAttributeRange(position, 'linkHref', selection.getAttribute('linkHref'), model);\n                    if (selection.getAttribute('linkHref') === linkText) {\n                        linkRange = this._updateLinkContent(model, writer, linkRange, href);\n                    }\n                    writer.setAttribute('linkHref', href, linkRange);\n                    truthyManualDecorators.forEach((item)=>{\n                        writer.setAttribute(item, true, linkRange);\n                    });\n                    falsyManualDecorators.forEach((item)=>{\n                        writer.removeAttribute(item, linkRange);\n                    });\n                    // Put the selection at the end of the updated link.\n                    writer.setSelection(writer.createPositionAfter(linkRange.end.nodeBefore));\n                } else if (href !== '') {\n                    const attributes = toMap(selection.getAttributes());\n                    attributes.set('linkHref', href);\n                    truthyManualDecorators.forEach((item)=>{\n                        attributes.set(item, true);\n                    });\n                    const { end: positionAfter } = model.insertContent(writer.createText(href, attributes), position);\n                    // Put the selection at the end of the inserted link.\n                    // Using end of range returned from insertContent in case nodes with the same attributes got merged.\n                    writer.setSelection(positionAfter);\n                }\n                // Remove the `linkHref` attribute and all link decorators from the selection.\n                // It stops adding a new content into the link element.\n                [\n                    'linkHref',\n                    ...truthyManualDecorators,\n                    ...falsyManualDecorators\n                ].forEach((item)=>{\n                    writer.removeSelectionAttribute(item);\n                });\n            } else {\n                // If selection has non-collapsed ranges, we change attribute on nodes inside those ranges\n                // omitting nodes where the `linkHref` attribute is disallowed.\n                const ranges = model.schema.getValidRanges(selection.getRanges(), 'linkHref');\n                // But for the first, check whether the `linkHref` attribute is allowed on selected blocks (e.g. the \"image\" element).\n                const allowedRanges = [];\n                for (const element of selection.getSelectedBlocks()){\n                    if (model.schema.checkAttribute(element, 'linkHref')) {\n                        allowedRanges.push(writer.createRangeOn(element));\n                    }\n                }\n                // Ranges that accept the `linkHref` attribute. Since we will iterate over `allowedRanges`, let's clone it.\n                const rangesToUpdate = allowedRanges.slice();\n                // For all selection ranges we want to check whether given range is inside an element that accepts the `linkHref` attribute.\n                // If so, we don't want to propagate applying the attribute to its children.\n                for (const range of ranges){\n                    if (this._isRangeToUpdate(range, allowedRanges)) {\n                        rangesToUpdate.push(range);\n                    }\n                }\n                for (const range of rangesToUpdate){\n                    let linkRange = range;\n                    if (rangesToUpdate.length === 1) {\n                        // Current text of the link in the document.\n                        const linkText = extractTextFromSelection(selection);\n                        if (selection.getAttribute('linkHref') === linkText) {\n                            linkRange = this._updateLinkContent(model, writer, range, href);\n                            writer.setSelection(writer.createSelection(linkRange));\n                        }\n                    }\n                    writer.setAttribute('linkHref', href, linkRange);\n                    truthyManualDecorators.forEach((item)=>{\n                        writer.setAttribute(item, true, linkRange);\n                    });\n                    falsyManualDecorators.forEach((item)=>{\n                        writer.removeAttribute(item, linkRange);\n                    });\n                }\n            }\n        });\n    }\n    /**\n\t * Provides information whether a decorator with a given name is present in the currently processed selection.\n\t *\n\t * @param decoratorName The name of the manual decorator used in the model\n\t * @returns The information whether a given decorator is currently present in the selection.\n\t */ _getDecoratorStateFromModel(decoratorName) {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const selectedElement = selection.getSelectedElement();\n        // A check for the `LinkImage` plugin. If the selection contains an element, get values from the element.\n        // Currently the selection reads attributes from text nodes only. See #7429 and #7465.\n        if (isLinkableElement(selectedElement, model.schema)) {\n            return selectedElement.getAttribute(decoratorName);\n        }\n        return selection.getAttribute(decoratorName);\n    }\n    /**\n\t * Checks whether specified `range` is inside an element that accepts the `linkHref` attribute.\n\t *\n\t * @param range A range to check.\n\t * @param allowedRanges An array of ranges created on elements where the attribute is accepted.\n\t */ _isRangeToUpdate(range, allowedRanges) {\n        for (const allowedRange of allowedRanges){\n            // A range is inside an element that will have the `linkHref` attribute. Do not modify its nodes.\n            if (allowedRange.containsRange(range)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Updates selected link with a new value as its content and as its href attribute.\n\t *\n\t * @param model Model is need to insert content.\n\t * @param writer Writer is need to create text element in model.\n\t * @param range A range where should be inserted content.\n\t * @param href A link value which should be in the href attribute and in the content.\n\t */ _updateLinkContent(model, writer, range, href) {\n        const text = writer.createText(href, {\n            linkHref: href\n        });\n        return model.insertContent(text, range);\n    }\n}\n// Returns a text of a link under the collapsed selection or a selection that contains the entire link.\nfunction extractTextFromSelection(selection) {\n    if (selection.isCollapsed) {\n        const firstPosition = selection.getFirstPosition();\n        return firstPosition.textNode && firstPosition.textNode.data;\n    } else {\n        const rangeItems = Array.from(selection.getFirstRange().getItems());\n        if (rangeItems.length > 1) {\n            return null;\n        }\n        const firstNode = rangeItems[0];\n        if (firstNode.is('$text') || firstNode.is('$textProxy')) {\n            return firstNode.data;\n        }\n        return null;\n    }\n}\n\n/**\n * The unlink command. It is used by the {@link module:link/link~Link link plugin}.\n */ class UnlinkCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const selectedElement = selection.getSelectedElement();\n        // A check for any integration that allows linking elements (e.g. `LinkImage`).\n        // Currently the selection reads attributes from text nodes only. See #7429 and #7465.\n        if (isLinkableElement(selectedElement, model.schema)) {\n            this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');\n        } else {\n            this.isEnabled = model.schema.checkAttributeInSelection(selection, 'linkHref');\n        }\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * When the selection is collapsed, it removes the `linkHref` attribute from each node with the same `linkHref` attribute value.\n\t * When the selection is non-collapsed, it removes the `linkHref` attribute from each node in selected ranges.\n\t *\n\t * # Decorators\n\t *\n\t * If {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} is specified,\n\t * all configured decorators are removed together with the `linkHref` attribute.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const editor = this.editor;\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const linkCommand = editor.commands.get('link');\n        model.change((writer)=>{\n            // Get ranges to unlink.\n            const rangesToUnlink = selection.isCollapsed ? [\n                findAttributeRange(selection.getFirstPosition(), 'linkHref', selection.getAttribute('linkHref'), model)\n            ] : model.schema.getValidRanges(selection.getRanges(), 'linkHref');\n            // Remove `linkHref` attribute from specified ranges.\n            for (const range of rangesToUnlink){\n                writer.removeAttribute('linkHref', range);\n                // If there are registered custom attributes, then remove them during unlink.\n                if (linkCommand) {\n                    for (const manualDecorator of linkCommand.manualDecorators){\n                        writer.removeAttribute(manualDecorator.id, range);\n                    }\n                }\n            }\n        });\n    }\n}\n\n/**\n * Helper class that stores manual decorators with observable {@link module:link/utils/manualdecorator~ManualDecorator#value}\n * to support integration with the UI state. An instance of this class is a model with the state of individual manual decorators.\n * These decorators are kept as collections in {@link module:link/linkcommand~LinkCommand#manualDecorators}.\n */ class ManualDecorator extends /* #__PURE__ */ ObservableMixin() {\n    /**\n\t * An ID of a manual decorator which is the name of the attribute in the model, for example: 'linkManualDecorator0'.\n\t */ id;\n    /**\n\t * The default value of manual decorator.\n\t */ defaultValue;\n    /**\n\t * The label used in the user interface to toggle the manual decorator.\n\t */ label;\n    /**\n\t * A set of attributes added to downcasted data when the decorator is activated for a specific link.\n\t * Attributes should be added in a form of attributes defined in {@link module:engine/view/elementdefinition~ElementDefinition}.\n\t */ attributes;\n    /**\n\t * A set of classes added to downcasted data when the decorator is activated for a specific link.\n\t * Classes should be added in a form of classes defined in {@link module:engine/view/elementdefinition~ElementDefinition}.\n\t */ classes;\n    /**\n\t * A set of styles added to downcasted data when the decorator is activated for a specific link.\n\t * Styles should be added in a form of styles defined in {@link module:engine/view/elementdefinition~ElementDefinition}.\n\t */ styles;\n    /**\n\t * Creates a new instance of {@link module:link/utils/manualdecorator~ManualDecorator}.\n\t *\n\t * @param config.id The name of the attribute used in the model that represents a given manual decorator.\n\t * For example: `'linkIsExternal'`.\n\t * @param config.label The label used in the user interface to toggle the manual decorator.\n\t * @param config.attributes A set of attributes added to output data when the decorator is active for a specific link.\n\t * Attributes should keep the format of attributes defined in {@link module:engine/view/elementdefinition~ElementDefinition}.\n\t * @param [config.defaultValue] Controls whether the decorator is \"on\" by default.\n\t */ constructor({ id, label, attributes, classes, styles, defaultValue }){\n        super();\n        this.id = id;\n        this.set('value', undefined);\n        this.defaultValue = defaultValue;\n        this.label = label;\n        this.attributes = attributes;\n        this.classes = classes;\n        this.styles = styles;\n    }\n    /**\n\t * Returns {@link module:engine/view/matcher~MatcherPattern} with decorator attributes.\n\t *\n\t * @internal\n\t */ _createPattern() {\n        return {\n            attributes: this.attributes,\n            classes: this.classes,\n            styles: this.styles\n        };\n    }\n}\n\nconst HIGHLIGHT_CLASS = 'ck-link_selected';\nconst DECORATOR_AUTOMATIC = 'automatic';\nconst DECORATOR_MANUAL = 'manual';\nconst EXTERNAL_LINKS_REGEXP = /^(https?:)?\\/\\//;\n/**\n * The link engine feature.\n *\n * It introduces the `linkHref=\"url\"` attribute in the model which renders to the view as a `<a href=\"url\">` element\n * as well as `'link'` and `'unlink'` commands.\n */ class LinkEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LinkEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        // Clipboard is required for handling cut and paste events while typing over the link.\n        return [\n            TwoStepCaretMovement,\n            Input,\n            ClipboardPipeline\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('link', {\n            allowCreatingEmptyLinks: false,\n            addTargetToExternalLinks: false\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const allowedProtocols = this.editor.config.get('link.allowedProtocols');\n        // Allow link attribute on all inline nodes.\n        editor.model.schema.extend('$text', {\n            allowAttributes: 'linkHref'\n        });\n        editor.conversion.for('dataDowncast').attributeToElement({\n            model: 'linkHref',\n            view: createLinkElement\n        });\n        editor.conversion.for('editingDowncast').attributeToElement({\n            model: 'linkHref',\n            view: (href, conversionApi)=>{\n                return createLinkElement(ensureSafeUrl(href, allowedProtocols), conversionApi);\n            }\n        });\n        editor.conversion.for('upcast').elementToAttribute({\n            view: {\n                name: 'a',\n                attributes: {\n                    href: true\n                }\n            },\n            model: {\n                key: 'linkHref',\n                value: (viewElement)=>viewElement.getAttribute('href')\n            }\n        });\n        // Create linking commands.\n        editor.commands.add('link', new LinkCommand(editor));\n        editor.commands.add('unlink', new UnlinkCommand(editor));\n        const linkDecorators = getLocalizedDecorators(editor.t, normalizeDecorators(editor.config.get('link.decorators')));\n        this._enableAutomaticDecorators(linkDecorators.filter((item)=>item.mode === DECORATOR_AUTOMATIC));\n        this._enableManualDecorators(linkDecorators.filter((item)=>item.mode === DECORATOR_MANUAL));\n        // Enable two-step caret movement for `linkHref` attribute.\n        const twoStepCaretMovementPlugin = editor.plugins.get(TwoStepCaretMovement);\n        twoStepCaretMovementPlugin.registerAttribute('linkHref');\n        // Setup highlight over selected link.\n        inlineHighlight(editor, 'linkHref', 'a', HIGHLIGHT_CLASS);\n        // Handle link following by CTRL+click or ALT+ENTER\n        this._enableLinkOpen();\n        // Clears the DocumentSelection decorator attributes if the selection is no longer in a link (for example while using 2-SCM).\n        this._enableSelectionAttributesFixer();\n        // Handle adding default protocol to pasted links.\n        this._enableClipboardIntegration();\n    }\n    /**\n\t * Processes an array of configured {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators}\n\t * and registers a {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher downcast dispatcher}\n\t * for each one of them. Downcast dispatchers are obtained using the\n\t * {@link module:link/utils/automaticdecorators~AutomaticDecorators#getDispatcher} method.\n\t *\n\t * **Note**: This method also activates the automatic external link decorator if enabled with\n\t * {@link module:link/linkconfig~LinkConfig#addTargetToExternalLinks `config.link.addTargetToExternalLinks`}.\n\t */ _enableAutomaticDecorators(automaticDecoratorDefinitions) {\n        const editor = this.editor;\n        // Store automatic decorators in the command instance as we do the same with manual decorators.\n        // Thanks to that, `LinkImageEditing` plugin can re-use the same definitions.\n        const command = editor.commands.get('link');\n        const automaticDecorators = command.automaticDecorators;\n        // Adds a default decorator for external links.\n        if (editor.config.get('link.addTargetToExternalLinks')) {\n            automaticDecorators.add({\n                id: 'linkIsExternal',\n                mode: DECORATOR_AUTOMATIC,\n                callback: (url)=>!!url && EXTERNAL_LINKS_REGEXP.test(url),\n                attributes: {\n                    target: '_blank',\n                    rel: 'noopener noreferrer'\n                }\n            });\n        }\n        automaticDecorators.add(automaticDecoratorDefinitions);\n        if (automaticDecorators.length) {\n            editor.conversion.for('downcast').add(automaticDecorators.getDispatcher());\n        }\n    }\n    /**\n\t * Processes an array of configured {@link module:link/linkconfig~LinkDecoratorManualDefinition manual decorators},\n\t * transforms them into {@link module:link/utils/manualdecorator~ManualDecorator} instances and stores them in the\n\t * {@link module:link/linkcommand~LinkCommand#manualDecorators} collection (a model for manual decorators state).\n\t *\n\t * Also registers an {@link module:engine/conversion/downcasthelpers~DowncastHelpers#attributeToElement attribute-to-element}\n\t * converter for each manual decorator and extends the {@link module:engine/model/schema~Schema model's schema}\n\t * with adequate model attributes.\n\t */ _enableManualDecorators(manualDecoratorDefinitions) {\n        if (!manualDecoratorDefinitions.length) {\n            return;\n        }\n        const editor = this.editor;\n        const command = editor.commands.get('link');\n        const manualDecorators = command.manualDecorators;\n        manualDecoratorDefinitions.forEach((decoratorDefinition)=>{\n            editor.model.schema.extend('$text', {\n                allowAttributes: decoratorDefinition.id\n            });\n            // Keeps reference to manual decorator to decode its name to attributes during downcast.\n            const decorator = new ManualDecorator(decoratorDefinition);\n            manualDecorators.add(decorator);\n            editor.conversion.for('downcast').attributeToElement({\n                model: decorator.id,\n                view: (manualDecoratorValue, { writer, schema }, { item })=>{\n                    // Manual decorators for block links are handled e.g. in LinkImageEditing.\n                    if (!(item.is('selection') || schema.isInline(item))) {\n                        return;\n                    }\n                    if (manualDecoratorValue) {\n                        const element = writer.createAttributeElement('a', decorator.attributes, {\n                            priority: 5\n                        });\n                        if (decorator.classes) {\n                            writer.addClass(decorator.classes, element);\n                        }\n                        for(const key in decorator.styles){\n                            writer.setStyle(key, decorator.styles[key], element);\n                        }\n                        writer.setCustomProperty('link', true, element);\n                        return element;\n                    }\n                }\n            });\n            editor.conversion.for('upcast').elementToAttribute({\n                view: {\n                    name: 'a',\n                    ...decorator._createPattern()\n                },\n                model: {\n                    key: decorator.id\n                }\n            });\n        });\n    }\n    /**\n\t * Attaches handlers for {@link module:engine/view/document~Document#event:enter} and\n\t * {@link module:engine/view/document~Document#event:click} to enable link following.\n\t */ _enableLinkOpen() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        this.listenTo(viewDocument, 'click', (evt, data)=>{\n            const shouldOpen = env.isMac ? data.domEvent.metaKey : data.domEvent.ctrlKey;\n            if (!shouldOpen) {\n                return;\n            }\n            let clickedElement = data.domTarget;\n            if (clickedElement.tagName.toLowerCase() != 'a') {\n                clickedElement = clickedElement.closest('a');\n            }\n            if (!clickedElement) {\n                return;\n            }\n            const url = clickedElement.getAttribute('href');\n            if (!url) {\n                return;\n            }\n            evt.stop();\n            data.preventDefault();\n            openLink(url);\n        }, {\n            context: '$capture'\n        });\n        // Open link on Alt+Enter.\n        this.listenTo(viewDocument, 'keydown', (evt, data)=>{\n            const linkCommand = editor.commands.get('link');\n            const url = linkCommand.value;\n            const shouldOpen = !!url && data.keyCode === keyCodes.enter && data.altKey;\n            if (!shouldOpen) {\n                return;\n            }\n            evt.stop();\n            openLink(url);\n        });\n    }\n    /**\n\t * Watches the DocumentSelection attribute changes and removes link decorator attributes when the linkHref attribute is removed.\n\t *\n\t * This is to ensure that there is no left-over link decorator attributes on the document selection that is no longer in a link.\n\t */ _enableSelectionAttributesFixer() {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        this.listenTo(selection, 'change:attribute', (evt, { attributeKeys })=>{\n            if (!attributeKeys.includes('linkHref') || selection.hasAttribute('linkHref')) {\n                return;\n            }\n            model.change((writer)=>{\n                removeLinkAttributesFromSelection(writer, getLinkAttributesAllowedOnText(model.schema));\n            });\n        });\n    }\n    /**\n\t * Enables URL fixing on pasting.\n\t */ _enableClipboardIntegration() {\n        const editor = this.editor;\n        const model = editor.model;\n        const defaultProtocol = this.editor.config.get('link.defaultProtocol');\n        if (!defaultProtocol) {\n            return;\n        }\n        this.listenTo(editor.plugins.get('ClipboardPipeline'), 'contentInsertion', (evt, data)=>{\n            model.change((writer)=>{\n                const range = writer.createRangeIn(data.content);\n                for (const item of range.getItems()){\n                    if (item.hasAttribute('linkHref')) {\n                        const newLink = addLinkProtocolIfApplicable(item.getAttribute('linkHref'), defaultProtocol);\n                        writer.setAttribute('linkHref', newLink, item);\n                    }\n                }\n            });\n        });\n    }\n}\n/**\n * Make the selection free of link-related model attributes.\n * All link-related model attributes start with \"link\". That includes not only \"linkHref\"\n * but also all decorator attributes (they have dynamic names), or even custom plugins.\n */ function removeLinkAttributesFromSelection(writer, linkAttributes) {\n    writer.removeSelectionAttribute('linkHref');\n    for (const attribute of linkAttributes){\n        writer.removeSelectionAttribute(attribute);\n    }\n}\n/**\n * Returns an array containing names of the attributes allowed on `$text` that describes the link item.\n */ function getLinkAttributesAllowedOnText(schema) {\n    const textAttributes = schema.getDefinition('$text').allowAttributes;\n    return textAttributes.filter((attribute)=>attribute.startsWith('link'));\n}\n\n/**\n * The link form view controller class.\n *\n * See {@link module:link/ui/linkformview~LinkFormView}.\n */ class LinkFormView extends View {\n    /**\n\t * Tracks information about DOM focus in the form.\n\t */ focusTracker = new FocusTracker();\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes = new KeystrokeHandler();\n    /**\n\t * The URL input view.\n\t */ urlInputView;\n    /**\n\t * The Save button view.\n\t */ saveButtonView;\n    /**\n\t * The Cancel button view.\n\t */ cancelButtonView;\n    /**\n\t * A collection of {@link module:ui/button/switchbuttonview~SwitchButtonView},\n\t * which corresponds to {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators}\n\t * configured in the editor.\n\t */ _manualDecoratorSwitches;\n    /**\n\t * A collection of child views in the form.\n\t */ children;\n    /**\n\t * An array of form validators used by {@link #isValid}.\n\t */ _validators;\n    /**\n\t * A collection of views that can be focused in the form.\n\t */ _focusables = new ViewCollection();\n    /**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */ _focusCycler;\n    /**\n\t * Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.\n\t *\n\t * Also see {@link #render}.\n\t *\n\t * @param locale The localization services instance.\n\t * @param linkCommand Reference to {@link module:link/linkcommand~LinkCommand}.\n\t * @param validators  Form validators used by {@link #isValid}.\n\t */ constructor(locale, linkCommand, validators){\n        super(locale);\n        const t = locale.t;\n        this._validators = validators;\n        this.urlInputView = this._createUrlInput();\n        this.saveButtonView = this._createButton(t('Save'), icons.check, 'ck-button-save');\n        this.saveButtonView.type = 'submit';\n        this.cancelButtonView = this._createButton(t('Cancel'), icons.cancel, 'ck-button-cancel', 'cancel');\n        this._manualDecoratorSwitches = this._createManualDecoratorSwitches(linkCommand);\n        this.children = this._createFormChildren(linkCommand.manualDecorators);\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        const classList = [\n            'ck',\n            'ck-link-form',\n            'ck-responsive-form'\n        ];\n        if (linkCommand.manualDecorators.length) {\n            classList.push('ck-link-form_layout-vertical', 'ck-vertical-form');\n        }\n        this.setTemplate({\n            tag: 'form',\n            attributes: {\n                class: classList,\n                // https://github.com/ckeditor/ckeditor5-link/issues/90\n                tabindex: '-1'\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * Obtains the state of the {@link module:ui/button/switchbuttonview~SwitchButtonView switch buttons} representing\n\t * {@link module:link/linkcommand~LinkCommand#manualDecorators manual link decorators}\n\t * in the {@link module:link/ui/linkformview~LinkFormView}.\n\t *\n\t * @returns Key-value pairs, where the key is the name of the decorator and the value is its state.\n\t */ getDecoratorSwitchesState() {\n        return Array.from(this._manualDecoratorSwitches).reduce((accumulator, switchButton)=>{\n            accumulator[switchButton.name] = switchButton.isOn;\n            return accumulator;\n        }, {});\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        submitHandler({\n            view: this\n        });\n        const childViews = [\n            this.urlInputView,\n            ...this._manualDecoratorSwitches,\n            this.saveButtonView,\n            this.cancelButtonView\n        ];\n        childViews.forEach((v)=>{\n            // Register the view as focusable.\n            this._focusables.add(v);\n            // Register the view in the focus tracker.\n            this.focusTracker.add(v.element);\n        });\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */ isValid() {\n        this.resetFormStatus();\n        for (const validator of this._validators){\n            const errorText = validator(this);\n            // One error per field is enough.\n            if (errorText) {\n                // Apply updated error.\n                this.urlInputView.errorText = errorText;\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */ resetFormStatus() {\n        this.urlInputView.errorText = null;\n    }\n    /**\n\t * Creates a labeled input view.\n\t *\n\t * @returns Labeled field view instance.\n\t */ _createUrlInput() {\n        const t = this.locale.t;\n        const labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n        labeledInput.fieldView.inputMode = 'url';\n        labeledInput.label = t('Link URL');\n        return labeledInput;\n    }\n    /**\n\t * Creates a button view.\n\t *\n\t * @param label The button label.\n\t * @param icon The button icon.\n\t * @param className The additional button CSS class name.\n\t * @param eventName An event name that the `ButtonView#execute` event will be delegated to.\n\t * @returns The button view instance.\n\t */ _createButton(label, icon, className, eventName) {\n        const button = new ButtonView(this.locale);\n        button.set({\n            label,\n            icon,\n            tooltip: true\n        });\n        button.extendTemplate({\n            attributes: {\n                class: className\n            }\n        });\n        if (eventName) {\n            button.delegate('execute').to(this, eventName);\n        }\n        return button;\n    }\n    /**\n\t * Populates {@link module:ui/viewcollection~ViewCollection} of {@link module:ui/button/switchbuttonview~SwitchButtonView}\n\t * made based on {@link module:link/linkcommand~LinkCommand#manualDecorators}.\n\t *\n\t * @param linkCommand A reference to the link command.\n\t * @returns ViewCollection of switch buttons.\n\t */ _createManualDecoratorSwitches(linkCommand) {\n        const switches = this.createCollection();\n        for (const manualDecorator of linkCommand.manualDecorators){\n            const switchButton = new SwitchButtonView(this.locale);\n            switchButton.set({\n                name: manualDecorator.id,\n                label: manualDecorator.label,\n                withText: true\n            });\n            switchButton.bind('isOn').toMany([\n                manualDecorator,\n                linkCommand\n            ], 'value', (decoratorValue, commandValue)=>{\n                return commandValue === undefined && decoratorValue === undefined ? !!manualDecorator.defaultValue : !!decoratorValue;\n            });\n            switchButton.on('execute', ()=>{\n                manualDecorator.set('value', !switchButton.isOn);\n            });\n            switches.add(switchButton);\n        }\n        return switches;\n    }\n    /**\n\t * Populates the {@link #children} collection of the form.\n\t *\n\t * If {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators} are configured in the editor, it creates an\n\t * additional `View` wrapping all {@link #_manualDecoratorSwitches} switch buttons corresponding\n\t * to these decorators.\n\t *\n\t * @param manualDecorators A reference to\n\t * the collection of manual decorators stored in the link command.\n\t * @returns The children of link form view.\n\t */ _createFormChildren(manualDecorators) {\n        const children = this.createCollection();\n        children.add(this.urlInputView);\n        if (manualDecorators.length) {\n            const additionalButtonsView = new View();\n            additionalButtonsView.setTemplate({\n                tag: 'ul',\n                children: this._manualDecoratorSwitches.map((switchButton)=>({\n                        tag: 'li',\n                        children: [\n                            switchButton\n                        ],\n                        attributes: {\n                            class: [\n                                'ck',\n                                'ck-list__item'\n                            ]\n                        }\n                    })),\n                attributes: {\n                    class: [\n                        'ck',\n                        'ck-reset',\n                        'ck-list'\n                    ]\n                }\n            });\n            children.add(additionalButtonsView);\n        }\n        children.add(this.saveButtonView);\n        children.add(this.cancelButtonView);\n        return children;\n    }\n    /**\n\t * The native DOM `value` of the {@link #urlInputView} element.\n\t *\n\t * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t * which works one way only and may not represent the actual state of the component in the DOM.\n\t */ get url() {\n        const { element } = this.urlInputView.fieldView;\n        if (!element) {\n            return null;\n        }\n        return element.value.trim();\n    }\n}\n\nvar unlinkIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z\\\"/></svg>\";\n\n/**\n * The link actions view class. This view displays the link preview, allows\n * unlinking or editing the link.\n */ class LinkActionsView extends View {\n    /**\n\t * Tracks information about DOM focus in the actions.\n\t */ focusTracker = new FocusTracker();\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes = new KeystrokeHandler();\n    /**\n\t * The href preview view.\n\t */ previewButtonView;\n    /**\n\t * The unlink button view.\n\t */ unlinkButtonView;\n    /**\n\t * The edit link button view.\n\t */ editButtonView;\n    /**\n\t * A collection of views that can be focused in the view.\n\t */ _focusables = new ViewCollection();\n    /**\n\t * Helps cycling over {@link #_focusables} in the view.\n\t */ _focusCycler;\n    _linkConfig;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale, linkConfig = {}){\n        super(locale);\n        const t = locale.t;\n        this.previewButtonView = this._createPreviewButton();\n        this.unlinkButtonView = this._createButton(t('Unlink'), unlinkIcon, 'unlink');\n        this.editButtonView = this._createButton(t('Edit link'), icons.pencil, 'edit');\n        this.set('href', undefined);\n        this._linkConfig = linkConfig;\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-link-actions',\n                    'ck-responsive-form'\n                ],\n                // https://github.com/ckeditor/ckeditor5-link/issues/90\n                tabindex: '-1'\n            },\n            children: [\n                this.previewButtonView,\n                this.editButtonView,\n                this.unlinkButtonView\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        const childViews = [\n            this.previewButtonView,\n            this.editButtonView,\n            this.unlinkButtonView\n        ];\n        childViews.forEach((v)=>{\n            // Register the view as focusable.\n            this._focusables.add(v);\n            // Register the view in the focus tracker.\n            this.focusTracker.add(v.element);\n        });\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the fist {@link #_focusables} in the actions.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Creates a button view.\n\t *\n\t * @param label The button label.\n\t * @param icon The button icon.\n\t * @param eventName An event name that the `ButtonView#execute` event will be delegated to.\n\t * @returns The button view instance.\n\t */ _createButton(label, icon, eventName) {\n        const button = new ButtonView(this.locale);\n        button.set({\n            label,\n            icon,\n            tooltip: true\n        });\n        button.delegate('execute').to(this, eventName);\n        return button;\n    }\n    /**\n\t * Creates a link href preview button.\n\t *\n\t * @returns The button view instance.\n\t */ _createPreviewButton() {\n        const button = new ButtonView(this.locale);\n        const bind = this.bindTemplate;\n        const t = this.t;\n        button.set({\n            withText: true,\n            tooltip: t('Open link in new tab')\n        });\n        button.extendTemplate({\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-link-actions__preview'\n                ],\n                href: bind.to('href', (href)=>href && ensureSafeUrl(href, this._linkConfig.allowedProtocols)),\n                target: '_blank',\n                rel: 'noopener noreferrer'\n            }\n        });\n        button.bind('label').to(this, 'href', (href)=>{\n            return href || t('This link has no URL');\n        });\n        button.bind('isEnabled').to(this, 'href', (href)=>!!href);\n        button.template.tag = 'a';\n        button.template.eventListeners = {};\n        return button;\n    }\n}\n\nvar linkIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z\\\"/></svg>\";\n\nconst VISUAL_SELECTION_MARKER_NAME = 'link-ui';\n/**\n * The link UI plugin. It introduces the `'link'` and `'unlink'` buttons and support for the <kbd>Ctrl+K</kbd> keystroke.\n *\n * It uses the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */ class LinkUI extends Plugin {\n    /**\n\t * The actions view displayed inside of the balloon.\n\t */ actionsView = null;\n    /**\n\t * The form view displayed inside the balloon.\n\t */ formView = null;\n    /**\n\t * The contextual balloon plugin instance.\n\t */ _balloon;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LinkUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        editor.editing.view.addObserver(ClickObserver);\n        this._balloon = editor.plugins.get(ContextualBalloon);\n        // Create toolbar buttons.\n        this._createToolbarLinkButton();\n        this._enableBalloonActivators();\n        // Renders a fake visual selection marker on an expanded selection.\n        editor.conversion.for('editingDowncast').markerToHighlight({\n            model: VISUAL_SELECTION_MARKER_NAME,\n            view: {\n                classes: [\n                    'ck-fake-link-selection'\n                ]\n            }\n        });\n        // Renders a fake visual selection marker on a collapsed selection.\n        editor.conversion.for('editingDowncast').markerToElement({\n            model: VISUAL_SELECTION_MARKER_NAME,\n            view: (data, { writer })=>{\n                if (!data.markerRange.isCollapsed) {\n                    return null;\n                }\n                const markerElement = writer.createUIElement('span');\n                writer.addClass([\n                    'ck-fake-link-selection',\n                    'ck-fake-link-selection_collapsed'\n                ], markerElement);\n                return markerElement;\n            }\n        });\n        // Add the information about the keystrokes to the accessibility database.\n        editor.accessibility.addKeystrokeInfos({\n            keystrokes: [\n                {\n                    label: t('Create link'),\n                    keystroke: LINK_KEYSTROKE\n                },\n                {\n                    label: t('Move out of a link'),\n                    keystroke: [\n                        [\n                            'arrowleft',\n                            'arrowleft'\n                        ],\n                        [\n                            'arrowright',\n                            'arrowright'\n                        ]\n                    ]\n                }\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        // Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n        if (this.formView) {\n            this.formView.destroy();\n        }\n        if (this.actionsView) {\n            this.actionsView.destroy();\n        }\n    }\n    /**\n\t * Creates views.\n\t */ _createViews() {\n        this.actionsView = this._createActionsView();\n        this.formView = this._createFormView();\n        // Attach lifecycle actions to the the balloon.\n        this._enableUserBalloonInteractions();\n    }\n    /**\n\t * Creates the {@link module:link/ui/linkactionsview~LinkActionsView} instance.\n\t */ _createActionsView() {\n        const editor = this.editor;\n        const actionsView = new LinkActionsView(editor.locale, editor.config.get('link'));\n        const linkCommand = editor.commands.get('link');\n        const unlinkCommand = editor.commands.get('unlink');\n        actionsView.bind('href').to(linkCommand, 'value');\n        actionsView.editButtonView.bind('isEnabled').to(linkCommand);\n        actionsView.unlinkButtonView.bind('isEnabled').to(unlinkCommand);\n        // Execute unlink command after clicking on the \"Edit\" button.\n        this.listenTo(actionsView, 'edit', ()=>{\n            this._addFormView();\n        });\n        // Execute unlink command after clicking on the \"Unlink\" button.\n        this.listenTo(actionsView, 'unlink', ()=>{\n            editor.execute('unlink');\n            this._hideUI();\n        });\n        // Close the panel on esc key press when the **actions have focus**.\n        actionsView.keystrokes.set('Esc', (data, cancel)=>{\n            this._hideUI();\n            cancel();\n        });\n        // Open the form view on Ctrl+K when the **actions have focus**..\n        actionsView.keystrokes.set(LINK_KEYSTROKE, (data, cancel)=>{\n            this._addFormView();\n            cancel();\n        });\n        return actionsView;\n    }\n    /**\n\t * Creates the {@link module:link/ui/linkformview~LinkFormView} instance.\n\t */ _createFormView() {\n        const editor = this.editor;\n        const linkCommand = editor.commands.get('link');\n        const defaultProtocol = editor.config.get('link.defaultProtocol');\n        const formView = new (CssTransitionDisablerMixin(LinkFormView))(editor.locale, linkCommand, getFormValidators(editor));\n        formView.urlInputView.fieldView.bind('value').to(linkCommand, 'value');\n        // Form elements should be read-only when corresponding commands are disabled.\n        formView.urlInputView.bind('isEnabled').to(linkCommand, 'isEnabled');\n        // Disable the \"save\" button if the command is disabled.\n        formView.saveButtonView.bind('isEnabled').to(linkCommand, 'isEnabled');\n        // Execute link command after clicking the \"Save\" button.\n        this.listenTo(formView, 'submit', ()=>{\n            if (formView.isValid()) {\n                const { value } = formView.urlInputView.fieldView.element;\n                const parsedUrl = addLinkProtocolIfApplicable(value, defaultProtocol);\n                editor.execute('link', parsedUrl, formView.getDecoratorSwitchesState());\n                this._closeFormView();\n            }\n        });\n        // Update balloon position when form error changes.\n        this.listenTo(formView.urlInputView, 'change:errorText', ()=>{\n            editor.ui.update();\n        });\n        // Hide the panel after clicking the \"Cancel\" button.\n        this.listenTo(formView, 'cancel', ()=>{\n            this._closeFormView();\n        });\n        // Close the panel on esc key press when the **form has focus**.\n        formView.keystrokes.set('Esc', (data, cancel)=>{\n            this._closeFormView();\n            cancel();\n        });\n        return formView;\n    }\n    /**\n\t * Creates a toolbar Link button. Clicking this button will show\n\t * a {@link #_balloon} attached to the selection.\n\t */ _createToolbarLinkButton() {\n        const editor = this.editor;\n        editor.ui.componentFactory.add('link', ()=>{\n            const button = this._createButton(ButtonView);\n            button.set({\n                tooltip: true\n            });\n            return button;\n        });\n        editor.ui.componentFactory.add('menuBar:link', ()=>{\n            const button = this._createButton(MenuBarMenuListItemButtonView);\n            button.set({\n                role: 'menuitemcheckbox'\n            });\n            return button;\n        });\n    }\n    /**\n\t * Creates a button for link command to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const command = editor.commands.get('link');\n        const view = new ButtonClass(editor.locale);\n        const t = locale.t;\n        view.set({\n            label: t('Link'),\n            icon: linkIcon,\n            keystroke: LINK_KEYSTROKE,\n            isToggleable: true\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        view.bind('isOn').to(command, 'value', (value)=>!!value);\n        // Show the panel on button click.\n        this.listenTo(view, 'execute', ()=>this._showUI(true));\n        return view;\n    }\n    /**\n\t * Attaches actions that control whether the balloon panel containing the\n\t * {@link #formView} should be displayed.\n\t */ _enableBalloonActivators() {\n        const editor = this.editor;\n        const viewDocument = editor.editing.view.document;\n        // Handle click on view document and show panel when selection is placed inside the link element.\n        // Keep panel open until selection will be inside the same link element.\n        this.listenTo(viewDocument, 'click', ()=>{\n            const parentLink = this._getSelectedLinkElement();\n            if (parentLink) {\n                // Then show panel but keep focus inside editor editable.\n                this._showUI();\n            }\n        });\n        // Handle the `Ctrl+K` keystroke and show the panel.\n        editor.keystrokes.set(LINK_KEYSTROKE, (keyEvtData, cancel)=>{\n            // Prevent focusing the search bar in FF, Chrome and Edge. See https://github.com/ckeditor/ckeditor5/issues/4811.\n            cancel();\n            if (editor.commands.get('link').isEnabled) {\n                this._showUI(true);\n            }\n        });\n    }\n    /**\n\t * Attaches actions that control whether the balloon panel containing the\n\t * {@link #formView} is visible or not.\n\t */ _enableUserBalloonInteractions() {\n        // Focus the form if the balloon is visible and the Tab key has been pressed.\n        this.editor.keystrokes.set('Tab', (data, cancel)=>{\n            if (this._areActionsVisible && !this.actionsView.focusTracker.isFocused) {\n                this.actionsView.focus();\n                cancel();\n            }\n        }, {\n            // Use the high priority because the link UI navigation is more important\n            // than other feature's actions, e.g. list indentation.\n            // https://github.com/ckeditor/ckeditor5-link/issues/146\n            priority: 'high'\n        });\n        // Close the panel on the Esc key press when the editable has focus and the balloon is visible.\n        this.editor.keystrokes.set('Esc', (data, cancel)=>{\n            if (this._isUIVisible) {\n                this._hideUI();\n                cancel();\n            }\n        });\n        // Close on click outside of balloon panel element.\n        clickOutsideHandler({\n            emitter: this.formView,\n            activator: ()=>this._isUIInPanel,\n            contextElements: ()=>[\n                    this._balloon.view.element\n                ],\n            callback: ()=>this._hideUI()\n        });\n    }\n    /**\n\t * Adds the {@link #actionsView} to the {@link #_balloon}.\n\t *\n\t * @internal\n\t */ _addActionsView() {\n        if (!this.actionsView) {\n            this._createViews();\n        }\n        if (this._areActionsInPanel) {\n            return;\n        }\n        this._balloon.add({\n            view: this.actionsView,\n            position: this._getBalloonPositionData()\n        });\n    }\n    /**\n\t * Adds the {@link #formView} to the {@link #_balloon}.\n\t */ _addFormView() {\n        if (!this.formView) {\n            this._createViews();\n        }\n        if (this._isFormInPanel) {\n            return;\n        }\n        const editor = this.editor;\n        const linkCommand = editor.commands.get('link');\n        this.formView.disableCssTransitions();\n        this.formView.resetFormStatus();\n        this._balloon.add({\n            view: this.formView,\n            position: this._getBalloonPositionData()\n        });\n        // Make sure that each time the panel shows up, the URL field remains in sync with the value of\n        // the command. If the user typed in the input, then canceled the balloon (`urlInputView.fieldView#value` stays\n        // unaltered) and re-opened it without changing the value of the link command (e.g. because they\n        // clicked the same link), they would see the old value instead of the actual value of the command.\n        // https://github.com/ckeditor/ckeditor5-link/issues/78\n        // https://github.com/ckeditor/ckeditor5-link/issues/123\n        this.formView.urlInputView.fieldView.value = linkCommand.value || '';\n        // Select input when form view is currently visible.\n        if (this._balloon.visibleView === this.formView) {\n            this.formView.urlInputView.fieldView.select();\n        }\n        this.formView.enableCssTransitions();\n    }\n    /**\n\t * Closes the form view. Decides whether the balloon should be hidden completely or if the action view should be shown. This is\n\t * decided upon the link command value (which has a value if the document selection is in the link).\n\t *\n\t * Additionally, if any {@link module:link/linkconfig~LinkConfig#decorators} are defined in the editor configuration, the state of\n\t * switch buttons responsible for manual decorator handling is restored.\n\t */ _closeFormView() {\n        const linkCommand = this.editor.commands.get('link');\n        // Restore manual decorator states to represent the current model state. This case is important to reset the switch buttons\n        // when the user cancels the editing form.\n        linkCommand.restoreManualDecoratorStates();\n        if (linkCommand.value !== undefined) {\n            this._removeFormView();\n        } else {\n            this._hideUI();\n        }\n    }\n    /**\n\t * Removes the {@link #formView} from the {@link #_balloon}.\n\t */ _removeFormView() {\n        if (this._isFormInPanel) {\n            // Blur the input element before removing it from DOM to prevent issues in some browsers.\n            // See https://github.com/ckeditor/ckeditor5/issues/1501.\n            this.formView.saveButtonView.focus();\n            // Reset the URL field to update the state of the submit button.\n            this.formView.urlInputView.fieldView.reset();\n            this._balloon.remove(this.formView);\n            // Because the form has an input which has focus, the focus must be brought back\n            // to the editor. Otherwise, it would be lost.\n            this.editor.editing.view.focus();\n            this._hideFakeVisualSelection();\n        }\n    }\n    /**\n\t * Shows the correct UI type. It is either {@link #formView} or {@link #actionsView}.\n\t *\n\t * @internal\n\t */ _showUI(forceVisible = false) {\n        if (!this.formView) {\n            this._createViews();\n        }\n        // When there's no link under the selection, go straight to the editing UI.\n        if (!this._getSelectedLinkElement()) {\n            // Show visual selection on a text without a link when the contextual balloon is displayed.\n            // See https://github.com/ckeditor/ckeditor5/issues/4721.\n            this._showFakeVisualSelection();\n            this._addActionsView();\n            // Be sure panel with link is visible.\n            if (forceVisible) {\n                this._balloon.showStack('main');\n            }\n            this._addFormView();\n        } else {\n            // Go to the editing UI if actions are already visible.\n            if (this._areActionsVisible) {\n                this._addFormView();\n            } else {\n                this._addActionsView();\n            }\n            // Be sure panel with link is visible.\n            if (forceVisible) {\n                this._balloon.showStack('main');\n            }\n        }\n        // Begin responding to ui#update once the UI is added.\n        this._startUpdatingUI();\n    }\n    /**\n\t * Removes the {@link #formView} from the {@link #_balloon}.\n\t *\n\t * See {@link #_addFormView}, {@link #_addActionsView}.\n\t */ _hideUI() {\n        if (!this._isUIInPanel) {\n            return;\n        }\n        const editor = this.editor;\n        this.stopListening(editor.ui, 'update');\n        this.stopListening(this._balloon, 'change:visibleView');\n        // Make sure the focus always gets back to the editable _before_ removing the focused form view.\n        // Doing otherwise causes issues in some browsers. See https://github.com/ckeditor/ckeditor5-link/issues/193.\n        editor.editing.view.focus();\n        // Remove form first because it's on top of the stack.\n        this._removeFormView();\n        // Then remove the actions view because it's beneath the form.\n        this._balloon.remove(this.actionsView);\n        this._hideFakeVisualSelection();\n    }\n    /**\n\t * Makes the UI react to the {@link module:ui/editorui/editorui~EditorUI#event:update} event to\n\t * reposition itself when the editor UI should be refreshed.\n\t *\n\t * See: {@link #_hideUI} to learn when the UI stops reacting to the `update` event.\n\t */ _startUpdatingUI() {\n        const editor = this.editor;\n        const viewDocument = editor.editing.view.document;\n        let prevSelectedLink = this._getSelectedLinkElement();\n        let prevSelectionParent = getSelectionParent();\n        const update = ()=>{\n            const selectedLink = this._getSelectedLinkElement();\n            const selectionParent = getSelectionParent();\n            // Hide the panel if:\n            //\n            // * the selection went out of the EXISTING link element. E.g. user moved the caret out\n            //   of the link,\n            // * the selection went to a different parent when creating a NEW link. E.g. someone\n            //   else modified the document.\n            // * the selection has expanded (e.g. displaying link actions then pressing SHIFT+Right arrow).\n            //\n            // Note: #_getSelectedLinkElement will return a link for a non-collapsed selection only\n            // when fully selected.\n            if (prevSelectedLink && !selectedLink || !prevSelectedLink && selectionParent !== prevSelectionParent) {\n                this._hideUI();\n            } else if (this._isUIVisible) {\n                // If still in a link element, simply update the position of the balloon.\n                // If there was no link (e.g. inserting one), the balloon must be moved\n                // to the new position in the editing view (a new native DOM range).\n                this._balloon.updatePosition(this._getBalloonPositionData());\n            }\n            prevSelectedLink = selectedLink;\n            prevSelectionParent = selectionParent;\n        };\n        function getSelectionParent() {\n            return viewDocument.selection.focus.getAncestors().reverse().find((node)=>node.is('element'));\n        }\n        this.listenTo(editor.ui, 'update', update);\n        this.listenTo(this._balloon, 'change:visibleView', update);\n    }\n    /**\n\t * Returns `true` when {@link #formView} is in the {@link #_balloon}.\n\t */ get _isFormInPanel() {\n        return !!this.formView && this._balloon.hasView(this.formView);\n    }\n    /**\n\t * Returns `true` when {@link #actionsView} is in the {@link #_balloon}.\n\t */ get _areActionsInPanel() {\n        return !!this.actionsView && this._balloon.hasView(this.actionsView);\n    }\n    /**\n\t * Returns `true` when {@link #actionsView} is in the {@link #_balloon} and it is\n\t * currently visible.\n\t */ get _areActionsVisible() {\n        return !!this.actionsView && this._balloon.visibleView === this.actionsView;\n    }\n    /**\n\t * Returns `true` when {@link #actionsView} or {@link #formView} is in the {@link #_balloon}.\n\t */ get _isUIInPanel() {\n        return this._isFormInPanel || this._areActionsInPanel;\n    }\n    /**\n\t * Returns `true` when {@link #actionsView} or {@link #formView} is in the {@link #_balloon} and it is\n\t * currently visible.\n\t */ get _isUIVisible() {\n        const visibleView = this._balloon.visibleView;\n        return !!this.formView && visibleView == this.formView || this._areActionsVisible;\n    }\n    /**\n\t * Returns positioning options for the {@link #_balloon}. They control the way the balloon is attached\n\t * to the target element or selection.\n\t *\n\t * If the selection is collapsed and inside a link element, the panel will be attached to the\n\t * entire link element. Otherwise, it will be attached to the selection.\n\t */ _getBalloonPositionData() {\n        const view = this.editor.editing.view;\n        const model = this.editor.model;\n        const viewDocument = view.document;\n        let target;\n        if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {\n            // There are cases when we highlight selection using a marker (#7705, #4721).\n            const markerViewElements = Array.from(this.editor.editing.mapper.markerNameToElements(VISUAL_SELECTION_MARKER_NAME));\n            const newRange = view.createRange(view.createPositionBefore(markerViewElements[0]), view.createPositionAfter(markerViewElements[markerViewElements.length - 1]));\n            target = view.domConverter.viewRangeToDom(newRange);\n        } else {\n            // Make sure the target is calculated on demand at the last moment because a cached DOM range\n            // (which is very fragile) can desynchronize with the state of the editing view if there was\n            // any rendering done in the meantime. This can happen, for instance, when an inline widget\n            // gets unlinked.\n            target = ()=>{\n                const targetLink = this._getSelectedLinkElement();\n                return targetLink ? // When selection is inside link element, then attach panel to this element.\n                view.domConverter.mapViewToDom(targetLink) : // Otherwise attach panel to the selection.\n                view.domConverter.viewRangeToDom(viewDocument.selection.getFirstRange());\n            };\n        }\n        return {\n            target\n        };\n    }\n    /**\n\t * Returns the link {@link module:engine/view/attributeelement~AttributeElement} under\n\t * the {@link module:engine/view/document~Document editing view's} selection or `null`\n\t * if there is none.\n\t *\n\t * **Note**: For a non–collapsed selection, the link element is returned when **fully**\n\t * selected and the **only** element within the selection boundaries, or when\n\t * a linked widget is selected.\n\t */ _getSelectedLinkElement() {\n        const view = this.editor.editing.view;\n        const selection = view.document.selection;\n        const selectedElement = selection.getSelectedElement();\n        // The selection is collapsed or some widget is selected (especially inline widget).\n        if (selection.isCollapsed || selectedElement && isWidget(selectedElement)) {\n            return findLinkElementAncestor(selection.getFirstPosition());\n        } else {\n            // The range for fully selected link is usually anchored in adjacent text nodes.\n            // Trim it to get closer to the actual link element.\n            const range = selection.getFirstRange().getTrimmed();\n            const startLink = findLinkElementAncestor(range.start);\n            const endLink = findLinkElementAncestor(range.end);\n            if (!startLink || startLink != endLink) {\n                return null;\n            }\n            // Check if the link element is fully selected.\n            if (view.createRangeIn(startLink).getTrimmed().isEqual(range)) {\n                return startLink;\n            } else {\n                return null;\n            }\n        }\n    }\n    /**\n\t * Displays a fake visual selection when the contextual balloon is displayed.\n\t *\n\t * This adds a 'link-ui' marker into the document that is rendered as a highlight on selected text fragment.\n\t */ _showFakeVisualSelection() {\n        const model = this.editor.model;\n        model.change((writer)=>{\n            const range = model.document.selection.getFirstRange();\n            if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {\n                writer.updateMarker(VISUAL_SELECTION_MARKER_NAME, {\n                    range\n                });\n            } else {\n                if (range.start.isAtEnd) {\n                    const startPosition = range.start.getLastMatchingPosition(({ item })=>!model.schema.isContent(item), {\n                        boundaries: range\n                    });\n                    writer.addMarker(VISUAL_SELECTION_MARKER_NAME, {\n                        usingOperation: false,\n                        affectsData: false,\n                        range: writer.createRange(startPosition, range.end)\n                    });\n                } else {\n                    writer.addMarker(VISUAL_SELECTION_MARKER_NAME, {\n                        usingOperation: false,\n                        affectsData: false,\n                        range\n                    });\n                }\n            }\n        });\n    }\n    /**\n\t * Hides the fake visual selection created in {@link #_showFakeVisualSelection}.\n\t */ _hideFakeVisualSelection() {\n        const model = this.editor.model;\n        if (model.markers.has(VISUAL_SELECTION_MARKER_NAME)) {\n            model.change((writer)=>{\n                writer.removeMarker(VISUAL_SELECTION_MARKER_NAME);\n            });\n        }\n    }\n}\n/**\n * Returns a link element if there's one among the ancestors of the provided `Position`.\n *\n * @param View position to analyze.\n * @returns Link element at the position or null.\n */ function findLinkElementAncestor(position) {\n    return position.getAncestors().find((ancestor)=>isLinkElement(ancestor)) || null;\n}\n/**\n * Returns link form validation callbacks.\n *\n * @param editor Editor instance.\n */ function getFormValidators(editor) {\n    const t = editor.t;\n    const allowCreatingEmptyLinks = editor.config.get('link.allowCreatingEmptyLinks');\n    return [\n        (form)=>{\n            if (!allowCreatingEmptyLinks && !form.url.length) {\n                return t('Link URL must not be empty.');\n            }\n        }\n    ];\n}\n\nconst MIN_LINK_LENGTH_WITH_SPACE_AT_END = 4; // Ie: \"t.co \" (length 5).\n// This was a tweak from https://gist.github.com/dperini/729294.\nconst URL_REG_EXP = new RegExp(// Group 1: Line start or after a space.\n'(^|\\\\s)' + // Group 2: Detected URL (or e-mail).\n'(' + // Protocol identifier or short syntax \"//\"\n// a. Full form http://user@foo.bar.baz:8080/foo/bar.html#baz?foo=bar\n'(' + '(?:(?:(?:https?|ftp):)?\\\\/\\\\/)' + // BasicAuth using user:pass (optional)\n'(?:\\\\S+(?::\\\\S*)?@)?' + '(?:' + // IP address dotted notation octets\n// excludes loopback network 0.0.0.0\n// excludes reserved space >= 224.0.0.0\n// excludes network & broadcast addresses\n// (first & last IP address of each class)\n'(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])' + '(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}' + '(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))' + '|' + '(' + // Do not allow `www.foo` - see https://github.com/ckeditor/ckeditor5/issues/8050.\n'((?!www\\\\.)|(www\\\\.))' + // Host & domain names.\n'(?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.)+' + // TLD identifier name.\n'(?:[a-z\\\\u00a1-\\\\uffff]{2,63})' + ')' + ')' + // port number (optional)\n'(?::\\\\d{2,5})?' + // resource path (optional)\n'(?:[/?#]\\\\S*)?' + ')' + '|' + // b. Short form (either www.example.com or example@example.com)\n'(' + '(www.|(\\\\S+@))' + // Host & domain names.\n'((?![-_])(?:[-_a-z0-9\\\\u00a1-\\\\uffff]{1,63}\\\\.))+' + // TLD identifier name.\n'(?:[a-z\\\\u00a1-\\\\uffff]{2,63})' + ')' + ')$', 'i');\nconst URL_GROUP_IN_MATCH = 2;\n/**\n * The autolink plugin.\n */ class AutoLink extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Delete,\n            LinkEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'AutoLink';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        selection.on('change:range', ()=>{\n            // Disable plugin when selection is inside a code block.\n            this.isEnabled = !selection.anchor.parent.is('element', 'codeBlock');\n        });\n        this._enableTypingHandling();\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        this._enableEnterHandling();\n        this._enableShiftEnterHandling();\n        this._enablePasteLinking();\n    }\n    /**\n\t * For given position, returns a range that includes the whole link that contains the position.\n\t *\n\t * If position is not inside a link, returns `null`.\n\t */ _expandLinkRange(model, position) {\n        if (position.textNode && position.textNode.hasAttribute('linkHref')) {\n            return findAttributeRange(position, 'linkHref', position.textNode.getAttribute('linkHref'), model);\n        } else {\n            return null;\n        }\n    }\n    /**\n\t * Extends the document selection to includes all links that intersects with given `selectedRange`.\n\t */ _selectEntireLinks(writer, selectedRange) {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        const selStart = selection.getFirstPosition();\n        const selEnd = selection.getLastPosition();\n        let updatedSelection = selectedRange.getJoined(this._expandLinkRange(model, selStart) || selectedRange);\n        if (updatedSelection) {\n            updatedSelection = updatedSelection.getJoined(this._expandLinkRange(model, selEnd) || selectedRange);\n        }\n        if (updatedSelection && (updatedSelection.start.isBefore(selStart) || updatedSelection.end.isAfter(selEnd))) {\n            // Only update the selection if it changed.\n            writer.setSelection(updatedSelection);\n        }\n    }\n    /**\n\t * Enables autolinking on pasting a URL when some content is selected.\n\t */ _enablePasteLinking() {\n        const editor = this.editor;\n        const model = editor.model;\n        const selection = model.document.selection;\n        const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n        const linkCommand = editor.commands.get('link');\n        clipboardPipeline.on('inputTransformation', (evt, data)=>{\n            if (!this.isEnabled || !linkCommand.isEnabled || selection.isCollapsed || data.method !== 'paste') {\n                // Abort if we are disabled or the selection is collapsed.\n                return;\n            }\n            if (selection.rangeCount > 1) {\n                // Abort if there are multiple selection ranges.\n                return;\n            }\n            const selectedRange = selection.getFirstRange();\n            const newLink = data.dataTransfer.getData('text/plain');\n            if (!newLink) {\n                // Abort if there is no plain text on the clipboard.\n                return;\n            }\n            const matches = newLink.match(URL_REG_EXP);\n            // If the text in the clipboard has a URL, and that URL is the whole clipboard.\n            if (matches && matches[2] === newLink) {\n                model.change((writer)=>{\n                    this._selectEntireLinks(writer, selectedRange);\n                    linkCommand.execute(newLink);\n                });\n                evt.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * Enables autolinking on typing.\n\t */ _enableTypingHandling() {\n        const editor = this.editor;\n        const watcher = new TextWatcher(editor.model, (text)=>{\n            // 1. Detect <kbd>Space</kbd> after a text with a potential link.\n            if (!isSingleSpaceAtTheEnd(text)) {\n                return;\n            }\n            // 2. Check text before last typed <kbd>Space</kbd>.\n            const url = getUrlAtTextEnd(text.substr(0, text.length - 1));\n            if (url) {\n                return {\n                    url\n                };\n            }\n        });\n        watcher.on('matched:data', (evt, data)=>{\n            const { batch, range, url } = data;\n            if (!batch.isTyping) {\n                return;\n            }\n            const linkEnd = range.end.getShiftedBy(-1); // Executed after a space character.\n            const linkStart = linkEnd.getShiftedBy(-url.length);\n            const linkRange = editor.model.createRange(linkStart, linkEnd);\n            this._applyAutoLink(url, linkRange);\n        });\n        watcher.bind('isEnabled').to(this);\n    }\n    /**\n\t * Enables autolinking on the <kbd>Enter</kbd> key.\n\t */ _enableEnterHandling() {\n        const editor = this.editor;\n        const model = editor.model;\n        const enterCommand = editor.commands.get('enter');\n        if (!enterCommand) {\n            return;\n        }\n        enterCommand.on('execute', ()=>{\n            const position = model.document.selection.getFirstPosition();\n            if (!position.parent.previousSibling) {\n                return;\n            }\n            const rangeToCheck = model.createRangeIn(position.parent.previousSibling);\n            this._checkAndApplyAutoLinkOnRange(rangeToCheck);\n        });\n    }\n    /**\n\t * Enables autolinking on the <kbd>Shift</kbd>+<kbd>Enter</kbd> keyboard shortcut.\n\t */ _enableShiftEnterHandling() {\n        const editor = this.editor;\n        const model = editor.model;\n        const shiftEnterCommand = editor.commands.get('shiftEnter');\n        if (!shiftEnterCommand) {\n            return;\n        }\n        shiftEnterCommand.on('execute', ()=>{\n            const position = model.document.selection.getFirstPosition();\n            const rangeToCheck = model.createRange(model.createPositionAt(position.parent, 0), position.getShiftedBy(-1));\n            this._checkAndApplyAutoLinkOnRange(rangeToCheck);\n        });\n    }\n    /**\n\t * Checks if the passed range contains a linkable text.\n\t */ _checkAndApplyAutoLinkOnRange(rangeToCheck) {\n        const model = this.editor.model;\n        const { text, range } = getLastTextLine(rangeToCheck, model);\n        const url = getUrlAtTextEnd(text);\n        if (url) {\n            const linkRange = model.createRange(range.end.getShiftedBy(-url.length), range.end);\n            this._applyAutoLink(url, linkRange);\n        }\n    }\n    /**\n\t * Applies a link on a given range if the link should be applied.\n\t *\n\t * @param url The URL to link.\n\t * @param range The text range to apply the link attribute to.\n\t */ _applyAutoLink(url, range) {\n        const model = this.editor.model;\n        const defaultProtocol = this.editor.config.get('link.defaultProtocol');\n        const fullUrl = addLinkProtocolIfApplicable(url, defaultProtocol);\n        if (!this.isEnabled || !isLinkAllowedOnRange(range, model) || !linkHasProtocol(fullUrl) || linkIsAlreadySet(range)) {\n            return;\n        }\n        this._persistAutoLink(fullUrl, range);\n    }\n    /**\n\t * Enqueues autolink changes in the model.\n\t *\n\t * @param url The URL to link.\n\t * @param range The text range to apply the link attribute to.\n\t */ _persistAutoLink(url, range) {\n        const model = this.editor.model;\n        const deletePlugin = this.editor.plugins.get('Delete');\n        // Enqueue change to make undo step.\n        model.enqueueChange((writer)=>{\n            writer.setAttribute('linkHref', url, range);\n            model.enqueueChange(()=>{\n                deletePlugin.requestUndoOnBackspace();\n            });\n        });\n    }\n}\n// Check if text should be evaluated by the plugin in order to reduce number of RegExp checks on whole text.\nfunction isSingleSpaceAtTheEnd(text) {\n    return text.length > MIN_LINK_LENGTH_WITH_SPACE_AT_END && text[text.length - 1] === ' ' && text[text.length - 2] !== ' ';\n}\nfunction getUrlAtTextEnd(text) {\n    const match = URL_REG_EXP.exec(text);\n    return match ? match[URL_GROUP_IN_MATCH] : null;\n}\nfunction isLinkAllowedOnRange(range, model) {\n    return model.schema.checkAttributeInSelection(model.createSelection(range), 'linkHref');\n}\nfunction linkIsAlreadySet(range) {\n    const item = range.start.nodeAfter;\n    return !!item && item.hasAttribute('linkHref');\n}\n\n/**\n * The link plugin.\n *\n * This is a \"glue\" plugin that loads the {@link module:link/linkediting~LinkEditing link editing feature}\n * and {@link module:link/linkui~LinkUI link UI feature}.\n */ class Link extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LinkEditing,\n            LinkUI,\n            AutoLink\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Link';\n    }\n}\n\n/**\n * The link image engine feature.\n *\n * It accepts the `linkHref=\"url\"` attribute in the model for the {@link module:image/image~Image `<imageBlock>`} element\n * which allows linking images.\n */ class LinkImageEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            'ImageEditing',\n            'ImageUtils',\n            LinkEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LinkImageEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        if (editor.plugins.has('ImageBlockEditing')) {\n            schema.extend('imageBlock', {\n                allowAttributes: [\n                    'linkHref'\n                ]\n            });\n        }\n        editor.conversion.for('upcast').add(upcastLink(editor));\n        editor.conversion.for('downcast').add(downcastImageLink(editor));\n        // Definitions for decorators are provided by the `link` command and the `LinkEditing` plugin.\n        this._enableAutomaticDecorators();\n        this._enableManualDecorators();\n    }\n    /**\n\t * Processes {@link module:link/linkconfig~LinkDecoratorAutomaticDefinition automatic decorators} definitions and\n\t * attaches proper converters that will work when linking an image.`\n\t */ _enableAutomaticDecorators() {\n        const editor = this.editor;\n        const command = editor.commands.get('link');\n        const automaticDecorators = command.automaticDecorators;\n        if (automaticDecorators.length) {\n            editor.conversion.for('downcast').add(automaticDecorators.getDispatcherForLinkedImage());\n        }\n    }\n    /**\n\t * Processes transformed {@link module:link/utils/manualdecorator~ManualDecorator} instances and attaches proper converters\n\t * that will work when linking an image.\n\t */ _enableManualDecorators() {\n        const editor = this.editor;\n        const command = editor.commands.get('link');\n        for (const decorator of command.manualDecorators){\n            if (editor.plugins.has('ImageBlockEditing')) {\n                editor.model.schema.extend('imageBlock', {\n                    allowAttributes: decorator.id\n                });\n            }\n            if (editor.plugins.has('ImageInlineEditing')) {\n                editor.model.schema.extend('imageInline', {\n                    allowAttributes: decorator.id\n                });\n            }\n            editor.conversion.for('downcast').add(downcastImageLinkManualDecorator(decorator));\n            editor.conversion.for('upcast').add(upcastImageLinkManualDecorator(editor, decorator));\n        }\n    }\n}\n/**\n * Returns a converter for linked block images that consumes the \"href\" attribute\n * if a link contains an image.\n *\n * @param editor The editor instance.\n */ function upcastLink(editor) {\n    const isImageInlinePluginLoaded = editor.plugins.has('ImageInlineEditing');\n    const imageUtils = editor.plugins.get('ImageUtils');\n    return (dispatcher)=>{\n        dispatcher.on('element:a', (evt, data, conversionApi)=>{\n            const viewLink = data.viewItem;\n            const imageInLink = imageUtils.findViewImgElement(viewLink);\n            if (!imageInLink) {\n                return;\n            }\n            const blockImageView = imageInLink.findAncestor((element)=>imageUtils.isBlockImageView(element));\n            // There are four possible cases to consider here\n            //\n            // 1. A \"root > ... > figure.image > a > img\" structure.\n            // 2. A \"root > ... > figure.image > a > picture > img\" structure.\n            // 3. A \"root > ... > block > a > img\" structure.\n            // 4. A \"root > ... > block > a > picture > img\" structure.\n            //\n            // but the last 2 cases should only be considered by this converter when the inline image plugin\n            // is NOT loaded in the editor (because otherwise, that would be a plain, linked inline image).\n            if (isImageInlinePluginLoaded && !blockImageView) {\n                return;\n            }\n            // There's an image inside an <a> element - we consume it so it won't be picked up by the Link plugin.\n            const consumableAttributes = {\n                attributes: [\n                    'href'\n                ]\n            };\n            // Consume the `href` attribute so the default one will not convert it to $text attribute.\n            if (!conversionApi.consumable.consume(viewLink, consumableAttributes)) {\n                // Might be consumed by something else - i.e. other converter with priority=highest - a standard check.\n                return;\n            }\n            const linkHref = viewLink.getAttribute('href');\n            // Missing the 'href' attribute.\n            if (!linkHref) {\n                return;\n            }\n            // A full definition of the image feature.\n            // figure > a > img: parent of the view link element is an image element (figure).\n            let modelElement = data.modelCursor.parent;\n            if (!modelElement.is('element', 'imageBlock')) {\n                // a > img: parent of the view link is not the image (figure) element. We need to convert it manually.\n                const conversionResult = conversionApi.convertItem(imageInLink, data.modelCursor);\n                // Set image range as conversion result.\n                data.modelRange = conversionResult.modelRange;\n                // Continue conversion where image conversion ends.\n                data.modelCursor = conversionResult.modelCursor;\n                modelElement = data.modelCursor.nodeBefore;\n            }\n            if (modelElement && modelElement.is('element', 'imageBlock')) {\n                // Set the linkHref attribute from link element on model image element.\n                conversionApi.writer.setAttribute('linkHref', linkHref, modelElement);\n            }\n        }, {\n            priority: 'high'\n        });\n    // Using the same priority that `upcastImageLinkManualDecorator()` converter guarantees\n    // that manual decorators will decorate the proper element.\n    };\n}\n/**\n * Creates a converter that adds `<a>` to linked block image view elements.\n */ function downcastImageLink(editor) {\n    const imageUtils = editor.plugins.get('ImageUtils');\n    return (dispatcher)=>{\n        dispatcher.on('attribute:linkHref:imageBlock', (evt, data, conversionApi)=>{\n            if (!conversionApi.consumable.consume(data.item, evt.name)) {\n                return;\n            }\n            // The image will be already converted - so it will be present in the view.\n            const viewFigure = conversionApi.mapper.toViewElement(data.item);\n            const writer = conversionApi.writer;\n            // But we need to check whether the link element exists.\n            const linkInImage = Array.from(viewFigure.getChildren()).find((child)=>child.is('element', 'a'));\n            const viewImage = imageUtils.findViewImgElement(viewFigure);\n            // <picture>...<img/></picture> or <img/>\n            const viewImgOrPicture = viewImage.parent.is('element', 'picture') ? viewImage.parent : viewImage;\n            // If so, update the attribute if it's defined or remove the entire link if the attribute is empty.\n            if (linkInImage) {\n                if (data.attributeNewValue) {\n                    writer.setAttribute('href', data.attributeNewValue, linkInImage);\n                } else {\n                    writer.move(writer.createRangeOn(viewImgOrPicture), writer.createPositionAt(viewFigure, 0));\n                    writer.remove(linkInImage);\n                }\n            } else {\n                // But if it does not exist. Let's wrap already converted image by newly created link element.\n                // 1. Create an empty link element.\n                const linkElement = writer.createContainerElement('a', {\n                    href: data.attributeNewValue\n                });\n                // 2. Insert link inside the associated image.\n                writer.insert(writer.createPositionAt(viewFigure, 0), linkElement);\n                // 3. Move the image to the link.\n                writer.move(writer.createRangeOn(viewImgOrPicture), writer.createPositionAt(linkElement, 0));\n            }\n        }, {\n            priority: 'high'\n        });\n    };\n}\n/**\n * Returns a converter that decorates the `<a>` element when the image is the link label.\n */ function downcastImageLinkManualDecorator(decorator) {\n    return (dispatcher)=>{\n        dispatcher.on(`attribute:${decorator.id}:imageBlock`, (evt, data, conversionApi)=>{\n            const viewFigure = conversionApi.mapper.toViewElement(data.item);\n            const linkInImage = Array.from(viewFigure.getChildren()).find((child)=>child.is('element', 'a'));\n            // The <a> element was removed by the time this converter is executed.\n            // It may happen when the base `linkHref` and decorator attributes are removed\n            // at the same time (see #8401).\n            if (!linkInImage) {\n                return;\n            }\n            for (const [key, val] of toMap(decorator.attributes)){\n                conversionApi.writer.setAttribute(key, val, linkInImage);\n            }\n            if (decorator.classes) {\n                conversionApi.writer.addClass(decorator.classes, linkInImage);\n            }\n            for(const key in decorator.styles){\n                conversionApi.writer.setStyle(key, decorator.styles[key], linkInImage);\n            }\n        });\n    };\n}\n/**\n * Returns a converter that checks whether manual decorators should be applied to the link.\n */ function upcastImageLinkManualDecorator(editor, decorator) {\n    const isImageInlinePluginLoaded = editor.plugins.has('ImageInlineEditing');\n    const imageUtils = editor.plugins.get('ImageUtils');\n    return (dispatcher)=>{\n        dispatcher.on('element:a', (evt, data, conversionApi)=>{\n            const viewLink = data.viewItem;\n            const imageInLink = imageUtils.findViewImgElement(viewLink);\n            // We need to check whether an image is inside a link because the converter handles\n            // only manual decorators for linked images. See #7975.\n            if (!imageInLink) {\n                return;\n            }\n            const blockImageView = imageInLink.findAncestor((element)=>imageUtils.isBlockImageView(element));\n            if (isImageInlinePluginLoaded && !blockImageView) {\n                return;\n            }\n            const matcher = new Matcher(decorator._createPattern());\n            const result = matcher.match(viewLink);\n            // The link element does not have required attributes or/and proper values.\n            if (!result) {\n                return;\n            }\n            // Check whether we can consume those attributes.\n            if (!conversionApi.consumable.consume(viewLink, result.match)) {\n                return;\n            }\n            // At this stage we can assume that we have the `<imageBlock>` element.\n            // `nodeBefore` comes after conversion: `<a><img></a>`.\n            // `parent` comes with full image definition: `<figure><a><img></a></figure>.\n            // See the body of the `upcastLink()` function.\n            const modelElement = data.modelCursor.nodeBefore || data.modelCursor.parent;\n            conversionApi.writer.setAttribute(decorator.id, true, modelElement);\n        }, {\n            priority: 'high'\n        });\n    // Using the same priority that `upcastLink()` converter guarantees that the linked image was properly converted.\n    };\n}\n\n/**\n * The link image UI plugin.\n *\n * This plugin provides the `'linkImage'` button that can be displayed in the {@link module:image/imagetoolbar~ImageToolbar}.\n * It can be used to wrap images in links.\n */ class LinkImageUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LinkEditing,\n            LinkUI,\n            'ImageBlockEditing'\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LinkImageUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const viewDocument = editor.editing.view.document;\n        this.listenTo(viewDocument, 'click', (evt, data)=>{\n            if (this._isSelectedLinkedImage(editor.model.document.selection)) {\n                // Prevent browser navigation when clicking a linked image.\n                data.preventDefault();\n                // Block the `LinkUI` plugin when an image was clicked.\n                // In such a case, we'd like to display the image toolbar.\n                evt.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n        this._createToolbarLinkImageButton();\n    }\n    /**\n\t * Creates a `LinkImageUI` button view.\n\t *\n\t * Clicking this button shows a {@link module:link/linkui~LinkUI#_balloon} attached to the selection.\n\t * When an image is already linked, the view shows {@link module:link/linkui~LinkUI#actionsView} or\n\t * {@link module:link/linkui~LinkUI#formView} if it is not.\n\t */ _createToolbarLinkImageButton() {\n        const editor = this.editor;\n        const t = editor.t;\n        editor.ui.componentFactory.add('linkImage', (locale)=>{\n            const button = new ButtonView(locale);\n            const plugin = editor.plugins.get('LinkUI');\n            const linkCommand = editor.commands.get('link');\n            button.set({\n                isEnabled: true,\n                label: t('Link image'),\n                icon: linkIcon,\n                keystroke: LINK_KEYSTROKE,\n                tooltip: true,\n                isToggleable: true\n            });\n            // Bind button to the command.\n            button.bind('isEnabled').to(linkCommand, 'isEnabled');\n            button.bind('isOn').to(linkCommand, 'value', (value)=>!!value);\n            // Show the actionsView or formView (both from LinkUI) on button click depending on whether the image is linked already.\n            this.listenTo(button, 'execute', ()=>{\n                if (this._isSelectedLinkedImage(editor.model.document.selection)) {\n                    plugin._addActionsView();\n                } else {\n                    plugin._showUI(true);\n                }\n            });\n            return button;\n        });\n    }\n    /**\n\t * Returns true if a linked image (either block or inline) is the only selected element\n\t * in the model document.\n\t */ _isSelectedLinkedImage(selection) {\n        const selectedModelElement = selection.getSelectedElement();\n        const imageUtils = this.editor.plugins.get('ImageUtils');\n        return imageUtils.isImage(selectedModelElement) && selectedModelElement.hasAttribute('linkHref');\n    }\n}\n\n/**\n * The `LinkImage` plugin.\n *\n * This is a \"glue\" plugin that loads the {@link module:link/linkimageediting~LinkImageEditing link image editing feature}\n * and {@link module:link/linkimageui~LinkImageUI link image UI feature}.\n */ class LinkImage extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LinkImageEditing,\n            LinkImageUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LinkImage';\n    }\n}\n\nexport { AutoLink, Link, LinkCommand, LinkEditing, LinkImage, LinkImageEditing, LinkImageUI, LinkUI, UnlinkCommand };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { Enter } from '@ckeditor/ckeditor5-enter/dist/index.js';\nimport { toArray, first, uid, CKEditorError, FocusTracker, KeystrokeHandler, global, getCode, parseKeystroke, getLocalizedArrowKeyCodeDirection, createElement, logWarning } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView, View, ViewCollection, FocusCycler, addKeyboardHandlingForGrid, CollapsibleView, LabeledFieldView, createLabeledInputNumber, SwitchButtonView, createDropdown, SplitButtonView, focusChildOnDropdownOpen, MenuBarMenuView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { DomEventObserver, Matcher, TreeWalker, getFillerOffset } from '@ckeditor/ckeditor5-engine/dist/index.js';\n\n/**\n * Document list blocks iterator.\n */ class ListWalker {\n    /**\n\t * The start list item block element.\n\t */ _startElement;\n    /**\n\t * The reference indent. Initialized by the indent of the start block.\n\t */ _referenceIndent;\n    /**\n\t * The iterating direction.\n\t */ _isForward;\n    /**\n\t * Whether start block should be included in the result (if it's matching other criteria).\n\t */ _includeSelf;\n    /**\n\t * Additional attributes that must be the same for each block.\n\t */ _sameAttributes;\n    /**\n\t * Whether blocks with the same indent level as the start block should be included in the result.\n\t */ _sameIndent;\n    /**\n\t * Whether blocks with a lower indent level than the start block should be included in the result.\n\t */ _lowerIndent;\n    /**\n\t * Whether blocks with a higher indent level than the start block should be included in the result.\n\t */ _higherIndent;\n    /**\n\t * Creates a document list iterator.\n\t *\n\t * @param startElement The start list item block element.\n\t * @param options.direction The iterating direction.\n\t * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n\t * @param options.sameAttributes Additional attributes that must be the same for each block.\n\t * @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n\t * in the result.\n\t * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n\t * in the result.\n\t * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n\t * in the result.\n\t */ constructor(startElement, options){\n        this._startElement = startElement;\n        this._referenceIndent = startElement.getAttribute('listIndent');\n        this._isForward = options.direction == 'forward';\n        this._includeSelf = !!options.includeSelf;\n        this._sameAttributes = toArray(options.sameAttributes || []);\n        this._sameIndent = !!options.sameIndent;\n        this._lowerIndent = !!options.lowerIndent;\n        this._higherIndent = !!options.higherIndent;\n    }\n    /**\n\t * Performs only first step of iteration and returns the result.\n\t *\n\t * @param startElement The start list item block element.\n\t * @param options.direction The iterating direction.\n\t * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).\n\t * @param options.sameAttributes Additional attributes that must be the same for each block.\n\t * @param options.sameIndent Whether blocks with the same indent level as the start block should be included\n\t * in the result.\n\t * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included\n\t * in the result.\n\t * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n\t * in the result.\n\t */ static first(startElement, options) {\n        const walker = new this(startElement, options);\n        const iterator = walker[Symbol.iterator]();\n        return first(iterator);\n    }\n    /**\n\t * Iterable interface.\n\t */ *[Symbol.iterator]() {\n        const nestedItems = [];\n        for (const { node } of iterateSiblingListBlocks(this._getStartNode(), this._isForward ? 'forward' : 'backward')){\n            const indent = node.getAttribute('listIndent');\n            // Leaving a nested list.\n            if (indent < this._referenceIndent) {\n                // Abort searching blocks.\n                if (!this._lowerIndent) {\n                    break;\n                }\n                // While searching for lower indents, update the reference indent to find another parent in the next step.\n                this._referenceIndent = indent;\n            } else if (indent > this._referenceIndent) {\n                // Ignore nested blocks.\n                if (!this._higherIndent) {\n                    continue;\n                }\n                // Collect nested blocks to verify if they are really nested, or it's a different item.\n                if (!this._isForward) {\n                    nestedItems.push(node);\n                    continue;\n                }\n            } else {\n                // Ignore same indent block.\n                if (!this._sameIndent) {\n                    // While looking for nested blocks, stop iterating while encountering first same indent block.\n                    if (this._higherIndent) {\n                        // No more nested blocks so yield nested items.\n                        if (nestedItems.length) {\n                            yield* nestedItems;\n                            nestedItems.length = 0;\n                        }\n                        break;\n                    }\n                    continue;\n                }\n                // Abort if item has any additionally specified attribute different.\n                if (this._sameAttributes.some((attr)=>node.getAttribute(attr) !== this._startElement.getAttribute(attr))) {\n                    break;\n                }\n            }\n            // There is another block for the same list item so the nested items were in the same list item.\n            if (nestedItems.length) {\n                yield* nestedItems;\n                nestedItems.length = 0;\n            }\n            yield node;\n        }\n    }\n    /**\n\t * Returns the model element to start iterating.\n\t */ _getStartNode() {\n        if (this._includeSelf) {\n            return this._startElement;\n        }\n        return this._isForward ? this._startElement.nextSibling : this._startElement.previousSibling;\n    }\n}\n/**\n * Iterates sibling list blocks starting from the given node.\n *\n * @internal\n * @param node The model node.\n * @param direction Iteration direction.\n * @returns The object with `node` and `previous` {@link module:engine/model/element~Element blocks}.\n */ function* iterateSiblingListBlocks(node, direction = 'forward') {\n    const isForward = direction == 'forward';\n    const previousNodesByIndent = []; // Last seen nodes of lower indented lists.\n    let previous = null;\n    while(isListItemBlock(node)){\n        let previousNodeInList = null; // It's like `previous` but has the same indent as current node.\n        if (previous) {\n            const nodeIndent = node.getAttribute('listIndent');\n            const previousNodeIndent = previous.getAttribute('listIndent');\n            // Let's find previous node for the same indent.\n            // We're going to need that when we get back to previous indent.\n            if (nodeIndent > previousNodeIndent) {\n                previousNodesByIndent[previousNodeIndent] = previous;\n            } else if (nodeIndent < previousNodeIndent) {\n                previousNodeInList = previousNodesByIndent[nodeIndent];\n                previousNodesByIndent.length = nodeIndent;\n            } else {\n                previousNodeInList = previous;\n            }\n        }\n        yield {\n            node,\n            previous,\n            previousNodeInList\n        };\n        previous = node;\n        node = isForward ? node.nextSibling : node.previousSibling;\n    }\n}\n/**\n * The iterable protocol over the list elements.\n *\n * @internal\n */ class ListBlocksIterable {\n    _listHead;\n    /**\n\t * @param listHead The head element of a list.\n\t */ constructor(listHead){\n        this._listHead = listHead;\n    }\n    /**\n\t * List blocks iterator.\n\t *\n\t * Iterates over all blocks of a list.\n\t */ [Symbol.iterator]() {\n        return iterateSiblingListBlocks(this._listHead, 'forward');\n    }\n}\n\n/**\n * The list item ID generator.\n *\n * @internal\n */ class ListItemUid {\n    /**\n\t * Returns the next ID.\n\t *\n\t * @internal\n\t */ /* istanbul ignore next: static function definition -- @preserve */ static next() {\n        return uid();\n    }\n}\n/**\n * Returns true if the given model node is a list item block.\n *\n * @internal\n */ function isListItemBlock(node) {\n    return !!node && node.is('element') && node.hasAttribute('listItemId');\n}\n/**\n * Returns an array with all elements that represents the same list item.\n *\n * It means that values for `listIndent`, and `listItemId` for all items are equal.\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included\n * in the result.\n */ function getAllListItemBlocks(listItem, options = {}) {\n    return [\n        ...getListItemBlocks(listItem, {\n            ...options,\n            direction: 'backward'\n        }),\n        ...getListItemBlocks(listItem, {\n            ...options,\n            direction: 'forward'\n        })\n    ];\n}\n/**\n * Returns an array with elements that represents the same list item in the specified direction.\n *\n * It means that values for `listIndent` and `listItemId` for all items are equal.\n *\n * **Note**: For backward search the provided item is not included, but for forward search it is included in the result.\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options.direction Walking direction.\n * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included in the result.\n */ function getListItemBlocks(listItem, options = {}) {\n    const isForward = options.direction == 'forward';\n    const items = Array.from(new ListWalker(listItem, {\n        ...options,\n        includeSelf: isForward,\n        sameIndent: true,\n        sameAttributes: 'listItemId'\n    }));\n    return isForward ? items : items.reverse();\n}\n/**\n * Returns a list items nested inside the given list item.\n *\n * @internal\n */ function getNestedListBlocks(listItem) {\n    return Array.from(new ListWalker(listItem, {\n        direction: 'forward',\n        higherIndent: true\n    }));\n}\n/**\n * Returns array of all blocks/items of the same list as given block (same indent, same type and properties).\n *\n * @internal\n * @param listItem Starting list item element.\n * @param options Additional list walker options to modify the range of returned list items.\n */ function getListItems(listItem, options) {\n    const backwardBlocks = new ListWalker(listItem, {\n        sameIndent: true,\n        sameAttributes: 'listType',\n        ...options\n    });\n    const forwardBlocks = new ListWalker(listItem, {\n        sameIndent: true,\n        sameAttributes: 'listType',\n        includeSelf: true,\n        direction: 'forward',\n        ...options\n    });\n    return [\n        ...Array.from(backwardBlocks).reverse(),\n        ...forwardBlocks\n    ];\n}\n/**\n * Check if the given block is the first in the list item.\n *\n * @internal\n * @param listBlock The list block element.\n */ function isFirstBlockOfListItem(listBlock) {\n    const previousSibling = ListWalker.first(listBlock, {\n        sameIndent: true,\n        sameAttributes: 'listItemId'\n    });\n    if (!previousSibling) {\n        return true;\n    }\n    return false;\n}\n/**\n * Check if the given block is the last in the list item.\n *\n * @internal\n */ function isLastBlockOfListItem(listBlock) {\n    const nextSibling = ListWalker.first(listBlock, {\n        direction: 'forward',\n        sameIndent: true,\n        sameAttributes: 'listItemId'\n    });\n    if (!nextSibling) {\n        return true;\n    }\n    return false;\n}\n/**\n * Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n *\n * @internal\n * @param blocks The list of selected blocks.\n * @param options.withNested Whether should include nested list items.\n */ function expandListBlocksToCompleteItems(blocks, options = {}) {\n    blocks = toArray(blocks);\n    const higherIndent = options.withNested !== false;\n    const allBlocks = new Set();\n    for (const block of blocks){\n        for (const itemBlock of getAllListItemBlocks(block, {\n            higherIndent\n        })){\n            allBlocks.add(itemBlock);\n        }\n    }\n    return sortBlocks(allBlocks);\n}\n/**\n * Expands the given list of selected blocks to include all the items of the lists they're in.\n *\n * @internal\n * @param blocks The list of selected blocks.\n */ function expandListBlocksToCompleteList(blocks) {\n    blocks = toArray(blocks);\n    const allBlocks = new Set();\n    for (const block of blocks){\n        for (const itemBlock of getListItems(block)){\n            allBlocks.add(itemBlock);\n        }\n    }\n    return sortBlocks(allBlocks);\n}\n/**\n * Splits the list item just before the provided list block.\n *\n * @internal\n * @param listBlock The list block element.\n * @param writer The model writer.\n * @returns The array of updated blocks.\n */ function splitListItemBefore(listBlock, writer) {\n    const blocks = getListItemBlocks(listBlock, {\n        direction: 'forward'\n    });\n    const id = ListItemUid.next();\n    for (const block of blocks){\n        writer.setAttribute('listItemId', id, block);\n    }\n    return blocks;\n}\n/**\n * Merges the list item with the parent list item.\n *\n * @internal\n * @param listBlock The list block element.\n * @param parentBlock The list block element to merge with.\n * @param writer The model writer.\n * @returns The array of updated blocks.\n */ function mergeListItemBefore(listBlock, parentBlock, writer) {\n    const attributes = {};\n    for (const [key, value] of parentBlock.getAttributes()){\n        if (key.startsWith('list')) {\n            attributes[key] = value;\n        }\n    }\n    const blocks = getListItemBlocks(listBlock, {\n        direction: 'forward'\n    });\n    for (const block of blocks){\n        writer.setAttributes(attributes, block);\n    }\n    return blocks;\n}\n/**\n * Increases indentation of given list blocks.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n * @param options.expand Whether should expand the list of blocks to include complete list items.\n * @param options.indentBy The number of levels the indentation should change (could be negative).\n */ function indentBlocks(blocks, writer, { expand, indentBy = 1 } = {}) {\n    blocks = toArray(blocks);\n    // Expand the selected blocks to contain the whole list items.\n    const allBlocks = expand ? expandListBlocksToCompleteItems(blocks) : blocks;\n    for (const block of allBlocks){\n        const blockIndent = block.getAttribute('listIndent') + indentBy;\n        if (blockIndent < 0) {\n            removeListAttributes(block, writer);\n        } else {\n            writer.setAttribute('listIndent', blockIndent, block);\n        }\n    }\n    return allBlocks;\n}\n/**\n * Decreases indentation of given list of blocks. If the indentation of some blocks matches the indentation\n * of surrounding blocks, they get merged together.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n */ function outdentBlocksWithMerge(blocks, writer) {\n    blocks = toArray(blocks);\n    // Expand the selected blocks to contain the whole list items.\n    const allBlocks = expandListBlocksToCompleteItems(blocks);\n    const visited = new Set();\n    const referenceIndent = Math.min(...allBlocks.map((block)=>block.getAttribute('listIndent')));\n    const parentBlocks = new Map();\n    // Collect parent blocks before the list structure gets altered.\n    for (const block of allBlocks){\n        parentBlocks.set(block, ListWalker.first(block, {\n            lowerIndent: true\n        }));\n    }\n    for (const block of allBlocks){\n        if (visited.has(block)) {\n            continue;\n        }\n        visited.add(block);\n        const blockIndent = block.getAttribute('listIndent') - 1;\n        if (blockIndent < 0) {\n            removeListAttributes(block, writer);\n            continue;\n        }\n        // Merge with parent list item while outdenting and indent matches reference indent.\n        if (block.getAttribute('listIndent') == referenceIndent) {\n            const mergedBlocks = mergeListItemIfNotLast(block, parentBlocks.get(block), writer);\n            // All list item blocks are updated while merging so add those to visited set.\n            for (const mergedBlock of mergedBlocks){\n                visited.add(mergedBlock);\n            }\n            // The indent level was updated while merging so continue to next block.\n            if (mergedBlocks.length) {\n                continue;\n            }\n        }\n        writer.setAttribute('listIndent', blockIndent, block);\n    }\n    return sortBlocks(visited);\n}\n/**\n * Removes all list attributes from the given blocks.\n *\n * @internal\n * @param blocks The block or iterable of blocks.\n * @param writer The model writer.\n * @returns Array of altered blocks.\n */ function removeListAttributes(blocks, writer) {\n    blocks = toArray(blocks);\n    // Convert simple list items to plain paragraphs.\n    for (const block of blocks){\n        if (block.is('element', 'listItem')) {\n            writer.rename(block, 'paragraph');\n        }\n    }\n    // Remove list attributes.\n    for (const block of blocks){\n        for (const attributeKey of block.getAttributeKeys()){\n            if (attributeKey.startsWith('list')) {\n                writer.removeAttribute(attributeKey, block);\n            }\n        }\n    }\n    return blocks;\n}\n/**\n * Checks whether the given blocks are related to a single list item.\n *\n * @internal\n * @param blocks The list block elements.\n */ function isSingleListItem(blocks) {\n    if (!blocks.length) {\n        return false;\n    }\n    const firstItemId = blocks[0].getAttribute('listItemId');\n    if (!firstItemId) {\n        return false;\n    }\n    return !blocks.some((item)=>item.getAttribute('listItemId') != firstItemId);\n}\n/**\n * Modifies the indents of list blocks following the given list block so the indentation is valid after\n * the given block is no longer a list item.\n *\n * @internal\n * @param lastBlock The last list block that has become a non-list element.\n * @param writer The model writer.\n * @returns Array of altered blocks.\n */ function outdentFollowingItems(lastBlock, writer) {\n    const changedBlocks = [];\n    // Start from the model item that is just after the last turned-off item.\n    let currentIndent = Number.POSITIVE_INFINITY;\n    // Correct indent of all items after the last turned off item.\n    // Rules that should be followed:\n    // 1. All direct sub-items of turned-off item should become indent 0, because the first item after it\n    //    will be the first item of a new list. Other items are at the same level, so should have same 0 index.\n    // 2. All items with indent lower than indent of turned-off item should become indent 0, because they\n    //    should not end up as a child of any of list items that they were not children of before.\n    // 3. All other items should have their indent changed relatively to it's parent.\n    //\n    // For example:\n    // 1  * --------\n    // 2     * --------\n    // 3        * --------\t\t\t<-- this is turned off.\n    // 4           * --------\t\t<-- this has to become indent = 0, because it will be first item on a new list.\n    // 5              * --------\t<-- this should be still be a child of item above, so indent = 1.\n    // 6        * --------\t\t\t<-- this has to become indent = 0, because it should not be a child of any of items above.\n    // 7           * --------\t\t<-- this should be still be a child of item above, so indent = 1.\n    // 8     * --------\t\t\t\t<-- this has to become indent = 0.\n    // 9        * --------\t\t\t<-- this should still be a child of item above, so indent = 1.\n    // 10          * --------\t\t<-- this should still be a child of item above, so indent = 2.\n    // 11          * --------\t\t<-- this should still be at the same level as item above, so indent = 2.\n    // 12 * --------\t\t\t\t<-- this and all below are left unchanged.\n    // 13    * --------\n    // 14       * --------\n    //\n    // After turning off 3 the list becomes:\n    //\n    // 1  * --------\n    // 2     * --------\n    //\n    // 3  --------\n    //\n    // 4  * --------\n    // 5     * --------\n    // 6  * --------\n    // 7     * --------\n    // 8  * --------\n    // 9     * --------\n    // 10       * --------\n    // 11       * --------\n    // 12 * --------\n    // 13    * --------\n    // 14       * --------\n    //\n    // Thanks to this algorithm no lists are mismatched and no items get unexpected children/parent, while\n    // those parent-child connection which are possible to maintain are still maintained. It's worth noting\n    // that this is the same effect that we would be get by multiple use of outdent command. However doing\n    // it like this is much more efficient because it's less operation (less memory usage, easier OT) and\n    // less conversion (faster).\n    for (const { node } of iterateSiblingListBlocks(lastBlock.nextSibling, 'forward')){\n        // Check each next list item, as long as its indent is higher than 0.\n        const indent = node.getAttribute('listIndent');\n        // If the indent is 0 we are not going to change anything anyway.\n        if (indent == 0) {\n            break;\n        }\n        // We check if that's item indent is lower than current relative indent.\n        if (indent < currentIndent) {\n            // If it is, current relative indent becomes that indent.\n            currentIndent = indent;\n        }\n        // Fix indent relatively to current relative indent.\n        // Note, that if we just changed the current relative indent, the newIndent will be equal to 0.\n        const newIndent = indent - currentIndent;\n        writer.setAttribute('listIndent', newIndent, node);\n        changedBlocks.push(node);\n    }\n    return changedBlocks;\n}\n/**\n * Returns the array of given blocks sorted by model indexes (document order).\n *\n * @internal\n */ function sortBlocks(blocks) {\n    return Array.from(blocks).filter((block)=>block.root.rootName !== '$graveyard').sort((a, b)=>a.index - b.index);\n}\n/**\n * Returns a selected block object. If a selected object is inline or when there is no selected\n * object, `null` is returned.\n *\n * @internal\n * @param model The instance of editor model.\n * @returns Selected block object or `null`.\n */ function getSelectedBlockObject(model) {\n    const selectedElement = model.document.selection.getSelectedElement();\n    if (!selectedElement) {\n        return null;\n    }\n    if (model.schema.isObject(selectedElement) && model.schema.isBlock(selectedElement)) {\n        return selectedElement;\n    }\n    return null;\n}\n/**\n * Checks whether the given block can be replaced by a listItem.\n *\n * Note that this is possible only when multiBlock = false option is set in feature config.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */ function canBecomeSimpleListItem(block, schema) {\n    return schema.checkChild(block.parent, 'listItem') && schema.checkChild(block, '$text') && !schema.isObject(block);\n}\n/**\n * Returns true if listType is of type `numbered` or `customNumbered`.\n */ function isNumberedListType(listType) {\n    return listType == 'numbered' || listType == 'customNumbered';\n}\n/**\n * Merges a given block to the given parent block if parent is a list item and there is no more blocks in the same item.\n */ function mergeListItemIfNotLast(block, parentBlock, writer) {\n    const parentItemBlocks = getListItemBlocks(parentBlock, {\n        direction: 'forward'\n    });\n    // Merge with parent only if outdented item wasn't the last one in its parent.\n    // Merge:\n    // * a\t\t\t->\t\t* a\n    //   * [b]\t\t->\t\t  b\n    //   c\t\t\t->\t\t  c\n    // Don't merge:\n    // * a\t\t\t->\t\t* a\n    //   * [b]\t\t-> \t\t* b\n    // * c\t\t\t->\t\t* c\n    if (parentItemBlocks.pop().index > block.index) {\n        return mergeListItemBefore(block, parentBlock, writer);\n    }\n    return [];\n}\n\n/**\n * The document list indent command. It is used by the {@link module:list/list~List list feature}.\n */ class ListIndentCommand extends Command {\n    /**\n\t * Determines by how much the command will change the list item's indent attribute.\n\t */ _direction;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param indentDirection The direction of indent. If it is equal to `backward`, the command\n\t * will outdent a list item.\n\t */ constructor(editor, indentDirection){\n        super(editor);\n        this._direction = indentDirection;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t */ execute() {\n        const model = this.editor.model;\n        const blocks = getSelectedListBlocks(model.document.selection);\n        model.change((writer)=>{\n            const changedBlocks = [];\n            // Handle selection contained in the single list item and starting in the following blocks.\n            if (isSingleListItem(blocks) && !isFirstBlockOfListItem(blocks[0])) {\n                // Allow increasing indent of following list item blocks.\n                if (this._direction == 'forward') {\n                    changedBlocks.push(...indentBlocks(blocks, writer));\n                }\n                // For indent make sure that indented blocks have a new ID.\n                // For outdent just split blocks from the list item (give them a new IDs).\n                changedBlocks.push(...splitListItemBefore(blocks[0], writer));\n            } else {\n                // Now just update the attributes of blocks.\n                if (this._direction == 'forward') {\n                    changedBlocks.push(...indentBlocks(blocks, writer, {\n                        expand: true\n                    }));\n                } else {\n                    changedBlocks.push(...outdentBlocksWithMerge(blocks, writer));\n                }\n            }\n            // Align the list item type to match the previous list item (from the same list).\n            for (const block of changedBlocks){\n                // This block become a plain block (for example a paragraph).\n                if (!block.hasAttribute('listType')) {\n                    continue;\n                }\n                const previousItemBlock = ListWalker.first(block, {\n                    sameIndent: true\n                });\n                if (previousItemBlock) {\n                    writer.setAttribute('listType', previousItemBlock.getAttribute('listType'), block);\n                }\n            }\n            this._fireAfterExecute(changedBlocks);\n        });\n    }\n    /**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */ _fireAfterExecute(changedBlocks) {\n        this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        // Check whether any of position's ancestor is a list item.\n        let blocks = getSelectedListBlocks(this.editor.model.document.selection);\n        let firstBlock = blocks[0];\n        // If selection is not in a list item, the command is disabled.\n        if (!firstBlock) {\n            return false;\n        }\n        // If we are outdenting it is enough to be in list item. Every list item can always be outdented.\n        if (this._direction == 'backward') {\n            return true;\n        }\n        // A single block of a list item is selected, so it could be indented as a sublist.\n        if (isSingleListItem(blocks) && !isFirstBlockOfListItem(blocks[0])) {\n            return true;\n        }\n        blocks = expandListBlocksToCompleteItems(blocks);\n        firstBlock = blocks[0];\n        // Check if there is any list item before selected items that could become a parent of selected items.\n        const siblingItem = ListWalker.first(firstBlock, {\n            sameIndent: true\n        });\n        if (!siblingItem) {\n            return false;\n        }\n        if (siblingItem.getAttribute('listType') == firstBlock.getAttribute('listType')) {\n            return true;\n        }\n        return false;\n    }\n}\n/**\n * Returns an array of selected blocks truncated to the first non list block element.\n */ function getSelectedListBlocks(selection) {\n    const blocks = Array.from(selection.getSelectedBlocks());\n    const firstNonListBlockIndex = blocks.findIndex((block)=>!isListItemBlock(block));\n    if (firstNonListBlockIndex != -1) {\n        blocks.length = firstNonListBlockIndex;\n    }\n    return blocks;\n}\n\n/**\n * The list command. It is used by the {@link module:list/list~List list feature}.\n */ class ListCommand extends Command {\n    /**\n\t * The type of the list created by the command.\n\t */ type;\n    /**\n\t * List Walker options that change the range of the list items to be changed when the selection is collapsed within a list item.\n\t *\n\t * In a multi-level list, when the selection is collapsed within a list item, instead of changing only the list items of the same list\n\t * type and current indent level, the entire list structure is changed (all list items at all indent levels of any list type).\n\t */ _listWalkerOptions;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param type List type that will be handled by this command.\n\t */ constructor(editor, type, options = {}){\n        super(editor);\n        this.type = type;\n        this._listWalkerOptions = options.multiLevel ? {\n            higherIndent: true,\n            lowerIndent: true,\n            sameAttributes: []\n        } : undefined;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.value = this._getValue();\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Executes the list command.\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the\n\t * selected items and potentially the neighbor elements to the proper list items. If set to `false` it will convert selected elements\n\t * to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.\n\t * @param options.additionalAttributes Additional attributes that are set for list items when the command is executed.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        const selectedBlockObject = getSelectedBlockObject(model);\n        const blocks = Array.from(document.selection.getSelectedBlocks()).filter((block)=>model.schema.checkAttribute(block, 'listType') || canBecomeSimpleListItem(block, model.schema));\n        // Whether we are turning off some items.\n        const turnOff = options.forceValue !== undefined ? !options.forceValue : this.value;\n        model.change((writer)=>{\n            if (turnOff) {\n                const lastBlock = blocks[blocks.length - 1];\n                // Split the first block from the list item.\n                const itemBlocks = getListItemBlocks(lastBlock, {\n                    direction: 'forward'\n                });\n                const changedBlocks = [];\n                if (itemBlocks.length > 1) {\n                    changedBlocks.push(...splitListItemBefore(itemBlocks[1], writer));\n                }\n                // Strip list attributes.\n                changedBlocks.push(...removeListAttributes(blocks, writer));\n                // Outdent items following the selected list item.\n                changedBlocks.push(...outdentFollowingItems(lastBlock, writer));\n                this._fireAfterExecute(changedBlocks);\n            } else if ((selectedBlockObject || document.selection.isCollapsed) && isListItemBlock(blocks[0])) {\n                const changedBlocks = getListItems(selectedBlockObject || blocks[0], this._listWalkerOptions);\n                for (const block of changedBlocks){\n                    writer.setAttributes({\n                        ...options.additionalAttributes,\n                        listType: this.type\n                    }, block);\n                }\n                this._fireAfterExecute(changedBlocks);\n            } else {\n                const changedBlocks = [];\n                for (const block of blocks){\n                    // Promote the given block to the list item.\n                    if (!block.hasAttribute('listType')) {\n                        // Rename block to a simple list item if this option is enabled.\n                        if (!block.is('element', 'listItem') && canBecomeSimpleListItem(block, model.schema)) {\n                            writer.rename(block, 'listItem');\n                        }\n                        writer.setAttributes({\n                            ...options.additionalAttributes,\n                            listIndent: 0,\n                            listItemId: ListItemUid.next(),\n                            listType: this.type\n                        }, block);\n                        changedBlocks.push(block);\n                    } else {\n                        for (const node of expandListBlocksToCompleteItems(block, {\n                            withNested: false\n                        })){\n                            if (node.getAttribute('listType') != this.type) {\n                                writer.setAttributes({\n                                    ...options.additionalAttributes,\n                                    listType: this.type\n                                }, node);\n                                changedBlocks.push(node);\n                            }\n                        }\n                    }\n                }\n                this._fireAfterExecute(changedBlocks);\n            }\n        });\n    }\n    /**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */ _fireAfterExecute(changedBlocks) {\n        this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */ _getValue() {\n        const selection = this.editor.model.document.selection;\n        const blocks = Array.from(selection.getSelectedBlocks());\n        if (!blocks.length) {\n            return false;\n        }\n        for (const block of blocks){\n            if (block.getAttribute('listType') != this.type) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const selection = model.document.selection;\n        const blocks = Array.from(selection.getSelectedBlocks());\n        if (!blocks.length) {\n            return false;\n        }\n        // If command value is true it means that we are in list item, so the command should be enabled.\n        if (this.value) {\n            return true;\n        }\n        for (const block of blocks){\n            if (schema.checkAttribute(block, 'listType') || canBecomeSimpleListItem(block, schema)) {\n                return true;\n            }\n        }\n        return false;\n    }\n}\n\n/**\n * The document list merge command. It is used by the {@link module:list/list~List list feature}.\n */ class ListMergeCommand extends Command {\n    /**\n\t * Whether list item should be merged before or after the selected block.\n\t */ _direction;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param direction Whether list item should be merged before or after the selected block.\n\t */ constructor(editor, direction){\n        super(editor);\n        this._direction = direction;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Merges list blocks together (depending on the {@link #constructor}'s `direction` parameter).\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t * @param options Command options.\n\t * @param options.shouldMergeOnBlocksContentLevel When set `true`, merging will be performed together\n\t * with {@link module:engine/model/model~Model#deleteContent} to get rid of the inline content in the selection or take advantage\n\t * of the heuristics in `deleteContent()` that helps convert lists into paragraphs in certain cases.\n\t */ execute({ shouldMergeOnBlocksContentLevel = false } = {}) {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const changedBlocks = [];\n        model.change((writer)=>{\n            const { firstElement, lastElement } = this._getMergeSubjectElements(selection, shouldMergeOnBlocksContentLevel);\n            const firstIndent = firstElement.getAttribute('listIndent') || 0;\n            const lastIndent = lastElement.getAttribute('listIndent');\n            const lastElementId = lastElement.getAttribute('listItemId');\n            if (firstIndent != lastIndent) {\n                const nestedLastElementBlocks = getNestedListBlocks(lastElement);\n                changedBlocks.push(...indentBlocks([\n                    lastElement,\n                    ...nestedLastElementBlocks\n                ], writer, {\n                    indentBy: firstIndent - lastIndent,\n                    // If outdenting, the entire sub-tree that follows must be included.\n                    expand: firstIndent < lastIndent\n                }));\n            }\n            if (shouldMergeOnBlocksContentLevel) {\n                let sel = selection;\n                if (selection.isCollapsed) {\n                    sel = writer.createSelection(writer.createRange(writer.createPositionAt(firstElement, 'end'), writer.createPositionAt(lastElement, 0)));\n                }\n                // Delete selected content. Replace entire content only for non-collapsed selection.\n                model.deleteContent(sel, {\n                    doNotResetEntireContent: selection.isCollapsed\n                });\n                // Get the last \"touched\" element after deleteContent call (can't use the lastElement because\n                // it could get merged into the firstElement while deleting content).\n                const lastElementAfterDelete = sel.getLastPosition().parent;\n                // Check if the element after it was in the same list item and adjust it if needed.\n                const nextSibling = lastElementAfterDelete.nextSibling;\n                changedBlocks.push(lastElementAfterDelete);\n                if (nextSibling && nextSibling !== lastElement && nextSibling.getAttribute('listItemId') == lastElementId) {\n                    changedBlocks.push(...mergeListItemBefore(nextSibling, lastElementAfterDelete, writer));\n                }\n            } else {\n                changedBlocks.push(...mergeListItemBefore(lastElement, firstElement, writer));\n            }\n            this._fireAfterExecute(changedBlocks);\n        });\n    }\n    /**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */ _fireAfterExecute(changedBlocks) {\n        this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const selectedBlockObject = getSelectedBlockObject(model);\n        if (selection.isCollapsed || selectedBlockObject) {\n            const positionParent = selectedBlockObject || selection.getFirstPosition().parent;\n            if (!isListItemBlock(positionParent)) {\n                return false;\n            }\n            const siblingNode = this._direction == 'backward' ? positionParent.previousSibling : positionParent.nextSibling;\n            if (!siblingNode) {\n                return false;\n            }\n            if (isSingleListItem([\n                positionParent,\n                siblingNode\n            ])) {\n                return false;\n            }\n        } else {\n            const lastPosition = selection.getLastPosition();\n            const firstPosition = selection.getFirstPosition();\n            // If deleting within a single block of a list item, there's no need to merge anything.\n            // The default delete should be executed instead.\n            if (lastPosition.parent === firstPosition.parent) {\n                return false;\n            }\n            if (!isListItemBlock(lastPosition.parent)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    /**\n\t * Returns the boundary elements the merge should be executed for. These are not necessarily selection's first\n\t * and last position parents but sometimes sibling or even further blocks depending on the context.\n\t *\n\t * @param selection The selection the merge is executed for.\n\t * @param shouldMergeOnBlocksContentLevel When `true`, merge is performed together with\n\t * {@link module:engine/model/model~Model#deleteContent} to remove the inline content within the selection.\n\t */ _getMergeSubjectElements(selection, shouldMergeOnBlocksContentLevel) {\n        const model = this.editor.model;\n        const selectedBlockObject = getSelectedBlockObject(model);\n        let firstElement, lastElement;\n        if (selection.isCollapsed || selectedBlockObject) {\n            const positionParent = selectedBlockObject || selection.getFirstPosition().parent;\n            const isFirstBlock = isFirstBlockOfListItem(positionParent);\n            if (this._direction == 'backward') {\n                lastElement = positionParent;\n                if (isFirstBlock && !shouldMergeOnBlocksContentLevel) {\n                    // For the \"c\" as an anchorElement:\n                    //  * a\n                    //    * b\n                    //  * [c]  <-- this block should be merged with \"a\"\n                    // It should find \"a\" element to merge with:\n                    //  * a\n                    //    * b\n                    //    c\n                    firstElement = ListWalker.first(positionParent, {\n                        sameIndent: true,\n                        lowerIndent: true\n                    });\n                } else {\n                    firstElement = positionParent.previousSibling;\n                }\n            } else {\n                // In case of the forward merge there is no case as above, just merge with next sibling.\n                firstElement = positionParent;\n                lastElement = positionParent.nextSibling;\n            }\n        } else {\n            firstElement = selection.getFirstPosition().parent;\n            lastElement = selection.getLastPosition().parent;\n        }\n        return {\n            firstElement: firstElement,\n            lastElement: lastElement\n        };\n    }\n}\n\n/**\n * The document list split command that splits the list item at the selection.\n *\n * It is used by the {@link module:list/list~List list feature}.\n */ class ListSplitCommand extends Command {\n    /**\n\t * Whether list item should be split before or after the selected block.\n\t */ _direction;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param direction Whether list item should be split before or after the selected block.\n\t */ constructor(editor, direction){\n        super(editor);\n        this._direction = direction;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Splits the list item at the selection.\n\t *\n\t * @fires execute\n\t * @fires afterExecute\n\t */ execute() {\n        const editor = this.editor;\n        editor.model.change((writer)=>{\n            const changedBlocks = splitListItemBefore(this._getStartBlock(), writer);\n            this._fireAfterExecute(changedBlocks);\n        });\n    }\n    /**\n\t * Fires the `afterExecute` event.\n\t *\n\t * @param changedBlocks The changed list elements.\n\t */ _fireAfterExecute(changedBlocks) {\n        this.fire('afterExecute', sortBlocks(new Set(changedBlocks)));\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        const selection = this.editor.model.document.selection;\n        const block = this._getStartBlock();\n        return selection.isCollapsed && isListItemBlock(block) && !isFirstBlockOfListItem(block);\n    }\n    /**\n\t * Returns the model element that is the main focus of the command (according to the current selection and command direction).\n\t */ _getStartBlock() {\n        const doc = this.editor.model.document;\n        const positionParent = doc.selection.getFirstPosition().parent;\n        return this._direction == 'before' ? positionParent : positionParent.nextSibling;\n    }\n}\n\n/**\n * A set of helpers related to document lists.\n */ class ListUtils extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ListUtils';\n    }\n    /**\n\t * Expands the given list of selected blocks to include all the items of the lists they're in.\n\t *\n\t * @param blocks The list of selected blocks.\n\t */ expandListBlocksToCompleteList(blocks) {\n        return expandListBlocksToCompleteList(blocks);\n    }\n    /**\n\t * Check if the given block is the first in the list item.\n\t *\n\t * @param listBlock The list block element.\n\t */ isFirstBlockOfListItem(listBlock) {\n        return isFirstBlockOfListItem(listBlock);\n    }\n    /**\n\t * Returns true if the given model node is a list item block.\n\t *\n\t * @param node A model node.\n\t */ isListItemBlock(node) {\n        return isListItemBlock(node);\n    }\n    /**\n\t * Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.\n\t *\n\t * @param blocks The list of selected blocks.\n\t * @param options.withNested Whether should include nested list items.\n\t */ expandListBlocksToCompleteItems(blocks, options = {}) {\n        return expandListBlocksToCompleteItems(blocks, options);\n    }\n    /**\n\t * Returns true if listType is of type `numbered` or `customNumbered`.\n\t */ isNumberedListType(listType) {\n        return isNumberedListType(listType);\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module list/list/utils/view\n */ /**\n * Checks if view element is a list type (ul or ol).\n *\n * @internal\n */ function isListView(viewElement) {\n    return viewElement.is('element', 'ol') || viewElement.is('element', 'ul');\n}\n/**\n * Checks if view element is a list item (li).\n *\n * @internal\n */ function isListItemView(viewElement) {\n    return viewElement.is('element', 'li');\n}\n/**\n * Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.\n *\n * Also, fixes non HTML compliant lists indents:\n *\n * ```\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI     (indent: 0)\n *     |-> OL                                  |-> OL\n *         |-> OL                                  |\n *         |   |-> OL                              |\n *         |       |-> OL                          |\n *         |           |-> LI (parent LIs: 1)      |-> LI (indent: 1)\n *         |-> LI (parent LIs: 1)                  |-> LI (indent: 1)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> OL                                      |\n *     |-> OL                                  |\n *          |-> OL                             |\n *              |-> LI (parent LIs: 0)         |-> LI        (indent: 0)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI         (indent: 0)\n * |-> OL                                          |-> OL\n *     |-> LI (parent LIs: 0)                          |-> LI (indent: 1)\n * ```\n *\n * @internal\n */ function getIndent$1(listItem) {\n    let indent = 0;\n    let parent = listItem.parent;\n    while(parent){\n        // Each LI in the tree will result in an increased indent for HTML compliant lists.\n        if (isListItemView(parent)) {\n            indent++;\n        } else {\n            // If however the list is nested in other list we should check previous sibling of any of the list elements...\n            const previousSibling = parent.previousSibling;\n            // ...because the we might need increase its indent:\n            //\t\tbefore:                           fixed list:\n            //\t\tOL                                OL\n            //\t\t|-> LI (parent LIs: 0)            |-> LI         (indent: 0)\n            //\t\t|-> OL                                |-> OL\n            //\t\t    |-> LI (parent LIs: 0)                |-> LI (indent: 1)\n            if (previousSibling && isListItemView(previousSibling)) {\n                indent++;\n            }\n        }\n        parent = parent.parent;\n    }\n    return indent;\n}\n/**\n * Creates a list attribute element (ol or ul).\n *\n * @internal\n */ function createListElement(writer, indent, type, id = getViewElementIdForListType(type, indent)) {\n    // Negative priorities so that restricted editing attribute won't wrap lists.\n    return writer.createAttributeElement(getViewElementNameForListType(type), null, {\n        priority: 2 * indent / 100 - 100,\n        id\n    });\n}\n/**\n * Creates a list item attribute element (li).\n *\n * @internal\n */ function createListItemElement(writer, indent, id) {\n    // Negative priorities so that restricted editing attribute won't wrap list items.\n    return writer.createAttributeElement('li', null, {\n        priority: (2 * indent + 1) / 100 - 100,\n        id\n    });\n}\n/**\n * Returns a view element name for the given list type.\n *\n * @internal\n */ function getViewElementNameForListType(type) {\n    return type == 'numbered' || type == 'customNumbered' ? 'ol' : 'ul';\n}\n/**\n * Returns a view element ID for the given list type and indent.\n *\n * @internal\n */ function getViewElementIdForListType(type, indent) {\n    return `list-${type}-${indent}`;\n}\n\n/**\n * Based on the provided positions looks for the list head and stores it in the provided map.\n *\n * @internal\n * @param position The search starting position.\n * @param itemToListHead The map from list item element to the list head element.\n */ function findAndAddListHeadToMap(position, itemToListHead) {\n    const previousNode = position.nodeBefore;\n    if (!isListItemBlock(previousNode)) {\n        const item = position.nodeAfter;\n        if (isListItemBlock(item)) {\n            itemToListHead.set(item, item);\n        }\n    } else {\n        let listHead = previousNode;\n        // Previously, the loop below was defined like this:\n        //\n        // \t\tfor ( { node: listHead } of iterateSiblingListBlocks( listHead, 'backward' ) )\n        //\n        // Unfortunately, such a destructuring is incorrectly transpiled by Babel and the loop never ends.\n        // See: https://github.com/ckeditor/ckeditor5-react/issues/345.\n        for (const { node } of iterateSiblingListBlocks(listHead, 'backward')){\n            listHead = node;\n            if (itemToListHead.has(listHead)) {\n                return;\n            }\n        }\n        itemToListHead.set(previousNode, listHead);\n    }\n}\n/**\n * Scans the list starting from the given list head element and fixes items' indentation.\n *\n * @internal\n * @param listNodes The iterable of list nodes.\n * @param writer The model writer.\n * @returns Whether the model was modified.\n */ function fixListIndents(listNodes, writer) {\n    let maxIndent = 0; // Guards local sublist max indents that need fixing.\n    let prevIndent = -1; // Previous item indent.\n    let fixBy = null;\n    let applied = false;\n    for (const { node } of listNodes){\n        const itemIndent = node.getAttribute('listIndent');\n        if (itemIndent > maxIndent) {\n            let newIndent;\n            if (fixBy === null) {\n                fixBy = itemIndent - maxIndent;\n                newIndent = maxIndent;\n            } else {\n                if (fixBy > itemIndent) {\n                    fixBy = itemIndent;\n                }\n                newIndent = itemIndent - fixBy;\n            }\n            if (newIndent > prevIndent + 1) {\n                newIndent = prevIndent + 1;\n            }\n            writer.setAttribute('listIndent', newIndent, node);\n            applied = true;\n            prevIndent = newIndent;\n        } else {\n            fixBy = null;\n            maxIndent = itemIndent + 1;\n            prevIndent = itemIndent;\n        }\n    }\n    return applied;\n}\n/**\n * Scans the list starting from the given list head element and fixes items' types.\n *\n * @internal\n * @param listNodes The iterable of list nodes.\n * @param seenIds The set of already known IDs.\n * @param writer The model writer.\n * @returns Whether the model was modified.\n */ function fixListItemIds(listNodes, seenIds, writer) {\n    const visited = new Set();\n    let applied = false;\n    for (const { node } of listNodes){\n        if (visited.has(node)) {\n            continue;\n        }\n        let listType = node.getAttribute('listType');\n        let listItemId = node.getAttribute('listItemId');\n        // Use a new ID if this one was spot earlier (even in other list).\n        if (seenIds.has(listItemId)) {\n            listItemId = ListItemUid.next();\n        }\n        seenIds.add(listItemId);\n        // Make sure that all items in a simple list have unique IDs.\n        if (node.is('element', 'listItem')) {\n            if (node.getAttribute('listItemId') != listItemId) {\n                writer.setAttribute('listItemId', listItemId, node);\n                applied = true;\n            }\n            continue;\n        }\n        for (const block of getListItemBlocks(node, {\n            direction: 'forward'\n        })){\n            visited.add(block);\n            // Use a new ID if a block of a bigger list item has different type.\n            if (block.getAttribute('listType') != listType) {\n                listItemId = ListItemUid.next();\n                listType = block.getAttribute('listType');\n            }\n            if (block.getAttribute('listItemId') != listItemId) {\n                writer.setAttribute('listItemId', listItemId, block);\n                applied = true;\n            }\n        }\n    }\n    return applied;\n}\n\n/**\n * Returns the upcast converter for list items. It's supposed to work after the block converters (content inside list items) are converted.\n *\n * @internal\n */ function listItemUpcastConverter() {\n    return (evt, data, conversionApi)=>{\n        const { writer, schema } = conversionApi;\n        if (!data.modelRange) {\n            return;\n        }\n        const items = Array.from(data.modelRange.getItems({\n            shallow: true\n        })).filter((item)=>schema.checkAttribute(item, 'listItemId'));\n        if (!items.length) {\n            return;\n        }\n        const listItemId = ListItemUid.next();\n        const listIndent = getIndent$1(data.viewItem);\n        let listType = data.viewItem.parent && data.viewItem.parent.is('element', 'ol') ? 'numbered' : 'bulleted';\n        // Preserve list type if was already set (for example by to-do list feature).\n        const firstItemListType = items[0].getAttribute('listType');\n        if (firstItemListType) {\n            listType = firstItemListType;\n        }\n        const attributes = {\n            listItemId,\n            listIndent,\n            listType\n        };\n        for (const item of items){\n            // Set list attributes only on same level items, those nested deeper are already handled by the recursive conversion.\n            if (!item.hasAttribute('listItemId')) {\n                writer.setAttributes(attributes, item);\n            }\n        }\n        if (items.length > 1) {\n            // Make sure that list item that contain only nested list will preserve paragraph for itself:\n            //\t<ul>\n            //\t\t<li>\n            //\t\t\t<p></p>  <-- this one must be kept\n            //\t\t\t<ul>\n            //\t\t\t\t<li></li>\n            //\t\t\t</ul>\n            //\t\t</li>\n            //\t</ul>\n            if (items[1].getAttribute('listItemId') != attributes.listItemId) {\n                conversionApi.keepEmptyElement(items[0]);\n            }\n        }\n    };\n}\n/**\n * Returns a model document change:data event listener that triggers conversion of related items if needed.\n *\n * @internal\n * @param model The editor model.\n * @param editing The editing controller.\n * @param attributeNames The list of all model list attributes (including registered strategies).\n * @param listEditing The document list editing plugin.\n */ function reconvertItemsOnDataChange(model, editing, attributeNames, listEditing) {\n    return ()=>{\n        const changes = model.document.differ.getChanges();\n        const itemsToRefresh = [];\n        const itemToListHead = new Map();\n        const changedItems = new Set();\n        for (const entry of changes){\n            if (entry.type == 'insert' && entry.name != '$text') {\n                findAndAddListHeadToMap(entry.position, itemToListHead);\n                // Insert of a non-list item.\n                if (!entry.attributes.has('listItemId')) {\n                    findAndAddListHeadToMap(entry.position.getShiftedBy(entry.length), itemToListHead);\n                } else {\n                    changedItems.add(entry.position.nodeAfter);\n                }\n            } else if (entry.type == 'remove' && entry.attributes.has('listItemId')) {\n                findAndAddListHeadToMap(entry.position, itemToListHead);\n            } else if (entry.type == 'attribute') {\n                const item = entry.range.start.nodeAfter;\n                if (attributeNames.includes(entry.attributeKey)) {\n                    findAndAddListHeadToMap(entry.range.start, itemToListHead);\n                    if (entry.attributeNewValue === null) {\n                        findAndAddListHeadToMap(entry.range.start.getShiftedBy(1), itemToListHead);\n                        // Check if paragraph should be converted from bogus to plain paragraph.\n                        if (doesItemBlockRequiresRefresh(item)) {\n                            itemsToRefresh.push(item);\n                        }\n                    } else {\n                        changedItems.add(item);\n                    }\n                } else if (isListItemBlock(item)) {\n                    // Some other attribute was changed on the list item,\n                    // check if paragraph does not need to be converted to bogus or back.\n                    if (doesItemBlockRequiresRefresh(item)) {\n                        itemsToRefresh.push(item);\n                    }\n                }\n            }\n        }\n        for (const listHead of itemToListHead.values()){\n            itemsToRefresh.push(...collectListItemsToRefresh(listHead, changedItems));\n        }\n        for (const item of new Set(itemsToRefresh)){\n            editing.reconvertItem(item);\n        }\n    };\n    function collectListItemsToRefresh(listHead, changedItems) {\n        const itemsToRefresh = [];\n        const visited = new Set();\n        const stack = [];\n        for (const { node, previous } of iterateSiblingListBlocks(listHead, 'forward')){\n            if (visited.has(node)) {\n                continue;\n            }\n            const itemIndent = node.getAttribute('listIndent');\n            // Current node is at the lower indent so trim the stack.\n            if (previous && itemIndent < previous.getAttribute('listIndent')) {\n                stack.length = itemIndent + 1;\n            }\n            // Update the stack for the current indent level.\n            stack[itemIndent] = Object.fromEntries(Array.from(node.getAttributes()).filter(([key])=>attributeNames.includes(key)));\n            // Find all blocks of the current node.\n            const blocks = getListItemBlocks(node, {\n                direction: 'forward'\n            });\n            for (const block of blocks){\n                visited.add(block);\n                // Check if bogus vs plain paragraph needs refresh.\n                if (doesItemBlockRequiresRefresh(block, blocks)) {\n                    itemsToRefresh.push(block);\n                } else if (doesItemWrappingRequiresRefresh(block, stack, changedItems)) {\n                    itemsToRefresh.push(block);\n                }\n            }\n        }\n        return itemsToRefresh;\n    }\n    function doesItemBlockRequiresRefresh(item, blocks) {\n        const viewElement = editing.mapper.toViewElement(item);\n        if (!viewElement) {\n            return false;\n        }\n        const needsRefresh = listEditing.fire('checkElement', {\n            modelElement: item,\n            viewElement\n        });\n        if (needsRefresh) {\n            return true;\n        }\n        if (!item.is('element', 'paragraph') && !item.is('element', 'listItem')) {\n            return false;\n        }\n        const useBogus = shouldUseBogusParagraph(item, attributeNames, blocks);\n        if (useBogus && viewElement.is('element', 'p')) {\n            return true;\n        } else if (!useBogus && viewElement.is('element', 'span')) {\n            return true;\n        }\n        return false;\n    }\n    function doesItemWrappingRequiresRefresh(item, stack, changedItems) {\n        // Items directly affected by some \"change\" don't need a refresh, they will be converted by their own changes.\n        if (changedItems.has(item)) {\n            return false;\n        }\n        const viewElement = editing.mapper.toViewElement(item);\n        let indent = stack.length - 1;\n        // Traverse down the stack to the root to verify if all ULs, OLs, and LIs are as expected.\n        for(let element = viewElement.parent; !element.is('editableElement'); element = element.parent){\n            const isListItemElement = isListItemView(element);\n            const isListElement = isListView(element);\n            if (!isListElement && !isListItemElement) {\n                continue;\n            }\n            const eventName = `checkAttributes:${isListItemElement ? 'item' : 'list'}`;\n            const needsRefresh = listEditing.fire(eventName, {\n                viewElement: element,\n                modelAttributes: stack[indent]\n            });\n            if (needsRefresh) {\n                break;\n            }\n            if (isListElement) {\n                indent--;\n                // Don't need to iterate further if we already know that the item is wrapped appropriately.\n                if (indent < 0) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n}\n/**\n * Returns the list item downcast converter.\n *\n * @internal\n * @param attributeNames A list of attribute names that should be converted if they are set.\n * @param strategies The strategies.\n * @param model The model.\n */ function listItemDowncastConverter(attributeNames, strategies, model, { dataPipeline } = {}) {\n    const consumer = createAttributesConsumer(attributeNames);\n    return (evt, data, conversionApi)=>{\n        const { writer, mapper, consumable } = conversionApi;\n        const listItem = data.item;\n        if (!attributeNames.includes(data.attributeKey)) {\n            return;\n        }\n        // Test if attributes on the converted items are not consumed.\n        if (!consumer(listItem, consumable)) {\n            return;\n        }\n        // Use positions mapping instead of mapper.toViewElement( listItem ) to find outermost view element.\n        // This is for cases when mapping is using inner view element like in the code blocks (pre > code).\n        const viewElement = findMappedViewElement(listItem, mapper, model);\n        // Remove custom item marker.\n        removeCustomMarkerElements(viewElement, writer, mapper);\n        // Unwrap element from current list wrappers.\n        unwrapListItemBlock(viewElement, writer);\n        // Insert custom item marker.\n        const viewRange = insertCustomMarkerElements(listItem, viewElement, strategies, writer, {\n            dataPipeline\n        });\n        // Then wrap them with the new list wrappers (UL, OL, LI).\n        wrapListItemBlock(listItem, viewRange, strategies, writer);\n    };\n}\n/**\n * The 'remove' downcast converter for custom markers.\n */ function listItemDowncastRemoveConverter(schema) {\n    return (evt, data, conversionApi)=>{\n        const { writer, mapper } = conversionApi;\n        const elementName = evt.name.split(':')[1];\n        // Do not remove marker if the deleted element is some inline object inside paragraph.\n        // See https://github.com/cksource/ckeditor5-internal/issues/3680.\n        if (!schema.checkAttribute(elementName, 'listItemId')) {\n            return;\n        }\n        // Find the view range start position by mapping the model position at which the remove happened.\n        const viewStart = mapper.toViewPosition(data.position);\n        const modelEnd = data.position.getShiftedBy(data.length);\n        const viewEnd = mapper.toViewPosition(modelEnd, {\n            isPhantom: true\n        });\n        // Trim the range to remove in case some UI elements are on the view range boundaries.\n        const viewRange = writer.createRange(viewStart, viewEnd).getTrimmed();\n        // Use positions mapping instead of mapper.toViewElement( listItem ) to find outermost view element.\n        // This is for cases when mapping is using inner view element like in the code blocks (pre > code).\n        const viewElement = viewRange.end.nodeBefore;\n        /* istanbul ignore next -- @preserve */ if (!viewElement) {\n            return;\n        }\n        // Remove custom item marker.\n        removeCustomMarkerElements(viewElement, writer, mapper);\n    };\n}\n/**\n * Returns the bogus paragraph view element creator. A bogus paragraph is used if a list item contains only a single block or nested list.\n *\n * @internal\n * @param attributeNames The list of all model list attributes (including registered strategies).\n */ function bogusParagraphCreator(attributeNames, { dataPipeline } = {}) {\n    return (modelElement, { writer })=>{\n        // Convert only if a bogus paragraph should be used.\n        if (!shouldUseBogusParagraph(modelElement, attributeNames)) {\n            return null;\n        }\n        if (!dataPipeline) {\n            return writer.createContainerElement('span', {\n                class: 'ck-list-bogus-paragraph'\n            });\n        }\n        // Using `<p>` in case there are some markers on it and transparentRendering will render it anyway.\n        const viewElement = writer.createContainerElement('p');\n        writer.setCustomProperty('dataPipeline:transparentRendering', true, viewElement);\n        return viewElement;\n    };\n}\n/**\n * Helper for mapping mode to view elements. It's using positions mapping instead of mapper.toViewElement( element )\n * to find outermost view element. This is for cases when mapping is using inner view element like in the code blocks (pre > code).\n *\n * @internal\n * @param element The model element.\n * @param mapper The mapper instance.\n * @param model The model.\n */ function findMappedViewElement(element, mapper, model) {\n    const modelRange = model.createRangeOn(element);\n    const viewRange = mapper.toViewRange(modelRange).getTrimmed();\n    return viewRange.end.nodeBefore;\n}\n/**\n * The model to view custom position mapping for cases when marker is injected at the beginning of a block.\n */ function createModelToViewPositionMapper(strategies, view) {\n    return (evt, data)=>{\n        if (data.modelPosition.offset > 0) {\n            return;\n        }\n        const positionParent = data.modelPosition.parent;\n        if (!isListItemBlock(positionParent)) {\n            return;\n        }\n        if (!strategies.some((strategy)=>strategy.scope == 'itemMarker' && strategy.canInjectMarkerIntoElement && strategy.canInjectMarkerIntoElement(positionParent))) {\n            return;\n        }\n        const viewElement = data.mapper.toViewElement(positionParent);\n        const viewRange = view.createRangeIn(viewElement);\n        const viewWalker = viewRange.getWalker();\n        let positionAfterLastMarker = viewRange.start;\n        for (const { item } of viewWalker){\n            // Walk only over the non-mapped elements (UIElements, AttributeElements, $text, or any other element without mapping).\n            if (item.is('element') && data.mapper.toModelElement(item) || item.is('$textProxy')) {\n                break;\n            }\n            if (item.is('element') && item.getCustomProperty('listItemMarker')) {\n                positionAfterLastMarker = view.createPositionAfter(item);\n                // Jump over the content of the marker (this is not needed for UIElement but required for other element types).\n                viewWalker.skip(({ previousPosition })=>!previousPosition.isEqual(positionAfterLastMarker));\n            }\n        }\n        data.viewPosition = positionAfterLastMarker;\n    };\n}\n/**\n * Removes a custom marker elements and item wrappers related to that marker.\n */ function removeCustomMarkerElements(viewElement, viewWriter, mapper) {\n    // Remove item wrapper.\n    while(viewElement.parent.is('attributeElement') && viewElement.parent.getCustomProperty('listItemWrapper')){\n        viewWriter.unwrap(viewWriter.createRangeOn(viewElement), viewElement.parent);\n    }\n    // Remove custom item markers.\n    const markersToRemove = [];\n    // Markers before a block.\n    collectMarkersToRemove(viewWriter.createPositionBefore(viewElement).getWalker({\n        direction: 'backward'\n    }));\n    // Markers inside a block.\n    collectMarkersToRemove(viewWriter.createRangeIn(viewElement).getWalker());\n    for (const marker of markersToRemove){\n        viewWriter.remove(marker);\n    }\n    function collectMarkersToRemove(viewWalker) {\n        for (const { item } of viewWalker){\n            // Walk only over the non-mapped elements (UIElements, AttributeElements, $text, or any other element without mapping).\n            if (item.is('element') && mapper.toModelElement(item)) {\n                break;\n            }\n            if (item.is('element') && item.getCustomProperty('listItemMarker')) {\n                markersToRemove.push(item);\n            }\n        }\n    }\n}\n/**\n * Inserts a custom marker elements and wraps first block of a list item if marker requires it.\n */ function insertCustomMarkerElements(listItem, viewElement, strategies, writer, { dataPipeline }) {\n    let viewRange = writer.createRangeOn(viewElement);\n    // Marker can be inserted only before the first block of a list item.\n    if (!isFirstBlockOfListItem(listItem)) {\n        return viewRange;\n    }\n    for (const strategy of strategies){\n        if (strategy.scope != 'itemMarker') {\n            continue;\n        }\n        // Create the custom marker element and inject it before the first block of the list item.\n        const markerElement = strategy.createElement(writer, listItem, {\n            dataPipeline\n        });\n        if (!markerElement) {\n            continue;\n        }\n        writer.setCustomProperty('listItemMarker', true, markerElement);\n        if (strategy.canInjectMarkerIntoElement && strategy.canInjectMarkerIntoElement(listItem)) {\n            writer.insert(writer.createPositionAt(viewElement, 0), markerElement);\n        } else {\n            writer.insert(viewRange.start, markerElement);\n            viewRange = writer.createRange(writer.createPositionBefore(markerElement), writer.createPositionAfter(viewElement));\n        }\n        // Wrap the marker and optionally the first block with an attribute element (label for to-do lists).\n        if (!strategy.createWrapperElement || !strategy.canWrapElement) {\n            continue;\n        }\n        const wrapper = strategy.createWrapperElement(writer, listItem, {\n            dataPipeline\n        });\n        writer.setCustomProperty('listItemWrapper', true, wrapper);\n        // The whole block can be wrapped...\n        if (strategy.canWrapElement(listItem)) {\n            viewRange = writer.wrap(viewRange, wrapper);\n        } else {\n            // ... or only the marker element (if the block is downcasted to heading or block widget).\n            viewRange = writer.wrap(writer.createRangeOn(markerElement), wrapper);\n            viewRange = writer.createRange(viewRange.start, writer.createPositionAfter(viewElement));\n        }\n    }\n    return viewRange;\n}\n/**\n * Unwraps all ol, ul, and li attribute elements that are wrapping the provided view element.\n */ function unwrapListItemBlock(viewElement, viewWriter) {\n    let attributeElement = viewElement.parent;\n    while(attributeElement.is('attributeElement') && [\n        'ul',\n        'ol',\n        'li'\n    ].includes(attributeElement.name)){\n        const parentElement = attributeElement.parent;\n        viewWriter.unwrap(viewWriter.createRangeOn(viewElement), attributeElement);\n        attributeElement = parentElement;\n    }\n}\n/**\n * Wraps the given list item with appropriate attribute elements for ul, ol, and li.\n */ function wrapListItemBlock(listItem, viewRange, strategies, writer) {\n    if (!listItem.hasAttribute('listIndent')) {\n        return;\n    }\n    const listItemIndent = listItem.getAttribute('listIndent');\n    let currentListItem = listItem;\n    for(let indent = listItemIndent; indent >= 0; indent--){\n        const listItemViewElement = createListItemElement(writer, indent, currentListItem.getAttribute('listItemId'));\n        const listViewElement = createListElement(writer, indent, currentListItem.getAttribute('listType'));\n        for (const strategy of strategies){\n            if ((strategy.scope == 'list' || strategy.scope == 'item') && currentListItem.hasAttribute(strategy.attributeName)) {\n                strategy.setAttributeOnDowncast(writer, currentListItem.getAttribute(strategy.attributeName), strategy.scope == 'list' ? listViewElement : listItemViewElement);\n            }\n        }\n        viewRange = writer.wrap(viewRange, listItemViewElement);\n        viewRange = writer.wrap(viewRange, listViewElement);\n        if (indent == 0) {\n            break;\n        }\n        currentListItem = ListWalker.first(currentListItem, {\n            lowerIndent: true\n        });\n        // There is no list item with lower indent, this means this is a document fragment containing\n        // only a part of nested list (like copy to clipboard) so we don't need to try to wrap it further.\n        if (!currentListItem) {\n            break;\n        }\n    }\n}\n// Returns the function that is responsible for consuming attributes that are set on the model node.\nfunction createAttributesConsumer(attributeNames) {\n    return (node, consumable)=>{\n        const events = [];\n        // Collect all set attributes that are triggering conversion.\n        for (const attributeName of attributeNames){\n            if (node.hasAttribute(attributeName)) {\n                events.push(`attribute:${attributeName}`);\n            }\n        }\n        if (!events.every((event)=>consumable.test(node, event) !== false)) {\n            return false;\n        }\n        events.forEach((event)=>consumable.consume(node, event));\n        return true;\n    };\n}\n// Whether the given item should be rendered as a bogus paragraph.\nfunction shouldUseBogusParagraph(item, attributeNames, blocks = getAllListItemBlocks(item)) {\n    if (!isListItemBlock(item)) {\n        return false;\n    }\n    for (const attributeKey of item.getAttributeKeys()){\n        // Ignore selection attributes stored on block elements.\n        if (attributeKey.startsWith('selection:')) {\n            continue;\n        }\n        // Don't use bogus paragraph if there are attributes from other features.\n        if (!attributeNames.includes(attributeKey)) {\n            return false;\n        }\n    }\n    return blocks.length < 2;\n}\n\n/**\n * A list of base list model attributes.\n */ const LIST_BASE_ATTRIBUTES = [\n    'listType',\n    'listIndent',\n    'listItemId'\n];\n/**\n * The editing part of the document-list feature. It handles creating, editing and removing lists and list items.\n */ class ListEditing extends Plugin {\n    /**\n\t * The list of registered downcast strategies.\n\t */ _downcastStrategies = [];\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ListEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Enter,\n            Delete,\n            ListUtils,\n            ClipboardPipeline\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('list.multiBlock', true);\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const multiBlock = editor.config.get('list.multiBlock');\n        if (editor.plugins.has('LegacyListEditing')) {\n            /**\n\t\t\t * The `List` feature can not be loaded together with the `LegacyList` plugin.\n\t\t\t *\n\t\t\t * @error list-feature-conflict\n\t\t\t * @param conflictPlugin Name of the plugin.\n\t\t\t */ throw new CKEditorError('list-feature-conflict', this, {\n                conflictPlugin: 'LegacyListEditing'\n            });\n        }\n        model.schema.register('$listItem', {\n            allowAttributes: LIST_BASE_ATTRIBUTES\n        });\n        if (multiBlock) {\n            model.schema.extend('$container', {\n                allowAttributesOf: '$listItem'\n            });\n            model.schema.extend('$block', {\n                allowAttributesOf: '$listItem'\n            });\n            model.schema.extend('$blockObject', {\n                allowAttributesOf: '$listItem'\n            });\n        } else {\n            model.schema.register('listItem', {\n                inheritAllFrom: '$block',\n                allowAttributesOf: '$listItem'\n            });\n        }\n        for (const attribute of LIST_BASE_ATTRIBUTES){\n            model.schema.setAttributeProperties(attribute, {\n                copyOnReplace: true\n            });\n        }\n        // Register commands.\n        editor.commands.add('numberedList', new ListCommand(editor, 'numbered'));\n        editor.commands.add('bulletedList', new ListCommand(editor, 'bulleted'));\n        editor.commands.add('customNumberedList', new ListCommand(editor, 'customNumbered', {\n            multiLevel: true\n        }));\n        editor.commands.add('customBulletedList', new ListCommand(editor, 'customBulleted', {\n            multiLevel: true\n        }));\n        editor.commands.add('indentList', new ListIndentCommand(editor, 'forward'));\n        editor.commands.add('outdentList', new ListIndentCommand(editor, 'backward'));\n        editor.commands.add('splitListItemBefore', new ListSplitCommand(editor, 'before'));\n        editor.commands.add('splitListItemAfter', new ListSplitCommand(editor, 'after'));\n        if (multiBlock) {\n            editor.commands.add('mergeListItemBackward', new ListMergeCommand(editor, 'backward'));\n            editor.commands.add('mergeListItemForward', new ListMergeCommand(editor, 'forward'));\n        }\n        this._setupDeleteIntegration();\n        this._setupEnterIntegration();\n        this._setupTabIntegration();\n        this._setupClipboardIntegration();\n        this._setupAccessibilityIntegration();\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const editor = this.editor;\n        const commands = editor.commands;\n        const indent = commands.get('indent');\n        const outdent = commands.get('outdent');\n        if (indent) {\n            // Priority is high due to integration with `IndentBlock` plugin. We want to indent list first and if it's not possible\n            // user can indent content with `IndentBlock` plugin.\n            indent.registerChildCommand(commands.get('indentList'), {\n                priority: 'high'\n            });\n        }\n        if (outdent) {\n            // Priority is lowest due to integration with `IndentBlock` and `IndentCode` plugins.\n            // First we want to allow user to outdent all indendations from other features then he can oudent list item.\n            outdent.registerChildCommand(commands.get('outdentList'), {\n                priority: 'lowest'\n            });\n        }\n        // Register conversion and model post-fixer after other plugins had a chance to register their attribute strategies.\n        this._setupModelPostFixing();\n        this._setupConversion();\n    }\n    /**\n\t * Registers a downcast strategy.\n\t *\n\t * **Note**: Strategies must be registered in the `Plugin#init()` phase so that it can be applied\n\t * in the `ListEditing#afterInit()`.\n\t *\n\t * @param strategy The downcast strategy to register.\n\t */ registerDowncastStrategy(strategy) {\n        this._downcastStrategies.push(strategy);\n    }\n    /**\n\t * Returns list of model attribute names that should affect downcast conversion.\n\t */ getListAttributeNames() {\n        return [\n            ...LIST_BASE_ATTRIBUTES,\n            ...this._downcastStrategies.map((strategy)=>strategy.attributeName)\n        ];\n    }\n    /**\n\t * Attaches the listener to the {@link module:engine/view/document~Document#event:delete} event and handles backspace/delete\n\t * keys in and around document lists.\n\t */ _setupDeleteIntegration() {\n        const editor = this.editor;\n        const mergeBackwardCommand = editor.commands.get('mergeListItemBackward');\n        const mergeForwardCommand = editor.commands.get('mergeListItemForward');\n        this.listenTo(editor.editing.view.document, 'delete', (evt, data)=>{\n            const selection = editor.model.document.selection;\n            // Let the Widget plugin take care of block widgets while deleting (https://github.com/ckeditor/ckeditor5/issues/11346).\n            if (getSelectedBlockObject(editor.model)) {\n                return;\n            }\n            editor.model.change(()=>{\n                const firstPosition = selection.getFirstPosition();\n                if (selection.isCollapsed && data.direction == 'backward') {\n                    if (!firstPosition.isAtStart) {\n                        return;\n                    }\n                    const positionParent = firstPosition.parent;\n                    if (!isListItemBlock(positionParent)) {\n                        return;\n                    }\n                    const previousBlock = ListWalker.first(positionParent, {\n                        sameAttributes: 'listType',\n                        sameIndent: true\n                    });\n                    // Outdent the first block of a first list item.\n                    if (!previousBlock && positionParent.getAttribute('listIndent') === 0) {\n                        if (!isLastBlockOfListItem(positionParent)) {\n                            editor.execute('splitListItemAfter');\n                        }\n                        editor.execute('outdentList');\n                    } else {\n                        if (!mergeBackwardCommand || !mergeBackwardCommand.isEnabled) {\n                            return;\n                        }\n                        mergeBackwardCommand.execute({\n                            shouldMergeOnBlocksContentLevel: shouldMergeOnBlocksContentLevel(editor.model, 'backward')\n                        });\n                    }\n                    data.preventDefault();\n                    evt.stop();\n                } else {\n                    // Collapsed selection should trigger forward merging only if at the end of a block.\n                    if (selection.isCollapsed && !selection.getLastPosition().isAtEnd) {\n                        return;\n                    }\n                    if (!mergeForwardCommand || !mergeForwardCommand.isEnabled) {\n                        return;\n                    }\n                    mergeForwardCommand.execute({\n                        shouldMergeOnBlocksContentLevel: shouldMergeOnBlocksContentLevel(editor.model, 'forward')\n                    });\n                    data.preventDefault();\n                    evt.stop();\n                }\n            });\n        }, {\n            context: 'li'\n        });\n    }\n    /**\n\t * Attaches a listener to the {@link module:engine/view/document~Document#event:enter} event and handles enter key press\n\t * in document lists.\n\t */ _setupEnterIntegration() {\n        const editor = this.editor;\n        const model = editor.model;\n        const commands = editor.commands;\n        const enterCommand = commands.get('enter');\n        // Overwrite the default Enter key behavior: outdent or split the list in certain cases.\n        this.listenTo(editor.editing.view.document, 'enter', (evt, data)=>{\n            const doc = model.document;\n            const positionParent = doc.selection.getFirstPosition().parent;\n            if (doc.selection.isCollapsed && isListItemBlock(positionParent) && positionParent.isEmpty && !data.isSoft) {\n                const isFirstBlock = isFirstBlockOfListItem(positionParent);\n                const isLastBlock = isLastBlockOfListItem(positionParent);\n                // * a      →      * a\n                // * []     →      []\n                if (isFirstBlock && isLastBlock) {\n                    editor.execute('outdentList');\n                    data.preventDefault();\n                    evt.stop();\n                } else if (isFirstBlock && !isLastBlock) {\n                    editor.execute('splitListItemAfter');\n                    data.preventDefault();\n                    evt.stop();\n                } else if (isLastBlock) {\n                    editor.execute('splitListItemBefore');\n                    data.preventDefault();\n                    evt.stop();\n                }\n            }\n        }, {\n            context: 'li'\n        });\n        // In some cases, after the default block splitting, we want to modify the new block to become a new list item\n        // instead of an additional block in the same list item.\n        this.listenTo(enterCommand, 'afterExecute', ()=>{\n            const splitCommand = commands.get('splitListItemBefore');\n            // The command has not refreshed because the change block related to EnterCommand#execute() is not over yet.\n            // Let's keep it up to date and take advantage of ListSplitCommand#isEnabled.\n            splitCommand.refresh();\n            if (!splitCommand.isEnabled) {\n                return;\n            }\n            const doc = editor.model.document;\n            const positionParent = doc.selection.getLastPosition().parent;\n            const listItemBlocks = getAllListItemBlocks(positionParent);\n            // Keep in mind this split happens after the default enter handler was executed. For instance:\n            //\n            // │       Initial state       │    After default enter    │   Here in #afterExecute   │\n            // ├───────────────────────────┼───────────────────────────┼───────────────────────────┤\n            // │          * a[]            │           * a             │           * a             │\n            // │                           │             []            │           * []            │\n            if (listItemBlocks.length === 2) {\n                splitCommand.execute();\n            }\n        });\n    }\n    /**\n\t * Attaches a listener to the {@link module:engine/view/document~Document#event:tab} event and handles tab key and tab+shift keys\n\t * presses in document lists.\n\t */ _setupTabIntegration() {\n        const editor = this.editor;\n        this.listenTo(editor.editing.view.document, 'tab', (evt, data)=>{\n            const commandName = data.shiftKey ? 'outdentList' : 'indentList';\n            const command = this.editor.commands.get(commandName);\n            if (command.isEnabled) {\n                editor.execute(commandName);\n                data.stopPropagation();\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: 'li'\n        });\n    }\n    /**\n\t * Registers the conversion helpers for the document-list feature.\n\t */ _setupConversion() {\n        const editor = this.editor;\n        const model = editor.model;\n        const attributeNames = this.getListAttributeNames();\n        const multiBlock = editor.config.get('list.multiBlock');\n        const elementName = multiBlock ? 'paragraph' : 'listItem';\n        editor.conversion.for('upcast')// Convert <li> to a generic paragraph (or listItem element) so the content of <li> is always inside a block.\n        // Setting the listType attribute to let other features (to-do list) know that this is part of a list item.\n        // This is also important to properly handle simple lists so that paragraphs inside a list item won't break the list item.\n        // <li>  <-- converted to listItem\n        //   <p></p> <-- should be also converted to listItem, so it won't split and replace the listItem generated from the above li.\n        .elementToElement({\n            view: 'li',\n            model: (viewElement, { writer })=>writer.createElement(elementName, {\n                    listType: ''\n                })\n        })// Convert paragraph to the list block (without list type defined yet).\n        // This is important to properly handle bogus paragraph and to-do lists.\n        // Most of the time the bogus paragraph should not appear in the data of to-do list,\n        // but if there is any marker or an attribute on the paragraph then the bogus paragraph\n        // is preserved in the data, and we need to be able to detect this case.\n        .elementToElement({\n            view: 'p',\n            model: (viewElement, { writer })=>{\n                if (viewElement.parent && viewElement.parent.is('element', 'li')) {\n                    return writer.createElement(elementName, {\n                        listType: ''\n                    });\n                }\n                return null;\n            },\n            converterPriority: 'high'\n        }).add((dispatcher)=>{\n            dispatcher.on('element:li', listItemUpcastConverter());\n        });\n        if (!multiBlock) {\n            editor.conversion.for('downcast').elementToElement({\n                model: 'listItem',\n                view: 'p'\n            });\n        }\n        editor.conversion.for('editingDowncast').elementToElement({\n            model: elementName,\n            view: bogusParagraphCreator(attributeNames),\n            converterPriority: 'high'\n        }).add((dispatcher)=>{\n            dispatcher.on('attribute', listItemDowncastConverter(attributeNames, this._downcastStrategies, model));\n            dispatcher.on('remove', listItemDowncastRemoveConverter(model.schema));\n        });\n        editor.conversion.for('dataDowncast').elementToElement({\n            model: elementName,\n            view: bogusParagraphCreator(attributeNames, {\n                dataPipeline: true\n            }),\n            converterPriority: 'high'\n        }).add((dispatcher)=>{\n            dispatcher.on('attribute', listItemDowncastConverter(attributeNames, this._downcastStrategies, model, {\n                dataPipeline: true\n            }));\n        });\n        const modelToViewPositionMapper = createModelToViewPositionMapper(this._downcastStrategies, editor.editing.view);\n        editor.editing.mapper.on('modelToViewPosition', modelToViewPositionMapper);\n        editor.data.mapper.on('modelToViewPosition', modelToViewPositionMapper);\n        this.listenTo(model.document, 'change:data', reconvertItemsOnDataChange(model, editor.editing, attributeNames, this), {\n            priority: 'high'\n        });\n        // For LI verify if an ID of the attribute element is correct.\n        this.on('checkAttributes:item', (evt, { viewElement, modelAttributes })=>{\n            if (viewElement.id != modelAttributes.listItemId) {\n                evt.return = true;\n                evt.stop();\n            }\n        });\n        // For UL and OL check if the name and ID of element is correct.\n        this.on('checkAttributes:list', (evt, { viewElement, modelAttributes })=>{\n            if (viewElement.name != getViewElementNameForListType(modelAttributes.listType) || viewElement.id != getViewElementIdForListType(modelAttributes.listType, modelAttributes.listIndent)) {\n                evt.return = true;\n                evt.stop();\n            }\n        });\n    }\n    /**\n\t * Registers model post-fixers.\n\t */ _setupModelPostFixing() {\n        const model = this.editor.model;\n        const attributeNames = this.getListAttributeNames();\n        // Register list fixing.\n        // First the low level handler.\n        model.document.registerPostFixer((writer)=>modelChangePostFixer$1(model, writer, attributeNames, this));\n        // Then the callbacks for the specific lists.\n        // The indentation fixing must be the first one...\n        this.on('postFixer', (evt, { listNodes, writer })=>{\n            evt.return = fixListIndents(listNodes, writer) || evt.return;\n        }, {\n            priority: 'high'\n        });\n        // ...then the item ids... and after that other fixers that rely on the correct indentation and ids.\n        this.on('postFixer', (evt, { listNodes, writer, seenIds })=>{\n            evt.return = fixListItemIds(listNodes, seenIds, writer) || evt.return;\n        }, {\n            priority: 'high'\n        });\n    }\n    /**\n\t * Integrates the feature with the clipboard via {@link module:engine/model/model~Model#insertContent} and\n\t * {@link module:engine/model/model~Model#getSelectedContent}.\n\t */ _setupClipboardIntegration() {\n        const model = this.editor.model;\n        const clipboardPipeline = this.editor.plugins.get('ClipboardPipeline');\n        this.listenTo(model, 'insertContent', createModelIndentPasteFixer(model), {\n            priority: 'high'\n        });\n        // To enhance the UX, the editor should not copy list attributes to the clipboard if the selection\n        // started and ended in the same list item.\n        //\n        // If the selection was enclosed in a single list item, there is a good chance the user did not want it\n        // copied as a list item but plain blocks.\n        //\n        // This avoids pasting orphaned list items instead of paragraphs, for instance, straight into the root.\n        //\n        //\t                       ┌─────────────────────┬───────────────────┐\n        //\t                       │ Selection           │ Clipboard content │\n        //\t                       ├─────────────────────┼───────────────────┤\n        //\t                       │ [* <Widget />]      │ <Widget />        │\n        //\t                       ├─────────────────────┼───────────────────┤\n        //\t                       │ [* Foo]             │ Foo               │\n        //\t                       ├─────────────────────┼───────────────────┤\n        //\t                       │ * Foo [bar] baz     │ bar               │\n        //\t                       ├─────────────────────┼───────────────────┤\n        //\t                       │ * Fo[o              │ o                 │\n        //\t                       │   ba]r              │ ba                │\n        //\t                       ├─────────────────────┼───────────────────┤\n        //\t                       │ * Fo[o              │ * o               │\n        //\t                       │ * ba]r              │ * ba              │\n        //\t                       ├─────────────────────┼───────────────────┤\n        //\t                       │ [* Foo              │ * Foo             │\n        //\t                       │  * bar]             │ * bar             │\n        //\t                       └─────────────────────┴───────────────────┘\n        //\n        // See https://github.com/ckeditor/ckeditor5/issues/11608, https://github.com/ckeditor/ckeditor5/issues/14969\n        this.listenTo(clipboardPipeline, 'outputTransformation', (evt, data)=>{\n            model.change((writer)=>{\n                // Remove last block if it's empty.\n                const allContentChildren = Array.from(data.content.getChildren());\n                const lastItem = allContentChildren[allContentChildren.length - 1];\n                if (allContentChildren.length > 1 && lastItem.is('element') && lastItem.isEmpty) {\n                    const contentChildrenExceptLastItem = allContentChildren.slice(0, -1);\n                    if (contentChildrenExceptLastItem.every(isListItemBlock)) {\n                        writer.remove(lastItem);\n                    }\n                }\n                // Copy/cut only content of a list item (for drag-drop move the whole list item).\n                if (data.method == 'copy' || data.method == 'cut') {\n                    const allChildren = Array.from(data.content.getChildren());\n                    const isSingleListItemSelected = isSingleListItem(allChildren);\n                    if (isSingleListItemSelected) {\n                        removeListAttributes(allChildren, writer);\n                    }\n                }\n            });\n        });\n    }\n    /**\n\t * Informs editor accessibility features about keystrokes brought by the plugin.\n\t */ _setupAccessibilityIntegration() {\n        const editor = this.editor;\n        const t = editor.t;\n        editor.accessibility.addKeystrokeInfoGroup({\n            id: 'list',\n            label: t('Keystrokes that can be used in a list'),\n            keystrokes: [\n                {\n                    label: t('Increase list item indent'),\n                    keystroke: 'Tab'\n                },\n                {\n                    label: t('Decrease list item indent'),\n                    keystroke: 'Shift+Tab'\n                }\n            ]\n        });\n    }\n}\n/**\n * Post-fixer that reacts to changes on document and fixes incorrect model states (invalid `listItemId` and `listIndent` values).\n *\n * In the example below, there is a correct list structure.\n * Then the middle element is removed so the list structure will become incorrect:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=1>Item 2</paragraph>   <--- this is removed.\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=2>Item 3</paragraph>\n * ```\n *\n * The list structure after the middle element is removed:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=2>Item 3</paragraph>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=0>Item 1</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=1>Item 3</paragraph>   <--- note that indent got post-fixed.\n * ```\n *\n * @param model The data model.\n * @param writer The writer to do changes with.\n * @param attributeNames The list of all model list attributes (including registered strategies).\n * @param ListEditing The document list editing plugin.\n * @returns `true` if any change has been applied, `false` otherwise.\n */ function modelChangePostFixer$1(model, writer, attributeNames, listEditing) {\n    const changes = model.document.differ.getChanges();\n    const itemToListHead = new Map();\n    const multiBlock = listEditing.editor.config.get('list.multiBlock');\n    let applied = false;\n    for (const entry of changes){\n        if (entry.type == 'insert' && entry.name != '$text') {\n            const item = entry.position.nodeAfter;\n            // Remove attributes in case of renamed element.\n            if (!model.schema.checkAttribute(item, 'listItemId')) {\n                for (const attributeName of Array.from(item.getAttributeKeys())){\n                    if (attributeNames.includes(attributeName)) {\n                        writer.removeAttribute(attributeName, item);\n                        applied = true;\n                    }\n                }\n            }\n            findAndAddListHeadToMap(entry.position, itemToListHead);\n            // Insert of a non-list item - check if there is a list after it.\n            if (!entry.attributes.has('listItemId')) {\n                findAndAddListHeadToMap(entry.position.getShiftedBy(entry.length), itemToListHead);\n            }\n            // Check if there is no nested list.\n            for (const { item: innerItem, previousPosition } of model.createRangeIn(item)){\n                if (isListItemBlock(innerItem)) {\n                    findAndAddListHeadToMap(previousPosition, itemToListHead);\n                }\n            }\n        } else if (entry.type == 'remove') {\n            findAndAddListHeadToMap(entry.position, itemToListHead);\n        } else if (entry.type == 'attribute' && attributeNames.includes(entry.attributeKey)) {\n            findAndAddListHeadToMap(entry.range.start, itemToListHead);\n            if (entry.attributeNewValue === null) {\n                findAndAddListHeadToMap(entry.range.start.getShiftedBy(1), itemToListHead);\n            }\n        }\n        // Make sure that there is no left over listItem element without attributes or a block with list attributes that is not a listItem.\n        if (!multiBlock && entry.type == 'attribute' && LIST_BASE_ATTRIBUTES.includes(entry.attributeKey)) {\n            const element = entry.range.start.nodeAfter;\n            if (entry.attributeNewValue === null && element && element.is('element', 'listItem')) {\n                writer.rename(element, 'paragraph');\n                applied = true;\n            } else if (entry.attributeOldValue === null && element && element.is('element') && element.name != 'listItem') {\n                writer.rename(element, 'listItem');\n                applied = true;\n            }\n        }\n    }\n    // Make sure that IDs are not shared by split list.\n    const seenIds = new Set();\n    for (const listHead of itemToListHead.values()){\n        applied = listEditing.fire('postFixer', {\n            listNodes: new ListBlocksIterable(listHead),\n            listHead,\n            writer,\n            seenIds\n        }) || applied;\n    }\n    return applied;\n}\n/**\n * A fixer for pasted content that includes list items.\n *\n * It fixes indentation of pasted list items so the pasted items match correctly to the context they are pasted into.\n *\n * Example:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=\"0\">A</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=\"1\">B^</paragraph>\n * // At ^ paste:  <paragraph listType=\"numbered\" listItemId=\"x\" listIndent=\"0\">X</paragraph>\n * //              <paragraph listType=\"numbered\" listItemId=\"y\" listIndent=\"1\">Y</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=\"2\">C</paragraph>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <paragraph listType=\"bulleted\" listItemId=\"a\" listIndent=\"0\">A</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"b\" listIndent=\"1\">BX</paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"y\" listIndent=\"2\">Y/paragraph>\n * <paragraph listType=\"bulleted\" listItemId=\"c\" listIndent=\"2\">C</paragraph>\n * ```\n */ function createModelIndentPasteFixer(model) {\n    return (evt, [content, selectable])=>{\n        const items = content.is('documentFragment') ? Array.from(content.getChildren()) : [\n            content\n        ];\n        if (!items.length) {\n            return;\n        }\n        const selection = selectable ? model.createSelection(selectable) : model.document.selection;\n        const position = selection.getFirstPosition();\n        // Get a reference list item. Attributes of the inserted list items will be fixed according to that item.\n        let refItem;\n        if (isListItemBlock(position.parent)) {\n            refItem = position.parent;\n        } else if (isListItemBlock(position.nodeBefore)) {\n            refItem = position.nodeBefore;\n        } else {\n            return; // Content is not copied into a list.\n        }\n        model.change((writer)=>{\n            const refType = refItem.getAttribute('listType');\n            const refIndent = refItem.getAttribute('listIndent');\n            const firstElementIndent = items[0].getAttribute('listIndent') || 0;\n            const indentDiff = Math.max(refIndent - firstElementIndent, 0);\n            for (const item of items){\n                const isListItem = isListItemBlock(item);\n                if (refItem.is('element', 'listItem') && item.is('element', 'paragraph')) {\n                    /**\n\t\t\t\t\t * When paragraphs or a plain text list is pasted into a simple list, convert\n\t\t\t\t\t * the `<paragraphs>' to `<listItem>' to avoid breaking the target list.\n\t\t\t\t\t *\n\t\t\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/13826.\n\t\t\t\t\t */ writer.rename(item, 'listItem');\n                }\n                writer.setAttributes({\n                    listIndent: (isListItem ? item.getAttribute('listIndent') : 0) + indentDiff,\n                    listItemId: isListItem ? item.getAttribute('listItemId') : ListItemUid.next(),\n                    listType: refType\n                }, item);\n            }\n        });\n    };\n}\n/**\n * Decides whether the merge should be accompanied by the model's `deleteContent()`, for instance, to get rid of the inline\n * content in the selection or take advantage of the heuristics in `deleteContent()` that helps convert lists into paragraphs\n * in certain cases.\n */ function shouldMergeOnBlocksContentLevel(model, direction) {\n    const selection = model.document.selection;\n    if (!selection.isCollapsed) {\n        return !getSelectedBlockObject(model);\n    }\n    if (direction === 'forward') {\n        return true;\n    }\n    const firstPosition = selection.getFirstPosition();\n    const positionParent = firstPosition.parent;\n    const previousSibling = positionParent.previousSibling;\n    if (model.schema.isObject(previousSibling)) {\n        return false;\n    }\n    if (previousSibling.isEmpty) {\n        return true;\n    }\n    return isSingleListItem([\n        positionParent,\n        previousSibling\n    ]);\n}\n\n/**\n * Helper method for creating toolbar and menu buttons and linking them with an appropriate command.\n *\n * @internal\n * @param editor The editor instance to which the UI component will be added.\n * @param commandName The name of the command.\n * @param label The button label.\n * @param icon The source of the icon.\n */ function createUIComponents(editor, commandName, label, icon) {\n    editor.ui.componentFactory.add(commandName, ()=>{\n        const buttonView = _createButton(ButtonView, editor, commandName, label, icon);\n        buttonView.set({\n            tooltip: true,\n            isToggleable: true\n        });\n        return buttonView;\n    });\n    editor.ui.componentFactory.add(`menuBar:${commandName}`, ()=>{\n        const buttonView = _createButton(MenuBarMenuListItemButtonView, editor, commandName, label, icon);\n        buttonView.set({\n            role: 'menuitemcheckbox',\n            isToggleable: true\n        });\n        return buttonView;\n    });\n}\n/**\n * Creates a button to use either in toolbar or in menu bar.\n */ function _createButton(ButtonClass, editor, commandName, label, icon) {\n    const command = editor.commands.get(commandName);\n    const view = new ButtonClass(editor.locale);\n    view.set({\n        label,\n        icon\n    });\n    // Bind button model to command.\n    view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');\n    // Execute the command.\n    view.on('execute', ()=>{\n        editor.execute(commandName);\n        editor.editing.view.focus();\n    });\n    return view;\n}\n\n/**\n * The list UI feature. It introduces the `'numberedList'` and `'bulletedList'` buttons that\n * allow to convert paragraphs to and from list items and indent or outdent them.\n */ class ListUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ListUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const t = this.editor.t;\n        // Create button numberedList.\n        if (!this.editor.ui.componentFactory.has('numberedList')) {\n            createUIComponents(this.editor, 'numberedList', t('Numbered List'), icons.numberedList);\n        }\n        // Create button bulletedList.\n        if (!this.editor.ui.componentFactory.has('bulletedList')) {\n            createUIComponents(this.editor, 'bulletedList', t('Bulleted List'), icons.bulletedList);\n        }\n    }\n}\n\n/**\n * The list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/list/listediting~ListEditing  list\n * editing feature} and {@link module:list/list/listui~ListUI list UI feature}.\n */ class List extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ListEditing,\n            ListUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'List';\n    }\n}\n\n/**\n * The list start index command. It changes the `listStart` attribute of the selected list items,\n * letting the user to choose the starting point of an ordered list.\n * It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n */ class ListStartCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const value = this._getValue();\n        this.value = value;\n        this.isEnabled = value != null;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.startIndex The list start index.\n\t */ execute({ startIndex = 1 } = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        let blocks = Array.from(document.selection.getSelectedBlocks()).filter((block)=>isListItemBlock(block) && isNumberedListType(block.getAttribute('listType')));\n        blocks = expandListBlocksToCompleteList(blocks);\n        model.change((writer)=>{\n            for (const block of blocks){\n                writer.setAttribute('listStart', startIndex >= 0 ? startIndex : 1, block);\n            }\n        });\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */ _getValue() {\n        const model = this.editor.model;\n        const document = model.document;\n        const block = first(document.selection.getSelectedBlocks());\n        if (block && isListItemBlock(block) && isNumberedListType(block.getAttribute('listType'))) {\n            return block.getAttribute('listStart');\n        }\n        return null;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n* @module list/listproperties/utils/style\n*/ const LIST_STYLE_TO_LIST_TYPE = {};\nconst LIST_STYLE_TO_TYPE_ATTRIBUTE = {};\nconst TYPE_ATTRIBUTE_TO_LIST_STYLE = {};\nconst LIST_STYLE_TYPES = [\n    {\n        listStyle: 'disc',\n        typeAttribute: 'disc',\n        listType: 'bulleted'\n    },\n    {\n        listStyle: 'circle',\n        typeAttribute: 'circle',\n        listType: 'bulleted'\n    },\n    {\n        listStyle: 'square',\n        typeAttribute: 'square',\n        listType: 'bulleted'\n    },\n    {\n        listStyle: 'decimal',\n        typeAttribute: '1',\n        listType: 'numbered'\n    },\n    {\n        listStyle: 'decimal-leading-zero',\n        typeAttribute: null,\n        listType: 'numbered'\n    },\n    {\n        listStyle: 'lower-roman',\n        typeAttribute: 'i',\n        listType: 'numbered'\n    },\n    {\n        listStyle: 'upper-roman',\n        typeAttribute: 'I',\n        listType: 'numbered'\n    },\n    {\n        listStyle: 'lower-alpha',\n        typeAttribute: 'a',\n        listType: 'numbered'\n    },\n    {\n        listStyle: 'upper-alpha',\n        typeAttribute: 'A',\n        listType: 'numbered'\n    },\n    {\n        listStyle: 'lower-latin',\n        typeAttribute: 'a',\n        listType: 'numbered'\n    },\n    {\n        listStyle: 'upper-latin',\n        typeAttribute: 'A',\n        listType: 'numbered'\n    }\n];\nfor (const { listStyle, typeAttribute, listType } of LIST_STYLE_TYPES){\n    LIST_STYLE_TO_LIST_TYPE[listStyle] = listType;\n    LIST_STYLE_TO_TYPE_ATTRIBUTE[listStyle] = typeAttribute;\n    if (typeAttribute) {\n        TYPE_ATTRIBUTE_TO_LIST_STYLE[typeAttribute] = listStyle;\n    }\n}\n/**\n * Gets all the style types supported by given list type.\n */ function getAllSupportedStyleTypes() {\n    return LIST_STYLE_TYPES.map((x)=>x.listStyle);\n}\n/**\n * Checks whether the given list-style-type is supported by numbered or bulleted list.\n */ function getListTypeFromListStyleType$1(listStyleType) {\n    return LIST_STYLE_TO_LIST_TYPE[listStyleType] || null;\n}\n/**\n * Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.\n */ function getListStyleTypeFromTypeAttribute(value) {\n    return TYPE_ATTRIBUTE_TO_LIST_STYLE[value] || null;\n}\n/**\n * Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.\n */ function getTypeAttributeFromListStyleType(value) {\n    return LIST_STYLE_TO_TYPE_ATTRIBUTE[value] || null;\n}\n\n/**\n * The list style command. It changes `listStyle` attribute of the selected list items,\n * letting the user choose styles for the list item markers.\n * It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n */ class ListStyleCommand extends Command {\n    /**\n\t * The default type of the list style.\n\t */ defaultType;\n    /**\n\t * The list of supported style types by this command.\n\t */ _supportedTypes;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param defaultType The list type that will be used by default if the value was not specified during\n\t * the command execution.\n\t * @param supportedTypes The list of supported style types by this command.\n\t */ constructor(editor, defaultType, supportedTypes){\n        super(editor);\n        this.defaultType = defaultType;\n        this._supportedTypes = supportedTypes;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.value = this._getValue();\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.type The type of the list style, e.g. `'disc'` or `'square'`. If `null` is specified, the default\n\t * style will be applied.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        model.change((writer)=>{\n            this._tryToConvertItemsToList(options);\n            let blocks = Array.from(document.selection.getSelectedBlocks()).filter((block)=>block.hasAttribute('listType'));\n            if (!blocks.length) {\n                return;\n            }\n            blocks = expandListBlocksToCompleteList(blocks);\n            for (const block of blocks){\n                writer.setAttribute('listStyle', options.type || this.defaultType, block);\n            }\n        });\n    }\n    /**\n\t * Checks if the given style type is supported by this plugin.\n\t */ isStyleTypeSupported(value) {\n        if (!this._supportedTypes) {\n            return true;\n        }\n        return this._supportedTypes.includes(value);\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */ _getValue() {\n        const listItem = first(this.editor.model.document.selection.getSelectedBlocks());\n        if (isListItemBlock(listItem)) {\n            return listItem.getAttribute('listStyle');\n        }\n        return null;\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        const editor = this.editor;\n        const numberedList = editor.commands.get('numberedList');\n        const bulletedList = editor.commands.get('bulletedList');\n        return numberedList.isEnabled || bulletedList.isEnabled;\n    }\n    /**\n\t * Check if the provided list style is valid. Also change the selection to a list if it's not set yet.\n\t *\n\t * @param options.type The type of the list style. If `null` is specified, the function does nothing.\n\t*/ _tryToConvertItemsToList(options) {\n        if (!options.type) {\n            return;\n        }\n        const listType = getListTypeFromListStyleType$1(options.type);\n        if (!listType) {\n            return;\n        }\n        const editor = this.editor;\n        const commandName = `${listType}List`;\n        const command = editor.commands.get(commandName);\n        if (!command.value) {\n            editor.execute(commandName);\n        }\n    }\n}\n\n/**\n * The list reversed command. It changes the `listReversed` attribute of the selected list items,\n * letting the user to choose the order of an ordered list.\n * It is used by the {@link module:list/listproperties~ListProperties list properties feature}.\n */ class ListReversedCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const value = this._getValue();\n        this.value = value;\n        this.isEnabled = value != null;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.reversed Whether the list should be reversed.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        let blocks = Array.from(document.selection.getSelectedBlocks()).filter((block)=>isListItemBlock(block) && block.getAttribute('listType') == 'numbered');\n        blocks = expandListBlocksToCompleteList(blocks);\n        model.change((writer)=>{\n            for (const block of blocks){\n                writer.setAttribute('listReversed', !!options.reversed, block);\n            }\n        });\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t */ _getValue() {\n        const model = this.editor.model;\n        const document = model.document;\n        const block = first(document.selection.getSelectedBlocks());\n        if (isListItemBlock(block) && block.getAttribute('listType') == 'numbered') {\n            return block.getAttribute('listReversed');\n        }\n        return null;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module list/listproperties/converters\n */ /**\n * Returns a converter that consumes the `style`, `reversed`, and `start` attributes.\n * In `style`, it searches for the `list-style-type` definition.\n * If not found, the `\"default\"` value will be used.\n *\n * @internal\n * @param strategy\n */ function listPropertiesUpcastConverter(strategy) {\n    return (evt, data, conversionApi)=>{\n        const { writer, schema, consumable } = conversionApi;\n        // If there is no view consumable to consume, set the default attribute value to be able to reconvert nested lists on parent change.\n        // So abort converting if attribute was directly consumed.\n        if (consumable.test(data.viewItem, strategy.viewConsumables) === false) {\n            return;\n        }\n        if (!data.modelRange) {\n            Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n        }\n        let applied = false;\n        for (const item of data.modelRange.getItems({\n            shallow: true\n        })){\n            if (!schema.checkAttribute(item, strategy.attributeName)) {\n                continue;\n            }\n            if (!strategy.appliesToListItem(item)) {\n                continue;\n            }\n            // Set list attributes only on same level items, those nested deeper are already handled by the recursive conversion.\n            if (item.hasAttribute(strategy.attributeName)) {\n                continue;\n            }\n            writer.setAttribute(strategy.attributeName, strategy.getAttributeOnUpcast(data.viewItem), item);\n            applied = true;\n        }\n        if (applied) {\n            consumable.consume(data.viewItem, strategy.viewConsumables);\n        }\n    };\n}\n\n/**\n * A set of helpers related to document lists.\n */ class ListPropertiesUtils extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ListPropertiesUtils';\n    }\n    /**\n\t * Gets all the style types supported by given list type.\n\t */ getAllSupportedStyleTypes() {\n        return getAllSupportedStyleTypes();\n    }\n    /**\n\t * Checks whether the given list-style-type is supported by numbered or bulleted list.\n\t */ getListTypeFromListStyleType(listStyleType) {\n        return getListTypeFromListStyleType$1(listStyleType);\n    }\n    /**\n\t * Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.\n\t */ getListStyleTypeFromTypeAttribute(value) {\n        return getListStyleTypeFromTypeAttribute(value);\n    }\n    /**\n\t * Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.\n\t */ getTypeAttributeFromListStyleType(value) {\n        return getTypeAttributeFromListStyleType(value);\n    }\n}\n\n/**\n * Normalizes {@link module:list/listconfig~ListPropertiesConfig} in the configuration of the list properties feature.\n * The structure of normalized list properties options looks as follows:\n *\n * ```ts\n * {\n * \tstyles: {\n * \t\tlistTypes: [ 'bulleted', 'numbered' ],\n * \t\tuseAttribute: false\n * \t},\n * \tstartIndex: true,\n * \treversed: true\n * }\n * ```\n *\n * @param config The list properties {@link module:list/listconfig~ListPropertiesConfig config}.\n * @returns An object with normalized list properties options.\n */ function getNormalizedConfig(config) {\n    const { startIndex, reversed, styles } = config;\n    return {\n        styles: getNormalizedStylesConfig(styles),\n        startIndex: startIndex || false,\n        reversed: reversed || false\n    };\n}\n/**\n * Normalizes styles in the configuration of the list properties feature.\n * The structure of normalized list properties options looks as follows:\n *\n * ```ts\n * {\n * \tlistTypes: [ 'bulleted', 'numbered' ],\n * \tuseAttribute: false\n * }\n * ```\n *\n * @param styles The list properties styles.\n * @returns An object with normalized list properties styles.\n */ function getNormalizedStylesConfig(styles) {\n    const normalizedConfig = {\n        listTypes: [\n            'bulleted',\n            'numbered'\n        ],\n        useAttribute: false\n    };\n    if (styles === true) {\n        return normalizedConfig;\n    }\n    if (!styles) {\n        normalizedConfig.listTypes = [];\n    } else if (Array.isArray(styles) || typeof styles == 'string') {\n        normalizedConfig.listTypes = toArray(styles);\n    } else {\n        normalizedConfig.listTypes = styles.listTypes ? toArray(styles.listTypes) : normalizedConfig.listTypes;\n        normalizedConfig.useAttribute = !!styles.useAttribute;\n    }\n    return normalizedConfig;\n}\n\nconst DEFAULT_LIST_TYPE$1 = 'default';\n/**\n * The document list properties engine feature.\n *\n * It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.\n * Read more in {@link module:list/listconfig~ListPropertiesConfig}.\n */ class ListPropertiesEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ListEditing,\n            ListPropertiesUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ListPropertiesEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('list.properties', {\n            styles: true,\n            startIndex: false,\n            reversed: false\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const listEditing = editor.plugins.get(ListEditing);\n        const enabledProperties = editor.config.get('list.properties');\n        const strategies = createAttributeStrategies$1(enabledProperties);\n        for (const strategy of strategies){\n            strategy.addCommand(editor);\n            model.schema.extend('$listItem', {\n                allowAttributes: strategy.attributeName\n            });\n            // Register downcast strategy.\n            listEditing.registerDowncastStrategy({\n                scope: 'list',\n                attributeName: strategy.attributeName,\n                setAttributeOnDowncast (writer, attributeValue, viewElement) {\n                    strategy.setAttributeOnDowncast(writer, attributeValue, viewElement);\n                }\n            });\n        }\n        // Set up conversion.\n        editor.conversion.for('upcast').add((dispatcher)=>{\n            for (const strategy of strategies){\n                dispatcher.on('element:ol', listPropertiesUpcastConverter(strategy));\n                dispatcher.on('element:ul', listPropertiesUpcastConverter(strategy));\n            }\n        });\n        // Verify if the list view element (ul or ol) requires refreshing.\n        listEditing.on('checkAttributes:list', (evt, { viewElement, modelAttributes })=>{\n            for (const strategy of strategies){\n                if (strategy.getAttributeOnUpcast(viewElement) != modelAttributes[strategy.attributeName]) {\n                    evt.return = true;\n                    evt.stop();\n                }\n            }\n        });\n        // Reset list properties after indenting list items.\n        this.listenTo(editor.commands.get('indentList'), 'afterExecute', (evt, changedBlocks)=>{\n            model.change((writer)=>{\n                for (const node of changedBlocks){\n                    for (const strategy of strategies){\n                        if (strategy.appliesToListItem(node)) {\n                            // Just reset the attribute.\n                            // If there is a previous indented list that this node should be merged into,\n                            // the postfixer will unify all the attributes of both sub-lists.\n                            writer.setAttribute(strategy.attributeName, strategy.defaultValue, node);\n                        }\n                    }\n                }\n            });\n        });\n        // Add or remove list properties attributes depending on the list type.\n        listEditing.on('postFixer', (evt, { listNodes, writer })=>{\n            for (const { node } of listNodes){\n                for (const strategy of strategies){\n                    // Check if attribute is valid.\n                    if (strategy.hasValidAttribute(node)) {\n                        continue;\n                    }\n                    // Add missing default property attributes...\n                    if (strategy.appliesToListItem(node)) {\n                        writer.setAttribute(strategy.attributeName, strategy.defaultValue, node);\n                    } else {\n                        writer.removeAttribute(strategy.attributeName, node);\n                    }\n                    evt.return = true;\n                }\n            }\n        });\n        // Make sure that all items in a single list (items at the same level & listType) have the same properties.\n        listEditing.on('postFixer', (evt, { listNodes, writer })=>{\n            for (const { node, previousNodeInList } of listNodes){\n                // This is a first item of a nested list.\n                if (!previousNodeInList) {\n                    continue;\n                }\n                // This is a first block of a list of a different type.\n                if (previousNodeInList.getAttribute('listType') != node.getAttribute('listType')) {\n                    continue;\n                }\n                // Copy properties from the previous one.\n                for (const strategy of strategies){\n                    const { attributeName } = strategy;\n                    if (!strategy.appliesToListItem(node)) {\n                        continue;\n                    }\n                    const value = previousNodeInList.getAttribute(attributeName);\n                    if (node.getAttribute(attributeName) != value) {\n                        writer.setAttribute(attributeName, value, node);\n                        evt.return = true;\n                    }\n                }\n            }\n        });\n    }\n}\n/**\n * Creates an array of strategies for dealing with enabled listItem attributes.\n */ function createAttributeStrategies$1(enabledProperties) {\n    const strategies = [];\n    const normalizedConfig = getNormalizedConfig(enabledProperties);\n    if (enabledProperties.styles) {\n        const useAttribute = normalizedConfig.styles.useAttribute;\n        strategies.push({\n            attributeName: 'listStyle',\n            defaultValue: DEFAULT_LIST_TYPE$1,\n            viewConsumables: {\n                styles: 'list-style-type'\n            },\n            addCommand (editor) {\n                let supportedTypes = getAllSupportedStyleTypes();\n                if (useAttribute) {\n                    supportedTypes = supportedTypes.filter((styleType)=>!!getTypeAttributeFromListStyleType(styleType));\n                }\n                editor.commands.add('listStyle', new ListStyleCommand(editor, DEFAULT_LIST_TYPE$1, supportedTypes));\n            },\n            appliesToListItem (item) {\n                return item.getAttribute('listType') == 'numbered' || item.getAttribute('listType') == 'bulleted';\n            },\n            hasValidAttribute (item) {\n                if (!this.appliesToListItem(item)) {\n                    return !item.hasAttribute('listStyle');\n                }\n                if (!item.hasAttribute('listStyle')) {\n                    return false;\n                }\n                const value = item.getAttribute('listStyle');\n                if (value == DEFAULT_LIST_TYPE$1) {\n                    return true;\n                }\n                return getListTypeFromListStyleType$1(value) == item.getAttribute('listType');\n            },\n            setAttributeOnDowncast (writer, listStyle, element) {\n                if (listStyle && listStyle !== DEFAULT_LIST_TYPE$1) {\n                    if (useAttribute) {\n                        const value = getTypeAttributeFromListStyleType(listStyle);\n                        if (value) {\n                            writer.setAttribute('type', value, element);\n                            return;\n                        }\n                    } else {\n                        writer.setStyle('list-style-type', listStyle, element);\n                        return;\n                    }\n                }\n                writer.removeStyle('list-style-type', element);\n                writer.removeAttribute('type', element);\n            },\n            getAttributeOnUpcast (listParent) {\n                const style = listParent.getStyle('list-style-type');\n                if (style) {\n                    return style;\n                }\n                const attribute = listParent.getAttribute('type');\n                if (attribute) {\n                    return getListStyleTypeFromTypeAttribute(attribute);\n                }\n                return DEFAULT_LIST_TYPE$1;\n            }\n        });\n    }\n    if (enabledProperties.reversed) {\n        strategies.push({\n            attributeName: 'listReversed',\n            defaultValue: false,\n            viewConsumables: {\n                attributes: 'reversed'\n            },\n            addCommand (editor) {\n                editor.commands.add('listReversed', new ListReversedCommand(editor));\n            },\n            appliesToListItem (item) {\n                return item.getAttribute('listType') == 'numbered';\n            },\n            hasValidAttribute (item) {\n                return this.appliesToListItem(item) == item.hasAttribute('listReversed');\n            },\n            setAttributeOnDowncast (writer, listReversed, element) {\n                if (listReversed) {\n                    writer.setAttribute('reversed', 'reversed', element);\n                } else {\n                    writer.removeAttribute('reversed', element);\n                }\n            },\n            getAttributeOnUpcast (listParent) {\n                return listParent.hasAttribute('reversed');\n            }\n        });\n    }\n    if (enabledProperties.startIndex) {\n        strategies.push({\n            attributeName: 'listStart',\n            defaultValue: 1,\n            viewConsumables: {\n                attributes: 'start'\n            },\n            addCommand (editor) {\n                editor.commands.add('listStart', new ListStartCommand(editor));\n            },\n            appliesToListItem (item) {\n                return isNumberedListType(item.getAttribute('listType'));\n            },\n            hasValidAttribute (item) {\n                return this.appliesToListItem(item) == item.hasAttribute('listStart');\n            },\n            setAttributeOnDowncast (writer, listStart, element) {\n                if (listStart == 0 || listStart > 1) {\n                    writer.setAttribute('start', listStart, element);\n                } else {\n                    writer.removeAttribute('start', element);\n                }\n            },\n            getAttributeOnUpcast (listParent) {\n                const startAttributeValue = listParent.getAttribute('start');\n                return startAttributeValue >= 0 ? startAttributeValue : 1;\n            }\n        });\n    }\n    return strategies;\n}\n\n/**\n * The list properties view to be displayed in the list dropdown.\n *\n * Contains a grid of available list styles and, for numbered list, also the list start index and reversed fields.\n *\n * @internal\n */ class ListPropertiesView extends View {\n    /**\n\t * A collection of the child views.\n\t */ children;\n    /**\n\t * A view that renders the grid of list styles.\n\t */ stylesView = null;\n    /**\n\t * A collapsible view that hosts additional list property fields ({@link #startIndexFieldView} and\n\t * {@link #reversedSwitchButtonView}) to visually separate them from the {@link #stylesView grid of styles}.\n\t *\n\t * **Note**: Only present when:\n\t * * the view represents **numbered** list properties,\n\t * * and the {@link #stylesView} is rendered,\n\t * * and either {@link #startIndexFieldView} or {@link #reversedSwitchButtonView} is rendered.\n\t *\n\t * @readonly\n\t */ additionalPropertiesCollapsibleView = null;\n    /**\n\t * A labeled number field allowing the user to set the start index of the list.\n\t *\n\t * **Note**: Only present when the view represents **numbered** list properties.\n\t *\n\t * @readonly\n\t */ startIndexFieldView = null;\n    /**\n\t * A switch button allowing the user to make the edited list reversed.\n\t *\n\t * **Note**: Only present when the view represents **numbered** list properties.\n\t *\n\t * @readonly\n\t */ reversedSwitchButtonView = null;\n    /**\n\t * Tracks information about the DOM focus in the view.\n\t */ focusTracker = new FocusTracker();\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes = new KeystrokeHandler();\n    /**\n\t * A collection of views that can be focused in the properties view.\n\t */ focusables = new ViewCollection();\n    /**\n\t * Helps cycling over {@link #focusables} in the view.\n\t */ focusCycler;\n    /**\n\t * Creates an instance of the list properties view.\n\t *\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options Options of the view.\n\t * @param options.enabledProperties An object containing the configuration of enabled list property names.\n\t * Allows conditional rendering the sub-components of the properties view.\n\t * @param options.styleButtonViews A list of style buttons to be rendered\n\t * inside the styles grid. The grid will not be rendered when `enabledProperties` does not include the `'styles'` key.\n\t * @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).\n\t */ constructor(locale, { enabledProperties, styleButtonViews, styleGridAriaLabel }){\n        super(locale);\n        const elementCssClasses = [\n            'ck',\n            'ck-list-properties'\n        ];\n        this.children = this.createCollection();\n        this.focusCycler = new FocusCycler({\n            focusables: this.focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate #children backwards using the <kbd>Shift</kbd> + <kbd>Tab</kbd> keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate #children forwards using the <kbd>Tab</kbd> key.\n                focusNext: 'tab'\n            }\n        });\n        // The rendering of the styles grid is conditional. When there is no styles grid, the view will render without collapsible\n        // for numbered list properties, hence simplifying the layout.\n        if (styleButtonViews && styleButtonViews.length) {\n            this.stylesView = this._createStylesView(styleButtonViews, styleGridAriaLabel);\n            this.children.add(this.stylesView);\n        } else {\n            elementCssClasses.push('ck-list-properties_without-styles');\n        }\n        // The rendering of the numbered list property views is also conditional. It only makes sense for the numbered list\n        // dropdown. The unordered list does not have such properties.\n        if (enabledProperties.startIndex || enabledProperties.reversed) {\n            this._addNumberedListPropertyViews(enabledProperties);\n            elementCssClasses.push('ck-list-properties_with-numbered-properties');\n        }\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: elementCssClasses\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        if (this.stylesView) {\n            this.focusables.add(this.stylesView);\n            this.focusTracker.add(this.stylesView.element);\n            // Register the collapsible toggle button to the focus system.\n            if (this.startIndexFieldView || this.reversedSwitchButtonView) {\n                this.focusables.add(this.children.last.buttonView);\n                this.focusTracker.add(this.children.last.buttonView.element);\n            }\n            for (const item of this.stylesView.children){\n                this.stylesView.focusTracker.add(item.element);\n            }\n            addKeyboardHandlingForGrid({\n                keystrokeHandler: this.stylesView.keystrokes,\n                focusTracker: this.stylesView.focusTracker,\n                gridItems: this.stylesView.children,\n                // Note: The styles view has a different number of columns depending on whether the other properties\n                // are enabled in the dropdown or not (https://github.com/ckeditor/ckeditor5/issues/12340)\n                numberOfColumns: ()=>global.window.getComputedStyle(this.stylesView.element).getPropertyValue('grid-template-columns').split(' ').length,\n                uiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n            });\n        }\n        if (this.startIndexFieldView) {\n            this.focusables.add(this.startIndexFieldView);\n            this.focusTracker.add(this.startIndexFieldView.element);\n            const stopPropagation = (data)=>data.stopPropagation();\n            // Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n            // keystroke handler would take over the key management in the input. We need to prevent\n            // this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n            this.keystrokes.set('arrowright', stopPropagation);\n            this.keystrokes.set('arrowleft', stopPropagation);\n            this.keystrokes.set('arrowup', stopPropagation);\n            this.keystrokes.set('arrowdown', stopPropagation);\n        }\n        if (this.reversedSwitchButtonView) {\n            this.focusables.add(this.reversedSwitchButtonView);\n            this.focusTracker.add(this.reversedSwitchButtonView.element);\n        }\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ focus() {\n        this.focusCycler.focusFirst();\n    }\n    /**\n\t * @inheritDoc\n\t */ focusLast() {\n        this.focusCycler.focusLast();\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Creates the list styles grid.\n\t *\n\t * @param styleButtons Buttons to be placed in the grid.\n\t * @param styleGridAriaLabel The assistive technology label of the grid.\n\t */ _createStylesView(styleButtons, styleGridAriaLabel) {\n        const stylesView = new View(this.locale);\n        stylesView.children = stylesView.createCollection();\n        stylesView.children.addMany(styleButtons);\n        stylesView.setTemplate({\n            tag: 'div',\n            attributes: {\n                'aria-label': styleGridAriaLabel,\n                class: [\n                    'ck',\n                    'ck-list-styles-list'\n                ]\n            },\n            children: stylesView.children\n        });\n        stylesView.children.delegate('execute').to(this);\n        stylesView.focus = function() {\n            this.children.first.focus();\n        };\n        stylesView.focusTracker = new FocusTracker();\n        stylesView.keystrokes = new KeystrokeHandler();\n        stylesView.render();\n        stylesView.keystrokes.listenTo(stylesView.element);\n        return stylesView;\n    }\n    /**\n\t * Renders {@link #startIndexFieldView} and/or {@link #reversedSwitchButtonView} depending on the configuration of the properties view.\n\t *\n\t * @param enabledProperties An object containing the configuration of enabled list property names\n\t * (see {@link #constructor}).\n\t */ _addNumberedListPropertyViews(enabledProperties) {\n        const t = this.locale.t;\n        const numberedPropertyViews = [];\n        if (enabledProperties.startIndex) {\n            this.startIndexFieldView = this._createStartIndexField();\n            numberedPropertyViews.push(this.startIndexFieldView);\n        }\n        if (enabledProperties.reversed) {\n            this.reversedSwitchButtonView = this._createReversedSwitchButton();\n            numberedPropertyViews.push(this.reversedSwitchButtonView);\n        }\n        // When there are some style buttons, pack the numbered list properties into a collapsible to separate them.\n        if (this.stylesView) {\n            this.additionalPropertiesCollapsibleView = new CollapsibleView(this.locale, numberedPropertyViews);\n            this.additionalPropertiesCollapsibleView.set({\n                label: t('List properties'),\n                isCollapsed: true\n            });\n            // Don't enable the collapsible view unless either start index or reversed field is enabled (e.g. when no list is selected).\n            this.additionalPropertiesCollapsibleView.buttonView.bind('isEnabled').toMany(numberedPropertyViews, 'isEnabled', (...areEnabled)=>areEnabled.some((isEnabled)=>isEnabled));\n            // Automatically collapse the additional properties collapsible when either start index or reversed field gets disabled.\n            this.additionalPropertiesCollapsibleView.buttonView.on('change:isEnabled', (evt, data, isEnabled)=>{\n                if (!isEnabled) {\n                    this.additionalPropertiesCollapsibleView.isCollapsed = true;\n                }\n            });\n            this.children.add(this.additionalPropertiesCollapsibleView);\n        } else {\n            this.children.addMany(numberedPropertyViews);\n        }\n    }\n    /**\n\t * Creates the list start index labeled field.\n\t */ _createStartIndexField() {\n        const t = this.locale.t;\n        const startIndexFieldView = new LabeledFieldView(this.locale, createLabeledInputNumber);\n        startIndexFieldView.set({\n            label: t('Start at'),\n            class: 'ck-numbered-list-properties__start-index'\n        });\n        startIndexFieldView.fieldView.set({\n            min: 0,\n            step: 1,\n            value: 1,\n            inputMode: 'numeric'\n        });\n        startIndexFieldView.fieldView.on('input', ()=>{\n            const inputElement = startIndexFieldView.fieldView.element;\n            const startIndex = inputElement.valueAsNumber;\n            if (Number.isNaN(startIndex)) {\n                // Number inputs allow for the entry of characters that may result in NaN,\n                // such as 'e', '+', '123e', '2-'.\n                startIndexFieldView.errorText = t('Invalid start index value.');\n                return;\n            }\n            if (!inputElement.checkValidity()) {\n                startIndexFieldView.errorText = t('Start index must be greater than 0.');\n            } else {\n                this.fire('listStart', {\n                    startIndex\n                });\n            }\n        });\n        return startIndexFieldView;\n    }\n    /**\n\t * Creates the reversed list switch button.\n\t */ _createReversedSwitchButton() {\n        const t = this.locale.t;\n        const reversedButtonView = new SwitchButtonView(this.locale);\n        reversedButtonView.set({\n            withText: true,\n            label: t('Reversed order'),\n            class: 'ck-numbered-list-properties__reversed-order'\n        });\n        reversedButtonView.delegate('execute').to(this, 'listReversed');\n        return reversedButtonView;\n    }\n}\n\nvar listStyleDiscIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z\\\"/></svg>\";\n\nvar listStyleCircleIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z\\\"/></svg>\";\n\nvar listStyleSquareIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z\\\"/></svg>\";\n\nvar listStyleDecimalIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z\\\"/></svg>\";\n\nvar listStyleDecimalWithLeadingZeroIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z\\\"/></svg>\";\n\nvar listStyleLowerRomanIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z\\\"/></svg>\";\n\nvar listStyleUpperRomanIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z\\\"/></svg>\";\n\nvar listStyleLowerLatinIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z\\\"/></svg>\";\n\nvar listStyleUpperLatinIcon = \"<svg viewBox=\\\"0 0 44 44\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z\\\" fill-opacity=\\\".163\\\"/><path d=\\\"m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z\\\"/></svg>\";\n\n/**\n * The list properties UI plugin. It introduces the extended `'bulletedList'` and `'numberedList'` toolbar\n * buttons that allow users to control such aspects of list as the marker, start index or order.\n *\n * **Note**: Buttons introduced by this plugin override implementations from the {@link module:list/list/listui~ListUI}\n * (because they share the same names).\n */ class ListPropertiesUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ListPropertiesUI';\n    }\n    init() {\n        const editor = this.editor;\n        const t = editor.locale.t;\n        const propertiesConfig = editor.config.get('list.properties');\n        const normalizedConfig = getNormalizedConfig(propertiesConfig);\n        const stylesListTypes = normalizedConfig.styles.listTypes;\n        // Note: When this plugin does not register the \"bulletedList\" dropdown due to properties configuration,\n        // a simple button will be still registered under the same name by ListUI as a fallback. This should happen\n        // in most editor configuration because the List plugin automatically requires ListUI.\n        if (stylesListTypes.includes('bulleted')) {\n            const styleDefinitions = [\n                {\n                    label: t('Toggle the disc list style'),\n                    tooltip: t('Disc'),\n                    type: 'disc',\n                    icon: listStyleDiscIcon\n                },\n                {\n                    label: t('Toggle the circle list style'),\n                    tooltip: t('Circle'),\n                    type: 'circle',\n                    icon: listStyleCircleIcon\n                },\n                {\n                    label: t('Toggle the square list style'),\n                    tooltip: t('Square'),\n                    type: 'square',\n                    icon: listStyleSquareIcon\n                }\n            ];\n            const buttonLabel = t('Bulleted List');\n            const styleGridAriaLabel = t('Bulleted list styles toolbar');\n            const commandName = 'bulletedList';\n            editor.ui.componentFactory.add(commandName, getDropdownViewCreator({\n                editor,\n                normalizedConfig,\n                parentCommandName: commandName,\n                buttonLabel,\n                buttonIcon: icons.bulletedList,\n                styleGridAriaLabel,\n                styleDefinitions\n            }));\n            // Add the menu bar item for bulleted list.\n            editor.ui.componentFactory.add(`menuBar:${commandName}`, getMenuBarStylesMenuCreator({\n                editor,\n                normalizedConfig,\n                parentCommandName: commandName,\n                buttonLabel,\n                styleGridAriaLabel,\n                styleDefinitions\n            }));\n        }\n        // Note: When this plugin does not register the \"numberedList\" dropdown due to properties configuration,\n        // a simple button will be still registered under the same name by ListUI as a fallback. This should happen\n        // in most editor configuration because the List plugin automatically requires ListUI.\n        if (stylesListTypes.includes('numbered') || propertiesConfig.startIndex || propertiesConfig.reversed) {\n            const styleDefinitions = [\n                {\n                    label: t('Toggle the decimal list style'),\n                    tooltip: t('Decimal'),\n                    type: 'decimal',\n                    icon: listStyleDecimalIcon\n                },\n                {\n                    label: t('Toggle the decimal with leading zero list style'),\n                    tooltip: t('Decimal with leading zero'),\n                    type: 'decimal-leading-zero',\n                    icon: listStyleDecimalWithLeadingZeroIcon\n                },\n                {\n                    label: t('Toggle the lower–roman list style'),\n                    tooltip: t('Lower–roman'),\n                    type: 'lower-roman',\n                    icon: listStyleLowerRomanIcon\n                },\n                {\n                    label: t('Toggle the upper–roman list style'),\n                    tooltip: t('Upper-roman'),\n                    type: 'upper-roman',\n                    icon: listStyleUpperRomanIcon\n                },\n                {\n                    label: t('Toggle the lower–latin list style'),\n                    tooltip: t('Lower-latin'),\n                    type: 'lower-latin',\n                    icon: listStyleLowerLatinIcon\n                },\n                {\n                    label: t('Toggle the upper–latin list style'),\n                    tooltip: t('Upper-latin'),\n                    type: 'upper-latin',\n                    icon: listStyleUpperLatinIcon\n                }\n            ];\n            const buttonLabel = t('Numbered List');\n            const styleGridAriaLabel = t('Numbered list styles toolbar');\n            const commandName = 'numberedList';\n            editor.ui.componentFactory.add(commandName, getDropdownViewCreator({\n                editor,\n                normalizedConfig,\n                parentCommandName: commandName,\n                buttonLabel,\n                buttonIcon: icons.numberedList,\n                styleGridAriaLabel,\n                styleDefinitions\n            }));\n            // Menu bar menu does not display list start index or reverse UI. If there are no styles enabled,\n            // the menu makes no sense and should be omitted.\n            if (stylesListTypes.includes('numbered')) {\n                editor.ui.componentFactory.add(`menuBar:${commandName}`, getMenuBarStylesMenuCreator({\n                    editor,\n                    normalizedConfig,\n                    parentCommandName: commandName,\n                    buttonLabel,\n                    styleGridAriaLabel,\n                    styleDefinitions\n                }));\n            }\n        }\n    }\n}\n/**\n * A helper that returns a function that creates a split button with a toolbar in the dropdown,\n * which in turn contains buttons allowing users to change list styles in the context of the current selection.\n *\n * @param options.editor\n * @param options.normalizedConfig List properties configuration.\n * @param options.parentCommandName The name of the higher-order editor command associated with\n * the set of particular list styles (e.g. \"bulletedList\" for \"disc\", \"circle\", and \"square\" styles).\n * @param options.buttonLabel Label of the main part of the split button.\n * @param options.buttonIcon The SVG string of an icon for the main part of the split button.\n * @param options.styleGridAriaLabel The ARIA label for the styles grid in the split button dropdown.\n * @param options.styleDefinitions Definitions of the style buttons.\n * @returns A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.\n */ function getDropdownViewCreator({ editor, normalizedConfig, parentCommandName, buttonLabel, buttonIcon, styleGridAriaLabel, styleDefinitions }) {\n    const parentCommand = editor.commands.get(parentCommandName);\n    return (locale)=>{\n        const dropdownView = createDropdown(locale, SplitButtonView);\n        const mainButtonView = dropdownView.buttonView;\n        dropdownView.bind('isEnabled').to(parentCommand);\n        dropdownView.class = 'ck-list-styles-dropdown';\n        // Main button was clicked.\n        mainButtonView.on('execute', ()=>{\n            editor.execute(parentCommandName);\n            editor.editing.view.focus();\n        });\n        mainButtonView.set({\n            label: buttonLabel,\n            icon: buttonIcon,\n            tooltip: true,\n            isToggleable: true\n        });\n        mainButtonView.bind('isOn').to(parentCommand, 'value', (value)=>!!value);\n        dropdownView.once('change:isOpen', ()=>{\n            const listPropertiesView = createListPropertiesView({\n                editor,\n                normalizedConfig,\n                dropdownView,\n                parentCommandName,\n                styleGridAriaLabel,\n                styleDefinitions\n            });\n            dropdownView.panelView.children.add(listPropertiesView);\n        });\n        // Focus the editable after executing the command.\n        // Overrides a default behaviour where the focus is moved to the dropdown button (#12125).\n        dropdownView.on('execute', ()=>{\n            editor.editing.view.focus();\n        });\n        return dropdownView;\n    };\n}\n/**\n * A helper that returns a function (factory) that creates individual buttons used by users to change styles\n * of lists.\n *\n * @param options.editor\n * @param options.listStyleCommand The instance of the `ListStylesCommand` class.\n * @param options.parentCommandName The name of the higher-order command associated with a\n * particular list style (e.g. \"bulletedList\" is associated with \"square\" and \"numberedList\" is associated with \"roman\").\n * @returns A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.\n */ function getStyleButtonCreator({ editor, listStyleCommand, parentCommandName }) {\n    const locale = editor.locale;\n    const parentCommand = editor.commands.get(parentCommandName);\n    return ({ label, type, icon, tooltip })=>{\n        const button = new ButtonView(locale);\n        button.set({\n            label,\n            icon,\n            tooltip\n        });\n        listStyleCommand.on('change:value', ()=>{\n            button.isOn = listStyleCommand.value === type;\n        });\n        button.on('execute', ()=>{\n            // If the content the selection is anchored to is a list, let's change its style.\n            if (parentCommand.value) {\n                // Remove the list when the current list style is the same as the one that would normally be applied.\n                if (listStyleCommand.value === type) {\n                    editor.execute(parentCommandName);\n                } else if (listStyleCommand.value !== type) {\n                    editor.execute('listStyle', {\n                        type\n                    });\n                }\n            } else {\n                editor.model.change(()=>{\n                    editor.execute('listStyle', {\n                        type\n                    });\n                });\n            }\n        });\n        return button;\n    };\n}\n/**\n * A helper that creates the properties view for the individual style dropdown.\n *\n * @param options.editor Editor instance.\n * @param options.normalizedConfig List properties configuration.\n * @param options.dropdownView Styles dropdown view that hosts the properties view.\n * @param options.parentCommandName The name of the higher-order editor command associated with\n * the set of particular list styles (e.g. \"bulletedList\" for \"disc\", \"circle\", and \"square\" styles).\n * @param options.styleDefinitions Definitions of the style buttons.\n * @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).\n */ function createListPropertiesView({ editor, normalizedConfig, dropdownView, parentCommandName, styleDefinitions, styleGridAriaLabel }) {\n    const locale = editor.locale;\n    const enabledProperties = {\n        ...normalizedConfig,\n        ...parentCommandName != 'numberedList' ? {\n            startIndex: false,\n            reversed: false\n        } : null\n    };\n    const listType = parentCommandName.replace('List', '');\n    let styleButtonViews = null;\n    if (normalizedConfig.styles.listTypes.includes(listType)) {\n        const listStyleCommand = editor.commands.get('listStyle');\n        const styleButtonCreator = getStyleButtonCreator({\n            editor,\n            parentCommandName,\n            listStyleCommand\n        });\n        // The command can be ListStyleCommand or DocumentListStyleCommand.\n        const isStyleTypeSupported = getStyleTypeSupportChecker(listStyleCommand);\n        styleButtonViews = styleDefinitions.filter(isStyleTypeSupported).map(styleButtonCreator);\n    }\n    const listPropertiesView = new ListPropertiesView(locale, {\n        styleGridAriaLabel,\n        enabledProperties,\n        styleButtonViews\n    });\n    if (normalizedConfig.styles.listTypes.includes(listType)) {\n        // Accessibility: focus the first active style when opening the dropdown.\n        focusChildOnDropdownOpen(dropdownView, ()=>{\n            return listPropertiesView.stylesView.children.find((child)=>child.isOn);\n        });\n    }\n    if (enabledProperties.startIndex) {\n        const listStartCommand = editor.commands.get('listStart');\n        listPropertiesView.startIndexFieldView.bind('isEnabled').to(listStartCommand);\n        listPropertiesView.startIndexFieldView.fieldView.bind('value').to(listStartCommand);\n        listPropertiesView.on('listStart', (evt, data)=>editor.execute('listStart', data));\n    }\n    if (enabledProperties.reversed) {\n        const listReversedCommand = editor.commands.get('listReversed');\n        listPropertiesView.reversedSwitchButtonView.bind('isEnabled').to(listReversedCommand);\n        listPropertiesView.reversedSwitchButtonView.bind('isOn').to(listReversedCommand, 'value', (value)=>!!value);\n        listPropertiesView.on('listReversed', ()=>{\n            const isReversed = listReversedCommand.value;\n            editor.execute('listReversed', {\n                reversed: !isReversed\n            });\n        });\n    }\n    // Make sure applying styles closes the dropdown.\n    listPropertiesView.delegate('execute').to(dropdownView);\n    return listPropertiesView;\n}\n/**\n * A helper that creates the list style submenu for menu bar.\n *\n * @param editor Editor instance.\n * @param normalizedConfig List properties configuration.\n * @param parentCommandName Name of the list command.\n * @param buttonLabel Label of the menu button.\n * @param styleGridAriaLabel ARIA label of the styles grid.\n */ function getMenuBarStylesMenuCreator({ editor, normalizedConfig, parentCommandName, buttonLabel, styleGridAriaLabel, styleDefinitions }) {\n    return (locale)=>{\n        const menuView = new MenuBarMenuView(locale);\n        const listCommand = editor.commands.get(parentCommandName);\n        const listStyleCommand = editor.commands.get('listStyle');\n        const isStyleTypeSupported = getStyleTypeSupportChecker(listStyleCommand);\n        const styleButtonCreator = getStyleButtonCreator({\n            editor,\n            parentCommandName,\n            listStyleCommand\n        });\n        const styleButtonViews = styleDefinitions.filter(isStyleTypeSupported).map(styleButtonCreator);\n        const listPropertiesView = new ListPropertiesView(locale, {\n            styleGridAriaLabel,\n            enabledProperties: {\n                ...normalizedConfig,\n                // Disable list start index and reversed in the menu bar.\n                startIndex: false,\n                reversed: false\n            },\n            styleButtonViews\n        });\n        listPropertiesView.delegate('execute').to(menuView);\n        menuView.buttonView.set({\n            label: buttonLabel,\n            icon: icons[parentCommandName]\n        });\n        menuView.panelView.children.add(listPropertiesView);\n        menuView.bind('isEnabled').to(listCommand, 'isEnabled');\n        menuView.on('execute', ()=>{\n            editor.editing.view.focus();\n        });\n        return menuView;\n    };\n}\nfunction getStyleTypeSupportChecker(listStyleCommand) {\n    if (typeof listStyleCommand.isStyleTypeSupported == 'function') {\n        return (styleDefinition)=>listStyleCommand.isStyleTypeSupported(styleDefinition.type);\n    } else {\n        return ()=>true;\n    }\n}\n\n/**\n * The list properties feature.\n *\n * This is a \"glue\" plugin that loads the\n * {@link module:list/listproperties/listpropertiesediting~ListPropertiesEditing list properties\n * editing feature} and the {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.\n */ class ListProperties extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ListPropertiesEditing,\n            ListPropertiesUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'ListProperties';\n    }\n}\n\n/**\n * The check to-do command.\n *\n * The command is registered by the {@link module:list/todolist/todolistediting~TodoListEditing} as\n * the `checkTodoList` editor command.\n */ class CheckTodoListCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // Refresh command before executing to be sure all values are up to date.\n        // It is needed when selection has changed before command execution, in the same change block.\n        this.on('execute', ()=>{\n            this.refresh();\n        }, {\n            priority: 'highest'\n        });\n    }\n    /**\n\t * Updates the command's {@link #value} and {@link #isEnabled} properties based on the current selection.\n\t */ refresh() {\n        const selectedElements = this._getSelectedItems();\n        this.value = this._getValue(selectedElements);\n        this.isEnabled = !!selectedElements.length;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply\n\t * the attribute. Otherwise, the command will remove the attribute. If not set, the command will look for its current\n\t * value to decide what it should do.\n\t */ execute(options = {}) {\n        this.editor.model.change((writer)=>{\n            const selectedElements = this._getSelectedItems();\n            const value = options.forceValue === undefined ? !this._getValue(selectedElements) : options.forceValue;\n            for (const element of selectedElements){\n                if (value) {\n                    writer.setAttribute('todoListChecked', true, element);\n                } else {\n                    writer.removeAttribute('todoListChecked', element);\n                }\n            }\n        });\n    }\n    /**\n\t * Returns a value for the command.\n\t */ _getValue(selectedElements) {\n        return selectedElements.every((element)=>element.getAttribute('todoListChecked'));\n    }\n    /**\n\t * Gets all to-do list items selected by the {@link module:engine/model/selection~Selection}.\n\t */ _getSelectedItems() {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const selectionRange = model.document.selection.getFirstRange();\n        const startElement = selectionRange.start.parent;\n        const elements = [];\n        if (schema.checkAttribute(startElement, 'todoListChecked')) {\n            elements.push(...getAllListItemBlocks(startElement));\n        }\n        for (const item of selectionRange.getItems({\n            shallow: true\n        })){\n            if (schema.checkAttribute(item, 'todoListChecked') && !elements.includes(item)) {\n                elements.push(...getAllListItemBlocks(item));\n            }\n        }\n        return elements;\n    }\n}\n\n/**\n * Observes all to-do list checkboxes state changes.\n *\n * Note that this observer is not available by default. To make it available it needs to be added to\n * {@link module:engine/view/view~View} by {@link module:engine/view/view~View#addObserver} method.\n */ class TodoCheckboxChangeObserver extends DomEventObserver {\n    /**\n\t * @inheritDoc\n\t */ domEventType = [\n        'change'\n    ];\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvent) {\n        if (domEvent.target) {\n            const viewTarget = this.view.domConverter.mapDomToView(domEvent.target);\n            if (viewTarget && viewTarget.is('element', 'input') && viewTarget.getAttribute('type') == 'checkbox' && viewTarget.findAncestor({\n                classes: 'todo-list__label'\n            })) {\n                this.fire('todoCheckboxChange', domEvent);\n            }\n        }\n    }\n}\n\nconst ITEM_TOGGLE_KEYSTROKE$1 = /* #__PURE__ */ parseKeystroke('Ctrl+Enter');\n/**\n * The engine of the to-do list feature. It handles creating, editing and removing to-do lists and their items.\n *\n * It registers the entire functionality of the {@link module:list/list/listediting~ListEditing list editing plugin}\n * and extends it with the commands:\n *\n * - `'todoList'`,\n * - `'checkTodoList'`,\n */ class TodoListEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TodoListEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ListEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const editing = editor.editing;\n        const listEditing = editor.plugins.get(ListEditing);\n        const multiBlock = editor.config.get('list.multiBlock');\n        const elementName = multiBlock ? 'paragraph' : 'listItem';\n        editor.commands.add('todoList', new ListCommand(editor, 'todo'));\n        editor.commands.add('checkTodoList', new CheckTodoListCommand(editor));\n        editing.view.addObserver(TodoCheckboxChangeObserver);\n        model.schema.extend('$listItem', {\n            allowAttributes: 'todoListChecked'\n        });\n        model.schema.addAttributeCheck((context)=>{\n            const item = context.last;\n            // Don't allow `todoListChecked` attribute on elements which are not todo list items.\n            if (!item.getAttribute('listItemId') || item.getAttribute('listType') != 'todo') {\n                return false;\n            }\n        }, 'todoListChecked');\n        editor.conversion.for('upcast').add((dispatcher)=>{\n            // Upcast of to-do list item is based on a checkbox at the beginning of a <li> to keep compatibility with markdown input.\n            dispatcher.on('element:input', todoItemInputConverter());\n            // Priority is set to low to allow generic list item converter to run first.\n            dispatcher.on('element:li', todoListItemUpcastConverter(), {\n                priority: 'low'\n            });\n            // Consume other elements that are normally generated in data downcast, so they won't get captured by GHS.\n            dispatcher.on('element:label', elementUpcastConsumingConverter({\n                name: 'label',\n                classes: 'todo-list__label'\n            }));\n            dispatcher.on('element:label', elementUpcastConsumingConverter({\n                name: 'label',\n                classes: [\n                    'todo-list__label',\n                    'todo-list__label_without-description'\n                ]\n            }));\n            dispatcher.on('element:span', elementUpcastConsumingConverter({\n                name: 'span',\n                classes: 'todo-list__label__description'\n            }));\n            dispatcher.on('element:ul', attributeUpcastConsumingConverter({\n                name: 'ul',\n                classes: 'todo-list'\n            }));\n        });\n        editor.conversion.for('downcast').elementToElement({\n            model: elementName,\n            view: (element, { writer })=>{\n                if (isDescriptionBlock(element, listEditing.getListAttributeNames())) {\n                    return writer.createContainerElement('span', {\n                        class: 'todo-list__label__description'\n                    });\n                }\n            },\n            converterPriority: 'highest'\n        });\n        listEditing.registerDowncastStrategy({\n            scope: 'list',\n            attributeName: 'listType',\n            setAttributeOnDowncast (writer, value, element) {\n                if (value == 'todo') {\n                    writer.addClass('todo-list', element);\n                } else {\n                    writer.removeClass('todo-list', element);\n                }\n            }\n        });\n        listEditing.registerDowncastStrategy({\n            scope: 'itemMarker',\n            attributeName: 'todoListChecked',\n            createElement (writer, modelElement, { dataPipeline }) {\n                if (modelElement.getAttribute('listType') != 'todo') {\n                    return null;\n                }\n                const viewElement = writer.createUIElement('input', {\n                    type: 'checkbox',\n                    ...modelElement.getAttribute('todoListChecked') ? {\n                        checked: 'checked'\n                    } : null,\n                    ...dataPipeline ? {\n                        disabled: 'disabled'\n                    } : {\n                        tabindex: '-1'\n                    }\n                });\n                if (dataPipeline) {\n                    return viewElement;\n                }\n                const wrapper = writer.createContainerElement('span', {\n                    contenteditable: 'false'\n                }, viewElement);\n                wrapper.getFillerOffset = ()=>null;\n                return wrapper;\n            },\n            canWrapElement (modelElement) {\n                return isDescriptionBlock(modelElement, listEditing.getListAttributeNames());\n            },\n            createWrapperElement (writer, modelElement, { dataPipeline }) {\n                const classes = [\n                    'todo-list__label'\n                ];\n                if (!isDescriptionBlock(modelElement, listEditing.getListAttributeNames())) {\n                    classes.push('todo-list__label_without-description');\n                }\n                return writer.createAttributeElement(dataPipeline ? 'label' : 'span', {\n                    class: classes.join(' ')\n                });\n            }\n        });\n        // Verifies if a to-do list block requires reconversion of a first item downcasted as an item description.\n        listEditing.on('checkElement', (evt, { modelElement, viewElement })=>{\n            const isFirstTodoModelParagraphBlock = isDescriptionBlock(modelElement, listEditing.getListAttributeNames());\n            const hasViewClass = viewElement.hasClass('todo-list__label__description');\n            if (hasViewClass != isFirstTodoModelParagraphBlock) {\n                evt.return = true;\n                evt.stop();\n            }\n        });\n        // Verifies if a to-do list block requires reconversion of a checkbox element\n        // (for example there is a new paragraph inserted as a first block of a list item).\n        listEditing.on('checkElement', (evt, { modelElement, viewElement })=>{\n            const isFirstTodoModelItemBlock = modelElement.getAttribute('listType') == 'todo' && isFirstBlockOfListItem(modelElement);\n            let hasViewItemMarker = false;\n            const viewWalker = editor.editing.view.createPositionBefore(viewElement).getWalker({\n                direction: 'backward'\n            });\n            for (const { item } of viewWalker){\n                if (item.is('element') && editor.editing.mapper.toModelElement(item)) {\n                    break;\n                }\n                if (item.is('element', 'input') && item.getAttribute('type') == 'checkbox') {\n                    hasViewItemMarker = true;\n                }\n            }\n            if (hasViewItemMarker != isFirstTodoModelItemBlock) {\n                evt.return = true;\n                evt.stop();\n            }\n        });\n        // Make sure that all blocks of the same list item have the same todoListChecked attribute.\n        listEditing.on('postFixer', (evt, { listNodes, writer })=>{\n            for (const { node, previousNodeInList } of listNodes){\n                // This is a first item of a nested list.\n                if (!previousNodeInList) {\n                    continue;\n                }\n                if (previousNodeInList.getAttribute('listItemId') != node.getAttribute('listItemId')) {\n                    continue;\n                }\n                const previousHasAttribute = previousNodeInList.hasAttribute('todoListChecked');\n                const nodeHasAttribute = node.hasAttribute('todoListChecked');\n                if (nodeHasAttribute && !previousHasAttribute) {\n                    writer.removeAttribute('todoListChecked', node);\n                    evt.return = true;\n                } else if (!nodeHasAttribute && previousHasAttribute) {\n                    writer.setAttribute('todoListChecked', true, node);\n                    evt.return = true;\n                }\n            }\n        });\n        // Make sure that todoListChecked attribute is only present for to-do list items.\n        model.document.registerPostFixer((writer)=>{\n            const changes = model.document.differ.getChanges();\n            let wasFixed = false;\n            for (const change of changes){\n                if (change.type == 'attribute' && change.attributeKey == 'listType') {\n                    const element = change.range.start.nodeAfter;\n                    if (change.attributeOldValue == 'todo' && element.hasAttribute('todoListChecked')) {\n                        writer.removeAttribute('todoListChecked', element);\n                        wasFixed = true;\n                    }\n                } else if (change.type == 'insert' && change.name != '$text') {\n                    for (const { item } of writer.createRangeOn(change.position.nodeAfter)){\n                        if (item.is('element') && item.getAttribute('listType') != 'todo' && item.hasAttribute('todoListChecked')) {\n                            writer.removeAttribute('todoListChecked', item);\n                            wasFixed = true;\n                        }\n                    }\n                }\n            }\n            return wasFixed;\n        });\n        // Toggle check state of selected to-do list items on keystroke.\n        this.listenTo(editing.view.document, 'keydown', (evt, data)=>{\n            if (getCode(data) === ITEM_TOGGLE_KEYSTROKE$1) {\n                editor.execute('checkTodoList');\n                evt.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n        // Toggle check state of a to-do list item clicked on the checkbox.\n        this.listenTo(editing.view.document, 'todoCheckboxChange', (evt, data)=>{\n            const viewTarget = data.target;\n            if (!viewTarget || !viewTarget.is('element', 'input')) {\n                return;\n            }\n            const viewPositionAfter = editing.view.createPositionAfter(viewTarget);\n            const modelPositionAfter = editing.mapper.toModelPosition(viewPositionAfter);\n            const modelElement = modelPositionAfter.parent;\n            if (modelElement && isListItemBlock(modelElement) && modelElement.getAttribute('listType') == 'todo') {\n                this._handleCheckmarkChange(modelElement);\n            }\n        });\n        // Jump at the start/end of the next node on right arrow key press, when selection is before the checkbox.\n        //\n        // <blockquote><p>Foo{}</p></blockquote>\n        // <ul><li><checkbox/>Bar</li></ul>\n        //\n        // press: `->`\n        //\n        // <blockquote><p>Foo</p></blockquote>\n        // <ul><li><checkbox/>{}Bar</li></ul>\n        //\n        this.listenTo(editing.view.document, 'arrowKey', jumpOverCheckmarkOnSideArrowKeyPress$1(model, editor.locale), {\n            context: '$text'\n        });\n        // Map view positions inside the checkbox and wrappers to the position in the first block of the list item.\n        this.listenTo(editing.mapper, 'viewToModelPosition', (evt, data)=>{\n            const viewParent = data.viewPosition.parent;\n            const isStartOfListItem = viewParent.is('attributeElement', 'li') && data.viewPosition.offset == 0;\n            const isStartOfListLabel = isLabelElement(viewParent) && data.viewPosition.offset <= 1;\n            const isInInputWrapper = viewParent.is('element', 'span') && viewParent.getAttribute('contenteditable') == 'false' && isLabelElement(viewParent.parent);\n            if (!isStartOfListItem && !isStartOfListLabel && !isInInputWrapper) {\n                return;\n            }\n            const nodeAfter = data.modelPosition.nodeAfter;\n            if (nodeAfter && nodeAfter.getAttribute('listType') == 'todo') {\n                data.modelPosition = model.createPositionAt(nodeAfter, 0);\n            }\n        }, {\n            priority: 'low'\n        });\n        this._initAriaAnnouncements();\n    }\n    /**\n\t * Handles the checkbox element change, moves the selection to the corresponding model item to make it possible\n\t * to toggle the `todoListChecked` attribute using the command, and restores the selection position.\n\t *\n\t * Some say it's a hack :) Moving the selection only for executing the command on a certain node and restoring it after,\n\t * is not a clear solution. We need to design an API for using commands beyond the selection range.\n\t * See https://github.com/ckeditor/ckeditor5/issues/1954.\n\t */ _handleCheckmarkChange(listItem) {\n        const editor = this.editor;\n        const model = editor.model;\n        const previousSelectionRanges = Array.from(model.document.selection.getRanges());\n        model.change((writer)=>{\n            writer.setSelection(listItem, 'end');\n            editor.execute('checkTodoList');\n            writer.setSelection(previousSelectionRanges);\n        });\n    }\n    /**\n\t * Observe when user enters or leaves todo list and set proper aria value in global live announcer.\n\t * This allows screen readers to indicate when the user has entered and left the specified todo list.\n\t *\n\t * @internal\n\t */ _initAriaAnnouncements() {\n        const { model, ui, t } = this.editor;\n        let lastFocusedCodeBlock = null;\n        if (!ui) {\n            return;\n        }\n        model.document.selection.on('change:range', ()=>{\n            const focusParent = model.document.selection.focus.parent;\n            const lastElementIsTodoList = isTodoListItemElement(lastFocusedCodeBlock);\n            const currentElementIsTodoList = isTodoListItemElement(focusParent);\n            if (lastElementIsTodoList && !currentElementIsTodoList) {\n                ui.ariaLiveAnnouncer.announce(t('Leaving a to-do list'));\n            } else if (!lastElementIsTodoList && currentElementIsTodoList) {\n                ui.ariaLiveAnnouncer.announce(t('Entering a to-do list'));\n            }\n            lastFocusedCodeBlock = focusParent;\n        });\n    }\n}\n/**\n * Returns an upcast converter for to-do list items.\n */ function todoListItemUpcastConverter() {\n    return (evt, data, conversionApi)=>{\n        const { writer, schema } = conversionApi;\n        if (!data.modelRange) {\n            return;\n        }\n        // Group to-do list items by their listItemId attribute to ensure that all items of the same list item have the same checked state.\n        const groupedItems = Array.from(data.modelRange.getItems({\n            shallow: true\n        })).filter((item)=>item.getAttribute('listType') === 'todo' && schema.checkAttribute(item, 'listItemId')).reduce((acc, item)=>{\n            const listItemId = item.getAttribute('listItemId');\n            if (!acc.has(listItemId)) {\n                acc.set(listItemId, getAllListItemBlocks(item));\n            }\n            return acc;\n        }, new Map());\n        // During the upcast, we need to ensure that all items of the same list have the same checked state. From time to time\n        // the checked state of the items can be different when the user pastes content from the clipboard with <input type=\"checkbox\">\n        // that has checked state set to true. In such cases, we need to ensure that all items of the same list have the same checked state.\n        // See more: https://github.com/ckeditor/ckeditor5/issues/15602\n        for (const [, items] of groupedItems.entries()){\n            if (items.some((item)=>item.getAttribute('todoListChecked'))) {\n                for (const item of items){\n                    writer.setAttribute('todoListChecked', true, item);\n                }\n            }\n        }\n    };\n}\n/**\n * Returns an upcast converter that detects a to-do list checkbox and marks the list item as a to-do list.\n */ function todoItemInputConverter() {\n    return (evt, data, conversionApi)=>{\n        const modelCursor = data.modelCursor;\n        const modelItem = modelCursor.parent;\n        const viewItem = data.viewItem;\n        if (!conversionApi.consumable.test(viewItem, {\n            name: true\n        })) {\n            return;\n        }\n        if (viewItem.getAttribute('type') != 'checkbox' || !modelCursor.isAtStart || !modelItem.hasAttribute('listType')) {\n            return;\n        }\n        conversionApi.consumable.consume(viewItem, {\n            name: true\n        });\n        const writer = conversionApi.writer;\n        writer.setAttribute('listType', 'todo', modelItem);\n        if (data.viewItem.hasAttribute('checked')) {\n            writer.setAttribute('todoListChecked', true, modelItem);\n        }\n        data.modelRange = writer.createRange(modelCursor);\n    };\n}\n/**\n * Returns an upcast converter that consumes element matching the given matcher pattern.\n */ function elementUpcastConsumingConverter(matcherPattern) {\n    const matcher = new Matcher(matcherPattern);\n    return (evt, data, conversionApi)=>{\n        const matcherResult = matcher.match(data.viewItem);\n        if (!matcherResult) {\n            return;\n        }\n        if (!conversionApi.consumable.consume(data.viewItem, matcherResult.match)) {\n            return;\n        }\n        Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n    };\n}\n/**\n * Returns an upcast converter that consumes attributes matching the given matcher pattern.\n */ function attributeUpcastConsumingConverter(matcherPattern) {\n    const matcher = new Matcher(matcherPattern);\n    return (evt, data, conversionApi)=>{\n        const matcherResult = matcher.match(data.viewItem);\n        if (!matcherResult) {\n            return;\n        }\n        const match = matcherResult.match;\n        match.name = false;\n        conversionApi.consumable.consume(data.viewItem, match);\n    };\n}\n/**\n * Returns true if the given list item block should be converted as a description block of a to-do list item.\n */ function isDescriptionBlock(modelElement, listAttributeNames) {\n    return (modelElement.is('element', 'paragraph') || modelElement.is('element', 'listItem')) && modelElement.getAttribute('listType') == 'todo' && isFirstBlockOfListItem(modelElement) && hasOnlyListAttributes(modelElement, listAttributeNames);\n}\n/**\n * Returns true if only attributes from the given list are present on the model element.\n */ function hasOnlyListAttributes(modelElement, attributeNames) {\n    for (const attributeKey of modelElement.getAttributeKeys()){\n        // Ignore selection attributes stored on block elements.\n        if (attributeKey.startsWith('selection:')) {\n            continue;\n        }\n        if (!attributeNames.includes(attributeKey)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Jump at the start and end of a to-do list item.\n */ function jumpOverCheckmarkOnSideArrowKeyPress$1(model, locale) {\n    return (eventInfo, domEventData)=>{\n        const direction = getLocalizedArrowKeyCodeDirection(domEventData.keyCode, locale.contentLanguageDirection);\n        const schema = model.schema;\n        const selection = model.document.selection;\n        if (!selection.isCollapsed) {\n            return;\n        }\n        const position = selection.getFirstPosition();\n        const parent = position.parent;\n        // Right arrow before a to-do list item.\n        if (direction == 'right' && position.isAtEnd) {\n            const newRange = schema.getNearestSelectionRange(model.createPositionAfter(parent), 'forward');\n            if (!newRange) {\n                return;\n            }\n            const newRangeParent = newRange.start.parent;\n            if (newRangeParent && isListItemBlock(newRangeParent) && newRangeParent.getAttribute('listType') == 'todo') {\n                model.change((writer)=>writer.setSelection(newRange));\n                domEventData.preventDefault();\n                domEventData.stopPropagation();\n                eventInfo.stop();\n            }\n        } else if (direction == 'left' && position.isAtStart && isListItemBlock(parent) && parent.getAttribute('listType') == 'todo') {\n            const newRange = schema.getNearestSelectionRange(model.createPositionBefore(parent), 'backward');\n            if (!newRange) {\n                return;\n            }\n            model.change((writer)=>writer.setSelection(newRange));\n            domEventData.preventDefault();\n            domEventData.stopPropagation();\n            eventInfo.stop();\n        }\n    };\n}\n/**\n * Returns true if the given element is a label element of a to-do list item.\n */ function isLabelElement(viewElement) {\n    return !!viewElement && viewElement.is('attributeElement') && viewElement.hasClass('todo-list__label');\n}\n/**\n * Returns true if the given element is a list item model element of a to-do list.\n */ function isTodoListItemElement(element) {\n    if (!element) {\n        return false;\n    }\n    if (!element.is('element', 'paragraph') && !element.is('element', 'listItem')) {\n        return false;\n    }\n    return element.getAttribute('listType') == 'todo';\n}\n\n/**\n * The to-do list UI feature. It introduces the `'todoList'` button that\n * allows to convert elements to and from to-do list items and to indent or outdent them.\n */ class TodoListUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TodoListUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const t = this.editor.t;\n        createUIComponents(this.editor, 'todoList', t('To-do List'), icons.todoList);\n    }\n}\n\n/**\n * The to-do list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/todolist/todolistediting~TodoListEditing to-do list\n * editing feature} and the {@link module:list/todolist/todolistui~TodoListUI to-do list UI feature}.\n */ class TodoList extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TodoListEditing,\n            TodoListUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TodoList';\n    }\n}\n\n/**\n * The list command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.\n */ class LegacyListCommand extends Command {\n    /**\n\t * The type of the list created by the command.\n\t */ type;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param type List type that will be handled by this command.\n\t */ constructor(editor, type){\n        super(editor);\n        this.type = type;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.value = this._getValue();\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Executes the list command.\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the\n\t * selected items and potentially the neighbor elements to the proper list items. If set to `false`, it will convert selected elements\n\t * to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const document = model.document;\n        const blocks = Array.from(document.selection.getSelectedBlocks()).filter((block)=>checkCanBecomeListItem(block, model.schema));\n        // Whether we are turning off some items.\n        const turnOff = options.forceValue !== undefined ? !options.forceValue : this.value;\n        // If we are turning off items, we are going to rename them to paragraphs.\n        model.change((writer)=>{\n            // If part of a list got turned off, we need to handle (outdent) all of sub-items of the last turned-off item.\n            // To be sure that model is all the time in a good state, we first fix items below turned-off item.\n            if (turnOff) {\n                // Start from the model item that is just after the last turned-off item.\n                let next = blocks[blocks.length - 1].nextSibling;\n                let currentIndent = Number.POSITIVE_INFINITY;\n                let changes = [];\n                // Correct indent of all items after the last turned off item.\n                // Rules that should be followed:\n                // 1. All direct sub-items of turned-off item should become indent 0, because the first item after it\n                //    will be the first item of a new list. Other items are at the same level, so should have same 0 index.\n                // 2. All items with indent lower than indent of turned-off item should become indent 0, because they\n                //    should not end up as a child of any of list items that they were not children of before.\n                // 3. All other items should have their indent changed relatively to it's parent.\n                //\n                // For example:\n                // 1  * --------\n                // 2     * --------\n                // 3        * --------\t\t\t<-- this is turned off.\n                // 4           * --------\t\t<-- this has to become indent = 0, because it will be first item on a new list.\n                // 5              * --------\t<-- this should be still be a child of item above, so indent = 1.\n                // 6        * --------\t\t\t<-- this has to become indent = 0, because it should not be a child of any of items above.\n                // 7           * --------\t\t<-- this should be still be a child of item above, so indent = 1.\n                // 8     * --------\t\t\t\t<-- this has to become indent = 0.\n                // 9        * --------\t\t\t<-- this should still be a child of item above, so indent = 1.\n                // 10          * --------\t\t<-- this should still be a child of item above, so indent = 2.\n                // 11          * --------\t\t<-- this should still be at the same level as item above, so indent = 2.\n                // 12 * --------\t\t\t\t<-- this and all below are left unchanged.\n                // 13    * --------\n                // 14       * --------\n                //\n                // After turning off 3 the list becomes:\n                //\n                // 1  * --------\n                // 2     * --------\n                //\n                // 3  --------\n                //\n                // 4  * --------\n                // 5     * --------\n                // 6  * --------\n                // 7     * --------\n                // 8  * --------\n                // 9     * --------\n                // 10       * --------\n                // 11       * --------\n                // 12 * --------\n                // 13    * --------\n                // 14       * --------\n                //\n                // Thanks to this algorithm no lists are mismatched and no items get unexpected children/parent, while\n                // those parent-child connection which are possible to maintain are still maintained. It's worth noting\n                // that this is the same effect that we would be get by multiple use of outdent command. However doing\n                // it like this is much more efficient because it's less operation (less memory usage, easier OT) and\n                // less conversion (faster).\n                while(next && next.name == 'listItem' && next.getAttribute('listIndent') !== 0){\n                    // Check each next list item, as long as its indent is bigger than 0.\n                    // If the indent is 0 we are not going to change anything anyway.\n                    const indent = next.getAttribute('listIndent');\n                    // We check if that's item indent is lower as current relative indent.\n                    if (indent < currentIndent) {\n                        // If it is, current relative indent becomes that indent.\n                        currentIndent = indent;\n                    }\n                    // Fix indent relatively to current relative indent.\n                    // Note, that if we just changed the current relative indent, the newIndent will be equal to 0.\n                    const newIndent = indent - currentIndent;\n                    // Save the entry in changes array. We do not apply it at the moment, because we will need to\n                    // reverse the changes so the last item is changed first.\n                    // This is to keep model in correct state all the time.\n                    changes.push({\n                        element: next,\n                        listIndent: newIndent\n                    });\n                    // Find next item.\n                    next = next.nextSibling;\n                }\n                changes = changes.reverse();\n                for (const item of changes){\n                    writer.setAttribute('listIndent', item.listIndent, item.element);\n                }\n            }\n            // If we are turning on, we might change some items that are already `listItem`s but with different type.\n            // Changing one nested list item to other type should also trigger changing all its siblings so the\n            // whole nested list is of the same type.\n            // Example (assume changing to numbered list):\n            // * ------\t\t\t\t<-- do not fix, top level item\n            //   * ------\t\t\t<-- fix, because latter list item of this item's list is changed\n            //      * ------\t\t<-- do not fix, item is not affected (different list)\n            //   * ------\t\t\t<-- fix, because latter list item of this item's list is changed\n            //      * ------\t\t<-- fix, because latter list item of this item's list is changed\n            //      * ---[--\t\t<-- already in selection\n            //   * ------\t\t\t<-- already in selection\n            //   * ------\t\t\t<-- already in selection\n            // * ------\t\t\t\t<-- already in selection, but does not cause other list items to change because is top-level\n            //   * ---]--\t\t\t<-- already in selection\n            //   * ------\t\t\t<-- fix, because preceding list item of this item's list is changed\n            //      * ------\t\t<-- do not fix, item is not affected (different list)\n            // * ------\t\t\t\t<-- do not fix, top level item\n            if (!turnOff) {\n                // Find lowest indent among selected items. This will be indicator what is the indent of\n                // top-most list affected by the command.\n                let lowestIndent = Number.POSITIVE_INFINITY;\n                for (const item of blocks){\n                    if (item.is('element', 'listItem') && item.getAttribute('listIndent') < lowestIndent) {\n                        lowestIndent = item.getAttribute('listIndent');\n                    }\n                }\n                // Do not execute the fix for top-level lists.\n                lowestIndent = lowestIndent === 0 ? 1 : lowestIndent;\n                // Fix types of list items that are \"before\" the selected blocks.\n                _fixType(blocks, true, lowestIndent);\n                // Fix types of list items that are \"after\" the selected blocks.\n                _fixType(blocks, false, lowestIndent);\n            }\n            // Phew! Now it will be easier :).\n            // For each block element that was in the selection, we will either: turn it to list item,\n            // turn it to paragraph, or change it's type. Or leave it as it is.\n            // Do it in reverse as there might be multiple blocks (same as with changing indents).\n            for (const element of blocks.reverse()){\n                if (turnOff && element.name == 'listItem') {\n                    // We are turning off and the element is a `listItem` - it should be converted to `paragraph`.\n                    // List item specific attributes are removed by post fixer.\n                    writer.rename(element, 'paragraph');\n                } else if (!turnOff && element.name != 'listItem') {\n                    // We are turning on and the element is not a `listItem` - it should be converted to `listItem`.\n                    // The order of operations is important to keep model in correct state.\n                    writer.setAttributes({\n                        listType: this.type,\n                        listIndent: 0\n                    }, element);\n                    writer.rename(element, 'listItem');\n                } else if (!turnOff && element.name == 'listItem' && element.getAttribute('listType') != this.type) {\n                    // We are turning on and the element is a `listItem` but has different type - change it's type and\n                    // type of it's all siblings that have same indent.\n                    writer.setAttribute('listType', this.type, element);\n                }\n            }\n            /**\n\t\t\t * Event fired by the {@link #execute} method.\n\t\t\t *\n\t\t\t * It allows to execute an action after executing the {@link ~ListCommand#execute} method, for example adjusting\n\t\t\t * attributes of changed blocks.\n\t\t\t *\n\t\t\t * @protected\n\t\t\t * @event _executeCleanup\n\t\t\t */ this.fire('_executeCleanup', blocks);\n        });\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */ _getValue() {\n        // Check whether closest `listItem` ancestor of the position has a correct type.\n        const listItem = first(this.editor.model.document.selection.getSelectedBlocks());\n        return !!listItem && listItem.is('element', 'listItem') && listItem.getAttribute('listType') == this.type;\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        // If command value is true it means that we are in list item, so the command should be enabled.\n        if (this.value) {\n            return true;\n        }\n        const selection = this.editor.model.document.selection;\n        const schema = this.editor.model.schema;\n        const firstBlock = first(selection.getSelectedBlocks());\n        if (!firstBlock) {\n            return false;\n        }\n        // Otherwise, check if list item can be inserted at the position start.\n        return checkCanBecomeListItem(firstBlock, schema);\n    }\n}\n/**\n * Helper function used when one or more list item have their type changed. Fixes type of other list items\n * that are affected by the change (are in same lists) but are not directly in selection. The function got extracted\n * not to duplicated code, as same fix has to be performed before and after selection.\n *\n * @param blocks Blocks that are in selection.\n * @param isBackward Specified whether fix will be applied for blocks before first selected block (`true`)\n * or blocks after last selected block (`false`).\n * @param lowestIndent Lowest indent among selected blocks.\n */ function _fixType(blocks, isBackward, lowestIndent) {\n    // We need to check previous sibling of first changed item and next siblings of last changed item.\n    const startingItem = isBackward ? blocks[0] : blocks[blocks.length - 1];\n    if (startingItem.is('element', 'listItem')) {\n        let item = startingItem[isBackward ? 'previousSibling' : 'nextSibling'];\n        // During processing items, keeps the lowest indent of already processed items.\n        // This saves us from changing too many items.\n        // Following example is for going forward as it is easier to read, however same applies to going backward.\n        // * ------\n        //   * ------\n        //     * --[---\n        //   * ------\t\t<-- `lowestIndent` should be 1\n        //     * --]---\t\t<-- `startingItem`, `currentIndent` = 2, `lowestIndent` == 1\n        //     * ------\t\t<-- should be fixed, `indent` == 2 == `currentIndent`\n        //   * ------\t\t<-- should be fixed, set `currentIndent` to 1, `indent` == 1 == `currentIndent`\n        //     * ------\t\t<-- should not be fixed, item is in different list, `indent` = 2, `indent` != `currentIndent`\n        //   * ------\t\t<-- should be fixed, `indent` == 1 == `currentIndent`\n        // * ------\t\t\t<-- break loop (`indent` < `lowestIndent`)\n        let currentIndent = startingItem.getAttribute('listIndent');\n        // Look back until a list item with indent lower than reference `lowestIndent`.\n        // That would be the parent of nested sublist which contains item having `lowestIndent`.\n        while(item && item.is('element', 'listItem') && item.getAttribute('listIndent') >= lowestIndent){\n            if (currentIndent > item.getAttribute('listIndent')) {\n                currentIndent = item.getAttribute('listIndent');\n            }\n            // Found an item that is in the same nested sublist.\n            if (item.getAttribute('listIndent') == currentIndent) {\n                // Just add the item to selected blocks like it was selected by the user.\n                blocks[isBackward ? 'unshift' : 'push'](item);\n            }\n            item = item[isBackward ? 'previousSibling' : 'nextSibling'];\n        }\n    }\n}\n/**\n * Checks whether the given block can be replaced by a listItem.\n *\n * @param block A block to be tested.\n * @param schema The schema of the document.\n */ function checkCanBecomeListItem(block, schema) {\n    return schema.checkChild(block.parent, 'listItem') && !schema.isObject(block);\n}\n\n/**\n * The list indent command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.\n */ class LegacyIndentCommand extends Command {\n    /**\n\t * Determines by how much the command will change the list item's indent attribute.\n\t */ _indentBy;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param indentDirection The direction of indent. If it is equal to `backward`, the command will outdent a list item.\n\t */ constructor(editor, indentDirection){\n        super(editor);\n        this._indentBy = indentDirection == 'forward' ? 1 : -1;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const model = this.editor.model;\n        const doc = model.document;\n        let itemsToChange = Array.from(doc.selection.getSelectedBlocks());\n        model.change((writer)=>{\n            const lastItem = itemsToChange[itemsToChange.length - 1];\n            // Indenting a list item should also indent all the items that are already sub-items of indented item.\n            let next = lastItem.nextSibling;\n            // Check all items after last indented item, as long as their indent is bigger than indent of that item.\n            while(next && next.name == 'listItem' && next.getAttribute('listIndent') > lastItem.getAttribute('listIndent')){\n                itemsToChange.push(next);\n                next = next.nextSibling;\n            }\n            // We need to be sure to keep model in correct state after each small change, because converters\n            // bases on that state and assumes that model is correct.\n            // Because of that, if the command outdents items, we will outdent them starting from the last item, as\n            // it is safer.\n            if (this._indentBy < 0) {\n                itemsToChange = itemsToChange.reverse();\n            }\n            for (const item of itemsToChange){\n                const indent = item.getAttribute('listIndent') + this._indentBy;\n                // If indent is lower than 0, it means that the item got outdented when it was not indented.\n                // This means that we need to convert that list item to paragraph.\n                if (indent < 0) {\n                    // To keep the model as correct as possible, first rename listItem, then remove attributes,\n                    // as listItem without attributes is very incorrect and will cause problems in converters.\n                    // No need to remove attributes, will be removed by post fixer.\n                    writer.rename(item, 'paragraph');\n                } else {\n                    writer.setAttribute('listIndent', indent, item);\n                }\n            }\n            // It allows to execute an action after executing the `~IndentCommand#execute` method, for example adjusting\n            // attributes of changed list items.\n            this.fire('_executeCleanup', itemsToChange);\n        });\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        // Check whether any of position's ancestor is a list item.\n        const listItem = first(this.editor.model.document.selection.getSelectedBlocks());\n        // If selection is not in a list item, the command is disabled.\n        if (!listItem || !listItem.is('element', 'listItem')) {\n            return false;\n        }\n        if (this._indentBy > 0) {\n            // Cannot indent first item in it's list. Check if before `listItem` is a list item that is in same list.\n            // To be in the same list, the item has to have same attributes and cannot be \"split\" by an item with lower indent.\n            const indent = listItem.getAttribute('listIndent');\n            const type = listItem.getAttribute('listType');\n            let prev = listItem.previousSibling;\n            while(prev && prev.is('element', 'listItem') && prev.getAttribute('listIndent') >= indent){\n                if (prev.getAttribute('listIndent') == indent) {\n                    // The item is on the same level.\n                    // If it has same type, it means that we found a preceding sibling from the same list.\n                    // If it does not have same type, it means that `listItem` is on different list (this can happen only\n                    // on top level lists, though).\n                    return prev.getAttribute('listType') == type;\n                }\n                prev = prev.previousSibling;\n            }\n            // Could not find similar list item, this means that `listItem` is first in its list.\n            return false;\n        }\n        // If we are outdenting it is enough to be in list item. Every list item can always be outdented.\n        return true;\n    }\n}\n\n/**\n * Creates a list item {@link module:engine/view/containerelement~ContainerElement}.\n *\n * @param writer The writer instance.\n */ function createViewListItemElement(writer) {\n    const viewItem = writer.createContainerElement('li');\n    viewItem.getFillerOffset = getListItemFillerOffset;\n    return viewItem;\n}\n/**\n * Helper function that creates a `<ul><li></li></ul>` or (`<ol>`) structure out of the given `modelItem` model `listItem` element.\n * Then, it binds the created view list item (`<li>`) with the model `listItem` element.\n * The function then returns the created view list item (`<li>`).\n *\n * @param modelItem Model list item.\n * @param conversionApi Conversion interface.\n * @returns View list element.\n */ function generateLiInUl(modelItem, conversionApi) {\n    const mapper = conversionApi.mapper;\n    const viewWriter = conversionApi.writer;\n    const listType = modelItem.getAttribute('listType') == 'numbered' ? 'ol' : 'ul';\n    const viewItem = createViewListItemElement(viewWriter);\n    const viewList = viewWriter.createContainerElement(listType, null);\n    viewWriter.insert(viewWriter.createPositionAt(viewList, 0), viewItem);\n    mapper.bindElements(modelItem, viewItem);\n    return viewItem;\n}\n/**\n * Helper function that inserts a view list at a correct place and merges it with its siblings.\n * It takes a model list item element (`modelItem`) and a corresponding view list item element (`injectedItem`). The view list item\n * should be in a view list element (`<ul>` or `<ol>`) and should be its only child.\n * See comments below to better understand the algorithm.\n *\n * @param modelItem Model list item.\n * @param injectedItem\n * @param conversionApi Conversion interface.\n * @param model The model instance.\n */ function injectViewList(modelItem, injectedItem, conversionApi, model) {\n    const injectedList = injectedItem.parent;\n    const mapper = conversionApi.mapper;\n    const viewWriter = conversionApi.writer;\n    // The position where the view list will be inserted.\n    let insertPosition = mapper.toViewPosition(model.createPositionBefore(modelItem));\n    // 1. Find the previous list item that has the same or smaller indent. Basically we are looking for the first model item\n    // that is a \"parent\" or \"sibling\" of the injected model item.\n    // If there is no such list item, it means that the injected list item is the first item in \"its list\".\n    const refItem = getSiblingListItem(modelItem.previousSibling, {\n        sameIndent: true,\n        smallerIndent: true,\n        listIndent: modelItem.getAttribute('listIndent')\n    });\n    const prevItem = modelItem.previousSibling;\n    if (refItem && refItem.getAttribute('listIndent') == modelItem.getAttribute('listIndent')) {\n        // There is a list item with the same indent - we found the same-level sibling.\n        // Break the list after it. The inserted view item will be added in the broken space.\n        const viewItem = mapper.toViewElement(refItem);\n        insertPosition = viewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n    } else {\n        // There is no list item with the same indent. Check the previous model item.\n        if (prevItem && prevItem.name == 'listItem') {\n            // If it is a list item, it has to have a lower indent.\n            // It means that the inserted item should be added to it as its nested item.\n            insertPosition = mapper.toViewPosition(model.createPositionAt(prevItem, 'end'));\n            // There could be some not mapped elements (eg. span in to-do list) but we need to insert\n            // a nested list directly inside the li element.\n            const mappedViewAncestor = mapper.findMappedViewAncestor(insertPosition);\n            const nestedList = findNestedList(mappedViewAncestor);\n            // If there already is some nested list, then use it's position.\n            if (nestedList) {\n                insertPosition = viewWriter.createPositionBefore(nestedList);\n            } else {\n                // Else just put new list on the end of list item content.\n                insertPosition = viewWriter.createPositionAt(mappedViewAncestor, 'end');\n            }\n        } else {\n            // The previous item is not a list item (or does not exist at all).\n            // Just map the position and insert the view item at the mapped position.\n            insertPosition = mapper.toViewPosition(model.createPositionBefore(modelItem));\n        }\n    }\n    insertPosition = positionAfterUiElements(insertPosition);\n    // Insert the view item.\n    viewWriter.insert(insertPosition, injectedList);\n    // 2. Handle possible children of the injected model item.\n    if (prevItem && prevItem.name == 'listItem') {\n        const prevView = mapper.toViewElement(prevItem);\n        const walkerBoundaries = viewWriter.createRange(viewWriter.createPositionAt(prevView, 0), insertPosition);\n        const walker = walkerBoundaries.getWalker({\n            ignoreElementEnd: true\n        });\n        for (const value of walker){\n            if (value.item.is('element', 'li')) {\n                const breakPosition = viewWriter.breakContainer(viewWriter.createPositionBefore(value.item));\n                const viewList = value.item.parent;\n                const targetPosition = viewWriter.createPositionAt(injectedItem, 'end');\n                mergeViewLists(viewWriter, targetPosition.nodeBefore, targetPosition.nodeAfter);\n                viewWriter.move(viewWriter.createRangeOn(viewList), targetPosition);\n                // This is bad, but those lists will be removed soon anyway.\n                walker._position = breakPosition;\n            }\n        }\n    } else {\n        const nextViewList = injectedList.nextSibling;\n        if (nextViewList && (nextViewList.is('element', 'ul') || nextViewList.is('element', 'ol'))) {\n            let lastSubChild = null;\n            for (const child of nextViewList.getChildren()){\n                const modelChild = mapper.toModelElement(child);\n                if (modelChild && modelChild.getAttribute('listIndent') > modelItem.getAttribute('listIndent')) {\n                    lastSubChild = child;\n                } else {\n                    break;\n                }\n            }\n            if (lastSubChild) {\n                viewWriter.breakContainer(viewWriter.createPositionAfter(lastSubChild));\n                viewWriter.move(viewWriter.createRangeOn(lastSubChild.parent), viewWriter.createPositionAt(injectedItem, 'end'));\n            }\n        }\n    }\n    // Merge the inserted view list with its possible neighbor lists.\n    mergeViewLists(viewWriter, injectedList, injectedList.nextSibling);\n    mergeViewLists(viewWriter, injectedList.previousSibling, injectedList);\n}\nfunction mergeViewLists(viewWriter, firstList, secondList) {\n    // Check if two lists are going to be merged.\n    if (!firstList || !secondList || firstList.name != 'ul' && firstList.name != 'ol') {\n        return null;\n    }\n    // Both parameters are list elements, so compare types now.\n    if (firstList.name != secondList.name || firstList.getAttribute('class') !== secondList.getAttribute('class')) {\n        return null;\n    }\n    return viewWriter.mergeContainers(viewWriter.createPositionAfter(firstList));\n}\n/**\n * Helper function that for a given `view.Position`, returns a `view.Position` that is after all `view.UIElement`s that\n * are after the given position.\n *\n * For example:\n * `<container:p>foo^<ui:span></ui:span><ui:span></ui:span>bar</container:p>`\n * For position ^, the position before \"bar\" will be returned.\n *\n */ function positionAfterUiElements(viewPosition) {\n    return viewPosition.getLastMatchingPosition((value)=>value.item.is('uiElement'));\n}\n/**\n * Helper function that searches for a previous list item sibling of a given model item that meets the given criteria\n * passed by the options object.\n *\n * @param options Search criteria.\n * @param options.sameIndent Whether the sought sibling should have the same indentation.\n * @param options.smallerIndent Whether the sought sibling should have a smaller indentation.\n * @param options.listIndent The reference indentation.\n * @param options.direction Walking direction.\n */ function getSiblingListItem(modelItem, options) {\n    const sameIndent = !!options.sameIndent;\n    const smallerIndent = !!options.smallerIndent;\n    const indent = options.listIndent;\n    let item = modelItem;\n    while(item && item.name == 'listItem'){\n        const itemIndent = item.getAttribute('listIndent');\n        if (sameIndent && indent == itemIndent || smallerIndent && indent > itemIndent) {\n            return item;\n        }\n        if (options.direction === 'forward') {\n            item = item.nextSibling;\n        } else {\n            item = item.previousSibling;\n        }\n    }\n    return null;\n}\n/**\n * Returns a first list view element that is direct child of the given view element.\n */ function findNestedList(viewElement) {\n    for (const node of viewElement.getChildren()){\n        if (node.name == 'ul' || node.name == 'ol') {\n            return node;\n        }\n    }\n    return null;\n}\n/**\n * Returns an array with all `listItem` elements that represent the same list.\n *\n * It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.\n *\n * Additionally, if the `position` is inside a list item, that list item will be returned as well.\n *\n * @param position Starting position.\n * @param direction Walking direction.\n */ function getSiblingNodes(position, direction) {\n    const items = [];\n    const listItem = position.parent;\n    const walkerOptions = {\n        ignoreElementEnd: false,\n        startPosition: position,\n        shallow: true,\n        direction\n    };\n    const limitIndent = listItem.getAttribute('listIndent');\n    const nodes = [\n        ...new TreeWalker(walkerOptions)\n    ].filter((value)=>value.item.is('element')).map((value)=>value.item);\n    for (const element of nodes){\n        // If found something else than `listItem`, we're out of the list scope.\n        if (!element.is('element', 'listItem')) {\n            break;\n        }\n        // If current parsed item has lower indent that element that the element that was a starting point,\n        // it means we left a nested list. Abort searching items.\n        //\n        // ■ List item 1.       [listIndent=0]\n        //     ○ List item 2.[] [listIndent=1], limitIndent = 1,\n        //     ○ List item 3.   [listIndent=1]\n        // ■ List item 4.       [listIndent=0]\n        //\n        // Abort searching when leave nested list.\n        if (element.getAttribute('listIndent') < limitIndent) {\n            break;\n        }\n        // ■ List item 1.[]     [listIndent=0] limitIndent = 0,\n        //     ○ List item 2.   [listIndent=1]\n        //     ○ List item 3.   [listIndent=1]\n        // ■ List item 4.       [listIndent=0]\n        //\n        // Ignore nested lists.\n        if (element.getAttribute('listIndent') > limitIndent) {\n            continue;\n        }\n        // ■ List item 1.[]  [listType=bulleted]\n        // 1. List item 2.   [listType=numbered]\n        // 2.List item 3.    [listType=numbered]\n        //\n        // Abort searching when found a different kind of a list.\n        if (element.getAttribute('listType') !== listItem.getAttribute('listType')) {\n            break;\n        }\n        // ■ List item 1.[]  [listType=bulleted]\n        // ■ List item 2.    [listType=bulleted]\n        // ○ List item 3.    [listType=bulleted]\n        // ○ List item 4.    [listType=bulleted]\n        //\n        // Abort searching when found a different list style,\n        if (element.getAttribute('listStyle') !== listItem.getAttribute('listStyle')) {\n            break;\n        }\n        // ... different direction\n        if (element.getAttribute('listReversed') !== listItem.getAttribute('listReversed')) {\n            break;\n        }\n        // ... and different start index\n        if (element.getAttribute('listStart') !== listItem.getAttribute('listStart')) {\n            break;\n        }\n        if (direction === 'backward') {\n            items.unshift(element);\n        } else {\n            items.push(element);\n        }\n    }\n    return items;\n}\n/**\n * Returns an array with all `listItem` elements in the model selection.\n *\n * It returns all the items even if only a part of the list is selected, including items that belong to nested lists.\n * If no list is selected, it returns an empty array.\n * The order of the elements is not specified.\n *\n * @internal\n */ function getSelectedListItems(model) {\n    const document = model.document;\n    // For all selected blocks find all list items that are being selected\n    // and update the `listStyle` attribute in those lists.\n    let listItems = [\n        ...document.selection.getSelectedBlocks()\n    ].filter((element)=>element.is('element', 'listItem')).map((element)=>{\n        const position = model.change((writer)=>writer.createPositionAt(element, 0));\n        return [\n            ...getSiblingNodes(position, 'backward'),\n            ...getSiblingNodes(position, 'forward')\n        ];\n    }).flat();\n    // Since `getSelectedBlocks()` can return items that belong to the same list, and\n    // `getSiblingNodes()` returns the entire list, we need to remove duplicated items.\n    listItems = [\n        ...new Set(listItems)\n    ];\n    return listItems;\n}\nconst BULLETED_LIST_STYLE_TYPES = [\n    'disc',\n    'circle',\n    'square'\n];\n// There's a lot of them (https://www.w3.org/TR/css-counter-styles-3/#typedef-counter-style).\n// Let's support only those that can be selected by ListPropertiesUI.\nconst NUMBERED_LIST_STYLE_TYPES = [\n    'decimal',\n    'decimal-leading-zero',\n    'lower-roman',\n    'upper-roman',\n    'lower-latin',\n    'upper-latin'\n];\n/**\n * Checks whether the given list-style-type is supported by numbered or bulleted list.\n */ function getListTypeFromListStyleType(listStyleType) {\n    if (BULLETED_LIST_STYLE_TYPES.includes(listStyleType)) {\n        return 'bulleted';\n    }\n    if (NUMBERED_LIST_STYLE_TYPES.includes(listStyleType)) {\n        return 'numbered';\n    }\n    return null;\n}\n/**\n * Implementation of getFillerOffset for view list item element.\n *\n * @returns Block filler offset or `null` if block filler is not needed.\n */ function getListItemFillerOffset() {\n    const hasOnlyLists = !this.isEmpty && (this.getChild(0).name == 'ul' || this.getChild(0).name == 'ol');\n    if (this.isEmpty || hasOnlyLists) {\n        return 0;\n    }\n    return getFillerOffset.call(this);\n}\n\n/**\n * A set of helpers related to legacy lists.\n */ class LegacyListUtils extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LegacyListUtils';\n    }\n    /**\n\t * Checks whether the given list-style-type is supported by numbered or bulleted list.\n\t */ getListTypeFromListStyleType(listStyleType) {\n        return getListTypeFromListStyleType(listStyleType);\n    }\n    /**\n\t * Returns an array with all `listItem` elements in the model selection.\n\t *\n\t * It returns all the items even if only a part of the list is selected, including items that belong to nested lists.\n\t * If no list is selected, it returns an empty array.\n\t * The order of the elements is not specified.\n\t */ getSelectedListItems(model) {\n        return getSelectedListItems(model);\n    }\n    /**\n\t * Returns an array with all `listItem` elements that represent the same list.\n\t *\n\t * It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.\n\t *\n\t * Additionally, if the `position` is inside a list item, that list item will be returned as well.\n\t *\n\t * @param position Starting position.\n\t * @param direction Walking direction.\n\t */ getSiblingNodes(position, direction) {\n        return getSiblingNodes(position, direction);\n    }\n}\n\n/**\n * A model-to-view converter for the `listItem` model element insertion.\n *\n * It creates a `<ul><li></li><ul>` (or `<ol>`) view structure out of a `listItem` model element, inserts it at the correct\n * position, and merges the list with surrounding lists (if available).\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n * @param model Model instance.\n */ function modelViewInsertion$1(model) {\n    return (evt, data, conversionApi)=>{\n        const consumable = conversionApi.consumable;\n        if (!consumable.test(data.item, 'insert') || !consumable.test(data.item, 'attribute:listType') || !consumable.test(data.item, 'attribute:listIndent')) {\n            return;\n        }\n        consumable.consume(data.item, 'insert');\n        consumable.consume(data.item, 'attribute:listType');\n        consumable.consume(data.item, 'attribute:listIndent');\n        const modelItem = data.item;\n        const viewItem = generateLiInUl(modelItem, conversionApi);\n        injectViewList(modelItem, viewItem, conversionApi, model);\n    };\n}\n/**\n * A model-to-view converter for the `listItem` model element removal.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */ function modelViewRemove(model) {\n    return (evt, data, conversionApi)=>{\n        const viewPosition = conversionApi.mapper.toViewPosition(data.position);\n        const viewStart = viewPosition.getLastMatchingPosition((value)=>!value.item.is('element', 'li'));\n        const viewItem = viewStart.nodeAfter;\n        const viewWriter = conversionApi.writer;\n        // 1. Break the container after and before the list item.\n        // This will create a view list with one view list item - the one to remove.\n        viewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n        viewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n        // 2. Remove the list with the item to remove.\n        const viewList = viewItem.parent;\n        const viewListPrev = viewList.previousSibling;\n        const removeRange = viewWriter.createRangeOn(viewList);\n        const removed = viewWriter.remove(removeRange);\n        // 3. Merge the whole created by breaking and removing the list.\n        if (viewListPrev && viewListPrev.nextSibling) {\n            mergeViewLists(viewWriter, viewListPrev, viewListPrev.nextSibling);\n        }\n        // 4. Bring back nested list that was in the removed <li>.\n        const modelItem = conversionApi.mapper.toModelElement(viewItem);\n        hoistNestedLists(modelItem.getAttribute('listIndent') + 1, data.position, removeRange.start, viewItem, conversionApi, model);\n        // 5. Unbind removed view item and all children.\n        for (const child of viewWriter.createRangeIn(removed).getItems()){\n            conversionApi.mapper.unbindViewElement(child);\n        }\n        evt.stop();\n    };\n}\n/**\n * A model-to-view converter for the `type` attribute change on the `listItem` model element.\n *\n * This change means that the `<li>` element parent changes from `<ul>` to `<ol>` (or vice versa). This is accomplished\n * by breaking view elements and changing their name. The next {@link module:list/legacylist/legacyconverters~modelViewMergeAfterChangeType}\n * converter will attempt to merge split nodes.\n *\n * Splitting this conversion into 2 steps makes it possible to add an additional conversion in the middle.\n * Check {@link module:list/legacytodolist/legacytodolistconverters~modelViewChangeType} to see an example of it.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n */ const modelViewChangeType$1 = (evt, data, conversionApi)=>{\n    if (!conversionApi.consumable.test(data.item, evt.name)) {\n        return;\n    }\n    const viewItem = conversionApi.mapper.toViewElement(data.item);\n    const viewWriter = conversionApi.writer;\n    // Break the container after and before the list item.\n    // This will create a view list with one view list item -- the one that changed type.\n    viewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n    viewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n    // Change name of the view list that holds the changed view item.\n    // We cannot just change name property, because that would not render properly.\n    const viewList = viewItem.parent;\n    const listName = data.attributeNewValue == 'numbered' ? 'ol' : 'ul';\n    viewWriter.rename(listName, viewList);\n};\n/**\n * A model-to-view converter that attempts to merge nodes split by {@link module:list/legacylist/legacyconverters~modelViewChangeType}.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n */ const modelViewMergeAfterChangeType = (evt, data, conversionApi)=>{\n    conversionApi.consumable.consume(data.item, evt.name);\n    const viewItem = conversionApi.mapper.toViewElement(data.item);\n    const viewList = viewItem.parent;\n    const viewWriter = conversionApi.writer;\n    // Merge the changed view list with other lists, if possible.\n    mergeViewLists(viewWriter, viewList, viewList.nextSibling);\n    mergeViewLists(viewWriter, viewList.previousSibling, viewList);\n};\n/**\n * A model-to-view converter for the `listIndent` attribute change on the `listItem` model element.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */ function modelViewChangeIndent(model) {\n    return (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.consume(data.item, 'attribute:listIndent')) {\n            return;\n        }\n        const viewItem = conversionApi.mapper.toViewElement(data.item);\n        const viewWriter = conversionApi.writer;\n        // 1. Break the container after and before the list item.\n        // This will create a view list with one view list item -- the one that changed type.\n        viewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n        viewWriter.breakContainer(viewWriter.createPositionAfter(viewItem));\n        // 2. Extract view list with changed view list item and merge \"hole\" possibly created by breaking and removing elements.\n        const viewList = viewItem.parent;\n        const viewListPrev = viewList.previousSibling;\n        const removeRange = viewWriter.createRangeOn(viewList);\n        viewWriter.remove(removeRange);\n        if (viewListPrev && viewListPrev.nextSibling) {\n            mergeViewLists(viewWriter, viewListPrev, viewListPrev.nextSibling);\n        }\n        // 3. Bring back nested list that was in the removed <li>.\n        hoistNestedLists(data.attributeOldValue + 1, data.range.start, removeRange.start, viewItem, conversionApi, model);\n        // 4. Inject view list like it is newly inserted.\n        injectViewList(data.item, viewItem, conversionApi, model);\n        // 5. Consume insertion of children inside the item. They are already handled by re-building the item in view.\n        for (const child of data.item.getChildren()){\n            conversionApi.consumable.consume(child, 'insert');\n        }\n    };\n}\n/**\n * A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter is fired for\n * insert change of every model item, and should be fired before the actual converter. The converter checks whether the inserted\n * model item is a non-`listItem` element. If it is, and it is inserted inside a view list, the converter breaks the\n * list so the model element is inserted to the view parent element corresponding to its model parent element.\n *\n * The converter prevents such situations:\n *\n * ```xml\n * // Model:                        // View:\n * <listItem>foo</listItem>         <ul>\n * <listItem>bar</listItem>             <li>foo</li>\n *                                      <li>bar</li>\n *                                  </ul>\n *\n * // After change:                 // Correct view guaranteed by this converter:\n * <listItem>foo</listItem>         <ul><li>foo</li></ul><p>xxx</p><ul><li>bar</li></ul>\n * <paragraph>xxx</paragraph>       // Instead of this wrong view state:\n * <listItem>bar</listItem>         <ul><li>foo</li><p>xxx</p><li>bar</li></ul>\n * ```\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n */ const modelViewSplitOnInsert = (evt, data, conversionApi)=>{\n    if (!conversionApi.consumable.test(data.item, evt.name)) {\n        return;\n    }\n    if (data.item.name != 'listItem') {\n        let viewPosition = conversionApi.mapper.toViewPosition(data.range.start);\n        const viewWriter = conversionApi.writer;\n        const lists = [];\n        // Break multiple ULs/OLs if there are.\n        //\n        // Imagine following list:\n        //\n        // 1 --------\n        //   1.1 --------\n        //     1.1.1 --------\n        //     1.1.2 --------\n        //     1.1.3 --------\n        //       1.1.3.1 --------\n        //   1.2 --------\n        //     1.2.1 --------\n        // 2 --------\n        //\n        // Insert paragraph after item 1.1.1:\n        //\n        // 1 --------\n        //   1.1 --------\n        //     1.1.1 --------\n        //\n        // Lorem ipsum.\n        //\n        //     1.1.2 --------\n        //     1.1.3 --------\n        //       1.1.3.1 --------\n        //   1.2 --------\n        //     1.2.1 --------\n        // 2 --------\n        //\n        // In this case 1.1.2 has to become beginning of a new list.\n        // We need to break list before 1.1.2 (obvious), then we need to break list also before 1.2.\n        // Then we need to move those broken pieces one after another and merge:\n        //\n        // 1 --------\n        //   1.1 --------\n        //     1.1.1 --------\n        //\n        // Lorem ipsum.\n        //\n        // 1.1.2 --------\n        //   1.1.3 --------\n        //     1.1.3.1 --------\n        // 1.2 --------\n        //   1.2.1 --------\n        // 2 --------\n        //\n        while(viewPosition.parent.name == 'ul' || viewPosition.parent.name == 'ol'){\n            viewPosition = viewWriter.breakContainer(viewPosition);\n            if (viewPosition.parent.name != 'li') {\n                break;\n            }\n            // Remove lists that are after inserted element.\n            // They will be brought back later, below the inserted element.\n            const removeStart = viewPosition;\n            const removeEnd = viewWriter.createPositionAt(viewPosition.parent, 'end');\n            // Don't remove if there is nothing to remove.\n            if (!removeStart.isEqual(removeEnd)) {\n                const removed = viewWriter.remove(viewWriter.createRange(removeStart, removeEnd));\n                lists.push(removed);\n            }\n            viewPosition = viewWriter.createPositionAfter(viewPosition.parent);\n        }\n        // Bring back removed lists.\n        if (lists.length > 0) {\n            for(let i = 0; i < lists.length; i++){\n                const previousList = viewPosition.nodeBefore;\n                const insertedRange = viewWriter.insert(viewPosition, lists[i]);\n                viewPosition = insertedRange.end;\n                // Don't merge first list! We want a split in that place (this is why this converter is introduced).\n                if (i > 0) {\n                    const mergePos = mergeViewLists(viewWriter, previousList, previousList.nextSibling);\n                    // If `mergePos` is in `previousList` it means that the lists got merged.\n                    // In this case, we need to fix insert position.\n                    if (mergePos && mergePos.parent == previousList) {\n                        viewPosition.offset--;\n                    }\n                }\n            }\n            // Merge last inserted list with element after it.\n            mergeViewLists(viewWriter, viewPosition.nodeBefore, viewPosition.nodeAfter);\n        }\n    }\n};\n/**\n * A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter takes care of\n * merging view lists after something is removed or moved from near them.\n *\n * Example:\n *\n * ```xml\n * // Model:                        // View:\n * <listItem>foo</listItem>         <ul><li>foo</li></ul>\n * <paragraph>xxx</paragraph>       <p>xxx</p>\n * <listItem>bar</listItem>         <ul><li>bar</li></ul>\n *\n * // After change:                 // Correct view guaranteed by this converter:\n * <listItem>foo</listItem>         <ul>\n * <listItem>bar</listItem>             <li>foo</li>\n *                                      <li>bar</li>\n *                                  </ul>\n * ```\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove\n */ const modelViewMergeAfter = (evt, data, conversionApi)=>{\n    const viewPosition = conversionApi.mapper.toViewPosition(data.position);\n    const viewItemPrev = viewPosition.nodeBefore;\n    const viewItemNext = viewPosition.nodeAfter;\n    // Merge lists if something (remove, move) was done from inside of list.\n    // Merging will be done only if both items are view lists of the same type.\n    // The check is done inside the helper function.\n    mergeViewLists(conversionApi.writer, viewItemPrev, viewItemNext);\n};\n/**\n * A view-to-model converter that converts the `<li>` view elements into the `listItem` model elements.\n *\n * To set correct values of the `listType` and `listIndent` attributes the converter:\n * * checks `<li>`'s parent,\n * * stores and increases the `conversionApi.store.indent` value when `<li>`'s sub-items are converted.\n *\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */ const viewModelConverter = (evt, data, conversionApi)=>{\n    if (conversionApi.consumable.consume(data.viewItem, {\n        name: true\n    })) {\n        const writer = conversionApi.writer;\n        // 1. Create `listItem` model element.\n        const listItem = writer.createElement('listItem');\n        // 2. Handle `listItem` model element attributes.\n        const indent = getIndent(data.viewItem);\n        writer.setAttribute('listIndent', indent, listItem);\n        // Set 'bulleted' as default. If this item is pasted into a context,\n        const type = data.viewItem.parent && data.viewItem.parent.name == 'ol' ? 'numbered' : 'bulleted';\n        writer.setAttribute('listType', type, listItem);\n        if (!conversionApi.safeInsert(listItem, data.modelCursor)) {\n            return;\n        }\n        const nextPosition = viewToModelListItemChildrenConverter(listItem, data.viewItem.getChildren(), conversionApi);\n        // Result range starts before the first item and ends after the last.\n        data.modelRange = writer.createRange(data.modelCursor, nextPosition);\n        conversionApi.updateConversionResult(listItem, data);\n    }\n};\n/**\n * A view-to-model converter for the `<ul>` and `<ol>` view elements that cleans the input view of garbage.\n * This is mostly to clean whitespaces from between the `<li>` view elements inside the view list element, however, also\n * incorrect data can be cleared if the view was incorrect.\n *\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */ const cleanList = (evt, data, conversionApi)=>{\n    if (conversionApi.consumable.test(data.viewItem, {\n        name: true\n    })) {\n        // Caching children because when we start removing them iterating fails.\n        const children = Array.from(data.viewItem.getChildren());\n        for (const child of children){\n            const isWrongElement = !(child.is('element', 'li') || isList(child));\n            if (isWrongElement) {\n                child._remove();\n            }\n        }\n    }\n};\n/**\n * A view-to-model converter for the `<li>` elements that cleans whitespace formatting from the input view.\n *\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */ const cleanListItem = (evt, data, conversionApi)=>{\n    if (conversionApi.consumable.test(data.viewItem, {\n        name: true\n    })) {\n        if (data.viewItem.childCount === 0) {\n            return;\n        }\n        const children = [\n            ...data.viewItem.getChildren()\n        ];\n        let foundList = false;\n        for (const child of children){\n            if (foundList && !isList(child)) {\n                child._remove();\n            }\n            if (isList(child)) {\n                // If this is a <ul> or <ol>, do not process it, just mark that we already visited list element.\n                foundList = true;\n            }\n        }\n    }\n};\n/**\n * Returns a callback for model position to view position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes\n * positions between the `listItem` elements that would be incorrectly mapped because of how list items are represented in the model\n * and in the view.\n */ function modelToViewPosition(view) {\n    return (evt, data)=>{\n        if (data.isPhantom) {\n            return;\n        }\n        const modelItem = data.modelPosition.nodeBefore;\n        if (modelItem && modelItem.is('element', 'listItem')) {\n            const viewItem = data.mapper.toViewElement(modelItem);\n            const topmostViewList = viewItem.getAncestors().find(isList);\n            const walker = view.createPositionAt(viewItem, 0).getWalker();\n            for (const value of walker){\n                if (value.type == 'elementStart' && value.item.is('element', 'li')) {\n                    data.viewPosition = value.previousPosition;\n                    break;\n                } else if (value.type == 'elementEnd' && value.item == topmostViewList) {\n                    data.viewPosition = value.nextPosition;\n                    break;\n                }\n            }\n        }\n    };\n}\n/**\n * The callback for view position to model position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes\n * positions between the `<li>` elements that would be incorrectly mapped because of how list items are represented in the model\n * and in the view.\n *\n * @see module:engine/conversion/mapper~Mapper#event:viewToModelPosition\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */ function viewToModelPosition(model) {\n    return (evt, data)=>{\n        const viewPos = data.viewPosition;\n        const viewParent = viewPos.parent;\n        const mapper = data.mapper;\n        if (viewParent.name == 'ul' || viewParent.name == 'ol') {\n            // Position is directly in <ul> or <ol>.\n            if (!viewPos.isAtEnd) {\n                // If position is not at the end, it must be before <li>.\n                // Get that <li>, map it to `listItem` and set model position before that `listItem`.\n                const modelNode = mapper.toModelElement(viewPos.nodeAfter);\n                data.modelPosition = model.createPositionBefore(modelNode);\n            } else {\n                // Position is at the end of <ul> or <ol>, so there is no <li> after it to be mapped.\n                // There is <li> before the position, but we cannot just map it to `listItem` and set model position after it,\n                // because that <li> may contain nested items.\n                // We will check \"model length\" of that <li>, in other words - how many `listItem`s are in that <li>.\n                const modelNode = mapper.toModelElement(viewPos.nodeBefore);\n                const modelLength = mapper.getModelLength(viewPos.nodeBefore);\n                // Then we get model position before mapped `listItem` and shift it accordingly.\n                data.modelPosition = model.createPositionBefore(modelNode).getShiftedBy(modelLength);\n            }\n            evt.stop();\n        } else if (viewParent.name == 'li' && viewPos.nodeBefore && (viewPos.nodeBefore.name == 'ul' || viewPos.nodeBefore.name == 'ol')) {\n            // In most cases when view position is in <li> it is in text and this is a correct position.\n            // However, if position is after <ul> or <ol> we have to fix it -- because in model <ul>/<ol> are not in the `listItem`.\n            const modelNode = mapper.toModelElement(viewParent);\n            // Check all <ul>s and <ol>s that are in the <li> but before mapped position.\n            // Get model length of those elements and then add it to the offset of `listItem` mapped to the original <li>.\n            let modelLength = 1; // Starts from 1 because the original <li> has to be counted in too.\n            let viewList = viewPos.nodeBefore;\n            while(viewList && isList(viewList)){\n                modelLength += mapper.getModelLength(viewList);\n                viewList = viewList.previousSibling;\n            }\n            data.modelPosition = model.createPositionBefore(modelNode).getShiftedBy(modelLength);\n            evt.stop();\n        }\n    };\n}\n/**\n * Post-fixer that reacts to changes on document and fixes incorrect model states.\n *\n * In the example below, there is a correct list structure.\n * Then the middle element is removed so the list structure will become incorrect:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>Item 2</listItem>   <--- this is removed.\n * <listItem listType=\"bulleted\" listIndent=2>Item 3</listItem>\n * ```\n *\n * The list structure after the middle element is removed:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n * <listItem listType=\"bulleted\" listIndent=2>Item 3</listItem>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>Item 1</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>Item 3</listItem>   <--- note that indent got post-fixed.\n * ```\n *\n * @param model The data model.\n * @param writer The writer to do changes with.\n * @returns `true` if any change has been applied, `false` otherwise.\n */ function modelChangePostFixer(model, writer) {\n    const changes = model.document.differ.getChanges();\n    const itemToListHead = new Map();\n    let applied = false;\n    for (const entry of changes){\n        if (entry.type == 'insert' && entry.name == 'listItem') {\n            _addListToFix(entry.position);\n        } else if (entry.type == 'insert' && entry.name != 'listItem') {\n            if (entry.name != '$text') {\n                // In case of renamed element.\n                const item = entry.position.nodeAfter;\n                if (item.hasAttribute('listIndent')) {\n                    writer.removeAttribute('listIndent', item);\n                    applied = true;\n                }\n                if (item.hasAttribute('listType')) {\n                    writer.removeAttribute('listType', item);\n                    applied = true;\n                }\n                if (item.hasAttribute('listStyle')) {\n                    writer.removeAttribute('listStyle', item);\n                    applied = true;\n                }\n                if (item.hasAttribute('listReversed')) {\n                    writer.removeAttribute('listReversed', item);\n                    applied = true;\n                }\n                if (item.hasAttribute('listStart')) {\n                    writer.removeAttribute('listStart', item);\n                    applied = true;\n                }\n                for (const innerItem of Array.from(model.createRangeIn(item)).filter((e)=>e.item.is('element', 'listItem'))){\n                    _addListToFix(innerItem.previousPosition);\n                }\n            }\n            const posAfter = entry.position.getShiftedBy(entry.length);\n            _addListToFix(posAfter);\n        } else if (entry.type == 'remove' && entry.name == 'listItem') {\n            _addListToFix(entry.position);\n        } else if (entry.type == 'attribute' && entry.attributeKey == 'listIndent') {\n            _addListToFix(entry.range.start);\n        } else if (entry.type == 'attribute' && entry.attributeKey == 'listType') {\n            _addListToFix(entry.range.start);\n        }\n    }\n    for (const listHead of itemToListHead.values()){\n        _fixListIndents(listHead);\n        _fixListTypes(listHead);\n    }\n    return applied;\n    function _addListToFix(position) {\n        const previousNode = position.nodeBefore;\n        if (!previousNode || !previousNode.is('element', 'listItem')) {\n            const item = position.nodeAfter;\n            if (item && item.is('element', 'listItem')) {\n                itemToListHead.set(item, item);\n            }\n        } else {\n            let listHead = previousNode;\n            if (itemToListHead.has(listHead)) {\n                return;\n            }\n            for(// Cache previousSibling and reuse for performance reasons. See #6581.\n            let previousSibling = listHead.previousSibling; previousSibling && previousSibling.is('element', 'listItem'); previousSibling = listHead.previousSibling){\n                listHead = previousSibling;\n                if (itemToListHead.has(listHead)) {\n                    return;\n                }\n            }\n            itemToListHead.set(previousNode, listHead);\n        }\n    }\n    function _fixListIndents(item) {\n        let maxIndent = 0;\n        let fixBy = null;\n        while(item && item.is('element', 'listItem')){\n            const itemIndent = item.getAttribute('listIndent');\n            if (itemIndent > maxIndent) {\n                let newIndent;\n                if (fixBy === null) {\n                    fixBy = itemIndent - maxIndent;\n                    newIndent = maxIndent;\n                } else {\n                    if (fixBy > itemIndent) {\n                        fixBy = itemIndent;\n                    }\n                    newIndent = itemIndent - fixBy;\n                }\n                writer.setAttribute('listIndent', newIndent, item);\n                applied = true;\n            } else {\n                fixBy = null;\n                maxIndent = item.getAttribute('listIndent') + 1;\n            }\n            item = item.nextSibling;\n        }\n    }\n    function _fixListTypes(item) {\n        let typesStack = [];\n        let prev = null;\n        while(item && item.is('element', 'listItem')){\n            const itemIndent = item.getAttribute('listIndent');\n            if (prev && prev.getAttribute('listIndent') > itemIndent) {\n                typesStack = typesStack.slice(0, itemIndent + 1);\n            }\n            if (itemIndent != 0) {\n                if (typesStack[itemIndent]) {\n                    const type = typesStack[itemIndent];\n                    if (item.getAttribute('listType') != type) {\n                        writer.setAttribute('listType', type, item);\n                        applied = true;\n                    }\n                } else {\n                    typesStack[itemIndent] = item.getAttribute('listType');\n                }\n            }\n            prev = item;\n            item = item.nextSibling;\n        }\n    }\n}\n/**\n * A fixer for pasted content that includes list items.\n *\n * It fixes indentation of pasted list items so the pasted items match correctly to the context they are pasted into.\n *\n * Example:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>A</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>B^</listItem>\n * // At ^ paste:  <listItem listType=\"bulleted\" listIndent=4>X</listItem>\n * //              <listItem listType=\"bulleted\" listIndent=5>Y</listItem>\n * <listItem listType=\"bulleted\" listIndent=2>C</listItem>\n * ```\n *\n * Should become:\n *\n * ```xml\n * <listItem listType=\"bulleted\" listIndent=0>A</listItem>\n * <listItem listType=\"bulleted\" listIndent=1>BX</listItem>\n * <listItem listType=\"bulleted\" listIndent=2>Y/listItem>\n * <listItem listType=\"bulleted\" listIndent=2>C</listItem>\n * ```\n */ const modelIndentPasteFixer = function(evt, [content, selectable]) {\n    const model = this;\n    // Check whether inserted content starts from a `listItem`. If it does not, it means that there are some other\n    // elements before it and there is no need to fix indents, because even if we insert that content into a list,\n    // that list will be broken.\n    // Note: we also need to handle singular elements because inserting item with indent 0 into 0,1,[],2\n    // would create incorrect model.\n    let item = content.is('documentFragment') ? content.getChild(0) : content;\n    let selection;\n    if (!selectable) {\n        selection = model.document.selection;\n    } else {\n        selection = model.createSelection(selectable);\n    }\n    if (item && item.is('element', 'listItem')) {\n        // Get a reference list item. Inserted list items will be fixed according to that item.\n        const pos = selection.getFirstPosition();\n        let refItem = null;\n        if (pos.parent.is('element', 'listItem')) {\n            refItem = pos.parent;\n        } else if (pos.nodeBefore && pos.nodeBefore.is('element', 'listItem')) {\n            refItem = pos.nodeBefore;\n        }\n        // If there is `refItem` it means that we do insert list items into an existing list.\n        if (refItem) {\n            // First list item in `data` has indent equal to 0 (it is a first list item). It should have indent equal\n            // to the indent of reference item. We have to fix the first item and all of it's children and following siblings.\n            // Indent of all those items has to be adjusted to reference item.\n            const indentChange = refItem.getAttribute('listIndent');\n            // Fix only if there is anything to fix.\n            if (indentChange > 0) {\n                // Adjust indent of all \"first\" list items in inserted data.\n                while(item && item.is('element', 'listItem')){\n                    item._setAttribute('listIndent', item.getAttribute('listIndent') + indentChange);\n                    item = item.nextSibling;\n                }\n            }\n        }\n    }\n};\n/**\n * Helper function that converts children of a given `<li>` view element into corresponding model elements.\n * The function maintains proper order of elements if model `listItem` is split during the conversion\n * due to block children conversion.\n *\n * @param listItemModel List item model element to which converted children will be inserted.\n * @param viewChildren View elements which will be converted.\n * @param conversionApi Conversion interface to be used by the callback.\n * @returns Position on which next elements should be inserted after children conversion.\n */ function viewToModelListItemChildrenConverter(listItemModel, viewChildren, conversionApi) {\n    const { writer, schema } = conversionApi;\n    // A position after the last inserted `listItem`.\n    let nextPosition = writer.createPositionAfter(listItemModel);\n    // Check all children of the converted `<li>`. At this point we assume there are no \"whitespace\" view text nodes\n    // in view list, between view list items. This should be handled by `<ul>` and `<ol>` converters.\n    for (const child of viewChildren){\n        if (child.name == 'ul' || child.name == 'ol') {\n            // If the children is a list, we will insert its conversion result after currently handled `listItem`.\n            // Then, next insertion position will be set after all the new list items (and maybe other elements if\n            // something split list item).\n            //\n            // If this is a list, we expect that some `listItem`s and possibly other blocks will be inserted, however `.modelCursor`\n            // should be set after last `listItem` (or block). This is why it feels safe to use it as `nextPosition`\n            nextPosition = conversionApi.convertItem(child, nextPosition).modelCursor;\n        } else {\n            // If this is not a list, try inserting content at the end of the currently handled `listItem`.\n            const result = conversionApi.convertItem(child, writer.createPositionAt(listItemModel, 'end'));\n            // It may end up that the current `listItem` becomes split (if that content cannot be inside `listItem`). For example:\n            //\n            // <li><p>Foo</p></li>\n            //\n            // will be converted to:\n            //\n            // <listItem></listItem><paragraph>Foo</paragraph><listItem></listItem>\n            //\n            const convertedChild = result.modelRange.start.nodeAfter;\n            const wasSplit = convertedChild && convertedChild.is('element') && !schema.checkChild(listItemModel, convertedChild.name);\n            if (wasSplit) {\n                // As `lastListItem` got split, we need to update it to the second part of the split `listItem` element.\n                //\n                // `modelCursor` should be set to a position where the conversion should continue. There are multiple possible scenarios\n                // that may happen. Usually, `modelCursor` (marked as `#` below) would point to the second list item after conversion:\n                //\n                //\t\t`<li><p>Foo</p></li>` -> `<listItem></listItem><paragraph>Foo</paragraph><listItem>#</listItem>`\n                //\n                // However, in some cases, like auto-paragraphing, the position is placed at the end of the block element:\n                //\n                //\t\t`<li><div>Foo</div></li>` -> `<listItem></listItem><paragraph>Foo#</paragraph><listItem></listItem>`\n                //\n                // or after an element if another element broken auto-paragraphed element:\n                //\n                //\t\t`<li><div><h2>Foo</h2></div></li>` -> `<listItem></listItem><heading1>Foo</heading1>#<listItem></listItem>`\n                //\n                // We need to check for such cases and use proper list item and position based on it.\n                //\n                if (result.modelCursor.parent.is('element', 'listItem')) {\n                    // (1).\n                    listItemModel = result.modelCursor.parent;\n                } else {\n                    // (2), (3).\n                    listItemModel = findNextListItem(result.modelCursor);\n                }\n                nextPosition = writer.createPositionAfter(listItemModel);\n            }\n        }\n    }\n    return nextPosition;\n}\n/**\n * Helper function that seeks for a next list item starting from given `startPosition`.\n */ function findNextListItem(startPosition) {\n    const treeWalker = new TreeWalker({\n        startPosition\n    });\n    let value;\n    do {\n        value = treeWalker.next();\n    }while (!value.value.item.is('element', 'listItem'))\n    return value.value.item;\n}\n/**\n * Helper function that takes all children of given `viewRemovedItem` and moves them in a correct place, according\n * to other given parameters.\n */ function hoistNestedLists(nextIndent, modelRemoveStartPosition, viewRemoveStartPosition, viewRemovedItem, conversionApi, model) {\n    // Find correct previous model list item element.\n    // The element has to have either same or smaller indent than given reference indent.\n    // This will be the model element which will get nested items (if it has smaller indent) or sibling items (if it has same indent).\n    // Keep in mind that such element might not be found, if removed item was the first item.\n    const prevModelItem = getSiblingListItem(modelRemoveStartPosition.nodeBefore, {\n        sameIndent: true,\n        smallerIndent: true,\n        listIndent: nextIndent\n    });\n    const mapper = conversionApi.mapper;\n    const viewWriter = conversionApi.writer;\n    // Indent of found element or `null` if the element has not been found.\n    const prevIndent = prevModelItem ? prevModelItem.getAttribute('listIndent') : null;\n    let insertPosition;\n    if (!prevModelItem) {\n        // If element has not been found, simply insert lists at the position where the removed item was:\n        //\n        // Lorem ipsum.\n        // 1 --------           <--- this is removed, no previous list item, put nested items in place of removed item.\n        //   1.1 --------       <--- this is reference indent.\n        //     1.1.1 --------\n        //     1.1.2 --------\n        //   1.2 --------\n        //\n        // Becomes:\n        //\n        // Lorem ipsum.\n        // 1.1 --------\n        //   1.1.1 --------\n        //   1.1.2 --------\n        // 1.2 --------\n        insertPosition = viewRemoveStartPosition;\n    } else if (prevIndent == nextIndent) {\n        // If element has been found and has same indent as reference indent it means that nested items should\n        // become siblings of found element:\n        //\n        // 1 --------\n        //   1.1 --------\n        //   1.2 --------       <--- this is `prevModelItem`.\n        // 2 --------           <--- this is removed, previous list item has indent same as reference indent.\n        //   2.1 --------       <--- this is reference indent, this and 2.2 should become siblings of 1.2.\n        //   2.2 --------\n        //\n        // Becomes:\n        //\n        // 1 --------\n        //   1.1 --------\n        //   1.2 --------\n        //   2.1 --------\n        //   2.2 --------\n        const prevViewList = mapper.toViewElement(prevModelItem).parent;\n        insertPosition = viewWriter.createPositionAfter(prevViewList);\n    } else {\n        // If element has been found and has smaller indent as reference indent it means that nested items\n        // should become nested items of found item:\n        //\n        // 1 --------           <--- this is `prevModelItem`.\n        //   1.1 --------       <--- this is removed, previous list item has indent smaller than reference indent.\n        //     1.1.1 --------   <--- this is reference indent, this and 1.1.1 should become nested items of 1.\n        //     1.1.2 --------\n        //   1.2 --------\n        //\n        // Becomes:\n        //\n        // 1 --------\n        //   1.1.1 --------\n        //   1.1.2 --------\n        //   1.2 --------\n        //\n        // Note: in this case 1.1.1 have indent 2 while 1 have indent 0. In model that should not be possible,\n        // because following item may have indent bigger only by one. But this is fixed by postfixer.\n        const modelPosition = model.createPositionAt(prevModelItem, 'end');\n        insertPosition = mapper.toViewPosition(modelPosition);\n    }\n    insertPosition = positionAfterUiElements(insertPosition);\n    // Handle multiple lists. This happens if list item has nested numbered and bulleted lists. Following lists\n    // are inserted after the first list (no need to recalculate insertion position for them).\n    for (const child of [\n        ...viewRemovedItem.getChildren()\n    ]){\n        if (isList(child)) {\n            insertPosition = viewWriter.move(viewWriter.createRangeOn(child), insertPosition).end;\n            mergeViewLists(viewWriter, child, child.nextSibling);\n            mergeViewLists(viewWriter, child.previousSibling, child);\n        }\n    }\n}\n/**\n * Checks if view element is a list type (ul or ol).\n */ function isList(viewElement) {\n    return viewElement.is('element', 'ol') || viewElement.is('element', 'ul');\n}\n/**\n * Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.\n *\n * Also, fixes non HTML compliant lists indents:\n *\n * ```\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI     (indent: 0)\n *     |-> OL                                  |-> OL\n *         |-> OL                                  |\n *         |   |-> OL                              |\n *         |       |-> OL                          |\n *         |           |-> LI (parent LIs: 1)      |-> LI (indent: 1)\n *         |-> LI (parent LIs: 1)                  |-> LI (indent: 1)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> OL                                      |\n *     |-> OL                                  |\n *          |-> OL                             |\n *              |-> LI (parent LIs: 0)         |-> LI        (indent: 0)\n *\n * before:                                     fixed list:\n * OL                                          OL\n * |-> LI (parent LIs: 0)                      |-> LI         (indent: 0)\n * |-> OL                                          |-> OL\n *     |-> LI (parent LIs: 0)                          |-> LI (indent: 1)\n * ```\n */ function getIndent(listItem) {\n    let indent = 0;\n    let parent = listItem.parent;\n    while(parent){\n        // Each LI in the tree will result in an increased indent for HTML compliant lists.\n        if (parent.is('element', 'li')) {\n            indent++;\n        } else {\n            // If however the list is nested in other list we should check previous sibling of any of the list elements...\n            const previousSibling = parent.previousSibling;\n            // ...because the we might need increase its indent:\n            //\t\tbefore:                           fixed list:\n            //\t\tOL                                OL\n            //\t\t|-> LI (parent LIs: 0)            |-> LI         (indent: 0)\n            //\t\t|-> OL                                |-> OL\n            //\t\t    |-> LI (parent LIs: 0)                |-> LI (indent: 1)\n            if (previousSibling && previousSibling.is('element', 'li')) {\n                indent++;\n            }\n        }\n        parent = parent.parent;\n    }\n    return indent;\n}\n\n/**\n * The engine of the list feature. It handles creating, editing and removing lists and list items.\n *\n * It registers the `'numberedList'`, `'bulletedList'`, `'indentList'` and `'outdentList'` commands.\n */ class LegacyListEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LegacyListEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Enter,\n            Delete,\n            LegacyListUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Schema.\n        // Note: in case `$block` will ever be allowed in `listItem`, keep in mind that this feature\n        // uses `Selection#getSelectedBlocks()` without any additional processing to obtain all selected list items.\n        // If there are blocks allowed inside list item, algorithms using `getSelectedBlocks()` will have to be modified.\n        editor.model.schema.register('listItem', {\n            inheritAllFrom: '$block',\n            allowAttributes: [\n                'listType',\n                'listIndent'\n            ]\n        });\n        // Converters.\n        const data = editor.data;\n        const editing = editor.editing;\n        editor.model.document.registerPostFixer((writer)=>modelChangePostFixer(editor.model, writer));\n        editing.mapper.registerViewToModelLength('li', getViewListItemLength);\n        data.mapper.registerViewToModelLength('li', getViewListItemLength);\n        editing.mapper.on('modelToViewPosition', modelToViewPosition(editing.view));\n        editing.mapper.on('viewToModelPosition', viewToModelPosition(editor.model));\n        data.mapper.on('modelToViewPosition', modelToViewPosition(editing.view));\n        editor.conversion.for('editingDowncast').add((dispatcher)=>{\n            dispatcher.on('insert', modelViewSplitOnInsert, {\n                priority: 'high'\n            });\n            dispatcher.on('insert:listItem', modelViewInsertion$1(editor.model));\n            dispatcher.on('attribute:listType:listItem', modelViewChangeType$1, {\n                priority: 'high'\n            });\n            dispatcher.on('attribute:listType:listItem', modelViewMergeAfterChangeType, {\n                priority: 'low'\n            });\n            dispatcher.on('attribute:listIndent:listItem', modelViewChangeIndent(editor.model));\n            dispatcher.on('remove:listItem', modelViewRemove(editor.model));\n            dispatcher.on('remove', modelViewMergeAfter, {\n                priority: 'low'\n            });\n        });\n        editor.conversion.for('dataDowncast').add((dispatcher)=>{\n            dispatcher.on('insert', modelViewSplitOnInsert, {\n                priority: 'high'\n            });\n            dispatcher.on('insert:listItem', modelViewInsertion$1(editor.model));\n        });\n        editor.conversion.for('upcast').add((dispatcher)=>{\n            dispatcher.on('element:ul', cleanList, {\n                priority: 'high'\n            });\n            dispatcher.on('element:ol', cleanList, {\n                priority: 'high'\n            });\n            dispatcher.on('element:li', cleanListItem, {\n                priority: 'high'\n            });\n            dispatcher.on('element:li', viewModelConverter);\n        });\n        // Fix indentation of pasted items.\n        editor.model.on('insertContent', modelIndentPasteFixer, {\n            priority: 'high'\n        });\n        // Register commands for numbered and bulleted list.\n        editor.commands.add('numberedList', new LegacyListCommand(editor, 'numbered'));\n        editor.commands.add('bulletedList', new LegacyListCommand(editor, 'bulleted'));\n        // Register commands for indenting.\n        editor.commands.add('indentList', new LegacyIndentCommand(editor, 'forward'));\n        editor.commands.add('outdentList', new LegacyIndentCommand(editor, 'backward'));\n        const viewDocument = editing.view.document;\n        // Overwrite default Enter key behavior.\n        // If Enter key is pressed with selection collapsed in empty list item, outdent it instead of breaking it.\n        this.listenTo(viewDocument, 'enter', (evt, data)=>{\n            const doc = this.editor.model.document;\n            const positionParent = doc.selection.getLastPosition().parent;\n            if (doc.selection.isCollapsed && positionParent.name == 'listItem' && positionParent.isEmpty) {\n                this.editor.execute('outdentList');\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: 'li'\n        });\n        // Overwrite default Backspace key behavior.\n        // If Backspace key is pressed with selection collapsed on first position in first list item, outdent it. #83\n        this.listenTo(viewDocument, 'delete', (evt, data)=>{\n            // Check conditions from those that require less computations like those immediately available.\n            if (data.direction !== 'backward') {\n                return;\n            }\n            const selection = this.editor.model.document.selection;\n            if (!selection.isCollapsed) {\n                return;\n            }\n            const firstPosition = selection.getFirstPosition();\n            if (!firstPosition.isAtStart) {\n                return;\n            }\n            const positionParent = firstPosition.parent;\n            if (positionParent.name !== 'listItem') {\n                return;\n            }\n            const previousIsAListItem = positionParent.previousSibling && positionParent.previousSibling.name === 'listItem';\n            if (previousIsAListItem) {\n                return;\n            }\n            this.editor.execute('outdentList');\n            data.preventDefault();\n            evt.stop();\n        }, {\n            context: 'li'\n        });\n        this.listenTo(editor.editing.view.document, 'tab', (evt, data)=>{\n            const commandName = data.shiftKey ? 'outdentList' : 'indentList';\n            const command = this.editor.commands.get(commandName);\n            if (command.isEnabled) {\n                editor.execute(commandName);\n                data.stopPropagation();\n                data.preventDefault();\n                evt.stop();\n            }\n        }, {\n            context: 'li'\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const commands = this.editor.commands;\n        const indent = commands.get('indent');\n        const outdent = commands.get('outdent');\n        if (indent) {\n            indent.registerChildCommand(commands.get('indentList'));\n        }\n        if (outdent) {\n            outdent.registerChildCommand(commands.get('outdentList'));\n        }\n    }\n}\nfunction getViewListItemLength(element) {\n    let length = 1;\n    for (const child of element.getChildren()){\n        if (child.name == 'ul' || child.name == 'ol') {\n            for (const item of child.getChildren()){\n                length += getViewListItemLength(item);\n            }\n        }\n    }\n    return length;\n}\n\n/**\n * The legacy list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/legacylist/legacylistediting~LegacyListEditing legacy list editing feature}\n * and {@link module:list/list/listui~ListUI list UI feature}.\n */ class LegacyList extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LegacyListEditing,\n            ListUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LegacyList';\n    }\n}\n\n/**\n * The list style command. It changes the `listStyle` attribute of the selected list items.\n *\n * If the list type (numbered or bulleted) can be inferred from the passed style type,\n * the command tries to convert selected items to a list of that type.\n * It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n */ class LegacyListStyleCommand extends Command {\n    /**\n\t * The default type of the list style.\n\t */ defaultType;\n    /**\n\t * Creates an instance of the command.\n\t *\n\t * @param editor The editor instance.\n\t * @param defaultType The list type that will be used by default if the value was not specified during\n\t * the command execution.\n\t */ constructor(editor, defaultType){\n        super(editor);\n        this.defaultType = defaultType;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        this.value = this._getValue();\n        this.isEnabled = this._checkEnabled();\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.type The type of the list style, e.g. `'disc'` or `'square'`. If `null` is specified, the default\n\t * style will be applied.\n\t */ execute(options = {}) {\n        this._tryToConvertItemsToList(options);\n        const model = this.editor.model;\n        const listItems = getSelectedListItems(model);\n        if (!listItems.length) {\n            return;\n        }\n        model.change((writer)=>{\n            for (const item of listItems){\n                writer.setAttribute('listStyle', options.type || this.defaultType, item);\n            }\n        });\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */ _getValue() {\n        const listItem = this.editor.model.document.selection.getFirstPosition().parent;\n        if (listItem && listItem.is('element', 'listItem')) {\n            return listItem.getAttribute('listStyle');\n        }\n        return null;\n    }\n    /**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */ _checkEnabled() {\n        const editor = this.editor;\n        const numberedList = editor.commands.get('numberedList');\n        const bulletedList = editor.commands.get('bulletedList');\n        return numberedList.isEnabled || bulletedList.isEnabled;\n    }\n    /**\n\t * Checks if the provided list style is valid. Also changes the selection to a list if it's not set yet.\n\t *\n\t * @param The type of the list style. If `null` is specified, the function does nothing.\n\t*/ _tryToConvertItemsToList(options) {\n        if (!options.type) {\n            return;\n        }\n        const listType = getListTypeFromListStyleType(options.type);\n        /* istanbul ignore next -- @preserve */ if (!listType) {\n            return;\n        }\n        const editor = this.editor;\n        const commandName = `${listType}List`;\n        const command = editor.commands.get(commandName);\n        if (!command.value) {\n            editor.execute(commandName);\n        }\n    }\n}\n\n/**\n * The reversed list command. It changes the `listReversed` attribute of the selected list items. As a result, the list order will be\n * reversed.\n * It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n */ class LegacyListReversedCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const value = this._getValue();\n        this.value = value;\n        this.isEnabled = value != null;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.reversed Whether the list should be reversed.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const listItems = getSelectedListItems(model).filter((item)=>item.getAttribute('listType') == 'numbered');\n        model.change((writer)=>{\n            for (const item of listItems){\n                writer.setAttribute('listReversed', !!options.reversed, item);\n            }\n        });\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */ _getValue() {\n        const listItem = this.editor.model.document.selection.getFirstPosition().parent;\n        if (listItem && listItem.is('element', 'listItem') && listItem.getAttribute('listType') == 'numbered') {\n            return listItem.getAttribute('listReversed');\n        }\n        return null;\n    }\n}\n\n/**\n * The list start index command. It changes the `listStart` attribute of the selected list items.\n * It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.\n */ class LegacyListStartCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const value = this._getValue();\n        this.value = value;\n        this.isEnabled = value != null;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.startIndex The list start index.\n\t */ execute({ startIndex = 1 } = {}) {\n        const model = this.editor.model;\n        const listItems = getSelectedListItems(model).filter((item)=>item.getAttribute('listType') == 'numbered');\n        model.change((writer)=>{\n            for (const item of listItems){\n                writer.setAttribute('listStart', startIndex >= 0 ? startIndex : 1, item);\n            }\n        });\n    }\n    /**\n\t * Checks the command's {@link #value}.\n\t *\n\t * @returns The current value.\n\t */ _getValue() {\n        const listItem = this.editor.model.document.selection.getFirstPosition().parent;\n        if (listItem && listItem.is('element', 'listItem') && listItem.getAttribute('listType') == 'numbered') {\n            return listItem.getAttribute('listStart');\n        }\n        return null;\n    }\n}\n\nconst DEFAULT_LIST_TYPE = 'default';\n/**\n * The engine of the list properties feature.\n *\n * It sets the value for the `listItem` attribute of the {@link module:list/legacylist~LegacyList `<listItem>`} element that\n * allows modifying the list style type.\n *\n * It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.\n * Read more in {@link module:list/listconfig~ListPropertiesConfig}.\n */ class LegacyListPropertiesEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LegacyListEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LegacyListPropertiesEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('list', {\n            properties: {\n                styles: true,\n                startIndex: false,\n                reversed: false\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const enabledProperties = editor.config.get('list.properties');\n        const strategies = createAttributeStrategies(enabledProperties);\n        // Extend schema.\n        model.schema.extend('listItem', {\n            allowAttributes: strategies.map((s)=>s.attributeName)\n        });\n        for (const strategy of strategies){\n            strategy.addCommand(editor);\n        }\n        // Fix list attributes when modifying their nesting levels (the `listIndent` attribute).\n        this.listenTo(editor.commands.get('indentList'), '_executeCleanup', fixListAfterIndentListCommand(editor, strategies));\n        this.listenTo(editor.commands.get('outdentList'), '_executeCleanup', fixListAfterOutdentListCommand(editor, strategies));\n        this.listenTo(editor.commands.get('bulletedList'), '_executeCleanup', restoreDefaultListStyle(editor));\n        this.listenTo(editor.commands.get('numberedList'), '_executeCleanup', restoreDefaultListStyle(editor));\n        // Register a post-fixer that ensures that the attributes is specified in each `listItem` element.\n        model.document.registerPostFixer(fixListAttributesOnListItemElements(editor, strategies));\n        // Set up conversion.\n        editor.conversion.for('upcast').add(upcastListItemAttributes(strategies));\n        editor.conversion.for('downcast').add(downcastListItemAttributes(strategies));\n        // Handle merging two separated lists into the single one.\n        this._mergeListAttributesWhileMergingLists(strategies);\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const editor = this.editor;\n        // Enable post-fixer that removes the attributes from to-do list items only if the \"TodoList\" plugin is on.\n        // We need to registry the hook here since the `TodoList` plugin can be added after the `ListPropertiesEditing`.\n        if (editor.commands.get('todoList')) {\n            editor.model.document.registerPostFixer(removeListItemAttributesFromTodoList(editor));\n        }\n    }\n    /**\n\t * Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether two lists will be merged into a single\n\t * one after deleting the content.\n\t *\n\t * The purpose of this action is to adjust the `listStyle`, `listReversed` and `listStart` values\n\t * for the list that was merged.\n\t *\n\t * Consider the following model's content:\n\t *\n\t * ```xml\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t * <paragraph>[A paragraph.]</paragraph>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 2</listItem>\n\t * ```\n\t *\n\t * After removing the paragraph element, the second list will be merged into the first one.\n\t * We want to inherit the `listStyle` attribute for the second list from the first one.\n\t *\n\t * ```xml\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n\t * <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n\t * ```\n\t *\n\t * See https://github.com/ckeditor/ckeditor5/issues/7879.\n\t *\n\t * @param attributeStrategies Strategies for the enabled attributes.\n\t */ _mergeListAttributesWhileMergingLists(attributeStrategies) {\n        const editor = this.editor;\n        const model = editor.model;\n        // First the outer-most`listItem` in the first list reference.\n        // If found, the lists should be merged and this `listItem` provides the attributes\n        // and it is also a starting point when searching for items in the second list.\n        let firstMostOuterItem;\n        // Check whether the removed content is between two lists.\n        this.listenTo(model, 'deleteContent', (evt, [selection])=>{\n            const firstPosition = selection.getFirstPosition();\n            const lastPosition = selection.getLastPosition();\n            // Typing or removing content in a single item. Aborting.\n            if (firstPosition.parent === lastPosition.parent) {\n                return;\n            }\n            // An element before the content that will be removed is not a list.\n            if (!firstPosition.parent.is('element', 'listItem')) {\n                return;\n            }\n            const nextSibling = lastPosition.parent.nextSibling;\n            // An element after the content that will be removed is not a list.\n            if (!nextSibling || !nextSibling.is('element', 'listItem')) {\n                return;\n            }\n            // Find the outermost list item based on the `listIndent` attribute. We can't assume that `listIndent=0`\n            // because the selection can be hooked in nested lists.\n            //\n            // <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n            // <listItem listIndent=\"1\" listType=\"bulleted\" listStyle=\"square\">UL List [item 1.1</listItem>\n            // <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">[]UL List item 1.</listItem>\n            // <listItem listIndent=\"1\" listType=\"bulleted\" listStyle=\"circle\">UL List ]item 1.1</listItem>\n            //\n            // After deleting the content, we would like to inherit the \"square\" attribute for the last element:\n            //\n            // <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n            // <listItem listIndent=\"1\" listType=\"bulleted\" listStyle=\"square\">UL List []item 1.1</listItem>\n            const mostOuterItemList = getSiblingListItem(firstPosition.parent, {\n                sameIndent: true,\n                listIndent: nextSibling.getAttribute('listIndent')\n            });\n            // The outermost list item may not exist while removing elements between lists with different value\n            // of the `listIndent` attribute. In such a case we don't want to update anything. See: #8073.\n            if (!mostOuterItemList) {\n                return;\n            }\n            if (mostOuterItemList.getAttribute('listType') === nextSibling.getAttribute('listType')) {\n                firstMostOuterItem = mostOuterItemList;\n            }\n        }, {\n            priority: 'high'\n        });\n        // If so, update the `listStyle` attribute for the second list.\n        this.listenTo(model, 'deleteContent', ()=>{\n            if (!firstMostOuterItem) {\n                return;\n            }\n            model.change((writer)=>{\n                // Find the first most-outer item list in the merged list.\n                // A case when the first list item in the second list was merged into the last item in the first list.\n                //\n                // <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 1</listItem>\n                // <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"square\">UL List item 2</listItem>\n                // <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">[]UL List item 1</listItem>\n                // <listItem listIndent=\"0\" listType=\"bulleted\" listStyle=\"circle\">UL List item 2</listItem>\n                const secondListMostOuterItem = getSiblingListItem(firstMostOuterItem.nextSibling, {\n                    sameIndent: true,\n                    listIndent: firstMostOuterItem.getAttribute('listIndent'),\n                    direction: 'forward'\n                });\n                // If the selection ends in a non-list element, there are no <listItem>s that would require adjustments.\n                // See: #8642.\n                if (!secondListMostOuterItem) {\n                    firstMostOuterItem = null;\n                    return;\n                }\n                const items = [\n                    secondListMostOuterItem,\n                    ...getSiblingNodes(writer.createPositionAt(secondListMostOuterItem, 0), 'forward')\n                ];\n                for (const listItem of items){\n                    for (const strategy of attributeStrategies){\n                        if (strategy.appliesToListItem(listItem)) {\n                            const attributeName = strategy.attributeName;\n                            const value = firstMostOuterItem.getAttribute(attributeName);\n                            writer.setAttribute(attributeName, value, listItem);\n                        }\n                    }\n                }\n            });\n            firstMostOuterItem = null;\n        }, {\n            priority: 'low'\n        });\n    }\n}\n/**\n * Creates an array of strategies for dealing with enabled listItem attributes.\n */ function createAttributeStrategies(enabledProperties) {\n    const strategies = [];\n    if (enabledProperties.styles) {\n        strategies.push({\n            attributeName: 'listStyle',\n            defaultValue: DEFAULT_LIST_TYPE,\n            addCommand (editor) {\n                editor.commands.add('listStyle', new LegacyListStyleCommand(editor, DEFAULT_LIST_TYPE));\n            },\n            appliesToListItem () {\n                return true;\n            },\n            setAttributeOnDowncast (writer, listStyle, element) {\n                if (listStyle && listStyle !== DEFAULT_LIST_TYPE) {\n                    writer.setStyle('list-style-type', listStyle, element);\n                } else {\n                    writer.removeStyle('list-style-type', element);\n                }\n            },\n            getAttributeOnUpcast (listParent) {\n                return listParent.getStyle('list-style-type') || DEFAULT_LIST_TYPE;\n            }\n        });\n    }\n    if (enabledProperties.reversed) {\n        strategies.push({\n            attributeName: 'listReversed',\n            defaultValue: false,\n            addCommand (editor) {\n                editor.commands.add('listReversed', new LegacyListReversedCommand(editor));\n            },\n            appliesToListItem (item) {\n                return item.getAttribute('listType') == 'numbered';\n            },\n            setAttributeOnDowncast (writer, listReversed, element) {\n                if (listReversed) {\n                    writer.setAttribute('reversed', 'reversed', element);\n                } else {\n                    writer.removeAttribute('reversed', element);\n                }\n            },\n            getAttributeOnUpcast (listParent) {\n                return listParent.hasAttribute('reversed');\n            }\n        });\n    }\n    if (enabledProperties.startIndex) {\n        strategies.push({\n            attributeName: 'listStart',\n            defaultValue: 1,\n            addCommand (editor) {\n                editor.commands.add('listStart', new LegacyListStartCommand(editor));\n            },\n            appliesToListItem (item) {\n                return item.getAttribute('listType') == 'numbered';\n            },\n            setAttributeOnDowncast (writer, listStart, element) {\n                if (listStart == 0 || listStart > 1) {\n                    writer.setAttribute('start', listStart, element);\n                } else {\n                    writer.removeAttribute('start', element);\n                }\n            },\n            getAttributeOnUpcast (listParent) {\n                const startAttributeValue = listParent.getAttribute('start');\n                return startAttributeValue >= 0 ? startAttributeValue : 1;\n            }\n        });\n    }\n    return strategies;\n}\n/**\n * Returns a converter consumes the `style`, `reversed` and `start` attribute.\n * In `style` it searches for the `list-style-type` definition.\n * If not found, the `\"default\"` value will be used.\n */ function upcastListItemAttributes(attributeStrategies) {\n    return (dispatcher)=>{\n        dispatcher.on('element:li', (evt, data, conversionApi)=>{\n            // https://github.com/ckeditor/ckeditor5/issues/13858\n            if (!data.modelRange) {\n                return;\n            }\n            const listParent = data.viewItem.parent;\n            const listItem = data.modelRange.start.nodeAfter || data.modelRange.end.nodeBefore;\n            for (const strategy of attributeStrategies){\n                if (strategy.appliesToListItem(listItem)) {\n                    const listStyle = strategy.getAttributeOnUpcast(listParent);\n                    conversionApi.writer.setAttribute(strategy.attributeName, listStyle, listItem);\n                }\n            }\n        }, {\n            priority: 'low'\n        });\n    };\n}\n/**\n * Returns a converter that adds `reversed`, `start` attributes and adds `list-style-type` definition as a value for the `style` attribute.\n * The `\"default\"` values are removed and not present in the view/data.\n */ function downcastListItemAttributes(attributeStrategies) {\n    return (dispatcher)=>{\n        for (const strategy of attributeStrategies){\n            dispatcher.on(`attribute:${strategy.attributeName}:listItem`, (evt, data, conversionApi)=>{\n                const viewWriter = conversionApi.writer;\n                const currentElement = data.item;\n                const previousElement = getSiblingListItem(currentElement.previousSibling, {\n                    sameIndent: true,\n                    listIndent: currentElement.getAttribute('listIndent'),\n                    direction: 'backward'\n                });\n                const viewItem = conversionApi.mapper.toViewElement(currentElement);\n                // A case when elements represent different lists. We need to separate their container.\n                if (!areRepresentingSameList(currentElement, previousElement)) {\n                    viewWriter.breakContainer(viewWriter.createPositionBefore(viewItem));\n                }\n                strategy.setAttributeOnDowncast(viewWriter, data.attributeNewValue, viewItem.parent);\n            }, {\n                priority: 'low'\n            });\n        }\n    };\n    /**\n\t * Checks whether specified list items belong to the same list.\n\t */ function areRepresentingSameList(listItem1, listItem2) {\n        return listItem2 && listItem1.getAttribute('listType') === listItem2.getAttribute('listType') && listItem1.getAttribute('listIndent') === listItem2.getAttribute('listIndent') && listItem1.getAttribute('listStyle') === listItem2.getAttribute('listStyle') && listItem1.getAttribute('listReversed') === listItem2.getAttribute('listReversed') && listItem1.getAttribute('listStart') === listItem2.getAttribute('listStart');\n    }\n}\n/**\n * When indenting list, nested list should clear its value for the attributes or inherit from nested lists.\n *\n * ■ List item 1.\n * ■ List item 2.[]\n * ■ List item 3.\n * editor.execute( 'indentList' );\n *\n * ■ List item 1.\n *     ○ List item 2.[]\n * ■ List item 3.\n */ function fixListAfterIndentListCommand(editor, attributeStrategies) {\n    return (evt, changedItems)=>{\n        const root = changedItems[0];\n        const rootIndent = root.getAttribute('listIndent');\n        const itemsToUpdate = changedItems.filter((item)=>item.getAttribute('listIndent') === rootIndent);\n        // A case where a few list items are indented must be checked separately\n        // since `getSiblingListItem()` returns the first changed element.\n        // ■ List item 1.\n        //     ○ [List item 2.\n        //     ○ List item 3.]\n        // ■ List item 4.\n        //\n        // List items: `2` and `3` should be adjusted.\n        let previousSibling = null;\n        if (root.previousSibling.getAttribute('listIndent') + 1 !== rootIndent) {\n            previousSibling = getSiblingListItem(root.previousSibling, {\n                sameIndent: true,\n                direction: 'backward',\n                listIndent: rootIndent\n            });\n        }\n        editor.model.change((writer)=>{\n            for (const item of itemsToUpdate){\n                for (const strategy of attributeStrategies){\n                    if (strategy.appliesToListItem(item)) {\n                        const valueToSet = previousSibling == null ? strategy.defaultValue : previousSibling.getAttribute(strategy.attributeName);\n                        writer.setAttribute(strategy.attributeName, valueToSet, item);\n                    }\n                }\n            }\n        });\n    };\n}\n/**\n * When outdenting a list, a nested list should copy attribute values\n * from the previous sibling list item including the same value for the `listIndent` value.\n *\n * ■ List item 1.\n *     ○ List item 2.[]\n * ■ List item 3.\n *\n * editor.execute( 'outdentList' );\n *\n * ■ List item 1.\n * ■ List item 2.[]\n * ■ List item 3.\n */ function fixListAfterOutdentListCommand(editor, attributeStrategies) {\n    return (evt, changedItems)=>{\n        changedItems = changedItems.reverse().filter((item)=>item.is('element', 'listItem'));\n        if (!changedItems.length) {\n            return;\n        }\n        const indent = changedItems[0].getAttribute('listIndent');\n        const listType = changedItems[0].getAttribute('listType');\n        let listItem = changedItems[0].previousSibling;\n        // ■ List item 1.\n        //     ○ List item 2.\n        //     ○ List item 3.[]\n        // ■ List item 4.\n        //\n        // After outdenting a list, `List item 3` should inherit the `listStyle` attribute from `List item 1`.\n        //\n        // ■ List item 1.\n        //     ○ List item 2.\n        // ■ List item 3.[]\n        // ■ List item 4.\n        if (listItem.is('element', 'listItem')) {\n            while(listItem.getAttribute('listIndent') !== indent){\n                listItem = listItem.previousSibling;\n            }\n        } else {\n            listItem = null;\n        }\n        // Outdenting such a list should restore values based on `List item 4`.\n        // ■ List item 1.[]\n        //     ○ List item 2.\n        //     ○ List item 3.\n        // ■ List item 4.\n        if (!listItem) {\n            listItem = changedItems[changedItems.length - 1].nextSibling;\n        }\n        // And such a list should not modify anything.\n        // However, `listItem` can indicate a node below the list. Be sure that we have the `listItem` element.\n        // ■ List item 1.[]\n        //     ○ List item 2.\n        //     ○ List item 3.\n        // <paragraph>The later if check.</paragraph>\n        if (!listItem || !listItem.is('element', 'listItem')) {\n            return;\n        }\n        // Do not modify the list if found `listItem` represents other type of list than outdented list items.\n        if (listItem.getAttribute('listType') !== listType) {\n            return;\n        }\n        editor.model.change((writer)=>{\n            const itemsToUpdate = changedItems.filter((item)=>item.getAttribute('listIndent') === indent);\n            for (const item of itemsToUpdate){\n                for (const strategy of attributeStrategies){\n                    if (strategy.appliesToListItem(item)) {\n                        const attributeName = strategy.attributeName;\n                        const valueToSet = listItem.getAttribute(attributeName);\n                        writer.setAttribute(attributeName, valueToSet, item);\n                    }\n                }\n            }\n        });\n    };\n}\n/**\n * Each `listItem` element must have specified the `listStyle`, `listReversed` and `listStart` attributes\n * if they are enabled and supported by its `listType`.\n * This post-fixer checks whether inserted elements `listItem` elements should inherit the attribute values from\n * their sibling nodes or should use the default values.\n *\n * Paragraph[]\n * ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2. // ...\n * ■ List item 3. // ...\n *\n * editor.execute( 'bulletedList' )\n *\n * ■ Paragraph[]  // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2.\n * ■ List item 3.\n *\n * It also covers a such change:\n *\n * [Paragraph 1\n * Paragraph 2]\n * ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2. // ...\n * ■ List item 3. // ...\n *\n * editor.execute( 'numberedList' )\n *\n * 1. [Paragraph 1 // [listStyle=\"default\", listType=\"numbered\"]\n * 2. Paragraph 2] // [listStyle=\"default\", listType=\"numbered\"]\n * ■ List item 1.  // [listStyle=\"square\", listType=\"bulleted\"]\n * ■ List item 2.  // ...\n * ■ List item 3.  // ...\n */ function fixListAttributesOnListItemElements(editor, attributeStrategies) {\n    return (writer)=>{\n        let wasFixed = false;\n        const insertedListItems = getChangedListItems(editor.model.document.differ.getChanges()).filter((item)=>{\n            // Don't touch todo lists. They are handled in another post-fixer.\n            return item.getAttribute('listType') !== 'todo';\n        });\n        if (!insertedListItems.length) {\n            return wasFixed;\n        }\n        // Check whether the last inserted element is next to the `listItem` element.\n        //\n        // ■ Paragraph[]  // <-- The inserted item.\n        // ■ List item 1.\n        let existingListItem = insertedListItems[insertedListItems.length - 1].nextSibling;\n        // If it doesn't, maybe the `listItem` was inserted at the end of the list.\n        //\n        // ■ List item 1.\n        // ■ Paragraph[]  // <-- The inserted item.\n        if (!existingListItem || !existingListItem.is('element', 'listItem')) {\n            existingListItem = insertedListItems[0].previousSibling;\n            if (existingListItem) {\n                const indent = insertedListItems[0].getAttribute('listIndent');\n                // But we need to find a `listItem` with the `listIndent=0` attribute.\n                // If doesn't, maybe the `listItem` was inserted at the end of the list.\n                //\n                // ■ List item 1.\n                //     ○ List item 2.\n                // ■ Paragraph[]  // <-- The inserted item.\n                while(existingListItem.is('element', 'listItem') && existingListItem.getAttribute('listIndent') !== indent){\n                    existingListItem = existingListItem.previousSibling;\n                    // If the item does not exist, most probably there is no other content in the editor. See: #8072.\n                    if (!existingListItem) {\n                        break;\n                    }\n                }\n            }\n        }\n        for (const strategy of attributeStrategies){\n            const attributeName = strategy.attributeName;\n            for (const item of insertedListItems){\n                if (!strategy.appliesToListItem(item)) {\n                    writer.removeAttribute(attributeName, item);\n                    continue;\n                }\n                if (!item.hasAttribute(attributeName)) {\n                    if (shouldInheritListType(existingListItem, item, strategy)) {\n                        writer.setAttribute(attributeName, existingListItem.getAttribute(attributeName), item);\n                    } else {\n                        writer.setAttribute(attributeName, strategy.defaultValue, item);\n                    }\n                    wasFixed = true;\n                } else {\n                    // Adjust the `listStyle`, `listReversed` and `listStart`\n                    // attributes for inserted (pasted) items. See #8160.\n                    //\n                    // ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n                    //     ○ List item 1.1. // [listStyle=\"circle\", listType=\"bulleted\"]\n                    //     ○ [] (selection is here)\n                    //\n                    // Then, pasting a list with different attributes (listStyle, listType):\n                    //\n                    // 1. First. // [listStyle=\"decimal\", listType=\"numbered\"]\n                    // 2. Second // [listStyle=\"decimal\", listType=\"numbered\"]\n                    //\n                    // The `listType` attribute will be corrected by the `ListEditing` converters.\n                    // We need to adjust the `listStyle` attribute. Expected structure:\n                    //\n                    // ■ List item 1. // [listStyle=\"square\", listType=\"bulleted\"]\n                    //     ○ List item 1.1. // [listStyle=\"circle\", listType=\"bulleted\"]\n                    //     ○ First. // [listStyle=\"circle\", listType=\"bulleted\"]\n                    //     ○ Second // [listStyle=\"circle\", listType=\"bulleted\"]\n                    const previousSibling = item.previousSibling;\n                    if (shouldInheritListTypeFromPreviousItem(previousSibling, item, strategy.attributeName)) {\n                        writer.setAttribute(attributeName, previousSibling.getAttribute(attributeName), item);\n                        wasFixed = true;\n                    }\n                }\n            }\n        }\n        return wasFixed;\n    };\n}\n/**\n * Checks whether the `listStyle`, `listReversed` and `listStart` attributes\n * should be copied from the `baseItem` element.\n *\n * The attribute should be copied if the inserted element does not have defined it and\n * the value for the element is other than default in the base element.\n */ function shouldInheritListType(baseItem, itemToChange, attributeStrategy) {\n    if (!baseItem) {\n        return false;\n    }\n    const baseListAttribute = baseItem.getAttribute(attributeStrategy.attributeName);\n    if (!baseListAttribute) {\n        return false;\n    }\n    if (baseListAttribute == attributeStrategy.defaultValue) {\n        return false;\n    }\n    if (baseItem.getAttribute('listType') !== itemToChange.getAttribute('listType')) {\n        return false;\n    }\n    return true;\n}\n/**\n * Checks whether the `listStyle`, `listReversed` and `listStart` attributes\n * should be copied from previous list item.\n *\n * The attribute should be copied if there's a mismatch of styles of the pasted list into a nested list.\n * Top-level lists are not normalized as we allow side-by-side list of different types.\n */ function shouldInheritListTypeFromPreviousItem(previousItem, itemToChange, attributeName) {\n    if (!previousItem || !previousItem.is('element', 'listItem')) {\n        return false;\n    }\n    if (itemToChange.getAttribute('listType') !== previousItem.getAttribute('listType')) {\n        return false;\n    }\n    const previousItemIndent = previousItem.getAttribute('listIndent');\n    if (previousItemIndent < 1 || previousItemIndent !== itemToChange.getAttribute('listIndent')) {\n        return false;\n    }\n    const previousItemListAttribute = previousItem.getAttribute(attributeName);\n    if (!previousItemListAttribute || previousItemListAttribute === itemToChange.getAttribute(attributeName)) {\n        return false;\n    }\n    return true;\n}\n/**\n * Removes the `listStyle`, `listReversed` and `listStart` attributes from \"todo\" list items.\n */ function removeListItemAttributesFromTodoList(editor) {\n    return (writer)=>{\n        const todoListItems = getChangedListItems(editor.model.document.differ.getChanges()).filter((item)=>{\n            // Handle the todo lists only. The rest is handled in another post-fixer.\n            return item.getAttribute('listType') === 'todo' && (item.hasAttribute('listStyle') || item.hasAttribute('listReversed') || item.hasAttribute('listStart'));\n        });\n        if (!todoListItems.length) {\n            return false;\n        }\n        for (const item of todoListItems){\n            writer.removeAttribute('listStyle', item);\n            writer.removeAttribute('listReversed', item);\n            writer.removeAttribute('listStart', item);\n        }\n        return true;\n    };\n}\n/**\n * Restores the `listStyle` attribute after changing the list type.\n */ function restoreDefaultListStyle(editor) {\n    return (evt, changedItems)=>{\n        changedItems = changedItems.filter((item)=>item.is('element', 'listItem'));\n        editor.model.change((writer)=>{\n            for (const item of changedItems){\n                // Remove the attribute. Post-fixer will restore the proper value.\n                writer.removeAttribute('listStyle', item);\n            }\n        });\n    };\n}\n/**\n * Returns the `listItem` that was inserted or changed.\n *\n * @param changes The changes list returned by the differ.\n */ function getChangedListItems(changes) {\n    const items = [];\n    for (const change of changes){\n        const item = getItemFromChange(change);\n        if (item && item.is('element', 'listItem')) {\n            items.push(item);\n        }\n    }\n    return items;\n}\nfunction getItemFromChange(change) {\n    if (change.type === 'attribute') {\n        return change.range.start.nodeAfter;\n    }\n    if (change.type === 'insert') {\n        return change.position.nodeAfter;\n    }\n    return null;\n}\n\n/**\n * The legacy list properties feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/legacylistproperties/legacylistpropertiesediting~LegacyListPropertiesEditing\n * legacy list properties editing feature} and the\n * {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.\n */ class LegacyListProperties extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LegacyListPropertiesEditing,\n            ListPropertiesUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LegacyListProperties';\n    }\n}\n\nconst attributeKey = 'todoListChecked';\n/**\n * The check to-do command.\n *\n * The command is registered by the {@link module:list/legacytodolist/legacytodolistediting~LegacyTodoListEditing} as\n * the `checkTodoList` editor command and it is also available via aliased `todoListCheck` name.\n */ class LegacyCheckTodoListCommand extends Command {\n    /**\n\t * A list of to-do list items selected by the {@link module:engine/model/selection~Selection}.\n\t *\n\t * @internal\n\t */ _selectedElements;\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._selectedElements = [];\n        // Refresh command before executing to be sure all values are up to date.\n        // It is needed when selection has changed before command execution, in the same change block.\n        this.on('execute', ()=>{\n            this.refresh();\n        }, {\n            priority: 'highest'\n        });\n    }\n    /**\n\t * Updates the command's {@link #value} and {@link #isEnabled} properties based on the current selection.\n\t */ refresh() {\n        this._selectedElements = this._getSelectedItems();\n        this.value = this._selectedElements.every((element)=>!!element.getAttribute(attributeKey));\n        this.isEnabled = !!this._selectedElements.length;\n    }\n    /**\n\t * Gets all to-do list items selected by the {@link module:engine/model/selection~Selection}.\n\t */ _getSelectedItems() {\n        const model = this.editor.model;\n        const schema = model.schema;\n        const selectionRange = model.document.selection.getFirstRange();\n        const startElement = selectionRange.start.parent;\n        const elements = [];\n        if (schema.checkAttribute(startElement, attributeKey)) {\n            elements.push(startElement);\n        }\n        for (const item of selectionRange.getItems()){\n            if (schema.checkAttribute(item, attributeKey) && !elements.includes(item)) {\n                elements.push(item);\n            }\n        }\n        return elements;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply\n\t * the attribute. Otherwise, the command will remove the attribute. If not set, the command will look for its current\n\t * value to decide what it should do.\n\t */ execute(options = {}) {\n        this.editor.model.change((writer)=>{\n            for (const element of this._selectedElements){\n                const value = options.forceValue === undefined ? !this.value : options.forceValue;\n                if (value) {\n                    writer.setAttribute(attributeKey, true, element);\n                } else {\n                    writer.removeAttribute(attributeKey, element);\n                }\n            }\n        });\n    }\n}\n\n/**\n * A model-to-view converter for the `listItem` model element insertion.\n *\n * It converts the `listItem` model element to an unordered list with a {@link module:engine/view/uielement~UIElement checkbox element}\n * at the beginning of each list item. It also merges the list with surrounding lists (if available).\n *\n * It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n * @param model Model instance.\n * @param onCheckboxChecked Callback function.\n * @returns Returns a conversion callback.\n */ function modelViewInsertion(model, onCheckboxChecked) {\n    return (evt, data, conversionApi)=>{\n        const consumable = conversionApi.consumable;\n        if (!consumable.test(data.item, 'insert') || !consumable.test(data.item, 'attribute:listType') || !consumable.test(data.item, 'attribute:listIndent')) {\n            return;\n        }\n        if (data.item.getAttribute('listType') != 'todo') {\n            return;\n        }\n        const modelItem = data.item;\n        consumable.consume(modelItem, 'insert');\n        consumable.consume(modelItem, 'attribute:listType');\n        consumable.consume(modelItem, 'attribute:listIndent');\n        consumable.consume(modelItem, 'attribute:todoListChecked');\n        const viewWriter = conversionApi.writer;\n        const viewItem = generateLiInUl(modelItem, conversionApi);\n        const isChecked = !!modelItem.getAttribute('todoListChecked');\n        const checkmarkElement = createCheckmarkElement(modelItem, viewWriter, isChecked, onCheckboxChecked);\n        const span = viewWriter.createContainerElement('span', {\n            class: 'todo-list__label__description'\n        });\n        viewWriter.addClass('todo-list', viewItem.parent);\n        viewWriter.insert(viewWriter.createPositionAt(viewItem, 0), checkmarkElement);\n        viewWriter.insert(viewWriter.createPositionAfter(checkmarkElement), span);\n        injectViewList(modelItem, viewItem, conversionApi, model);\n    };\n}\n/**\n * A model-to-view converter for the `listItem` model element insertion.\n *\n * It is used by {@link module:engine/controller/datacontroller~DataController}.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert\n * @param model Model instance.\n * @returns Returns a conversion callback.\n */ function dataModelViewInsertion(model) {\n    return (evt, data, conversionApi)=>{\n        const consumable = conversionApi.consumable;\n        if (!consumable.test(data.item, 'insert') || !consumable.test(data.item, 'attribute:listType') || !consumable.test(data.item, 'attribute:listIndent')) {\n            return;\n        }\n        if (data.item.getAttribute('listType') != 'todo') {\n            return;\n        }\n        const modelItem = data.item;\n        consumable.consume(modelItem, 'insert');\n        consumable.consume(modelItem, 'attribute:listType');\n        consumable.consume(modelItem, 'attribute:listIndent');\n        consumable.consume(modelItem, 'attribute:todoListChecked');\n        const viewWriter = conversionApi.writer;\n        const viewItem = generateLiInUl(modelItem, conversionApi);\n        viewWriter.addClass('todo-list', viewItem.parent);\n        const label = viewWriter.createContainerElement('label', {\n            class: 'todo-list__label'\n        });\n        const checkbox = viewWriter.createEmptyElement('input', {\n            type: 'checkbox',\n            disabled: 'disabled'\n        });\n        const span = viewWriter.createContainerElement('span', {\n            class: 'todo-list__label__description'\n        });\n        if (modelItem.getAttribute('todoListChecked')) {\n            viewWriter.setAttribute('checked', 'checked', checkbox);\n        }\n        viewWriter.insert(viewWriter.createPositionAt(viewItem, 0), label);\n        viewWriter.insert(viewWriter.createPositionAt(label, 0), checkbox);\n        viewWriter.insert(viewWriter.createPositionAfter(checkbox), span);\n        injectViewList(modelItem, viewItem, conversionApi, model);\n    };\n}\n/**\n * A view-to-model converter for the checkbox element inside a view list item.\n *\n * It changes the `listType` of the model `listItem` to a `todo` value.\n * When a view checkbox element is marked as checked, an additional `todoListChecked=\"true\"` attribute is added to the model item.\n *\n * It is used by {@link module:engine/controller/datacontroller~DataController}.\n *\n * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element\n */ const dataViewModelCheckmarkInsertion = (evt, data, conversionApi)=>{\n    const modelCursor = data.modelCursor;\n    const modelItem = modelCursor.parent;\n    const viewItem = data.viewItem;\n    if (viewItem.getAttribute('type') != 'checkbox' || modelItem.name != 'listItem' || !modelCursor.isAtStart) {\n        return;\n    }\n    if (!conversionApi.consumable.consume(viewItem, {\n        name: true\n    })) {\n        return;\n    }\n    const writer = conversionApi.writer;\n    writer.setAttribute('listType', 'todo', modelItem);\n    if (data.viewItem.hasAttribute('checked')) {\n        writer.setAttribute('todoListChecked', true, modelItem);\n    }\n    data.modelRange = writer.createRange(modelCursor);\n};\n/**\n * A model-to-view converter for the `listType` attribute change on the `listItem` model element.\n *\n * This change means that the `<li>` element parent changes to `<ul class=\"todo-list\">` and a\n * {@link module:engine/view/uielement~UIElement checkbox UI element} is added at the beginning\n * of the list item element (or vice versa).\n *\n * This converter is preceded by {@link module:list/legacylist/legacyconverters~modelViewChangeType} and followed by\n * {@link module:list/legacylist/legacyconverters~modelViewMergeAfterChangeType} to handle splitting and merging surrounding lists\n * of the same type.\n *\n * It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n * @param onCheckedChange Callback fired after clicking the checkbox UI element.\n * @param view Editing view controller.\n * @returns Returns a conversion callback.\n */ function modelViewChangeType(onCheckedChange, view) {\n    return (evt, data, conversionApi)=>{\n        if (!conversionApi.consumable.consume(data.item, evt.name)) {\n            return;\n        }\n        const viewItem = conversionApi.mapper.toViewElement(data.item);\n        const viewWriter = conversionApi.writer;\n        const labelElement = findLabel(viewItem, view);\n        if (data.attributeNewValue == 'todo') {\n            const isChecked = !!data.item.getAttribute('todoListChecked');\n            const checkmarkElement = createCheckmarkElement(data.item, viewWriter, isChecked, onCheckedChange);\n            const span = viewWriter.createContainerElement('span', {\n                class: 'todo-list__label__description'\n            });\n            const itemRange = viewWriter.createRangeIn(viewItem);\n            const nestedList = findNestedList(viewItem);\n            const descriptionStart = positionAfterUiElements(itemRange.start);\n            const descriptionEnd = nestedList ? viewWriter.createPositionBefore(nestedList) : itemRange.end;\n            const descriptionRange = viewWriter.createRange(descriptionStart, descriptionEnd);\n            viewWriter.addClass('todo-list', viewItem.parent);\n            viewWriter.move(descriptionRange, viewWriter.createPositionAt(span, 0));\n            viewWriter.insert(viewWriter.createPositionAt(viewItem, 0), checkmarkElement);\n            viewWriter.insert(viewWriter.createPositionAfter(checkmarkElement), span);\n        } else if (data.attributeOldValue == 'todo') {\n            const descriptionSpan = findDescription(viewItem, view);\n            viewWriter.removeClass('todo-list', viewItem.parent);\n            viewWriter.remove(labelElement);\n            viewWriter.move(viewWriter.createRangeIn(descriptionSpan), viewWriter.createPositionBefore(descriptionSpan));\n            viewWriter.remove(descriptionSpan);\n        }\n    };\n}\n/**\n * A model-to-view converter for the `todoListChecked` attribute change on the `listItem` model element.\n *\n * It marks the {@link module:engine/view/uielement~UIElement checkbox UI element} as checked.\n *\n * It is used by {@link module:engine/controller/editingcontroller~EditingController}.\n *\n * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute\n * @param onCheckedChange Callback fired after clicking the checkbox UI element.\n * @returns Returns a conversion callback.\n */ function modelViewChangeChecked(onCheckedChange) {\n    return (evt, data, conversionApi)=>{\n        // Do not convert `todoListChecked` attribute when to-do list item has changed to other list item.\n        // This attribute will be removed by the model post fixer.\n        if (data.item.getAttribute('listType') != 'todo') {\n            return;\n        }\n        if (!conversionApi.consumable.consume(data.item, 'attribute:todoListChecked')) {\n            return;\n        }\n        const { mapper, writer: viewWriter } = conversionApi;\n        const isChecked = !!data.item.getAttribute('todoListChecked');\n        const viewItem = mapper.toViewElement(data.item);\n        // Because of m -> v position mapper we can be sure checkbox is always at the beginning.\n        const oldCheckmarkElement = viewItem.getChild(0);\n        const newCheckmarkElement = createCheckmarkElement(data.item, viewWriter, isChecked, onCheckedChange);\n        viewWriter.insert(viewWriter.createPositionAfter(oldCheckmarkElement), newCheckmarkElement);\n        viewWriter.remove(oldCheckmarkElement);\n    };\n}\n/**\n * A model-to-view position at zero offset mapper.\n *\n * This helper ensures that position inside todo-list in the view is mapped after the checkbox.\n *\n * It only handles the position at the beginning of a list item as other positions are properly mapped be the default mapper.\n */ function mapModelToViewPosition(view) {\n    return (evt, data)=>{\n        const modelPosition = data.modelPosition;\n        const parent = modelPosition.parent;\n        if (!parent.is('element', 'listItem') || parent.getAttribute('listType') != 'todo') {\n            return;\n        }\n        const viewLi = data.mapper.toViewElement(parent);\n        const descSpan = findDescription(viewLi, view);\n        if (descSpan) {\n            data.viewPosition = data.mapper.findPositionIn(descSpan, modelPosition.offset);\n        }\n    };\n}\n/**\n * Creates a checkbox UI element.\n */ function createCheckmarkElement(modelItem, viewWriter, isChecked, onChange) {\n    const uiElement = viewWriter.createUIElement('label', {\n        class: 'todo-list__label',\n        contenteditable: false\n    }, function(domDocument) {\n        const checkbox = createElement(document, 'input', {\n            type: 'checkbox',\n            tabindex: '-1'\n        });\n        if (isChecked) {\n            checkbox.setAttribute('checked', 'checked');\n        }\n        checkbox.addEventListener('change', ()=>onChange(modelItem));\n        const domElement = this.toDomElement(domDocument);\n        domElement.appendChild(checkbox);\n        return domElement;\n    });\n    return uiElement;\n}\n// Helper method to find label element inside li.\nfunction findLabel(viewItem, view) {\n    const range = view.createRangeIn(viewItem);\n    for (const value of range){\n        if (value.item.is('uiElement', 'label')) {\n            return value.item;\n        }\n    }\n}\nfunction findDescription(viewItem, view) {\n    const range = view.createRangeIn(viewItem);\n    for (const value of range){\n        if (value.item.is('containerElement', 'span') && value.item.hasClass('todo-list__label__description')) {\n            return value.item;\n        }\n    }\n}\n\nconst ITEM_TOGGLE_KEYSTROKE = /* #__PURE__ */ parseKeystroke('Ctrl+Enter');\n/**\n * The engine of the to-do list feature. It handles creating, editing and removing to-do lists and their items.\n *\n * It registers the entire functionality of the {@link module:list/legacylist/legacylistediting~LegacyListEditing legacy list editing\n * plugin} and extends it with the commands:\n *\n * - `'todoList'`,\n * - `'checkTodoList'`,\n * - `'todoListCheck'` as an alias for `checkTodoList` command.\n */ class LegacyTodoListEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LegacyTodoListEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LegacyListEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const { editing, data, model } = editor;\n        // Extend schema.\n        model.schema.extend('listItem', {\n            allowAttributes: [\n                'todoListChecked'\n            ]\n        });\n        // Disallow todoListChecked attribute on other nodes than listItem with to-do listType.\n        model.schema.addAttributeCheck((context, attributeName)=>{\n            const item = context.last;\n            if (attributeName == 'todoListChecked' && item.name == 'listItem' && item.getAttribute('listType') != 'todo') {\n                return false;\n            }\n        });\n        // Register `todoList` command.\n        editor.commands.add('todoList', new LegacyListCommand(editor, 'todo'));\n        const checkTodoListCommand = new LegacyCheckTodoListCommand(editor);\n        // Register `checkTodoList` command and add `todoListCheck` command as an alias for backward compatibility.\n        editor.commands.add('checkTodoList', checkTodoListCommand);\n        editor.commands.add('todoListCheck', checkTodoListCommand);\n        // Define converters.\n        data.downcastDispatcher.on('insert:listItem', dataModelViewInsertion(model), {\n            priority: 'high'\n        });\n        data.upcastDispatcher.on('element:input', dataViewModelCheckmarkInsertion, {\n            priority: 'high'\n        });\n        editing.downcastDispatcher.on('insert:listItem', modelViewInsertion(model, (listItem)=>this._handleCheckmarkChange(listItem)), {\n            priority: 'high'\n        });\n        editing.downcastDispatcher.on('attribute:listType:listItem', modelViewChangeType((listItem)=>this._handleCheckmarkChange(listItem), editing.view));\n        editing.downcastDispatcher.on('attribute:todoListChecked:listItem', modelViewChangeChecked((listItem)=>this._handleCheckmarkChange(listItem)));\n        editing.mapper.on('modelToViewPosition', mapModelToViewPosition(editing.view));\n        data.mapper.on('modelToViewPosition', mapModelToViewPosition(editing.view));\n        // Jump at the end of the previous node on left arrow key press, when selection is after the checkbox.\n        //\n        // <blockquote><p>Foo</p></blockquote>\n        // <ul><li><checkbox/>{}Bar</li></ul>\n        //\n        // press: `<-`\n        //\n        // <blockquote><p>Foo{}</p></blockquote>\n        // <ul><li><checkbox/>Bar</li></ul>\n        //\n        this.listenTo(editing.view.document, 'arrowKey', jumpOverCheckmarkOnSideArrowKeyPress(model, editor.locale), {\n            context: 'li'\n        });\n        // Toggle check state of selected to-do list items on keystroke.\n        this.listenTo(editing.view.document, 'keydown', (evt, data)=>{\n            if (getCode(data) === ITEM_TOGGLE_KEYSTROKE) {\n                editor.execute('checkTodoList');\n                evt.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n        // Remove `todoListChecked` attribute when a host element is no longer a to-do list item.\n        const listItemsToFix = new Set();\n        this.listenTo(model, 'applyOperation', (evt, args)=>{\n            const operation = args[0];\n            if (operation.type == 'rename' && operation.oldName == 'listItem') {\n                const item = operation.position.nodeAfter;\n                if (item.hasAttribute('todoListChecked')) {\n                    listItemsToFix.add(item);\n                }\n            } else if (operation.type == 'changeAttribute' && operation.key == 'listType' && operation.oldValue === 'todo') {\n                for (const item of operation.range.getItems()){\n                    if (item.hasAttribute('todoListChecked') && item.getAttribute('listType') !== 'todo') {\n                        listItemsToFix.add(item);\n                    }\n                }\n            }\n        });\n        model.document.registerPostFixer((writer)=>{\n            let hasChanged = false;\n            for (const listItem of listItemsToFix){\n                writer.removeAttribute('todoListChecked', listItem);\n                hasChanged = true;\n            }\n            listItemsToFix.clear();\n            return hasChanged;\n        });\n        this._initAriaAnnouncements();\n    }\n    /**\n\t * Handles the checkbox element change, moves the selection to the corresponding model item to make it possible\n\t * to toggle the `todoListChecked` attribute using the command, and restores the selection position.\n\t *\n\t * Some say it's a hack :) Moving the selection only for executing the command on a certain node and restoring it after,\n\t * is not a clear solution. We need to design an API for using commands beyond the selection range.\n\t * See https://github.com/ckeditor/ckeditor5/issues/1954.\n\t */ _handleCheckmarkChange(listItem) {\n        const editor = this.editor;\n        const model = editor.model;\n        const previousSelectionRanges = Array.from(model.document.selection.getRanges());\n        model.change((writer)=>{\n            writer.setSelection(listItem, 'end');\n            editor.execute('checkTodoList');\n            writer.setSelection(previousSelectionRanges);\n        });\n    }\n    /**\n\t * Observe when user enters or leaves todo list and set proper aria value in global live announcer.\n\t * This allows screen readers to indicate when the user has entered and left the specified todo list.\n\t *\n\t * @internal\n\t */ _initAriaAnnouncements() {\n        const { model, ui, t } = this.editor;\n        let lastFocusedCodeBlock = null;\n        if (!ui) {\n            return;\n        }\n        model.document.selection.on('change:range', ()=>{\n            const focusParent = model.document.selection.focus.parent;\n            const lastElementIsTodoList = isLegacyTodoListItemElement(lastFocusedCodeBlock);\n            const currentElementIsTodoList = isLegacyTodoListItemElement(focusParent);\n            if (lastElementIsTodoList && !currentElementIsTodoList) {\n                ui.ariaLiveAnnouncer.announce(t('Leaving a to-do list'));\n            } else if (!lastElementIsTodoList && currentElementIsTodoList) {\n                ui.ariaLiveAnnouncer.announce(t('Entering a to-do list'));\n            }\n            lastFocusedCodeBlock = focusParent;\n        });\n    }\n}\n/**\n * Handles the left/right (LTR/RTL content) arrow key and moves the selection at the end of the previous block element\n * if the selection is just after the checkbox element. In other words, it jumps over the checkbox element when\n * moving the selection to the left/right (LTR/RTL).\n *\n * @returns Callback for 'keydown' events.\n */ function jumpOverCheckmarkOnSideArrowKeyPress(model, locale) {\n    return (eventInfo, domEventData)=>{\n        const direction = getLocalizedArrowKeyCodeDirection(domEventData.keyCode, locale.contentLanguageDirection);\n        if (direction != 'left') {\n            return;\n        }\n        const schema = model.schema;\n        const selection = model.document.selection;\n        if (!selection.isCollapsed) {\n            return;\n        }\n        const position = selection.getFirstPosition();\n        const parent = position.parent;\n        if (parent.name === 'listItem' && parent.getAttribute('listType') == 'todo' && position.isAtStart) {\n            const newRange = schema.getNearestSelectionRange(model.createPositionBefore(parent), 'backward');\n            if (newRange) {\n                model.change((writer)=>writer.setSelection(newRange));\n            }\n            domEventData.preventDefault();\n            domEventData.stopPropagation();\n            eventInfo.stop();\n        }\n    };\n}\n/**\n * Returns true if the given element is a list item model element of a to-do list.\n */ function isLegacyTodoListItemElement(element) {\n    return !!element && element.is('element', 'listItem') && element.getAttribute('listType') === 'todo';\n}\n\n/**\n * The legacy to-do list feature.\n *\n * This is a \"glue\" plugin that loads the {@link module:list/legacytodolist/legacytodolistediting~LegacyTodoListEditing legacy to-do list\n * editing feature} and the {@link module:list/todolist/todolistui~TodoListUI to-do list UI feature}.\n */ class LegacyTodoList extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            LegacyTodoListEditing,\n            TodoListUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'LegacyTodoList';\n    }\n}\n\nclass AdjacentListsSupport extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'AdjacentListsSupport';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        model.schema.register('listSeparator', {\n            allowWhere: '$block',\n            isBlock: true\n        });\n        editor.conversion.for('upcast')// Add a list separator element between similar list elements on upcast.\n        .add((dispatcher)=>{\n            dispatcher.on('element:ol', listSeparatorUpcastConverter());\n            dispatcher.on('element:ul', listSeparatorUpcastConverter());\n        })// View-to-model transformation.\n        .elementToElement({\n            model: 'listSeparator',\n            view: 'ck-list-separator'\n        });\n        // The list separator element should exist in the view, but should be invisible (hidden).\n        editor.conversion.for('editingDowncast').elementToElement({\n            model: 'listSeparator',\n            view: {\n                name: 'div',\n                classes: [\n                    'ck-list-separator',\n                    'ck-hidden'\n                ]\n            }\n        });\n        // The list separator element should not exist in the output data.\n        editor.conversion.for('dataDowncast').elementToElement({\n            model: 'listSeparator',\n            view: (modelElement, conversionApi)=>{\n                const viewElement = conversionApi.writer.createContainerElement('ck-list-separator');\n                conversionApi.writer.setCustomProperty('dataPipeline:transparentRendering', true, viewElement);\n                viewElement.getFillerOffset = ()=>null;\n                return viewElement;\n            }\n        });\n    }\n}\n/**\n * Inserts a list separator element between two lists of the same type (`ol` + `ol` or `ul` + `ul`).\n */ function listSeparatorUpcastConverter() {\n    return (evt, data, conversionApi)=>{\n        const element = data.viewItem;\n        const nextSibling = element.nextSibling;\n        if (!nextSibling) {\n            return;\n        }\n        if (element.name !== nextSibling.name) {\n            return;\n        }\n        if (!data.modelRange) {\n            Object.assign(data, conversionApi.convertChildren(data.viewItem, data.modelCursor));\n        }\n        const writer = conversionApi.writer;\n        const modelElement = writer.createElement('listSeparator');\n        // Try to insert a list separator element on the current model cursor position.\n        if (!conversionApi.safeInsert(modelElement, data.modelCursor)) {\n            return;\n        }\n        const parts = conversionApi.getSplitParts(modelElement);\n        // Extend the model range with the range of the created list separator element.\n        data.modelRange = writer.createRange(data.modelRange.start, writer.createPositionAfter(parts[parts.length - 1]));\n        conversionApi.updateConversionResult(modelElement, data);\n    };\n}\n\n/**\n * The document list feature.\n *\n * This is an obsolete plugin that exists for backward compatibility only.\n * Use the {@link module:list/list~List `List`} instead.\n *\n * @deprecated\n */ class DocumentList extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            List\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'DocumentList';\n    }\n    constructor(editor){\n        super(editor);\n        /**\n\t\t * The `DocumentList` plugin is obsolete. Use `List` instead.\n\t\t *\n\t\t * @error plugin-obsolete-documentlist\n\t\t */ logWarning('plugin-obsolete-documentlist', {\n            pluginName: 'DocumentList'\n        });\n    }\n}\n\n/**\n * The document list properties feature.\n *\n * This is an obsolete plugin that exists for backward compatibility only.\n * Use the {@link module:list/listproperties~ListProperties `ListProperties`} instead.\n *\n * @deprecated\n */ class DocumentListProperties extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ListProperties\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'DocumentListProperties';\n    }\n    constructor(editor){\n        super(editor);\n        /**\n\t\t * The `DocumentListProperties` plugin is obsolete. Use `ListProperties` instead.\n\t\t *\n\t\t * @error plugin-obsolete-documentlistproperties\n\t\t */ logWarning('plugin-obsolete-documentlistproperties', {\n            pluginName: 'DocumentListProperties'\n        });\n    }\n}\n\n/**\n * The to-do list feature.\n *\n * This is an obsolete plugin that exists for backward compatibility only.\n * Use the {@link module:list/todolist~TodoList `TodoList`} instead.\n *\n * @deprecated\n */ class TodoDocumentList extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TodoList\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TodoDocumentList';\n    }\n    constructor(editor){\n        super(editor);\n        /**\n\t\t * The `TodoDocumentList` plugin is obsolete. Use `TodoList` instead.\n\t\t *\n\t\t * @error plugin-obsolete-tododocumentlist\n\t\t */ logWarning('plugin-obsolete-tododocumentlist', {\n            pluginName: 'TodoDocumentList'\n        });\n    }\n}\n\nexport { AdjacentListsSupport, DocumentList, DocumentListProperties, LegacyIndentCommand, LegacyList, LegacyListEditing, LegacyListProperties, LegacyListPropertiesEditing, LegacyListUtils, LegacyTodoList, LegacyTodoListEditing, List, ListCommand, ListEditing, ListIndentCommand, ListProperties, ListPropertiesEditing, ListPropertiesUI, ListPropertiesUtils, ListUI, ListUtils, TodoDocumentList, TodoList, TodoListEditing, TodoListUI };\n//# sourceMappingURL=index.js.map\n","/**\n * marked - a markdown parser\n * Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\nfunction getDefaults() {\n  return {\n    baseUrl: null,\n    breaks: false,\n    extensions: null,\n    gfm: true,\n    headerIds: true,\n    headerPrefix: '',\n    highlight: null,\n    langPrefix: 'language-',\n    mangle: true,\n    pedantic: false,\n    renderer: null,\n    sanitize: false,\n    sanitizer: null,\n    silent: false,\n    smartLists: false,\n    smartypants: false,\n    tokenizer: null,\n    walkTokens: null,\n    xhtml: false\n  };\n}\n\nlet defaults = getDefaults();\n\nfunction changeDefaults(newDefaults) {\n  defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = /[&<>\"']/g;\nconst escapeTestNoEncode = /[<>\"']|&(?!#?\\w+;)/;\nconst escapeReplaceNoEncode = /[<>\"']|&(?!#?\\w+;)/g;\nconst escapeReplacements = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;',\n  \"'\": '&#39;'\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nfunction escape(html, encode) {\n  if (encode) {\n    if (escapeTest.test(html)) {\n      return html.replace(escapeReplace, getEscapeReplacement);\n    }\n  } else {\n    if (escapeTestNoEncode.test(html)) {\n      return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n    }\n  }\n\n  return html;\n}\n\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\nfunction unescape(html) {\n  // explicitly match decimal, hex, and named HTML entities\n  return html.replace(unescapeTest, (_, n) => {\n    n = n.toLowerCase();\n    if (n === 'colon') return ':';\n    if (n.charAt(0) === '#') {\n      return n.charAt(1) === 'x'\n        ? String.fromCharCode(parseInt(n.substring(2), 16))\n        : String.fromCharCode(+n.substring(1));\n    }\n    return '';\n  });\n}\n\nconst caret = /(^|[^\\[])\\^/g;\nfunction edit(regex, opt) {\n  regex = regex.source || regex;\n  opt = opt || '';\n  const obj = {\n    replace: (name, val) => {\n      val = val.source || val;\n      val = val.replace(caret, '$1');\n      regex = regex.replace(name, val);\n      return obj;\n    },\n    getRegex: () => {\n      return new RegExp(regex, opt);\n    }\n  };\n  return obj;\n}\n\nconst nonWordAndColonTest = /[^\\w:]/g;\nconst originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\nfunction cleanUrl(sanitize, base, href) {\n  if (sanitize) {\n    let prot;\n    try {\n      prot = decodeURIComponent(unescape(href))\n        .replace(nonWordAndColonTest, '')\n        .toLowerCase();\n    } catch (e) {\n      return null;\n    }\n    if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n      return null;\n    }\n  }\n  if (base && !originIndependentUrl.test(href)) {\n    href = resolveUrl(base, href);\n  }\n  try {\n    href = encodeURI(href).replace(/%25/g, '%');\n  } catch (e) {\n    return null;\n  }\n  return href;\n}\n\nconst baseUrls = {};\nconst justDomain = /^[^:]+:\\/*[^/]*$/;\nconst protocol = /^([^:]+:)[\\s\\S]*$/;\nconst domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\nfunction resolveUrl(base, href) {\n  if (!baseUrls[' ' + base]) {\n    // we can ignore everything in base after the last slash of its path component,\n    // but we might need to add _that_\n    // https://tools.ietf.org/html/rfc3986#section-3\n    if (justDomain.test(base)) {\n      baseUrls[' ' + base] = base + '/';\n    } else {\n      baseUrls[' ' + base] = rtrim(base, '/', true);\n    }\n  }\n  base = baseUrls[' ' + base];\n  const relativeBase = base.indexOf(':') === -1;\n\n  if (href.substring(0, 2) === '//') {\n    if (relativeBase) {\n      return href;\n    }\n    return base.replace(protocol, '$1') + href;\n  } else if (href.charAt(0) === '/') {\n    if (relativeBase) {\n      return href;\n    }\n    return base.replace(domain, '$1') + href;\n  } else {\n    return base + href;\n  }\n}\n\nconst noopTest = { exec: function noopTest() {} };\n\nfunction merge(obj) {\n  let i = 1,\n    target,\n    key;\n\n  for (; i < arguments.length; i++) {\n    target = arguments[i];\n    for (key in target) {\n      if (Object.prototype.hasOwnProperty.call(target, key)) {\n        obj[key] = target[key];\n      }\n    }\n  }\n\n  return obj;\n}\n\nfunction splitCells(tableRow, count) {\n  // ensure that every cell-delimiting pipe has a space\n  // before it to distinguish it from an escaped pipe\n  const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n      let escaped = false,\n        curr = offset;\n      while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n      if (escaped) {\n        // odd number of slashes means | is escaped\n        // so we leave it alone\n        return '|';\n      } else {\n        // add space before unescaped |\n        return ' |';\n      }\n    }),\n    cells = row.split(/ \\|/);\n  let i = 0;\n\n  // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n  if (!cells[0].trim()) { cells.shift(); }\n  if (cells.length > 0 && !cells[cells.length - 1].trim()) { cells.pop(); }\n\n  if (cells.length > count) {\n    cells.splice(count);\n  } else {\n    while (cells.length < count) cells.push('');\n  }\n\n  for (; i < cells.length; i++) {\n    // leading or trailing whitespace is ignored per the gfm spec\n    cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n  }\n  return cells;\n}\n\n// Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n// /c*$/ is vulnerable to REDOS.\n// invert: Remove suffix of non-c chars instead. Default falsey.\nfunction rtrim(str, c, invert) {\n  const l = str.length;\n  if (l === 0) {\n    return '';\n  }\n\n  // Length of suffix matching the invert condition.\n  let suffLen = 0;\n\n  // Step left until we fail to match the invert condition.\n  while (suffLen < l) {\n    const currChar = str.charAt(l - suffLen - 1);\n    if (currChar === c && !invert) {\n      suffLen++;\n    } else if (currChar !== c && invert) {\n      suffLen++;\n    } else {\n      break;\n    }\n  }\n\n  return str.substr(0, l - suffLen);\n}\n\nfunction findClosingBracket(str, b) {\n  if (str.indexOf(b[1]) === -1) {\n    return -1;\n  }\n  const l = str.length;\n  let level = 0,\n    i = 0;\n  for (; i < l; i++) {\n    if (str[i] === '\\\\') {\n      i++;\n    } else if (str[i] === b[0]) {\n      level++;\n    } else if (str[i] === b[1]) {\n      level--;\n      if (level < 0) {\n        return i;\n      }\n    }\n  }\n  return -1;\n}\n\nfunction checkSanitizeDeprecation(opt) {\n  if (opt && opt.sanitize && !opt.silent) {\n    console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n  }\n}\n\n// copied from https://stackoverflow.com/a/5450113/806777\nfunction repeatString(pattern, count) {\n  if (count < 1) {\n    return '';\n  }\n  let result = '';\n  while (count > 1) {\n    if (count & 1) {\n      result += pattern;\n    }\n    count >>= 1;\n    pattern += pattern;\n  }\n  return result + pattern;\n}\n\nfunction outputLink(cap, link, raw, lexer) {\n  const href = link.href;\n  const title = link.title ? escape(link.title) : null;\n  const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n\n  if (cap[0].charAt(0) !== '!') {\n    lexer.state.inLink = true;\n    const token = {\n      type: 'link',\n      raw,\n      href,\n      title,\n      text,\n      tokens: lexer.inlineTokens(text, [])\n    };\n    lexer.state.inLink = false;\n    return token;\n  } else {\n    return {\n      type: 'image',\n      raw,\n      href,\n      title,\n      text: escape(text)\n    };\n  }\n}\n\nfunction indentCodeCompensation(raw, text) {\n  const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n\n  if (matchIndentToCode === null) {\n    return text;\n  }\n\n  const indentToCode = matchIndentToCode[1];\n\n  return text\n    .split('\\n')\n    .map(node => {\n      const matchIndentInNode = node.match(/^\\s+/);\n      if (matchIndentInNode === null) {\n        return node;\n      }\n\n      const [indentInNode] = matchIndentInNode;\n\n      if (indentInNode.length >= indentToCode.length) {\n        return node.slice(indentToCode.length);\n      }\n\n      return node;\n    })\n    .join('\\n');\n}\n\n/**\n * Tokenizer\n */\nclass Tokenizer {\n  constructor(options) {\n    this.options = options || defaults;\n  }\n\n  space(src) {\n    const cap = this.rules.block.newline.exec(src);\n    if (cap && cap[0].length > 0) {\n      return {\n        type: 'space',\n        raw: cap[0]\n      };\n    }\n  }\n\n  code(src) {\n    const cap = this.rules.block.code.exec(src);\n    if (cap) {\n      const text = cap[0].replace(/^ {1,4}/gm, '');\n      return {\n        type: 'code',\n        raw: cap[0],\n        codeBlockStyle: 'indented',\n        text: !this.options.pedantic\n          ? rtrim(text, '\\n')\n          : text\n      };\n    }\n  }\n\n  fences(src) {\n    const cap = this.rules.block.fences.exec(src);\n    if (cap) {\n      const raw = cap[0];\n      const text = indentCodeCompensation(raw, cap[3] || '');\n\n      return {\n        type: 'code',\n        raw,\n        lang: cap[2] ? cap[2].trim() : cap[2],\n        text\n      };\n    }\n  }\n\n  heading(src) {\n    const cap = this.rules.block.heading.exec(src);\n    if (cap) {\n      let text = cap[2].trim();\n\n      // remove trailing #s\n      if (/#$/.test(text)) {\n        const trimmed = rtrim(text, '#');\n        if (this.options.pedantic) {\n          text = trimmed.trim();\n        } else if (!trimmed || / $/.test(trimmed)) {\n          // CommonMark requires space before trailing #s\n          text = trimmed.trim();\n        }\n      }\n\n      const token = {\n        type: 'heading',\n        raw: cap[0],\n        depth: cap[1].length,\n        text: text,\n        tokens: []\n      };\n      this.lexer.inline(token.text, token.tokens);\n      return token;\n    }\n  }\n\n  hr(src) {\n    const cap = this.rules.block.hr.exec(src);\n    if (cap) {\n      return {\n        type: 'hr',\n        raw: cap[0]\n      };\n    }\n  }\n\n  blockquote(src) {\n    const cap = this.rules.block.blockquote.exec(src);\n    if (cap) {\n      const text = cap[0].replace(/^ *> ?/gm, '');\n\n      return {\n        type: 'blockquote',\n        raw: cap[0],\n        tokens: this.lexer.blockTokens(text, []),\n        text\n      };\n    }\n  }\n\n  list(src) {\n    let cap = this.rules.block.list.exec(src);\n    if (cap) {\n      let raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine,\n        line, nextLine, rawLine, itemContents, endEarly;\n\n      let bull = cap[1].trim();\n      const isordered = bull.length > 1;\n\n      const list = {\n        type: 'list',\n        raw: '',\n        ordered: isordered,\n        start: isordered ? +bull.slice(0, -1) : '',\n        loose: false,\n        items: []\n      };\n\n      bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n\n      if (this.options.pedantic) {\n        bull = isordered ? bull : '[*+-]';\n      }\n\n      // Get next list item\n      const itemRegex = new RegExp(`^( {0,3}${bull})((?: [^\\\\n]*)?(?:\\\\n|$))`);\n\n      // Check if current bullet point can start a new List Item\n      while (src) {\n        endEarly = false;\n        if (!(cap = itemRegex.exec(src))) {\n          break;\n        }\n\n        if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n          break;\n        }\n\n        raw = cap[0];\n        src = src.substring(raw.length);\n\n        line = cap[2].split('\\n', 1)[0];\n        nextLine = src.split('\\n', 1)[0];\n\n        if (this.options.pedantic) {\n          indent = 2;\n          itemContents = line.trimLeft();\n        } else {\n          indent = cap[2].search(/[^ ]/); // Find first non-space char\n          indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n          itemContents = line.slice(indent);\n          indent += cap[1].length;\n        }\n\n        blankLine = false;\n\n        if (!line && /^ *$/.test(nextLine)) { // Items begin with at most one blank line\n          raw += nextLine + '\\n';\n          src = src.substring(nextLine.length + 1);\n          endEarly = true;\n        }\n\n        if (!endEarly) {\n          const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])`);\n\n          // Check if following lines should be included in List Item\n          while (src) {\n            rawLine = src.split('\\n', 1)[0];\n            line = rawLine;\n\n            // Re-align to follow commonmark nesting rules\n            if (this.options.pedantic) {\n              line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, '  ');\n            }\n\n            // End list item if found start of new bullet\n            if (nextBulletRegex.test(line)) {\n              break;\n            }\n\n            if (line.search(/[^ ]/) >= indent || !line.trim()) { // Dedent if possible\n              itemContents += '\\n' + line.slice(indent);\n            } else if (!blankLine) { // Until blank line, item doesn't need indentation\n              itemContents += '\\n' + line;\n            } else { // Otherwise, improper indentation ends this item\n              break;\n            }\n\n            if (!blankLine && !line.trim()) { // Check if current line is blank\n              blankLine = true;\n            }\n\n            raw += rawLine + '\\n';\n            src = src.substring(rawLine.length + 1);\n          }\n        }\n\n        if (!list.loose) {\n          // If the previous item ended with a blank line, the list is loose\n          if (endsWithBlankLine) {\n            list.loose = true;\n          } else if (/\\n *\\n *$/.test(raw)) {\n            endsWithBlankLine = true;\n          }\n        }\n\n        // Check for task list items\n        if (this.options.gfm) {\n          istask = /^\\[[ xX]\\] /.exec(itemContents);\n          if (istask) {\n            ischecked = istask[0] !== '[ ] ';\n            itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n          }\n        }\n\n        list.items.push({\n          type: 'list_item',\n          raw: raw,\n          task: !!istask,\n          checked: ischecked,\n          loose: false,\n          text: itemContents\n        });\n\n        list.raw += raw;\n      }\n\n      // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n      list.items[list.items.length - 1].raw = raw.trimRight();\n      list.items[list.items.length - 1].text = itemContents.trimRight();\n      list.raw = list.raw.trimRight();\n\n      const l = list.items.length;\n\n      // Item child tokens handled here at end because we needed to have the final item to trim it first\n      for (i = 0; i < l; i++) {\n        this.lexer.state.top = false;\n        list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n        const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n        const hasMultipleLineBreaks = spacers.every(t => {\n          const chars = t.raw.split('');\n          let lineBreaks = 0;\n          for (const char of chars) {\n            if (char === '\\n') {\n              lineBreaks += 1;\n            }\n            if (lineBreaks > 1) {\n              return true;\n            }\n          }\n\n          return false;\n        });\n\n        if (!list.loose && spacers.length && hasMultipleLineBreaks) {\n          // Having a single line break doesn't mean a list is loose. A single line break is terminating the last list item\n          list.loose = true;\n          list.items[i].loose = true;\n        }\n      }\n\n      return list;\n    }\n  }\n\n  html(src) {\n    const cap = this.rules.block.html.exec(src);\n    if (cap) {\n      const token = {\n        type: 'html',\n        raw: cap[0],\n        pre: !this.options.sanitizer\n          && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n        text: cap[0]\n      };\n      if (this.options.sanitize) {\n        token.type = 'paragraph';\n        token.text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);\n        token.tokens = [];\n        this.lexer.inline(token.text, token.tokens);\n      }\n      return token;\n    }\n  }\n\n  def(src) {\n    const cap = this.rules.block.def.exec(src);\n    if (cap) {\n      if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n      const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n      return {\n        type: 'def',\n        tag,\n        raw: cap[0],\n        href: cap[2],\n        title: cap[3]\n      };\n    }\n  }\n\n  table(src) {\n    const cap = this.rules.block.table.exec(src);\n    if (cap) {\n      const item = {\n        type: 'table',\n        header: splitCells(cap[1]).map(c => { return { text: c }; }),\n        align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n        rows: cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : []\n      };\n\n      if (item.header.length === item.align.length) {\n        item.raw = cap[0];\n\n        let l = item.align.length;\n        let i, j, k, row;\n        for (i = 0; i < l; i++) {\n          if (/^ *-+: *$/.test(item.align[i])) {\n            item.align[i] = 'right';\n          } else if (/^ *:-+: *$/.test(item.align[i])) {\n            item.align[i] = 'center';\n          } else if (/^ *:-+ *$/.test(item.align[i])) {\n            item.align[i] = 'left';\n          } else {\n            item.align[i] = null;\n          }\n        }\n\n        l = item.rows.length;\n        for (i = 0; i < l; i++) {\n          item.rows[i] = splitCells(item.rows[i], item.header.length).map(c => { return { text: c }; });\n        }\n\n        // parse child tokens inside headers and cells\n\n        // header child tokens\n        l = item.header.length;\n        for (j = 0; j < l; j++) {\n          item.header[j].tokens = [];\n          this.lexer.inlineTokens(item.header[j].text, item.header[j].tokens);\n        }\n\n        // cell child tokens\n        l = item.rows.length;\n        for (j = 0; j < l; j++) {\n          row = item.rows[j];\n          for (k = 0; k < row.length; k++) {\n            row[k].tokens = [];\n            this.lexer.inlineTokens(row[k].text, row[k].tokens);\n          }\n        }\n\n        return item;\n      }\n    }\n  }\n\n  lheading(src) {\n    const cap = this.rules.block.lheading.exec(src);\n    if (cap) {\n      const token = {\n        type: 'heading',\n        raw: cap[0],\n        depth: cap[2].charAt(0) === '=' ? 1 : 2,\n        text: cap[1],\n        tokens: []\n      };\n      this.lexer.inline(token.text, token.tokens);\n      return token;\n    }\n  }\n\n  paragraph(src) {\n    const cap = this.rules.block.paragraph.exec(src);\n    if (cap) {\n      const token = {\n        type: 'paragraph',\n        raw: cap[0],\n        text: cap[1].charAt(cap[1].length - 1) === '\\n'\n          ? cap[1].slice(0, -1)\n          : cap[1],\n        tokens: []\n      };\n      this.lexer.inline(token.text, token.tokens);\n      return token;\n    }\n  }\n\n  text(src) {\n    const cap = this.rules.block.text.exec(src);\n    if (cap) {\n      const token = {\n        type: 'text',\n        raw: cap[0],\n        text: cap[0],\n        tokens: []\n      };\n      this.lexer.inline(token.text, token.tokens);\n      return token;\n    }\n  }\n\n  escape(src) {\n    const cap = this.rules.inline.escape.exec(src);\n    if (cap) {\n      return {\n        type: 'escape',\n        raw: cap[0],\n        text: escape(cap[1])\n      };\n    }\n  }\n\n  tag(src) {\n    const cap = this.rules.inline.tag.exec(src);\n    if (cap) {\n      if (!this.lexer.state.inLink && /^<a /i.test(cap[0])) {\n        this.lexer.state.inLink = true;\n      } else if (this.lexer.state.inLink && /^<\\/a>/i.test(cap[0])) {\n        this.lexer.state.inLink = false;\n      }\n      if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n        this.lexer.state.inRawBlock = true;\n      } else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n        this.lexer.state.inRawBlock = false;\n      }\n\n      return {\n        type: this.options.sanitize\n          ? 'text'\n          : 'html',\n        raw: cap[0],\n        inLink: this.lexer.state.inLink,\n        inRawBlock: this.lexer.state.inRawBlock,\n        text: this.options.sanitize\n          ? (this.options.sanitizer\n            ? this.options.sanitizer(cap[0])\n            : escape(cap[0]))\n          : cap[0]\n      };\n    }\n  }\n\n  link(src) {\n    const cap = this.rules.inline.link.exec(src);\n    if (cap) {\n      const trimmedUrl = cap[2].trim();\n      if (!this.options.pedantic && /^</.test(trimmedUrl)) {\n        // commonmark requires matching angle brackets\n        if (!(/>$/.test(trimmedUrl))) {\n          return;\n        }\n\n        // ending angle bracket cannot be escaped\n        const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n        if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n          return;\n        }\n      } else {\n        // find closing parenthesis\n        const lastParenIndex = findClosingBracket(cap[2], '()');\n        if (lastParenIndex > -1) {\n          const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n          const linkLen = start + cap[1].length + lastParenIndex;\n          cap[2] = cap[2].substring(0, lastParenIndex);\n          cap[0] = cap[0].substring(0, linkLen).trim();\n          cap[3] = '';\n        }\n      }\n      let href = cap[2];\n      let title = '';\n      if (this.options.pedantic) {\n        // split pedantic href and title\n        const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n        if (link) {\n          href = link[1];\n          title = link[3];\n        }\n      } else {\n        title = cap[3] ? cap[3].slice(1, -1) : '';\n      }\n\n      href = href.trim();\n      if (/^</.test(href)) {\n        if (this.options.pedantic && !(/>$/.test(trimmedUrl))) {\n          // pedantic allows starting angle bracket without ending angle bracket\n          href = href.slice(1);\n        } else {\n          href = href.slice(1, -1);\n        }\n      }\n      return outputLink(cap, {\n        href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n        title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n      }, cap[0], this.lexer);\n    }\n  }\n\n  reflink(src, links) {\n    let cap;\n    if ((cap = this.rules.inline.reflink.exec(src))\n        || (cap = this.rules.inline.nolink.exec(src))) {\n      let link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n      link = links[link.toLowerCase()];\n      if (!link || !link.href) {\n        const text = cap[0].charAt(0);\n        return {\n          type: 'text',\n          raw: text,\n          text\n        };\n      }\n      return outputLink(cap, link, cap[0], this.lexer);\n    }\n  }\n\n  emStrong(src, maskedSrc, prevChar = '') {\n    let match = this.rules.inline.emStrong.lDelim.exec(src);\n    if (!match) return;\n\n    // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n    if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u)) return;\n\n    const nextChar = match[1] || match[2] || '';\n\n    if (!nextChar || (nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) {\n      const lLength = match[0].length - 1;\n      let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n\n      const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n      endReg.lastIndex = 0;\n\n      // Clip maskedSrc to same section of string as src (move to lexer?)\n      maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n\n      while ((match = endReg.exec(maskedSrc)) != null) {\n        rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n\n        if (!rDelim) continue; // skip single * in __abc*abc__\n\n        rLength = rDelim.length;\n\n        if (match[3] || match[4]) { // found another Left Delim\n          delimTotal += rLength;\n          continue;\n        } else if (match[5] || match[6]) { // either Left or Right Delim\n          if (lLength % 3 && !((lLength + rLength) % 3)) {\n            midDelimTotal += rLength;\n            continue; // CommonMark Emphasis Rules 9-10\n          }\n        }\n\n        delimTotal -= rLength;\n\n        if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n        // Remove extra characters. *a*** -> *a*\n        rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n\n        // Create `em` if smallest delimiter has odd char count. *a***\n        if (Math.min(lLength, rLength) % 2) {\n          const text = src.slice(1, lLength + match.index + rLength);\n          return {\n            type: 'em',\n            raw: src.slice(0, lLength + match.index + rLength + 1),\n            text,\n            tokens: this.lexer.inlineTokens(text, [])\n          };\n        }\n\n        // Create 'strong' if smallest delimiter has even char count. **a***\n        const text = src.slice(2, lLength + match.index + rLength - 1);\n        return {\n          type: 'strong',\n          raw: src.slice(0, lLength + match.index + rLength + 1),\n          text,\n          tokens: this.lexer.inlineTokens(text, [])\n        };\n      }\n    }\n  }\n\n  codespan(src) {\n    const cap = this.rules.inline.code.exec(src);\n    if (cap) {\n      let text = cap[2].replace(/\\n/g, ' ');\n      const hasNonSpaceChars = /[^ ]/.test(text);\n      const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n      if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n        text = text.substring(1, text.length - 1);\n      }\n      text = escape(text, true);\n      return {\n        type: 'codespan',\n        raw: cap[0],\n        text\n      };\n    }\n  }\n\n  br(src) {\n    const cap = this.rules.inline.br.exec(src);\n    if (cap) {\n      return {\n        type: 'br',\n        raw: cap[0]\n      };\n    }\n  }\n\n  del(src) {\n    const cap = this.rules.inline.del.exec(src);\n    if (cap) {\n      return {\n        type: 'del',\n        raw: cap[0],\n        text: cap[2],\n        tokens: this.lexer.inlineTokens(cap[2], [])\n      };\n    }\n  }\n\n  autolink(src, mangle) {\n    const cap = this.rules.inline.autolink.exec(src);\n    if (cap) {\n      let text, href;\n      if (cap[2] === '@') {\n        text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n        href = 'mailto:' + text;\n      } else {\n        text = escape(cap[1]);\n        href = text;\n      }\n\n      return {\n        type: 'link',\n        raw: cap[0],\n        text,\n        href,\n        tokens: [\n          {\n            type: 'text',\n            raw: text,\n            text\n          }\n        ]\n      };\n    }\n  }\n\n  url(src, mangle) {\n    let cap;\n    if (cap = this.rules.inline.url.exec(src)) {\n      let text, href;\n      if (cap[2] === '@') {\n        text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n        href = 'mailto:' + text;\n      } else {\n        // do extended autolink path validation\n        let prevCapZero;\n        do {\n          prevCapZero = cap[0];\n          cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n        } while (prevCapZero !== cap[0]);\n        text = escape(cap[0]);\n        if (cap[1] === 'www.') {\n          href = 'http://' + text;\n        } else {\n          href = text;\n        }\n      }\n      return {\n        type: 'link',\n        raw: cap[0],\n        text,\n        href,\n        tokens: [\n          {\n            type: 'text',\n            raw: text,\n            text\n          }\n        ]\n      };\n    }\n  }\n\n  inlineText(src, smartypants) {\n    const cap = this.rules.inline.text.exec(src);\n    if (cap) {\n      let text;\n      if (this.lexer.state.inRawBlock) {\n        text = this.options.sanitize ? (this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0])) : cap[0];\n      } else {\n        text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n      }\n      return {\n        type: 'text',\n        raw: cap[0],\n        text\n      };\n    }\n  }\n}\n\n/**\n * Block-Level Grammar\n */\nconst block = {\n  newline: /^(?: *(?:\\n|$))+/,\n  code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n  fences: /^ {0,3}(`{3,}(?=[^`\\n]*\\n)|~{3,})([^\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,\n  hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n  heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n  blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n  list: /^( {0,3}bull)( [^\\n]+?)?(?:\\n|$)/,\n  html: '^ {0,3}(?:' // optional indentation\n    + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n    + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n    + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n    + '|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)' // (4)\n    + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)' // (5)\n    + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n    + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n    + '|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n    + ')',\n  def: /^ {0,3}\\[(label)\\]: *(?:\\n *)?<?([^\\s>]+)>?(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/,\n  table: noopTest,\n  lheading: /^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n  // regex template, placeholders will be replaced according to different paragraph\n  // interruption rules of commonmark and the original markdown spec:\n  _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,\n  text: /^[^\\n]+/\n};\n\nblock._label = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def)\n  .replace('label', block._label)\n  .replace('title', block._title)\n  .getRegex();\n\nblock.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nblock.listItemStart = edit(/^( *)(bull) */)\n  .replace('bull', block.bullet)\n  .getRegex();\n\nblock.list = edit(block.list)\n  .replace(/bull/g, block.bullet)\n  .replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))')\n  .replace('def', '\\\\n+(?=' + block.def.source + ')')\n  .getRegex();\n\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n  + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n  + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n  + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n  + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n  + '|track|ul';\nblock._comment = /<!--(?!-?>)[\\s\\S]*?(?:-->|$)/;\nblock.html = edit(block.html, 'i')\n  .replace('comment', block._comment)\n  .replace('tag', block._tag)\n  .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n  .getRegex();\n\nblock.paragraph = edit(block._paragraph)\n  .replace('hr', block.hr)\n  .replace('heading', ' {0,3}#{1,6} ')\n  .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n  .replace('|table', '')\n  .replace('blockquote', ' {0,3}>')\n  .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n  .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n  .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n  .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n  .getRegex();\n\nblock.blockquote = edit(block.blockquote)\n  .replace('paragraph', block.paragraph)\n  .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = merge({}, block);\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = merge({}, block.normal, {\n  table: '^ *([^\\\\n ].*\\\\|.*)\\\\n' // Header\n    + ' {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?' // Align\n    + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n});\n\nblock.gfm.table = edit(block.gfm.table)\n  .replace('hr', block.hr)\n  .replace('heading', ' {0,3}#{1,6} ')\n  .replace('blockquote', ' {0,3}>')\n  .replace('code', ' {4}[^\\\\n]')\n  .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n  .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n  .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n  .replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n  .getRegex();\n\nblock.gfm.paragraph = edit(block._paragraph)\n  .replace('hr', block.hr)\n  .replace('heading', ' {0,3}#{1,6} ')\n  .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n  .replace('table', block.gfm.table) // interrupt paragraphs with table\n  .replace('blockquote', ' {0,3}>')\n  .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n  .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n  .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n  .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n  .getRegex();\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nblock.pedantic = merge({}, block.normal, {\n  html: edit(\n    '^ *(?:comment *(?:\\\\n|\\\\s*$)'\n    + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n    + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n    .replace('comment', block._comment)\n    .replace(/tag/g, '(?!(?:'\n      + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n      + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n      + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n    .getRegex(),\n  def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n  heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n  fences: noopTest, // fences not supported\n  paragraph: edit(block.normal._paragraph)\n    .replace('hr', block.hr)\n    .replace('heading', ' *#{1,6} *[^\\n]')\n    .replace('lheading', block.lheading)\n    .replace('blockquote', ' {0,3}>')\n    .replace('|fences', '')\n    .replace('|list', '')\n    .replace('|html', '')\n    .getRegex()\n});\n\n/**\n * Inline-Level Grammar\n */\nconst inline = {\n  escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n  autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n  url: noopTest,\n  tag: '^comment'\n    + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n    + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n    + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n    + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n    + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>', // CDATA section\n  link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n  reflink: /^!?\\[(label)\\]\\[(ref)\\]/,\n  nolink: /^!?\\[(ref)\\](?:\\[\\])?/,\n  reflinkSearch: 'reflink|nolink(?!\\\\()',\n  emStrong: {\n    lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n    //        (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left.  (5) and (6) can be either Left or Right.\n    //        () Skip orphan delim inside strong    (1) #***                (2) a***#, a***                   (3) #***a, ***a                 (4) ***#              (5) #***#                 (6) a***a\n    rDelimAst: /^[^_*]*?\\_\\_[^_*]*?\\*[^_*]*?(?=\\_\\_)|[punct_](\\*+)(?=[\\s]|$)|[^punct*_\\s](\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|[^punct*_\\s](\\*+)(?=[^punct*_\\s])/,\n    rDelimUnd: /^[^_*]*?\\*\\*[^_*]*?\\_[^_*]*?(?=\\*\\*)|[punct*](\\_+)(?=[\\s]|$)|[^punct*_\\s](\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n  },\n  code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n  br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n  del: noopTest,\n  text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,\n  punctuation: /^([\\spunctuation])/\n};\n\n// list of punctuation marks from CommonMark spec\n// without * and _ to handle the different emphasis markers * and _\ninline._punctuation = '!\"#$%&\\'()+\\\\-.,/:;<=>?@\\\\[\\\\]`^{|}~';\ninline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();\n\n// sequences em should skip over [title](link), `code`, <html>\ninline.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\ninline.escapedEmSt = /\\\\\\*|\\\\_/g;\n\ninline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();\n\ninline.emStrong.lDelim = edit(inline.emStrong.lDelim)\n  .replace(/punct/g, inline._punctuation)\n  .getRegex();\n\ninline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'g')\n  .replace(/punct/g, inline._punctuation)\n  .getRegex();\n\ninline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'g')\n  .replace(/punct/g, inline._punctuation)\n  .getRegex();\n\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink)\n  .replace('scheme', inline._scheme)\n  .replace('email', inline._email)\n  .getRegex();\n\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n\ninline.tag = edit(inline.tag)\n  .replace('comment', inline._comment)\n  .replace('attribute', inline._attribute)\n  .getRegex();\n\ninline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\ninline._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n\ninline.link = edit(inline.link)\n  .replace('label', inline._label)\n  .replace('href', inline._href)\n  .replace('title', inline._title)\n  .getRegex();\n\ninline.reflink = edit(inline.reflink)\n  .replace('label', inline._label)\n  .replace('ref', block._label)\n  .getRegex();\n\ninline.nolink = edit(inline.nolink)\n  .replace('ref', block._label)\n  .getRegex();\n\ninline.reflinkSearch = edit(inline.reflinkSearch, 'g')\n  .replace('reflink', inline.reflink)\n  .replace('nolink', inline.nolink)\n  .getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = merge({}, inline);\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = merge({}, inline.normal, {\n  strong: {\n    start: /^__|\\*\\*/,\n    middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n    endAst: /\\*\\*(?!\\*)/g,\n    endUnd: /__(?!_)/g\n  },\n  em: {\n    start: /^_|\\*/,\n    middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n    endAst: /\\*(?!\\*)/g,\n    endUnd: /_(?!_)/g\n  },\n  link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n    .replace('label', inline._label)\n    .getRegex(),\n  reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n    .replace('label', inline._label)\n    .getRegex()\n});\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = merge({}, inline.normal, {\n  escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n  _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n  url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n  _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n  del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n  text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)))/\n});\n\ninline.gfm.url = edit(inline.gfm.url, 'i')\n  .replace('email', inline.gfm._extended_email)\n  .getRegex();\n/**\n * GFM + Line Breaks Inline Grammar\n */\n\ninline.breaks = merge({}, inline.gfm, {\n  br: edit(inline.br).replace('{2,}', '*').getRegex(),\n  text: edit(inline.gfm.text)\n    .replace('\\\\b_', '\\\\b_| {2,}\\\\n')\n    .replace(/\\{2,\\}/g, '*')\n    .getRegex()\n});\n\n/**\n * smartypants text replacement\n */\nfunction smartypants(text) {\n  return text\n    // em-dashes\n    .replace(/---/g, '\\u2014')\n    // en-dashes\n    .replace(/--/g, '\\u2013')\n    // opening singles\n    .replace(/(^|[-\\u2014/(\\[{\"\\s])'/g, '$1\\u2018')\n    // closing singles & apostrophes\n    .replace(/'/g, '\\u2019')\n    // opening doubles\n    .replace(/(^|[-\\u2014/(\\[{\\u2018\\s])\"/g, '$1\\u201c')\n    // closing doubles\n    .replace(/\"/g, '\\u201d')\n    // ellipses\n    .replace(/\\.{3}/g, '\\u2026');\n}\n\n/**\n * mangle email addresses\n */\nfunction mangle(text) {\n  let out = '',\n    i,\n    ch;\n\n  const l = text.length;\n  for (i = 0; i < l; i++) {\n    ch = text.charCodeAt(i);\n    if (Math.random() > 0.5) {\n      ch = 'x' + ch.toString(16);\n    }\n    out += '&#' + ch + ';';\n  }\n\n  return out;\n}\n\n/**\n * Block Lexer\n */\nclass Lexer {\n  constructor(options) {\n    this.tokens = [];\n    this.tokens.links = Object.create(null);\n    this.options = options || defaults;\n    this.options.tokenizer = this.options.tokenizer || new Tokenizer();\n    this.tokenizer = this.options.tokenizer;\n    this.tokenizer.options = this.options;\n    this.tokenizer.lexer = this;\n    this.inlineQueue = [];\n    this.state = {\n      inLink: false,\n      inRawBlock: false,\n      top: true\n    };\n\n    const rules = {\n      block: block.normal,\n      inline: inline.normal\n    };\n\n    if (this.options.pedantic) {\n      rules.block = block.pedantic;\n      rules.inline = inline.pedantic;\n    } else if (this.options.gfm) {\n      rules.block = block.gfm;\n      if (this.options.breaks) {\n        rules.inline = inline.breaks;\n      } else {\n        rules.inline = inline.gfm;\n      }\n    }\n    this.tokenizer.rules = rules;\n  }\n\n  /**\n   * Expose Rules\n   */\n  static get rules() {\n    return {\n      block,\n      inline\n    };\n  }\n\n  /**\n   * Static Lex Method\n   */\n  static lex(src, options) {\n    const lexer = new Lexer(options);\n    return lexer.lex(src);\n  }\n\n  /**\n   * Static Lex Inline Method\n   */\n  static lexInline(src, options) {\n    const lexer = new Lexer(options);\n    return lexer.inlineTokens(src);\n  }\n\n  /**\n   * Preprocessing\n   */\n  lex(src) {\n    src = src\n      .replace(/\\r\\n|\\r/g, '\\n')\n      .replace(/\\t/g, '    ');\n\n    this.blockTokens(src, this.tokens);\n\n    let next;\n    while (next = this.inlineQueue.shift()) {\n      this.inlineTokens(next.src, next.tokens);\n    }\n\n    return this.tokens;\n  }\n\n  /**\n   * Lexing\n   */\n  blockTokens(src, tokens = []) {\n    if (this.options.pedantic) {\n      src = src.replace(/^ +$/gm, '');\n    }\n    let token, lastToken, cutSrc, lastParagraphClipped;\n\n    while (src) {\n      if (this.options.extensions\n        && this.options.extensions.block\n        && this.options.extensions.block.some((extTokenizer) => {\n          if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n            src = src.substring(token.raw.length);\n            tokens.push(token);\n            return true;\n          }\n          return false;\n        })) {\n        continue;\n      }\n\n      // newline\n      if (token = this.tokenizer.space(src)) {\n        src = src.substring(token.raw.length);\n        if (token.raw.length === 1 && tokens.length > 0) {\n          // if there's a single \\n as a spacer, it's terminating the last line,\n          // so move it there so that we don't get unecessary paragraph tags\n          tokens[tokens.length - 1].raw += '\\n';\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // code\n      if (token = this.tokenizer.code(src)) {\n        src = src.substring(token.raw.length);\n        lastToken = tokens[tokens.length - 1];\n        // An indented code block cannot interrupt a paragraph.\n        if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n          lastToken.raw += '\\n' + token.raw;\n          lastToken.text += '\\n' + token.text;\n          this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // fences\n      if (token = this.tokenizer.fences(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // heading\n      if (token = this.tokenizer.heading(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // hr\n      if (token = this.tokenizer.hr(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // blockquote\n      if (token = this.tokenizer.blockquote(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // list\n      if (token = this.tokenizer.list(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // html\n      if (token = this.tokenizer.html(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // def\n      if (token = this.tokenizer.def(src)) {\n        src = src.substring(token.raw.length);\n        lastToken = tokens[tokens.length - 1];\n        if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n          lastToken.raw += '\\n' + token.raw;\n          lastToken.text += '\\n' + token.raw;\n          this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n        } else if (!this.tokens.links[token.tag]) {\n          this.tokens.links[token.tag] = {\n            href: token.href,\n            title: token.title\n          };\n        }\n        continue;\n      }\n\n      // table (gfm)\n      if (token = this.tokenizer.table(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // lheading\n      if (token = this.tokenizer.lheading(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // top-level paragraph\n      // prevent paragraph consuming extensions by clipping 'src' to extension start\n      cutSrc = src;\n      if (this.options.extensions && this.options.extensions.startBlock) {\n        let startIndex = Infinity;\n        const tempSrc = src.slice(1);\n        let tempStart;\n        this.options.extensions.startBlock.forEach(function(getStartIndex) {\n          tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n          if (typeof tempStart === 'number' && tempStart >= 0) { startIndex = Math.min(startIndex, tempStart); }\n        });\n        if (startIndex < Infinity && startIndex >= 0) {\n          cutSrc = src.substring(0, startIndex + 1);\n        }\n      }\n      if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n        lastToken = tokens[tokens.length - 1];\n        if (lastParagraphClipped && lastToken.type === 'paragraph') {\n          lastToken.raw += '\\n' + token.raw;\n          lastToken.text += '\\n' + token.text;\n          this.inlineQueue.pop();\n          this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n        } else {\n          tokens.push(token);\n        }\n        lastParagraphClipped = (cutSrc.length !== src.length);\n        src = src.substring(token.raw.length);\n        continue;\n      }\n\n      // text\n      if (token = this.tokenizer.text(src)) {\n        src = src.substring(token.raw.length);\n        lastToken = tokens[tokens.length - 1];\n        if (lastToken && lastToken.type === 'text') {\n          lastToken.raw += '\\n' + token.raw;\n          lastToken.text += '\\n' + token.text;\n          this.inlineQueue.pop();\n          this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      if (src) {\n        const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n        if (this.options.silent) {\n          console.error(errMsg);\n          break;\n        } else {\n          throw new Error(errMsg);\n        }\n      }\n    }\n\n    this.state.top = true;\n    return tokens;\n  }\n\n  inline(src, tokens) {\n    this.inlineQueue.push({ src, tokens });\n  }\n\n  /**\n   * Lexing/Compiling\n   */\n  inlineTokens(src, tokens = []) {\n    let token, lastToken, cutSrc;\n\n    // String with links masked to avoid interference with em and strong\n    let maskedSrc = src;\n    let match;\n    let keepPrevChar, prevChar;\n\n    // Mask out reflinks\n    if (this.tokens.links) {\n      const links = Object.keys(this.tokens.links);\n      if (links.length > 0) {\n        while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n          if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n            maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n          }\n        }\n      }\n    }\n    // Mask out other blocks\n    while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n      maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n    }\n\n    // Mask out escaped em & strong delimiters\n    while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n      maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n    }\n\n    while (src) {\n      if (!keepPrevChar) {\n        prevChar = '';\n      }\n      keepPrevChar = false;\n\n      // extensions\n      if (this.options.extensions\n        && this.options.extensions.inline\n        && this.options.extensions.inline.some((extTokenizer) => {\n          if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n            src = src.substring(token.raw.length);\n            tokens.push(token);\n            return true;\n          }\n          return false;\n        })) {\n        continue;\n      }\n\n      // escape\n      if (token = this.tokenizer.escape(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // tag\n      if (token = this.tokenizer.tag(src)) {\n        src = src.substring(token.raw.length);\n        lastToken = tokens[tokens.length - 1];\n        if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n          lastToken.raw += token.raw;\n          lastToken.text += token.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // link\n      if (token = this.tokenizer.link(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // reflink, nolink\n      if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n        src = src.substring(token.raw.length);\n        lastToken = tokens[tokens.length - 1];\n        if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n          lastToken.raw += token.raw;\n          lastToken.text += token.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      // em & strong\n      if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // code\n      if (token = this.tokenizer.codespan(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // br\n      if (token = this.tokenizer.br(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // del (gfm)\n      if (token = this.tokenizer.del(src)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // autolink\n      if (token = this.tokenizer.autolink(src, mangle)) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // url (gfm)\n      if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {\n        src = src.substring(token.raw.length);\n        tokens.push(token);\n        continue;\n      }\n\n      // text\n      // prevent inlineText consuming extensions by clipping 'src' to extension start\n      cutSrc = src;\n      if (this.options.extensions && this.options.extensions.startInline) {\n        let startIndex = Infinity;\n        const tempSrc = src.slice(1);\n        let tempStart;\n        this.options.extensions.startInline.forEach(function(getStartIndex) {\n          tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n          if (typeof tempStart === 'number' && tempStart >= 0) { startIndex = Math.min(startIndex, tempStart); }\n        });\n        if (startIndex < Infinity && startIndex >= 0) {\n          cutSrc = src.substring(0, startIndex + 1);\n        }\n      }\n      if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {\n        src = src.substring(token.raw.length);\n        if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n          prevChar = token.raw.slice(-1);\n        }\n        keepPrevChar = true;\n        lastToken = tokens[tokens.length - 1];\n        if (lastToken && lastToken.type === 'text') {\n          lastToken.raw += token.raw;\n          lastToken.text += token.text;\n        } else {\n          tokens.push(token);\n        }\n        continue;\n      }\n\n      if (src) {\n        const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n        if (this.options.silent) {\n          console.error(errMsg);\n          break;\n        } else {\n          throw new Error(errMsg);\n        }\n      }\n    }\n\n    return tokens;\n  }\n}\n\n/**\n * Renderer\n */\nclass Renderer {\n  constructor(options) {\n    this.options = options || defaults;\n  }\n\n  code(code, infostring, escaped) {\n    const lang = (infostring || '').match(/\\S*/)[0];\n    if (this.options.highlight) {\n      const out = this.options.highlight(code, lang);\n      if (out != null && out !== code) {\n        escaped = true;\n        code = out;\n      }\n    }\n\n    code = code.replace(/\\n$/, '') + '\\n';\n\n    if (!lang) {\n      return '<pre><code>'\n        + (escaped ? code : escape(code, true))\n        + '</code></pre>\\n';\n    }\n\n    return '<pre><code class=\"'\n      + this.options.langPrefix\n      + escape(lang, true)\n      + '\">'\n      + (escaped ? code : escape(code, true))\n      + '</code></pre>\\n';\n  }\n\n  blockquote(quote) {\n    return '<blockquote>\\n' + quote + '</blockquote>\\n';\n  }\n\n  html(html) {\n    return html;\n  }\n\n  heading(text, level, raw, slugger) {\n    if (this.options.headerIds) {\n      return '<h'\n        + level\n        + ' id=\"'\n        + this.options.headerPrefix\n        + slugger.slug(raw)\n        + '\">'\n        + text\n        + '</h'\n        + level\n        + '>\\n';\n    }\n    // ignore IDs\n    return '<h' + level + '>' + text + '</h' + level + '>\\n';\n  }\n\n  hr() {\n    return this.options.xhtml ? '<hr/>\\n' : '<hr>\\n';\n  }\n\n  list(body, ordered, start) {\n    const type = ordered ? 'ol' : 'ul',\n      startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n    return '<' + type + startatt + '>\\n' + body + '</' + type + '>\\n';\n  }\n\n  listitem(text) {\n    return '<li>' + text + '</li>\\n';\n  }\n\n  checkbox(checked) {\n    return '<input '\n      + (checked ? 'checked=\"\" ' : '')\n      + 'disabled=\"\" type=\"checkbox\"'\n      + (this.options.xhtml ? ' /' : '')\n      + '> ';\n  }\n\n  paragraph(text) {\n    return '<p>' + text + '</p>\\n';\n  }\n\n  table(header, body) {\n    if (body) body = '<tbody>' + body + '</tbody>';\n\n    return '<table>\\n'\n      + '<thead>\\n'\n      + header\n      + '</thead>\\n'\n      + body\n      + '</table>\\n';\n  }\n\n  tablerow(content) {\n    return '<tr>\\n' + content + '</tr>\\n';\n  }\n\n  tablecell(content, flags) {\n    const type = flags.header ? 'th' : 'td';\n    const tag = flags.align\n      ? '<' + type + ' align=\"' + flags.align + '\">'\n      : '<' + type + '>';\n    return tag + content + '</' + type + '>\\n';\n  }\n\n  // span level renderer\n  strong(text) {\n    return '<strong>' + text + '</strong>';\n  }\n\n  em(text) {\n    return '<em>' + text + '</em>';\n  }\n\n  codespan(text) {\n    return '<code>' + text + '</code>';\n  }\n\n  br() {\n    return this.options.xhtml ? '<br/>' : '<br>';\n  }\n\n  del(text) {\n    return '<del>' + text + '</del>';\n  }\n\n  link(href, title, text) {\n    href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n    if (href === null) {\n      return text;\n    }\n    let out = '<a href=\"' + escape(href) + '\"';\n    if (title) {\n      out += ' title=\"' + title + '\"';\n    }\n    out += '>' + text + '</a>';\n    return out;\n  }\n\n  image(href, title, text) {\n    href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n    if (href === null) {\n      return text;\n    }\n\n    let out = '<img src=\"' + href + '\" alt=\"' + text + '\"';\n    if (title) {\n      out += ' title=\"' + title + '\"';\n    }\n    out += this.options.xhtml ? '/>' : '>';\n    return out;\n  }\n\n  text(text) {\n    return text;\n  }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass TextRenderer {\n  // no need for block level renderers\n  strong(text) {\n    return text;\n  }\n\n  em(text) {\n    return text;\n  }\n\n  codespan(text) {\n    return text;\n  }\n\n  del(text) {\n    return text;\n  }\n\n  html(text) {\n    return text;\n  }\n\n  text(text) {\n    return text;\n  }\n\n  link(href, title, text) {\n    return '' + text;\n  }\n\n  image(href, title, text) {\n    return '' + text;\n  }\n\n  br() {\n    return '';\n  }\n}\n\n/**\n * Slugger generates header id\n */\nclass Slugger {\n  constructor() {\n    this.seen = {};\n  }\n\n  serialize(value) {\n    return value\n      .toLowerCase()\n      .trim()\n      // remove html tags\n      .replace(/<[!\\/a-z].*?>/ig, '')\n      // remove unwanted chars\n      .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '')\n      .replace(/\\s/g, '-');\n  }\n\n  /**\n   * Finds the next safe (unique) slug to use\n   */\n  getNextSafeSlug(originalSlug, isDryRun) {\n    let slug = originalSlug;\n    let occurenceAccumulator = 0;\n    if (this.seen.hasOwnProperty(slug)) {\n      occurenceAccumulator = this.seen[originalSlug];\n      do {\n        occurenceAccumulator++;\n        slug = originalSlug + '-' + occurenceAccumulator;\n      } while (this.seen.hasOwnProperty(slug));\n    }\n    if (!isDryRun) {\n      this.seen[originalSlug] = occurenceAccumulator;\n      this.seen[slug] = 0;\n    }\n    return slug;\n  }\n\n  /**\n   * Convert string to unique id\n   * @param {object} options\n   * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator.\n   */\n  slug(value, options = {}) {\n    const slug = this.serialize(value);\n    return this.getNextSafeSlug(slug, options.dryrun);\n  }\n}\n\n/**\n * Parsing & Compiling\n */\nclass Parser {\n  constructor(options) {\n    this.options = options || defaults;\n    this.options.renderer = this.options.renderer || new Renderer();\n    this.renderer = this.options.renderer;\n    this.renderer.options = this.options;\n    this.textRenderer = new TextRenderer();\n    this.slugger = new Slugger();\n  }\n\n  /**\n   * Static Parse Method\n   */\n  static parse(tokens, options) {\n    const parser = new Parser(options);\n    return parser.parse(tokens);\n  }\n\n  /**\n   * Static Parse Inline Method\n   */\n  static parseInline(tokens, options) {\n    const parser = new Parser(options);\n    return parser.parseInline(tokens);\n  }\n\n  /**\n   * Parse Loop\n   */\n  parse(tokens, top = true) {\n    let out = '',\n      i,\n      j,\n      k,\n      l2,\n      l3,\n      row,\n      cell,\n      header,\n      body,\n      token,\n      ordered,\n      start,\n      loose,\n      itemBody,\n      item,\n      checked,\n      task,\n      checkbox,\n      ret;\n\n    const l = tokens.length;\n    for (i = 0; i < l; i++) {\n      token = tokens[i];\n\n      // Run any renderer extensions\n      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n        ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n        if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(token.type)) {\n          out += ret || '';\n          continue;\n        }\n      }\n\n      switch (token.type) {\n        case 'space': {\n          continue;\n        }\n        case 'hr': {\n          out += this.renderer.hr();\n          continue;\n        }\n        case 'heading': {\n          out += this.renderer.heading(\n            this.parseInline(token.tokens),\n            token.depth,\n            unescape(this.parseInline(token.tokens, this.textRenderer)),\n            this.slugger);\n          continue;\n        }\n        case 'code': {\n          out += this.renderer.code(token.text,\n            token.lang,\n            token.escaped);\n          continue;\n        }\n        case 'table': {\n          header = '';\n\n          // header\n          cell = '';\n          l2 = token.header.length;\n          for (j = 0; j < l2; j++) {\n            cell += this.renderer.tablecell(\n              this.parseInline(token.header[j].tokens),\n              { header: true, align: token.align[j] }\n            );\n          }\n          header += this.renderer.tablerow(cell);\n\n          body = '';\n          l2 = token.rows.length;\n          for (j = 0; j < l2; j++) {\n            row = token.rows[j];\n\n            cell = '';\n            l3 = row.length;\n            for (k = 0; k < l3; k++) {\n              cell += this.renderer.tablecell(\n                this.parseInline(row[k].tokens),\n                { header: false, align: token.align[k] }\n              );\n            }\n\n            body += this.renderer.tablerow(cell);\n          }\n          out += this.renderer.table(header, body);\n          continue;\n        }\n        case 'blockquote': {\n          body = this.parse(token.tokens);\n          out += this.renderer.blockquote(body);\n          continue;\n        }\n        case 'list': {\n          ordered = token.ordered;\n          start = token.start;\n          loose = token.loose;\n          l2 = token.items.length;\n\n          body = '';\n          for (j = 0; j < l2; j++) {\n            item = token.items[j];\n            checked = item.checked;\n            task = item.task;\n\n            itemBody = '';\n            if (item.task) {\n              checkbox = this.renderer.checkbox(checked);\n              if (loose) {\n                if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n                  item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n                  if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n                    item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n                  }\n                } else {\n                  item.tokens.unshift({\n                    type: 'text',\n                    text: checkbox\n                  });\n                }\n              } else {\n                itemBody += checkbox;\n              }\n            }\n\n            itemBody += this.parse(item.tokens, loose);\n            body += this.renderer.listitem(itemBody, task, checked);\n          }\n\n          out += this.renderer.list(body, ordered, start);\n          continue;\n        }\n        case 'html': {\n          // TODO parse inline content if parameter markdown=1\n          out += this.renderer.html(token.text);\n          continue;\n        }\n        case 'paragraph': {\n          out += this.renderer.paragraph(this.parseInline(token.tokens));\n          continue;\n        }\n        case 'text': {\n          body = token.tokens ? this.parseInline(token.tokens) : token.text;\n          while (i + 1 < l && tokens[i + 1].type === 'text') {\n            token = tokens[++i];\n            body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n          }\n          out += top ? this.renderer.paragraph(body) : body;\n          continue;\n        }\n\n        default: {\n          const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n          if (this.options.silent) {\n            console.error(errMsg);\n            return;\n          } else {\n            throw new Error(errMsg);\n          }\n        }\n      }\n    }\n\n    return out;\n  }\n\n  /**\n   * Parse Inline Tokens\n   */\n  parseInline(tokens, renderer) {\n    renderer = renderer || this.renderer;\n    let out = '',\n      i,\n      token,\n      ret;\n\n    const l = tokens.length;\n    for (i = 0; i < l; i++) {\n      token = tokens[i];\n\n      // Run any renderer extensions\n      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n        ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n        if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n          out += ret || '';\n          continue;\n        }\n      }\n\n      switch (token.type) {\n        case 'escape': {\n          out += renderer.text(token.text);\n          break;\n        }\n        case 'html': {\n          out += renderer.html(token.text);\n          break;\n        }\n        case 'link': {\n          out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n          break;\n        }\n        case 'image': {\n          out += renderer.image(token.href, token.title, token.text);\n          break;\n        }\n        case 'strong': {\n          out += renderer.strong(this.parseInline(token.tokens, renderer));\n          break;\n        }\n        case 'em': {\n          out += renderer.em(this.parseInline(token.tokens, renderer));\n          break;\n        }\n        case 'codespan': {\n          out += renderer.codespan(token.text);\n          break;\n        }\n        case 'br': {\n          out += renderer.br();\n          break;\n        }\n        case 'del': {\n          out += renderer.del(this.parseInline(token.tokens, renderer));\n          break;\n        }\n        case 'text': {\n          out += renderer.text(token.text);\n          break;\n        }\n        default: {\n          const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n          if (this.options.silent) {\n            console.error(errMsg);\n            return;\n          } else {\n            throw new Error(errMsg);\n          }\n        }\n      }\n    }\n    return out;\n  }\n}\n\n/**\n * Marked\n */\nfunction marked(src, opt, callback) {\n  // throw error in case of non string input\n  if (typeof src === 'undefined' || src === null) {\n    throw new Error('marked(): input parameter is undefined or null');\n  }\n  if (typeof src !== 'string') {\n    throw new Error('marked(): input parameter is of type '\n      + Object.prototype.toString.call(src) + ', string expected');\n  }\n\n  if (typeof opt === 'function') {\n    callback = opt;\n    opt = null;\n  }\n\n  opt = merge({}, marked.defaults, opt || {});\n  checkSanitizeDeprecation(opt);\n\n  if (callback) {\n    const highlight = opt.highlight;\n    let tokens;\n\n    try {\n      tokens = Lexer.lex(src, opt);\n    } catch (e) {\n      return callback(e);\n    }\n\n    const done = function(err) {\n      let out;\n\n      if (!err) {\n        try {\n          if (opt.walkTokens) {\n            marked.walkTokens(tokens, opt.walkTokens);\n          }\n          out = Parser.parse(tokens, opt);\n        } catch (e) {\n          err = e;\n        }\n      }\n\n      opt.highlight = highlight;\n\n      return err\n        ? callback(err)\n        : callback(null, out);\n    };\n\n    if (!highlight || highlight.length < 3) {\n      return done();\n    }\n\n    delete opt.highlight;\n\n    if (!tokens.length) return done();\n\n    let pending = 0;\n    marked.walkTokens(tokens, function(token) {\n      if (token.type === 'code') {\n        pending++;\n        setTimeout(() => {\n          highlight(token.text, token.lang, function(err, code) {\n            if (err) {\n              return done(err);\n            }\n            if (code != null && code !== token.text) {\n              token.text = code;\n              token.escaped = true;\n            }\n\n            pending--;\n            if (pending === 0) {\n              done();\n            }\n          });\n        }, 0);\n      }\n    });\n\n    if (pending === 0) {\n      done();\n    }\n\n    return;\n  }\n\n  try {\n    const tokens = Lexer.lex(src, opt);\n    if (opt.walkTokens) {\n      marked.walkTokens(tokens, opt.walkTokens);\n    }\n    return Parser.parse(tokens, opt);\n  } catch (e) {\n    e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n    if (opt.silent) {\n      return '<p>An error occurred:</p><pre>'\n        + escape(e.message + '', true)\n        + '</pre>';\n    }\n    throw e;\n  }\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n  merge(marked.defaults, opt);\n  changeDefaults(marked.defaults);\n  return marked;\n};\n\nmarked.getDefaults = getDefaults;\n\nmarked.defaults = defaults;\n\n/**\n * Use Extension\n */\n\nmarked.use = function(...args) {\n  const opts = merge({}, ...args);\n  const extensions = marked.defaults.extensions || { renderers: {}, childTokens: {} };\n  let hasExtensions;\n\n  args.forEach((pack) => {\n    // ==-- Parse \"addon\" extensions --== //\n    if (pack.extensions) {\n      hasExtensions = true;\n      pack.extensions.forEach((ext) => {\n        if (!ext.name) {\n          throw new Error('extension name required');\n        }\n        if (ext.renderer) { // Renderer extensions\n          const prevRenderer = extensions.renderers ? extensions.renderers[ext.name] : null;\n          if (prevRenderer) {\n            // Replace extension with func to run new extension but fall back if false\n            extensions.renderers[ext.name] = function(...args) {\n              let ret = ext.renderer.apply(this, args);\n              if (ret === false) {\n                ret = prevRenderer.apply(this, args);\n              }\n              return ret;\n            };\n          } else {\n            extensions.renderers[ext.name] = ext.renderer;\n          }\n        }\n        if (ext.tokenizer) { // Tokenizer Extensions\n          if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n            throw new Error(\"extension level must be 'block' or 'inline'\");\n          }\n          if (extensions[ext.level]) {\n            extensions[ext.level].unshift(ext.tokenizer);\n          } else {\n            extensions[ext.level] = [ext.tokenizer];\n          }\n          if (ext.start) { // Function to check for start of token\n            if (ext.level === 'block') {\n              if (extensions.startBlock) {\n                extensions.startBlock.push(ext.start);\n              } else {\n                extensions.startBlock = [ext.start];\n              }\n            } else if (ext.level === 'inline') {\n              if (extensions.startInline) {\n                extensions.startInline.push(ext.start);\n              } else {\n                extensions.startInline = [ext.start];\n              }\n            }\n          }\n        }\n        if (ext.childTokens) { // Child tokens to be visited by walkTokens\n          extensions.childTokens[ext.name] = ext.childTokens;\n        }\n      });\n    }\n\n    // ==-- Parse \"overwrite\" extensions --== //\n    if (pack.renderer) {\n      const renderer = marked.defaults.renderer || new Renderer();\n      for (const prop in pack.renderer) {\n        const prevRenderer = renderer[prop];\n        // Replace renderer with func to run extension, but fall back if false\n        renderer[prop] = (...args) => {\n          let ret = pack.renderer[prop].apply(renderer, args);\n          if (ret === false) {\n            ret = prevRenderer.apply(renderer, args);\n          }\n          return ret;\n        };\n      }\n      opts.renderer = renderer;\n    }\n    if (pack.tokenizer) {\n      const tokenizer = marked.defaults.tokenizer || new Tokenizer();\n      for (const prop in pack.tokenizer) {\n        const prevTokenizer = tokenizer[prop];\n        // Replace tokenizer with func to run extension, but fall back if false\n        tokenizer[prop] = (...args) => {\n          let ret = pack.tokenizer[prop].apply(tokenizer, args);\n          if (ret === false) {\n            ret = prevTokenizer.apply(tokenizer, args);\n          }\n          return ret;\n        };\n      }\n      opts.tokenizer = tokenizer;\n    }\n\n    // ==-- Parse WalkTokens extensions --== //\n    if (pack.walkTokens) {\n      const walkTokens = marked.defaults.walkTokens;\n      opts.walkTokens = function(token) {\n        pack.walkTokens.call(this, token);\n        if (walkTokens) {\n          walkTokens.call(this, token);\n        }\n      };\n    }\n\n    if (hasExtensions) {\n      opts.extensions = extensions;\n    }\n\n    marked.setOptions(opts);\n  });\n};\n\n/**\n * Run callback for every token\n */\n\nmarked.walkTokens = function(tokens, callback) {\n  for (const token of tokens) {\n    callback.call(marked, token);\n    switch (token.type) {\n      case 'table': {\n        for (const cell of token.header) {\n          marked.walkTokens(cell.tokens, callback);\n        }\n        for (const row of token.rows) {\n          for (const cell of row) {\n            marked.walkTokens(cell.tokens, callback);\n          }\n        }\n        break;\n      }\n      case 'list': {\n        marked.walkTokens(token.items, callback);\n        break;\n      }\n      default: {\n        if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) { // Walk any extensions\n          marked.defaults.extensions.childTokens[token.type].forEach(function(childTokens) {\n            marked.walkTokens(token[childTokens], callback);\n          });\n        } else if (token.tokens) {\n          marked.walkTokens(token.tokens, callback);\n        }\n      }\n    }\n  }\n};\n\n/**\n * Parse Inline\n */\nmarked.parseInline = function(src, opt) {\n  // throw error in case of non string input\n  if (typeof src === 'undefined' || src === null) {\n    throw new Error('marked.parseInline(): input parameter is undefined or null');\n  }\n  if (typeof src !== 'string') {\n    throw new Error('marked.parseInline(): input parameter is of type '\n      + Object.prototype.toString.call(src) + ', string expected');\n  }\n\n  opt = merge({}, marked.defaults, opt || {});\n  checkSanitizeDeprecation(opt);\n\n  try {\n    const tokens = Lexer.lexInline(src, opt);\n    if (opt.walkTokens) {\n      marked.walkTokens(tokens, opt.walkTokens);\n    }\n    return Parser.parseInline(tokens, opt);\n  } catch (e) {\n    e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n    if (opt.silent) {\n      return '<p>An error occurred:</p><pre>'\n        + escape(e.message + '', true)\n        + '</pre>';\n    }\n    throw e;\n  }\n};\n\n/**\n * Expose\n */\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\nmarked.Tokenizer = Tokenizer;\nmarked.Slugger = Slugger;\nmarked.parse = marked;\n\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = Parser.parse;\nconst lexer = Lexer.lex;\n\nexport { Lexer, Parser, Renderer, Slugger, TextRenderer, Tokenizer, defaults, getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };\n","function extend (destination) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n    for (var key in source) {\n      if (source.hasOwnProperty(key)) destination[key] = source[key];\n    }\n  }\n  return destination\n}\n\nfunction repeat (character, count) {\n  return Array(count + 1).join(character)\n}\n\nfunction trimLeadingNewlines (string) {\n  return string.replace(/^\\n*/, '')\n}\n\nfunction trimTrailingNewlines (string) {\n  // avoid match-at-end regexp bottleneck, see #370\n  var indexEnd = string.length;\n  while (indexEnd > 0 && string[indexEnd - 1] === '\\n') indexEnd--;\n  return string.substring(0, indexEnd)\n}\n\nvar blockElements = [\n  'ADDRESS', 'ARTICLE', 'ASIDE', 'AUDIO', 'BLOCKQUOTE', 'BODY', 'CANVAS',\n  'CENTER', 'DD', 'DIR', 'DIV', 'DL', 'DT', 'FIELDSET', 'FIGCAPTION', 'FIGURE',\n  'FOOTER', 'FORM', 'FRAMESET', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEADER',\n  'HGROUP', 'HR', 'HTML', 'ISINDEX', 'LI', 'MAIN', 'MENU', 'NAV', 'NOFRAMES',\n  'NOSCRIPT', 'OL', 'OUTPUT', 'P', 'PRE', 'SECTION', 'TABLE', 'TBODY', 'TD',\n  'TFOOT', 'TH', 'THEAD', 'TR', 'UL'\n];\n\nfunction isBlock (node) {\n  return is(node, blockElements)\n}\n\nvar voidElements = [\n  'AREA', 'BASE', 'BR', 'COL', 'COMMAND', 'EMBED', 'HR', 'IMG', 'INPUT',\n  'KEYGEN', 'LINK', 'META', 'PARAM', 'SOURCE', 'TRACK', 'WBR'\n];\n\nfunction isVoid (node) {\n  return is(node, voidElements)\n}\n\nfunction hasVoid (node) {\n  return has(node, voidElements)\n}\n\nvar meaningfulWhenBlankElements = [\n  'A', 'TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TH', 'TD', 'IFRAME', 'SCRIPT',\n  'AUDIO', 'VIDEO'\n];\n\nfunction isMeaningfulWhenBlank (node) {\n  return is(node, meaningfulWhenBlankElements)\n}\n\nfunction hasMeaningfulWhenBlank (node) {\n  return has(node, meaningfulWhenBlankElements)\n}\n\nfunction is (node, tagNames) {\n  return tagNames.indexOf(node.nodeName) >= 0\n}\n\nfunction has (node, tagNames) {\n  return (\n    node.getElementsByTagName &&\n    tagNames.some(function (tagName) {\n      return node.getElementsByTagName(tagName).length\n    })\n  )\n}\n\nvar rules = {};\n\nrules.paragraph = {\n  filter: 'p',\n\n  replacement: function (content) {\n    return '\\n\\n' + content + '\\n\\n'\n  }\n};\n\nrules.lineBreak = {\n  filter: 'br',\n\n  replacement: function (content, node, options) {\n    return options.br + '\\n'\n  }\n};\n\nrules.heading = {\n  filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n\n  replacement: function (content, node, options) {\n    var hLevel = Number(node.nodeName.charAt(1));\n\n    if (options.headingStyle === 'setext' && hLevel < 3) {\n      var underline = repeat((hLevel === 1 ? '=' : '-'), content.length);\n      return (\n        '\\n\\n' + content + '\\n' + underline + '\\n\\n'\n      )\n    } else {\n      return '\\n\\n' + repeat('#', hLevel) + ' ' + content + '\\n\\n'\n    }\n  }\n};\n\nrules.blockquote = {\n  filter: 'blockquote',\n\n  replacement: function (content) {\n    content = content.replace(/^\\n+|\\n+$/g, '');\n    content = content.replace(/^/gm, '> ');\n    return '\\n\\n' + content + '\\n\\n'\n  }\n};\n\nrules.list = {\n  filter: ['ul', 'ol'],\n\n  replacement: function (content, node) {\n    var parent = node.parentNode;\n    if (parent.nodeName === 'LI' && parent.lastElementChild === node) {\n      return '\\n' + content\n    } else {\n      return '\\n\\n' + content + '\\n\\n'\n    }\n  }\n};\n\nrules.listItem = {\n  filter: 'li',\n\n  replacement: function (content, node, options) {\n    content = content\n      .replace(/^\\n+/, '') // remove leading newlines\n      .replace(/\\n+$/, '\\n') // replace trailing newlines with just a single one\n      .replace(/\\n/gm, '\\n    '); // indent\n    var prefix = options.bulletListMarker + '   ';\n    var parent = node.parentNode;\n    if (parent.nodeName === 'OL') {\n      var start = parent.getAttribute('start');\n      var index = Array.prototype.indexOf.call(parent.children, node);\n      prefix = (start ? Number(start) + index : index + 1) + '.  ';\n    }\n    return (\n      prefix + content + (node.nextSibling && !/\\n$/.test(content) ? '\\n' : '')\n    )\n  }\n};\n\nrules.indentedCodeBlock = {\n  filter: function (node, options) {\n    return (\n      options.codeBlockStyle === 'indented' &&\n      node.nodeName === 'PRE' &&\n      node.firstChild &&\n      node.firstChild.nodeName === 'CODE'\n    )\n  },\n\n  replacement: function (content, node, options) {\n    return (\n      '\\n\\n    ' +\n      node.firstChild.textContent.replace(/\\n/g, '\\n    ') +\n      '\\n\\n'\n    )\n  }\n};\n\nrules.fencedCodeBlock = {\n  filter: function (node, options) {\n    return (\n      options.codeBlockStyle === 'fenced' &&\n      node.nodeName === 'PRE' &&\n      node.firstChild &&\n      node.firstChild.nodeName === 'CODE'\n    )\n  },\n\n  replacement: function (content, node, options) {\n    var className = node.firstChild.getAttribute('class') || '';\n    var language = (className.match(/language-(\\S+)/) || [null, ''])[1];\n    var code = node.firstChild.textContent;\n\n    var fenceChar = options.fence.charAt(0);\n    var fenceSize = 3;\n    var fenceInCodeRegex = new RegExp('^' + fenceChar + '{3,}', 'gm');\n\n    var match;\n    while ((match = fenceInCodeRegex.exec(code))) {\n      if (match[0].length >= fenceSize) {\n        fenceSize = match[0].length + 1;\n      }\n    }\n\n    var fence = repeat(fenceChar, fenceSize);\n\n    return (\n      '\\n\\n' + fence + language + '\\n' +\n      code.replace(/\\n$/, '') +\n      '\\n' + fence + '\\n\\n'\n    )\n  }\n};\n\nrules.horizontalRule = {\n  filter: 'hr',\n\n  replacement: function (content, node, options) {\n    return '\\n\\n' + options.hr + '\\n\\n'\n  }\n};\n\nrules.inlineLink = {\n  filter: function (node, options) {\n    return (\n      options.linkStyle === 'inlined' &&\n      node.nodeName === 'A' &&\n      node.getAttribute('href')\n    )\n  },\n\n  replacement: function (content, node) {\n    var href = node.getAttribute('href');\n    if (href) href = href.replace(/([()])/g, '\\\\$1');\n    var title = cleanAttribute(node.getAttribute('title'));\n    if (title) title = ' \"' + title.replace(/\"/g, '\\\\\"') + '\"';\n    return '[' + content + '](' + href + title + ')'\n  }\n};\n\nrules.referenceLink = {\n  filter: function (node, options) {\n    return (\n      options.linkStyle === 'referenced' &&\n      node.nodeName === 'A' &&\n      node.getAttribute('href')\n    )\n  },\n\n  replacement: function (content, node, options) {\n    var href = node.getAttribute('href');\n    var title = cleanAttribute(node.getAttribute('title'));\n    if (title) title = ' \"' + title + '\"';\n    var replacement;\n    var reference;\n\n    switch (options.linkReferenceStyle) {\n      case 'collapsed':\n        replacement = '[' + content + '][]';\n        reference = '[' + content + ']: ' + href + title;\n        break\n      case 'shortcut':\n        replacement = '[' + content + ']';\n        reference = '[' + content + ']: ' + href + title;\n        break\n      default:\n        var id = this.references.length + 1;\n        replacement = '[' + content + '][' + id + ']';\n        reference = '[' + id + ']: ' + href + title;\n    }\n\n    this.references.push(reference);\n    return replacement\n  },\n\n  references: [],\n\n  append: function (options) {\n    var references = '';\n    if (this.references.length) {\n      references = '\\n\\n' + this.references.join('\\n') + '\\n\\n';\n      this.references = []; // Reset references\n    }\n    return references\n  }\n};\n\nrules.emphasis = {\n  filter: ['em', 'i'],\n\n  replacement: function (content, node, options) {\n    if (!content.trim()) return ''\n    return options.emDelimiter + content + options.emDelimiter\n  }\n};\n\nrules.strong = {\n  filter: ['strong', 'b'],\n\n  replacement: function (content, node, options) {\n    if (!content.trim()) return ''\n    return options.strongDelimiter + content + options.strongDelimiter\n  }\n};\n\nrules.code = {\n  filter: function (node) {\n    var hasSiblings = node.previousSibling || node.nextSibling;\n    var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings;\n\n    return node.nodeName === 'CODE' && !isCodeBlock\n  },\n\n  replacement: function (content) {\n    if (!content) return ''\n    content = content.replace(/\\r?\\n|\\r/g, ' ');\n\n    var extraSpace = /^`|^ .*?[^ ].* $|`$/.test(content) ? ' ' : '';\n    var delimiter = '`';\n    var matches = content.match(/`+/gm) || [];\n    while (matches.indexOf(delimiter) !== -1) delimiter = delimiter + '`';\n\n    return delimiter + extraSpace + content + extraSpace + delimiter\n  }\n};\n\nrules.image = {\n  filter: 'img',\n\n  replacement: function (content, node) {\n    var alt = cleanAttribute(node.getAttribute('alt'));\n    var src = node.getAttribute('src') || '';\n    var title = cleanAttribute(node.getAttribute('title'));\n    var titlePart = title ? ' \"' + title + '\"' : '';\n    return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''\n  }\n};\n\nfunction cleanAttribute (attribute) {\n  return attribute ? attribute.replace(/(\\n+\\s*)+/g, '\\n') : ''\n}\n\n/**\n * Manages a collection of rules used to convert HTML to Markdown\n */\n\nfunction Rules (options) {\n  this.options = options;\n  this._keep = [];\n  this._remove = [];\n\n  this.blankRule = {\n    replacement: options.blankReplacement\n  };\n\n  this.keepReplacement = options.keepReplacement;\n\n  this.defaultRule = {\n    replacement: options.defaultReplacement\n  };\n\n  this.array = [];\n  for (var key in options.rules) this.array.push(options.rules[key]);\n}\n\nRules.prototype = {\n  add: function (key, rule) {\n    this.array.unshift(rule);\n  },\n\n  keep: function (filter) {\n    this._keep.unshift({\n      filter: filter,\n      replacement: this.keepReplacement\n    });\n  },\n\n  remove: function (filter) {\n    this._remove.unshift({\n      filter: filter,\n      replacement: function () {\n        return ''\n      }\n    });\n  },\n\n  forNode: function (node) {\n    if (node.isBlank) return this.blankRule\n    var rule;\n\n    if ((rule = findRule(this.array, node, this.options))) return rule\n    if ((rule = findRule(this._keep, node, this.options))) return rule\n    if ((rule = findRule(this._remove, node, this.options))) return rule\n\n    return this.defaultRule\n  },\n\n  forEach: function (fn) {\n    for (var i = 0; i < this.array.length; i++) fn(this.array[i], i);\n  }\n};\n\nfunction findRule (rules, node, options) {\n  for (var i = 0; i < rules.length; i++) {\n    var rule = rules[i];\n    if (filterValue(rule, node, options)) return rule\n  }\n  return void 0\n}\n\nfunction filterValue (rule, node, options) {\n  var filter = rule.filter;\n  if (typeof filter === 'string') {\n    if (filter === node.nodeName.toLowerCase()) return true\n  } else if (Array.isArray(filter)) {\n    if (filter.indexOf(node.nodeName.toLowerCase()) > -1) return true\n  } else if (typeof filter === 'function') {\n    if (filter.call(rule, node, options)) return true\n  } else {\n    throw new TypeError('`filter` needs to be a string, array, or function')\n  }\n}\n\n/**\n * The collapseWhitespace function is adapted from collapse-whitespace\n * by Luc Thevenard.\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2014 Luc Thevenard <lucthevenard@gmail.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * collapseWhitespace(options) removes extraneous whitespace from an the given element.\n *\n * @param {Object} options\n */\nfunction collapseWhitespace (options) {\n  var element = options.element;\n  var isBlock = options.isBlock;\n  var isVoid = options.isVoid;\n  var isPre = options.isPre || function (node) {\n    return node.nodeName === 'PRE'\n  };\n\n  if (!element.firstChild || isPre(element)) return\n\n  var prevText = null;\n  var keepLeadingWs = false;\n\n  var prev = null;\n  var node = next(prev, element, isPre);\n\n  while (node !== element) {\n    if (node.nodeType === 3 || node.nodeType === 4) { // Node.TEXT_NODE or Node.CDATA_SECTION_NODE\n      var text = node.data.replace(/[ \\r\\n\\t]+/g, ' ');\n\n      if ((!prevText || / $/.test(prevText.data)) &&\n          !keepLeadingWs && text[0] === ' ') {\n        text = text.substr(1);\n      }\n\n      // `text` might be empty at this point.\n      if (!text) {\n        node = remove(node);\n        continue\n      }\n\n      node.data = text;\n\n      prevText = node;\n    } else if (node.nodeType === 1) { // Node.ELEMENT_NODE\n      if (isBlock(node) || node.nodeName === 'BR') {\n        if (prevText) {\n          prevText.data = prevText.data.replace(/ $/, '');\n        }\n\n        prevText = null;\n        keepLeadingWs = false;\n      } else if (isVoid(node) || isPre(node)) {\n        // Avoid trimming space around non-block, non-BR void elements and inline PRE.\n        prevText = null;\n        keepLeadingWs = true;\n      } else if (prevText) {\n        // Drop protection if set previously.\n        keepLeadingWs = false;\n      }\n    } else {\n      node = remove(node);\n      continue\n    }\n\n    var nextNode = next(prev, node, isPre);\n    prev = node;\n    node = nextNode;\n  }\n\n  if (prevText) {\n    prevText.data = prevText.data.replace(/ $/, '');\n    if (!prevText.data) {\n      remove(prevText);\n    }\n  }\n}\n\n/**\n * remove(node) removes the given node from the DOM and returns the\n * next node in the sequence.\n *\n * @param {Node} node\n * @return {Node} node\n */\nfunction remove (node) {\n  var next = node.nextSibling || node.parentNode;\n\n  node.parentNode.removeChild(node);\n\n  return next\n}\n\n/**\n * next(prev, current, isPre) returns the next node in the sequence, given the\n * current and previous nodes.\n *\n * @param {Node} prev\n * @param {Node} current\n * @param {Function} isPre\n * @return {Node}\n */\nfunction next (prev, current, isPre) {\n  if ((prev && prev.parentNode === current) || isPre(current)) {\n    return current.nextSibling || current.parentNode\n  }\n\n  return current.firstChild || current.nextSibling || current.parentNode\n}\n\n/*\n * Set up window for Node.js\n */\n\nvar root = (typeof window !== 'undefined' ? window : {});\n\n/*\n * Parsing HTML strings\n */\n\nfunction canParseHTMLNatively () {\n  var Parser = root.DOMParser;\n  var canParse = false;\n\n  // Adapted from https://gist.github.com/1129031\n  // Firefox/Opera/IE throw errors on unsupported types\n  try {\n    // WebKit returns null on unsupported types\n    if (new Parser().parseFromString('', 'text/html')) {\n      canParse = true;\n    }\n  } catch (e) {}\n\n  return canParse\n}\n\nfunction createHTMLParser () {\n  var Parser = function () {};\n\n  {\n    if (shouldUseActiveX()) {\n      Parser.prototype.parseFromString = function (string) {\n        var doc = new window.ActiveXObject('htmlfile');\n        doc.designMode = 'on'; // disable on-page scripts\n        doc.open();\n        doc.write(string);\n        doc.close();\n        return doc\n      };\n    } else {\n      Parser.prototype.parseFromString = function (string) {\n        var doc = document.implementation.createHTMLDocument('');\n        doc.open();\n        doc.write(string);\n        doc.close();\n        return doc\n      };\n    }\n  }\n  return Parser\n}\n\nfunction shouldUseActiveX () {\n  var useActiveX = false;\n  try {\n    document.implementation.createHTMLDocument('').open();\n  } catch (e) {\n    if (root.ActiveXObject) useActiveX = true;\n  }\n  return useActiveX\n}\n\nvar HTMLParser = canParseHTMLNatively() ? root.DOMParser : createHTMLParser();\n\nfunction RootNode (input, options) {\n  var root;\n  if (typeof input === 'string') {\n    var doc = htmlParser().parseFromString(\n      // DOM parsers arrange elements in the <head> and <body>.\n      // Wrapping in a custom element ensures elements are reliably arranged in\n      // a single element.\n      '<x-turndown id=\"turndown-root\">' + input + '</x-turndown>',\n      'text/html'\n    );\n    root = doc.getElementById('turndown-root');\n  } else {\n    root = input.cloneNode(true);\n  }\n  collapseWhitespace({\n    element: root,\n    isBlock: isBlock,\n    isVoid: isVoid,\n    isPre: options.preformattedCode ? isPreOrCode : null\n  });\n\n  return root\n}\n\nvar _htmlParser;\nfunction htmlParser () {\n  _htmlParser = _htmlParser || new HTMLParser();\n  return _htmlParser\n}\n\nfunction isPreOrCode (node) {\n  return node.nodeName === 'PRE' || node.nodeName === 'CODE'\n}\n\nfunction Node (node, options) {\n  node.isBlock = isBlock(node);\n  node.isCode = node.nodeName === 'CODE' || node.parentNode.isCode;\n  node.isBlank = isBlank(node);\n  node.flankingWhitespace = flankingWhitespace(node, options);\n  return node\n}\n\nfunction isBlank (node) {\n  return (\n    !isVoid(node) &&\n    !isMeaningfulWhenBlank(node) &&\n    /^\\s*$/i.test(node.textContent) &&\n    !hasVoid(node) &&\n    !hasMeaningfulWhenBlank(node)\n  )\n}\n\nfunction flankingWhitespace (node, options) {\n  if (node.isBlock || (options.preformattedCode && node.isCode)) {\n    return { leading: '', trailing: '' }\n  }\n\n  var edges = edgeWhitespace(node.textContent);\n\n  // abandon leading ASCII WS if left-flanked by ASCII WS\n  if (edges.leadingAscii && isFlankedByWhitespace('left', node, options)) {\n    edges.leading = edges.leadingNonAscii;\n  }\n\n  // abandon trailing ASCII WS if right-flanked by ASCII WS\n  if (edges.trailingAscii && isFlankedByWhitespace('right', node, options)) {\n    edges.trailing = edges.trailingNonAscii;\n  }\n\n  return { leading: edges.leading, trailing: edges.trailing }\n}\n\nfunction edgeWhitespace (string) {\n  var m = string.match(/^(([ \\t\\r\\n]*)(\\s*))(?:(?=\\S)[\\s\\S]*\\S)?((\\s*?)([ \\t\\r\\n]*))$/);\n  return {\n    leading: m[1], // whole string for whitespace-only strings\n    leadingAscii: m[2],\n    leadingNonAscii: m[3],\n    trailing: m[4], // empty for whitespace-only strings\n    trailingNonAscii: m[5],\n    trailingAscii: m[6]\n  }\n}\n\nfunction isFlankedByWhitespace (side, node, options) {\n  var sibling;\n  var regExp;\n  var isFlanked;\n\n  if (side === 'left') {\n    sibling = node.previousSibling;\n    regExp = / $/;\n  } else {\n    sibling = node.nextSibling;\n    regExp = /^ /;\n  }\n\n  if (sibling) {\n    if (sibling.nodeType === 3) {\n      isFlanked = regExp.test(sibling.nodeValue);\n    } else if (options.preformattedCode && sibling.nodeName === 'CODE') {\n      isFlanked = false;\n    } else if (sibling.nodeType === 1 && !isBlock(sibling)) {\n      isFlanked = regExp.test(sibling.textContent);\n    }\n  }\n  return isFlanked\n}\n\nvar reduce = Array.prototype.reduce;\nvar escapes = [\n  [/\\\\/g, '\\\\\\\\'],\n  [/\\*/g, '\\\\*'],\n  [/^-/g, '\\\\-'],\n  [/^\\+ /g, '\\\\+ '],\n  [/^(=+)/g, '\\\\$1'],\n  [/^(#{1,6}) /g, '\\\\$1 '],\n  [/`/g, '\\\\`'],\n  [/^~~~/g, '\\\\~~~'],\n  [/\\[/g, '\\\\['],\n  [/\\]/g, '\\\\]'],\n  [/^>/g, '\\\\>'],\n  [/_/g, '\\\\_'],\n  [/^(\\d+)\\. /g, '$1\\\\. ']\n];\n\nfunction TurndownService (options) {\n  if (!(this instanceof TurndownService)) return new TurndownService(options)\n\n  var defaults = {\n    rules: rules,\n    headingStyle: 'setext',\n    hr: '* * *',\n    bulletListMarker: '*',\n    codeBlockStyle: 'indented',\n    fence: '```',\n    emDelimiter: '_',\n    strongDelimiter: '**',\n    linkStyle: 'inlined',\n    linkReferenceStyle: 'full',\n    br: '  ',\n    preformattedCode: false,\n    blankReplacement: function (content, node) {\n      return node.isBlock ? '\\n\\n' : ''\n    },\n    keepReplacement: function (content, node) {\n      return node.isBlock ? '\\n\\n' + node.outerHTML + '\\n\\n' : node.outerHTML\n    },\n    defaultReplacement: function (content, node) {\n      return node.isBlock ? '\\n\\n' + content + '\\n\\n' : content\n    }\n  };\n  this.options = extend({}, defaults, options);\n  this.rules = new Rules(this.options);\n}\n\nTurndownService.prototype = {\n  /**\n   * The entry point for converting a string or DOM node to Markdown\n   * @public\n   * @param {String|HTMLElement} input The string or DOM node to convert\n   * @returns A Markdown representation of the input\n   * @type String\n   */\n\n  turndown: function (input) {\n    if (!canConvert(input)) {\n      throw new TypeError(\n        input + ' is not a string, or an element/document/fragment node.'\n      )\n    }\n\n    if (input === '') return ''\n\n    var output = process.call(this, new RootNode(input, this.options));\n    return postProcess.call(this, output)\n  },\n\n  /**\n   * Add one or more plugins\n   * @public\n   * @param {Function|Array} plugin The plugin or array of plugins to add\n   * @returns The Turndown instance for chaining\n   * @type Object\n   */\n\n  use: function (plugin) {\n    if (Array.isArray(plugin)) {\n      for (var i = 0; i < plugin.length; i++) this.use(plugin[i]);\n    } else if (typeof plugin === 'function') {\n      plugin(this);\n    } else {\n      throw new TypeError('plugin must be a Function or an Array of Functions')\n    }\n    return this\n  },\n\n  /**\n   * Adds a rule\n   * @public\n   * @param {String} key The unique key of the rule\n   * @param {Object} rule The rule\n   * @returns The Turndown instance for chaining\n   * @type Object\n   */\n\n  addRule: function (key, rule) {\n    this.rules.add(key, rule);\n    return this\n  },\n\n  /**\n   * Keep a node (as HTML) that matches the filter\n   * @public\n   * @param {String|Array|Function} filter The unique key of the rule\n   * @returns The Turndown instance for chaining\n   * @type Object\n   */\n\n  keep: function (filter) {\n    this.rules.keep(filter);\n    return this\n  },\n\n  /**\n   * Remove a node that matches the filter\n   * @public\n   * @param {String|Array|Function} filter The unique key of the rule\n   * @returns The Turndown instance for chaining\n   * @type Object\n   */\n\n  remove: function (filter) {\n    this.rules.remove(filter);\n    return this\n  },\n\n  /**\n   * Escapes Markdown syntax\n   * @public\n   * @param {String} string The string to escape\n   * @returns A string with Markdown syntax escaped\n   * @type String\n   */\n\n  escape: function (string) {\n    return escapes.reduce(function (accumulator, escape) {\n      return accumulator.replace(escape[0], escape[1])\n    }, string)\n  }\n};\n\n/**\n * Reduces a DOM node down to its Markdown string equivalent\n * @private\n * @param {HTMLElement} parentNode The node to convert\n * @returns A Markdown representation of the node\n * @type String\n */\n\nfunction process (parentNode) {\n  var self = this;\n  return reduce.call(parentNode.childNodes, function (output, node) {\n    node = new Node(node, self.options);\n\n    var replacement = '';\n    if (node.nodeType === 3) {\n      replacement = node.isCode ? node.nodeValue : self.escape(node.nodeValue);\n    } else if (node.nodeType === 1) {\n      replacement = replacementForNode.call(self, node);\n    }\n\n    return join(output, replacement)\n  }, '')\n}\n\n/**\n * Appends strings as each rule requires and trims the output\n * @private\n * @param {String} output The conversion output\n * @returns A trimmed version of the ouput\n * @type String\n */\n\nfunction postProcess (output) {\n  var self = this;\n  this.rules.forEach(function (rule) {\n    if (typeof rule.append === 'function') {\n      output = join(output, rule.append(self.options));\n    }\n  });\n\n  return output.replace(/^[\\t\\r\\n]+/, '').replace(/[\\t\\r\\n\\s]+$/, '')\n}\n\n/**\n * Converts an element node to its Markdown equivalent\n * @private\n * @param {HTMLElement} node The node to convert\n * @returns A Markdown representation of the node\n * @type String\n */\n\nfunction replacementForNode (node) {\n  var rule = this.rules.forNode(node);\n  var content = process.call(this, node);\n  var whitespace = node.flankingWhitespace;\n  if (whitespace.leading || whitespace.trailing) content = content.trim();\n  return (\n    whitespace.leading +\n    rule.replacement(content, node, this.options) +\n    whitespace.trailing\n  )\n}\n\n/**\n * Joins replacement to the current output with appropriate number of new lines\n * @private\n * @param {String} output The current conversion output\n * @param {String} replacement The string to append to the output\n * @returns Joined output\n * @type String\n */\n\nfunction join (output, replacement) {\n  var s1 = trimTrailingNewlines(output);\n  var s2 = trimLeadingNewlines(replacement);\n  var nls = Math.max(output.length - s1.length, replacement.length - s2.length);\n  var separator = '\\n\\n'.substring(0, nls);\n\n  return s1 + separator + s2\n}\n\n/**\n * Determines whether an input can be converted\n * @private\n * @param {String|HTMLElement} input Describe this parameter\n * @returns Describe what it returns\n * @type String|Object|Array|Boolean|Number\n */\n\nfunction canConvert (input) {\n  return (\n    input != null && (\n      typeof input === 'string' ||\n      (input.nodeType && (\n        input.nodeType === 1 || input.nodeType === 9 || input.nodeType === 11\n      ))\n    )\n  )\n}\n\nexport default TurndownService;\n","var highlightRegExp = /highlight-(?:text|source)-([a-z0-9]+)/;\n\nfunction highlightedCodeBlock (turndownService) {\n  turndownService.addRule('highlightedCodeBlock', {\n    filter: function (node) {\n      var firstChild = node.firstChild;\n      return (\n        node.nodeName === 'DIV' &&\n        highlightRegExp.test(node.className) &&\n        firstChild &&\n        firstChild.nodeName === 'PRE'\n      )\n    },\n    replacement: function (content, node, options) {\n      var className = node.className || '';\n      var language = (className.match(highlightRegExp) || [null, ''])[1];\n\n      return (\n        '\\n\\n' + options.fence + language + '\\n' +\n        node.firstChild.textContent +\n        '\\n' + options.fence + '\\n\\n'\n      )\n    }\n  });\n}\n\nfunction strikethrough (turndownService) {\n  turndownService.addRule('strikethrough', {\n    filter: ['del', 's', 'strike'],\n    replacement: function (content) {\n      return '~' + content + '~'\n    }\n  });\n}\n\nvar indexOf = Array.prototype.indexOf;\nvar every = Array.prototype.every;\nvar rules = {};\n\nrules.tableCell = {\n  filter: ['th', 'td'],\n  replacement: function (content, node) {\n    return cell(content, node)\n  }\n};\n\nrules.tableRow = {\n  filter: 'tr',\n  replacement: function (content, node) {\n    var borderCells = '';\n    var alignMap = { left: ':--', right: '--:', center: ':-:' };\n\n    if (isHeadingRow(node)) {\n      for (var i = 0; i < node.childNodes.length; i++) {\n        var border = '---';\n        var align = (\n          node.childNodes[i].getAttribute('align') || ''\n        ).toLowerCase();\n\n        if (align) border = alignMap[align] || border;\n\n        borderCells += cell(border, node.childNodes[i]);\n      }\n    }\n    return '\\n' + content + (borderCells ? '\\n' + borderCells : '')\n  }\n};\n\nrules.table = {\n  // Only convert tables with a heading row.\n  // Tables with no heading row are kept using `keep` (see below).\n  filter: function (node) {\n    return node.nodeName === 'TABLE' && isHeadingRow(node.rows[0])\n  },\n\n  replacement: function (content) {\n    // Ensure there are no blank lines\n    content = content.replace('\\n\\n', '\\n');\n    return '\\n\\n' + content + '\\n\\n'\n  }\n};\n\nrules.tableSection = {\n  filter: ['thead', 'tbody', 'tfoot'],\n  replacement: function (content) {\n    return content\n  }\n};\n\n// A tr is a heading row if:\n// - the parent is a THEAD\n// - or if its the first child of the TABLE or the first TBODY (possibly\n//   following a blank THEAD)\n// - and every cell is a TH\nfunction isHeadingRow (tr) {\n  var parentNode = tr.parentNode;\n  return (\n    parentNode.nodeName === 'THEAD' ||\n    (\n      parentNode.firstChild === tr &&\n      (parentNode.nodeName === 'TABLE' || isFirstTbody(parentNode)) &&\n      every.call(tr.childNodes, function (n) { return n.nodeName === 'TH' })\n    )\n  )\n}\n\nfunction isFirstTbody (element) {\n  var previousSibling = element.previousSibling;\n  return (\n    element.nodeName === 'TBODY' && (\n      !previousSibling ||\n      (\n        previousSibling.nodeName === 'THEAD' &&\n        /^\\s*$/i.test(previousSibling.textContent)\n      )\n    )\n  )\n}\n\nfunction cell (content, node) {\n  var index = indexOf.call(node.parentNode.childNodes, node);\n  var prefix = ' ';\n  if (index === 0) prefix = '| ';\n  return prefix + content + ' |'\n}\n\nfunction tables (turndownService) {\n  turndownService.keep(function (node) {\n    return node.nodeName === 'TABLE' && !isHeadingRow(node.rows[0])\n  });\n  for (var key in rules) turndownService.addRule(key, rules[key]);\n}\n\nfunction taskListItems (turndownService) {\n  turndownService.addRule('taskListItems', {\n    filter: function (node) {\n      return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'\n    },\n    replacement: function (content, node) {\n      return (node.checked ? '[x]' : '[ ]') + ' '\n    }\n  });\n}\n\nfunction gfm (turndownService) {\n  turndownService.use([\n    highlightedCodeBlock,\n    strikethrough,\n    tables,\n    taskListItems\n  ]);\n}\n\nexport { gfm, highlightedCodeBlock, strikethrough, tables, taskListItems };\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\nimport { UpcastWriter, Matcher, ViewDocument, DomConverter } from '@ckeditor/ckeditor5-engine/dist/index.js';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module paste-from-office/filters/utils\n */ /**\n * Normalizes CSS length value to 'px'.\n *\n * @internal\n */ function convertCssLengthToPx(value) {\n    const numericValue = parseFloat(value);\n    if (value.endsWith('pt')) {\n        // 1pt = 1in / 72\n        return toPx(numericValue * 96 / 72);\n    } else if (value.endsWith('pc')) {\n        // 1pc = 12pt = 1in / 6.\n        return toPx(numericValue * 12 * 96 / 72);\n    } else if (value.endsWith('in')) {\n        // 1in = 2.54cm = 96px\n        return toPx(numericValue * 96);\n    } else if (value.endsWith('cm')) {\n        // 1cm = 96px / 2.54\n        return toPx(numericValue * 96 / 2.54);\n    } else if (value.endsWith('mm')) {\n        // 1mm = 1cm / 10\n        return toPx(numericValue / 10 * 96 / 2.54);\n    }\n    return value;\n}\n/**\n * Returns true for value with 'px' unit.\n *\n * @internal\n */ function isPx(value) {\n    return value !== undefined && value.endsWith('px');\n}\n/**\n * Returns a rounded 'px' value.\n *\n * @internal\n */ function toPx(value) {\n    return value.toFixed(2).replace(/\\.?0+$/, '') + 'px';\n}\n\n/**\n * Transforms Word specific list-like elements to the semantic HTML lists.\n *\n * Lists in Word are represented by block elements with special attributes like:\n *\n * ```xml\n * <p class=MsoListParagraphCxSpFirst style='mso-list:l1 level1 lfo1'>...</p> // Paragraph based list.\n * <h1 style='mso-list:l0 level1 lfo1'>...</h1> // Heading 1 based list.\n * ```\n *\n * @param documentFragment The view structure to be transformed.\n * @param stylesString Styles from which list-like elements styling will be extracted.\n */ function transformListItemLikeElementsIntoLists(documentFragment, stylesString, hasMultiLevelListPlugin) {\n    if (!documentFragment.childCount) {\n        return;\n    }\n    const writer = new UpcastWriter(documentFragment.document);\n    const itemLikeElements = findAllItemLikeElements(documentFragment, writer);\n    if (!itemLikeElements.length) {\n        return;\n    }\n    const encounteredLists = {};\n    const stack = [];\n    for (const itemLikeElement of itemLikeElements){\n        if (itemLikeElement.indent !== undefined) {\n            if (!isListContinuation(itemLikeElement)) {\n                stack.length = 0;\n            }\n            // Combined list ID for addressing encounter lists counters.\n            const originalListId = `${itemLikeElement.id}:${itemLikeElement.indent}`;\n            // Normalized list item indentation.\n            const indent = Math.min(itemLikeElement.indent - 1, stack.length);\n            // Trimming of the list stack on list ID change.\n            if (indent < stack.length && stack[indent].id !== itemLikeElement.id) {\n                stack.length = indent;\n            }\n            // Trimming of the list stack on lower indent list encountered.\n            if (indent < stack.length - 1) {\n                stack.length = indent + 1;\n            } else {\n                const listStyle = detectListStyle(itemLikeElement, stylesString);\n                // Create a new OL/UL if required (greater indent or different list type).\n                if (indent > stack.length - 1 || stack[indent].listElement.name != listStyle.type) {\n                    // Check if there is some start index to set from a previous list.\n                    if (indent == 0 && listStyle.type == 'ol' && itemLikeElement.id !== undefined && encounteredLists[originalListId]) {\n                        listStyle.startIndex = encounteredLists[originalListId];\n                    }\n                    const listElement = createNewEmptyList(listStyle, writer, hasMultiLevelListPlugin);\n                    // Apply list padding only if we have margins for the item and the parent item.\n                    if (isPx(itemLikeElement.marginLeft) && (indent == 0 || isPx(stack[indent - 1].marginLeft))) {\n                        let marginLeft = itemLikeElement.marginLeft;\n                        if (indent > 0) {\n                            // Convert the padding from absolute to relative.\n                            marginLeft = toPx(parseFloat(marginLeft) - parseFloat(stack[indent - 1].marginLeft));\n                        }\n                        writer.setStyle('padding-left', marginLeft, listElement);\n                    }\n                    // Insert the new OL/UL.\n                    if (stack.length == 0) {\n                        const parent = itemLikeElement.element.parent;\n                        const index = parent.getChildIndex(itemLikeElement.element) + 1;\n                        writer.insertChild(index, listElement, parent);\n                    } else {\n                        const parentListItems = stack[indent - 1].listItemElements;\n                        writer.appendChild(listElement, parentListItems[parentListItems.length - 1]);\n                    }\n                    // Update the list stack for other items to reference.\n                    stack[indent] = {\n                        ...itemLikeElement,\n                        listElement,\n                        listItemElements: []\n                    };\n                    // Prepare list counter for start index.\n                    if (indent == 0 && itemLikeElement.id !== undefined) {\n                        encounteredLists[originalListId] = listStyle.startIndex || 1;\n                    }\n                }\n            }\n            // Use LI if it is already it or create a new LI element.\n            // https://github.com/ckeditor/ckeditor5/issues/15964\n            const listItem = itemLikeElement.element.name == 'li' ? itemLikeElement.element : writer.createElement('li');\n            // Append the LI to OL/UL.\n            writer.appendChild(listItem, stack[indent].listElement);\n            stack[indent].listItemElements.push(listItem);\n            // Increment list counter.\n            if (indent == 0 && itemLikeElement.id !== undefined) {\n                encounteredLists[originalListId]++;\n            }\n            // Append list block to LI.\n            if (itemLikeElement.element != listItem) {\n                writer.appendChild(itemLikeElement.element, listItem);\n            }\n            // Clean list block.\n            removeBulletElement(itemLikeElement.element, writer);\n            writer.removeStyle('text-indent', itemLikeElement.element); // #12361\n            writer.removeStyle('margin-left', itemLikeElement.element);\n        } else {\n            // Other blocks in a list item.\n            const stackItem = stack.find((stackItem)=>stackItem.marginLeft == itemLikeElement.marginLeft);\n            // This might be a paragraph that has known margin, but it is not a real list block.\n            if (stackItem) {\n                const listItems = stackItem.listItemElements;\n                // Append block to LI.\n                writer.appendChild(itemLikeElement.element, listItems[listItems.length - 1]);\n                writer.removeStyle('margin-left', itemLikeElement.element);\n            } else {\n                stack.length = 0;\n            }\n        }\n    }\n}\n/**\n * Removes paragraph wrapping content inside a list item.\n */ function unwrapParagraphInListItem(documentFragment, writer) {\n    for (const value of writer.createRangeIn(documentFragment)){\n        const element = value.item;\n        if (element.is('element', 'li')) {\n            // Google Docs allows for single paragraph inside LI.\n            const firstChild = element.getChild(0);\n            if (firstChild && firstChild.is('element', 'p')) {\n                writer.unwrapElement(firstChild);\n            }\n        }\n    }\n}\n/**\n * Finds all list-like elements in a given document fragment.\n *\n * @param documentFragment Document fragment in which to look for list-like nodes.\n * @returns Array of found list-like items. Each item is an object containing:\n */ function findAllItemLikeElements(documentFragment, writer) {\n    const range = writer.createRangeIn(documentFragment);\n    const itemLikeElements = [];\n    const foundMargins = new Set();\n    for (const item of range.getItems()){\n        // https://github.com/ckeditor/ckeditor5/issues/15964\n        if (!item.is('element') || !item.name.match(/^(p|h\\d+|li|div)$/)) {\n            continue;\n        }\n        // Try to rely on margin-left style to find paragraphs visually aligned with previously encountered list item.\n        let marginLeft = getMarginLeftNormalized(item);\n        // Ignore margin-left 0 style if there is no MsoList... class.\n        if (marginLeft !== undefined && parseFloat(marginLeft) == 0 && !Array.from(item.getClassNames()).find((className)=>className.startsWith('MsoList'))) {\n            marginLeft = undefined;\n        }\n        // List item or a following list item block.\n        if (item.hasStyle('mso-list') || marginLeft !== undefined && foundMargins.has(marginLeft)) {\n            const itemData = getListItemData(item);\n            itemLikeElements.push({\n                element: item,\n                id: itemData.id,\n                order: itemData.order,\n                indent: itemData.indent,\n                marginLeft\n            });\n            if (marginLeft !== undefined) {\n                foundMargins.add(marginLeft);\n            }\n        } else {\n            foundMargins.clear();\n        }\n    }\n    return itemLikeElements;\n}\n/**\n * Whether the given element is possibly a list continuation. Previous element was wrapped into a list\n * or the current element already is inside a list.\n */ function isListContinuation(currentItem) {\n    const previousSibling = currentItem.element.previousSibling;\n    if (!previousSibling) {\n        // If it's a li inside ul or ol like in here: https://github.com/ckeditor/ckeditor5/issues/15964.\n        return isList(currentItem.element.parent);\n    }\n    // Even with the same id the list does not have to be continuous (#43).\n    return isList(previousSibling);\n}\nfunction isList(element) {\n    return element.is('element', 'ol') || element.is('element', 'ul');\n}\n/**\n * Extracts list item style from the provided CSS.\n *\n * List item style is extracted from the CSS stylesheet. Each list with its specific style attribute\n * value (`mso-list:l1 level1 lfo1`) has its dedicated properties in a CSS stylesheet defined with a selector like:\n *\n * ```css\n * @list l1:level1 { ... }\n * ```\n *\n * It contains `mso-level-number-format` property which defines list numbering/bullet style. If this property\n * is not defined it means default `decimal` numbering.\n *\n * Here CSS string representation is used as `mso-level-number-format` property is an invalid CSS property\n * and will be removed during CSS parsing.\n *\n * @param listLikeItem List-like item for which list style will be searched for. Usually\n * a result of `findAllItemLikeElements()` function.\n * @param stylesString CSS stylesheet.\n * @returns An object with properties:\n *\n * * type - List type, could be `ul` or `ol`.\n * * startIndex - List start index, valid only for ordered lists.\n * * style - List style, for example: `decimal`, `lower-roman`, etc. It is extracted\n *     directly from Word stylesheet and adjusted to represent proper values for the CSS `list-style-type` property.\n *     If it cannot be adjusted, the `null` value is returned.\n */ function detectListStyle(listLikeItem, stylesString) {\n    const listStyleRegexp = new RegExp(`@list l${listLikeItem.id}:level${listLikeItem.indent}\\\\s*({[^}]*)`, 'gi');\n    const listStyleTypeRegex = /mso-level-number-format:([^;]{0,100});/gi;\n    const listStartIndexRegex = /mso-level-start-at:\\s{0,100}([0-9]{0,10})\\s{0,100};/gi;\n    const legalStyleListRegex = new RegExp(`@list\\\\s+l${listLikeItem.id}:level\\\\d\\\\s*{[^{]*mso-level-text:\"%\\\\d\\\\\\\\.`, 'gi');\n    const multiLevelNumberFormatTypeRegex = new RegExp(`@list l${listLikeItem.id}:level\\\\d\\\\s*{[^{]*mso-level-number-format:`, 'gi');\n    const legalStyleListMatch = legalStyleListRegex.exec(stylesString);\n    const multiLevelNumberFormatMatch = multiLevelNumberFormatTypeRegex.exec(stylesString);\n    // Multi level lists in Word have mso-level-number-format attribute except legal lists,\n    // so we used that. If list has legal list match and doesn't has mso-level-number-format\n    // then this is legal-list.\n    const islegalStyleList = legalStyleListMatch && !multiLevelNumberFormatMatch;\n    const listStyleMatch = listStyleRegexp.exec(stylesString);\n    let listStyleType = 'decimal'; // Decimal is default one.\n    let type = 'ol'; // <ol> is default list.\n    let startIndex = null;\n    if (listStyleMatch && listStyleMatch[1]) {\n        const listStyleTypeMatch = listStyleTypeRegex.exec(listStyleMatch[1]);\n        if (listStyleTypeMatch && listStyleTypeMatch[1]) {\n            listStyleType = listStyleTypeMatch[1].trim();\n            type = listStyleType !== 'bullet' && listStyleType !== 'image' ? 'ol' : 'ul';\n        }\n        // Styles for the numbered lists are always defined in the Word CSS stylesheet.\n        // Unordered lists MAY contain a value for the Word CSS definition `mso-level-text` but sometimes\n        // this tag is missing. And because of that, we cannot depend on that. We need to predict the list style value\n        // based on the list style marker element.\n        if (listStyleType === 'bullet') {\n            const bulletedStyle = findBulletedListStyle(listLikeItem.element);\n            if (bulletedStyle) {\n                listStyleType = bulletedStyle;\n            }\n        } else {\n            const listStartIndexMatch = listStartIndexRegex.exec(listStyleMatch[1]);\n            if (listStartIndexMatch && listStartIndexMatch[1]) {\n                startIndex = parseInt(listStartIndexMatch[1]);\n            }\n        }\n        if (islegalStyleList) {\n            type = 'ol';\n        }\n    }\n    return {\n        type,\n        startIndex,\n        style: mapListStyleDefinition(listStyleType),\n        isLegalStyleList: islegalStyleList\n    };\n}\n/**\n * Tries to extract the `list-style-type` value based on the marker element for bulleted list.\n */ function findBulletedListStyle(element) {\n    // https://github.com/ckeditor/ckeditor5/issues/15964\n    if (element.name == 'li' && element.parent.name == 'ul' && element.parent.hasAttribute('type')) {\n        return element.parent.getAttribute('type');\n    }\n    const listMarkerElement = findListMarkerNode(element);\n    if (!listMarkerElement) {\n        return null;\n    }\n    const listMarker = listMarkerElement._data;\n    if (listMarker === 'o') {\n        return 'circle';\n    } else if (listMarker === '·') {\n        return 'disc';\n    } else if (listMarker === '§') {\n        return 'square';\n    }\n    return null;\n}\n/**\n * Tries to find a text node that represents the marker element (list-style-type).\n */ function findListMarkerNode(element) {\n    // If the first child is a text node, it is the data for the element.\n    // The list-style marker is not present here.\n    if (element.getChild(0).is('$text')) {\n        return null;\n    }\n    for (const childNode of element.getChildren()){\n        // The list-style marker will be inside the `<span>` element. Let's ignore all non-span elements.\n        // It may happen that the `<a>` element is added as the first child. Most probably, it's an anchor element.\n        if (!childNode.is('element', 'span')) {\n            continue;\n        }\n        const textNodeOrElement = childNode.getChild(0);\n        if (!textNodeOrElement) {\n            continue;\n        }\n        // If already found the marker element, use it.\n        if (textNodeOrElement.is('$text')) {\n            return textNodeOrElement;\n        }\n        return textNodeOrElement.getChild(0);\n    }\n    /* istanbul ignore next -- @preserve */ return null;\n}\n/**\n * Parses the `list-style-type` value extracted directly from the Word CSS stylesheet and returns proper CSS definition.\n */ function mapListStyleDefinition(value) {\n    if (value.startsWith('arabic-leading-zero')) {\n        return 'decimal-leading-zero';\n    }\n    switch(value){\n        case 'alpha-upper':\n            return 'upper-alpha';\n        case 'alpha-lower':\n            return 'lower-alpha';\n        case 'roman-upper':\n            return 'upper-roman';\n        case 'roman-lower':\n            return 'lower-roman';\n        case 'circle':\n        case 'disc':\n        case 'square':\n            return value;\n        default:\n            return null;\n    }\n}\n/**\n * Creates a new list OL/UL element.\n */ function createNewEmptyList(listStyle, writer, hasMultiLevelListPlugin) {\n    const list = writer.createElement(listStyle.type);\n    // We do not support modifying the marker for a particular list item.\n    // Set the value for the `list-style-type` property directly to the list container.\n    if (listStyle.style) {\n        writer.setStyle('list-style-type', listStyle.style, list);\n    }\n    if (listStyle.startIndex && listStyle.startIndex > 1) {\n        writer.setAttribute('start', listStyle.startIndex, list);\n    }\n    if (listStyle.isLegalStyleList && hasMultiLevelListPlugin) {\n        writer.addClass('legal-list', list);\n    }\n    return list;\n}\n/**\n * Extracts list item information from Word specific list-like element style:\n *\n * ```\n * `style=\"mso-list:l1 level1 lfo1\"`\n * ```\n *\n * where:\n *\n * ```\n * * `l1` is a list id (however it does not mean this is a continuous list - see #43),\n * * `level1` is a list item indentation level,\n * * `lfo1` is a list insertion order in a document.\n * ```\n *\n * @param element Element from which style data is extracted.\n */ function getListItemData(element) {\n    const listStyle = element.getStyle('mso-list');\n    if (listStyle === undefined) {\n        return {};\n    }\n    const idMatch = listStyle.match(/(^|\\s{1,100})l(\\d+)/i);\n    const orderMatch = listStyle.match(/\\s{0,100}lfo(\\d+)/i);\n    const indentMatch = listStyle.match(/\\s{0,100}level(\\d+)/i);\n    if (idMatch && orderMatch && indentMatch) {\n        return {\n            id: idMatch[2],\n            order: orderMatch[1],\n            indent: parseInt(indentMatch[1])\n        };\n    }\n    return {\n        indent: 1 // Handle empty mso-list style as a marked for default list item.\n    };\n}\n/**\n * Removes span with a numbering/bullet from a given element.\n */ function removeBulletElement(element, writer) {\n    // Matcher for finding `span` elements holding lists numbering/bullets.\n    const bulletMatcher = new Matcher({\n        name: 'span',\n        styles: {\n            'mso-list': 'Ignore'\n        }\n    });\n    const range = writer.createRangeIn(element);\n    for (const value of range){\n        if (value.type === 'elementStart' && bulletMatcher.match(value.item)) {\n            writer.remove(value.item);\n        }\n    }\n}\n/**\n * Returns element left margin normalized to 'px' if possible.\n */ function getMarginLeftNormalized(element) {\n    const value = element.getStyle('margin-left');\n    if (value === undefined || value.endsWith('px')) {\n        return value;\n    }\n    return convertCssLengthToPx(value);\n}\n\n/**\n * Replaces source attribute of all `<img>` elements representing regular\n * images (not the Word shapes) with inlined base64 image representation extracted from RTF or Blob data.\n *\n * @param documentFragment Document fragment on which transform images.\n * @param rtfData The RTF data from which images representation will be used.\n */ function replaceImagesSourceWithBase64(documentFragment, rtfData) {\n    if (!documentFragment.childCount) {\n        return;\n    }\n    const upcastWriter = new UpcastWriter(documentFragment.document);\n    const shapesIds = findAllShapesIds(documentFragment, upcastWriter);\n    removeAllImgElementsRepresentingShapes(shapesIds, documentFragment, upcastWriter);\n    insertMissingImgs(shapesIds, documentFragment, upcastWriter);\n    removeAllShapeElements(documentFragment, upcastWriter);\n    const images = findAllImageElementsWithLocalSource(documentFragment, upcastWriter);\n    if (images.length) {\n        replaceImagesFileSourceWithInlineRepresentation(images, extractImageDataFromRtf(rtfData), upcastWriter);\n    }\n}\n/**\n * Converts given HEX string to base64 representation.\n *\n * @internal\n * @param hexString The HEX string to be converted.\n * @returns Base64 representation of a given HEX string.\n */ function _convertHexToBase64(hexString) {\n    return btoa(hexString.match(/\\w{2}/g).map((char)=>{\n        return String.fromCharCode(parseInt(char, 16));\n    }).join(''));\n}\n/**\n * Finds all shapes (`<v:*>...</v:*>`) ids. Shapes can represent images (canvas)\n * or Word shapes (which does not have RTF or Blob representation).\n *\n * @param documentFragment Document fragment from which to extract shape ids.\n * @returns Array of shape ids.\n */ function findAllShapesIds(documentFragment, writer) {\n    const range = writer.createRangeIn(documentFragment);\n    const shapeElementsMatcher = new Matcher({\n        name: /v:(.+)/\n    });\n    const shapesIds = [];\n    for (const value of range){\n        if (value.type != 'elementStart') {\n            continue;\n        }\n        const el = value.item;\n        const previousSibling = el.previousSibling;\n        const prevSiblingName = previousSibling && previousSibling.is('element') ? previousSibling.name : null;\n        // List of ids which should not be considered as shapes.\n        // https://github.com/ckeditor/ckeditor5/pull/15847#issuecomment-1941543983\n        const exceptionIds = [\n            'Chart'\n        ];\n        const isElementAShape = shapeElementsMatcher.match(el);\n        const hasElementGfxdataAttribute = el.getAttribute('o:gfxdata');\n        const isPreviousSiblingAShapeType = prevSiblingName === 'v:shapetype';\n        const isElementIdInExceptionsArray = hasElementGfxdataAttribute && exceptionIds.some((item)=>el.getAttribute('id').includes(item));\n        // If shape element has 'o:gfxdata' attribute and is not directly before\n        // `<v:shapetype>` element it means that it represents a Word shape.\n        if (isElementAShape && hasElementGfxdataAttribute && !isPreviousSiblingAShapeType && !isElementIdInExceptionsArray) {\n            shapesIds.push(value.item.getAttribute('id'));\n        }\n    }\n    return shapesIds;\n}\n/**\n * Removes all `<img>` elements which represents Word shapes and not regular images.\n *\n * @param shapesIds Shape ids which will be checked against `<img>` elements.\n * @param documentFragment Document fragment from which to remove `<img>` elements.\n */ function removeAllImgElementsRepresentingShapes(shapesIds, documentFragment, writer) {\n    const range = writer.createRangeIn(documentFragment);\n    const imageElementsMatcher = new Matcher({\n        name: 'img'\n    });\n    const imgs = [];\n    for (const value of range){\n        if (value.item.is('element') && imageElementsMatcher.match(value.item)) {\n            const el = value.item;\n            const shapes = el.getAttribute('v:shapes') ? el.getAttribute('v:shapes').split(' ') : [];\n            if (shapes.length && shapes.every((shape)=>shapesIds.indexOf(shape) > -1)) {\n                imgs.push(el);\n            // Shapes may also have empty source while content is paste in some browsers (Safari).\n            } else if (!el.getAttribute('src')) {\n                imgs.push(el);\n            }\n        }\n    }\n    for (const img of imgs){\n        writer.remove(img);\n    }\n}\n/**\n * Removes all shape elements (`<v:*>...</v:*>`) so they do not pollute the output structure.\n *\n * @param documentFragment Document fragment from which to remove shape elements.\n */ function removeAllShapeElements(documentFragment, writer) {\n    const range = writer.createRangeIn(documentFragment);\n    const shapeElementsMatcher = new Matcher({\n        name: /v:(.+)/\n    });\n    const shapes = [];\n    for (const value of range){\n        if (value.type == 'elementStart' && shapeElementsMatcher.match(value.item)) {\n            shapes.push(value.item);\n        }\n    }\n    for (const shape of shapes){\n        writer.remove(shape);\n    }\n}\n/**\n * Inserts `img` tags if there is none after a shape.\n */ function insertMissingImgs(shapeIds, documentFragment, writer) {\n    const range = writer.createRangeIn(documentFragment);\n    const shapes = [];\n    for (const value of range){\n        if (value.type == 'elementStart' && value.item.is('element', 'v:shape')) {\n            const id = value.item.getAttribute('id');\n            if (shapeIds.includes(id)) {\n                continue;\n            }\n            if (!containsMatchingImg(value.item.parent.getChildren(), id)) {\n                shapes.push(value.item);\n            }\n        }\n    }\n    for (const shape of shapes){\n        const attrs = {\n            src: findSrc(shape)\n        };\n        if (shape.hasAttribute('alt')) {\n            attrs.alt = shape.getAttribute('alt');\n        }\n        const img = writer.createElement('img', attrs);\n        writer.insertChild(shape.index + 1, img, shape.parent);\n    }\n    function containsMatchingImg(nodes, id) {\n        for (const node of nodes){\n            /* istanbul ignore else -- @preserve */ if (node.is('element')) {\n                if (node.name == 'img' && node.getAttribute('v:shapes') == id) {\n                    return true;\n                }\n                if (containsMatchingImg(node.getChildren(), id)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n    function findSrc(shape) {\n        for (const child of shape.getChildren()){\n            /* istanbul ignore else -- @preserve */ if (child.is('element') && child.getAttribute('src')) {\n                return child.getAttribute('src');\n            }\n        }\n    }\n}\n/**\n * Finds all `<img>` elements in a given document fragment which have source pointing to local `file://` resource.\n *\n * @param documentFragment Document fragment in which to look for `<img>` elements.\n * @returns result All found images grouped by source type.\n */ function findAllImageElementsWithLocalSource(documentFragment, writer) {\n    const range = writer.createRangeIn(documentFragment);\n    const imageElementsMatcher = new Matcher({\n        name: 'img'\n    });\n    const imgs = [];\n    for (const value of range){\n        if (value.item.is('element') && imageElementsMatcher.match(value.item)) {\n            if (value.item.getAttribute('src').startsWith('file://')) {\n                imgs.push(value.item);\n            }\n        }\n    }\n    return imgs;\n}\n/**\n * Extracts all images HEX representations from a given RTF data.\n *\n * @param rtfData The RTF data from which to extract images HEX representation.\n * @returns Array of found HEX representations. Each array item is an object containing:\n *\n * * hex Image representation in HEX format.\n * * type Type of image, `image/png` or `image/jpeg`.\n */ function extractImageDataFromRtf(rtfData) {\n    if (!rtfData) {\n        return [];\n    }\n    const regexPictureHeader = /{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?({\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s}]*?/;\n    const regexPicture = new RegExp('(?:(' + regexPictureHeader.source + '))([\\\\da-fA-F\\\\s]+)\\\\}', 'g');\n    const images = rtfData.match(regexPicture);\n    const result = [];\n    if (images) {\n        for (const image of images){\n            let imageType = false;\n            if (image.includes('\\\\pngblip')) {\n                imageType = 'image/png';\n            } else if (image.includes('\\\\jpegblip')) {\n                imageType = 'image/jpeg';\n            }\n            if (imageType) {\n                result.push({\n                    hex: image.replace(regexPictureHeader, '').replace(/[^\\da-fA-F]/g, ''),\n                    type: imageType\n                });\n            }\n        }\n    }\n    return result;\n}\n/**\n * Replaces `src` attribute value of all given images with the corresponding base64 image representation.\n *\n * @param imageElements Array of image elements which will have its source replaced.\n * @param imagesHexSources Array of images hex sources (usually the result of `extractImageDataFromRtf()` function).\n * The array should be the same length as `imageElements` parameter.\n */ function replaceImagesFileSourceWithInlineRepresentation(imageElements, imagesHexSources, writer) {\n    // Assume there is an equal amount of image elements and images HEX sources so they can be matched accordingly based on existing order.\n    if (imageElements.length === imagesHexSources.length) {\n        for(let i = 0; i < imageElements.length; i++){\n            const newSrc = `data:${imagesHexSources[i].type};base64,${_convertHexToBase64(imagesHexSources[i].hex)}`;\n            writer.setAttribute('src', newSrc, imageElements[i]);\n        }\n    }\n}\n\n/**\n * Cleanup MS attributes like styles, attributes and elements.\n *\n * @param documentFragment element `data.content` obtained from clipboard.\n */ function removeMSAttributes(documentFragment) {\n    const elementsToUnwrap = [];\n    const writer = new UpcastWriter(documentFragment.document);\n    for (const { item } of writer.createRangeIn(documentFragment)){\n        if (!item.is('element')) {\n            continue;\n        }\n        for (const className of item.getClassNames()){\n            if (/\\bmso/gi.exec(className)) {\n                writer.removeClass(className, item);\n            }\n        }\n        for (const styleName of item.getStyleNames()){\n            if (/\\bmso/gi.exec(styleName)) {\n                writer.removeStyle(styleName, item);\n            }\n        }\n        if (item.is('element', 'w:sdt') || item.is('element', 'w:sdtpr') && item.isEmpty || item.is('element', 'o:p') && item.isEmpty) {\n            elementsToUnwrap.push(item);\n        }\n    }\n    for (const item of elementsToUnwrap){\n        const itemParent = item.parent;\n        const childIndex = itemParent.getChildIndex(item);\n        writer.insertChild(childIndex, item.getChildren(), itemParent);\n        writer.remove(item);\n    }\n}\n\nconst msWordMatch1 = /<meta\\s*name=\"?generator\"?\\s*content=\"?microsoft\\s*word\\s*\\d+\"?\\/?>/i;\nconst msWordMatch2 = /xmlns:o=\"urn:schemas-microsoft-com/i;\n/**\n * Normalizer for the content pasted from Microsoft Word.\n */ class MSWordNormalizer {\n    document;\n    hasMultiLevelListPlugin;\n    /**\n\t * Creates a new `MSWordNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */ constructor(document, hasMultiLevelListPlugin = false){\n        this.document = document;\n        this.hasMultiLevelListPlugin = hasMultiLevelListPlugin;\n    }\n    /**\n\t * @inheritDoc\n\t */ isActive(htmlString) {\n        return msWordMatch1.test(htmlString) || msWordMatch2.test(htmlString);\n    }\n    /**\n\t * @inheritDoc\n\t */ execute(data) {\n        const { body: documentFragment, stylesString } = data._parsedData;\n        transformListItemLikeElementsIntoLists(documentFragment, stylesString, this.hasMultiLevelListPlugin);\n        replaceImagesSourceWithBase64(documentFragment, data.dataTransfer.getData('text/rtf'));\n        removeMSAttributes(documentFragment);\n        data.content = documentFragment;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module paste-from-office/filters/removeboldwrapper\n */ /**\n * Removes the `<b>` tag wrapper added by Google Docs to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */ function removeBoldWrapper(documentFragment, writer) {\n    for (const child of documentFragment.getChildren()){\n        if (child.is('element', 'b') && child.getStyle('font-weight') === 'normal') {\n            const childIndex = documentFragment.getChildIndex(child);\n            writer.remove(child);\n            writer.insertChild(childIndex, child.getChildren(), documentFragment);\n        }\n    }\n}\n\n/**\n * Transforms `<br>` elements that are siblings to some block element into a paragraphs.\n *\n * @param documentFragment The view structure to be transformed.\n */ function transformBlockBrsToParagraphs(documentFragment, writer) {\n    const viewDocument = new ViewDocument(writer.document.stylesProcessor);\n    const domConverter = new DomConverter(viewDocument, {\n        renderingMode: 'data'\n    });\n    const blockElements = domConverter.blockElements;\n    const inlineObjectElements = domConverter.inlineObjectElements;\n    const elementsToReplace = [];\n    for (const value of writer.createRangeIn(documentFragment)){\n        const element = value.item;\n        if (element.is('element', 'br')) {\n            const nextSibling = findSibling(element, 'forward', writer, {\n                blockElements,\n                inlineObjectElements\n            });\n            const previousSibling = findSibling(element, 'backward', writer, {\n                blockElements,\n                inlineObjectElements\n            });\n            const nextSiblingIsBlock = isBlockViewElement(nextSibling, blockElements);\n            const previousSiblingIsBlock = isBlockViewElement(previousSibling, blockElements);\n            // If the <br> is surrounded by blocks then convert it to a paragraph:\n            // * <p>foo</p>[<br>]<p>bar</p> -> <p>foo</p>[<p></p>]<p>bar</p>\n            // * <p>foo</p>[<br>] -> <p>foo</p>[<p></p>]\n            // * [<br>]<p>foo</p> -> [<p></p>]<p>foo</p>\n            if (previousSiblingIsBlock || nextSiblingIsBlock) {\n                elementsToReplace.push(element);\n            }\n        }\n    }\n    for (const element of elementsToReplace){\n        if (element.hasClass('Apple-interchange-newline')) {\n            writer.remove(element);\n        } else {\n            writer.replace(element, writer.createElement('p'));\n        }\n    }\n}\n/**\n * Returns sibling node, threats inline elements as transparent (but should stop on an inline objects).\n */ function findSibling(viewElement, direction, writer, { blockElements, inlineObjectElements }) {\n    let position = writer.createPositionAt(viewElement, direction == 'forward' ? 'after' : 'before');\n    // Find first position that is just before a first:\n    // * text node,\n    // * block element,\n    // * inline object element.\n    // It's ignoring any inline (non-object) elements like span, strong, etc.\n    position = position.getLastMatchingPosition(({ item })=>item.is('element') && !blockElements.includes(item.name) && !inlineObjectElements.includes(item.name), {\n        direction\n    });\n    return direction == 'forward' ? position.nodeAfter : position.nodeBefore;\n}\n/**\n * Returns true for view elements that are listed as block view elements.\n */ function isBlockViewElement(node, blockElements) {\n    return !!node && node.is('element') && blockElements.includes(node.name);\n}\n\nconst googleDocsMatch = /id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;\n/**\n * Normalizer for the content pasted from Google Docs.\n */ class GoogleDocsNormalizer {\n    document;\n    /**\n\t * Creates a new `GoogleDocsNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */ constructor(document){\n        this.document = document;\n    }\n    /**\n\t * @inheritDoc\n\t */ isActive(htmlString) {\n        return googleDocsMatch.test(htmlString);\n    }\n    /**\n\t * @inheritDoc\n\t */ execute(data) {\n        const writer = new UpcastWriter(this.document);\n        const { body: documentFragment } = data._parsedData;\n        removeBoldWrapper(documentFragment, writer);\n        unwrapParagraphInListItem(documentFragment, writer);\n        transformBlockBrsToParagraphs(documentFragment, writer);\n        data.content = documentFragment;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module paste-from-office/filters/removexmlns\n */ /**\n * Removes the `xmlns` attribute from table pasted from Google Sheets.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */ function removeXmlns(documentFragment, writer) {\n    for (const child of documentFragment.getChildren()){\n        if (child.is('element', 'table') && child.hasAttribute('xmlns')) {\n            writer.removeAttribute('xmlns', child);\n        }\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module paste-from-office/filters/removegooglesheetstag\n */ /**\n * Removes the `<google-sheets-html-origin>` tag wrapper added by Google Sheets to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */ function removeGoogleSheetsTag(documentFragment, writer) {\n    for (const child of documentFragment.getChildren()){\n        if (child.is('element', 'google-sheets-html-origin')) {\n            const childIndex = documentFragment.getChildIndex(child);\n            writer.remove(child);\n            writer.insertChild(childIndex, child.getChildren(), documentFragment);\n        }\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module paste-from-office/filters/removeinvalidtablewidth\n */ /**\n * Removes the `width:0px` style from table pasted from Google Sheets.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */ function removeInvalidTableWidth(documentFragment, writer) {\n    for (const child of documentFragment.getChildren()){\n        if (child.is('element', 'table') && child.getStyle('width') === '0px') {\n            writer.removeStyle('width', child);\n        }\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module paste-from-office/filters/removestyleblock\n */ /**\n * Removes `<style>` block added by Google Sheets to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */ function removeStyleBlock(documentFragment, writer) {\n    for (const child of Array.from(documentFragment.getChildren())){\n        if (child.is('element', 'style')) {\n            writer.remove(child);\n        }\n    }\n}\n\nconst googleSheetsMatch = /<google-sheets-html-origin/i;\n/**\n * Normalizer for the content pasted from Google Sheets.\n */ class GoogleSheetsNormalizer {\n    document;\n    /**\n\t * Creates a new `GoogleSheetsNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */ constructor(document){\n        this.document = document;\n    }\n    /**\n\t * @inheritDoc\n\t */ isActive(htmlString) {\n        return googleSheetsMatch.test(htmlString);\n    }\n    /**\n\t * @inheritDoc\n\t */ execute(data) {\n        const writer = new UpcastWriter(this.document);\n        const { body: documentFragment } = data._parsedData;\n        removeGoogleSheetsTag(documentFragment, writer);\n        removeXmlns(documentFragment, writer);\n        removeInvalidTableWidth(documentFragment, writer);\n        removeStyleBlock(documentFragment, writer);\n        data.content = documentFragment;\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module paste-from-office/filters/space\n */ /**\n * Replaces last space preceding elements closing tag with `&nbsp;`. Such operation prevents spaces from being removed\n * during further DOM/View processing (see especially {@link module:engine/view/domconverter~DomConverter#_processDomInlineNodes}).\n * This method also takes into account Word specific `<o:p></o:p>` empty tags.\n * Additionally multiline sequences of spaces and new lines between tags are removed (see #39 and #40).\n *\n * @param htmlString HTML string in which spacing should be normalized.\n * @returns Input HTML with spaces normalized.\n */ function normalizeSpacing(htmlString) {\n    // Run normalizeSafariSpaceSpans() two times to cover nested spans.\n    return normalizeSafariSpaceSpans(normalizeSafariSpaceSpans(htmlString))// Remove all \\r\\n from \"spacerun spans\" so the last replace line doesn't strip all whitespaces.\n    .replace(/(<span\\s+style=['\"]mso-spacerun:yes['\"]>[^\\S\\r\\n]*?)[\\r\\n]+([^\\S\\r\\n]*<\\/span>)/g, '$1$2').replace(/<span\\s+style=['\"]mso-spacerun:yes['\"]><\\/span>/g, '').replace(/(<span\\s+style=['\"]letter-spacing:[^'\"]+?['\"]>)[\\r\\n]+(<\\/span>)/g, '$1 $2').replace(/ <\\//g, '\\u00A0</').replace(/ <o:p><\\/o:p>/g, '\\u00A0<o:p></o:p>')// Remove <o:p> block filler from empty paragraph. Safari uses \\u00A0 instead of &nbsp;.\n    .replace(/<o:p>(&nbsp;|\\u00A0)<\\/o:p>/g, '')// Remove all whitespaces when they contain any \\r or \\n.\n    .replace(/>([^\\S\\r\\n]*[\\r\\n]\\s*)</g, '><');\n}\n/**\n * Normalizes spacing in special Word `spacerun spans` (`<span style='mso-spacerun:yes'>\\s+</span>`) by replacing\n * all spaces with `&nbsp; ` pairs. This prevents spaces from being removed during further DOM/View processing\n * (see especially {@link module:engine/view/domconverter~DomConverter#_processDomInlineNodes}).\n *\n * @param htmlDocument Native `Document` object in which spacing should be normalized.\n */ function normalizeSpacerunSpans(htmlDocument) {\n    htmlDocument.querySelectorAll('span[style*=spacerun]').forEach((el)=>{\n        const htmlElement = el;\n        const innerTextLength = htmlElement.innerText.length || 0;\n        htmlElement.innerText = Array(innerTextLength + 1).join('\\u00A0 ').substr(0, innerTextLength);\n    });\n}\n/**\n * Normalizes specific spacing generated by Safari when content pasted from Word (`<span class=\"Apple-converted-space\"> </span>`)\n * by replacing all spaces sequences longer than 1 space with `&nbsp; ` pairs. This prevents spaces from being removed during\n * further DOM/View processing (see especially {@link module:engine/view/domconverter~DomConverter#_processDataFromDomText}).\n *\n * This function is similar to {@link module:clipboard/utils/normalizeclipboarddata normalizeClipboardData util} but uses\n * regular spaces / &nbsp; sequence for replacement.\n *\n * @param htmlString HTML string in which spacing should be normalized\n * @returns Input HTML with spaces normalized.\n */ function normalizeSafariSpaceSpans(htmlString) {\n    return htmlString.replace(/<span(?: class=\"Apple-converted-space\"|)>(\\s+)<\\/span>/g, (fullMatch, spaces)=>{\n        return spaces.length === 1 ? ' ' : Array(spaces.length + 1).join('\\u00A0 ').substr(0, spaces.length);\n    });\n}\n\n/**\n * Parses the provided HTML extracting contents of `<body>` and `<style>` tags.\n *\n * @param htmlString HTML string to be parsed.\n */ function parseHtml(htmlString, stylesProcessor) {\n    const domParser = new DOMParser();\n    // Remove Word specific \"if comments\" so content inside is not omitted by the parser.\n    htmlString = htmlString.replace(/<!--\\[if gte vml 1]>/g, '');\n    // Clean the <head> section of MS Windows specific tags. See https://github.com/ckeditor/ckeditor5/issues/15333.\n    // The regular expression matches the <o:SmartTagType> tag with optional attributes (with or without values).\n    htmlString = htmlString.replace(/<o:SmartTagType(?:\\s+[^\\s>=]+(?:=\"[^\"]*\")?)*\\s*\\/?>/gi, '');\n    const normalizedHtml = normalizeSpacing(cleanContentAfterBody(htmlString));\n    // Parse htmlString as native Document object.\n    const htmlDocument = domParser.parseFromString(normalizedHtml, 'text/html');\n    normalizeSpacerunSpans(htmlDocument);\n    // Get `innerHTML` first as transforming to View modifies the source document.\n    const bodyString = htmlDocument.body.innerHTML;\n    // Transform document.body to View.\n    const bodyView = documentToView(htmlDocument, stylesProcessor);\n    // Extract stylesheets.\n    const stylesObject = extractStyles(htmlDocument);\n    return {\n        body: bodyView,\n        bodyString,\n        styles: stylesObject.styles,\n        stylesString: stylesObject.stylesString\n    };\n}\n/**\n * Transforms native `Document` object into {@link module:engine/view/documentfragment~DocumentFragment}. Comments are skipped.\n *\n * @param htmlDocument Native `Document` object to be transformed.\n */ function documentToView(htmlDocument, stylesProcessor) {\n    const viewDocument = new ViewDocument(stylesProcessor);\n    const domConverter = new DomConverter(viewDocument, {\n        renderingMode: 'data'\n    });\n    const fragment = htmlDocument.createDocumentFragment();\n    const nodes = htmlDocument.body.childNodes;\n    while(nodes.length > 0){\n        fragment.appendChild(nodes[0]);\n    }\n    return domConverter.domToView(fragment, {\n        skipComments: true\n    });\n}\n/**\n * Extracts both `CSSStyleSheet` and string representation from all `style` elements available in a provided `htmlDocument`.\n *\n * @param htmlDocument Native `Document` object from which styles will be extracted.\n */ function extractStyles(htmlDocument) {\n    const styles = [];\n    const stylesString = [];\n    const styleTags = Array.from(htmlDocument.getElementsByTagName('style'));\n    for (const style of styleTags){\n        if (style.sheet && style.sheet.cssRules && style.sheet.cssRules.length) {\n            styles.push(style.sheet);\n            stylesString.push(style.innerHTML);\n        }\n    }\n    return {\n        styles,\n        stylesString: stylesString.join(' ')\n    };\n}\n/**\n * Removes leftover content from between closing </body> and closing </html> tag:\n *\n * ```html\n * <html><body><p>Foo Bar</p></body><span>Fo</span></html> -> <html><body><p>Foo Bar</p></body></html>\n * ```\n *\n * This function is used as specific browsers (Edge) add some random content after `body` tag when pasting from Word.\n * @param htmlString The HTML string to be cleaned.\n * @returns The HTML string with leftover content removed.\n */ function cleanContentAfterBody(htmlString) {\n    const bodyCloseTag = '</body>';\n    const htmlCloseTag = '</html>';\n    const bodyCloseIndex = htmlString.indexOf(bodyCloseTag);\n    if (bodyCloseIndex < 0) {\n        return htmlString;\n    }\n    const htmlCloseIndex = htmlString.indexOf(htmlCloseTag, bodyCloseIndex + bodyCloseTag.length);\n    return htmlString.substring(0, bodyCloseIndex + bodyCloseTag.length) + (htmlCloseIndex >= 0 ? htmlString.substring(htmlCloseIndex) : '');\n}\n\n/**\n * The Paste from Office plugin.\n *\n * This plugin handles content pasted from Office apps and transforms it (if necessary)\n * to a valid structure which can then be understood by the editor features.\n *\n * Transformation is made by a set of predefined {@link module:paste-from-office/normalizer~Normalizer normalizers}.\n * This plugin includes following normalizers:\n * * {@link module:paste-from-office/normalizers/mswordnormalizer~MSWordNormalizer Microsoft Word normalizer}\n * * {@link module:paste-from-office/normalizers/googledocsnormalizer~GoogleDocsNormalizer Google Docs normalizer}\n *\n * For more information about this feature check the {@glink api/paste-from-office package page}.\n */ class PasteFromOffice extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'PasteFromOffice';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ClipboardPipeline\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n        const viewDocument = editor.editing.view.document;\n        const normalizers = [];\n        const hasMultiLevelListPlugin = this.editor.plugins.has('MultiLevelList');\n        normalizers.push(new MSWordNormalizer(viewDocument, hasMultiLevelListPlugin));\n        normalizers.push(new GoogleDocsNormalizer(viewDocument));\n        normalizers.push(new GoogleSheetsNormalizer(viewDocument));\n        clipboardPipeline.on('inputTransformation', (evt, data)=>{\n            if (data._isTransformedWithPasteFromOffice) {\n                return;\n            }\n            const codeBlock = editor.model.document.selection.getFirstPosition().parent;\n            if (codeBlock.is('element', 'codeBlock')) {\n                return;\n            }\n            const htmlString = data.dataTransfer.getData('text/html');\n            const activeNormalizer = normalizers.find((normalizer)=>normalizer.isActive(htmlString));\n            if (activeNormalizer) {\n                if (!data._parsedData) {\n                    data._parsedData = parseHtml(htmlString, viewDocument.stylesProcessor);\n                }\n                activeNormalizer.execute(data);\n                data._isTransformedWithPasteFromOffice = true;\n            }\n        }, {\n            priority: 'high'\n        });\n    }\n}\n\nexport { MSWordNormalizer, PasteFromOffice, parseHtml };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { CKEditorError, toMap, uid, Rect, keyCodes, Collection, logWarning, env } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ListView, View, ListItemView, ContextualBalloon, clickOutsideHandler, ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { TextWatcher } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { debounce } from 'lodash-es';\n\nconst BRACKET_PAIRS = {\n    '(': ')',\n    '[': ']',\n    '{': '}'\n};\n/**\n * The mention command.\n *\n * The command is registered by {@link module:mention/mentionediting~MentionEditing} as `'mention'`.\n *\n * To insert a mention into a range, execute the command and specify a mention object with a range to replace:\n *\n * ```ts\n * const focus = editor.model.document.selection.focus;\n *\n * // It will replace one character before the selection focus with the '#1234' text\n * // with the mention attribute filled with passed attributes.\n * editor.execute( 'mention', {\n * \tmarker: '#',\n * \tmention: {\n * \t\tid: '#1234',\n * \t\tname: 'Foo',\n * \t\ttitle: 'Big Foo'\n * \t},\n * \trange: editor.model.createRange( focus.getShiftedBy( -1 ), focus )\n * } );\n *\n * // It will replace one character before the selection focus with the 'The \"Big Foo\"' text\n * // with the mention attribute filled with passed attributes.\n * editor.execute( 'mention', {\n * \tmarker: '#',\n * \tmention: {\n * \t\tid: '#1234',\n * \t\tname: 'Foo',\n * \t\ttitle: 'Big Foo'\n * \t},\n * \ttext: 'The \"Big Foo\"',\n * \trange: editor.model.createRange( focus.getShiftedBy( -1 ), focus )\n * } );\n *\t```\n */ class MentionCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // Since this command may pass range in execution parameters, it should be checked directly in execute block.\n        this._isEnabledBasedOnSelection = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const doc = model.document;\n        this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, 'mention');\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.mention The mention object to insert. When a string is passed, it will be used to create a plain\n\t * object with the name attribute that equals the passed string.\n\t * @param options.marker The marker character (e.g. `'@'`).\n\t * @param options.text The text of the inserted mention. Defaults to the full mention string composed from `marker` and\n\t * `mention` string or `mention.id` if an object is passed.\n\t * @param options.range The range to replace.\n\t * Note that the replaced range might be shorter than the inserted text with the mention attribute.\n\t * @fires execute\n\t */ execute(options) {\n        const model = this.editor.model;\n        const document = model.document;\n        const selection = document.selection;\n        const mentionData = typeof options.mention == 'string' ? {\n            id: options.mention\n        } : options.mention;\n        const mentionID = mentionData.id;\n        const range = options.range || selection.getFirstRange();\n        // Don't execute command if range is in non-editable place.\n        if (!model.canEditAt(range)) {\n            return;\n        }\n        const mentionText = options.text || mentionID;\n        const mention = _addMentionAttributes({\n            _text: mentionText,\n            id: mentionID\n        }, mentionData);\n        if (options.marker.length != 1) {\n            /**\n\t\t\t * The marker must be a single character.\n\t\t\t *\n\t\t\t * Correct markers: `'@'`, `'#'`.\n\t\t\t *\n\t\t\t * Incorrect markers: `'@@'`, `'[@'`.\n\t\t\t *\n\t\t\t * See {@link module:mention/mentionconfig~MentionConfig}.\n\t\t\t *\n\t\t\t * @error mentioncommand-incorrect-marker\n\t\t\t */ throw new CKEditorError('mentioncommand-incorrect-marker', this);\n        }\n        if (mentionID.charAt(0) != options.marker) {\n            /**\n\t\t\t * The feed item ID must start with the marker character.\n\t\t\t *\n\t\t\t * Correct mention feed setting:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * mentions: [\n\t\t\t * \t{\n\t\t\t * \t\tmarker: '@',\n\t\t\t * \t\tfeed: [ '@Ann', '@Barney', ... ]\n\t\t\t * \t}\n\t\t\t * ]\n\t\t\t * ```\n\t\t\t *\n\t\t\t * Incorrect mention feed setting:\n\t\t\t *\n\t\t\t * ```ts\n\t\t\t * mentions: [\n\t\t\t * \t{\n\t\t\t * \t\tmarker: '@',\n\t\t\t * \t\tfeed: [ 'Ann', 'Barney', ... ]\n\t\t\t * \t}\n\t\t\t * ]\n\t\t\t * ```\n\t\t\t *\n\t\t\t * See {@link module:mention/mentionconfig~MentionConfig}.\n\t\t\t *\n\t\t\t * @error mentioncommand-incorrect-id\n\t\t\t */ throw new CKEditorError('mentioncommand-incorrect-id', this);\n        }\n        model.change((writer)=>{\n            const currentAttributes = toMap(selection.getAttributes());\n            const attributesWithMention = new Map(currentAttributes.entries());\n            attributesWithMention.set('mention', mention);\n            // Replace a range with the text with a mention.\n            const insertionRange = model.insertContent(writer.createText(mentionText, attributesWithMention), range);\n            const nodeBefore = insertionRange.start.nodeBefore;\n            const nodeAfter = insertionRange.end.nodeAfter;\n            const isFollowedByWhiteSpace = nodeAfter && nodeAfter.is('$text') && nodeAfter.data.startsWith(' ');\n            let isInsertedInBrackets = false;\n            if (nodeBefore && nodeAfter && nodeBefore.is('$text') && nodeAfter.is('$text')) {\n                const precedingCharacter = nodeBefore.data.slice(-1);\n                const isPrecededByOpeningBracket = precedingCharacter in BRACKET_PAIRS;\n                const isFollowedByBracketClosure = isPrecededByOpeningBracket && nodeAfter.data.startsWith(BRACKET_PAIRS[precedingCharacter]);\n                isInsertedInBrackets = isPrecededByOpeningBracket && isFollowedByBracketClosure;\n            }\n            // Don't add a white space if either of the following is true:\n            // * there's already one after the mention;\n            // * the mention was inserted in the empty matching brackets.\n            // https://github.com/ckeditor/ckeditor5/issues/4651\n            if (!isInsertedInBrackets && !isFollowedByWhiteSpace) {\n                model.insertContent(writer.createText(' ', currentAttributes), range.start.getShiftedBy(mentionText.length));\n            }\n        });\n    }\n}\n\n/**\n * The mention editing feature.\n *\n * It introduces the {@link module:mention/mentioncommand~MentionCommand command} and the `mention`\n * attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}\n * as a `<span class=\"mention\" data-mention=\"@mention\">`.\n */ class MentionEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'MentionEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const doc = model.document;\n        // Allow the mention attribute on all text nodes.\n        model.schema.extend('$text', {\n            allowAttributes: 'mention'\n        });\n        // Upcast conversion.\n        editor.conversion.for('upcast').elementToAttribute({\n            view: {\n                name: 'span',\n                key: 'data-mention',\n                classes: 'mention'\n            },\n            model: {\n                key: 'mention',\n                value: (viewElement)=>_toMentionAttribute(viewElement)\n            }\n        });\n        // Downcast conversion.\n        editor.conversion.for('downcast').attributeToElement({\n            model: 'mention',\n            view: createViewMentionElement\n        });\n        editor.conversion.for('downcast').add(preventPartialMentionDowncast);\n        doc.registerPostFixer((writer)=>removePartialMentionPostFixer(writer, doc, model.schema));\n        doc.registerPostFixer((writer)=>extendAttributeOnMentionPostFixer(writer, doc));\n        doc.registerPostFixer((writer)=>selectionMentionAttributePostFixer(writer, doc));\n        editor.commands.add('mention', new MentionCommand(editor));\n    }\n}\n/**\n * @internal\n */ function _addMentionAttributes(baseMentionData, data) {\n    return Object.assign({\n        uid: uid()\n    }, baseMentionData, data || {});\n}\n/**\n * Creates a mention attribute value from the provided view element and optional data.\n *\n * This function is exposed as\n * {@link module:mention/mention~Mention#toMentionAttribute `editor.plugins.get( 'Mention' ).toMentionAttribute()`}.\n *\n * @internal\n */ function _toMentionAttribute(viewElementOrMention, data) {\n    const dataMention = viewElementOrMention.getAttribute('data-mention');\n    const textNode = viewElementOrMention.getChild(0);\n    // Do not convert empty mentions.\n    if (!textNode) {\n        return;\n    }\n    const baseMentionData = {\n        id: dataMention,\n        _text: textNode.data\n    };\n    return _addMentionAttributes(baseMentionData, data);\n}\n/**\n * A converter that blocks partial mention from being converted.\n *\n * This converter is registered with 'highest' priority in order to consume mention attribute before it is converted by\n * any other converters. This converter only consumes partial mention - those whose `_text` attribute is not equal to text with mention\n * attribute. This may happen when copying part of mention text.\n */ function preventPartialMentionDowncast(dispatcher) {\n    dispatcher.on('attribute:mention', (evt, data, conversionApi)=>{\n        const mention = data.attributeNewValue;\n        if (!data.item.is('$textProxy') || !mention) {\n            return;\n        }\n        const start = data.range.start;\n        const textNode = start.textNode || start.nodeAfter;\n        if (textNode.data != mention._text) {\n            // Consume item to prevent partial mention conversion.\n            conversionApi.consumable.consume(data.item, evt.name);\n        }\n    }, {\n        priority: 'highest'\n    });\n}\n/**\n * Creates a mention element from the mention data.\n */ function createViewMentionElement(mention, { writer }) {\n    if (!mention) {\n        return;\n    }\n    const attributes = {\n        class: 'mention',\n        'data-mention': mention.id\n    };\n    const options = {\n        id: mention.uid,\n        priority: 20\n    };\n    return writer.createAttributeElement('span', attributes, options);\n}\n/**\n * Model post-fixer that disallows typing with selection when the selection is placed after the text node with the mention attribute or\n * before a text node with mention attribute.\n */ function selectionMentionAttributePostFixer(writer, doc) {\n    const selection = doc.selection;\n    const focus = selection.focus;\n    if (selection.isCollapsed && selection.hasAttribute('mention') && shouldNotTypeWithMentionAt(focus)) {\n        writer.removeSelectionAttribute('mention');\n        return true;\n    }\n    return false;\n}\n/**\n * Helper function to detect if mention attribute should be removed from selection.\n * This check makes only sense if the selection has mention attribute.\n *\n * The mention attribute should be removed from a selection when selection focus is placed:\n * a) after a text node\n * b) the position is at parents start - the selection will set attributes from node after.\n */ function shouldNotTypeWithMentionAt(position) {\n    const isAtStart = position.isAtStart;\n    const isAfterAMention = position.nodeBefore && position.nodeBefore.is('$text');\n    return isAfterAMention || isAtStart;\n}\n/**\n * Model post-fixer that removes the mention attribute from the modified text node.\n */ function removePartialMentionPostFixer(writer, doc, schema) {\n    const changes = doc.differ.getChanges();\n    let wasChanged = false;\n    for (const change of changes){\n        if (change.type == 'attribute') {\n            continue;\n        }\n        // Checks the text node on the current position.\n        const position = change.position;\n        if (change.name == '$text') {\n            const nodeAfterInsertedTextNode = position.textNode && position.textNode.nextSibling;\n            // Checks the text node where the change occurred.\n            wasChanged = checkAndFix(position.textNode, writer) || wasChanged;\n            // Occurs on paste inside a text node with mention.\n            wasChanged = checkAndFix(nodeAfterInsertedTextNode, writer) || wasChanged;\n            wasChanged = checkAndFix(position.nodeBefore, writer) || wasChanged;\n            wasChanged = checkAndFix(position.nodeAfter, writer) || wasChanged;\n        }\n        // Checks text nodes in inserted elements (might occur when splitting a paragraph or pasting content inside text with mention).\n        if (change.name != '$text' && change.type == 'insert') {\n            const insertedNode = position.nodeAfter;\n            for (const item of writer.createRangeIn(insertedNode).getItems()){\n                wasChanged = checkAndFix(item, writer) || wasChanged;\n            }\n        }\n        // Inserted inline elements might break mention.\n        if (change.type == 'insert' && schema.isInline(change.name)) {\n            const nodeAfterInserted = position.nodeAfter && position.nodeAfter.nextSibling;\n            wasChanged = checkAndFix(position.nodeBefore, writer) || wasChanged;\n            wasChanged = checkAndFix(nodeAfterInserted, writer) || wasChanged;\n        }\n    }\n    return wasChanged;\n}\n/**\n * This post-fixer will extend the attribute applied on the part of the mention so the whole text node of the mention will have\n * the added attribute.\n */ function extendAttributeOnMentionPostFixer(writer, doc) {\n    const changes = doc.differ.getChanges();\n    let wasChanged = false;\n    for (const change of changes){\n        if (change.type === 'attribute' && change.attributeKey != 'mention') {\n            // Checks the node on the left side of the range...\n            const nodeBefore = change.range.start.nodeBefore;\n            // ... and on the right side of the range.\n            const nodeAfter = change.range.end.nodeAfter;\n            for (const node of [\n                nodeBefore,\n                nodeAfter\n            ]){\n                if (isBrokenMentionNode(node) && node.getAttribute(change.attributeKey) != change.attributeNewValue) {\n                    writer.setAttribute(change.attributeKey, change.attributeNewValue, node);\n                    wasChanged = true;\n                }\n            }\n        }\n    }\n    return wasChanged;\n}\n/**\n * Checks if a node has a correct mention attribute if present.\n * Returns `true` if the node is text and has a mention attribute whose text does not match the expected mention text.\n */ function isBrokenMentionNode(node) {\n    if (!node || !(node.is('$text') || node.is('$textProxy')) || !node.hasAttribute('mention')) {\n        return false;\n    }\n    const text = node.data;\n    const mention = node.getAttribute('mention');\n    const expectedText = mention._text;\n    return text != expectedText;\n}\n/**\n * Fixes a mention on a text node if it needs a fix.\n */ function checkAndFix(textNode, writer) {\n    if (isBrokenMentionNode(textNode)) {\n        writer.removeAttribute('mention', textNode);\n        return true;\n    }\n    return false;\n}\n\n/**\n * The mention ui view.\n */ class MentionsView extends ListView {\n    selected;\n    position;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        this.extendTemplate({\n            attributes: {\n                class: [\n                    'ck-mentions'\n                ],\n                tabindex: '-1'\n            }\n        });\n    }\n    /**\n\t * {@link #select Selects} the first item.\n\t */ selectFirst() {\n        this.select(0);\n    }\n    /**\n\t * Selects next item to the currently {@link #select selected}.\n\t *\n\t * If the last item is already selected, it will select the first item.\n\t */ selectNext() {\n        const item = this.selected;\n        const index = this.items.getIndex(item);\n        this.select(index + 1);\n    }\n    /**\n\t * Selects previous item to the currently {@link #select selected}.\n\t *\n\t * If the first item is already selected, it will select the last item.\n\t */ selectPrevious() {\n        const item = this.selected;\n        const index = this.items.getIndex(item);\n        this.select(index - 1);\n    }\n    /**\n\t * Marks item at a given index as selected.\n\t *\n\t * Handles selection cycling when passed index is out of bounds:\n\t * - if the index is lower than 0, it will select the last item,\n\t * - if the index is higher than the last item index, it will select the first item.\n\t *\n\t * @param index Index of an item to be marked as selected.\n\t */ select(index) {\n        let indexToGet = 0;\n        if (index > 0 && index < this.items.length) {\n            indexToGet = index;\n        } else if (index < 0) {\n            indexToGet = this.items.length - 1;\n        }\n        const item = this.items.get(indexToGet);\n        // Return early if item is already selected.\n        if (this.selected === item) {\n            return;\n        }\n        // Remove highlight of previously selected item.\n        if (this.selected) {\n            this.selected.removeHighlight();\n        }\n        item.highlight();\n        this.selected = item;\n        // Scroll the mentions view to the selected element.\n        if (!this._isItemVisibleInScrolledArea(item)) {\n            this.element.scrollTop = item.element.offsetTop;\n        }\n    }\n    /**\n\t * Triggers the `execute` event on the {@link #select selected} item.\n\t */ executeSelected() {\n        this.selected.fire('execute');\n    }\n    /**\n\t * Checks if an item is visible in the scrollable area.\n\t *\n\t * The item is considered visible when:\n\t * - its top boundary is inside the scrollable rect\n\t * - its bottom boundary is inside the scrollable rect (the whole item must be visible)\n\t */ _isItemVisibleInScrolledArea(item) {\n        return new Rect(this.element).contains(new Rect(item.element));\n    }\n}\n\n/**\n * This class wraps DOM element as a CKEditor5 UI View.\n *\n * It allows to render any DOM element and use it in mentions list.\n */ class DomWrapperView extends View {\n    /**\n\t * The DOM element for which wrapper was created.\n\t */ domElement;\n    /**\n\t * Creates an instance of {@link module:mention/ui/domwrapperview~DomWrapperView} class.\n\t *\n\t * Also see {@link #render}.\n\t */ constructor(locale, domElement){\n        super(locale);\n        // Disable template rendering on this view.\n        this.template = undefined;\n        this.domElement = domElement;\n        // Render dom wrapper as a button.\n        this.domElement.classList.add('ck-button');\n        this.set('isOn', false);\n        // Handle isOn state as in buttons.\n        this.on('change:isOn', (evt, name, isOn)=>{\n            if (isOn) {\n                this.domElement.classList.add('ck-on');\n                this.domElement.classList.remove('ck-off');\n            } else {\n                this.domElement.classList.add('ck-off');\n                this.domElement.classList.remove('ck-on');\n            }\n        });\n        // Pass click event as execute event.\n        this.listenTo(this.domElement, 'click', ()=>{\n            this.fire('execute');\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.element = this.domElement;\n    }\n    /**\n\t * Focuses the DOM element.\n\t */ focus() {\n        this.domElement.focus();\n    }\n}\n\nclass MentionListItemView extends ListItemView {\n    item;\n    marker;\n    highlight() {\n        const child = this.children.first;\n        child.isOn = true;\n    }\n    removeHighlight() {\n        const child = this.children.first;\n        child.isOn = false;\n    }\n}\n\nconst VERTICAL_SPACING = 3;\n// The key codes that mention UI handles when it is open (without commit keys).\nconst defaultHandledKeyCodes = [\n    keyCodes.arrowup,\n    keyCodes.arrowdown,\n    keyCodes.esc\n];\n// Dropdown commit key codes.\nconst defaultCommitKeyCodes = [\n    keyCodes.enter,\n    keyCodes.tab\n];\n/**\n * The mention UI feature.\n */ class MentionUI extends Plugin {\n    /**\n\t * The mention view.\n\t */ _mentionsView;\n    /**\n\t * Stores mention feeds configurations.\n\t */ _mentionsConfigurations;\n    /**\n\t * The contextual balloon plugin instance.\n\t */ _balloon;\n    _items = new Collection();\n    _lastRequested;\n    /**\n\t * Debounced feed requester. It uses `lodash#debounce` method to delay function call.\n\t */ _requestFeedDebounced;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'MentionUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._mentionsView = this._createMentionView();\n        this._mentionsConfigurations = new Map();\n        this._requestFeedDebounced = debounce(this._requestFeed, 100);\n        editor.config.define('mention', {\n            feeds: []\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const commitKeys = editor.config.get('mention.commitKeys') || defaultCommitKeyCodes;\n        const handledKeyCodes = defaultHandledKeyCodes.concat(commitKeys);\n        this._balloon = editor.plugins.get(ContextualBalloon);\n        // Key listener that handles navigation in mention view.\n        editor.editing.view.document.on('keydown', (evt, data)=>{\n            if (isHandledKey(data.keyCode) && this._isUIVisible) {\n                data.preventDefault();\n                evt.stop(); // Required for Enter key overriding.\n                if (data.keyCode == keyCodes.arrowdown) {\n                    this._mentionsView.selectNext();\n                }\n                if (data.keyCode == keyCodes.arrowup) {\n                    this._mentionsView.selectPrevious();\n                }\n                if (commitKeys.includes(data.keyCode)) {\n                    this._mentionsView.executeSelected();\n                }\n                if (data.keyCode == keyCodes.esc) {\n                    this._hideUIAndRemoveMarker();\n                }\n            }\n        }, {\n            priority: 'highest'\n        }); // Required to override the Enter key.\n        // Close the dropdown upon clicking outside of the plugin UI.\n        clickOutsideHandler({\n            emitter: this._mentionsView,\n            activator: ()=>this._isUIVisible,\n            contextElements: ()=>[\n                    this._balloon.view.element\n                ],\n            callback: ()=>this._hideUIAndRemoveMarker()\n        });\n        const feeds = editor.config.get('mention.feeds');\n        for (const mentionDescription of feeds){\n            const { feed, marker, dropdownLimit } = mentionDescription;\n            if (!isValidMentionMarker(marker)) {\n                /**\n\t\t\t\t * The marker must be a single character.\n\t\t\t\t *\n\t\t\t\t * Correct markers: `'@'`, `'#'`.\n\t\t\t\t *\n\t\t\t\t * Incorrect markers: `'$$'`, `'[@'`.\n\t\t\t\t *\n\t\t\t\t * See {@link module:mention/mentionconfig~MentionConfig}.\n\t\t\t\t *\n\t\t\t\t * @error mentionconfig-incorrect-marker\n\t\t\t\t * @param marker Configured marker\n\t\t\t\t */ throw new CKEditorError('mentionconfig-incorrect-marker', null, {\n                    marker\n                });\n            }\n            const feedCallback = typeof feed == 'function' ? feed.bind(this.editor) : createFeedCallback(feed);\n            const itemRenderer = mentionDescription.itemRenderer;\n            const definition = {\n                marker,\n                feedCallback,\n                itemRenderer,\n                dropdownLimit\n            };\n            this._mentionsConfigurations.set(marker, definition);\n        }\n        this._setupTextWatcher(feeds);\n        this.listenTo(editor, 'change:isReadOnly', ()=>{\n            this._hideUIAndRemoveMarker();\n        });\n        this.on('requestFeed:response', (evt, data)=>this._handleFeedResponse(data));\n        this.on('requestFeed:error', ()=>this._hideUIAndRemoveMarker());\n        /**\n\t\t * Checks if a given key code is handled by the mention UI.\n\t\t */ function isHandledKey(keyCode) {\n            return handledKeyCodes.includes(keyCode);\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        // Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n        this._mentionsView.destroy();\n    }\n    /**\n\t * Returns true when {@link #_mentionsView} is in the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon} and it is\n\t * currently visible.\n\t */ get _isUIVisible() {\n        return this._balloon.visibleView === this._mentionsView;\n    }\n    /**\n\t * Creates the {@link #_mentionsView}.\n\t */ _createMentionView() {\n        const locale = this.editor.locale;\n        const mentionsView = new MentionsView(locale);\n        mentionsView.items.bindTo(this._items).using((data)=>{\n            const { item, marker } = data;\n            const { dropdownLimit: markerDropdownLimit } = this._mentionsConfigurations.get(marker);\n            // Set to 10 by default for backwards compatibility. See: #10479\n            const dropdownLimit = markerDropdownLimit || this.editor.config.get('mention.dropdownLimit') || 10;\n            if (mentionsView.items.length >= dropdownLimit) {\n                return null;\n            }\n            const listItemView = new MentionListItemView(locale);\n            const view = this._renderItem(item, marker);\n            view.delegate('execute').to(listItemView);\n            listItemView.children.add(view);\n            listItemView.item = item;\n            listItemView.marker = marker;\n            listItemView.on('execute', ()=>{\n                mentionsView.fire('execute', {\n                    item,\n                    marker\n                });\n            });\n            return listItemView;\n        });\n        mentionsView.on('execute', (evt, data)=>{\n            const editor = this.editor;\n            const model = editor.model;\n            const item = data.item;\n            const marker = data.marker;\n            const mentionMarker = editor.model.markers.get('mention');\n            // Create a range on matched text.\n            const end = model.createPositionAt(model.document.selection.focus);\n            const start = model.createPositionAt(mentionMarker.getStart());\n            const range = model.createRange(start, end);\n            this._hideUIAndRemoveMarker();\n            editor.execute('mention', {\n                mention: item,\n                text: item.text,\n                marker,\n                range\n            });\n            editor.editing.view.focus();\n        });\n        return mentionsView;\n    }\n    /**\n\t * Returns item renderer for the marker.\n\t */ _getItemRenderer(marker) {\n        const { itemRenderer } = this._mentionsConfigurations.get(marker);\n        return itemRenderer;\n    }\n    /**\n\t * Requests a feed from a configured callbacks.\n\t */ _requestFeed(marker, feedText) {\n        // @if CK_DEBUG_MENTION // console.log( '%c[Feed]%c Requesting for', 'color: blue', 'color: black', `\"${ feedText }\"` );\n        // Store the last requested feed - it is used to discard any out-of order requests.\n        this._lastRequested = feedText;\n        const { feedCallback } = this._mentionsConfigurations.get(marker);\n        const feedResponse = feedCallback(feedText);\n        const isAsynchronous = feedResponse instanceof Promise;\n        // For synchronous feeds (e.g. callbacks, arrays) fire the response event immediately.\n        if (!isAsynchronous) {\n            this.fire('requestFeed:response', {\n                feed: feedResponse,\n                marker,\n                feedText\n            });\n            return;\n        }\n        // Handle the asynchronous responses.\n        feedResponse.then((response)=>{\n            // Check the feed text of this response with the last requested one so either:\n            if (this._lastRequested == feedText) {\n                // It is the same and fire the response event.\n                this.fire('requestFeed:response', {\n                    feed: response,\n                    marker,\n                    feedText\n                });\n            } else {\n                // It is different - most probably out-of-order one, so fire the discarded event.\n                this.fire('requestFeed:discarded', {\n                    feed: response,\n                    marker,\n                    feedText\n                });\n            }\n        }).catch((error)=>{\n            this.fire('requestFeed:error', {\n                error\n            });\n            /**\n\t\t\t\t * The callback used for obtaining mention autocomplete feed thrown and error and the mention UI was hidden or\n\t\t\t\t * not displayed at all.\n\t\t\t\t *\n\t\t\t\t * @error mention-feed-callback-error\n\t\t\t\t */ logWarning('mention-feed-callback-error', {\n                marker\n            });\n        });\n    }\n    /**\n\t * Registers a text watcher for the marker.\n\t */ _setupTextWatcher(feeds) {\n        const editor = this.editor;\n        const feedsWithPattern = feeds.map((feed)=>({\n                ...feed,\n                pattern: createRegExp(feed.marker, feed.minimumCharacters || 0)\n            }));\n        const watcher = new TextWatcher(editor.model, createTestCallback(feedsWithPattern));\n        watcher.on('matched', (evt, data)=>{\n            const markerDefinition = getLastValidMarkerInText(feedsWithPattern, data.text);\n            const selection = editor.model.document.selection;\n            const focus = selection.focus;\n            const markerPosition = editor.model.createPositionAt(focus.parent, markerDefinition.position);\n            if (isPositionInExistingMention(focus) || isMarkerInExistingMention(markerPosition)) {\n                this._hideUIAndRemoveMarker();\n                return;\n            }\n            const feedText = requestFeedText(markerDefinition, data.text);\n            const matchedTextLength = markerDefinition.marker.length + feedText.length;\n            // Create a marker range.\n            const start = focus.getShiftedBy(-matchedTextLength);\n            const end = focus.getShiftedBy(-feedText.length);\n            const markerRange = editor.model.createRange(start, end);\n            // @if CK_DEBUG_MENTION // console.group( '%c[TextWatcher]%c matched', 'color: red', 'color: black', `\"${ feedText }\"` );\n            // @if CK_DEBUG_MENTION // console.log( 'data#text', `\"${ data.text }\"` );\n            // @if CK_DEBUG_MENTION // console.log( 'data#range', data.range.start.path, data.range.end.path );\n            // @if CK_DEBUG_MENTION // console.log( 'marker definition', markerDefinition );\n            // @if CK_DEBUG_MENTION // console.log( 'marker range', markerRange.start.path, markerRange.end.path );\n            if (checkIfStillInCompletionMode(editor)) {\n                const mentionMarker = editor.model.markers.get('mention');\n                // Update the marker - user might've moved the selection to other mention trigger.\n                editor.model.change((writer)=>{\n                    // @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Updating the marker.', 'color: purple', 'color: black' );\n                    writer.updateMarker(mentionMarker, {\n                        range: markerRange\n                    });\n                });\n            } else {\n                editor.model.change((writer)=>{\n                    // @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Adding the marker.', 'color: purple', 'color: black' );\n                    writer.addMarker('mention', {\n                        range: markerRange,\n                        usingOperation: false,\n                        affectsData: false\n                    });\n                });\n            }\n            this._requestFeedDebounced(markerDefinition.marker, feedText);\n        // @if CK_DEBUG_MENTION // console.groupEnd();\n        });\n        watcher.on('unmatched', ()=>{\n            this._hideUIAndRemoveMarker();\n        });\n        const mentionCommand = editor.commands.get('mention');\n        watcher.bind('isEnabled').to(mentionCommand);\n        return watcher;\n    }\n    /**\n\t * Handles the feed response event data.\n\t */ _handleFeedResponse(data) {\n        const { feed, marker } = data;\n        // eslint-disable-next-line max-len\n        // @if CK_DEBUG_MENTION // console.log( `%c[Feed]%c Response for \"${ data.feedText }\" (${ feed.length })`, 'color: blue', 'color: black', feed );\n        // If the marker is not in the document happens when the selection had changed and the 'mention' marker was removed.\n        if (!checkIfStillInCompletionMode(this.editor)) {\n            return;\n        }\n        // Reset the view.\n        this._items.clear();\n        for (const feedItem of feed){\n            const item = typeof feedItem != 'object' ? {\n                id: feedItem,\n                text: feedItem\n            } : feedItem;\n            this._items.add({\n                item,\n                marker\n            });\n        }\n        const mentionMarker = this.editor.model.markers.get('mention');\n        if (this._items.length) {\n            this._showOrUpdateUI(mentionMarker);\n        } else {\n            // Do not show empty mention UI.\n            this._hideUIAndRemoveMarker();\n        }\n    }\n    /**\n\t * Shows the mentions balloon. If the panel is already visible, it will reposition it.\n\t */ _showOrUpdateUI(markerMarker) {\n        if (this._isUIVisible) {\n            // @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Updating position.', 'color: green', 'color: black' );\n            // Update balloon position as the mention list view may change its size.\n            this._balloon.updatePosition(this._getBalloonPanelPositionData(markerMarker, this._mentionsView.position));\n        } else {\n            // @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Showing the UI.', 'color: green', 'color: black' );\n            this._balloon.add({\n                view: this._mentionsView,\n                position: this._getBalloonPanelPositionData(markerMarker, this._mentionsView.position),\n                singleViewMode: true\n            });\n        }\n        this._mentionsView.position = this._balloon.view.position;\n        this._mentionsView.selectFirst();\n    }\n    /**\n\t * Hides the mentions balloon and removes the 'mention' marker from the markers collection.\n\t */ _hideUIAndRemoveMarker() {\n        // Remove the mention view from balloon before removing marker - it is used by balloon position target().\n        if (this._balloon.hasView(this._mentionsView)) {\n            // @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Hiding the UI.', 'color: green', 'color: black' );\n            this._balloon.remove(this._mentionsView);\n        }\n        if (checkIfStillInCompletionMode(this.editor)) {\n            // @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Removing marker.', 'color: purple', 'color: black' );\n            this.editor.model.change((writer)=>writer.removeMarker('mention'));\n        }\n        // Make the last matched position on panel view undefined so the #_getBalloonPanelPositionData() method will return all positions\n        // on the next call.\n        this._mentionsView.position = undefined;\n    }\n    /**\n\t * Renders a single item in the autocomplete list.\n\t */ _renderItem(item, marker) {\n        const editor = this.editor;\n        let view;\n        let label = item.id;\n        const renderer = this._getItemRenderer(marker);\n        if (renderer) {\n            const renderResult = renderer(item);\n            if (typeof renderResult != 'string') {\n                view = new DomWrapperView(editor.locale, renderResult);\n            } else {\n                label = renderResult;\n            }\n        }\n        if (!view) {\n            const buttonView = new ButtonView(editor.locale);\n            buttonView.label = label;\n            buttonView.withText = true;\n            view = buttonView;\n        }\n        return view;\n    }\n    /**\n\t * Creates a position options object used to position the balloon panel.\n\t *\n\t * @param mentionMarker\n\t * @param preferredPosition The name of the last matched position name.\n\t */ _getBalloonPanelPositionData(mentionMarker, preferredPosition) {\n        const editor = this.editor;\n        const editing = editor.editing;\n        const domConverter = editing.view.domConverter;\n        const mapper = editing.mapper;\n        const uiLanguageDirection = editor.locale.uiLanguageDirection;\n        return {\n            target: ()=>{\n                let modelRange = mentionMarker.getRange();\n                // Target the UI to the model selection range - the marker has been removed so probably the UI will not be shown anyway.\n                // The logic is used by ContextualBalloon to display another panel in the same place.\n                if (modelRange.start.root.rootName == '$graveyard') {\n                    modelRange = editor.model.document.selection.getFirstRange();\n                }\n                const viewRange = mapper.toViewRange(modelRange);\n                const rangeRects = Rect.getDomRangeRects(domConverter.viewRangeToDom(viewRange));\n                return rangeRects.pop();\n            },\n            limiter: ()=>{\n                const view = this.editor.editing.view;\n                const viewDocument = view.document;\n                const editableElement = viewDocument.selection.editableElement;\n                if (editableElement) {\n                    return view.domConverter.mapViewToDom(editableElement.root);\n                }\n                return null;\n            },\n            positions: getBalloonPanelPositions(preferredPosition, uiLanguageDirection)\n        };\n    }\n}\n/**\n * Returns the balloon positions data callbacks.\n */ function getBalloonPanelPositions(preferredPosition, uiLanguageDirection) {\n    const positions = {\n        // Positions the panel to the southeast of the caret rectangle.\n        'caret_se': (targetRect)=>{\n            return {\n                top: targetRect.bottom + VERTICAL_SPACING,\n                left: targetRect.right,\n                name: 'caret_se',\n                config: {\n                    withArrow: false\n                }\n            };\n        },\n        // Positions the panel to the northeast of the caret rectangle.\n        'caret_ne': (targetRect, balloonRect)=>{\n            return {\n                top: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n                left: targetRect.right,\n                name: 'caret_ne',\n                config: {\n                    withArrow: false\n                }\n            };\n        },\n        // Positions the panel to the southwest of the caret rectangle.\n        'caret_sw': (targetRect, balloonRect)=>{\n            return {\n                top: targetRect.bottom + VERTICAL_SPACING,\n                left: targetRect.right - balloonRect.width,\n                name: 'caret_sw',\n                config: {\n                    withArrow: false\n                }\n            };\n        },\n        // Positions the panel to the northwest of the caret rect.\n        'caret_nw': (targetRect, balloonRect)=>{\n            return {\n                top: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n                left: targetRect.right - balloonRect.width,\n                name: 'caret_nw',\n                config: {\n                    withArrow: false\n                }\n            };\n        }\n    };\n    // Returns only the last position if it was matched to prevent the panel from jumping after the first match.\n    if (Object.prototype.hasOwnProperty.call(positions, preferredPosition)) {\n        return [\n            positions[preferredPosition]\n        ];\n    }\n    // By default, return all position callbacks ordered depending on the UI language direction.\n    return uiLanguageDirection !== 'rtl' ? [\n        positions.caret_se,\n        positions.caret_sw,\n        positions.caret_ne,\n        positions.caret_nw\n    ] : [\n        positions.caret_sw,\n        positions.caret_se,\n        positions.caret_nw,\n        positions.caret_ne\n    ];\n}\n/**\n * Returns a marker definition of the last valid occurring marker in a given string.\n * If there is no valid marker in a string, it returns undefined.\n *\n * Example of returned object:\n *\n * ```ts\n * {\n * \tmarker: '@',\n * \tposition: 4,\n * \tminimumCharacters: 0\n * }\n * ````\n *\n * @param feedsWithPattern Registered feeds in editor for mention plugin with created RegExp for matching marker.\n * @param text String to find the marker in\n * @returns Matched marker's definition\n */ function getLastValidMarkerInText(feedsWithPattern, text) {\n    let lastValidMarker;\n    for (const feed of feedsWithPattern){\n        const currentMarkerLastIndex = text.lastIndexOf(feed.marker);\n        if (currentMarkerLastIndex > 0 && !text.substring(currentMarkerLastIndex - 1).match(feed.pattern)) {\n            continue;\n        }\n        if (!lastValidMarker || currentMarkerLastIndex >= lastValidMarker.position) {\n            lastValidMarker = {\n                marker: feed.marker,\n                position: currentMarkerLastIndex,\n                minimumCharacters: feed.minimumCharacters,\n                pattern: feed.pattern\n            };\n        }\n    }\n    return lastValidMarker;\n}\n/**\n * Creates a RegExp pattern for the marker.\n *\n * Function has to be exported to achieve 100% code coverage.\n */ function createRegExp(marker, minimumCharacters) {\n    const numberOfCharacters = minimumCharacters == 0 ? '*' : `{${minimumCharacters},}`;\n    const openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? '\\\\p{Ps}\\\\p{Pi}\"\\'' : '\\\\(\\\\[{\"\\'';\n    const mentionCharacters = '.';\n    // I wanted to make an util out of it, but since this regexp uses \"u\" flag, it became difficult.\n    // When \"u\" flag is used, the regexp has \"strict\" escaping rules, i.e. if you try to escape a character that does not need\n    // to be escaped, RegExp() will throw. It made it difficult to write a generic util, because different characters are\n    // allowed in different context. For example, escaping \"-\" sometimes was correct, but sometimes it threw an error.\n    marker = marker.replace(/[.*+?^${}()\\-|[\\]\\\\]/g, '\\\\$&');\n    // The pattern consists of 3 groups:\n    //\n    // - 0 (non-capturing): Opening sequence - start of the line, space or an opening punctuation character like \"(\" or \"\\\"\",\n    // - 1: The marker character,\n    // - 2: Mention input (taking the minimal length into consideration to trigger the UI),\n    //\n    // The pattern matches up to the caret (end of string switch - $).\n    //               (0:      opening sequence       )(1:   marker  )(2:                typed mention              )$\n    const pattern = `(?:^|[ ${openAfterCharacters}])([${marker}])(${mentionCharacters}${numberOfCharacters})$`;\n    return new RegExp(pattern, 'u');\n}\n/**\n * Creates a test callback for the marker to be used in the text watcher instance.\n *\n * @param feedsWithPattern Feeds of mention plugin configured in editor with RegExp to match marker in text\n */ function createTestCallback(feedsWithPattern) {\n    const textMatcher = (text)=>{\n        const markerDefinition = getLastValidMarkerInText(feedsWithPattern, text);\n        if (!markerDefinition) {\n            return false;\n        }\n        let splitStringFrom = 0;\n        if (markerDefinition.position !== 0) {\n            splitStringFrom = markerDefinition.position - 1;\n        }\n        const textToTest = text.substring(splitStringFrom);\n        return markerDefinition.pattern.test(textToTest);\n    };\n    return textMatcher;\n}\n/**\n * Creates a text matcher from the marker.\n */ function requestFeedText(markerDefinition, text) {\n    let splitStringFrom = 0;\n    if (markerDefinition.position !== 0) {\n        splitStringFrom = markerDefinition.position - 1;\n    }\n    const regExp = createRegExp(markerDefinition.marker, 0);\n    const textToMatch = text.substring(splitStringFrom);\n    const match = textToMatch.match(regExp);\n    return match[2];\n}\n/**\n * The default feed callback.\n */ function createFeedCallback(feedItems) {\n    return (feedText)=>{\n        const filteredItems = feedItems// Make the default mention feed case-insensitive.\n        .filter((item)=>{\n            // Item might be defined as object.\n            const itemId = typeof item == 'string' ? item : String(item.id);\n            // The default feed is case insensitive.\n            return itemId.toLowerCase().includes(feedText.toLowerCase());\n        });\n        return filteredItems;\n    };\n}\n/**\n * Checks if position in inside or right after a text with a mention.\n */ function isPositionInExistingMention(position) {\n    // The text watcher listens only to changed range in selection - so the selection attributes are not yet available\n    // and you cannot use selection.hasAttribute( 'mention' ) just yet.\n    // See https://github.com/ckeditor/ckeditor5-engine/issues/1723.\n    const hasMention = position.textNode && position.textNode.hasAttribute('mention');\n    const nodeBefore = position.nodeBefore;\n    return hasMention || nodeBefore && nodeBefore.is('$text') && nodeBefore.hasAttribute('mention');\n}\n/**\n * Checks if the closest marker offset is at the beginning of a mention.\n *\n * See https://github.com/ckeditor/ckeditor5/issues/11400.\n */ function isMarkerInExistingMention(markerPosition) {\n    const nodeAfter = markerPosition.nodeAfter;\n    return nodeAfter && nodeAfter.is('$text') && nodeAfter.hasAttribute('mention');\n}\n/**\n * Checks if string is a valid mention marker.\n */ function isValidMentionMarker(marker) {\n    return marker && marker.length == 1;\n}\n/**\n * Checks the mention plugins is in completion mode (e.g. when typing is after a valid mention string like @foo).\n */ function checkIfStillInCompletionMode(editor) {\n    return editor.model.markers.has('mention');\n}\n\n/**\n * The mention plugin.\n *\n * For a detailed overview, check the {@glink features/mentions Mention feature} guide.\n */ class Mention extends Plugin {\n    toMentionAttribute(viewElement, data) {\n        return _toMentionAttribute(viewElement, data);\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Mention';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            MentionEditing,\n            MentionUI\n        ];\n    }\n}\n\nexport { DomWrapperView, Mention, MentionEditing, MentionListItemView, MentionUI, MentionsView };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin, Command } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\nvar removeFormatIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z\\\"/></svg>\";\n\nconst REMOVE_FORMAT = 'removeFormat';\n/**\n * The remove format UI plugin. It registers the `'removeFormat'` button which can be\n * used in the toolbar.\n */ class RemoveFormatUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'RemoveFormatUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        editor.ui.componentFactory.add(REMOVE_FORMAT, ()=>{\n            const view = this._createButton(ButtonView);\n            view.set({\n                tooltip: true\n            });\n            return view;\n        });\n        editor.ui.componentFactory.add(`menuBar:${REMOVE_FORMAT}`, ()=>this._createButton(MenuBarMenuListItemButtonView));\n    }\n    /**\n\t * Creates a button for remove format command to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const command = editor.commands.get(REMOVE_FORMAT);\n        const view = new ButtonClass(editor.locale);\n        const t = locale.t;\n        view.set({\n            label: t('Remove Format'),\n            icon: removeFormatIcon\n        });\n        view.bind('isEnabled').to(command, 'isEnabled');\n        // Execute the command.\n        this.listenTo(view, 'execute', ()=>{\n            editor.execute(REMOVE_FORMAT);\n            editor.editing.view.focus();\n        });\n        return view;\n    }\n}\n\n/**\n * The remove format command.\n *\n * It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}\n * to clear the formatting in the selection.\n *\n * ```ts\n * editor.execute( 'removeFormat' );\n * ```\n */ class RemoveFormatCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        this.isEnabled = !!first(this._getFormattingItems(model.document.selection, model.schema));\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const model = this.editor.model;\n        const schema = model.schema;\n        model.change((writer)=>{\n            for (const item of this._getFormattingItems(model.document.selection, schema)){\n                if (item.is('selection')) {\n                    for (const attributeName of this._getFormattingAttributes(item, schema)){\n                        writer.removeSelectionAttribute(attributeName);\n                    }\n                } else {\n                    // Workaround for items with multiple removable attributes. See\n                    // https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609\n                    const itemRange = writer.createRangeOn(item);\n                    for (const attributeName of this._getFormattingAttributes(item, schema)){\n                        writer.removeAttribute(attributeName, itemRange);\n                    }\n                }\n            }\n        });\n    }\n    /**\n\t * Returns an iterable of items in a selection (including the selection itself) that have formatting model\n\t * attributes to be removed by the feature.\n\t *\n\t * @param schema The schema describing the item.\n\t */ *_getFormattingItems(selection, schema) {\n        const itemHasRemovableFormatting = (item)=>{\n            return !!first(this._getFormattingAttributes(item, schema));\n        };\n        // Check formatting on selected items that are not blocks.\n        for (const curRange of selection.getRanges()){\n            for (const item of curRange.getItems()){\n                if (!schema.isBlock(item) && itemHasRemovableFormatting(item)) {\n                    yield item;\n                }\n            }\n        }\n        // Check formatting from selected blocks.\n        for (const block of selection.getSelectedBlocks()){\n            if (itemHasRemovableFormatting(block)) {\n                yield block;\n            }\n        }\n        // Finally the selection might be formatted as well, so make sure to check it.\n        if (itemHasRemovableFormatting(selection)) {\n            yield selection;\n        }\n    }\n    /**\n\t * Returns an iterable of formatting attributes of a given model item.\n\t *\n\t * **Note:** Formatting items have the `isFormatting` property set to `true`.\n\t *\n\t * @param schema The schema describing the item.\n\t * @returns The names of formatting attributes found in a given item.\n\t */ *_getFormattingAttributes(item, schema) {\n        for (const [attributeName] of item.getAttributes()){\n            const attributeProperties = schema.getAttributeProperties(attributeName);\n            if (attributeProperties && attributeProperties.isFormatting) {\n                yield attributeName;\n            }\n        }\n    }\n}\n\n/**\n * The remove format editing plugin.\n *\n * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n */ class RemoveFormatEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'RemoveFormatEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        editor.commands.add('removeFormat', new RemoveFormatCommand(editor));\n    }\n}\n\n/**\n * The remove format plugin.\n *\n * This is a \"glue\" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}\n * and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.\n *\n * For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.\n */ class RemoveFormat extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            RemoveFormatEditing,\n            RemoveFormatUI\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'RemoveFormat';\n    }\n}\n\nexport { RemoveFormat, RemoveFormatEditing, RemoveFormatUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Typing } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { View, addKeyboardHandlingForGrid, ButtonView, FocusCycler, LabeledFieldView, createLabeledDropdown, ViewModel, addListToDropdown, Dialog, MenuBarMenuListItemButtonView, DialogViewPosition } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { FocusTracker, KeystrokeHandler, global, Collection, CKEditorError } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\n/**\n * A grid of character tiles. It allows browsing special characters and selecting the character to\n * be inserted into the content.\n */ class CharacterGridView extends View {\n    /**\n\t * A collection of the child tile views. Each tile represents a particular character.\n\t */ tiles;\n    /**\n\t * Tracks information about the DOM focus in the grid.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * Creates an instance of a character grid containing tiles representing special characters.\n\t *\n\t * @param locale The localization services instance.\n\t */ constructor(locale){\n        super(locale);\n        this.tiles = this.createCollection();\n        this.setTemplate({\n            tag: 'div',\n            children: [\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-character-grid__tiles'\n                        ]\n                    },\n                    children: this.tiles\n                }\n            ],\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-character-grid'\n                ]\n            }\n        });\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        addKeyboardHandlingForGrid({\n            keystrokeHandler: this.keystrokes,\n            focusTracker: this.focusTracker,\n            gridItems: this.tiles,\n            numberOfColumns: ()=>global.window.getComputedStyle(this.element.firstChild) // Responsive .ck-character-grid__tiles\n                .getPropertyValue('grid-template-columns').split(' ').length,\n            uiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n        });\n    }\n    /**\n\t * Creates a new tile for the grid.\n\t *\n\t * @param character A human-readable character displayed as the label (e.g. \"ε\").\n\t * @param name The name of the character (e.g. \"greek small letter epsilon\").\n\t */ createTile(character, name) {\n        const tile = new ButtonView(this.locale);\n        tile.set({\n            label: character,\n            withText: true,\n            class: 'ck-character-grid__tile'\n        });\n        // Labels are vital for the users to understand what character they're looking at.\n        // For now we're using native title attribute for that, see #5817.\n        tile.extendTemplate({\n            attributes: {\n                title: name\n            },\n            on: {\n                mouseover: tile.bindTemplate.to('mouseover'),\n                focus: tile.bindTemplate.to('focus')\n            }\n        });\n        tile.on('mouseover', ()=>{\n            this.fire('tileHover', {\n                name,\n                character\n            });\n        });\n        tile.on('focus', ()=>{\n            this.fire('tileFocus', {\n                name,\n                character\n            });\n        });\n        tile.on('execute', ()=>{\n            this.fire('execute', {\n                name,\n                character\n            });\n        });\n        return tile;\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        for (const item of this.tiles){\n            this.focusTracker.add(item.element);\n        }\n        this.tiles.on('change', (eventInfo, { added, removed })=>{\n            if (added.length > 0) {\n                for (const item of added){\n                    this.focusTracker.add(item.element);\n                }\n            }\n            if (removed.length > 0) {\n                for (const item of removed){\n                    this.focusTracker.remove(item.element);\n                }\n            }\n        });\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the first focusable in {@link ~CharacterGridView#tiles}.\n\t */ focus() {\n        this.tiles.first.focus();\n    }\n}\n\n/**\n * The view displaying detailed information about a special character glyph, e.g. upon\n * hovering it with a mouse.\n */ class CharacterInfoView extends View {\n    constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('character', null);\n        this.set('name', null);\n        this.bind('code').to(this, 'character', characterToUnicodeString);\n        this.setTemplate({\n            tag: 'div',\n            children: [\n                {\n                    tag: 'span',\n                    attributes: {\n                        class: [\n                            'ck-character-info__name'\n                        ]\n                    },\n                    children: [\n                        {\n                            // Note: ZWSP to prevent vertical collapsing.\n                            text: bind.to('name', (name)=>name ? name : '\\u200B')\n                        }\n                    ]\n                },\n                {\n                    tag: 'span',\n                    attributes: {\n                        class: [\n                            'ck-character-info__code'\n                        ]\n                    },\n                    children: [\n                        {\n                            text: bind.to('code')\n                        }\n                    ]\n                }\n            ],\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-character-info'\n                ]\n            }\n        });\n    }\n}\n/**\n * Converts a character into a \"Unicode string\", for instance:\n *\n * \"$\" -> \"U+0024\"\n *\n * Returns an empty string when the character is `null`.\n */ function characterToUnicodeString(character) {\n    if (character === null) {\n        return '';\n    }\n    const hexCode = character.codePointAt(0).toString(16);\n    return 'U+' + ('0000' + hexCode).slice(-4);\n}\n\n/**\n * A view that glues pieces of the special characters dropdown panel together:\n *\n * * the navigation view (allows selecting the category),\n * * the grid view (displays characters as a grid),\n * * and the info view (displays detailed info about a specific character).\n */ class SpecialCharactersView extends View {\n    /**\n\t * A collection of the focusable children of the view.\n\t */ items;\n    /**\n\t * Tracks information about the DOM focus in the view.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * Helps cycling over focusable {@link #items} in the view.\n\t */ _focusCycler;\n    /**\n\t * An instance of the `SpecialCharactersCategoriesView`.\n\t */ categoriesView;\n    /**\n\t * An instance of the `CharacterGridView`.\n\t */ gridView;\n    /**\n\t * An instance of the `CharacterInfoView`.\n\t */ infoView;\n    /**\n\t * Creates an instance of the `SpecialCharactersView`.\n\t */ constructor(locale, categoriesView, gridView, infoView){\n        super(locale);\n        this.categoriesView = categoriesView;\n        this.gridView = gridView;\n        this.infoView = infoView;\n        this.items = this.createCollection();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this._focusCycler = new FocusCycler({\n            focusables: this.items,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                focusPrevious: 'shift + tab',\n                focusNext: 'tab'\n            }\n        });\n        this.setTemplate({\n            tag: 'div',\n            children: [\n                this.categoriesView,\n                this.gridView,\n                this.infoView\n            ],\n            attributes: {\n                // Avoid focus loss when the user clicks the area of the grid that is not a button.\n                // https://github.com/ckeditor/ckeditor5/pull/12319#issuecomment-1231779819\n                tabindex: '-1'\n            }\n        });\n        this.items.add(this.categoriesView);\n        this.items.add(this.gridView);\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this.focusTracker.add(this.categoriesView.element);\n        this.focusTracker.add(this.gridView.element);\n        // Start listening for the keystrokes coming from #element.\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the first focusable in {@link #items}.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n}\n\nvar specialCharactersIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.268 7.268 0 0 1 2.703 3.454 7.128 7.128 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.873.873 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.601 5.601 0 0 0 2.492-2.371 5.459 5.459 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.71 5.71 0 0 0 10 4.206 5.708 5.708 0 0 0 6.419 5.46 5.527 5.527 0 0 0 4.46 8.663a5.457 5.457 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.877.877 0 0 1-.614-.25.845.845 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.128 7.128 0 0 1 .199-4.352 7.268 7.268 0 0 1 2.703-3.455A7.475 7.475 0 0 1 10 2.5z\\\"/></svg>\";\n\n/**\n * A class representing the navigation part of the special characters UI. It is responsible\n * for describing the feature and allowing the user to select a particular character group.\n */ class SpecialCharactersCategoriesView extends View {\n    _groupNames;\n    _dropdownView;\n    /**\n\t * Creates an instance of the {@link module:special-characters/ui/specialcharacterscategoriesview~SpecialCharactersCategoriesView}\n\t * class.\n\t *\n\t * @param locale The localization services instance.\n\t * @param groupNames The names of the character groups.\n\t */ constructor(locale, groupNames){\n        super(locale);\n        this.set('currentGroupName', Array.from(groupNames.entries())[0][0]);\n        this._groupNames = groupNames;\n        this._dropdownView = new LabeledFieldView(locale, createLabeledDropdown);\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-character-categories'\n                ]\n            },\n            children: [\n                this._dropdownView\n            ]\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        this._setupDropdown();\n    }\n    /**\n\t * @inheritDoc\n\t */ focus() {\n        this._dropdownView.focus();\n    }\n    /**\n\t * Creates dropdown item list, sets up bindings and fills properties.\n\t */ _setupDropdown() {\n        const items = new Collection();\n        for (const [name, label] of this._groupNames){\n            const item = {\n                type: 'button',\n                model: new ViewModel({\n                    name,\n                    label,\n                    role: 'menuitemradio',\n                    withText: true\n                })\n            };\n            item.model.bind('isOn').to(this, 'currentGroupName', (value)=>{\n                return value === name;\n            });\n            items.add(item);\n        }\n        const t = this.locale.t;\n        const accessibleLabel = t('Category');\n        this._dropdownView.set({\n            label: accessibleLabel,\n            isEmpty: false\n        });\n        this._dropdownView.fieldView.panelPosition = this.locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';\n        this._dropdownView.fieldView.buttonView.set({\n            withText: true,\n            tooltip: accessibleLabel,\n            ariaLabel: accessibleLabel,\n            ariaLabelledBy: undefined,\n            isOn: false\n        });\n        this._dropdownView.fieldView.buttonView.bind('label').to(this, 'currentGroupName', (value)=>this._groupNames.get(value));\n        this._dropdownView.fieldView.on('execute', ({ source })=>{\n            this.currentGroupName = source.name;\n        });\n        addListToDropdown(this._dropdownView.fieldView, items, {\n            ariaLabel: accessibleLabel,\n            role: 'menu'\n        });\n    }\n}\n\nconst ALL_SPECIAL_CHARACTERS_GROUP = 'All';\n/**\n * The special characters feature.\n *\n * Introduces the `'specialCharacters'` dropdown.\n */ class SpecialCharacters extends Plugin {\n    /**\n\t * Registered characters. A pair of a character name and its symbol.\n\t */ _characters;\n    /**\n\t * Registered groups. Each group contains a displayed label and a collection with symbol names.\n\t */ _groups;\n    /**\n\t * A label describing the \"All\" special characters category.\n\t */ _allSpecialCharactersGroupLabel;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Typing,\n            Dialog\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SpecialCharacters';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        const t = editor.t;\n        this._characters = new Map();\n        this._groups = new Map();\n        this._allSpecialCharactersGroupLabel = t('All');\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        editor.ui.componentFactory.add('specialCharacters', ()=>{\n            const button = this._createDialogButton(ButtonView);\n            button.set({\n                tooltip: true\n            });\n            return button;\n        });\n        editor.ui.componentFactory.add('menuBar:specialCharacters', ()=>{\n            return this._createDialogButton(MenuBarMenuListItemButtonView);\n        });\n    }\n    /**\n\t * Adds a collection of special characters to the specified group. The title of a special character must be unique.\n\t *\n\t * **Note:** The \"All\" category name is reserved by the plugin and cannot be used as a new name for a special\n\t * characters category.\n\t */ addItems(groupName, items, options = {\n        label: groupName\n    }) {\n        if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {\n            /**\n\t\t\t * The name \"All\" for a special category group cannot be used because it is a special category that displays all\n\t\t\t * available special characters.\n\t\t\t *\n\t\t\t * @error special-character-invalid-group-name\n\t\t\t */ throw new CKEditorError('special-character-invalid-group-name', null);\n        }\n        const group = this._getGroup(groupName, options.label);\n        for (const item of items){\n            group.items.add(item.title);\n            this._characters.set(item.title, item.character);\n        }\n    }\n    /**\n\t * Returns special character groups in an order determined based on configuration and registration sequence.\n\t */ getGroups() {\n        const groups = Array.from(this._groups.keys());\n        const order = this.editor.config.get('specialCharacters.order') || [];\n        const invalidGroup = order.find((item)=>!groups.includes(item));\n        if (invalidGroup) {\n            /**\n\t\t\t * One of the special character groups in the \"specialCharacters.order\" configuration doesn't exist.\n\t\t\t *\n\t\t\t * @error special-character-invalid-order-group-name\n\t\t\t */ throw new CKEditorError('special-character-invalid-order-group-name', null, {\n                invalidGroup\n            });\n        }\n        return new Set([\n            ...order,\n            ...groups\n        ]);\n    }\n    /**\n\t * Returns a collection of special characters symbol names (titles).\n\t */ getCharactersForGroup(groupName) {\n        if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {\n            return new Set(this._characters.keys());\n        }\n        const group = this._groups.get(groupName);\n        if (group) {\n            return group.items;\n        }\n    }\n    /**\n\t * Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`\n\t * is returned.\n\t *\n\t * @param title The title of a special character.\n\t */ getCharacter(title) {\n        return this._characters.get(title);\n    }\n    /**\n\t * Returns a group of special characters. If the group with the specified name does not exist, it will be created.\n\t *\n\t * @param groupName The name of the group to create.\n\t * @param label The label describing the new group.\n\t */ _getGroup(groupName, label) {\n        if (!this._groups.has(groupName)) {\n            this._groups.set(groupName, {\n                items: new Set(),\n                label\n            });\n        }\n        return this._groups.get(groupName);\n    }\n    /**\n\t * Updates the symbol grid depending on the currently selected character group.\n\t */ _updateGrid(currentGroupName, gridView) {\n        // Updating the grid starts with removing all tiles belonging to the old group.\n        gridView.tiles.clear();\n        const characterTitles = this.getCharactersForGroup(currentGroupName);\n        for (const title of characterTitles){\n            const character = this.getCharacter(title);\n            gridView.tiles.add(gridView.createTile(character, title));\n        }\n    }\n    /**\n\t * Initializes the dropdown, used for lazy loading.\n\t *\n\t * @returns An object with `categoriesView`, `gridView` and `infoView` properties, containing UI parts.\n\t */ _createDropdownPanelContent(locale) {\n        const groupEntries = Array.from(this.getGroups()).map((name)=>[\n                name,\n                this._groups.get(name).label\n            ]);\n        // The map contains a name of category (an identifier) and its label (a translational string).\n        const specialCharsGroups = new Map([\n            // Add a special group that shows all available special characters.\n            [\n                ALL_SPECIAL_CHARACTERS_GROUP,\n                this._allSpecialCharactersGroupLabel\n            ],\n            ...groupEntries\n        ]);\n        const categoriesView = new SpecialCharactersCategoriesView(locale, specialCharsGroups);\n        const gridView = new CharacterGridView(locale);\n        const infoView = new CharacterInfoView(locale);\n        gridView.on('tileHover', (evt, data)=>{\n            infoView.set(data);\n        });\n        gridView.on('tileFocus', (evt, data)=>{\n            infoView.set(data);\n        });\n        // Update the grid of special characters when a user changed the character group.\n        categoriesView.on('change:currentGroupName', (evt, propertyName, newValue)=>{\n            this._updateGrid(newValue, gridView);\n        });\n        // Set the initial content of the special characters grid.\n        this._updateGrid(categoriesView.currentGroupName, gridView);\n        return {\n            categoriesView,\n            gridView,\n            infoView\n        };\n    }\n    /**\n\t * Creates a button for toolbar and menu bar that will show special characters dialog.\n\t */ _createDialogButton(ButtonClass) {\n        const editor = this.editor;\n        const locale = editor.locale;\n        const buttonView = new ButtonClass(editor.locale);\n        const command = editor.commands.get('insertText');\n        const t = locale.t;\n        const dialogPlugin = this.editor.plugins.get('Dialog');\n        buttonView.set({\n            label: t('Special characters'),\n            icon: specialCharactersIcon,\n            isToggleable: true\n        });\n        buttonView.bind('isOn').to(dialogPlugin, 'id', (id)=>id === 'specialCharacters');\n        buttonView.bind('isEnabled').to(command, 'isEnabled');\n        buttonView.on('execute', ()=>{\n            if (dialogPlugin.id === 'specialCharacters') {\n                dialogPlugin.hide();\n                return;\n            }\n            this._showDialog();\n        });\n        return buttonView;\n    }\n    _showDialog() {\n        const editor = this.editor;\n        const dialog = editor.plugins.get('Dialog');\n        const locale = editor.locale;\n        const t = locale.t;\n        const { categoriesView, gridView, infoView } = this._createDropdownPanelContent(locale);\n        const content = new SpecialCharactersView(locale, categoriesView, gridView, infoView);\n        gridView.on('execute', (evt, data)=>{\n            editor.execute('insertText', {\n                text: data.character\n            });\n        });\n        dialog.show({\n            id: 'specialCharacters',\n            title: t('Special characters'),\n            className: 'ck-special-characters',\n            content,\n            position: DialogViewPosition.EDITOR_TOP_SIDE\n        });\n    }\n}\n\n/**\n * A plugin that provides special characters for the \"Arrows\" category.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class SpecialCharactersArrows extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SpecialCharactersArrows';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const plugin = editor.plugins.get('SpecialCharacters');\n        plugin.addItems('Arrows', [\n            {\n                title: t('leftwards simple arrow'),\n                character: '←'\n            },\n            {\n                title: t('rightwards simple arrow'),\n                character: '→'\n            },\n            {\n                title: t('upwards simple arrow'),\n                character: '↑'\n            },\n            {\n                title: t('downwards simple arrow'),\n                character: '↓'\n            },\n            {\n                title: t('leftwards double arrow'),\n                character: '⇐'\n            },\n            {\n                title: t('rightwards double arrow'),\n                character: '⇒'\n            },\n            {\n                title: t('upwards double arrow'),\n                character: '⇑'\n            },\n            {\n                title: t('downwards double arrow'),\n                character: '⇓'\n            },\n            {\n                title: t('leftwards dashed arrow'),\n                character: '⇠'\n            },\n            {\n                title: t('rightwards dashed arrow'),\n                character: '⇢'\n            },\n            {\n                title: t('upwards dashed arrow'),\n                character: '⇡'\n            },\n            {\n                title: t('downwards dashed arrow'),\n                character: '⇣'\n            },\n            {\n                title: t('leftwards arrow to bar'),\n                character: '⇤'\n            },\n            {\n                title: t('rightwards arrow to bar'),\n                character: '⇥'\n            },\n            {\n                title: t('upwards arrow to bar'),\n                character: '⤒'\n            },\n            {\n                title: t('downwards arrow to bar'),\n                character: '⤓'\n            },\n            {\n                title: t('up down arrow with base'),\n                character: '↨'\n            },\n            {\n                title: t('back with leftwards arrow above'),\n                character: '🔙'\n            },\n            {\n                title: t('end with leftwards arrow above'),\n                character: '🔚'\n            },\n            {\n                title: t('on with exclamation mark with left right arrow above'),\n                character: '🔛'\n            },\n            {\n                title: t('soon with rightwards arrow above'),\n                character: '🔜'\n            },\n            {\n                title: t('top with upwards arrow above'),\n                character: '🔝'\n            }\n        ], {\n            label: t('Arrows')\n        });\n    }\n}\n\n/**\n * A plugin that provides special characters for the \"Text\" category.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., SpecialCharacters, SpecialCharactersText ],\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class SpecialCharactersText extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SpecialCharactersText';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const plugin = editor.plugins.get('SpecialCharacters');\n        plugin.addItems('Text', [\n            {\n                character: '‹',\n                title: t('Single left-pointing angle quotation mark')\n            },\n            {\n                character: '›',\n                title: t('Single right-pointing angle quotation mark')\n            },\n            {\n                character: '«',\n                title: t('Left-pointing double angle quotation mark')\n            },\n            {\n                character: '»',\n                title: t('Right-pointing double angle quotation mark')\n            },\n            {\n                character: '‘',\n                title: t('Left single quotation mark')\n            },\n            {\n                character: '’',\n                title: t('Right single quotation mark')\n            },\n            {\n                character: '“',\n                title: t('Left double quotation mark')\n            },\n            {\n                character: '”',\n                title: t('Right double quotation mark')\n            },\n            {\n                character: '‚',\n                title: t('Single low-9 quotation mark')\n            },\n            {\n                character: '„',\n                title: t('Double low-9 quotation mark')\n            },\n            {\n                character: '¡',\n                title: t('Inverted exclamation mark')\n            },\n            {\n                character: '¿',\n                title: t('Inverted question mark')\n            },\n            {\n                character: '‥',\n                title: t('Two dot leader')\n            },\n            {\n                character: '…',\n                title: t('Horizontal ellipsis')\n            },\n            {\n                character: '‡',\n                title: t('Double dagger')\n            },\n            {\n                character: '‰',\n                title: t('Per mille sign')\n            },\n            {\n                character: '‱',\n                title: t('Per ten thousand sign')\n            },\n            {\n                character: '‼',\n                title: t('Double exclamation mark')\n            },\n            {\n                character: '⁈',\n                title: t('Question exclamation mark')\n            },\n            {\n                character: '⁉',\n                title: t('Exclamation question mark')\n            },\n            {\n                character: '⁇',\n                title: t('Double question mark')\n            },\n            {\n                character: '©',\n                title: t('Copyright sign')\n            },\n            {\n                character: '®',\n                title: t('Registered sign')\n            },\n            {\n                character: '™',\n                title: t('Trade mark sign')\n            },\n            {\n                character: '§',\n                title: t('Section sign')\n            },\n            {\n                character: '¶',\n                title: t('Paragraph sign')\n            },\n            {\n                character: '⁋',\n                title: t('Reversed paragraph sign')\n            }\n        ], {\n            label: t('Text')\n        });\n    }\n}\n\n/**\n * A plugin that provides special characters for the \"Mathematical\" category.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., SpecialCharacters, SpecialCharactersMathematical ],\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class SpecialCharactersMathematical extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SpecialCharactersMathematical';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const plugin = editor.plugins.get('SpecialCharacters');\n        plugin.addItems('Mathematical', [\n            {\n                character: '<',\n                title: t('Less-than sign')\n            },\n            {\n                character: '>',\n                title: t('Greater-than sign')\n            },\n            {\n                character: '≤',\n                title: t('Less-than or equal to')\n            },\n            {\n                character: '≥',\n                title: t('Greater-than or equal to')\n            },\n            {\n                character: '–',\n                title: t('En dash')\n            },\n            {\n                character: '—',\n                title: t('Em dash')\n            },\n            {\n                character: '¯',\n                title: t('Macron')\n            },\n            {\n                character: '‾',\n                title: t('Overline')\n            },\n            {\n                character: '°',\n                title: t('Degree sign')\n            },\n            {\n                character: '−',\n                title: t('Minus sign')\n            },\n            {\n                character: '±',\n                title: t('Plus-minus sign')\n            },\n            {\n                character: '÷',\n                title: t('Division sign')\n            },\n            {\n                character: '⁄',\n                title: t('Fraction slash')\n            },\n            {\n                character: '×',\n                title: t('Multiplication sign')\n            },\n            {\n                character: 'ƒ',\n                title: t('Latin small letter f with hook')\n            },\n            {\n                character: '∫',\n                title: t('Integral')\n            },\n            {\n                character: '∑',\n                title: t('N-ary summation')\n            },\n            {\n                character: '∞',\n                title: t('Infinity')\n            },\n            {\n                character: '√',\n                title: t('Square root')\n            },\n            {\n                character: '∼',\n                title: t('Tilde operator')\n            },\n            {\n                character: '≅',\n                title: t('Approximately equal to')\n            },\n            {\n                character: '≈',\n                title: t('Almost equal to')\n            },\n            {\n                character: '≠',\n                title: t('Not equal to')\n            },\n            {\n                character: '≡',\n                title: t('Identical to')\n            },\n            {\n                character: '∈',\n                title: t('Element of')\n            },\n            {\n                character: '∉',\n                title: t('Not an element of')\n            },\n            {\n                character: '∋',\n                title: t('Contains as member')\n            },\n            {\n                character: '∏',\n                title: t('N-ary product')\n            },\n            {\n                character: '∧',\n                title: t('Logical and')\n            },\n            {\n                character: '∨',\n                title: t('Logical or')\n            },\n            {\n                character: '¬',\n                title: t('Not sign')\n            },\n            {\n                character: '∩',\n                title: t('Intersection')\n            },\n            {\n                character: '∪',\n                title: t('Union')\n            },\n            {\n                character: '∂',\n                title: t('Partial differential')\n            },\n            {\n                character: '∀',\n                title: t('For all')\n            },\n            {\n                character: '∃',\n                title: t('There exists')\n            },\n            {\n                character: '∅',\n                title: t('Empty set')\n            },\n            {\n                character: '∇',\n                title: t('Nabla')\n            },\n            {\n                character: '∗',\n                title: t('Asterisk operator')\n            },\n            {\n                character: '∝',\n                title: t('Proportional to')\n            },\n            {\n                character: '∠',\n                title: t('Angle')\n            },\n            {\n                character: '¼',\n                title: t('Vulgar fraction one quarter')\n            },\n            {\n                character: '½',\n                title: t('Vulgar fraction one half')\n            },\n            {\n                character: '¾',\n                title: t('Vulgar fraction three quarters')\n            }\n        ], {\n            label: t('Mathematical')\n        });\n    }\n}\n\n/**\n * A plugin that provides special characters for the \"Latin\" category.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class SpecialCharactersLatin extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SpecialCharactersLatin';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const plugin = editor.plugins.get('SpecialCharacters');\n        plugin.addItems('Latin', [\n            {\n                character: 'Ā',\n                title: t('Latin capital letter a with macron')\n            },\n            {\n                character: 'ā',\n                title: t('Latin small letter a with macron')\n            },\n            {\n                character: 'Ă',\n                title: t('Latin capital letter a with breve')\n            },\n            {\n                character: 'ă',\n                title: t('Latin small letter a with breve')\n            },\n            {\n                character: 'Ą',\n                title: t('Latin capital letter a with ogonek')\n            },\n            {\n                character: 'ą',\n                title: t('Latin small letter a with ogonek')\n            },\n            {\n                character: 'Ć',\n                title: t('Latin capital letter c with acute')\n            },\n            {\n                character: 'ć',\n                title: t('Latin small letter c with acute')\n            },\n            {\n                character: 'Ĉ',\n                title: t('Latin capital letter c with circumflex')\n            },\n            {\n                character: 'ĉ',\n                title: t('Latin small letter c with circumflex')\n            },\n            {\n                character: 'Ċ',\n                title: t('Latin capital letter c with dot above')\n            },\n            {\n                character: 'ċ',\n                title: t('Latin small letter c with dot above')\n            },\n            {\n                character: 'Č',\n                title: t('Latin capital letter c with caron')\n            },\n            {\n                character: 'č',\n                title: t('Latin small letter c with caron')\n            },\n            {\n                character: 'Ď',\n                title: t('Latin capital letter d with caron')\n            },\n            {\n                character: 'ď',\n                title: t('Latin small letter d with caron')\n            },\n            {\n                character: 'Đ',\n                title: t('Latin capital letter d with stroke')\n            },\n            {\n                character: 'đ',\n                title: t('Latin small letter d with stroke')\n            },\n            {\n                character: 'Ē',\n                title: t('Latin capital letter e with macron')\n            },\n            {\n                character: 'ē',\n                title: t('Latin small letter e with macron')\n            },\n            {\n                character: 'Ĕ',\n                title: t('Latin capital letter e with breve')\n            },\n            {\n                character: 'ĕ',\n                title: t('Latin small letter e with breve')\n            },\n            {\n                character: 'Ė',\n                title: t('Latin capital letter e with dot above')\n            },\n            {\n                character: 'ė',\n                title: t('Latin small letter e with dot above')\n            },\n            {\n                character: 'Ę',\n                title: t('Latin capital letter e with ogonek')\n            },\n            {\n                character: 'ę',\n                title: t('Latin small letter e with ogonek')\n            },\n            {\n                character: 'Ě',\n                title: t('Latin capital letter e with caron')\n            },\n            {\n                character: 'ě',\n                title: t('Latin small letter e with caron')\n            },\n            {\n                character: 'Ĝ',\n                title: t('Latin capital letter g with circumflex')\n            },\n            {\n                character: 'ĝ',\n                title: t('Latin small letter g with circumflex')\n            },\n            {\n                character: 'Ğ',\n                title: t('Latin capital letter g with breve')\n            },\n            {\n                character: 'ğ',\n                title: t('Latin small letter g with breve')\n            },\n            {\n                character: 'Ġ',\n                title: t('Latin capital letter g with dot above')\n            },\n            {\n                character: 'ġ',\n                title: t('Latin small letter g with dot above')\n            },\n            {\n                character: 'Ģ',\n                title: t('Latin capital letter g with cedilla')\n            },\n            {\n                character: 'ģ',\n                title: t('Latin small letter g with cedilla')\n            },\n            {\n                character: 'Ĥ',\n                title: t('Latin capital letter h with circumflex')\n            },\n            {\n                character: 'ĥ',\n                title: t('Latin small letter h with circumflex')\n            },\n            {\n                character: 'Ħ',\n                title: t('Latin capital letter h with stroke')\n            },\n            {\n                character: 'ħ',\n                title: t('Latin small letter h with stroke')\n            },\n            {\n                character: 'Ĩ',\n                title: t('Latin capital letter i with tilde')\n            },\n            {\n                character: 'ĩ',\n                title: t('Latin small letter i with tilde')\n            },\n            {\n                character: 'Ī',\n                title: t('Latin capital letter i with macron')\n            },\n            {\n                character: 'ī',\n                title: t('Latin small letter i with macron')\n            },\n            {\n                character: 'Ĭ',\n                title: t('Latin capital letter i with breve')\n            },\n            {\n                character: 'ĭ',\n                title: t('Latin small letter i with breve')\n            },\n            {\n                character: 'Į',\n                title: t('Latin capital letter i with ogonek')\n            },\n            {\n                character: 'į',\n                title: t('Latin small letter i with ogonek')\n            },\n            {\n                character: 'İ',\n                title: t('Latin capital letter i with dot above')\n            },\n            {\n                character: 'ı',\n                title: t('Latin small letter dotless i')\n            },\n            {\n                character: 'Ĳ',\n                title: t('Latin capital ligature ij')\n            },\n            {\n                character: 'ĳ',\n                title: t('Latin small ligature ij')\n            },\n            {\n                character: 'Ĵ',\n                title: t('Latin capital letter j with circumflex')\n            },\n            {\n                character: 'ĵ',\n                title: t('Latin small letter j with circumflex')\n            },\n            {\n                character: 'Ķ',\n                title: t('Latin capital letter k with cedilla')\n            },\n            {\n                character: 'ķ',\n                title: t('Latin small letter k with cedilla')\n            },\n            {\n                character: 'ĸ',\n                title: t('Latin small letter kra')\n            },\n            {\n                character: 'Ĺ',\n                title: t('Latin capital letter l with acute')\n            },\n            {\n                character: 'ĺ',\n                title: t('Latin small letter l with acute')\n            },\n            {\n                character: 'Ļ',\n                title: t('Latin capital letter l with cedilla')\n            },\n            {\n                character: 'ļ',\n                title: t('Latin small letter l with cedilla')\n            },\n            {\n                character: 'Ľ',\n                title: t('Latin capital letter l with caron')\n            },\n            {\n                character: 'ľ',\n                title: t('Latin small letter l with caron')\n            },\n            {\n                character: 'Ŀ',\n                title: t('Latin capital letter l with middle dot')\n            },\n            {\n                character: 'ŀ',\n                title: t('Latin small letter l with middle dot')\n            },\n            {\n                character: 'Ł',\n                title: t('Latin capital letter l with stroke')\n            },\n            {\n                character: 'ł',\n                title: t('Latin small letter l with stroke')\n            },\n            {\n                character: 'Ń',\n                title: t('Latin capital letter n with acute')\n            },\n            {\n                character: 'ń',\n                title: t('Latin small letter n with acute')\n            },\n            {\n                character: 'Ņ',\n                title: t('Latin capital letter n with cedilla')\n            },\n            {\n                character: 'ņ',\n                title: t('Latin small letter n with cedilla')\n            },\n            {\n                character: 'Ň',\n                title: t('Latin capital letter n with caron')\n            },\n            {\n                character: 'ň',\n                title: t('Latin small letter n with caron')\n            },\n            {\n                character: 'ŉ',\n                title: t('Latin small letter n preceded by apostrophe')\n            },\n            {\n                character: 'Ŋ',\n                title: t('Latin capital letter eng')\n            },\n            {\n                character: 'ŋ',\n                title: t('Latin small letter eng')\n            },\n            {\n                character: 'Ō',\n                title: t('Latin capital letter o with macron')\n            },\n            {\n                character: 'ō',\n                title: t('Latin small letter o with macron')\n            },\n            {\n                character: 'Ŏ',\n                title: t('Latin capital letter o with breve')\n            },\n            {\n                character: 'ŏ',\n                title: t('Latin small letter o with breve')\n            },\n            {\n                character: 'Ő',\n                title: t('Latin capital letter o with double acute')\n            },\n            {\n                character: 'ő',\n                title: t('Latin small letter o with double acute')\n            },\n            {\n                character: 'Œ',\n                title: t('Latin capital ligature oe')\n            },\n            {\n                character: 'œ',\n                title: t('Latin small ligature oe')\n            },\n            {\n                character: 'Ŕ',\n                title: t('Latin capital letter r with acute')\n            },\n            {\n                character: 'ŕ',\n                title: t('Latin small letter r with acute')\n            },\n            {\n                character: 'Ŗ',\n                title: t('Latin capital letter r with cedilla')\n            },\n            {\n                character: 'ŗ',\n                title: t('Latin small letter r with cedilla')\n            },\n            {\n                character: 'Ř',\n                title: t('Latin capital letter r with caron')\n            },\n            {\n                character: 'ř',\n                title: t('Latin small letter r with caron')\n            },\n            {\n                character: 'Ś',\n                title: t('Latin capital letter s with acute')\n            },\n            {\n                character: 'ś',\n                title: t('Latin small letter s with acute')\n            },\n            {\n                character: 'Ŝ',\n                title: t('Latin capital letter s with circumflex')\n            },\n            {\n                character: 'ŝ',\n                title: t('Latin small letter s with circumflex')\n            },\n            {\n                character: 'Ş',\n                title: t('Latin capital letter s with cedilla')\n            },\n            {\n                character: 'ş',\n                title: t('Latin small letter s with cedilla')\n            },\n            {\n                character: 'Š',\n                title: t('Latin capital letter s with caron')\n            },\n            {\n                character: 'š',\n                title: t('Latin small letter s with caron')\n            },\n            {\n                character: 'Ţ',\n                title: t('Latin capital letter t with cedilla')\n            },\n            {\n                character: 'ţ',\n                title: t('Latin small letter t with cedilla')\n            },\n            {\n                character: 'Ť',\n                title: t('Latin capital letter t with caron')\n            },\n            {\n                character: 'ť',\n                title: t('Latin small letter t with caron')\n            },\n            {\n                character: 'Ŧ',\n                title: t('Latin capital letter t with stroke')\n            },\n            {\n                character: 'ŧ',\n                title: t('Latin small letter t with stroke')\n            },\n            {\n                character: 'Ũ',\n                title: t('Latin capital letter u with tilde')\n            },\n            {\n                character: 'ũ',\n                title: t('Latin small letter u with tilde')\n            },\n            {\n                character: 'Ū',\n                title: t('Latin capital letter u with macron')\n            },\n            {\n                character: 'ū',\n                title: t('Latin small letter u with macron')\n            },\n            {\n                character: 'Ŭ',\n                title: t('Latin capital letter u with breve')\n            },\n            {\n                character: 'ŭ',\n                title: t('Latin small letter u with breve')\n            },\n            {\n                character: 'Ů',\n                title: t('Latin capital letter u with ring above')\n            },\n            {\n                character: 'ů',\n                title: t('Latin small letter u with ring above')\n            },\n            {\n                character: 'Ű',\n                title: t('Latin capital letter u with double acute')\n            },\n            {\n                character: 'ű',\n                title: t('Latin small letter u with double acute')\n            },\n            {\n                character: 'Ų',\n                title: t('Latin capital letter u with ogonek')\n            },\n            {\n                character: 'ų',\n                title: t('Latin small letter u with ogonek')\n            },\n            {\n                character: 'Ŵ',\n                title: t('Latin capital letter w with circumflex')\n            },\n            {\n                character: 'ŵ',\n                title: t('Latin small letter w with circumflex')\n            },\n            {\n                character: 'Ŷ',\n                title: t('Latin capital letter y with circumflex')\n            },\n            {\n                character: 'ŷ',\n                title: t('Latin small letter y with circumflex')\n            },\n            {\n                character: 'Ÿ',\n                title: t('Latin capital letter y with diaeresis')\n            },\n            {\n                character: 'Ź',\n                title: t('Latin capital letter z with acute')\n            },\n            {\n                character: 'ź',\n                title: t('Latin small letter z with acute')\n            },\n            {\n                character: 'Ż',\n                title: t('Latin capital letter z with dot above')\n            },\n            {\n                character: 'ż',\n                title: t('Latin small letter z with dot above')\n            },\n            {\n                character: 'Ž',\n                title: t('Latin capital letter z with caron')\n            },\n            {\n                character: 'ž',\n                title: t('Latin small letter z with caron')\n            },\n            {\n                character: 'ſ',\n                title: t('Latin small letter long s')\n            }\n        ], {\n            label: t('Latin')\n        });\n    }\n}\n\n/**\n * A plugin that provides special characters for the \"Currency\" category.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class SpecialCharactersCurrency extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SpecialCharactersCurrency';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        const plugin = editor.plugins.get('SpecialCharacters');\n        plugin.addItems('Currency', [\n            {\n                character: '$',\n                title: t('Dollar sign')\n            },\n            {\n                character: '€',\n                title: t('Euro sign')\n            },\n            {\n                character: '¥',\n                title: t('Yen sign')\n            },\n            {\n                character: '£',\n                title: t('Pound sign')\n            },\n            {\n                character: '¢',\n                title: t('Cent sign')\n            },\n            {\n                character: '₠',\n                title: t('Euro-currency sign')\n            },\n            {\n                character: '₡',\n                title: t('Colon sign')\n            },\n            {\n                character: '₢',\n                title: t('Cruzeiro sign')\n            },\n            {\n                character: '₣',\n                title: t('French franc sign')\n            },\n            {\n                character: '₤',\n                title: t('Lira sign')\n            },\n            {\n                character: '¤',\n                title: t('Currency sign')\n            },\n            {\n                character: '₿',\n                title: t('Bitcoin sign')\n            },\n            {\n                character: '₥',\n                title: t('Mill sign')\n            },\n            {\n                character: '₦',\n                title: t('Naira sign')\n            },\n            {\n                character: '₧',\n                title: t('Peseta sign')\n            },\n            {\n                character: '₨',\n                title: t('Rupee sign')\n            },\n            {\n                character: '₩',\n                title: t('Won sign')\n            },\n            {\n                character: '₪',\n                title: t('New sheqel sign')\n            },\n            {\n                character: '₫',\n                title: t('Dong sign')\n            },\n            {\n                character: '₭',\n                title: t('Kip sign')\n            },\n            {\n                character: '₮',\n                title: t('Tugrik sign')\n            },\n            {\n                character: '₯',\n                title: t('Drachma sign')\n            },\n            {\n                character: '₰',\n                title: t('German penny sign')\n            },\n            {\n                character: '₱',\n                title: t('Peso sign')\n            },\n            {\n                character: '₲',\n                title: t('Guarani sign')\n            },\n            {\n                character: '₳',\n                title: t('Austral sign')\n            },\n            {\n                character: '₴',\n                title: t('Hryvnia sign')\n            },\n            {\n                character: '₵',\n                title: t('Cedi sign')\n            },\n            {\n                character: '₶',\n                title: t('Livre tournois sign')\n            },\n            {\n                character: '₷',\n                title: t('Spesmilo sign')\n            },\n            {\n                character: '₸',\n                title: t('Tenge sign')\n            },\n            {\n                character: '₹',\n                title: t('Indian rupee sign')\n            },\n            {\n                character: '₺',\n                title: t('Turkish lira sign')\n            },\n            {\n                character: '₻',\n                title: t('Nordic mark sign')\n            },\n            {\n                character: '₼',\n                title: t('Manat sign')\n            },\n            {\n                character: '₽',\n                title: t('Ruble sign')\n            }\n        ], {\n            label: t('Currency')\n        });\n    }\n}\n\n/**\n * A plugin combining a basic set of characters for the special characters plugin.\n *\n * ```ts\n * ClassicEditor\n *   .create( {\n *     plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],\n *   } )\n *   .then( ... )\n *   .catch( ... );\n * ```\n */ class SpecialCharactersEssentials extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'SpecialCharactersEssentials';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            SpecialCharactersCurrency,\n            SpecialCharactersText,\n            SpecialCharactersMathematical,\n            SpecialCharactersArrows,\n            SpecialCharactersLatin\n        ];\n    }\n}\n\nexport { SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { toWidgetEditable, toWidget, Widget, isWidget, WidgetToolbarRepository } from '@ckeditor/ckeditor5-widget/dist/index.js';\nimport { first, global, CKEditorError, KeystrokeHandler, FocusTracker, Collection, getLocalizedArrowKeyCodeDirection, Rect, DomEmitterMixin } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { View, addKeyboardHandlingForGrid, ButtonView, createDropdown, MenuBarMenuView, SwitchButtonView, SplitButtonView, addListToDropdown, ViewModel, ViewCollection, FocusCycler, InputTextView, ColorSelectorView, FormHeaderView, submitHandler, LabelView, LabeledFieldView, createLabeledDropdown, createLabeledInputText, ToolbarView, BalloonPanelView, ContextualBalloon, normalizeColorOptions, getLocalizedColorOptions, clickOutsideHandler } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { ClipboardMarkersUtils, ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\nimport { DomEventObserver, isColor, isLength, isPercentage, addBorderRules, addPaddingRules, addBackgroundRules, enablePlaceholder, Element } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { isObject, debounce, isEqual, throttle } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module table/converters/tableproperties\n */ /**\n * Conversion helper for upcasting attributes using normalized styles.\n *\n * @param options.modelAttribute The attribute to set.\n * @param options.styleName The style name to convert.\n * @param options.viewElement The view element name that should be converted.\n * @param options.defaultValue The default value for the specified `modelAttribute`.\n * @param options.shouldUpcast The function which returns `true` if style should be upcasted from this element.\n */ function upcastStyleToAttribute(conversion, options) {\n    const { modelAttribute, styleName, viewElement, defaultValue, reduceBoxSides = false, shouldUpcast = ()=>true } = options;\n    conversion.for('upcast').attributeToAttribute({\n        view: {\n            name: viewElement,\n            styles: {\n                [styleName]: /[\\s\\S]+/\n            }\n        },\n        model: {\n            key: modelAttribute,\n            value: (viewElement)=>{\n                if (!shouldUpcast(viewElement)) {\n                    return;\n                }\n                const normalized = viewElement.getNormalizedStyle(styleName);\n                const value = reduceBoxSides ? reduceBoxSidesValue(normalized) : normalized;\n                if (defaultValue !== value) {\n                    return value;\n                }\n            }\n        }\n    });\n}\n/**\n * Conversion helper for upcasting border styles for view elements.\n *\n * @param defaultBorder The default border values.\n * @param defaultBorder.color The default `borderColor` value.\n * @param defaultBorder.style The default `borderStyle` value.\n * @param defaultBorder.width The default `borderWidth` value.\n */ function upcastBorderStyles(conversion, viewElementName, modelAttributes, defaultBorder) {\n    conversion.for('upcast').add((dispatcher)=>dispatcher.on('element:' + viewElementName, (evt, data, conversionApi)=>{\n            // If the element was not converted by element-to-element converter,\n            // we should not try to convert the style. See #8393.\n            if (!data.modelRange) {\n                return;\n            }\n            // Check the most detailed properties. These will be always set directly or\n            // when using the \"group\" properties like: `border-(top|right|bottom|left)` or `border`.\n            const stylesToConsume = [\n                'border-top-width',\n                'border-top-color',\n                'border-top-style',\n                'border-bottom-width',\n                'border-bottom-color',\n                'border-bottom-style',\n                'border-right-width',\n                'border-right-color',\n                'border-right-style',\n                'border-left-width',\n                'border-left-color',\n                'border-left-style'\n            ].filter((styleName)=>data.viewItem.hasStyle(styleName));\n            if (!stylesToConsume.length) {\n                return;\n            }\n            const matcherPattern = {\n                styles: stylesToConsume\n            };\n            // Try to consume appropriate values from consumable values list.\n            if (!conversionApi.consumable.test(data.viewItem, matcherPattern)) {\n                return;\n            }\n            const modelElement = [\n                ...data.modelRange.getItems({\n                    shallow: true\n                })\n            ].pop();\n            conversionApi.consumable.consume(data.viewItem, matcherPattern);\n            const normalizedBorder = {\n                style: data.viewItem.getNormalizedStyle('border-style'),\n                color: data.viewItem.getNormalizedStyle('border-color'),\n                width: data.viewItem.getNormalizedStyle('border-width')\n            };\n            const reducedBorder = {\n                style: reduceBoxSidesValue(normalizedBorder.style),\n                color: reduceBoxSidesValue(normalizedBorder.color),\n                width: reduceBoxSidesValue(normalizedBorder.width)\n            };\n            if (reducedBorder.style !== defaultBorder.style) {\n                conversionApi.writer.setAttribute(modelAttributes.style, reducedBorder.style, modelElement);\n            }\n            if (reducedBorder.color !== defaultBorder.color) {\n                conversionApi.writer.setAttribute(modelAttributes.color, reducedBorder.color, modelElement);\n            }\n            if (reducedBorder.width !== defaultBorder.width) {\n                conversionApi.writer.setAttribute(modelAttributes.width, reducedBorder.width, modelElement);\n            }\n        }));\n}\n/**\n * Conversion helper for downcasting an attribute to a style.\n */ function downcastAttributeToStyle(conversion, options) {\n    const { modelElement, modelAttribute, styleName } = options;\n    conversion.for('downcast').attributeToAttribute({\n        model: {\n            name: modelElement,\n            key: modelAttribute\n        },\n        view: (modelAttributeValue)=>({\n                key: 'style',\n                value: {\n                    [styleName]: modelAttributeValue\n                }\n            })\n    });\n}\n/**\n * Conversion helper for downcasting attributes from the model table to a view table (not to `<figure>`).\n */ function downcastTableAttribute(conversion, options) {\n    const { modelAttribute, styleName } = options;\n    conversion.for('downcast').add((dispatcher)=>dispatcher.on(`attribute:${modelAttribute}:table`, (evt, data, conversionApi)=>{\n            const { item, attributeNewValue } = data;\n            const { mapper, writer } = conversionApi;\n            if (!conversionApi.consumable.consume(data.item, evt.name)) {\n                return;\n            }\n            const table = [\n                ...mapper.toViewElement(item).getChildren()\n            ].find((child)=>child.is('element', 'table'));\n            if (attributeNewValue) {\n                writer.setStyle(styleName, attributeNewValue, table);\n            } else {\n                writer.removeStyle(styleName, table);\n            }\n        }));\n}\n/**\n * Reduces the full top, right, bottom, left object to a single string if all sides are equal.\n * Returns original style otherwise.\n */ function reduceBoxSidesValue(style) {\n    if (!style) {\n        return;\n    }\n    const sides = [\n        'top',\n        'right',\n        'bottom',\n        'left'\n    ];\n    const allSidesDefined = sides.every((side)=>style[side]);\n    if (!allSidesDefined) {\n        return style;\n    }\n    const topSideStyle = style.top;\n    const allSidesEqual = sides.every((side)=>style[side] === topSideStyle);\n    if (!allSidesEqual) {\n        return style;\n    }\n    return topSideStyle;\n}\n\n/**\n * A common method to update the numeric value. If a value is the default one, it will be unset.\n *\n * @param key An attribute key.\n * @param value The new attribute value.\n * @param item A model item on which the attribute will be set.\n * @param defaultValue The default attribute value. If a value is lower or equal, it will be unset.\n */ function updateNumericAttribute(key, value, item, writer, defaultValue = 1) {\n    if (value !== undefined && value !== null && defaultValue !== undefined && defaultValue !== null && value > defaultValue) {\n        writer.setAttribute(key, value, item);\n    } else {\n        writer.removeAttribute(key, item);\n    }\n}\n/**\n * A common method to create an empty table cell. It creates a proper model structure as a table cell must have at least one block inside.\n *\n * @param writer The model writer.\n * @param insertPosition The position at which the table cell should be inserted.\n * @param attributes The element attributes.\n * @returns Created table cell.\n */ function createEmptyTableCell(writer, insertPosition, attributes = {}) {\n    const tableCell = writer.createElement('tableCell', attributes);\n    writer.insertElement('paragraph', tableCell);\n    writer.insert(tableCell, insertPosition);\n    return tableCell;\n}\n/**\n * Checks if a table cell belongs to the heading column section.\n */ function isHeadingColumnCell(tableUtils, tableCell) {\n    const table = tableCell.parent.parent;\n    const headingColumns = parseInt(table.getAttribute('headingColumns') || '0');\n    const { column } = tableUtils.getCellLocation(tableCell);\n    return !!headingColumns && column < headingColumns;\n}\n/**\n * Enables conversion for an attribute for simple view-model mappings.\n *\n * @param options.defaultValue The default value for the specified `modelAttribute`.\n */ function enableProperty$1(schema, conversion, options) {\n    const { modelAttribute } = options;\n    schema.extend('tableCell', {\n        allowAttributes: [\n            modelAttribute\n        ]\n    });\n    upcastStyleToAttribute(conversion, {\n        viewElement: /^(td|th)$/,\n        ...options\n    });\n    downcastAttributeToStyle(conversion, {\n        modelElement: 'tableCell',\n        ...options\n    });\n}\n/**\n * Depending on the position of the selection we either return the table under cursor or look for the table higher in the hierarchy.\n */ function getSelectionAffectedTable(selection) {\n    const selectedElement = selection.getSelectedElement();\n    // Is the command triggered from the `tableToolbar`?\n    if (selectedElement && selectedElement.is('element', 'table')) {\n        return selectedElement;\n    }\n    return selection.getFirstPosition().findAncestor('table');\n}\n\n/**\n * Returns a function that converts the table view representation:\n *\n * ```xml\n * <figure class=\"table\"><table>...</table></figure>\n * ```\n *\n * to the model representation:\n *\n * ```xml\n * <table></table>\n * ```\n */ function upcastTableFigure() {\n    return (dispatcher)=>{\n        dispatcher.on('element:figure', (evt, data, conversionApi)=>{\n            // Do not convert if this is not a \"table figure\".\n            if (!conversionApi.consumable.test(data.viewItem, {\n                name: true,\n                classes: 'table'\n            })) {\n                return;\n            }\n            // Find a table element inside the figure element.\n            const viewTable = getViewTableFromFigure(data.viewItem);\n            // Do not convert if table element is absent or was already converted.\n            if (!viewTable || !conversionApi.consumable.test(viewTable, {\n                name: true\n            })) {\n                return;\n            }\n            // Consume the figure to prevent other converters from processing it again.\n            conversionApi.consumable.consume(data.viewItem, {\n                name: true,\n                classes: 'table'\n            });\n            // Convert view table to model table.\n            const conversionResult = conversionApi.convertItem(viewTable, data.modelCursor);\n            // Get table element from conversion result.\n            const modelTable = first(conversionResult.modelRange.getItems());\n            // When table wasn't successfully converted then finish conversion.\n            if (!modelTable) {\n                // Revert consumed figure so other features can convert it.\n                conversionApi.consumable.revert(data.viewItem, {\n                    name: true,\n                    classes: 'table'\n                });\n                return;\n            }\n            conversionApi.convertChildren(data.viewItem, conversionApi.writer.createPositionAt(modelTable, 'end'));\n            conversionApi.updateConversionResult(modelTable, data);\n        });\n    };\n}\n/**\n * View table element to model table element conversion helper.\n *\n * This conversion helper converts the table element as well as table rows.\n *\n * @returns Conversion helper.\n */ function upcastTable() {\n    return (dispatcher)=>{\n        dispatcher.on('element:table', (evt, data, conversionApi)=>{\n            const viewTable = data.viewItem;\n            // When element was already consumed then skip it.\n            if (!conversionApi.consumable.test(viewTable, {\n                name: true\n            })) {\n                return;\n            }\n            const { rows, headingRows, headingColumns } = scanTable(viewTable);\n            // Only set attributes if values is greater then 0.\n            const attributes = {};\n            if (headingColumns) {\n                attributes.headingColumns = headingColumns;\n            }\n            if (headingRows) {\n                attributes.headingRows = headingRows;\n            }\n            const table = conversionApi.writer.createElement('table', attributes);\n            if (!conversionApi.safeInsert(table, data.modelCursor)) {\n                return;\n            }\n            conversionApi.consumable.consume(viewTable, {\n                name: true\n            });\n            // Upcast table rows in proper order (heading rows first).\n            rows.forEach((row)=>conversionApi.convertItem(row, conversionApi.writer.createPositionAt(table, 'end')));\n            // Convert everything else.\n            conversionApi.convertChildren(viewTable, conversionApi.writer.createPositionAt(table, 'end'));\n            // Create one row and one table cell for empty table.\n            if (table.isEmpty) {\n                const row = conversionApi.writer.createElement('tableRow');\n                conversionApi.writer.insert(row, conversionApi.writer.createPositionAt(table, 'end'));\n                createEmptyTableCell(conversionApi.writer, conversionApi.writer.createPositionAt(row, 'end'));\n            }\n            conversionApi.updateConversionResult(table, data);\n        });\n    };\n}\n/**\n * A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.\n *\n * An empty row is considered a table model error but when handling clipboard data there could be rows that contain only row-spanned cells\n * and empty TR-s are used to maintain the table structure (also {@link module:table/tablewalker~TableWalker} assumes that there are only\n * rows that have related `tableRow` elements).\n *\n * *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue\n * of an improper table with all empty rows.\n *\n * @returns Conversion helper.\n */ function skipEmptyTableRow() {\n    return (dispatcher)=>{\n        dispatcher.on('element:tr', (evt, data)=>{\n            if (data.viewItem.isEmpty && data.modelCursor.index == 0) {\n                evt.stop();\n            }\n        }, {\n            priority: 'high'\n        });\n    };\n}\n/**\n * A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.\n *\n * @returns Conversion helper.\n */ function ensureParagraphInTableCell(elementName) {\n    return (dispatcher)=>{\n        dispatcher.on(`element:${elementName}`, (evt, data, { writer })=>{\n            // The default converter will create a model range on converted table cell.\n            if (!data.modelRange) {\n                return;\n            }\n            const tableCell = data.modelRange.start.nodeAfter;\n            const modelCursor = writer.createPositionAt(tableCell, 0);\n            // Ensure a paragraph in the model for empty table cells for converted table cells.\n            if (data.viewItem.isEmpty) {\n                writer.insertElement('paragraph', modelCursor);\n                return;\n            }\n            const childNodes = Array.from(tableCell.getChildren());\n            // In case there are only markers inside the table cell then move them to the paragraph.\n            if (childNodes.every((node)=>node.is('element', '$marker'))) {\n                const paragraph = writer.createElement('paragraph');\n                writer.insert(paragraph, writer.createPositionAt(tableCell, 0));\n                for (const node of childNodes){\n                    writer.move(writer.createRangeOn(node), writer.createPositionAt(paragraph, 'end'));\n                }\n            }\n        }, {\n            priority: 'low'\n        });\n    };\n}\n/**\n * Get view `<table>` element from the view widget (`<figure>`).\n */ function getViewTableFromFigure(figureView) {\n    for (const figureChild of figureView.getChildren()){\n        if (figureChild.is('element', 'table')) {\n            return figureChild;\n        }\n    }\n}\n/**\n * Scans table rows and extracts required metadata from the table:\n *\n * headingRows    - The number of rows that go as table headers.\n * headingColumns - The maximum number of row headings.\n * rows           - Sorted `<tr>` elements as they should go into the model - ie. if `<thead>` is inserted after `<tbody>` in the view.\n */ function scanTable(viewTable) {\n    let headingRows = 0;\n    let headingColumns = undefined;\n    // The `<tbody>` and `<thead>` sections in the DOM do not have to be in order `<thead>` -> `<tbody>` and there might be more than one\n    // of them.\n    // As the model does not have these sections, rows from different sections must be sorted.\n    // For example, below is a valid HTML table:\n    //\n    // <table>\n    //   <tbody><tr><td>2</td></tr></tbody>\n    //   <thead><tr><td>1</td></tr></thead>\n    //   <tbody><tr><td>3</td></tr></tbody>\n    // </table>\n    //\n    // But browsers will render rows in order as: 1 as the heading and 2 and 3 as the body.\n    const headRows = [];\n    const bodyRows = [];\n    // Currently the editor does not support more then one <thead> section.\n    // Only the first <thead> from the view will be used as a heading row and the others will be converted to body rows.\n    let firstTheadElement;\n    for (const tableChild of Array.from(viewTable.getChildren())){\n        // Only `<thead>`, `<tbody>` & `<tfoot>` from allowed table children can have `<tr>`s.\n        // The else is for future purposes (mainly `<caption>`).\n        if (tableChild.name !== 'tbody' && tableChild.name !== 'thead' && tableChild.name !== 'tfoot') {\n            continue;\n        }\n        // Save the first `<thead>` in the table as table header - all other ones will be converted to table body rows.\n        if (tableChild.name === 'thead' && !firstTheadElement) {\n            firstTheadElement = tableChild;\n        }\n        // There might be some extra empty text nodes between the `<tr>`s.\n        // Make sure further code operates on `tr`s only. (#145)\n        const trs = Array.from(tableChild.getChildren()).filter((el)=>el.is('element', 'tr'));\n        for (const tr of trs){\n            // This <tr> is a child of a first <thead> element.\n            if (firstTheadElement && tableChild === firstTheadElement || tableChild.name === 'tbody' && Array.from(tr.getChildren()).length && Array.from(tr.getChildren()).every((e)=>e.is('element', 'th'))) {\n                headingRows++;\n                headRows.push(tr);\n            } else {\n                bodyRows.push(tr);\n                // For other rows check how many column headings this row has.\n                const headingCols = scanRowForHeadingColumns(tr);\n                if (!headingColumns || headingCols < headingColumns) {\n                    headingColumns = headingCols;\n                }\n            }\n        }\n    }\n    return {\n        headingRows,\n        headingColumns: headingColumns || 0,\n        rows: [\n            ...headRows,\n            ...bodyRows\n        ]\n    };\n}\n/**\n * Scans a `<tr>` element and its children for metadata:\n * - For heading row:\n *     - Adds this row to either the heading or the body rows.\n *     - Updates the number of heading rows.\n * - For body rows:\n *     - Calculates the number of column headings.\n */ function scanRowForHeadingColumns(tr) {\n    let headingColumns = 0;\n    let index = 0;\n    // Filter out empty text nodes from tr children.\n    const children = Array.from(tr.getChildren()).filter((child)=>child.name === 'th' || child.name === 'td');\n    // Count starting adjacent <th> elements of a <tr>.\n    while(index < children.length && children[index].name === 'th'){\n        const th = children[index];\n        // Adjust columns calculation by the number of spanned columns.\n        const colspan = parseInt(th.getAttribute('colspan') || '1');\n        headingColumns = headingColumns + colspan;\n        index++;\n    }\n    return headingColumns;\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module table/tablewalker\n */ /**\n * The table iterator class. It allows to iterate over table cells. For each cell the iterator yields\n * {@link module:table/tablewalker~TableSlot} with proper table cell attributes.\n */ class TableWalker {\n    /**\n\t * The walker's table element.\n\t *\n\t * @internal\n\t */ _table;\n    /**\n\t * A row index from which this iterator will start.\n\t */ _startRow;\n    /**\n\t * A row index at which this iterator will end.\n\t */ _endRow;\n    /**\n\t * If set, the table walker will only output cells from a given column and following ones or cells that overlap them.\n\t */ _startColumn;\n    /**\n\t * If set, the table walker will only output cells up to a given column.\n\t */ _endColumn;\n    /**\n\t * Enables output of spanned cells that are normally not yielded.\n\t */ _includeAllSlots;\n    /**\n\t * Row indexes to skip from the iteration.\n\t */ _skipRows;\n    /**\n\t * The current row index.\n\t *\n\t * @internal\n\t */ _row;\n    /**\n\t * The index of the current row element in the table.\n\t *\n\t * @internal\n\t */ _rowIndex;\n    /**\n\t * The current column index.\n\t *\n\t * @internal\n\t */ _column;\n    /**\n\t * The cell index in a parent row. For spanned cells when {@link #_includeAllSlots} is set to `true`,\n\t * this represents the index of the next table cell.\n\t *\n\t * @internal\n\t */ _cellIndex;\n    /**\n\t * Holds a map of spanned cells in a table.\n\t */ _spannedCells;\n    /**\n\t * Index of the next column where a cell is anchored.\n\t */ _nextCellAtColumn;\n    /**\n\t * Indicates whether the iterator jumped to (or close to) the start row, ignoring rows that don't need to be traversed.\n\t */ _jumpedToStartRow = false;\n    /**\n\t * Creates an instance of the table walker.\n\t *\n\t * The table walker iterates internally by traversing the table from row index = 0 and column index = 0.\n\t * It walks row by row and column by column in order to output values defined in the constructor.\n\t * By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,\n\t * pass the `includeAllSlots` option to the constructor.\n\t *\n\t * The most important values of the iterator are column and row indexes of a cell.\n\t *\n\t * See {@link module:table/tablewalker~TableSlot} what values are returned by the table walker.\n\t *\n\t * To iterate over a given row:\n\t *\n\t * ```ts\n\t * const tableWalker = new TableWalker( table, { startRow: 1, endRow: 2 } );\n\t *\n\t * for ( const tableSlot of tableWalker ) {\n\t *   console.log( 'A cell at row', tableSlot.row, 'and column', tableSlot.column );\n\t * }\n\t * ```\n\t *\n\t * For instance the code above for the following table:\n\t *\n\t *  +----+----+----+----+----+----+\n\t *  | 00      | 02 | 03 | 04 | 05 |\n\t *  |         +----+----+----+----+\n\t *  |         | 12      | 14 | 15 |\n\t *  |         +----+----+----+    +\n\t *  |         | 22           |    |\n\t *  |----+----+----+----+----+    +\n\t *  | 30 | 31 | 32 | 33 | 34 |    |\n\t *  +----+----+----+----+----+----+\n\t *\n\t * will log in the console:\n\t *\n\t *  'A cell at row 1 and column 2'\n\t *  'A cell at row 1 and column 4'\n\t *  'A cell at row 1 and column 5'\n\t *  'A cell at row 2 and column 2'\n\t *\n\t * To also iterate over spanned cells:\n\t *\n\t * ```ts\n\t * const tableWalker = new TableWalker( table, { row: 1, includeAllSlots: true } );\n\t *\n\t * for ( const tableSlot of tableWalker ) {\n\t *   console.log( 'Slot at', tableSlot.row, 'x', tableSlot.column, ':', tableSlot.isAnchor ? 'is anchored' : 'is spanned' );\n\t * }\n\t * ```\n\t *\n\t * will log in the console for the table from the previous example:\n\t *\n\t *  'Cell at 1 x 0 : is spanned'\n\t *  'Cell at 1 x 1 : is spanned'\n\t *  'Cell at 1 x 2 : is anchored'\n\t *  'Cell at 1 x 3 : is spanned'\n\t *  'Cell at 1 x 4 : is anchored'\n\t *  'Cell at 1 x 5 : is anchored'\n\t *\n\t * **Note**: Option `row` is a shortcut that sets both `startRow` and `endRow` to the same row.\n\t * (Use either `row` or `startRow` and `endRow` but never together). Similarly the `column` option sets both `startColumn`\n\t * and `endColumn` to the same column (Use either `column` or `startColumn` and `endColumn` but never together).\n\t *\n\t * @param table A table over which the walker iterates.\n\t * @param options An object with configuration.\n\t * @param options.row A row index for which this iterator will output cells. Can't be used together with `startRow` and `endRow`.\n\t * @param options.startRow A row index from which this iterator should start. Can't be used together with `row`. Default value is 0.\n\t * @param options.endRow A row index at which this iterator should end. Can't be used together with `row`.\n\t * @param options.column A column index for which this iterator will output cells.\n\t * Can't be used together with `startColumn` and `endColumn`.\n\t * @param options.startColumn A column index from which this iterator should start.\n\t * Can't be used together with `column`. Default value is 0.\n\t * @param options.endColumn A column index at which this iterator should end. Can't be used together with `column`.\n\t * @param options.includeAllSlots Also return values for spanned cells. Default value is \"false\".\n\t */ constructor(table, options = {}){\n        this._table = table;\n        this._startRow = options.row !== undefined ? options.row : options.startRow || 0;\n        this._endRow = options.row !== undefined ? options.row : options.endRow;\n        this._startColumn = options.column !== undefined ? options.column : options.startColumn || 0;\n        this._endColumn = options.column !== undefined ? options.column : options.endColumn;\n        this._includeAllSlots = !!options.includeAllSlots;\n        this._skipRows = new Set();\n        this._row = 0;\n        this._rowIndex = 0;\n        this._column = 0;\n        this._cellIndex = 0;\n        this._spannedCells = new Map();\n        this._nextCellAtColumn = -1;\n    }\n    /**\n\t * Iterable interface.\n\t */ [Symbol.iterator]() {\n        return this;\n    }\n    /**\n\t * Gets the next table walker's value.\n\t *\n\t * @returns The next table walker's value.\n\t */ next() {\n        if (this._canJumpToStartRow()) {\n            this._jumpToNonSpannedRowClosestToStartRow();\n        }\n        const row = this._table.getChild(this._rowIndex);\n        // Iterator is done when there's no row (table ended) or the row is after `endRow` limit.\n        if (!row || this._isOverEndRow()) {\n            return {\n                done: true,\n                value: undefined\n            };\n        }\n        // We step over current element when it is not a tableRow instance.\n        if (!row.is('element', 'tableRow')) {\n            this._rowIndex++;\n            return this.next();\n        }\n        if (this._isOverEndColumn()) {\n            return this._advanceToNextRow();\n        }\n        let outValue = null;\n        const spanData = this._getSpanned();\n        if (spanData) {\n            if (this._includeAllSlots && !this._shouldSkipSlot()) {\n                outValue = this._formatOutValue(spanData.cell, spanData.row, spanData.column);\n            }\n        } else {\n            const cell = row.getChild(this._cellIndex);\n            if (!cell) {\n                // If there are no more cells left in row advance to the next row.\n                return this._advanceToNextRow();\n            }\n            const colspan = parseInt(cell.getAttribute('colspan') || '1');\n            const rowspan = parseInt(cell.getAttribute('rowspan') || '1');\n            // Record this cell spans if it's not 1x1 cell.\n            if (colspan > 1 || rowspan > 1) {\n                this._recordSpans(cell, rowspan, colspan);\n            }\n            if (!this._shouldSkipSlot()) {\n                outValue = this._formatOutValue(cell);\n            }\n            this._nextCellAtColumn = this._column + colspan;\n        }\n        // Advance to the next column before returning value.\n        this._column++;\n        if (this._column == this._nextCellAtColumn) {\n            this._cellIndex++;\n        }\n        // The current value will be returned only if current row and column are not skipped.\n        return outValue || this.next();\n    }\n    /**\n\t * Marks a row to skip in the next iteration. It will also skip cells from the current row if there are any cells from the current row\n\t * to output.\n\t *\n\t * @param row The row index to skip.\n\t */ skipRow(row) {\n        this._skipRows.add(row);\n    }\n    /**\n\t * Advances internal cursor to the next row.\n\t */ _advanceToNextRow() {\n        this._row++;\n        this._rowIndex++;\n        this._column = 0;\n        this._cellIndex = 0;\n        this._nextCellAtColumn = -1;\n        return this.next();\n    }\n    /**\n\t * Checks if the current row is over {@link #_endRow}.\n\t */ _isOverEndRow() {\n        // If #_endRow is defined skip all rows after it.\n        return this._endRow !== undefined && this._row > this._endRow;\n    }\n    /**\n\t * Checks if the current cell is over {@link #_endColumn}\n\t */ _isOverEndColumn() {\n        // If #_endColumn is defined skip all cells after it.\n        return this._endColumn !== undefined && this._column > this._endColumn;\n    }\n    /**\n\t * A common method for formatting the iterator's output value.\n\t *\n\t * @param cell The table cell to output.\n\t * @param anchorRow The row index of a cell anchor slot.\n\t * @param anchorColumn The column index of a cell anchor slot.\n\t */ _formatOutValue(cell, anchorRow = this._row, anchorColumn = this._column) {\n        return {\n            done: false,\n            value: new TableSlot(this, cell, anchorRow, anchorColumn)\n        };\n    }\n    /**\n\t * Checks if the current slot should be skipped.\n\t */ _shouldSkipSlot() {\n        const rowIsMarkedAsSkipped = this._skipRows.has(this._row);\n        const rowIsBeforeStartRow = this._row < this._startRow;\n        const columnIsBeforeStartColumn = this._column < this._startColumn;\n        const columnIsAfterEndColumn = this._endColumn !== undefined && this._column > this._endColumn;\n        return rowIsMarkedAsSkipped || rowIsBeforeStartRow || columnIsBeforeStartColumn || columnIsAfterEndColumn;\n    }\n    /**\n\t * Returns the cell element that is spanned over the current cell location.\n\t */ _getSpanned() {\n        const rowMap = this._spannedCells.get(this._row);\n        // No spans for given row.\n        if (!rowMap) {\n            return null;\n        }\n        // If spans for given rows has entry for column it means that this location if spanned by other cell.\n        return rowMap.get(this._column) || null;\n    }\n    /**\n\t * Updates spanned cells map relative to the current cell location and its span dimensions.\n\t *\n\t * @param cell A cell that is spanned.\n\t * @param rowspan Cell height.\n\t * @param colspan Cell width.\n\t */ _recordSpans(cell, rowspan, colspan) {\n        const data = {\n            cell,\n            row: this._row,\n            column: this._column\n        };\n        for(let rowToUpdate = this._row; rowToUpdate < this._row + rowspan; rowToUpdate++){\n            for(let columnToUpdate = this._column; columnToUpdate < this._column + colspan; columnToUpdate++){\n                if (rowToUpdate != this._row || columnToUpdate != this._column) {\n                    this._markSpannedCell(rowToUpdate, columnToUpdate, data);\n                }\n            }\n        }\n    }\n    /**\n\t * Marks the cell location as spanned by another cell.\n\t *\n\t * @param row The row index of the cell location.\n\t * @param column The column index of the cell location.\n\t * @param data A spanned cell details (cell element, anchor row and column).\n\t */ _markSpannedCell(row, column, data) {\n        if (!this._spannedCells.has(row)) {\n            this._spannedCells.set(row, new Map());\n        }\n        const rowSpans = this._spannedCells.get(row);\n        rowSpans.set(column, data);\n    }\n    /**\n\t * Checks if part of the table can be skipped.\n\t */ _canJumpToStartRow() {\n        return !!this._startRow && this._startRow > 0 && !this._jumpedToStartRow;\n    }\n    /**\n\t * Sets the current row to `this._startRow` or the first row before it that has the number of cells\n\t * equal to the number of columns in the table.\n\t *\n\t * Example:\n\t * \t+----+----+----+\n\t *  | 00 | 01 | 02 |\n\t *  |----+----+----+\n\t *  | 10      | 12 |\n\t *  |         +----+\n\t *  |         | 22 |\n\t *  |         +----+\n\t *  |         | 32 | <--- Start row\n\t *  +----+----+----+\n\t *  | 40 | 41 | 42 |\n\t *  +----+----+----+\n\t *\n\t * If the 4th row is a `this._startRow`, this method will:\n\t * 1.) Count the number of columns this table has based on the first row (3 columns in this case).\n\t * 2.) Check if the 4th row contains 3 cells. It doesn't, so go to the row before it.\n\t * 3.) Check if the 3rd row contains 3 cells. It doesn't, so go to the row before it.\n\t * 4.) Check if the 2nd row contains 3 cells. It does, so set the current row to that row.\n\t *\n\t * Setting the current row this way is necessary to let the `next()`  method loop over the cells\n\t * spanning multiple rows or columns and update the `this._spannedCells` property.\n\t */ _jumpToNonSpannedRowClosestToStartRow() {\n        const firstRowLength = this._getRowLength(0);\n        for(let i = this._startRow; !this._jumpedToStartRow; i--){\n            if (firstRowLength === this._getRowLength(i)) {\n                this._row = i;\n                this._rowIndex = i;\n                this._jumpedToStartRow = true;\n            }\n        }\n    }\n    /**\n\t * Returns a number of columns in a row taking `colspan` into consideration.\n\t */ _getRowLength(rowIndex) {\n        const row = this._table.getChild(rowIndex);\n        return [\n            ...row.getChildren()\n        ].reduce((cols, row)=>{\n            return cols + parseInt(row.getAttribute('colspan') || '1');\n        }, 0);\n    }\n}\n/**\n * An object returned by {@link module:table/tablewalker~TableWalker} when traversing table cells.\n */ class TableSlot {\n    /**\n\t * The current table cell.\n\t */ cell;\n    /**\n\t * The row index of a table slot.\n\t */ row;\n    /**\n\t * The column index of a table slot.\n\t */ column;\n    /**\n\t * The row index of a cell anchor slot.\n\t */ cellAnchorRow;\n    /**\n\t * The column index of a cell anchor slot.\n\t */ cellAnchorColumn;\n    /**\n\t * The index of the current cell in the parent row.\n\t */ _cellIndex;\n    /**\n\t * The index of the current row element in the table.\n\t */ _rowIndex;\n    /**\n\t * The table element.\n\t */ _table;\n    /**\n\t * Creates an instance of the table walker value.\n\t *\n\t * @param tableWalker The table walker instance.\n\t * @param cell The current table cell.\n\t * @param anchorRow The row index of a cell anchor slot.\n\t * @param anchorColumn The column index of a cell anchor slot.\n\t */ constructor(tableWalker, cell, anchorRow, anchorColumn){\n        this.cell = cell;\n        this.row = tableWalker._row;\n        this.column = tableWalker._column;\n        this.cellAnchorRow = anchorRow;\n        this.cellAnchorColumn = anchorColumn;\n        this._cellIndex = tableWalker._cellIndex;\n        this._rowIndex = tableWalker._rowIndex;\n        this._table = tableWalker._table;\n    }\n    // @if CK_DEBUG // public get isSpanned(): unknown { return throwMissingGetterError( 'isSpanned' ); }\n    // @if CK_DEBUG // public get colspan(): unknown { return throwMissingGetterError( 'colspan' ); }\n    // @if CK_DEBUG // public get rowspan(): unknown { return throwMissingGetterError( 'rowspan' ); }\n    // @if CK_DEBUG // public get cellIndex(): unknown { return throwMissingGetterError( 'cellIndex' ); }\n    /**\n\t * Whether the cell is anchored in the current slot.\n\t */ get isAnchor() {\n        return this.row === this.cellAnchorRow && this.column === this.cellAnchorColumn;\n    }\n    /**\n\t * The width of a cell defined by a `colspan` attribute. If the model attribute is not present, it is set to `1`.\n\t */ get cellWidth() {\n        return parseInt(this.cell.getAttribute('colspan') || '1');\n    }\n    /**\n\t * The height of a cell defined by a `rowspan` attribute. If the model attribute is not present, it is set to `1`.\n\t */ get cellHeight() {\n        return parseInt(this.cell.getAttribute('rowspan') || '1');\n    }\n    /**\n\t * The index of the current row element in the table.\n\t */ get rowIndex() {\n        return this._rowIndex;\n    }\n    /**\n\t * Returns the {@link module:engine/model/position~Position} before the table slot.\n\t */ getPositionBefore() {\n        const model = this._table.root.document.model;\n        return model.createPositionAt(this._table.getChild(this.row), this._cellIndex);\n    }\n}\n /**\n * This `TableSlot`'s getter (property) was removed in CKEditor 5 v20.0.0.\n *\n * Check out the new `TableWalker`'s API in the documentation.\n *\n * @error tableslot-getter-removed\n * @param getterName\n */  // @if CK_DEBUG // function throwMissingGetterError( getterName: string ): void {\n // @if CK_DEBUG //\t\tthrow new CKEditorError( 'tableslot-getter-removed', null, {\n // @if CK_DEBUG //\t\t\tgetterName\n // @if CK_DEBUG //\t\t} );\n // @if CK_DEBUG // }\n\n/**\n * Model table element to view table element conversion helper.\n */ function downcastTable(tableUtils, options) {\n    return (table, { writer })=>{\n        const headingRows = table.getAttribute('headingRows') || 0;\n        const tableElement = writer.createContainerElement('table', null, []);\n        const figureElement = writer.createContainerElement('figure', {\n            class: 'table'\n        }, tableElement);\n        // Table head slot.\n        if (headingRows > 0) {\n            writer.insert(writer.createPositionAt(tableElement, 'end'), writer.createContainerElement('thead', null, writer.createSlot((element)=>element.is('element', 'tableRow') && element.index < headingRows)));\n        }\n        // Table body slot.\n        if (headingRows < tableUtils.getRows(table)) {\n            writer.insert(writer.createPositionAt(tableElement, 'end'), writer.createContainerElement('tbody', null, writer.createSlot((element)=>element.is('element', 'tableRow') && element.index >= headingRows)));\n        }\n        // Dynamic slots.\n        for (const { positionOffset, filter } of options.additionalSlots){\n            writer.insert(writer.createPositionAt(tableElement, positionOffset), writer.createSlot(filter));\n        }\n        // Create a slot with items that don't fit into the table.\n        writer.insert(writer.createPositionAt(tableElement, 'after'), writer.createSlot((element)=>{\n            if (element.is('element', 'tableRow')) {\n                return false;\n            }\n            return !options.additionalSlots.some(({ filter })=>filter(element));\n        }));\n        return options.asWidget ? toTableWidget(figureElement, writer) : figureElement;\n    };\n}\n/**\n * Model table row element to view `<tr>` element conversion helper.\n *\n * @returns Element creator.\n */ function downcastRow() {\n    return (tableRow, { writer })=>{\n        return tableRow.isEmpty ? writer.createEmptyElement('tr') : writer.createContainerElement('tr');\n    };\n}\n/**\n * Model table cell element to view `<td>` or `<th>` element conversion helper.\n *\n * This conversion helper will create proper `<th>` elements for table cells that are in the heading section (heading row or column)\n * and `<td>` otherwise.\n *\n * @param options.asWidget If set to `true`, the downcast conversion will produce a widget.\n * @returns Element creator.\n */ function downcastCell(options = {}) {\n    return (tableCell, { writer })=>{\n        const tableRow = tableCell.parent;\n        const table = tableRow.parent;\n        const rowIndex = table.getChildIndex(tableRow);\n        const tableWalker = new TableWalker(table, {\n            row: rowIndex\n        });\n        const headingRows = table.getAttribute('headingRows') || 0;\n        const headingColumns = table.getAttribute('headingColumns') || 0;\n        let result = null;\n        // We need to iterate over a table in order to get proper row & column values from a walker.\n        for (const tableSlot of tableWalker){\n            if (tableSlot.cell == tableCell) {\n                const isHeading = tableSlot.row < headingRows || tableSlot.column < headingColumns;\n                const cellElementName = isHeading ? 'th' : 'td';\n                result = options.asWidget ? toWidgetEditable(writer.createEditableElement(cellElementName), writer) : writer.createContainerElement(cellElementName);\n                break;\n            }\n        }\n        return result;\n    };\n}\n/**\n * Overrides paragraph inside table cell conversion.\n *\n * This converter:\n * * should be used to override default paragraph conversion.\n * * It will only convert `<paragraph>` placed directly inside `<tableCell>`.\n * * For a single paragraph without attributes it returns `<span>` to simulate data table.\n * * For all other cases it returns `<p>` element.\n *\n * @param options.asWidget If set to `true`, the downcast conversion will produce a widget.\n * @returns Element creator.\n */ function convertParagraphInTableCell(options = {}) {\n    return (modelElement, { writer })=>{\n        if (!modelElement.parent.is('element', 'tableCell')) {\n            return null;\n        }\n        if (!isSingleParagraphWithoutAttributes(modelElement)) {\n            return null;\n        }\n        if (options.asWidget) {\n            return writer.createContainerElement('span', {\n                class: 'ck-table-bogus-paragraph'\n            });\n        } else {\n            // Using `<p>` in case there are some markers on it and transparentRendering will render it anyway.\n            const viewElement = writer.createContainerElement('p');\n            writer.setCustomProperty('dataPipeline:transparentRendering', true, viewElement);\n            return viewElement;\n        }\n    };\n}\n/**\n * Checks if given model `<paragraph>` is an only child of a parent (`<tableCell>`) and if it has any attribute set.\n *\n * The paragraph should be converted in the editing view to:\n *\n * * If returned `true` - to a `<span class=\"ck-table-bogus-paragraph\">`\n * * If returned `false` - to a `<p>`\n */ function isSingleParagraphWithoutAttributes(modelElement) {\n    const tableCell = modelElement.parent;\n    const isSingleParagraph = tableCell.childCount == 1;\n    return isSingleParagraph && !hasAnyAttribute(modelElement);\n}\n/**\n * Converts a given {@link module:engine/view/element~Element} to a table widget:\n * * Adds a {@link module:engine/view/element~Element#_setCustomProperty custom property} allowing to recognize the table widget element.\n * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.\n *\n * @param writer An instance of the view writer.\n * @param label The element's label. It will be concatenated with the table `alt` attribute if one is present.\n */ function toTableWidget(viewElement, writer) {\n    writer.setCustomProperty('table', true, viewElement);\n    return toWidget(viewElement, writer, {\n        hasSelectionHandle: true\n    });\n}\n/**\n * Checks if an element has any attributes set.\n */ function hasAnyAttribute(element) {\n    const iteratorItem = element.getAttributeKeys().next();\n    return !iteratorItem.done;\n}\n\n/**\n * The insert table command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTable'` editor command.\n *\n * To insert a table at the current selection, execute the command and specify the dimensions:\n *\n * ```ts\n * editor.execute( 'insertTable', { rows: 20, columns: 5 } );\n * ```\n */ class InsertTableCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const schema = model.schema;\n        this.isEnabled = isAllowedInParent(selection, schema);\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * Inserts a table with the given number of rows and columns into the editor.\n\t *\n\t * @param options.rows The number of rows to create in the inserted table. Default value is 2.\n\t * @param options.columns The number of columns to create in the inserted table. Default value is 2.\n\t * @param options.headingRows The number of heading rows. If not provided it will default to\n\t * {@link module:table/tableconfig~TableConfig#defaultHeadings `config.table.defaultHeadings.rows`} table config.\n\t * @param options.headingColumns The number of heading columns. If not provided it will default to\n\t * {@link module:table/tableconfig~TableConfig#defaultHeadings `config.table.defaultHeadings.columns`} table config.\n\t * @fires execute\n\t */ execute(options = {}) {\n        const editor = this.editor;\n        const model = editor.model;\n        const tableUtils = editor.plugins.get('TableUtils');\n        const defaultRows = editor.config.get('table.defaultHeadings.rows');\n        const defaultColumns = editor.config.get('table.defaultHeadings.columns');\n        if (options.headingRows === undefined && defaultRows) {\n            options.headingRows = defaultRows;\n        }\n        if (options.headingColumns === undefined && defaultColumns) {\n            options.headingColumns = defaultColumns;\n        }\n        model.change((writer)=>{\n            const table = tableUtils.createTable(writer, options);\n            model.insertObject(table, null, null, {\n                findOptimalPosition: 'auto'\n            });\n            writer.setSelection(writer.createPositionAt(table.getNodeByPath([\n                0,\n                0,\n                0\n            ]), 0));\n        });\n    }\n}\n/**\n * Checks if the table is allowed in the parent.\n */ function isAllowedInParent(selection, schema) {\n    const positionParent = selection.getFirstPosition().parent;\n    const validParent = positionParent === positionParent.root ? positionParent : positionParent.parent;\n    return schema.checkChild(validParent, 'table');\n}\n\n/**\n * The insert row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTableRowBelow'` and\n * `'insertTableRowAbove'` editor commands.\n *\n * To insert a row below the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableRowBelow' );\n * ```\n *\n * To insert a row above the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableRowAbove' );\n * ```\n */ class InsertRowCommand extends Command {\n    /**\n\t * The order of insertion relative to the row in which the caret is located.\n\t */ order;\n    /**\n\t * Creates a new `InsertRowCommand` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t * @param options.order The order of insertion relative to the row in which the caret is located.\n\t * Possible values: `\"above\"` and `\"below\"`. Default value is \"below\"\n\t */ constructor(editor, options = {}){\n        super(editor);\n        this.order = options.order || 'below';\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const selection = this.editor.model.document.selection;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const isAnyCellSelected = !!tableUtils.getSelectionAffectedTableCells(selection).length;\n        this.isEnabled = isAnyCellSelected;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * Depending on the command's {@link #order} value, it inserts a row `'below'` or `'above'` the row in which selection is set.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const tableUtils = editor.plugins.get('TableUtils');\n        const insertAbove = this.order === 'above';\n        const affectedTableCells = tableUtils.getSelectionAffectedTableCells(selection);\n        const rowIndexes = tableUtils.getRowIndexes(affectedTableCells);\n        const row = insertAbove ? rowIndexes.first : rowIndexes.last;\n        const table = affectedTableCells[0].findAncestor('table');\n        tableUtils.insertRows(table, {\n            at: insertAbove ? row : row + 1,\n            copyStructureFromAbove: !insertAbove\n        });\n    }\n}\n\n/**\n * The insert column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'insertTableColumnLeft'` and\n * `'insertTableColumnRight'` editor commands.\n *\n * To insert a column to the left of the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableColumnLeft' );\n * ```\n *\n * To insert a column to the right of the selected cell, execute the following command:\n *\n * ```ts\n * editor.execute( 'insertTableColumnRight' );\n * ```\n */ class InsertColumnCommand extends Command {\n    /**\n\t * The order of insertion relative to the column in which the caret is located.\n\t */ order;\n    /**\n\t * Creates a new `InsertColumnCommand` instance.\n\t *\n\t * @param editor An editor on which this command will be used.\n\t * @param options.order The order of insertion relative to the column in which the caret is located.\n\t * Possible values: `\"left\"` and `\"right\"`. Default value is \"right\".\n\t */ constructor(editor, options = {}){\n        super(editor);\n        this.order = options.order || 'right';\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const selection = this.editor.model.document.selection;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const isAnyCellSelected = !!tableUtils.getSelectionAffectedTableCells(selection).length;\n        this.isEnabled = isAnyCellSelected;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * Depending on the command's {@link #order} value, it inserts a column to the `'left'` or `'right'` of the column\n\t * in which the selection is set.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const tableUtils = editor.plugins.get('TableUtils');\n        const insertBefore = this.order === 'left';\n        const affectedTableCells = tableUtils.getSelectionAffectedTableCells(selection);\n        const columnIndexes = tableUtils.getColumnIndexes(affectedTableCells);\n        const column = insertBefore ? columnIndexes.first : columnIndexes.last;\n        const table = affectedTableCells[0].findAncestor('table');\n        tableUtils.insertColumns(table, {\n            columns: 1,\n            at: insertBefore ? column : column + 1\n        });\n    }\n}\n\n/**\n * The split cell command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'splitTableCellVertically'`\n * and `'splitTableCellHorizontally'`  editor commands.\n *\n * You can split any cell vertically or horizontally by executing this command. For example, to split the selected table cell vertically:\n *\n * ```ts\n * editor.execute( 'splitTableCellVertically' );\n * ```\n */ class SplitCellCommand extends Command {\n    /**\n\t * The direction that indicates which cell will be split.\n\t */ direction;\n    /**\n\t * Creates a new `SplitCellCommand` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t * @param options.direction Indicates whether the command should split cells `'horizontally'` or `'vertically'`.\n\t */ constructor(editor, options = {}){\n        super(editor);\n        this.direction = options.direction || 'horizontally';\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n        this.isEnabled = selectedCells.length === 1;\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const tableCell = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];\n        const isHorizontal = this.direction === 'horizontally';\n        if (isHorizontal) {\n            tableUtils.splitCellHorizontally(tableCell, 2);\n        } else {\n            tableUtils.splitCellVertically(tableCell, 2);\n        }\n    }\n}\n\n/**\n * Returns a cropped table according to given dimensions.\n\n * To return a cropped table that starts at first row and first column and end in third row and column:\n *\n * ```ts\n * const croppedTable = cropTableToDimensions( table, {\n *   startRow: 1,\n *   endRow: 3,\n *   startColumn: 1,\n *   endColumn: 3\n * }, writer );\n * ```\n *\n * Calling the code above for the table below:\n *\n *        0   1   2   3   4                      0   1   2\n *      ┌───┬───┬───┬───┬───┐\n *   0  │ a │ b │ c │ d │ e │\n *      ├───┴───┤   ├───┴───┤                  ┌───┬───┬───┐\n *   1  │ f     │   │ g     │                  │   │   │ g │  0\n *      ├───┬───┴───┼───┬───┤   will return:   ├───┴───┼───┤\n *   2  │ h │ i     │ j │ k │                  │ i     │ j │  1\n *      ├───┤       ├───┤   │                  │       ├───┤\n *   3  │ l │       │ m │   │                  │       │ m │  2\n *      ├───┼───┬───┤   ├───┤                  └───────┴───┘\n *   4  │ n │ o │ p │   │ q │\n *      └───┴───┴───┴───┴───┘\n */ function cropTableToDimensions(sourceTable, cropDimensions, writer) {\n    const { startRow, startColumn, endRow, endColumn } = cropDimensions;\n    // Create empty table with empty rows equal to crop height.\n    const croppedTable = writer.createElement('table');\n    const cropHeight = endRow - startRow + 1;\n    for(let i = 0; i < cropHeight; i++){\n        writer.insertElement('tableRow', croppedTable, 'end');\n    }\n    const tableMap = [\n        ...new TableWalker(sourceTable, {\n            startRow,\n            endRow,\n            startColumn,\n            endColumn,\n            includeAllSlots: true\n        })\n    ];\n    // Iterate over source table slots (including empty - spanned - ones).\n    for (const { row: sourceRow, column: sourceColumn, cell: tableCell, isAnchor, cellAnchorRow, cellAnchorColumn } of tableMap){\n        // Row index in cropped table.\n        const rowInCroppedTable = sourceRow - startRow;\n        const row = croppedTable.getChild(rowInCroppedTable);\n        // For empty slots: fill the gap with empty table cell.\n        if (!isAnchor) {\n            // But fill the gap only if the spanning cell is anchored outside cropped area.\n            // In the table from method jsdoc those cells are: \"c\" & \"f\".\n            if (cellAnchorRow < startRow || cellAnchorColumn < startColumn) {\n                createEmptyTableCell(writer, writer.createPositionAt(row, 'end'));\n            }\n        } else {\n            const tableCellCopy = writer.cloneElement(tableCell);\n            writer.append(tableCellCopy, row);\n            // Trim table if it exceeds cropped area.\n            // In the table from method jsdoc those cells are: \"g\" & \"m\".\n            trimTableCellIfNeeded(tableCellCopy, sourceRow, sourceColumn, endRow, endColumn, writer);\n        }\n    }\n    // Adjust heading rows & columns in cropped table if crop selection includes headings parts.\n    addHeadingsToCroppedTable(croppedTable, sourceTable, startRow, startColumn, writer);\n    return croppedTable;\n}\n/**\n * Returns slot info of cells that starts above and overlaps a given row.\n *\n * In a table below, passing `overlapRow = 3`\n *\n *     ┌───┬───┬───┬───┬───┐\n *  0  │ a │ b │ c │ d │ e │\n *     │   ├───┼───┼───┼───┤\n *  1  │   │ f │ g │ h │ i │\n *     ├───┤   ├───┼───┤   │\n *  2  │ j │   │ k │ l │   │\n *     │   │   │   ├───┼───┤\n *  3  │   │   │   │ m │ n │  <- overlap row to check\n *     ├───┼───┤   │   ├───│\n *  4  │ o │ p │   │   │ q │\n *     └───┴───┴───┴───┴───┘\n *\n * will return slot info for cells: \"j\", \"f\", \"k\".\n *\n * @param table The table to check.\n * @param overlapRow The index of the row to check.\n * @param startRow row to start analysis. Use it when it is known that the cells above that row will not overlap. Default value is 0.\n */ function getVerticallyOverlappingCells(table, overlapRow, startRow = 0) {\n    const cells = [];\n    const tableWalker = new TableWalker(table, {\n        startRow,\n        endRow: overlapRow - 1\n    });\n    for (const slotInfo of tableWalker){\n        const { row, cellHeight } = slotInfo;\n        const cellEndRow = row + cellHeight - 1;\n        if (row < overlapRow && overlapRow <= cellEndRow) {\n            cells.push(slotInfo);\n        }\n    }\n    return cells;\n}\n/**\n * Splits the table cell horizontally.\n *\n * @returns Created table cell, if any were created.\n */ function splitHorizontally(tableCell, splitRow, writer) {\n    const tableRow = tableCell.parent;\n    const table = tableRow.parent;\n    const rowIndex = tableRow.index;\n    const rowspan = parseInt(tableCell.getAttribute('rowspan'));\n    const newRowspan = splitRow - rowIndex;\n    const newCellAttributes = {};\n    const newCellRowSpan = rowspan - newRowspan;\n    if (newCellRowSpan > 1) {\n        newCellAttributes.rowspan = newCellRowSpan;\n    }\n    const colspan = parseInt(tableCell.getAttribute('colspan') || '1');\n    if (colspan > 1) {\n        newCellAttributes.colspan = colspan;\n    }\n    const startRow = rowIndex;\n    const endRow = startRow + newRowspan;\n    const tableMap = [\n        ...new TableWalker(table, {\n            startRow,\n            endRow,\n            includeAllSlots: true\n        })\n    ];\n    let newCell = null;\n    let columnIndex;\n    for (const tableSlot of tableMap){\n        const { row, column, cell } = tableSlot;\n        if (cell === tableCell && columnIndex === undefined) {\n            columnIndex = column;\n        }\n        if (columnIndex !== undefined && columnIndex === column && row === endRow) {\n            newCell = createEmptyTableCell(writer, tableSlot.getPositionBefore(), newCellAttributes);\n        }\n    }\n    // Update the rowspan attribute after updating table.\n    updateNumericAttribute('rowspan', newRowspan, tableCell, writer);\n    return newCell;\n}\n/**\n * Returns slot info of cells that starts before and overlaps a given column.\n *\n * In a table below, passing `overlapColumn = 3`\n *\n *    0   1   2   3   4\n *  ┌───────┬───────┬───┐\n *  │ a     │ b     │ c │\n *  │───┬───┴───────┼───┤\n *  │ d │ e         │ f │\n *  ├───┼───┬───────┴───┤\n *  │ g │ h │ i         │\n *  ├───┼───┼───┬───────┤\n *  │ j │ k │ l │ m     │\n *  ├───┼───┴───┼───┬───┤\n *  │ n │ o     │ p │ q │\n *  └───┴───────┴───┴───┘\n *                ^\n *                Overlap column to check\n *\n * will return slot info for cells: \"b\", \"e\", \"i\".\n *\n * @param table The table to check.\n * @param overlapColumn The index of the column to check.\n */ function getHorizontallyOverlappingCells(table, overlapColumn) {\n    const cellsToSplit = [];\n    const tableWalker = new TableWalker(table);\n    for (const slotInfo of tableWalker){\n        const { column, cellWidth } = slotInfo;\n        const cellEndColumn = column + cellWidth - 1;\n        if (column < overlapColumn && overlapColumn <= cellEndColumn) {\n            cellsToSplit.push(slotInfo);\n        }\n    }\n    return cellsToSplit;\n}\n/**\n * Splits the table cell vertically.\n *\n * @param columnIndex The table cell column index.\n * @param splitColumn The index of column to split cell on.\n * @returns Created table cell.\n */ function splitVertically(tableCell, columnIndex, splitColumn, writer) {\n    const colspan = parseInt(tableCell.getAttribute('colspan'));\n    const newColspan = splitColumn - columnIndex;\n    const newCellAttributes = {};\n    const newCellColSpan = colspan - newColspan;\n    if (newCellColSpan > 1) {\n        newCellAttributes.colspan = newCellColSpan;\n    }\n    const rowspan = parseInt(tableCell.getAttribute('rowspan') || '1');\n    if (rowspan > 1) {\n        newCellAttributes.rowspan = rowspan;\n    }\n    const newCell = createEmptyTableCell(writer, writer.createPositionAfter(tableCell), newCellAttributes);\n    // Update the colspan attribute after updating table.\n    updateNumericAttribute('colspan', newColspan, tableCell, writer);\n    return newCell;\n}\n/**\n * Adjusts table cell dimensions to not exceed limit row and column.\n *\n * If table cell width (or height) covers a column (or row) that is after a limit column (or row)\n * this method will trim \"colspan\" (or \"rowspan\") attribute so the table cell will fit in a defined limits.\n */ function trimTableCellIfNeeded(tableCell, cellRow, cellColumn, limitRow, limitColumn, writer) {\n    const colspan = parseInt(tableCell.getAttribute('colspan') || '1');\n    const rowspan = parseInt(tableCell.getAttribute('rowspan') || '1');\n    const endColumn = cellColumn + colspan - 1;\n    if (endColumn > limitColumn) {\n        const trimmedSpan = limitColumn - cellColumn + 1;\n        updateNumericAttribute('colspan', trimmedSpan, tableCell, writer, 1);\n    }\n    const endRow = cellRow + rowspan - 1;\n    if (endRow > limitRow) {\n        const trimmedSpan = limitRow - cellRow + 1;\n        updateNumericAttribute('rowspan', trimmedSpan, tableCell, writer, 1);\n    }\n}\n/**\n * Sets proper heading attributes to a cropped table.\n */ function addHeadingsToCroppedTable(croppedTable, sourceTable, startRow, startColumn, writer) {\n    const headingRows = parseInt(sourceTable.getAttribute('headingRows') || '0');\n    if (headingRows > 0) {\n        const headingRowsInCrop = headingRows - startRow;\n        updateNumericAttribute('headingRows', headingRowsInCrop, croppedTable, writer, 0);\n    }\n    const headingColumns = parseInt(sourceTable.getAttribute('headingColumns') || '0');\n    if (headingColumns > 0) {\n        const headingColumnsInCrop = headingColumns - startColumn;\n        updateNumericAttribute('headingColumns', headingColumnsInCrop, croppedTable, writer, 0);\n    }\n}\n/**\n * Removes columns that have no cells anchored.\n *\n * In table below:\n *\n *     +----+----+----+----+----+----+----+\n *     | 00 | 01      | 03 | 04      | 06 |\n *     +----+----+----+----+         +----+\n *     | 10 | 11      | 13 |         | 16 |\n *     +----+----+----+----+----+----+----+\n *     | 20 | 21      | 23 | 24      | 26 |\n *     +----+----+----+----+----+----+----+\n *                  ^--- empty ---^\n *\n * Will remove columns 2 and 5.\n *\n * **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n * To remove a column from a table use {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`}.\n *\n * @internal\n * @returns True if removed some columns.\n */ function removeEmptyColumns(table, tableUtils) {\n    const width = tableUtils.getColumns(table);\n    const columnsMap = new Array(width).fill(0);\n    for (const { column } of new TableWalker(table)){\n        columnsMap[column]++;\n    }\n    const emptyColumns = columnsMap.reduce((result, cellsCount, column)=>{\n        return cellsCount ? result : [\n            ...result,\n            column\n        ];\n    }, []);\n    if (emptyColumns.length > 0) {\n        // Remove only last empty column because it will recurrently trigger removing empty rows.\n        const emptyColumn = emptyColumns[emptyColumns.length - 1];\n        // @if CK_DEBUG_TABLE // console.log( `Removing empty column: ${ emptyColumn }.` );\n        tableUtils.removeColumns(table, {\n            at: emptyColumn\n        });\n        return true;\n    }\n    return false;\n}\n/**\n * Removes rows that have no cells anchored.\n *\n * In table below:\n *\n *     +----+----+----+\n *     | 00 | 01 | 02 |\n *     +----+----+----+\n *     | 10 | 11 | 12 |\n *     +    +    +    +\n *     |    |    |    | <-- empty\n *     +----+----+----+\n *     | 30 | 31 | 32 |\n *     +----+----+----+\n *     | 40      | 42 |\n *     +         +    +\n *     |         |    | <-- empty\n *     +----+----+----+\n *     | 60 | 61 | 62 |\n *     +----+----+----+\n *\n * Will remove rows 2 and 5.\n *\n * **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n * To remove a row from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`}.\n *\n * @internal\n * @returns True if removed some rows.\n */ function removeEmptyRows(table, tableUtils) {\n    const emptyRows = [];\n    const tableRowCount = tableUtils.getRows(table);\n    for(let rowIndex = 0; rowIndex < tableRowCount; rowIndex++){\n        const tableRow = table.getChild(rowIndex);\n        if (tableRow.isEmpty) {\n            emptyRows.push(rowIndex);\n        }\n    }\n    if (emptyRows.length > 0) {\n        // Remove only last empty row because it will recurrently trigger removing empty columns.\n        const emptyRow = emptyRows[emptyRows.length - 1];\n        // @if CK_DEBUG_TABLE // console.log( `Removing empty row: ${ emptyRow }.` );\n        tableUtils.removeRows(table, {\n            at: emptyRow\n        });\n        return true;\n    }\n    return false;\n}\n/**\n * Removes rows and columns that have no cells anchored.\n *\n * In table below:\n *\n *     +----+----+----+----+\n *     | 00      | 02      |\n *     +----+----+         +\n *     | 10      |         |\n *     +----+----+----+----+\n *     | 20      | 22 | 23 |\n *     +         +    +    +\n *     |         |    |    | <-- empty row\n *     +----+----+----+----+\n *             ^--- empty column\n *\n * Will remove row 3 and column 1.\n *\n * **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.\n * To remove a rows from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`} and\n * {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`} to remove a column.\n *\n * @internal\n */ function removeEmptyRowsColumns(table, tableUtils) {\n    const removedColumns = removeEmptyColumns(table, tableUtils);\n    // If there was some columns removed then cleaning empty rows was already triggered.\n    if (!removedColumns) {\n        removeEmptyRows(table, tableUtils);\n    }\n}\n/**\n * Returns adjusted last row index if selection covers part of a row with empty slots (spanned by other cells).\n * The `dimensions.lastRow` is equal to last row index but selection might be bigger.\n *\n * This happens *only* on rectangular selection so we analyze a case like this:\n *\n *        +---+---+---+---+\n *      0 | a | b | c | d |\n *        +   +   +---+---+\n *      1 |   | e | f | g |\n *        +   +---+   +---+\n *      2 |   | h |   | i | <- last row, each cell has rowspan = 2,\n *        +   +   +   +   +    so we need to return 3, not 2\n *      3 |   |   |   |   |\n *        +---+---+---+---+\n *\n * @returns Adjusted last row index.\n */ function adjustLastRowIndex(table, dimensions) {\n    const lastRowMap = Array.from(new TableWalker(table, {\n        startColumn: dimensions.firstColumn,\n        endColumn: dimensions.lastColumn,\n        row: dimensions.lastRow\n    }));\n    const everyCellHasSingleRowspan = lastRowMap.every(({ cellHeight })=>cellHeight === 1);\n    // It is a \"flat\" row, so the last row index is OK.\n    if (everyCellHasSingleRowspan) {\n        return dimensions.lastRow;\n    }\n    // Otherwise get any cell's rowspan and adjust the last row index.\n    const rowspanAdjustment = lastRowMap[0].cellHeight - 1;\n    return dimensions.lastRow + rowspanAdjustment;\n}\n/**\n * Returns adjusted last column index if selection covers part of a column with empty slots (spanned by other cells).\n * The `dimensions.lastColumn` is equal to last column index but selection might be bigger.\n *\n * This happens *only* on rectangular selection so we analyze a case like this:\n *\n *       0   1   2   3\n *     +---+---+---+---+\n *     | a             |\n *     +---+---+---+---+\n *     | b | c | d     |\n *     +---+---+---+---+\n *     | e     | f     |\n *     +---+---+---+---+\n *     | g | h         |\n *     +---+---+---+---+\n *               ^\n *              last column, each cell has colspan = 2, so we need to return 3, not 2\n *\n * @returns Adjusted last column index.\n */ function adjustLastColumnIndex(table, dimensions) {\n    const lastColumnMap = Array.from(new TableWalker(table, {\n        startRow: dimensions.firstRow,\n        endRow: dimensions.lastRow,\n        column: dimensions.lastColumn\n    }));\n    const everyCellHasSingleColspan = lastColumnMap.every(({ cellWidth })=>cellWidth === 1);\n    // It is a \"flat\" column, so the last column index is OK.\n    if (everyCellHasSingleColspan) {\n        return dimensions.lastColumn;\n    }\n    // Otherwise get any cell's colspan and adjust the last column index.\n    const colspanAdjustment = lastColumnMap[0].cellWidth - 1;\n    return dimensions.lastColumn + colspanAdjustment;\n}\n\n/**\n * The merge cell command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'mergeTableCellRight'`, `'mergeTableCellLeft'`,\n * `'mergeTableCellUp'` and `'mergeTableCellDown'` editor commands.\n *\n * To merge a table cell at the current selection with another cell, execute the command corresponding with the preferred direction.\n *\n * For example, to merge with a cell to the right:\n *\n * ```ts\n * editor.execute( 'mergeTableCellRight' );\n * ```\n *\n * **Note**: If a table cell has a different [`rowspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-rowspan)\n * (for `'mergeTableCellRight'` and `'mergeTableCellLeft'`) or [`colspan`](https://www.w3.org/TR/html50/tabular-data.html#attr-tdth-colspan)\n * (for `'mergeTableCellUp'` and `'mergeTableCellDown'`), the command will be disabled.\n */ class MergeCellCommand extends Command {\n    /**\n\t * The direction that indicates which cell will be merged with the currently selected one.\n\t */ direction;\n    /**\n\t * Whether the merge is horizontal (left/right) or vertical (up/down).\n\t */ isHorizontal;\n    /**\n\t * Creates a new `MergeCellCommand` instance.\n\t *\n\t * @param editor The editor on which this command will be used.\n\t * @param options.direction Indicates which cell to merge with the currently selected one.\n\t * Possible values are: `'left'`, `'right'`, `'up'` and `'down'`.\n\t */ constructor(editor, options){\n        super(editor);\n        this.direction = options.direction;\n        this.isHorizontal = this.direction == 'right' || this.direction == 'left';\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const cellToMerge = this._getMergeableCell();\n        this.value = cellToMerge;\n        this.isEnabled = !!cellToMerge;\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * Depending on the command's {@link #direction} value, it will merge the cell that is to the `'left'`, `'right'`, `'up'` or `'down'`.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const model = this.editor.model;\n        const doc = model.document;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const tableCell = tableUtils.getTableCellsContainingSelection(doc.selection)[0];\n        const cellToMerge = this.value;\n        const direction = this.direction;\n        model.change((writer)=>{\n            const isMergeNext = direction == 'right' || direction == 'down';\n            // The merge mechanism is always the same so sort cells to be merged.\n            const cellToExpand = isMergeNext ? tableCell : cellToMerge;\n            const cellToRemove = isMergeNext ? cellToMerge : tableCell;\n            // Cache the parent of cell to remove for later check.\n            const removedTableCellRow = cellToRemove.parent;\n            mergeTableCells$1(cellToRemove, cellToExpand, writer);\n            const spanAttribute = this.isHorizontal ? 'colspan' : 'rowspan';\n            const cellSpan = parseInt(tableCell.getAttribute(spanAttribute) || '1');\n            const cellToMergeSpan = parseInt(cellToMerge.getAttribute(spanAttribute) || '1');\n            // Update table cell span attribute and merge set selection on merged contents.\n            writer.setAttribute(spanAttribute, cellSpan + cellToMergeSpan, cellToExpand);\n            writer.setSelection(writer.createRangeIn(cellToExpand));\n            const tableUtils = this.editor.plugins.get('TableUtils');\n            const table = removedTableCellRow.findAncestor('table');\n            // Remove empty rows and columns after merging.\n            removeEmptyRowsColumns(table, tableUtils);\n        });\n    }\n    /**\n\t * Returns a cell that can be merged with the current cell depending on the command's direction.\n\t */ _getMergeableCell() {\n        const model = this.editor.model;\n        const doc = model.document;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const tableCell = tableUtils.getTableCellsContainingSelection(doc.selection)[0];\n        if (!tableCell) {\n            return;\n        }\n        // First get the cell on proper direction.\n        const cellToMerge = this.isHorizontal ? getHorizontalCell(tableCell, this.direction, tableUtils) : getVerticalCell(tableCell, this.direction, tableUtils);\n        if (!cellToMerge) {\n            return;\n        }\n        // If found check if the span perpendicular to merge direction is equal on both cells.\n        const spanAttribute = this.isHorizontal ? 'rowspan' : 'colspan';\n        const span = parseInt(tableCell.getAttribute(spanAttribute) || '1');\n        const cellToMergeSpan = parseInt(cellToMerge.getAttribute(spanAttribute) || '1');\n        if (cellToMergeSpan === span) {\n            return cellToMerge;\n        }\n    }\n}\n/**\n * Returns the cell that can be merged horizontally.\n */ function getHorizontalCell(tableCell, direction, tableUtils) {\n    const tableRow = tableCell.parent;\n    const table = tableRow.parent;\n    const horizontalCell = direction == 'right' ? tableCell.nextSibling : tableCell.previousSibling;\n    const hasHeadingColumns = (table.getAttribute('headingColumns') || 0) > 0;\n    if (!horizontalCell) {\n        return;\n    }\n    // Sort cells:\n    const cellOnLeft = direction == 'right' ? tableCell : horizontalCell;\n    const cellOnRight = direction == 'right' ? horizontalCell : tableCell;\n    // Get their column indexes:\n    const { column: leftCellColumn } = tableUtils.getCellLocation(cellOnLeft);\n    const { column: rightCellColumn } = tableUtils.getCellLocation(cellOnRight);\n    const leftCellSpan = parseInt(cellOnLeft.getAttribute('colspan') || '1');\n    const isCellOnLeftInHeadingColumn = isHeadingColumnCell(tableUtils, cellOnLeft);\n    const isCellOnRightInHeadingColumn = isHeadingColumnCell(tableUtils, cellOnRight);\n    // We cannot merge heading columns cells with regular cells.\n    if (hasHeadingColumns && isCellOnLeftInHeadingColumn != isCellOnRightInHeadingColumn) {\n        return;\n    }\n    // The cell on the right must have index that is distant to the cell on the left by the left cell's width (colspan).\n    const cellsAreTouching = leftCellColumn + leftCellSpan === rightCellColumn;\n    // If the right cell's column index is different it means that there are rowspanned cells between them.\n    return cellsAreTouching ? horizontalCell : undefined;\n}\n/**\n * Returns the cell that can be merged vertically.\n */ function getVerticalCell(tableCell, direction, tableUtils) {\n    const tableRow = tableCell.parent;\n    const table = tableRow.parent;\n    const rowIndex = table.getChildIndex(tableRow);\n    // Don't search for mergeable cell if direction points out of the table.\n    if (direction == 'down' && rowIndex === tableUtils.getRows(table) - 1 || direction == 'up' && rowIndex === 0) {\n        return null;\n    }\n    const rowspan = parseInt(tableCell.getAttribute('rowspan') || '1');\n    const headingRows = table.getAttribute('headingRows') || 0;\n    const isMergeWithBodyCell = direction == 'down' && rowIndex + rowspan === headingRows;\n    const isMergeWithHeadCell = direction == 'up' && rowIndex === headingRows;\n    // Don't search for mergeable cell if direction points out of the current table section.\n    if (headingRows && (isMergeWithBodyCell || isMergeWithHeadCell)) {\n        return null;\n    }\n    const currentCellRowSpan = parseInt(tableCell.getAttribute('rowspan') || '1');\n    const rowOfCellToMerge = direction == 'down' ? rowIndex + currentCellRowSpan : rowIndex;\n    const tableMap = [\n        ...new TableWalker(table, {\n            endRow: rowOfCellToMerge\n        })\n    ];\n    const currentCellData = tableMap.find((value)=>value.cell === tableCell);\n    const mergeColumn = currentCellData.column;\n    const cellToMergeData = tableMap.find(({ row, cellHeight, column })=>{\n        if (column !== mergeColumn) {\n            return false;\n        }\n        if (direction == 'down') {\n            // If merging a cell below the mergeRow is already calculated.\n            return row === rowOfCellToMerge;\n        } else {\n            // If merging a cell above calculate if it spans to mergeRow.\n            return rowOfCellToMerge === row + cellHeight;\n        }\n    });\n    return cellToMergeData && cellToMergeData.cell ? cellToMergeData.cell : null;\n}\n/**\n * Merges two table cells. It will ensure that after merging cells with an empty paragraph, the resulting table cell will only have one\n * paragraph. If one of the merged table cells is empty, the merged table cell will have the contents of the non-empty table cell.\n * If both are empty, the merged table cell will have only one empty paragraph.\n */ function mergeTableCells$1(cellToRemove, cellToExpand, writer) {\n    if (!isEmpty$2(cellToRemove)) {\n        if (isEmpty$2(cellToExpand)) {\n            writer.remove(writer.createRangeIn(cellToExpand));\n        }\n        writer.move(writer.createRangeIn(cellToRemove), writer.createPositionAt(cellToExpand, 'end'));\n    }\n    // Remove merged table cell.\n    writer.remove(cellToRemove);\n}\n/**\n * Checks if the passed table cell contains an empty paragraph.\n */ function isEmpty$2(tableCell) {\n    const firstTableChild = tableCell.getChild(0);\n    return tableCell.childCount == 1 && firstTableChild.is('element', 'paragraph') && firstTableChild.isEmpty;\n}\n\n/**\n * The remove row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'removeTableRow'` editor command.\n *\n * To remove the row containing the selected cell, execute the command:\n *\n * ```ts\n * editor.execute( 'removeTableRow' );\n * ```\n */ class RemoveRowCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n        const firstCell = selectedCells[0];\n        if (firstCell) {\n            const table = firstCell.findAncestor('table');\n            const tableRowCount = tableUtils.getRows(table);\n            const lastRowIndex = tableRowCount - 1;\n            const selectedRowIndexes = tableUtils.getRowIndexes(selectedCells);\n            const areAllRowsSelected = selectedRowIndexes.first === 0 && selectedRowIndexes.last === lastRowIndex;\n            // Disallow selecting whole table -> delete whole table should be used instead.\n            this.isEnabled = !areAllRowsSelected;\n        } else {\n            this.isEnabled = false;\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const model = this.editor.model;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const referenceCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const removedRowIndexes = tableUtils.getRowIndexes(referenceCells);\n        const firstCell = referenceCells[0];\n        const table = firstCell.findAncestor('table');\n        const columnIndexToFocus = tableUtils.getCellLocation(firstCell).column;\n        model.change((writer)=>{\n            const rowsToRemove = removedRowIndexes.last - removedRowIndexes.first + 1;\n            tableUtils.removeRows(table, {\n                at: removedRowIndexes.first,\n                rows: rowsToRemove\n            });\n            const cellToFocus = getCellToFocus$1(table, removedRowIndexes.first, columnIndexToFocus, tableUtils.getRows(table));\n            writer.setSelection(writer.createPositionAt(cellToFocus, 0));\n        });\n    }\n}\n/**\n * Returns a cell that should be focused before removing the row, belonging to the same column as the currently focused cell.\n * - If the row was not the last one, the cell to focus will be in the row that followed it (before removal).\n * - If the row was the last one, the cell to focus will be in the row that preceded it (before removal).\n */ function getCellToFocus$1(table, removedRowIndex, columnToFocus, tableRowCount) {\n    // Don't go beyond last row's index.\n    const row = table.getChild(Math.min(removedRowIndex, tableRowCount - 1));\n    // Default to first table cell.\n    let cellToFocus = row.getChild(0);\n    let column = 0;\n    for (const tableCell of row.getChildren()){\n        if (column > columnToFocus) {\n            return cellToFocus;\n        }\n        cellToFocus = tableCell;\n        column += parseInt(tableCell.getAttribute('colspan') || '1');\n    }\n    return cellToFocus;\n}\n\n/**\n * The remove column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'removeTableColumn'` editor command.\n *\n * To remove the column containing the selected cell, execute the command:\n *\n * ```ts\n * editor.execute( 'removeTableColumn' );\n * ```\n */ class RemoveColumnCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n        const firstCell = selectedCells[0];\n        if (firstCell) {\n            const table = firstCell.findAncestor('table');\n            const tableColumnCount = tableUtils.getColumns(table);\n            const { first, last } = tableUtils.getColumnIndexes(selectedCells);\n            this.isEnabled = last - first < tableColumnCount - 1;\n        } else {\n            this.isEnabled = false;\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const [firstCell, lastCell] = getBoundaryCells(this.editor.model.document.selection, tableUtils);\n        const table = firstCell.parent.parent;\n        // Cache the table before removing or updating colspans.\n        const tableMap = [\n            ...new TableWalker(table)\n        ];\n        // Store column indexes of removed columns.\n        const removedColumnIndexes = {\n            first: tableMap.find((value)=>value.cell === firstCell).column,\n            last: tableMap.find((value)=>value.cell === lastCell).column\n        };\n        const cellToFocus = getCellToFocus(tableMap, firstCell, lastCell, removedColumnIndexes);\n        this.editor.model.change((writer)=>{\n            const columnsToRemove = removedColumnIndexes.last - removedColumnIndexes.first + 1;\n            tableUtils.removeColumns(table, {\n                at: removedColumnIndexes.first,\n                columns: columnsToRemove\n            });\n            writer.setSelection(writer.createPositionAt(cellToFocus, 0));\n        });\n    }\n}\n/**\n * Returns a proper table cell to focus after removing a column.\n * - selection is on last table cell it will return previous cell.\n */ function getCellToFocus(tableMap, firstCell, lastCell, removedColumnIndexes) {\n    const colspan = parseInt(lastCell.getAttribute('colspan') || '1');\n    // If the table cell is spanned over 2+ columns - it will be truncated so the selection should\n    // stay in that cell.\n    if (colspan > 1) {\n        return lastCell;\n    } else if (firstCell.previousSibling || lastCell.nextSibling) {\n        return lastCell.nextSibling || firstCell.previousSibling;\n    } else {\n        // Look for any cell in a column that precedes the first removed column.\n        if (removedColumnIndexes.first) {\n            return tableMap.reverse().find(({ column })=>{\n                return column < removedColumnIndexes.first;\n            }).cell;\n        } else {\n            return tableMap.reverse().find(({ column })=>{\n                return column > removedColumnIndexes.last;\n            }).cell;\n        }\n    }\n}\n/**\n * Returns helper object returning the first and the last cell contained in given selection, based on DOM order.\n */ function getBoundaryCells(selection, tableUtils) {\n    const referenceCells = tableUtils.getSelectionAffectedTableCells(selection);\n    const firstCell = referenceCells[0];\n    const lastCell = referenceCells.pop();\n    const returnValue = [\n        firstCell,\n        lastCell\n    ];\n    return firstCell.isBefore(lastCell) ? returnValue : returnValue.reverse();\n}\n\n/**\n * The header row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableColumnHeader'` editor command.\n *\n * You can make the row containing the selected cell a [header](https://www.w3.org/TR/html50/tabular-data.html#the-th-element) by executing:\n *\n * ```ts\n * editor.execute( 'setTableRowHeader' );\n * ```\n *\n * **Note:** All preceding rows will also become headers. If the current row is already a header, executing this command\n * will make it a regular row back again (including the following rows).\n */ class SetHeaderRowCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const model = this.editor.model;\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const isInTable = selectedCells.length > 0;\n        this.isEnabled = isInTable;\n        this.value = isInTable && selectedCells.every((cell)=>this._isInHeading(cell, cell.parent.parent));\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * When the selection is in a non-header row, the command will set the `headingRows` table attribute to cover that row.\n\t *\n\t * When the selection is already in a header row, it will set `headingRows` so the heading section will end before that row.\n\t *\n\t * @fires execute\n\t * @param options.forceValue If set, the command will set (`true`) or unset (`false`) the header rows according to\n\t * the `forceValue` parameter instead of the current model state.\n\t */ execute(options = {}) {\n        if (options.forceValue === this.value) {\n            return;\n        }\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const model = this.editor.model;\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const table = selectedCells[0].findAncestor('table');\n        const { first, last } = tableUtils.getRowIndexes(selectedCells);\n        const headingRowsToSet = this.value ? first : last + 1;\n        const currentHeadingRows = table.getAttribute('headingRows') || 0;\n        model.change((writer)=>{\n            if (headingRowsToSet) {\n                // Changing heading rows requires to check if any of a heading cell is overlapping vertically the table head.\n                // Any table cell that has a rowspan attribute > 1 will not exceed the table head so we need to fix it in rows below.\n                const startRow = headingRowsToSet > currentHeadingRows ? currentHeadingRows : 0;\n                const overlappingCells = getVerticallyOverlappingCells(table, headingRowsToSet, startRow);\n                for (const { cell } of overlappingCells){\n                    splitHorizontally(cell, headingRowsToSet, writer);\n                }\n            }\n            updateNumericAttribute('headingRows', headingRowsToSet, table, writer, 0);\n        });\n    }\n    /**\n\t * Checks if a table cell is in the heading section.\n\t */ _isInHeading(tableCell, table) {\n        const headingRows = parseInt(table.getAttribute('headingRows') || '0');\n        return !!headingRows && tableCell.parent.index < headingRows;\n    }\n}\n\n/**\n * The header column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'setTableColumnHeader'` editor command.\n *\n * You can make the column containing the selected cell a [header](https://www.w3.org/TR/html50/tabular-data.html#the-th-element)\n * by executing:\n *\n * ```ts\n * editor.execute( 'setTableColumnHeader' );\n * ```\n *\n * **Note:** All preceding columns will also become headers. If the current column is already a header, executing this command\n * will make it a regular column back again (including the following columns).\n */ class SetHeaderColumnCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const model = this.editor.model;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const isInTable = selectedCells.length > 0;\n        this.isEnabled = isInTable;\n        this.value = isInTable && selectedCells.every((cell)=>isHeadingColumnCell(tableUtils, cell));\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * When the selection is in a non-header column, the command will set the `headingColumns` table attribute to cover that column.\n\t *\n\t * When the selection is already in a header column, it will set `headingColumns` so the heading section will end before that column.\n\t *\n\t * @fires execute\n\t * @param options.forceValue If set, the command will set (`true`) or unset (`false`) the header columns according to\n\t * the `forceValue` parameter instead of the current model state.\n\t */ execute(options = {}) {\n        if (options.forceValue === this.value) {\n            return;\n        }\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const model = this.editor.model;\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const table = selectedCells[0].findAncestor('table');\n        const { first, last } = tableUtils.getColumnIndexes(selectedCells);\n        const headingColumnsToSet = this.value ? first : last + 1;\n        model.change((writer)=>{\n            if (headingColumnsToSet) {\n                // Changing heading columns requires to check if any of a heading cell is overlapping horizontally the table head.\n                // Any table cell that has a colspan attribute > 1 will not exceed the table head so we need to fix it in columns before.\n                const overlappingCells = getHorizontallyOverlappingCells(table, headingColumnsToSet);\n                for (const { cell, column } of overlappingCells){\n                    splitVertically(cell, column, headingColumnsToSet, writer);\n                }\n            }\n            updateNumericAttribute('headingColumns', headingColumnsToSet, table, writer, 0);\n        });\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module table/tablecolumnresize/constants\n */ /**\n * The minimum column width given as a percentage value. Used in situations when the table is not yet rendered, so it is impossible to\n * calculate how many percentage of the table width would be {@link ~COLUMN_MIN_WIDTH_IN_PIXELS minimum column width in pixels}.\n */ const COLUMN_MIN_WIDTH_AS_PERCENTAGE = 5;\n/**\n * The minimum column width in pixels when the maximum table width is known.\n */ const COLUMN_MIN_WIDTH_IN_PIXELS = 40;\n/**\n * Determines how many digits after the decimal point are used to store the column width as a percentage value.\n */ const COLUMN_WIDTH_PRECISION = 2;\n\n/**\n * Returns all the inserted or changed table model elements in a given change set. Only the tables\n * with 'columnsWidth' attribute are taken into account. The returned set may be empty.\n *\n * Most notably if an entire table is removed it will not be included in returned set.\n *\n * @param model The model to collect the affected elements from.\n * @returns A set of table model elements.\n */ function getChangedResizedTables(model) {\n    const affectedTables = new Set();\n    for (const change of model.document.differ.getChanges()){\n        let referencePosition = null;\n        // Checks if the particular change from the differ is:\n        // - an insertion or removal of a table, a row or a cell,\n        // - an attribute change on a table, a row or a cell.\n        switch(change.type){\n            case 'insert':\n                referencePosition = [\n                    'table',\n                    'tableRow',\n                    'tableCell'\n                ].includes(change.name) ? change.position : null;\n                break;\n            case 'remove':\n                // If the whole table is removed, there's no need to update its column widths (#12201).\n                referencePosition = [\n                    'tableRow',\n                    'tableCell'\n                ].includes(change.name) ? change.position : null;\n                break;\n            case 'attribute':\n                if (change.range.start.nodeAfter) {\n                    referencePosition = [\n                        'table',\n                        'tableRow',\n                        'tableCell'\n                    ].includes(change.range.start.nodeAfter.name) ? change.range.start : null;\n                }\n                break;\n        }\n        if (!referencePosition) {\n            continue;\n        }\n        const tableNode = referencePosition.nodeAfter && referencePosition.nodeAfter.is('element', 'table') ? referencePosition.nodeAfter : referencePosition.findAncestor('table');\n        // We iterate over the whole table looking for the nested tables that are also affected.\n        for (const node of model.createRangeOn(tableNode).getItems()){\n            if (!node.is('element', 'table')) {\n                continue;\n            }\n            if (!getColumnGroupElement(node)) {\n                continue;\n            }\n            affectedTables.add(node);\n        }\n    }\n    return affectedTables;\n}\n/**\n * Calculates the percentage of the minimum column width given in pixels for a given table.\n *\n * @param modelTable A table model element.\n * @param editor The editor instance.\n * @returns The minimal column width in percentage.\n */ function getColumnMinWidthAsPercentage(modelTable, editor) {\n    return COLUMN_MIN_WIDTH_IN_PIXELS * 100 / getTableWidthInPixels(modelTable, editor);\n}\n/**\n * Calculates the table width in pixels.\n *\n * @param modelTable A table model element.\n * @param editor The editor instance.\n * @returns The width of the table in pixels.\n */ function getTableWidthInPixels(modelTable, editor) {\n    // It is possible for a table to not have a <tbody> element - see #11878.\n    const referenceElement = getChildrenViewElement(modelTable, 'tbody', editor) || getChildrenViewElement(modelTable, 'thead', editor);\n    const domReferenceElement = editor.editing.view.domConverter.mapViewToDom(referenceElement);\n    return getElementWidthInPixels(domReferenceElement);\n}\n/**\n * Returns the a view element with a given name that is nested directly in a `<table>` element\n * related to a given `modelTable`.\n *\n * @param elementName Name of a view to be looked for, e.g. `'colgroup`', `'thead`'.\n * @returns Matched view or `undefined` otherwise.\n */ function getChildrenViewElement(modelTable, elementName, editor) {\n    const viewFigure = editor.editing.mapper.toViewElement(modelTable);\n    const viewTable = [\n        ...viewFigure.getChildren()\n    ].find((node)=>node.is('element', 'table'));\n    return [\n        ...viewTable.getChildren()\n    ].find((node)=>node.is('element', elementName));\n}\n/**\n * Returns the computed width (in pixels) of the DOM element without padding and borders.\n *\n * @param domElement A DOM element.\n * @returns The width of the DOM element in pixels.\n */ function getElementWidthInPixels(domElement) {\n    const styles = global.window.getComputedStyle(domElement);\n    // In the 'border-box' box sizing algorithm, the element's width\n    // already includes the padding and border width (#12335).\n    if (styles.boxSizing === 'border-box') {\n        return parseFloat(styles.width) - parseFloat(styles.paddingLeft) - parseFloat(styles.paddingRight) - parseFloat(styles.borderLeftWidth) - parseFloat(styles.borderRightWidth);\n    } else {\n        return parseFloat(styles.width);\n    }\n}\n/**\n * Returns the column indexes on the left and right edges of a cell. They differ if the cell spans\n * across multiple columns.\n *\n * @param cell A table cell model element.\n * @param tableUtils The Table Utils plugin instance.\n * @returns An object containing the indexes of the left and right edges of the cell.\n */ function getColumnEdgesIndexes(cell, tableUtils) {\n    const cellColumnIndex = tableUtils.getCellLocation(cell).column;\n    const cellWidth = cell.getAttribute('colspan') || 1;\n    return {\n        leftEdge: cellColumnIndex,\n        rightEdge: cellColumnIndex + cellWidth - 1\n    };\n}\n/**\n * Rounds the provided value to a fixed-point number with defined number of digits after the decimal point.\n *\n * @param value A number to be rounded.\n * @returns The rounded number.\n */ function toPrecision(value) {\n    const multiplier = Math.pow(10, COLUMN_WIDTH_PRECISION);\n    const number = typeof value === 'number' ? value : parseFloat(value);\n    return Math.round(number * multiplier) / multiplier;\n}\n/**\n * Clamps the number within the inclusive lower (min) and upper (max) bounds. Returned number is rounded using the\n * {@link ~toPrecision `toPrecision()`} function.\n *\n * @param number A number to be clamped.\n * @param min A lower bound.\n * @param max An upper bound.\n * @returns The clamped number.\n */ function clamp(number, min, max) {\n    if (number <= min) {\n        return toPrecision(min);\n    }\n    if (number >= max) {\n        return toPrecision(max);\n    }\n    return toPrecision(number);\n}\n/**\n * Creates an array with defined length and fills all elements with defined value.\n *\n * @param length The length of the array.\n * @param value The value to fill the array with.\n * @returns An array with defined length and filled with defined value.\n */ function createFilledArray(length, value) {\n    return Array(length).fill(value);\n}\n/**\n * Sums all array values that can be parsed to a float.\n *\n * @param array An array of numbers.\n * @returns The sum of all array values.\n */ function sumArray(array) {\n    return array.map((value)=>typeof value === 'number' ? value : parseFloat(value)).filter((value)=>!Number.isNaN(value)).reduce((result, item)=>result + item, 0);\n}\n/**\n * Makes sure that the sum of the widths from all columns is 100%. If the sum of all the widths is not equal 100%, all the widths are\n * changed proportionally so that they all sum back to 100%. If there are columns without specified width, the amount remaining\n * after assigning the known widths will be distributed equally between them.\n *\n * @param columnWidths An array of column widths.\n * @returns An array of column widths guaranteed to sum up to 100%.\n */ function normalizeColumnWidths(columnWidths) {\n    const widths = columnWidths.map((width)=>{\n        if (width === 'auto') {\n            return width;\n        }\n        return parseFloat(width.replace('%', ''));\n    });\n    let normalizedWidths = calculateMissingColumnWidths(widths);\n    const totalWidth = sumArray(normalizedWidths);\n    if (totalWidth !== 100) {\n        normalizedWidths = normalizedWidths// Adjust all the columns proportionally.\n        .map((width)=>toPrecision(width * 100 / totalWidth))// Due to rounding of numbers it may happen that the sum of the widths of all columns will not be exactly 100%.\n        // Therefore, the width of the last column is explicitly adjusted (narrowed or expanded), since all the columns\n        // have been proportionally changed already.\n        .map((columnWidth, columnIndex, width)=>{\n            const isLastColumn = columnIndex === width.length - 1;\n            if (!isLastColumn) {\n                return columnWidth;\n            }\n            const totalWidth = sumArray(width);\n            return toPrecision(columnWidth + 100 - totalWidth);\n        });\n    }\n    return normalizedWidths.map((width)=>width + '%');\n}\n/**\n * Initializes the column widths by parsing the attribute value and calculating the uninitialized column widths. The special value 'auto'\n * indicates that width for the column must be calculated. The width of such uninitialized column is calculated as follows:\n * - If there is enough free space in the table for all uninitialized columns to have at least the minimum allowed width for all of them,\n *   then set this width equally for all uninitialized columns.\n * - Otherwise, just set the minimum allowed width for all uninitialized columns. The sum of all column widths will be greater than 100%,\n *   but then it will be adjusted proportionally to 100% in {@link #normalizeColumnWidths `normalizeColumnWidths()`}.\n *\n * @param columnWidths An array of column widths.\n * @returns An array with 'auto' values replaced with calculated widths.\n */ function calculateMissingColumnWidths(columnWidths) {\n    const numberOfUninitializedColumns = columnWidths.filter((columnWidth)=>columnWidth === 'auto').length;\n    if (numberOfUninitializedColumns === 0) {\n        return columnWidths.map((columnWidth)=>toPrecision(columnWidth));\n    }\n    const totalWidthOfInitializedColumns = sumArray(columnWidths);\n    const widthForUninitializedColumn = Math.max((100 - totalWidthOfInitializedColumns) / numberOfUninitializedColumns, COLUMN_MIN_WIDTH_AS_PERCENTAGE);\n    return columnWidths.map((columnWidth)=>columnWidth === 'auto' ? widthForUninitializedColumn : columnWidth).map((columnWidth)=>toPrecision(columnWidth));\n}\n/**\n * Calculates the total horizontal space taken by the cell. That includes:\n *  * width,\n *  * left and red padding,\n *  * border width.\n *\n * @param domCell A DOM cell element.\n * @returns Width in pixels without `px` at the end.\n */ function getDomCellOuterWidth(domCell) {\n    const styles = global.window.getComputedStyle(domCell);\n    // In the 'border-box' box sizing algorithm, the element's width\n    // already includes the padding and border width (#12335).\n    if (styles.boxSizing === 'border-box') {\n        return parseInt(styles.width);\n    } else {\n        return parseFloat(styles.width) + parseFloat(styles.paddingLeft) + parseFloat(styles.paddingRight) + parseFloat(styles.borderWidth);\n    }\n}\n/**\n * Updates column elements to match columns widths.\n *\n * @param columns\n * @param tableColumnGroup\n * @param normalizedWidths\n * @param writer\n */ function updateColumnElements(columns, tableColumnGroup, normalizedWidths, writer) {\n    for(let i = 0; i < Math.max(normalizedWidths.length, columns.length); i++){\n        const column = columns[i];\n        const columnWidth = normalizedWidths[i];\n        if (!columnWidth) {\n            // Number of `<tableColumn>` elements exceeds actual number of columns.\n            writer.remove(column);\n        } else if (!column) {\n            // There is fewer `<tableColumn>` elements than actual columns.\n            writer.appendElement('tableColumn', {\n                columnWidth\n            }, tableColumnGroup);\n        } else {\n            // Update column width.\n            writer.setAttribute('columnWidth', columnWidth, column);\n        }\n    }\n}\n/**\n * Returns a 'tableColumnGroup' element from the 'table'.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @returns A 'tableColumnGroup' element.\n */ function getColumnGroupElement(element) {\n    if (element.is('element', 'tableColumnGroup')) {\n        return element;\n    }\n    const children = element.getChildren();\n    return Array.from(children).find((element)=>element.is('element', 'tableColumnGroup'));\n}\n/**\n * Returns an array of 'tableColumn' elements. It may be empty if there's no `tableColumnGroup` element.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @returns An array of 'tableColumn' elements.\n */ function getTableColumnElements(element) {\n    const columnGroupElement = getColumnGroupElement(element);\n    if (!columnGroupElement) {\n        return [];\n    }\n    return Array.from(columnGroupElement.getChildren());\n}\n/**\n * Returns an array of table column widths.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @returns An array of table column widths.\n */ function getTableColumnsWidths(element) {\n    return getTableColumnElements(element).map((column)=>column.getAttribute('columnWidth'));\n}\n/**\n * Translates the `colSpan` model attribute into additional column widths and returns the resulting array.\n *\n * @internal\n * @param element A 'table' or 'tableColumnGroup' element.\n * @param writer A writer instance.\n * @returns An array of table column widths.\n */ function translateColSpanAttribute(element, writer) {\n    const tableColumnElements = getTableColumnElements(element);\n    return tableColumnElements.reduce((acc, element)=>{\n        const columnWidth = element.getAttribute('columnWidth');\n        const colSpan = element.getAttribute('colSpan');\n        if (!colSpan) {\n            acc.push(columnWidth);\n            return acc;\n        }\n        // Translate the `colSpan` model attribute on to the proper number of column widths\n        // and remove it from the element.\n        // See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for more details.\n        for(let i = 0; i < colSpan; i++){\n            acc.push(columnWidth);\n        }\n        writer.removeAttribute('colSpan', element);\n        return acc;\n    }, []);\n}\n\n/**\n * The table utilities plugin.\n */ class TableUtils extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableUtils';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        this.decorate('insertColumns');\n        this.decorate('insertRows');\n    }\n    /**\n\t * Returns the table cell location as an object with table row and table column indexes.\n\t *\n\t * For instance, in the table below:\n\t *\n\t *      0   1   2   3\n\t *    +---+---+---+---+\n\t *  0 | a     | b | c |\n\t *    +       +   +---+\n\t *  1 |       |   | d |\n\t *    +---+---+   +---+\n\t *  2 | e     |   | f |\n\t *    +---+---+---+---+\n\t *\n\t * the method will return:\n\t *\n\t * ```ts\n\t * const cellA = table.getNodeByPath( [ 0, 0 ] );\n\t * editor.plugins.get( 'TableUtils' ).getCellLocation( cellA );\n\t * // will return { row: 0, column: 0 }\n\t *\n\t * const cellD = table.getNodeByPath( [ 1, 0 ] );\n\t * editor.plugins.get( 'TableUtils' ).getCellLocation( cellD );\n\t * // will return { row: 1, column: 3 }\n\t * ```\n\t *\n\t * @returns Returns a `{row, column}` object.\n\t */ getCellLocation(tableCell) {\n        const tableRow = tableCell.parent;\n        const table = tableRow.parent;\n        const rowIndex = table.getChildIndex(tableRow);\n        const tableWalker = new TableWalker(table, {\n            row: rowIndex\n        });\n        for (const { cell, row, column } of tableWalker){\n            if (cell === tableCell) {\n                return {\n                    row,\n                    column\n                };\n            }\n        }\n        // Should be unreachable code.\n        /* istanbul ignore next -- @preserve */ return undefined;\n    }\n    /**\n\t * Creates an empty table with a proper structure. The table needs to be inserted into the model,\n\t * for example, by using the {@link module:engine/model/model~Model#insertContent} function.\n\t *\n\t * ```ts\n\t * model.change( ( writer ) => {\n\t *   // Create a table of 2 rows and 7 columns:\n\t *   const table = tableUtils.createTable( writer, { rows: 2, columns: 7 } );\n\t *\n\t *   // Insert a table to the model at the best position taking the current selection:\n\t *   model.insertContent( table );\n\t * }\n\t * ```\n\t *\n\t * @param writer The model writer.\n\t * @param options.rows The number of rows to create. Default value is 2.\n\t * @param options.columns The number of columns to create. Default value is 2.\n\t * @param options.headingRows The number of heading rows. Default value is 0.\n\t * @param options.headingColumns The number of heading columns. Default value is 0.\n\t * @returns The created table element.\n\t */ createTable(writer, options) {\n        const table = writer.createElement('table');\n        const rows = options.rows || 2;\n        const columns = options.columns || 2;\n        createEmptyRows(writer, table, 0, rows, columns);\n        if (options.headingRows) {\n            updateNumericAttribute('headingRows', Math.min(options.headingRows, rows), table, writer, 0);\n        }\n        if (options.headingColumns) {\n            updateNumericAttribute('headingColumns', Math.min(options.headingColumns, columns), table, writer, 0);\n        }\n        return table;\n    }\n    /**\n\t * Inserts rows into a table.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).insertRows( table, { at: 1, rows: 2 } );\n\t * ```\n\t *\n\t * Assuming the table on the left, the above code will transform it to the table on the right:\n\t *\n\t *  row index\n\t *    0 +---+---+---+       `at` = 1,      +---+---+---+ 0\n\t *      | a | b | c |       `rows` = 2,    | a | b | c |\n\t *    1 +   +---+---+   <-- insert here    +   +---+---+ 1\n\t *      |   | d | e |                      |   |   |   |\n\t *    2 +   +---+---+       will give:     +   +---+---+ 2\n\t *      |   | f | g |                      |   |   |   |\n\t *    3 +---+---+---+                      +   +---+---+ 3\n\t *                                         |   | d | e |\n\t *                                         +   +---+---+ 4\n\t *                                         +   + f | g |\n\t *                                         +---+---+---+ 5\n\t *\n\t * @param table The table model element where the rows will be inserted.\n\t * @param options.at The row index at which the rows will be inserted.  Default value is 0.\n\t * @param options.rows The number of rows to insert.  Default value is 1.\n\t * @param options.copyStructureFromAbove The flag for copying row structure. Note that\n\t * the row structure will not be copied if this option is not provided.\n\t */ insertRows(table, options = {}) {\n        const model = this.editor.model;\n        const insertAt = options.at || 0;\n        const rowsToInsert = options.rows || 1;\n        const isCopyStructure = options.copyStructureFromAbove !== undefined;\n        const copyStructureFrom = options.copyStructureFromAbove ? insertAt - 1 : insertAt;\n        const rows = this.getRows(table);\n        const columns = this.getColumns(table);\n        if (insertAt > rows) {\n            /**\n\t\t\t * The `options.at` points at a row position that does not exist.\n\t\t\t *\n\t\t\t * @error tableutils-insertrows-insert-out-of-range\n\t\t\t */ throw new CKEditorError('tableutils-insertrows-insert-out-of-range', this, {\n                options\n            });\n        }\n        model.change((writer)=>{\n            const headingRows = table.getAttribute('headingRows') || 0;\n            // Inserting rows inside heading section requires to update `headingRows` attribute as the heading section will grow.\n            if (headingRows > insertAt) {\n                updateNumericAttribute('headingRows', headingRows + rowsToInsert, table, writer, 0);\n            }\n            // Inserting at the end or at the beginning of a table doesn't require to calculate anything special.\n            if (!isCopyStructure && (insertAt === 0 || insertAt === rows)) {\n                createEmptyRows(writer, table, insertAt, rowsToInsert, columns);\n                return;\n            }\n            // Iterate over all the rows above the inserted rows in order to check for the row-spanned cells.\n            const walkerEndRow = isCopyStructure ? Math.max(insertAt, copyStructureFrom) : insertAt;\n            const tableIterator = new TableWalker(table, {\n                endRow: walkerEndRow\n            });\n            // Store spans of the reference row to reproduce it's structure. This array is column number indexed.\n            const rowColSpansMap = new Array(columns).fill(1);\n            for (const { row, column, cellHeight, cellWidth, cell } of tableIterator){\n                const lastCellRow = row + cellHeight - 1;\n                const isOverlappingInsertedRow = row < insertAt && insertAt <= lastCellRow;\n                const isReferenceRow = row <= copyStructureFrom && copyStructureFrom <= lastCellRow;\n                // If the cell is row-spanned and overlaps the inserted row, then reserve space for it in the row map.\n                if (isOverlappingInsertedRow) {\n                    // This cell overlaps the inserted rows so we need to expand it further.\n                    writer.setAttribute('rowspan', cellHeight + rowsToInsert, cell);\n                    // Mark this cell with negative number to indicate how many cells should be skipped when adding the new cells.\n                    rowColSpansMap[column] = -cellWidth;\n                } else if (isCopyStructure && isReferenceRow) {\n                    rowColSpansMap[column] = cellWidth;\n                }\n            }\n            for(let rowIndex = 0; rowIndex < rowsToInsert; rowIndex++){\n                const tableRow = writer.createElement('tableRow');\n                writer.insert(tableRow, table, insertAt);\n                for(let cellIndex = 0; cellIndex < rowColSpansMap.length; cellIndex++){\n                    const colspan = rowColSpansMap[cellIndex];\n                    const insertPosition = writer.createPositionAt(tableRow, 'end');\n                    // Insert the empty cell only if this slot is not row-spanned from any other cell.\n                    if (colspan > 0) {\n                        createEmptyTableCell(writer, insertPosition, colspan > 1 ? {\n                            colspan\n                        } : undefined);\n                    }\n                    // Skip the col-spanned slots, there won't be any cells.\n                    cellIndex += Math.abs(colspan) - 1;\n                }\n            }\n        });\n    }\n    /**\n\t * Inserts columns into a table.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).insertColumns( table, { at: 1, columns: 2 } );\n\t * ```\n\t *\n\t * Assuming the table on the left, the above code will transform it to the table on the right:\n\t *\n\t *  0   1   2   3                   0   1   2   3   4   5\n\t *  +---+---+---+                   +---+---+---+---+---+\n\t *  | a     | b |                   | a             | b |\n\t *  +       +---+                   +               +---+\n\t *  |       | c |                   |               | c |\n\t *  +---+---+---+     will give:    +---+---+---+---+---+\n\t *  | d | e | f |                   | d |   |   | e | f |\n\t *  +---+   +---+                   +---+---+---+   +---+\n\t *  | g |   | h |                   | g |   |   |   | h |\n\t *  +---+---+---+                   +---+---+---+---+---+\n\t *  | i         |                   | i                 |\n\t *  +---+---+---+                   +---+---+---+---+---+\n\t *      ^---- insert here, `at` = 1, `columns` = 2\n\t *\n\t * @param table The table model element where the columns will be inserted.\n\t * @param options.at The column index at which the columns will be inserted. Default value is 0.\n\t * @param options.columns The number of columns to insert. Default value is 1.\n\t */ insertColumns(table, options = {}) {\n        const model = this.editor.model;\n        const insertAt = options.at || 0;\n        const columnsToInsert = options.columns || 1;\n        model.change((writer)=>{\n            const headingColumns = table.getAttribute('headingColumns');\n            // Inserting columns inside heading section requires to update `headingColumns` attribute as the heading section will grow.\n            if (insertAt < headingColumns) {\n                writer.setAttribute('headingColumns', headingColumns + columnsToInsert, table);\n            }\n            const tableColumns = this.getColumns(table);\n            // Inserting at the end and at the beginning of a table doesn't require to calculate anything special.\n            if (insertAt === 0 || tableColumns === insertAt) {\n                for (const tableRow of table.getChildren()){\n                    // Ignore non-row elements inside the table (e.g. caption).\n                    if (!tableRow.is('element', 'tableRow')) {\n                        continue;\n                    }\n                    createCells(columnsToInsert, writer, writer.createPositionAt(tableRow, insertAt ? 'end' : 0));\n                }\n                return;\n            }\n            const tableWalker = new TableWalker(table, {\n                column: insertAt,\n                includeAllSlots: true\n            });\n            for (const tableSlot of tableWalker){\n                const { row, cell, cellAnchorColumn, cellAnchorRow, cellWidth, cellHeight } = tableSlot;\n                // When iterating over column the table walker outputs either:\n                // - cells at given column index (cell \"e\" from method docs),\n                // - spanned columns (spanned cell from row between cells \"g\" and \"h\" - spanned by \"e\", only if `includeAllSlots: true`),\n                // - or a cell from the same row which spans over this column (cell \"a\").\n                if (cellAnchorColumn < insertAt) {\n                    // If cell is anchored in previous column, it is a cell that spans over an inserted column (cell \"a\" & \"i\").\n                    // For such cells expand them by a number of columns inserted.\n                    writer.setAttribute('colspan', cellWidth + columnsToInsert, cell);\n                    // This cell will overlap cells in rows below so skip them (because of `includeAllSlots` option) - (cell \"a\")\n                    const lastCellRow = cellAnchorRow + cellHeight - 1;\n                    for(let i = row; i <= lastCellRow; i++){\n                        tableWalker.skipRow(i);\n                    }\n                } else {\n                    // It's either cell at this column index or spanned cell by a row-spanned cell from row above.\n                    // In table above it's cell \"e\" and a spanned position from row below (empty cell between cells \"g\" and \"h\")\n                    createCells(columnsToInsert, writer, tableSlot.getPositionBefore());\n                }\n            }\n        });\n    }\n    /**\n\t * Removes rows from the given `table`.\n\t *\n\t * This method re-calculates the table geometry including `rowspan` attribute of table cells overlapping removed rows\n\t * and table headings values.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).removeRows( table, { at: 1, rows: 2 } );\n\t * ```\n\t *\n\t * Executing the above code in the context of the table on the left will transform its structure as presented on the right:\n\t *\n\t *  row index\n\t *      ┌───┬───┬───┐        `at` = 1        ┌───┬───┬───┐\n\t *    0 │ a │ b │ c │        `rows` = 2      │ a │ b │ c │ 0\n\t *      │   ├───┼───┤                        │   ├───┼───┤\n\t *    1 │   │ d │ e │  <-- remove from here  │   │ d │ g │ 1\n\t *      │   │   ├───┤        will give:      ├───┼───┼───┤\n\t *    2 │   │   │ f │                        │ h │ i │ j │ 2\n\t *      │   │   ├───┤                        └───┴───┴───┘\n\t *    3 │   │   │ g │\n\t *      ├───┼───┼───┤\n\t *    4 │ h │ i │ j │\n\t *      └───┴───┴───┘\n\t *\n\t * @param options.at The row index at which the removing rows will start.\n\t * @param options.rows The number of rows to remove. Default value is 1.\n\t */ removeRows(table, options) {\n        const model = this.editor.model;\n        const rowsToRemove = options.rows || 1;\n        const rowCount = this.getRows(table);\n        const first = options.at;\n        const last = first + rowsToRemove - 1;\n        if (last > rowCount - 1) {\n            /**\n\t\t\t * The `options.at` param must point at existing row and `options.rows` must not exceed the rows in the table.\n\t\t\t *\n\t\t\t * @error tableutils-removerows-row-index-out-of-range\n\t\t\t */ throw new CKEditorError('tableutils-removerows-row-index-out-of-range', this, {\n                table,\n                options\n            });\n        }\n        model.change((writer)=>{\n            const indexesObject = {\n                first,\n                last\n            };\n            // Removing rows from the table require that most calculations to be done prior to changing table structure.\n            // Preparations must be done in the same enqueueChange callback to use the current table structure.\n            // 1. Preparation - get row-spanned cells that have to be modified after removing rows.\n            const { cellsToMove, cellsToTrim } = getCellsToMoveAndTrimOnRemoveRow(table, indexesObject);\n            // 2. Execution\n            // 2a. Move cells from removed rows that extends over a removed section - must be done before removing rows.\n            // This will fill any gaps in a rows below that previously were empty because of row-spanned cells.\n            if (cellsToMove.size) {\n                const rowAfterRemovedSection = last + 1;\n                moveCellsToRow(table, rowAfterRemovedSection, cellsToMove, writer);\n            }\n            // 2b. Remove all required rows.\n            for(let i = last; i >= first; i--){\n                writer.remove(table.getChild(i));\n            }\n            // 2c. Update cells from rows above that overlap removed section. Similar to step 2 but does not involve moving cells.\n            for (const { rowspan, cell } of cellsToTrim){\n                updateNumericAttribute('rowspan', rowspan, cell, writer);\n            }\n            // 2d. Adjust heading rows if removed rows were in a heading section.\n            updateHeadingRows(table, indexesObject, writer);\n            // 2e. Remove empty columns (without anchored cells) if there are any.\n            if (!removeEmptyColumns(table, this)) {\n                // If there wasn't any empty columns then we still need to check if this wasn't called\n                // because of cleaning empty rows and we only removed one of them.\n                removeEmptyRows(table, this);\n            }\n        });\n    }\n    /**\n\t * Removes columns from the given `table`.\n\t *\n\t * This method re-calculates the table geometry including the `colspan` attribute of table cells overlapping removed columns\n\t * and table headings values.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).removeColumns( table, { at: 1, columns: 2 } );\n\t * ```\n\t *\n\t * Executing the above code in the context of the table on the left will transform its structure as presented on the right:\n\t *\n\t *    0   1   2   3   4                       0   1   2\n\t *  ┌───────────────┬───┐                   ┌───────┬───┐\n\t *  │ a             │ b │                   │ a     │ b │\n\t *  │               ├───┤                   │       ├───┤\n\t *  │               │ c │                   │       │ c │\n\t *  ├───┬───┬───┬───┼───┤     will give:    ├───┬───┼───┤\n\t *  │ d │ e │ f │ g │ h │                   │ d │ g │ h │\n\t *  ├───┼───┼───┤   ├───┤                   ├───┤   ├───┤\n\t *  │ i │ j │ k │   │ l │                   │ i │   │ l │\n\t *  ├───┴───┴───┴───┴───┤                   ├───┴───┴───┤\n\t *  │ m                 │                   │ m         │\n\t *  └───────────────────┘                   └───────────┘\n\t *        ^---- remove from here, `at` = 1, `columns` = 2\n\t *\n\t * @param options.at The row index at which the removing columns will start.\n\t * @param options.columns The number of columns to remove.\n\t */ removeColumns(table, options) {\n        const model = this.editor.model;\n        const first = options.at;\n        const columnsToRemove = options.columns || 1;\n        const last = options.at + columnsToRemove - 1;\n        model.change((writer)=>{\n            adjustHeadingColumns(table, {\n                first,\n                last\n            }, writer);\n            const tableColumns = getTableColumnElements(table);\n            for(let removedColumnIndex = last; removedColumnIndex >= first; removedColumnIndex--){\n                for (const { cell, column, cellWidth } of [\n                    ...new TableWalker(table)\n                ]){\n                    // If colspaned cell overlaps removed column decrease its span.\n                    if (column <= removedColumnIndex && cellWidth > 1 && column + cellWidth > removedColumnIndex) {\n                        updateNumericAttribute('colspan', cellWidth - 1, cell, writer);\n                    } else if (column === removedColumnIndex) {\n                        // The cell in removed column has colspan of 1.\n                        writer.remove(cell);\n                    }\n                }\n                // If table has `tableColumn` elements, we need to update it manually.\n                // See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for details.\n                if (tableColumns[removedColumnIndex]) {\n                    // If the removed column is the first one then we need to add its width to the next column.\n                    // Otherwise we add it to the previous column.\n                    const adjacentColumn = removedColumnIndex === 0 ? tableColumns[1] : tableColumns[removedColumnIndex - 1];\n                    const removedColumnWidth = parseFloat(tableColumns[removedColumnIndex].getAttribute('columnWidth'));\n                    const adjacentColumnWidth = parseFloat(adjacentColumn.getAttribute('columnWidth'));\n                    writer.remove(tableColumns[removedColumnIndex]);\n                    // Add the removed column width (in %) to the adjacent column.\n                    writer.setAttribute('columnWidth', removedColumnWidth + adjacentColumnWidth + '%', adjacentColumn);\n                }\n            }\n            // Remove empty rows that could appear after removing columns.\n            if (!removeEmptyRows(table, this)) {\n                // If there wasn't any empty rows then we still need to check if this wasn't called\n                // because of cleaning empty columns and we only removed one of them.\n                removeEmptyColumns(table, this);\n            }\n        });\n    }\n    /**\n\t * Divides a table cell vertically into several ones.\n\t *\n\t * The cell will be visually split into more cells by updating colspans of other cells in a column\n\t * and inserting cells (columns) after that cell.\n\t *\n\t * In the table below, if cell \"a\" is split into 3 cells:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +---+---+---+\n\t *  | d | e | f |\n\t *  +---+---+---+\n\t *\n\t * it will result in the table below:\n\t *\n\t *  +---+---+---+---+---+\n\t *  | a |   |   | b | c |\n\t *  +---+---+---+---+---+\n\t *  | d         | e | f |\n\t *  +---+---+---+---+---+\n\t *\n\t * So cell \"d\" will get its `colspan` updated to `3` and 2 cells will be added (2 columns will be created).\n\t *\n\t * Splitting a cell that already has a `colspan` attribute set will distribute the cell `colspan` evenly and the remainder\n\t * will be left to the original cell:\n\t *\n\t *  +---+---+---+\n\t *  | a         |\n\t *  +---+---+---+\n\t *  | b | c | d |\n\t *  +---+---+---+\n\t *\n\t * Splitting cell \"a\" with `colspan=3` into 2 cells will create 1 cell with a `colspan=a` and cell \"a\" that will have `colspan=2`:\n\t *\n\t *  +---+---+---+\n\t *  | a     |   |\n\t *  +---+---+---+\n\t *  | b | c | d |\n\t *  +---+---+---+\n\t */ splitCellVertically(tableCell, numberOfCells = 2) {\n        const model = this.editor.model;\n        const tableRow = tableCell.parent;\n        const table = tableRow.parent;\n        const rowspan = parseInt(tableCell.getAttribute('rowspan') || '1');\n        const colspan = parseInt(tableCell.getAttribute('colspan') || '1');\n        model.change((writer)=>{\n            // First check - the cell spans over multiple rows so before doing anything else just split this cell.\n            if (colspan > 1) {\n                // Get spans of new (inserted) cells and span to update of split cell.\n                const { newCellsSpan, updatedSpan } = breakSpanEvenly(colspan, numberOfCells);\n                updateNumericAttribute('colspan', updatedSpan, tableCell, writer);\n                // Each inserted cell will have the same attributes:\n                const newCellsAttributes = {};\n                // Do not store default value in the model.\n                if (newCellsSpan > 1) {\n                    newCellsAttributes.colspan = newCellsSpan;\n                }\n                // Copy rowspan of split cell.\n                if (rowspan > 1) {\n                    newCellsAttributes.rowspan = rowspan;\n                }\n                const cellsToInsert = colspan > numberOfCells ? numberOfCells - 1 : colspan - 1;\n                createCells(cellsToInsert, writer, writer.createPositionAfter(tableCell), newCellsAttributes);\n            }\n            // Second check - the cell has colspan of 1 or we need to create more cells then the currently one spans over.\n            if (colspan < numberOfCells) {\n                const cellsToInsert = numberOfCells - colspan;\n                // First step: expand cells on the same column as split cell.\n                const tableMap = [\n                    ...new TableWalker(table)\n                ];\n                // Get the column index of split cell.\n                const { column: splitCellColumn } = tableMap.find(({ cell })=>cell === tableCell);\n                // Find cells which needs to be expanded vertically - those on the same column or those that spans over split cell's column.\n                const cellsToUpdate = tableMap.filter(({ cell, cellWidth, column })=>{\n                    const isOnSameColumn = cell !== tableCell && column === splitCellColumn;\n                    const spansOverColumn = column < splitCellColumn && column + cellWidth > splitCellColumn;\n                    return isOnSameColumn || spansOverColumn;\n                });\n                // Expand cells vertically.\n                for (const { cell, cellWidth } of cellsToUpdate){\n                    writer.setAttribute('colspan', cellWidth + cellsToInsert, cell);\n                }\n                // Second step: create columns after split cell.\n                // Each inserted cell will have the same attributes:\n                const newCellsAttributes = {};\n                // Do not store default value in the model.\n                // Copy rowspan of split cell.\n                if (rowspan > 1) {\n                    newCellsAttributes.rowspan = rowspan;\n                }\n                createCells(cellsToInsert, writer, writer.createPositionAfter(tableCell), newCellsAttributes);\n                const headingColumns = table.getAttribute('headingColumns') || 0;\n                // Update heading section if split cell is in heading section.\n                if (headingColumns > splitCellColumn) {\n                    updateNumericAttribute('headingColumns', headingColumns + cellsToInsert, table, writer);\n                }\n            }\n        });\n    }\n    /**\n\t * Divides a table cell horizontally into several ones.\n\t *\n\t * The cell will be visually split into more cells by updating rowspans of other cells in the row and inserting rows with a single cell\n\t * below.\n\t *\n\t * If in the table below cell \"b\" is split into 3 cells:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +---+---+---+\n\t *  | d | e | f |\n\t *  +---+---+---+\n\t *\n\t * It will result in the table below:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +   +---+   +\n\t *  |   |   |   |\n\t *  +   +---+   +\n\t *  |   |   |   |\n\t *  +---+---+---+\n\t *  | d | e | f |\n\t *  +---+---+---+\n\t *\n\t * So cells \"a\" and \"b\" will get their `rowspan` updated to `3` and 2 rows with a single cell will be added.\n\t *\n\t * Splitting a cell that already has a `rowspan` attribute set will distribute the cell `rowspan` evenly and the remainder\n\t * will be left to the original cell:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +   +---+---+\n\t *  |   | d | e |\n\t *  +   +---+---+\n\t *  |   | f | g |\n\t *  +   +---+---+\n\t *  |   | h | i |\n\t *  +---+---+---+\n\t *\n\t * Splitting cell \"a\" with `rowspan=4` into 3 cells will create 2 cells with a `rowspan=1` and cell \"a\" will have `rowspan=2`:\n\t *\n\t *  +---+---+---+\n\t *  | a | b | c |\n\t *  +   +---+---+\n\t *  |   | d | e |\n\t *  +---+---+---+\n\t *  |   | f | g |\n\t *  +---+---+---+\n\t *  |   | h | i |\n\t *  +---+---+---+\n\t */ splitCellHorizontally(tableCell, numberOfCells = 2) {\n        const model = this.editor.model;\n        const tableRow = tableCell.parent;\n        const table = tableRow.parent;\n        const splitCellRow = table.getChildIndex(tableRow);\n        const rowspan = parseInt(tableCell.getAttribute('rowspan') || '1');\n        const colspan = parseInt(tableCell.getAttribute('colspan') || '1');\n        model.change((writer)=>{\n            // First check - the cell spans over multiple rows so before doing anything else just split this cell.\n            if (rowspan > 1) {\n                // Cache table map before updating table.\n                const tableMap = [\n                    ...new TableWalker(table, {\n                        startRow: splitCellRow,\n                        endRow: splitCellRow + rowspan - 1,\n                        includeAllSlots: true\n                    })\n                ];\n                // Get spans of new (inserted) cells and span to update of split cell.\n                const { newCellsSpan, updatedSpan } = breakSpanEvenly(rowspan, numberOfCells);\n                updateNumericAttribute('rowspan', updatedSpan, tableCell, writer);\n                const { column: cellColumn } = tableMap.find(({ cell })=>cell === tableCell);\n                // Each inserted cell will have the same attributes:\n                const newCellsAttributes = {};\n                // Do not store default value in the model.\n                if (newCellsSpan > 1) {\n                    newCellsAttributes.rowspan = newCellsSpan;\n                }\n                // Copy colspan of split cell.\n                if (colspan > 1) {\n                    newCellsAttributes.colspan = colspan;\n                }\n                // Accumulator that stores distance from the last inserted cell span.\n                // It helps with evenly splitting larger cell spans (for example 10 cells collapsing into 3 cells).\n                // We split these cells into 3, 3, 4 cells and we have to call `createCells` only when distance between\n                // these cells is equal or greater than the new cells span size.\n                let distanceFromLastCellSpan = 0;\n                for (const tableSlot of tableMap){\n                    const { column, row } = tableSlot;\n                    // As both newly created cells and the split cell might have rowspan,\n                    // the insertion of new cells must go to appropriate rows:\n                    //\n                    // 1. It's a row after split cell + it's height.\n                    const isAfterSplitCell = row >= splitCellRow + updatedSpan;\n                    // 2. Is on the same column.\n                    const isOnSameColumn = column === cellColumn;\n                    // Reset distance from the last cell span if we are on the same column and we exceeded the new cells span size.\n                    if (distanceFromLastCellSpan >= newCellsSpan && isOnSameColumn) {\n                        distanceFromLastCellSpan = 0;\n                    }\n                    if (isAfterSplitCell && isOnSameColumn) {\n                        // Create new cells only if the distance from the last cell span is equal or greater than the new cells span.\n                        if (!distanceFromLastCellSpan) {\n                            createCells(1, writer, tableSlot.getPositionBefore(), newCellsAttributes);\n                        }\n                        // Increase the distance from the last cell span.\n                        distanceFromLastCellSpan++;\n                    }\n                }\n            }\n            // Second check - the cell has rowspan of 1 or we need to create more cells than the current cell spans over.\n            if (rowspan < numberOfCells) {\n                // We already split the cell in check one so here we split to the remaining number of cells only.\n                const cellsToInsert = numberOfCells - rowspan;\n                // This check is needed since we need to check if there are any cells from previous rows than spans over this cell's row.\n                const tableMap = [\n                    ...new TableWalker(table, {\n                        startRow: 0,\n                        endRow: splitCellRow\n                    })\n                ];\n                // First step: expand cells.\n                for (const { cell, cellHeight, row } of tableMap){\n                    // Expand rowspan of cells that are either:\n                    // - on the same row as current cell,\n                    // - or are below split cell row and overlaps that row.\n                    if (cell !== tableCell && row + cellHeight > splitCellRow) {\n                        const rowspanToSet = cellHeight + cellsToInsert;\n                        writer.setAttribute('rowspan', rowspanToSet, cell);\n                    }\n                }\n                // Second step: create rows with single cell below split cell.\n                const newCellsAttributes = {};\n                // Copy colspan of split cell.\n                if (colspan > 1) {\n                    newCellsAttributes.colspan = colspan;\n                }\n                createEmptyRows(writer, table, splitCellRow + 1, cellsToInsert, 1, newCellsAttributes);\n                // Update heading section if split cell is in heading section.\n                const headingRows = table.getAttribute('headingRows') || 0;\n                if (headingRows > splitCellRow) {\n                    updateNumericAttribute('headingRows', headingRows + cellsToInsert, table, writer);\n                }\n            }\n        });\n    }\n    /**\n\t * Returns the number of columns for a given table.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).getColumns( table );\n\t * ```\n\t *\n\t * @param table The table to analyze.\n\t */ getColumns(table) {\n        // Analyze first row only as all the rows should have the same width.\n        // Using the first row without checking if it's a tableRow because we expect\n        // that table will have only tableRow model elements at the beginning.\n        const row = table.getChild(0);\n        return [\n            ...row.getChildren()\n        ]// $marker elements can also be children of a row too (when TrackChanges is on). Don't include them in the count.\n        .filter((node)=>node.is('element', 'tableCell')).reduce((columns, row)=>{\n            const columnWidth = parseInt(row.getAttribute('colspan') || '1');\n            return columns + columnWidth;\n        }, 0);\n    }\n    /**\n\t * Returns the number of rows for a given table. Any other element present in the table model is omitted.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'TableUtils' ).getRows( table );\n\t * ```\n\t *\n\t * @param table The table to analyze.\n\t */ getRows(table) {\n        // Rowspan not included due to #6427.\n        return Array.from(table.getChildren()).reduce((rowCount, child)=>child.is('element', 'tableRow') ? rowCount + 1 : rowCount, 0);\n    }\n    /**\n\t * Creates an instance of the table walker.\n\t *\n\t * The table walker iterates internally by traversing the table from row index = 0 and column index = 0.\n\t * It walks row by row and column by column in order to output values defined in the options.\n\t * By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,\n\t * pass the `includeAllSlots` option.\n\t *\n\t * @internal\n\t * @param table A table over which the walker iterates.\n\t * @param options An object with configuration.\n\t */ createTableWalker(table, options = {}) {\n        return new TableWalker(table, options);\n    }\n    /**\n\t * Returns all model table cells that are fully selected (from the outside)\n\t * within the provided model selection's ranges.\n\t *\n\t * To obtain the cells selected from the inside, use\n\t * {@link #getTableCellsContainingSelection}.\n\t */ getSelectedTableCells(selection) {\n        const cells = [];\n        for (const range of this.sortRanges(selection.getRanges())){\n            const element = range.getContainedElement();\n            if (element && element.is('element', 'tableCell')) {\n                cells.push(element);\n            }\n        }\n        return cells;\n    }\n    /**\n\t * Returns all model table cells that the provided model selection's ranges\n\t * {@link module:engine/model/range~Range#start} inside.\n\t *\n\t * To obtain the cells selected from the outside, use\n\t * {@link #getSelectedTableCells}.\n\t */ getTableCellsContainingSelection(selection) {\n        const cells = [];\n        for (const range of selection.getRanges()){\n            const cellWithSelection = range.start.findAncestor('tableCell');\n            if (cellWithSelection) {\n                cells.push(cellWithSelection);\n            }\n        }\n        return cells;\n    }\n    /**\n\t * Returns all model table cells that are either completely selected\n\t * by selection ranges or host selection range\n\t * {@link module:engine/model/range~Range#start start positions} inside them.\n\t *\n\t * Combines {@link #getTableCellsContainingSelection} and\n\t * {@link #getSelectedTableCells}.\n\t */ getSelectionAffectedTableCells(selection) {\n        const selectedCells = this.getSelectedTableCells(selection);\n        if (selectedCells.length) {\n            return selectedCells;\n        }\n        return this.getTableCellsContainingSelection(selection);\n    }\n    /**\n\t * Returns an object with the `first` and `last` row index contained in the given `tableCells`.\n\t *\n\t * ```ts\n\t * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );\n\t *\n\t * const { first, last } = getRowIndexes( selectedTableCells );\n\t *\n\t * console.log( `Selected rows: ${ first } to ${ last }` );\n\t * ```\n\t *\n\t * @returns Returns an object with the `first` and `last` table row indexes.\n\t */ getRowIndexes(tableCells) {\n        const indexes = tableCells.map((cell)=>cell.parent.index);\n        return this._getFirstLastIndexesObject(indexes);\n    }\n    /**\n\t * Returns an object with the `first` and `last` column index contained in the given `tableCells`.\n\t *\n\t * ```ts\n\t * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );\n\t *\n\t * const { first, last } = getColumnIndexes( selectedTableCells );\n\t *\n\t * console.log( `Selected columns: ${ first } to ${ last }` );\n\t * ```\n\t *\n\t * @returns Returns an object with the `first` and `last` table column indexes.\n\t */ getColumnIndexes(tableCells) {\n        const table = tableCells[0].findAncestor('table');\n        const tableMap = [\n            ...new TableWalker(table)\n        ];\n        const indexes = tableMap.filter((entry)=>tableCells.includes(entry.cell)).map((entry)=>entry.column);\n        return this._getFirstLastIndexesObject(indexes);\n    }\n    /**\n\t * Checks if the selection contains cells that do not exceed rectangular selection.\n\t *\n\t * In a table below:\n\t *\n\t *  ┌───┬───┬───┬───┐\n\t *  │ a │ b │ c │ d │\n\t *  ├───┴───┼───┤   │\n\t *  │ e     │ f │   │\n\t *  │       ├───┼───┤\n\t *  │       │ g │ h │\n\t *  └───────┴───┴───┘\n\t *\n\t * Valid selections are these which create a solid rectangle (without gaps), such as:\n\t *   - a, b (two horizontal cells)\n\t *   - c, f (two vertical cells)\n\t *   - a, b, e (cell \"e\" spans over four cells)\n\t *   - c, d, f (cell d spans over a cell in the row below)\n\t *\n\t * While an invalid selection would be:\n\t *   - a, c (the unselected cell \"b\" creates a gap)\n\t *   - f, g, h (cell \"d\" spans over a cell from the row of \"f\" cell - thus creates a gap)\n\t */ isSelectionRectangular(selectedTableCells) {\n        if (selectedTableCells.length < 2 || !this._areCellInTheSameTableSection(selectedTableCells)) {\n            return false;\n        }\n        // A valid selection is a fully occupied rectangle composed of table cells.\n        // Below we will calculate the area of a selected table cells and the area of valid selection.\n        // The area of a valid selection is defined by top-left and bottom-right cells.\n        const rows = new Set();\n        const columns = new Set();\n        let areaOfSelectedCells = 0;\n        for (const tableCell of selectedTableCells){\n            const { row, column } = this.getCellLocation(tableCell);\n            const rowspan = parseInt(tableCell.getAttribute('rowspan')) || 1;\n            const colspan = parseInt(tableCell.getAttribute('colspan')) || 1;\n            // Record row & column indexes of current cell.\n            rows.add(row);\n            columns.add(column);\n            // For cells that spans over multiple rows add also the last row that this cell spans over.\n            if (rowspan > 1) {\n                rows.add(row + rowspan - 1);\n            }\n            // For cells that spans over multiple columns add also the last column that this cell spans over.\n            if (colspan > 1) {\n                columns.add(column + colspan - 1);\n            }\n            areaOfSelectedCells += rowspan * colspan;\n        }\n        // We can only merge table cells that are in adjacent rows...\n        const areaOfValidSelection = getBiggestRectangleArea(rows, columns);\n        return areaOfValidSelection == areaOfSelectedCells;\n    }\n    /**\n\t * Returns array of sorted ranges.\n\t */ sortRanges(ranges) {\n        return Array.from(ranges).sort(compareRangeOrder);\n    }\n    /**\n\t * Helper method to get an object with `first` and `last` indexes from an unsorted array of indexes.\n\t */ _getFirstLastIndexesObject(indexes) {\n        const allIndexesSorted = indexes.sort((indexA, indexB)=>indexA - indexB);\n        const first = allIndexesSorted[0];\n        const last = allIndexesSorted[allIndexesSorted.length - 1];\n        return {\n            first,\n            last\n        };\n    }\n    /**\n\t * Checks if the selection does not mix a header (column or row) with other cells.\n\t *\n\t * For instance, in the table below valid selections consist of cells with the same letter only.\n\t * So, a-a (same heading row and column) or d-d (body cells) are valid while c-d or a-b are not.\n\t *\n\t * header columns\n\t *    ↓   ↓\n\t *  ┌───┬───┬───┬───┐\n\t *  │ a │ a │ b │ b │  ← header row\n\t *  ├───┼───┼───┼───┤\n\t *  │ c │ c │ d │ d │\n\t *  ├───┼───┼───┼───┤\n\t *  │ c │ c │ d │ d │\n\t *  └───┴───┴───┴───┘\n\t */ _areCellInTheSameTableSection(tableCells) {\n        const table = tableCells[0].findAncestor('table');\n        const rowIndexes = this.getRowIndexes(tableCells);\n        const headingRows = parseInt(table.getAttribute('headingRows')) || 0;\n        // Calculating row indexes is a bit cheaper so if this check fails we can't merge.\n        if (!this._areIndexesInSameSection(rowIndexes, headingRows)) {\n            return false;\n        }\n        const columnIndexes = this.getColumnIndexes(tableCells);\n        const headingColumns = parseInt(table.getAttribute('headingColumns')) || 0;\n        // Similarly cells must be in same column section.\n        return this._areIndexesInSameSection(columnIndexes, headingColumns);\n    }\n    /**\n\t * Unified check if table rows/columns indexes are in the same heading/body section.\n\t */ _areIndexesInSameSection({ first, last }, headingSectionSize) {\n        const firstCellIsInHeading = first < headingSectionSize;\n        const lastCellIsInHeading = last < headingSectionSize;\n        return firstCellIsInHeading === lastCellIsInHeading;\n    }\n}\n/**\n * Creates empty rows at the given index in an existing table.\n *\n * @param insertAt The row index of row insertion.\n * @param rows The number of rows to create.\n * @param tableCellToInsert The number of cells to insert in each row.\n */ function createEmptyRows(writer, table, insertAt, rows, tableCellToInsert, attributes = {}) {\n    for(let i = 0; i < rows; i++){\n        const tableRow = writer.createElement('tableRow');\n        writer.insert(tableRow, table, insertAt);\n        createCells(tableCellToInsert, writer, writer.createPositionAt(tableRow, 'end'), attributes);\n    }\n}\n/**\n * Creates cells at a given position.\n *\n * @param cells The number of cells to create\n */ function createCells(cells, writer, insertPosition, attributes = {}) {\n    for(let i = 0; i < cells; i++){\n        createEmptyTableCell(writer, insertPosition, attributes);\n    }\n}\n/**\n * Evenly distributes the span of a cell to a number of provided cells.\n * The resulting spans will always be integer values.\n *\n * For instance breaking a span of 7 into 3 cells will return:\n *\n * ```ts\n * { newCellsSpan: 2, updatedSpan: 3 }\n * ```\n *\n * as two cells will have a span of 2 and the remainder will go the first cell so its span will change to 3.\n *\n * @param span The span value do break.\n * @param numberOfCells The number of resulting spans.\n */ function breakSpanEvenly(span, numberOfCells) {\n    if (span < numberOfCells) {\n        return {\n            newCellsSpan: 1,\n            updatedSpan: 1\n        };\n    }\n    const newCellsSpan = Math.floor(span / numberOfCells);\n    const updatedSpan = span - newCellsSpan * numberOfCells + newCellsSpan;\n    return {\n        newCellsSpan,\n        updatedSpan\n    };\n}\n/**\n * Updates heading columns attribute if removing a row from head section.\n */ function adjustHeadingColumns(table, removedColumnIndexes, writer) {\n    const headingColumns = table.getAttribute('headingColumns') || 0;\n    if (headingColumns && removedColumnIndexes.first < headingColumns) {\n        const headingsRemoved = Math.min(headingColumns - 1 /* Other numbers are 0-based */ , removedColumnIndexes.last) - removedColumnIndexes.first + 1;\n        writer.setAttribute('headingColumns', headingColumns - headingsRemoved, table);\n    }\n}\n/**\n * Calculates a new heading rows value for removing rows from heading section.\n */ function updateHeadingRows(table, { first, last }, writer) {\n    const headingRows = table.getAttribute('headingRows') || 0;\n    if (first < headingRows) {\n        const newRows = last < headingRows ? headingRows - (last - first + 1) : first;\n        updateNumericAttribute('headingRows', newRows, table, writer, 0);\n    }\n}\n/**\n * Finds cells that will be:\n * - trimmed - Cells that are \"above\" removed rows sections and overlap the removed section - their rowspan must be trimmed.\n * - moved - Cells from removed rows section might stick out of. These cells are moved to the next row after a removed section.\n *\n * Sample table with overlapping & sticking out cells:\n *\n *      +----+----+----+----+----+\n *      | 00 | 01 | 02 | 03 | 04 |\n *      +----+    +    +    +    +\n *      | 10 |    |    |    |    |\n *      +----+----+    +    +    +\n *      | 20 | 21 |    |    |    | <-- removed row\n *      +    +    +----+    +    +\n *      |    |    | 32 |    |    | <-- removed row\n *      +----+    +    +----+    +\n *      | 40 |    |    | 43 |    |\n *      +----+----+----+----+----+\n *\n * In a table above:\n * - cells to trim: '02', '03' & '04'.\n * - cells to move: '21' & '32'.\n */ function getCellsToMoveAndTrimOnRemoveRow(table, { first, last }) {\n    const cellsToMove = new Map();\n    const cellsToTrim = [];\n    for (const { row, column, cellHeight, cell } of new TableWalker(table, {\n        endRow: last\n    })){\n        const lastRowOfCell = row + cellHeight - 1;\n        const isCellStickingOutFromRemovedRows = row >= first && row <= last && lastRowOfCell > last;\n        if (isCellStickingOutFromRemovedRows) {\n            const rowspanInRemovedSection = last - row + 1;\n            const rowSpanToSet = cellHeight - rowspanInRemovedSection;\n            cellsToMove.set(column, {\n                cell,\n                rowspan: rowSpanToSet\n            });\n        }\n        const isCellOverlappingRemovedRows = row < first && lastRowOfCell >= first;\n        if (isCellOverlappingRemovedRows) {\n            let rowspanAdjustment;\n            // Cell fully covers removed section - trim it by removed rows count.\n            if (lastRowOfCell >= last) {\n                rowspanAdjustment = last - first + 1;\n            } else {\n                rowspanAdjustment = lastRowOfCell - first + 1;\n            }\n            cellsToTrim.push({\n                cell,\n                rowspan: cellHeight - rowspanAdjustment\n            });\n        }\n    }\n    return {\n        cellsToMove,\n        cellsToTrim\n    };\n}\nfunction moveCellsToRow(table, targetRowIndex, cellsToMove, writer) {\n    const tableWalker = new TableWalker(table, {\n        includeAllSlots: true,\n        row: targetRowIndex\n    });\n    const tableRowMap = [\n        ...tableWalker\n    ];\n    const row = table.getChild(targetRowIndex);\n    let previousCell;\n    for (const { column, cell, isAnchor } of tableRowMap){\n        if (cellsToMove.has(column)) {\n            const { cell: cellToMove, rowspan } = cellsToMove.get(column);\n            const targetPosition = previousCell ? writer.createPositionAfter(previousCell) : writer.createPositionAt(row, 0);\n            writer.move(writer.createRangeOn(cellToMove), targetPosition);\n            updateNumericAttribute('rowspan', rowspan, cellToMove, writer);\n            previousCell = cellToMove;\n        } else if (isAnchor) {\n            // If cell is spanned then `cell` holds reference to overlapping cell. See ckeditor/ckeditor5#6502.\n            previousCell = cell;\n        }\n    }\n}\nfunction compareRangeOrder(rangeA, rangeB) {\n    // Since table cell ranges are disjoint, it's enough to check their start positions.\n    const posA = rangeA.start;\n    const posB = rangeB.start;\n    // Checking for equal position (returning 0) is not needed because this would be either:\n    // a. Intersecting range (not allowed by model)\n    // b. Collapsed range on the same position (allowed by model but should not happen).\n    return posA.isBefore(posB) ? -1 : 1;\n}\n/**\n * Calculates the area of a maximum rectangle that can span over the provided row & column indexes.\n */ function getBiggestRectangleArea(rows, columns) {\n    const rowsIndexes = Array.from(rows.values());\n    const columnIndexes = Array.from(columns.values());\n    const lastRow = Math.max(...rowsIndexes);\n    const firstRow = Math.min(...rowsIndexes);\n    const lastColumn = Math.max(...columnIndexes);\n    const firstColumn = Math.min(...columnIndexes);\n    return (lastRow - firstRow + 1) * (lastColumn - firstColumn + 1);\n}\n\n/**\n * The merge cells command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'mergeTableCells'` editor command.\n *\n * For example, to merge selected table cells:\n *\n * ```ts\n * editor.execute( 'mergeTableCells' );\n * ```\n */ class MergeCellsCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const selectedTableCells = tableUtils.getSelectedTableCells(this.editor.model.document.selection);\n        this.isEnabled = tableUtils.isSelectionRectangular(selectedTableCells);\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t */ execute() {\n        const model = this.editor.model;\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        model.change((writer)=>{\n            const selectedTableCells = tableUtils.getSelectedTableCells(model.document.selection);\n            // All cells will be merged into the first one.\n            const firstTableCell = selectedTableCells.shift();\n            // Update target cell dimensions.\n            const { mergeWidth, mergeHeight } = getMergeDimensions(firstTableCell, selectedTableCells, tableUtils);\n            updateNumericAttribute('colspan', mergeWidth, firstTableCell, writer);\n            updateNumericAttribute('rowspan', mergeHeight, firstTableCell, writer);\n            for (const tableCell of selectedTableCells){\n                mergeTableCells(tableCell, firstTableCell, writer);\n            }\n            const table = firstTableCell.findAncestor('table');\n            // Remove rows and columns that become empty (have no anchored cells).\n            removeEmptyRowsColumns(table, tableUtils);\n            writer.setSelection(firstTableCell, 'in');\n        });\n    }\n}\n/**\n *  Merges two table cells. It will ensure that after merging cells with empty paragraphs the resulting table cell will only have one\n * paragraph. If one of the merged table cells is empty, the merged table cell will have contents of the non-empty table cell.\n * If both are empty, the merged table cell will have only one empty paragraph.\n */ function mergeTableCells(cellBeingMerged, targetCell, writer) {\n    if (!isEmpty$1(cellBeingMerged)) {\n        if (isEmpty$1(targetCell)) {\n            writer.remove(writer.createRangeIn(targetCell));\n        }\n        writer.move(writer.createRangeIn(cellBeingMerged), writer.createPositionAt(targetCell, 'end'));\n    }\n    // Remove merged table cell.\n    writer.remove(cellBeingMerged);\n}\n/**\n * Checks if the passed table cell contains an empty paragraph.\n */ function isEmpty$1(tableCell) {\n    const firstTableChild = tableCell.getChild(0);\n    return tableCell.childCount == 1 && firstTableChild.is('element', 'paragraph') && firstTableChild.isEmpty;\n}\nfunction getMergeDimensions(firstTableCell, selectedTableCells, tableUtils) {\n    let maxWidthOffset = 0;\n    let maxHeightOffset = 0;\n    for (const tableCell of selectedTableCells){\n        const { row, column } = tableUtils.getCellLocation(tableCell);\n        maxWidthOffset = getMaxOffset(tableCell, column, maxWidthOffset, 'colspan');\n        maxHeightOffset = getMaxOffset(tableCell, row, maxHeightOffset, 'rowspan');\n    }\n    // Update table cell span attribute and merge set selection on a merged contents.\n    const { row: firstCellRow, column: firstCellColumn } = tableUtils.getCellLocation(firstTableCell);\n    const mergeWidth = maxWidthOffset - firstCellColumn;\n    const mergeHeight = maxHeightOffset - firstCellRow;\n    return {\n        mergeWidth,\n        mergeHeight\n    };\n}\nfunction getMaxOffset(tableCell, start, currentMaxOffset, which) {\n    const dimensionValue = parseInt(tableCell.getAttribute(which) || '1');\n    return Math.max(currentMaxOffset, start + dimensionValue);\n}\n\n/**\n * The select row command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'selectTableRow'` editor command.\n *\n * To select the rows containing the selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'selectTableRow' );\n * ```\n */ class SelectRowCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // It does not affect data so should be enabled in read-only mode.\n        this.affectsData = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n        this.isEnabled = selectedCells.length > 0;\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const model = this.editor.model;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const referenceCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const rowIndexes = tableUtils.getRowIndexes(referenceCells);\n        const table = referenceCells[0].findAncestor('table');\n        const rangesToSelect = [];\n        for(let rowIndex = rowIndexes.first; rowIndex <= rowIndexes.last; rowIndex++){\n            for (const cell of table.getChild(rowIndex).getChildren()){\n                rangesToSelect.push(model.createRangeOn(cell));\n            }\n        }\n        model.change((writer)=>{\n            writer.setSelection(rangesToSelect);\n        });\n    }\n}\n\n/**\n * The select column command.\n *\n * The command is registered by {@link module:table/tableediting~TableEditing} as the `'selectTableColumn'` editor command.\n *\n * To select the columns containing the selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'selectTableColumn' );\n * ```\n */ class SelectColumnCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        // It does not affect data so should be enabled in read-only mode.\n        this.affectsData = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const selectedCells = tableUtils.getSelectionAffectedTableCells(this.editor.model.document.selection);\n        this.isEnabled = selectedCells.length > 0;\n    }\n    /**\n\t * @inheritDoc\n\t */ execute() {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const model = this.editor.model;\n        const referenceCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const firstCell = referenceCells[0];\n        const lastCell = referenceCells.pop();\n        const table = firstCell.findAncestor('table');\n        const startLocation = tableUtils.getCellLocation(firstCell);\n        const endLocation = tableUtils.getCellLocation(lastCell);\n        const startColumn = Math.min(startLocation.column, endLocation.column);\n        const endColumn = Math.max(startLocation.column, endLocation.column);\n        const rangesToSelect = [];\n        for (const cellInfo of new TableWalker(table, {\n            startColumn,\n            endColumn\n        })){\n            rangesToSelect.push(model.createRangeOn(cellInfo.cell));\n        }\n        model.change((writer)=>{\n            writer.setSelection(rangesToSelect);\n        });\n    }\n}\n\n/**\n * Injects a table layout post-fixer into the model.\n *\n * The role of the table layout post-fixer is to ensure that the table rows have the correct structure\n * after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n *\n * The correct structure means that:\n *\n * * All table rows have the same size.\n * * None of the table cells extend vertically beyond their section (either header or body).\n * * A table cell has always at least one element as a child.\n *\n * If the table structure is not correct, the post-fixer will automatically correct it in two steps:\n *\n * 1. It will clip table cells that extend beyond their section.\n * 2. It will add empty table cells to the rows that are narrower than the widest table row.\n *\n * ## Clipping overlapping table cells\n *\n * Such situation may occur when pasting a table (or a part of a table) to the editor from external sources.\n *\n * For example, see the following table which has a cell (FOO) with the rowspan attribute (2):\n *\n * ```xml\n * <table headingRows=\"1\">\n *   <tableRow>\n *     <tableCell rowspan=\"2\"><paragraph>FOO</paragraph></tableCell>\n *     <tableCell colspan=\"2\"><paragraph>BAR</paragraph></tableCell>\n *   </tableRow>\n *   <tableRow>\n *     <tableCell><paragraph>BAZ</paragraph></tableCell>\n *     <tableCell><paragraph>XYZ</paragraph></tableCell>\n *   </tableRow>\n * </table>\n * ```\n *\n * It will be rendered in the view as:\n *\n * ```xml\n * <table>\n *   <thead>\n *     <tr>\n *       <td rowspan=\"2\">FOO</td>\n *       <td colspan=\"2\">BAR</td>\n *     </tr>\n *   </thead>\n *   <tbody>\n *     <tr>\n *       <td>BAZ</td>\n *       <td>XYZ</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * In the above example the table will be rendered as a table with two rows: one in the header and second one in the body.\n * The table cell (FOO) cannot span over multiple rows as it would extend from the header to the body section.\n * The `rowspan` attribute must be changed to (1). The value (1) is the default value of the `rowspan` attribute\n * so the `rowspan` attribute will be removed from the model.\n *\n * The table cell with BAZ in the content will be in the first column of the table.\n *\n * ## Adding missing table cells\n *\n * The table post-fixer will insert empty table cells to equalize table row sizes (the number of columns).\n * The size of a table row is calculated by counting column spans of table cells, both horizontal (from the same row) and\n * vertical (from the rows above).\n *\n * In the above example, the table row in the body section of the table is narrower then the row from the header: it has two cells\n * with the default colspan (1). The header row has one cell with colspan (1) and the second with colspan (2).\n * The table cell (FOO) does not extend beyond the head section (and as such will be fixed in the first step of this post-fixer).\n * The post-fixer will add a missing table cell to the row in the body section of the table.\n *\n * The table from the above example will be fixed and rendered to the view as below:\n *\n * ```xml\n * <table>\n *   <thead>\n *     <tr>\n *       <td rowspan=\"2\">FOO</td>\n *       <td colspan=\"2\">BAR</td>\n *     </tr>\n *   </thead>\n *   <tbody>\n *     <tr>\n *       <td>BAZ</td>\n *       <td>XYZ</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * ## Collaboration and undo - Expectations vs post-fixer results\n *\n * The table post-fixer only ensures proper structure without a deeper analysis of the nature of the change. As such, it might lead\n * to a structure which was not intended by the user. In particular, it will also fix undo steps (in conjunction with collaboration)\n * in which the editor content might not return to the original state.\n *\n * This will usually happen when one or more users change the size of the table.\n *\n * As an example see the table below:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * and the user actions:\n *\n * 1. Both users have a table with two rows and two columns.\n * 2. User A adds a column at the end of the table. This will insert empty table cells to two rows.\n * 3. User B adds a row at the end of the table. This will insert a row with two empty table cells.\n * 4. Both users will have a table as below:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * The last row is shorter then others so the table post-fixer will add an empty row to the last row:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *       <td>(empty, inserted by A)</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by the post-fixer)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * Unfortunately undo does not know the nature of the changes and depending on which user applies the post-fixer changes, undoing them\n * might lead to a broken table. If User B undoes inserting the column to the table, the undo engine will undo only the operations of\n * inserting empty cells to rows from the initial table state (row 1 and 2) but the cell in the post-fixed row will remain:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by a post-fixer)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n *\n * After undo, the table post-fixer will detect that two rows are shorter than others and will fix the table to:\n *\n * ```xml\n * <table>\n *   <tbody>\n *     <tr>\n *       <td>11</td>\n *       <td>12</td>\n *       <td>(empty, inserted by a post-fixer after undo)</td>\n *     </tr>\n *     <tr>\n *       <td>21</td>\n *       <td>22</td>\n *       <td>(empty, inserted by a post-fixer after undo)</td>\n *     </tr>\n *     <tr>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by B)</td>\n *       <td>(empty, inserted by a post-fixer)</td>\n *     </tr>\n *   </tbody>\n * </table>\n * ```\n */ function injectTableLayoutPostFixer(model) {\n    model.document.registerPostFixer((writer)=>tableLayoutPostFixer(writer, model));\n}\n/**\n * The table layout post-fixer.\n */ function tableLayoutPostFixer(writer, model) {\n    const changes = model.document.differ.getChanges();\n    let wasFixed = false;\n    // Do not analyze the same table more then once - may happen for multiple changes in the same table.\n    const analyzedTables = new Set();\n    for (const entry of changes){\n        let table = null;\n        if (entry.type == 'insert' && entry.name == 'table') {\n            table = entry.position.nodeAfter;\n        }\n        // Fix table on adding/removing table cells and rows.\n        if ((entry.type == 'insert' || entry.type == 'remove') && (entry.name == 'tableRow' || entry.name == 'tableCell')) {\n            table = entry.position.findAncestor('table');\n        }\n        // Fix table on any table's attribute change - including attributes of table cells.\n        if (isTableAttributeEntry(entry)) {\n            table = entry.range.start.findAncestor('table');\n        }\n        if (table && !analyzedTables.has(table)) {\n            // Step 1: correct rowspans of table cells if necessary.\n            // The wasFixed flag should be true if any of tables in batch was fixed - might be more then one.\n            wasFixed = fixTableCellsRowspan(table, writer) || wasFixed;\n            // Step 2: fix table rows sizes.\n            wasFixed = fixTableRowsSizes(table, writer) || wasFixed;\n            analyzedTables.add(table);\n        }\n    }\n    return wasFixed;\n}\n/**\n * Fixes the invalid value of the `rowspan` attribute because a table cell cannot vertically extend beyond the table section it belongs to.\n *\n * @returns Returns `true` if the table was fixed.\n */ function fixTableCellsRowspan(table, writer) {\n    let wasFixed = false;\n    const cellsToTrim = findCellsToTrim(table);\n    if (cellsToTrim.length) {\n        // @if CK_DEBUG_TABLE // console.log( `Post-fixing table: trimming cells row-spans (${ cellsToTrim.length }).` );\n        wasFixed = true;\n        for (const data of cellsToTrim){\n            updateNumericAttribute('rowspan', data.rowspan, data.cell, writer, 1);\n        }\n    }\n    return wasFixed;\n}\n/**\n * Makes all table rows in a table the same size.\n *\n * @returns Returns `true` if the table was fixed.\n */ function fixTableRowsSizes(table, writer) {\n    let wasFixed = false;\n    const childrenLengths = getChildrenLengths(table);\n    const rowsToRemove = [];\n    // Find empty rows.\n    for (const [rowIndex, size] of childrenLengths.entries()){\n        // Ignore all non-row models.\n        if (!size && table.getChild(rowIndex).is('element', 'tableRow')) {\n            rowsToRemove.push(rowIndex);\n        }\n    }\n    // Remove empty rows.\n    if (rowsToRemove.length) {\n        // @if CK_DEBUG_TABLE // console.log( `Post-fixing table: remove empty rows (${ rowsToRemove.length }).` );\n        wasFixed = true;\n        for (const rowIndex of rowsToRemove.reverse()){\n            writer.remove(table.getChild(rowIndex));\n            childrenLengths.splice(rowIndex, 1);\n        }\n    }\n    // Filter out everything that's not a table row.\n    const rowsLengths = childrenLengths.filter((row, rowIndex)=>table.getChild(rowIndex).is('element', 'tableRow'));\n    // Verify if all the rows have the same number of columns.\n    const tableSize = rowsLengths[0];\n    const isValid = rowsLengths.every((length)=>length === tableSize);\n    if (!isValid) {\n        // @if CK_DEBUG_TABLE // console.log( 'Post-fixing table: adding missing cells.' );\n        // Find the maximum number of columns.\n        const maxColumns = rowsLengths.reduce((prev, current)=>current > prev ? current : prev, 0);\n        for (const [rowIndex, size] of rowsLengths.entries()){\n            const columnsToInsert = maxColumns - size;\n            if (columnsToInsert) {\n                for(let i = 0; i < columnsToInsert; i++){\n                    createEmptyTableCell(writer, writer.createPositionAt(table.getChild(rowIndex), 'end'));\n                }\n                wasFixed = true;\n            }\n        }\n    }\n    return wasFixed;\n}\n/**\n * Searches for table cells that extend beyond the table section to which they belong to. It will return an array of objects\n * that stores table cells to be trimmed and the correct value of the `rowspan` attribute to set.\n */ function findCellsToTrim(table) {\n    const headingRows = parseInt(table.getAttribute('headingRows') || '0');\n    const maxRows = Array.from(table.getChildren()).reduce((count, row)=>row.is('element', 'tableRow') ? count + 1 : count, 0);\n    const cellsToTrim = [];\n    for (const { row, cell, cellHeight } of new TableWalker(table)){\n        // Skip cells that do not expand over its row.\n        if (cellHeight < 2) {\n            continue;\n        }\n        const isInHeader = row < headingRows;\n        // Row limit is either end of header section or whole table as table body is after the header.\n        const rowLimit = isInHeader ? headingRows : maxRows;\n        // If table cell expands over its limit reduce it height to proper value.\n        if (row + cellHeight > rowLimit) {\n            const newRowspan = rowLimit - row;\n            cellsToTrim.push({\n                cell,\n                rowspan: newRowspan\n            });\n        }\n    }\n    return cellsToTrim;\n}\n/**\n * Returns an array with lengths of rows assigned to the corresponding row index.\n */ function getChildrenLengths(table) {\n    // TableWalker will not provide items for the empty rows, we need to pre-fill this array.\n    const lengths = new Array(table.childCount).fill(0);\n    for (const { rowIndex } of new TableWalker(table, {\n        includeAllSlots: true\n    })){\n        lengths[rowIndex]++;\n    }\n    return lengths;\n}\n/**\n * Checks if the differ entry for an attribute change is one of the table's attributes.\n */ function isTableAttributeEntry(entry) {\n    if (entry.type !== 'attribute') {\n        return false;\n    }\n    const key = entry.attributeKey;\n    return key === 'headingRows' || key === 'colspan' || key === 'rowspan';\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module table/converters/table-cell-paragraph-post-fixer\n */ /**\n * Injects a table cell post-fixer into the model which inserts a `paragraph` element into empty table cells.\n *\n * A table cell must contain at least one block element as a child. An empty table cell will have an empty `paragraph` as a child.\n *\n * ```xml\n * <table>\n *   <tableRow>\n *      <tableCell></tableCell>\n *   </tableRow>\n * </table>\n * ```\n *\n * Will be fixed to:\n *\n * ```xml\n * <table>\n *   <tableRow>\n *      <tableCell><paragraph></paragraph></tableCell>\n *   </tableRow>\n * </table>\n * ```\n */ function injectTableCellParagraphPostFixer(model) {\n    model.document.registerPostFixer((writer)=>tableCellContentsPostFixer(writer, model));\n}\n/**\n * The table cell contents post-fixer.\n */ function tableCellContentsPostFixer(writer, model) {\n    const changes = model.document.differ.getChanges();\n    let wasFixed = false;\n    for (const entry of changes){\n        if (entry.type == 'insert' && entry.name == 'table') {\n            wasFixed = fixTable(entry.position.nodeAfter, writer) || wasFixed;\n        }\n        if (entry.type == 'insert' && entry.name == 'tableRow') {\n            wasFixed = fixTableRow(entry.position.nodeAfter, writer) || wasFixed;\n        }\n        if (entry.type == 'insert' && entry.name == 'tableCell') {\n            wasFixed = fixTableCellContent(entry.position.nodeAfter, writer) || wasFixed;\n        }\n        if ((entry.type == 'remove' || entry.type == 'insert') && checkTableCellChange(entry)) {\n            wasFixed = fixTableCellContent(entry.position.parent, writer) || wasFixed;\n        }\n    }\n    return wasFixed;\n}\n/**\n * Fixes all table cells in a table.\n */ function fixTable(table, writer) {\n    let wasFixed = false;\n    for (const row of table.getChildren()){\n        if (row.is('element', 'tableRow')) {\n            wasFixed = fixTableRow(row, writer) || wasFixed;\n        }\n    }\n    return wasFixed;\n}\n/**\n * Fixes all table cells in a table row.\n */ function fixTableRow(tableRow, writer) {\n    let wasFixed = false;\n    for (const tableCell of tableRow.getChildren()){\n        wasFixed = fixTableCellContent(tableCell, writer) || wasFixed;\n    }\n    return wasFixed;\n}\n/**\n * Fixes all table cell content by:\n * - Adding a paragraph to a table cell without any child.\n * - Wrapping direct $text in a `<paragraph>`.\n */ function fixTableCellContent(tableCell, writer) {\n    // Insert paragraph to an empty table cell.\n    if (tableCell.childCount == 0) {\n        // @if CK_DEBUG_TABLE // console.log( 'Post-fixing table: insert paragraph in empty cell.' );\n        writer.insertElement('paragraph', tableCell);\n        return true;\n    }\n    // Check table cell children for directly placed text nodes.\n    // Temporary solution. See https://github.com/ckeditor/ckeditor5/issues/1464.\n    const textNodes = Array.from(tableCell.getChildren()).filter((child)=>child.is('$text'));\n    // @if CK_DEBUG_TABLE // textNodes.length && console.log( 'Post-fixing table: wrap cell content with paragraph.' );\n    for (const child of textNodes){\n        writer.wrap(writer.createRangeOn(child), 'paragraph');\n    }\n    // Return true when there were text nodes to fix.\n    return !!textNodes.length;\n}\n/**\n * Checks if a differ change should fix the table cell. This happens on:\n * - Removing content from the table cell (i.e. `tableCell` can be left empty).\n * - Adding a text node directly into a table cell.\n */ function checkTableCellChange(entry) {\n    if (!entry.position.parent.is('element', 'tableCell')) {\n        return false;\n    }\n    return entry.type == 'insert' && entry.name == '$text' || entry.type == 'remove';\n}\n\n/**\n * A table headings refresh handler which marks the table cells or rows in the differ to have it re-rendered\n * if the headings attribute changed.\n *\n * Table heading rows and heading columns are represented in the model by a `headingRows` and `headingColumns` attributes.\n *\n * When table headings attribute changes, all the cells/rows are marked to re-render to change between `<td>` and `<th>`.\n */ function tableHeadingsRefreshHandler(model, editing) {\n    const differ = model.document.differ;\n    for (const change of differ.getChanges()){\n        let table;\n        let isRowChange = false;\n        if (change.type == 'attribute') {\n            const element = change.range.start.nodeAfter;\n            if (!element || !element.is('element', 'table')) {\n                continue;\n            }\n            if (change.attributeKey != 'headingRows' && change.attributeKey != 'headingColumns') {\n                continue;\n            }\n            table = element;\n            isRowChange = change.attributeKey == 'headingRows';\n        } else if (change.name == 'tableRow' || change.name == 'tableCell') {\n            table = change.position.findAncestor('table');\n            isRowChange = change.name == 'tableRow';\n        }\n        if (!table) {\n            continue;\n        }\n        const headingRows = table.getAttribute('headingRows') || 0;\n        const headingColumns = table.getAttribute('headingColumns') || 0;\n        const tableWalker = new TableWalker(table);\n        for (const tableSlot of tableWalker){\n            const isHeading = tableSlot.row < headingRows || tableSlot.column < headingColumns;\n            const expectedElementName = isHeading ? 'th' : 'td';\n            const viewElement = editing.mapper.toViewElement(tableSlot.cell);\n            if (viewElement && viewElement.is('element') && viewElement.name != expectedElementName) {\n                editing.reconvertItem(isRowChange ? tableSlot.cell.parent : tableSlot.cell);\n            }\n        }\n    }\n}\n\n/**\n * A table cell refresh handler which marks the table cell in the differ to have it re-rendered.\n *\n * Model `paragraph` inside a table cell can be rendered as `<span>` or `<p>`. It is rendered as `<span>` if this is the only block\n * element in that table cell and it does not have any attributes. It is rendered as `<p>` otherwise.\n *\n * When table cell content changes, for example a second `paragraph` element is added, we need to ensure that the first `paragraph` is\n * re-rendered so it changes from `<span>` to `<p>`. The easiest way to do it is to re-render the entire table cell.\n */ function tableCellRefreshHandler(model, editing) {\n    const differ = model.document.differ;\n    // Stores cells to be refreshed, so the table cell will be refreshed once for multiple changes.\n    const cellsToCheck = new Set();\n    for (const change of differ.getChanges()){\n        const parent = change.type == 'attribute' ? change.range.start.parent : change.position.parent;\n        if (parent.is('element', 'tableCell')) {\n            cellsToCheck.add(parent);\n        }\n    }\n    for (const tableCell of cellsToCheck.values()){\n        const paragraphsToRefresh = Array.from(tableCell.getChildren()).filter((child)=>shouldRefresh(child, editing.mapper));\n        for (const paragraph of paragraphsToRefresh){\n            editing.reconvertItem(paragraph);\n        }\n    }\n}\n/**\n * Check if given model element needs refreshing.\n */ function shouldRefresh(child, mapper) {\n    if (!child.is('element', 'paragraph')) {\n        return false;\n    }\n    const viewElement = mapper.toViewElement(child);\n    if (!viewElement) {\n        return false;\n    }\n    return isSingleParagraphWithoutAttributes(child) !== viewElement.is('element', 'span');\n}\n\n/**\n * The table editing feature.\n */ class TableEditing extends Plugin {\n    /**\n\t * Handlers for creating additional slots in the table.\n\t */ _additionalSlots;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._additionalSlots = [];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const schema = model.schema;\n        const conversion = editor.conversion;\n        const tableUtils = editor.plugins.get(TableUtils);\n        schema.register('table', {\n            inheritAllFrom: '$blockObject',\n            allowAttributes: [\n                'headingRows',\n                'headingColumns'\n            ]\n        });\n        schema.register('tableRow', {\n            allowIn: 'table',\n            isLimit: true\n        });\n        schema.register('tableCell', {\n            allowContentOf: '$container',\n            allowIn: 'tableRow',\n            allowAttributes: [\n                'colspan',\n                'rowspan'\n            ],\n            isLimit: true,\n            isSelectable: true\n        });\n        // Figure conversion.\n        conversion.for('upcast').add(upcastTableFigure());\n        // Table conversion.\n        conversion.for('upcast').add(upcastTable());\n        conversion.for('editingDowncast').elementToStructure({\n            model: {\n                name: 'table',\n                attributes: [\n                    'headingRows'\n                ]\n            },\n            view: downcastTable(tableUtils, {\n                asWidget: true,\n                additionalSlots: this._additionalSlots\n            })\n        });\n        conversion.for('dataDowncast').elementToStructure({\n            model: {\n                name: 'table',\n                attributes: [\n                    'headingRows'\n                ]\n            },\n            view: downcastTable(tableUtils, {\n                additionalSlots: this._additionalSlots\n            })\n        });\n        // Table row conversion.\n        conversion.for('upcast').elementToElement({\n            model: 'tableRow',\n            view: 'tr'\n        });\n        conversion.for('upcast').add(skipEmptyTableRow());\n        conversion.for('downcast').elementToElement({\n            model: 'tableRow',\n            view: downcastRow()\n        });\n        // Table cell conversion.\n        conversion.for('upcast').elementToElement({\n            model: 'tableCell',\n            view: 'td'\n        });\n        conversion.for('upcast').elementToElement({\n            model: 'tableCell',\n            view: 'th'\n        });\n        conversion.for('upcast').add(ensureParagraphInTableCell('td'));\n        conversion.for('upcast').add(ensureParagraphInTableCell('th'));\n        conversion.for('editingDowncast').elementToElement({\n            model: 'tableCell',\n            view: downcastCell({\n                asWidget: true\n            })\n        });\n        conversion.for('dataDowncast').elementToElement({\n            model: 'tableCell',\n            view: downcastCell()\n        });\n        // Duplicates code - needed to properly refresh paragraph inside a table cell.\n        conversion.for('editingDowncast').elementToElement({\n            model: 'paragraph',\n            view: convertParagraphInTableCell({\n                asWidget: true\n            }),\n            converterPriority: 'high'\n        });\n        conversion.for('dataDowncast').elementToElement({\n            model: 'paragraph',\n            view: convertParagraphInTableCell(),\n            converterPriority: 'high'\n        });\n        // Table attributes conversion.\n        conversion.for('downcast').attributeToAttribute({\n            model: 'colspan',\n            view: 'colspan'\n        });\n        conversion.for('upcast').attributeToAttribute({\n            model: {\n                key: 'colspan',\n                value: upcastCellSpan('colspan')\n            },\n            view: 'colspan'\n        });\n        conversion.for('downcast').attributeToAttribute({\n            model: 'rowspan',\n            view: 'rowspan'\n        });\n        conversion.for('upcast').attributeToAttribute({\n            model: {\n                key: 'rowspan',\n                value: upcastCellSpan('rowspan')\n            },\n            view: 'rowspan'\n        });\n        // Define the config.\n        editor.config.define('table.defaultHeadings.rows', 0);\n        editor.config.define('table.defaultHeadings.columns', 0);\n        // Define all the commands.\n        editor.commands.add('insertTable', new InsertTableCommand(editor));\n        editor.commands.add('insertTableRowAbove', new InsertRowCommand(editor, {\n            order: 'above'\n        }));\n        editor.commands.add('insertTableRowBelow', new InsertRowCommand(editor, {\n            order: 'below'\n        }));\n        editor.commands.add('insertTableColumnLeft', new InsertColumnCommand(editor, {\n            order: 'left'\n        }));\n        editor.commands.add('insertTableColumnRight', new InsertColumnCommand(editor, {\n            order: 'right'\n        }));\n        editor.commands.add('removeTableRow', new RemoveRowCommand(editor));\n        editor.commands.add('removeTableColumn', new RemoveColumnCommand(editor));\n        editor.commands.add('splitTableCellVertically', new SplitCellCommand(editor, {\n            direction: 'vertically'\n        }));\n        editor.commands.add('splitTableCellHorizontally', new SplitCellCommand(editor, {\n            direction: 'horizontally'\n        }));\n        editor.commands.add('mergeTableCells', new MergeCellsCommand(editor));\n        editor.commands.add('mergeTableCellRight', new MergeCellCommand(editor, {\n            direction: 'right'\n        }));\n        editor.commands.add('mergeTableCellLeft', new MergeCellCommand(editor, {\n            direction: 'left'\n        }));\n        editor.commands.add('mergeTableCellDown', new MergeCellCommand(editor, {\n            direction: 'down'\n        }));\n        editor.commands.add('mergeTableCellUp', new MergeCellCommand(editor, {\n            direction: 'up'\n        }));\n        editor.commands.add('setTableColumnHeader', new SetHeaderColumnCommand(editor));\n        editor.commands.add('setTableRowHeader', new SetHeaderRowCommand(editor));\n        editor.commands.add('selectTableRow', new SelectRowCommand(editor));\n        editor.commands.add('selectTableColumn', new SelectColumnCommand(editor));\n        injectTableLayoutPostFixer(model);\n        injectTableCellParagraphPostFixer(model);\n        this.listenTo(model.document, 'change:data', ()=>{\n            tableHeadingsRefreshHandler(model, editor.editing);\n            tableCellRefreshHandler(model, editor.editing);\n        });\n    }\n    /**\n\t * Registers downcast handler for the additional table slot.\n\t */ registerAdditionalSlot(slotHandler) {\n        this._additionalSlots.push(slotHandler);\n    }\n}\n/**\n * Returns fixed colspan and rowspan attrbutes values.\n *\n * @param type colspan or rowspan.\n * @returns conversion value function.\n */ function upcastCellSpan(type) {\n    return (cell)=>{\n        const span = parseInt(cell.getAttribute(type));\n        if (Number.isNaN(span) || span <= 0) {\n            return null;\n        }\n        return span;\n    };\n}\n\n/**\n * The table size view.\n *\n * It renders a 10x10 grid to choose the inserted table size.\n */ class InsertTableView extends View {\n    /**\n\t * A collection of table size box items.\n\t */ items;\n    /**\n\t * Listen to `keydown` events fired in this view's main element.\n\t */ keystrokes;\n    /**\n\t * Tracks information about the DOM focus in the grid.\n\t */ focusTracker;\n    /**\n\t * @inheritDoc\n\t */ constructor(locale){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.items = this._createGridCollection();\n        this.keystrokes = new KeystrokeHandler();\n        this.focusTracker = new FocusTracker();\n        this.set('rows', 0);\n        this.set('columns', 0);\n        this.bind('label').to(this, 'columns', this, 'rows', (columns, rows)=>`${rows} × ${columns}`);\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck'\n                ]\n            },\n            children: [\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck-insert-table-dropdown__grid'\n                        ]\n                    },\n                    on: {\n                        'mouseover@.ck-insert-table-dropdown-grid-box': bind.to('boxover')\n                    },\n                    children: this.items\n                },\n                {\n                    tag: 'div',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-insert-table-dropdown__label'\n                        ],\n                        'aria-hidden': true\n                    },\n                    children: [\n                        {\n                            text: bind.to('label')\n                        }\n                    ]\n                }\n            ],\n            on: {\n                mousedown: bind.to((evt)=>{\n                    evt.preventDefault();\n                }),\n                click: bind.to(()=>{\n                    this.fire('execute');\n                })\n            }\n        });\n        // #rows and #columns are set via changes to #focusTracker on mouse over.\n        this.on('boxover', (evt, domEvt)=>{\n            const { row, column } = domEvt.target.dataset;\n            this.items.get((parseInt(row, 10) - 1) * 10 + (parseInt(column, 10) - 1)).focus();\n        });\n        // This allows the #rows and #columns to be updated when:\n        // * the user navigates the grid using the keyboard,\n        // * the user moves the mouse over grid items.\n        this.focusTracker.on('change:focusedElement', (evt, name, focusedElement)=>{\n            if (!focusedElement) {\n                return;\n            }\n            const { row, column } = focusedElement.dataset;\n            // As row & column indexes are zero-based transform it to number of selected rows & columns.\n            this.set({\n                rows: parseInt(row),\n                columns: parseInt(column)\n            });\n        });\n        this.on('change:columns', ()=>this._highlightGridBoxes());\n        this.on('change:rows', ()=>this._highlightGridBoxes());\n    }\n    render() {\n        super.render();\n        addKeyboardHandlingForGrid({\n            keystrokeHandler: this.keystrokes,\n            focusTracker: this.focusTracker,\n            gridItems: this.items,\n            numberOfColumns: 10,\n            uiLanguageDirection: this.locale && this.locale.uiLanguageDirection\n        });\n        for (const item of this.items){\n            this.focusTracker.add(item.element);\n        }\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * Resets the rows and columns selection.\n\t */ reset() {\n        this.set({\n            rows: 1,\n            columns: 1\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ focus() {\n        this.items.get(0).focus();\n    }\n    /**\n\t * @inheritDoc\n\t */ focusLast() {\n        this.items.get(0).focus();\n    }\n    /**\n\t * Highlights grid boxes depending on rows and columns selected.\n\t */ _highlightGridBoxes() {\n        const rows = this.rows;\n        const columns = this.columns;\n        this.items.map((boxView, index)=>{\n            // Translate box index to the row & column index.\n            const itemRow = Math.floor(index / 10);\n            const itemColumn = index % 10;\n            // Grid box is highlighted when its row & column index belongs to selected number of rows & columns.\n            const isOn = itemRow < rows && itemColumn < columns;\n            boxView.set('isOn', isOn);\n        });\n    }\n    /**\n\t * Creates a new Button for the grid.\n\t *\n\t * @param locale The locale instance.\n\t * @param row Row number.\n\t * @param column Column number.\n\t * @param label The grid button label.\n\t */ _createGridButton(locale, row, column, label) {\n        const button = new ButtonView(locale);\n        button.set({\n            label,\n            class: 'ck-insert-table-dropdown-grid-box'\n        });\n        button.extendTemplate({\n            attributes: {\n                'data-row': row,\n                'data-column': column\n            }\n        });\n        return button;\n    }\n    /**\n\t * @returns A view collection containing boxes to be placed in a table grid.\n\t */ _createGridCollection() {\n        const boxes = [];\n        // Add grid boxes to table selection view.\n        for(let index = 0; index < 100; index++){\n            const row = Math.floor(index / 10);\n            const column = index % 10;\n            const label = `${row + 1} × ${column + 1}`;\n            boxes.push(this._createGridButton(this.locale, row + 1, column + 1, label));\n        }\n        return this.createCollection(boxes);\n    }\n}\n\nvar tableColumnIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\\\" opacity=\\\".6\\\"/><path d=\\\"M18 7v1H2V7h16zm0 5v1H2v-1h16z\\\" opacity=\\\".6\\\"/><path d=\\\"M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z\\\"/></svg>\";\n\nvar tableRowIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 2h1v16H7V2zm5 0h1v16h-1V2z\\\" opacity=\\\".6\\\"/><path d=\\\"M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z\\\"/></svg>\";\n\nvar tableMergeCellIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z\\\" opacity=\\\".6\\\"/><path d=\\\"M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z\\\"/></svg>\";\n\n/**\n * The table UI plugin. It introduces:\n *\n * * The `'insertTable'` dropdown,\n * * The `'menuBar:insertTable'` menu bar menu,\n * * The `'tableColumn'` dropdown,\n * * The `'tableRow'` dropdown,\n * * The `'mergeTableCells'` split button.\n *\n * The `'tableColumn'`, `'tableRow'` and `'mergeTableCells'` dropdowns work best with {@link module:table/tabletoolbar~TableToolbar}.\n */ class TableUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = this.editor.t;\n        const contentLanguageDirection = editor.locale.contentLanguageDirection;\n        const isContentLtr = contentLanguageDirection === 'ltr';\n        editor.ui.componentFactory.add('insertTable', (locale)=>{\n            const command = editor.commands.get('insertTable');\n            const dropdownView = createDropdown(locale);\n            dropdownView.bind('isEnabled').to(command);\n            // Decorate dropdown's button.\n            dropdownView.buttonView.set({\n                icon: icons.table,\n                label: t('Insert table'),\n                tooltip: true\n            });\n            let insertTableView;\n            dropdownView.on('change:isOpen', ()=>{\n                if (insertTableView) {\n                    return;\n                }\n                // Prepare custom view for dropdown's panel.\n                insertTableView = new InsertTableView(locale);\n                dropdownView.panelView.children.add(insertTableView);\n                insertTableView.delegate('execute').to(dropdownView);\n                dropdownView.on('execute', ()=>{\n                    editor.execute('insertTable', {\n                        rows: insertTableView.rows,\n                        columns: insertTableView.columns\n                    });\n                    editor.editing.view.focus();\n                });\n            });\n            return dropdownView;\n        });\n        editor.ui.componentFactory.add('menuBar:insertTable', (locale)=>{\n            const command = editor.commands.get('insertTable');\n            const menuView = new MenuBarMenuView(locale);\n            const insertTableView = new InsertTableView(locale);\n            insertTableView.delegate('execute').to(menuView);\n            menuView.on('change:isOpen', (event, name, isOpen)=>{\n                if (!isOpen) {\n                    insertTableView.reset();\n                }\n            });\n            insertTableView.on('execute', ()=>{\n                editor.execute('insertTable', {\n                    rows: insertTableView.rows,\n                    columns: insertTableView.columns\n                });\n                editor.editing.view.focus();\n            });\n            menuView.buttonView.set({\n                label: t('Table'),\n                icon: icons.table\n            });\n            menuView.panelView.children.add(insertTableView);\n            menuView.bind('isEnabled').to(command);\n            return menuView;\n        });\n        editor.ui.componentFactory.add('tableColumn', (locale)=>{\n            const options = [\n                {\n                    type: 'switchbutton',\n                    model: {\n                        commandName: 'setTableColumnHeader',\n                        label: t('Header column'),\n                        bindIsOn: true\n                    }\n                },\n                {\n                    type: 'separator'\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: isContentLtr ? 'insertTableColumnLeft' : 'insertTableColumnRight',\n                        label: t('Insert column left')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: isContentLtr ? 'insertTableColumnRight' : 'insertTableColumnLeft',\n                        label: t('Insert column right')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'removeTableColumn',\n                        label: t('Delete column')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'selectTableColumn',\n                        label: t('Select column')\n                    }\n                }\n            ];\n            return this._prepareDropdown(t('Column'), tableColumnIcon, options, locale);\n        });\n        editor.ui.componentFactory.add('tableRow', (locale)=>{\n            const options = [\n                {\n                    type: 'switchbutton',\n                    model: {\n                        commandName: 'setTableRowHeader',\n                        label: t('Header row'),\n                        bindIsOn: true\n                    }\n                },\n                {\n                    type: 'separator'\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'insertTableRowAbove',\n                        label: t('Insert row above')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'insertTableRowBelow',\n                        label: t('Insert row below')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'removeTableRow',\n                        label: t('Delete row')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'selectTableRow',\n                        label: t('Select row')\n                    }\n                }\n            ];\n            return this._prepareDropdown(t('Row'), tableRowIcon, options, locale);\n        });\n        editor.ui.componentFactory.add('mergeTableCells', (locale)=>{\n            const options = [\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'mergeTableCellUp',\n                        label: t('Merge cell up')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: isContentLtr ? 'mergeTableCellRight' : 'mergeTableCellLeft',\n                        label: t('Merge cell right')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'mergeTableCellDown',\n                        label: t('Merge cell down')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: isContentLtr ? 'mergeTableCellLeft' : 'mergeTableCellRight',\n                        label: t('Merge cell left')\n                    }\n                },\n                {\n                    type: 'separator'\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'splitTableCellVertically',\n                        label: t('Split cell vertically')\n                    }\n                },\n                {\n                    type: 'button',\n                    model: {\n                        commandName: 'splitTableCellHorizontally',\n                        label: t('Split cell horizontally')\n                    }\n                }\n            ];\n            return this._prepareMergeSplitButtonDropdown(t('Merge cells'), tableMergeCellIcon, options, locale);\n        });\n    }\n    /**\n\t * Creates a dropdown view from a set of options.\n\t *\n\t * @param label The dropdown button label.\n\t * @param icon An icon for the dropdown button.\n\t * @param options The list of options for the dropdown.\n\t */ _prepareDropdown(label, icon, options, locale) {\n        const editor = this.editor;\n        const dropdownView = createDropdown(locale);\n        const commands = this._fillDropdownWithListOptions(dropdownView, options);\n        // Decorate dropdown's button.\n        dropdownView.buttonView.set({\n            label,\n            icon,\n            tooltip: true\n        });\n        // Make dropdown button disabled when all options are disabled.\n        dropdownView.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled)=>{\n            return areEnabled.some((isEnabled)=>isEnabled);\n        });\n        this.listenTo(dropdownView, 'execute', (evt)=>{\n            editor.execute(evt.source.commandName);\n            // Toggling a switch button view should not move the focus to the editable.\n            if (!(evt.source instanceof SwitchButtonView)) {\n                editor.editing.view.focus();\n            }\n        });\n        return dropdownView;\n    }\n    /**\n\t * Creates a dropdown view with a {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} for\n\t * merge (and split)–related commands.\n\t *\n\t * @param label The dropdown button label.\n\t * @param icon An icon for the dropdown button.\n\t * @param options The list of options for the dropdown.\n\t */ _prepareMergeSplitButtonDropdown(label, icon, options, locale) {\n        const editor = this.editor;\n        const dropdownView = createDropdown(locale, SplitButtonView);\n        const mergeCommandName = 'mergeTableCells';\n        // Main command.\n        const mergeCommand = editor.commands.get(mergeCommandName);\n        // Subcommands in the dropdown.\n        const commands = this._fillDropdownWithListOptions(dropdownView, options);\n        dropdownView.buttonView.set({\n            label,\n            icon,\n            tooltip: true,\n            isEnabled: true\n        });\n        // Make dropdown button disabled when all options are disabled together with the main command.\n        dropdownView.bind('isEnabled').toMany([\n            mergeCommand,\n            ...commands\n        ], 'isEnabled', (...areEnabled)=>{\n            return areEnabled.some((isEnabled)=>isEnabled);\n        });\n        // Merge selected table cells when the main part of the split button is clicked.\n        this.listenTo(dropdownView.buttonView, 'execute', ()=>{\n            editor.execute(mergeCommandName);\n            editor.editing.view.focus();\n        });\n        // Execute commands for events coming from the list in the dropdown panel.\n        this.listenTo(dropdownView, 'execute', (evt)=>{\n            editor.execute(evt.source.commandName);\n            editor.editing.view.focus();\n        });\n        return dropdownView;\n    }\n    /**\n\t * Injects a {@link module:ui/list/listview~ListView} into the passed dropdown with buttons\n\t * which execute editor commands as configured in passed options.\n\t *\n\t * @param options The list of options for the dropdown.\n\t * @returns Commands the list options are interacting with.\n\t */ _fillDropdownWithListOptions(dropdownView, options) {\n        const editor = this.editor;\n        const commands = [];\n        const itemDefinitions = new Collection();\n        for (const option of options){\n            addListOption(option, editor, commands, itemDefinitions);\n        }\n        addListToDropdown(dropdownView, itemDefinitions);\n        return commands;\n    }\n}\n/**\n * Adds an option to a list view.\n *\n * @param option A configuration option.\n * @param commands The list of commands to update.\n * @param itemDefinitions A collection of dropdown items to update with the given option.\n */ function addListOption(option, editor, commands, itemDefinitions) {\n    if (option.type === 'button' || option.type === 'switchbutton') {\n        const model = option.model = new ViewModel(option.model);\n        const { commandName, bindIsOn } = option.model;\n        const command = editor.commands.get(commandName);\n        commands.push(command);\n        model.set({\n            commandName\n        });\n        model.bind('isEnabled').to(command);\n        if (bindIsOn) {\n            model.bind('isOn').to(command, 'value');\n        }\n        model.set({\n            withText: true\n        });\n    }\n    itemDefinitions.add(option);\n}\n\n/**\n * This plugin enables the advanced table cells, rows and columns selection.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */ class TableSelection extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableSelection';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableUtils,\n            TableUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const model = editor.model;\n        const view = editor.editing.view;\n        this.listenTo(model, 'deleteContent', (evt, args)=>this._handleDeleteContent(evt, args), {\n            priority: 'high'\n        });\n        this.listenTo(view.document, 'insertText', (evt, data)=>this._handleInsertTextEvent(evt, data), {\n            priority: 'high'\n        });\n        this._defineSelectionConverter();\n        this._enablePluginDisabling(); // sic!\n    }\n    /**\n\t * Returns the currently selected table cells or `null` if it is not a table cells selection.\n\t */ getSelectedTableCells() {\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const selection = this.editor.model.document.selection;\n        const selectedCells = tableUtils.getSelectedTableCells(selection);\n        if (selectedCells.length == 0) {\n            return null;\n        }\n        // This should never happen, but let's know if it ever happens.\n        // @if CK_DEBUG //\tif ( selectedCells.length != selection.rangeCount ) {\n        // @if CK_DEBUG //\t\tconsole.warn( 'Mixed selection warning. The selection contains table cells and some other ranges.' );\n        // @if CK_DEBUG //\t}\n        return selectedCells;\n    }\n    /**\n\t * Returns the selected table fragment as a document fragment.\n\t */ getSelectionAsFragment() {\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const selectedCells = this.getSelectedTableCells();\n        if (!selectedCells) {\n            return null;\n        }\n        return this.editor.model.change((writer)=>{\n            const documentFragment = writer.createDocumentFragment();\n            const { first: firstColumn, last: lastColumn } = tableUtils.getColumnIndexes(selectedCells);\n            const { first: firstRow, last: lastRow } = tableUtils.getRowIndexes(selectedCells);\n            const sourceTable = selectedCells[0].findAncestor('table');\n            let adjustedLastRow = lastRow;\n            let adjustedLastColumn = lastColumn;\n            // If the selection is rectangular there could be a case of all cells in the last row/column spanned over\n            // next row/column so the real lastRow/lastColumn should be updated.\n            if (tableUtils.isSelectionRectangular(selectedCells)) {\n                const dimensions = {\n                    firstColumn,\n                    lastColumn,\n                    firstRow,\n                    lastRow\n                };\n                adjustedLastRow = adjustLastRowIndex(sourceTable, dimensions);\n                adjustedLastColumn = adjustLastColumnIndex(sourceTable, dimensions);\n            }\n            const cropDimensions = {\n                startRow: firstRow,\n                startColumn: firstColumn,\n                endRow: adjustedLastRow,\n                endColumn: adjustedLastColumn\n            };\n            const table = cropTableToDimensions(sourceTable, cropDimensions, writer);\n            writer.insert(table, documentFragment, 0);\n            return documentFragment;\n        });\n    }\n    /**\n\t * Sets the model selection based on given anchor and target cells (can be the same cell).\n\t * Takes care of setting the backward flag.\n\t *\n\t * ```ts\n\t * const modelRoot = editor.model.document.getRoot();\n\t * const firstCell = modelRoot.getNodeByPath( [ 0, 0, 0 ] );\n\t * const lastCell = modelRoot.getNodeByPath( [ 0, 0, 1 ] );\n\t *\n\t * const tableSelection = editor.plugins.get( 'TableSelection' );\n\t * tableSelection.setCellSelection( firstCell, lastCell );\n\t * ```\n\t */ setCellSelection(anchorCell, targetCell) {\n        const cellsToSelect = this._getCellsToSelect(anchorCell, targetCell);\n        this.editor.model.change((writer)=>{\n            writer.setSelection(cellsToSelect.cells.map((cell)=>writer.createRangeOn(cell)), {\n                backward: cellsToSelect.backward\n            });\n        });\n    }\n    /**\n\t * Returns the focus cell from the current selection.\n\t */ getFocusCell() {\n        const selection = this.editor.model.document.selection;\n        const focusCellRange = [\n            ...selection.getRanges()\n        ].pop();\n        const element = focusCellRange.getContainedElement();\n        if (element && element.is('element', 'tableCell')) {\n            return element;\n        }\n        return null;\n    }\n    /**\n\t * Returns the anchor cell from the current selection.\n\t */ getAnchorCell() {\n        const selection = this.editor.model.document.selection;\n        const anchorCellRange = first(selection.getRanges());\n        const element = anchorCellRange.getContainedElement();\n        if (element && element.is('element', 'tableCell')) {\n            return element;\n        }\n        return null;\n    }\n    /**\n\t * Defines a selection converter which marks the selected cells with a specific class.\n\t *\n\t * The real DOM selection is put in the last cell. Since the order of ranges is dependent on whether the\n\t * selection is backward or not, the last cell will usually be close to the \"focus\" end of the selection\n\t * (a selection has anchor and focus).\n\t *\n\t * The real DOM selection is then hidden with CSS.\n\t */ _defineSelectionConverter() {\n        const editor = this.editor;\n        const highlighted = new Set();\n        editor.conversion.for('editingDowncast').add((dispatcher)=>dispatcher.on('selection', (evt, data, conversionApi)=>{\n                const viewWriter = conversionApi.writer;\n                clearHighlightedTableCells(viewWriter);\n                const selectedCells = this.getSelectedTableCells();\n                if (!selectedCells) {\n                    return;\n                }\n                for (const tableCell of selectedCells){\n                    const viewElement = conversionApi.mapper.toViewElement(tableCell);\n                    viewWriter.addClass('ck-editor__editable_selected', viewElement);\n                    highlighted.add(viewElement);\n                }\n                const lastViewCell = conversionApi.mapper.toViewElement(selectedCells[selectedCells.length - 1]);\n                viewWriter.setSelection(lastViewCell, 0);\n            }, {\n                priority: 'lowest'\n            }));\n        function clearHighlightedTableCells(viewWriter) {\n            for (const previouslyHighlighted of highlighted){\n                viewWriter.removeClass('ck-editor__editable_selected', previouslyHighlighted);\n            }\n            highlighted.clear();\n        }\n    }\n    /**\n\t * Creates a listener that reacts to changes in {@link #isEnabled} and, if the plugin was disabled,\n\t * it collapses the multi-cell selection to a regular selection placed inside a table cell.\n\t *\n\t * This listener helps features that disable the table selection plugin bring the selection\n\t * to a clear state they can work with (for instance, because they don't support multiple cell selection).\n\t */ _enablePluginDisabling() {\n        const editor = this.editor;\n        this.on('change:isEnabled', ()=>{\n            if (!this.isEnabled) {\n                const selectedCells = this.getSelectedTableCells();\n                if (!selectedCells) {\n                    return;\n                }\n                editor.model.change((writer)=>{\n                    const position = writer.createPositionAt(selectedCells[0], 0);\n                    const range = editor.model.schema.getNearestSelectionRange(position);\n                    writer.setSelection(range);\n                });\n            }\n        });\n    }\n    /**\n\t * Overrides the default `model.deleteContent()` behavior over a selected table fragment.\n\t *\n\t * @param args Delete content method arguments.\n\t */ _handleDeleteContent(event, args) {\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const selection = args[0];\n        const options = args[1];\n        const model = this.editor.model;\n        const isBackward = !options || options.direction == 'backward';\n        const selectedTableCells = tableUtils.getSelectedTableCells(selection);\n        if (!selectedTableCells.length) {\n            return;\n        }\n        event.stop();\n        model.change((writer)=>{\n            const tableCellToSelect = selectedTableCells[isBackward ? selectedTableCells.length - 1 : 0];\n            model.change((writer)=>{\n                for (const tableCell of selectedTableCells){\n                    model.deleteContent(writer.createSelection(tableCell, 'in'));\n                }\n            });\n            const rangeToSelect = model.schema.getNearestSelectionRange(writer.createPositionAt(tableCellToSelect, 0));\n            // Note: we ignore the case where rangeToSelect may be null because deleteContent() will always (unless someone broke it)\n            // create an empty paragraph to accommodate the selection.\n            if (selection.is('documentSelection')) {\n                writer.setSelection(rangeToSelect);\n            } else {\n                selection.setTo(rangeToSelect);\n            }\n        });\n    }\n    /**\n\t * This handler makes it possible to remove the content of all selected cells by starting to type.\n\t * If you take a look at {@link #_defineSelectionConverter} you will find out that despite the multi-cell selection being set\n\t * in the model, the view selection is collapsed in the last cell (because most browsers are unable to render multi-cell selections;\n\t * yes, it's a hack).\n\t *\n\t * When multiple cells are selected in the model and the user starts to type, the\n\t * {@link module:engine/view/document~Document#event:insertText} event carries information provided by the\n\t * beforeinput DOM  event, that in turn only knows about this collapsed DOM selection in the last cell.\n\t *\n\t * As a result, the selected cells have no chance to be cleaned up. To fix this, this listener intercepts\n\t * the event and injects the custom view selection in the data that translates correctly to the actual state\n\t * of the multi-cell selection in the model.\n\t *\n\t * @param data Insert text event data.\n\t */ _handleInsertTextEvent(evt, data) {\n        const editor = this.editor;\n        const selectedCells = this.getSelectedTableCells();\n        if (!selectedCells) {\n            return;\n        }\n        const view = editor.editing.view;\n        const mapper = editor.editing.mapper;\n        const viewRanges = selectedCells.map((tableCell)=>view.createRangeOn(mapper.toViewElement(tableCell)));\n        data.selection = view.createSelection(viewRanges);\n    }\n    /**\n\t * Returns an array of table cells that should be selected based on the\n\t * given anchor cell and target (focus) cell.\n\t *\n\t * The cells are returned in a reverse direction if the selection is backward.\n\t */ _getCellsToSelect(anchorCell, targetCell) {\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const startLocation = tableUtils.getCellLocation(anchorCell);\n        const endLocation = tableUtils.getCellLocation(targetCell);\n        const startRow = Math.min(startLocation.row, endLocation.row);\n        const endRow = Math.max(startLocation.row, endLocation.row);\n        const startColumn = Math.min(startLocation.column, endLocation.column);\n        const endColumn = Math.max(startLocation.column, endLocation.column);\n        // 2-dimensional array of the selected cells to ease flipping the order of cells for backward selections.\n        const selectionMap = new Array(endRow - startRow + 1).fill(null).map(()=>[]);\n        const walkerOptions = {\n            startRow,\n            endRow,\n            startColumn,\n            endColumn\n        };\n        for (const { row, cell } of new TableWalker(anchorCell.findAncestor('table'), walkerOptions)){\n            selectionMap[row - startRow].push(cell);\n        }\n        const flipVertically = endLocation.row < startLocation.row;\n        const flipHorizontally = endLocation.column < startLocation.column;\n        if (flipVertically) {\n            selectionMap.reverse();\n        }\n        if (flipHorizontally) {\n            selectionMap.forEach((row)=>row.reverse());\n        }\n        return {\n            cells: selectionMap.flat(),\n            backward: flipVertically || flipHorizontally\n        };\n    }\n}\n\n/**\n * This plugin adds support for copying/cutting/pasting fragments of tables.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */ class TableClipboard extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableClipboard';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ClipboardMarkersUtils,\n            ClipboardPipeline,\n            TableSelection,\n            TableUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const viewDocument = editor.editing.view.document;\n        this.listenTo(viewDocument, 'copy', (evt, data)=>this._onCopyCut(evt, data));\n        this.listenTo(viewDocument, 'cut', (evt, data)=>this._onCopyCut(evt, data));\n        this.listenTo(editor.model, 'insertContent', (evt, [content, selectable])=>this._onInsertContent(evt, content, selectable), {\n            priority: 'high'\n        });\n        this.decorate('_replaceTableSlotCell');\n    }\n    /**\n\t * Copies table content to a clipboard on \"copy\" & \"cut\" events.\n\t *\n\t * @param evt An object containing information about the handled event.\n\t * @param data Clipboard event data.\n\t */ _onCopyCut(evt, data) {\n        const view = this.editor.editing.view;\n        const tableSelection = this.editor.plugins.get(TableSelection);\n        const clipboardMarkersUtils = this.editor.plugins.get(ClipboardMarkersUtils);\n        if (!tableSelection.getSelectedTableCells()) {\n            return;\n        }\n        if (evt.name == 'cut' && !this.editor.model.canEditAt(this.editor.model.document.selection)) {\n            return;\n        }\n        data.preventDefault();\n        evt.stop();\n        this.editor.model.enqueueChange({\n            isUndoable: evt.name === 'cut'\n        }, ()=>{\n            const documentFragment = clipboardMarkersUtils._copySelectedFragmentWithMarkers(evt.name, this.editor.model.document.selection, ()=>tableSelection.getSelectionAsFragment());\n            view.document.fire('clipboardOutput', {\n                dataTransfer: data.dataTransfer,\n                content: this.editor.data.toView(documentFragment),\n                method: evt.name\n            });\n        });\n    }\n    /**\n\t * Overrides default {@link module:engine/model/model~Model#insertContent `model.insertContent()`} method to handle pasting table inside\n\t * selected table fragment.\n\t *\n\t * Depending on selected table fragment:\n\t * - If a selected table fragment is smaller than paste table it will crop pasted table to match dimensions.\n\t * - If dimensions are equal it will replace selected table fragment with a pasted table contents.\n\t *\n\t * @param content The content to insert.\n\t * @param selectable The selection into which the content should be inserted.\n\t * If not provided the current model document selection will be used.\n\t */ _onInsertContent(evt, content, selectable) {\n        if (selectable && !selectable.is('documentSelection')) {\n            return;\n        }\n        const model = this.editor.model;\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const clipboardMarkersUtils = this.editor.plugins.get(ClipboardMarkersUtils);\n        // We might need to crop table before inserting so reference might change.\n        const pastedTable = this.getTableIfOnlyTableInContent(content, model);\n        if (!pastedTable) {\n            return;\n        }\n        const selectedTableCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        if (!selectedTableCells.length) {\n            removeEmptyRowsColumns(pastedTable, tableUtils);\n            return;\n        }\n        // Override default model.insertContent() handling at this point.\n        evt.stop();\n        if (content.is('documentFragment')) {\n            clipboardMarkersUtils._pasteMarkersIntoTransformedElement(content.markers, (writer)=>this._replaceSelectedCells(pastedTable, selectedTableCells, writer));\n        } else {\n            this.editor.model.change((writer)=>{\n                this._replaceSelectedCells(pastedTable, selectedTableCells, writer);\n            });\n        }\n    }\n    /**\n\t * Inserts provided `selectedTableCells` into `pastedTable`.\n\t */ _replaceSelectedCells(pastedTable, selectedTableCells, writer) {\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const pastedDimensions = {\n            width: tableUtils.getColumns(pastedTable),\n            height: tableUtils.getRows(pastedTable)\n        };\n        // Prepare the table for pasting.\n        const selection = prepareTableForPasting(selectedTableCells, pastedDimensions, writer, tableUtils);\n        // Beyond this point we operate on a fixed content table with rectangular selection and proper last row/column values.\n        const selectionHeight = selection.lastRow - selection.firstRow + 1;\n        const selectionWidth = selection.lastColumn - selection.firstColumn + 1;\n        // Crop pasted table if:\n        // - Pasted table dimensions exceeds selection area.\n        // - Pasted table has broken layout (ie some cells sticks out by the table dimensions established by the first and last row).\n        //\n        // Note: The table dimensions are established by the width of the first row and the total number of rows.\n        // It is possible to programmatically create a table that has rows which would have cells anchored beyond first row width but\n        // such table will not be created by other editing solutions.\n        const cropDimensions = {\n            startRow: 0,\n            startColumn: 0,\n            endRow: Math.min(selectionHeight, pastedDimensions.height) - 1,\n            endColumn: Math.min(selectionWidth, pastedDimensions.width) - 1\n        };\n        pastedTable = cropTableToDimensions(pastedTable, cropDimensions, writer);\n        // Content table to which we insert a pasted table.\n        const selectedTable = selectedTableCells[0].findAncestor('table');\n        const cellsToSelect = this._replaceSelectedCellsWithPasted(pastedTable, pastedDimensions, selectedTable, selection, writer);\n        if (this.editor.plugins.get('TableSelection').isEnabled) {\n            // Selection ranges must be sorted because the first and last selection ranges are considered\n            // as anchor/focus cell ranges for multi-cell selection.\n            const selectionRanges = tableUtils.sortRanges(cellsToSelect.map((cell)=>writer.createRangeOn(cell)));\n            writer.setSelection(selectionRanges);\n        } else {\n            // Set selection inside first cell if multi-cell selection is disabled.\n            writer.setSelection(cellsToSelect[0], 0);\n        }\n        return selectedTable;\n    }\n    /**\n\t * Replaces the part of selectedTable with pastedTable.\n\t */ _replaceSelectedCellsWithPasted(pastedTable, pastedDimensions, selectedTable, selection, writer) {\n        const { width: pastedWidth, height: pastedHeight } = pastedDimensions;\n        // Holds two-dimensional array that is addressed by [ row ][ column ] that stores cells anchored at given location.\n        const pastedTableLocationMap = createLocationMap(pastedTable, pastedWidth, pastedHeight);\n        const selectedTableMap = [\n            ...new TableWalker(selectedTable, {\n                startRow: selection.firstRow,\n                endRow: selection.lastRow,\n                startColumn: selection.firstColumn,\n                endColumn: selection.lastColumn,\n                includeAllSlots: true\n            })\n        ];\n        // Selection must be set to pasted cells (some might be removed or new created).\n        const cellsToSelect = [];\n        // Store next cell insert position.\n        let insertPosition;\n        // Content table replace cells algorithm iterates over a selected table fragment and:\n        //\n        // - Removes existing table cells at current slot (location).\n        // - Inserts cell from a pasted table for a matched slots.\n        //\n        // This ensures proper table geometry after the paste\n        for (const tableSlot of selectedTableMap){\n            const { row, column } = tableSlot;\n            // Save the insert position for current row start.\n            if (column === selection.firstColumn) {\n                insertPosition = tableSlot.getPositionBefore();\n            }\n            // Map current table slot location to an pasted table slot location.\n            const pastedRow = row - selection.firstRow;\n            const pastedColumn = column - selection.firstColumn;\n            const pastedCell = pastedTableLocationMap[pastedRow % pastedHeight][pastedColumn % pastedWidth];\n            // Clone cell to insert (to duplicate its attributes and children).\n            // Cloning is required to support repeating pasted table content when inserting to a bigger selection.\n            const cellToInsert = pastedCell ? writer.cloneElement(pastedCell) : null;\n            // Replace the cell from the current slot with new table cell.\n            const newTableCell = this._replaceTableSlotCell(tableSlot, cellToInsert, insertPosition, writer);\n            // The cell was only removed.\n            if (!newTableCell) {\n                continue;\n            }\n            // Trim the cell if it's row/col-spans would exceed selection area.\n            trimTableCellIfNeeded(newTableCell, row, column, selection.lastRow, selection.lastColumn, writer);\n            cellsToSelect.push(newTableCell);\n            insertPosition = writer.createPositionAfter(newTableCell);\n        }\n        // If there are any headings, all the cells that overlap from heading must be splitted.\n        const headingRows = parseInt(selectedTable.getAttribute('headingRows') || '0');\n        const headingColumns = parseInt(selectedTable.getAttribute('headingColumns') || '0');\n        const areHeadingRowsIntersectingSelection = selection.firstRow < headingRows && headingRows <= selection.lastRow;\n        const areHeadingColumnsIntersectingSelection = selection.firstColumn < headingColumns && headingColumns <= selection.lastColumn;\n        if (areHeadingRowsIntersectingSelection) {\n            const columnsLimit = {\n                first: selection.firstColumn,\n                last: selection.lastColumn\n            };\n            const newCells = doHorizontalSplit(selectedTable, headingRows, columnsLimit, writer, selection.firstRow);\n            cellsToSelect.push(...newCells);\n        }\n        if (areHeadingColumnsIntersectingSelection) {\n            const rowsLimit = {\n                first: selection.firstRow,\n                last: selection.lastRow\n            };\n            const newCells = doVerticalSplit(selectedTable, headingColumns, rowsLimit, writer);\n            cellsToSelect.push(...newCells);\n        }\n        return cellsToSelect;\n    }\n    /**\n\t * Replaces a single table slot.\n\t *\n\t * @returns Inserted table cell or null if slot should remain empty.\n\t * @private\n\t */ _replaceTableSlotCell(tableSlot, cellToInsert, insertPosition, writer) {\n        const { cell, isAnchor } = tableSlot;\n        // If the slot is occupied by a cell in a selected table - remove it.\n        // The slot of this cell will be either:\n        // - Replaced by a pasted table cell.\n        // - Spanned by a previously pasted table cell.\n        if (isAnchor) {\n            writer.remove(cell);\n        }\n        // There is no cell to insert (might be spanned by other cell in a pasted table) - advance to the next content table slot.\n        if (!cellToInsert) {\n            return null;\n        }\n        writer.insert(cellToInsert, insertPosition);\n        return cellToInsert;\n    }\n    /**\n\t * Extracts the table for pasting into a table.\n\t *\n\t * @param content The content to insert.\n\t * @param model The editor model.\n\t */ getTableIfOnlyTableInContent(content, model) {\n        if (!content.is('documentFragment') && !content.is('element')) {\n            return null;\n        }\n        // Table passed directly.\n        if (content.is('element', 'table')) {\n            return content;\n        }\n        // We do not support mixed content when pasting table into table.\n        // See: https://github.com/ckeditor/ckeditor5/issues/6817.\n        if (content.childCount == 1 && content.getChild(0).is('element', 'table')) {\n            return content.getChild(0);\n        }\n        // If there are only whitespaces around a table then use that table for pasting.\n        const contentRange = model.createRangeIn(content);\n        for (const element of contentRange.getItems()){\n            if (element.is('element', 'table')) {\n                // Stop checking if there is some content before table.\n                const rangeBefore = model.createRange(contentRange.start, model.createPositionBefore(element));\n                if (model.hasContent(rangeBefore, {\n                    ignoreWhitespaces: true\n                })) {\n                    return null;\n                }\n                // Stop checking if there is some content after table.\n                const rangeAfter = model.createRange(model.createPositionAfter(element), contentRange.end);\n                if (model.hasContent(rangeAfter, {\n                    ignoreWhitespaces: true\n                })) {\n                    return null;\n                }\n                // There wasn't any content neither before nor after.\n                return element;\n            }\n        }\n        return null;\n    }\n}\n/**\n * Prepares a table for pasting and returns adjusted selection dimensions.\n */ function prepareTableForPasting(selectedTableCells, pastedDimensions, writer, tableUtils) {\n    const selectedTable = selectedTableCells[0].findAncestor('table');\n    const columnIndexes = tableUtils.getColumnIndexes(selectedTableCells);\n    const rowIndexes = tableUtils.getRowIndexes(selectedTableCells);\n    const selection = {\n        firstColumn: columnIndexes.first,\n        lastColumn: columnIndexes.last,\n        firstRow: rowIndexes.first,\n        lastRow: rowIndexes.last\n    };\n    // Single cell selected - expand selection to pasted table dimensions.\n    const shouldExpandSelection = selectedTableCells.length === 1;\n    if (shouldExpandSelection) {\n        selection.lastRow += pastedDimensions.height - 1;\n        selection.lastColumn += pastedDimensions.width - 1;\n        expandTableSize(selectedTable, selection.lastRow + 1, selection.lastColumn + 1, tableUtils);\n    }\n    // In case of expanding selection we do not reset the selection so in this case we will always try to fix selection\n    // like in the case of a non-rectangular area. This might be fixed by re-setting selected cells array but this shortcut is safe.\n    if (shouldExpandSelection || !tableUtils.isSelectionRectangular(selectedTableCells)) {\n        // For a non-rectangular selection (ie in which some cells sticks out from a virtual selection rectangle) we need to create\n        // a table layout that has a rectangular selection. This will split cells so the selection become rectangular.\n        // Beyond this point we will operate on fixed content table.\n        splitCellsToRectangularSelection(selectedTable, selection, writer);\n    } else {\n        selection.lastRow = adjustLastRowIndex(selectedTable, selection);\n        selection.lastColumn = adjustLastColumnIndex(selectedTable, selection);\n    }\n    return selection;\n}\n/**\n * Expand table (in place) to expected size.\n */ function expandTableSize(table, expectedHeight, expectedWidth, tableUtils) {\n    const tableWidth = tableUtils.getColumns(table);\n    const tableHeight = tableUtils.getRows(table);\n    if (expectedWidth > tableWidth) {\n        tableUtils.insertColumns(table, {\n            at: tableWidth,\n            columns: expectedWidth - tableWidth\n        });\n    }\n    if (expectedHeight > tableHeight) {\n        tableUtils.insertRows(table, {\n            at: tableHeight,\n            rows: expectedHeight - tableHeight\n        });\n    }\n}\n/**\n * Returns two-dimensional array that is addressed by [ row ][ column ] that stores cells anchored at given location.\n *\n * At given row & column location it might be one of:\n *\n * * cell - cell from pasted table anchored at this location.\n * * null - if no cell is anchored at this location.\n *\n * For instance, from a table below:\n *\n *   +----+----+----+----+\n *   | 00 | 01 | 02 | 03 |\n *   +    +----+----+----+\n *   |    | 11      | 13 |\n *   +----+         +----+\n *   | 20 |         | 23 |\n *   +----+----+----+----+\n *\n * The method will return an array (numbers represents cell element):\n *\n * ```ts\n * const map = [\n *   [ '00', '01', '02', '03' ],\n *   [ null, '11', null, '13' ],\n *   [ '20', null, null, '23' ]\n * ]\n * ```\n *\n * This allows for a quick access to table at give row & column. For instance to access table cell \"13\" from pasted table call:\n *\n * ```ts\n * const cell = map[ 1 ][ 3 ]\n * ```\n */ function createLocationMap(table, width, height) {\n    // Create height x width (row x column) two-dimensional table to store cells.\n    const map = new Array(height).fill(null).map(()=>new Array(width).fill(null));\n    for (const { column, row, cell } of new TableWalker(table)){\n        map[row][column] = cell;\n    }\n    return map;\n}\n/**\n * Make selected cells rectangular by splitting the cells that stand out from a rectangular selection.\n *\n * In the table below a selection is shown with \"::\" and slots with anchor cells are named.\n *\n * +----+----+----+----+----+                    +----+----+----+----+----+\n * | 00 | 01 | 02 | 03      |                    | 00 | 01 | 02 | 03      |\n * +    +----+    +----+----+                    |    ::::::::::::::::----+\n * |    | 11 |    | 13 | 14 |                    |    ::11 |    | 13:: 14 |    <- first row\n * +----+----+    +    +----+                    +----::---|    |   ::----+\n * | 20 | 21 |    |    | 24 |   select cells:    | 20 ::21 |    |   :: 24 |\n * +----+----+    +----+----+     11 -> 33       +----::---|    |---::----+\n * | 30      |    | 33 | 34 |                    | 30 ::   |    | 33:: 34 |    <- last row\n * +         +    +----+    +                    |    ::::::::::::::::    +\n * |         |    | 43 |    |                    |         |    | 43 |    |\n * +----+----+----+----+----+                    +----+----+----+----+----+\n *                                                      ^          ^\n *                                                     first & last columns\n *\n * Will update table to:\n *\n *                       +----+----+----+----+----+\n *                       | 00 | 01 | 02 | 03      |\n *                       +    +----+----+----+----+\n *                       |    | 11 |    | 13 | 14 |\n *                       +----+----+    +    +----+\n *                       | 20 | 21 |    |    | 24 |\n *                       +----+----+    +----+----+\n *                       | 30 |    |    | 33 | 34 |\n *                       +    +----+----+----+    +\n *                       |    |    |    | 43 |    |\n *                       +----+----+----+----+----+\n *\n * In th example above:\n * - Cell \"02\" which have `rowspan = 4` must be trimmed at first and at after last row.\n * - Cell \"03\" which have `rowspan = 2` and `colspan = 2` must be trimmed at first column and after last row.\n * - Cells \"00\", \"03\" & \"30\" which cannot be cut by this algorithm as they are outside the trimmed area.\n * - Cell \"13\" cannot be cut as it is inside the trimmed area.\n */ function splitCellsToRectangularSelection(table, dimensions, writer) {\n    const { firstRow, lastRow, firstColumn, lastColumn } = dimensions;\n    const rowIndexes = {\n        first: firstRow,\n        last: lastRow\n    };\n    const columnIndexes = {\n        first: firstColumn,\n        last: lastColumn\n    };\n    // 1. Split cells vertically in two steps as first step might create cells that needs to split again.\n    doVerticalSplit(table, firstColumn, rowIndexes, writer);\n    doVerticalSplit(table, lastColumn + 1, rowIndexes, writer);\n    // 2. Split cells horizontally in two steps as first step might create cells that needs to split again.\n    doHorizontalSplit(table, firstRow, columnIndexes, writer);\n    doHorizontalSplit(table, lastRow + 1, columnIndexes, writer, firstRow);\n}\nfunction doHorizontalSplit(table, splitRow, limitColumns, writer, startRow = 0) {\n    // If selection starts at first row then no split is needed.\n    if (splitRow < 1) {\n        return;\n    }\n    const overlappingCells = getVerticallyOverlappingCells(table, splitRow, startRow);\n    // Filter out cells that are not touching insides of the rectangular selection.\n    const cellsToSplit = overlappingCells.filter(({ column, cellWidth })=>isAffectedBySelection(column, cellWidth, limitColumns));\n    return cellsToSplit.map(({ cell })=>splitHorizontally(cell, splitRow, writer));\n}\nfunction doVerticalSplit(table, splitColumn, limitRows, writer) {\n    // If selection starts at first column then no split is needed.\n    if (splitColumn < 1) {\n        return;\n    }\n    const overlappingCells = getHorizontallyOverlappingCells(table, splitColumn);\n    // Filter out cells that are not touching insides of the rectangular selection.\n    const cellsToSplit = overlappingCells.filter(({ row, cellHeight })=>isAffectedBySelection(row, cellHeight, limitRows));\n    return cellsToSplit.map(({ cell, column })=>splitVertically(cell, column, splitColumn, writer));\n}\n/**\n * Checks if cell at given row (column) is affected by a rectangular selection defined by first/last column (row).\n *\n * The same check is used for row as for column.\n */ function isAffectedBySelection(index, span, limit) {\n    const endIndex = index + span - 1;\n    const { first, last } = limit;\n    const isInsideSelection = index >= first && index <= last;\n    const overlapsSelectionFromOutside = index < first && endIndex >= first;\n    return isInsideSelection || overlapsSelectionFromOutside;\n}\n\n/**\n * This plugin enables keyboard navigation for tables.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */ class TableKeyboard extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableKeyboard';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableSelection,\n            TableUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const view = editor.editing.view;\n        const viewDocument = view.document;\n        const t = editor.t;\n        this.listenTo(viewDocument, 'arrowKey', (...args)=>this._onArrowKey(...args), {\n            context: 'table'\n        });\n        this.listenTo(viewDocument, 'tab', (...args)=>this._handleTabOnSelectedTable(...args), {\n            context: 'figure'\n        });\n        this.listenTo(viewDocument, 'tab', (...args)=>this._handleTab(...args), {\n            context: [\n                'th',\n                'td'\n            ]\n        });\n        // Add the information about the keystrokes to the accessibility database.\n        editor.accessibility.addKeystrokeInfoGroup({\n            id: 'table',\n            label: t('Keystrokes that can be used in a table cell'),\n            keystrokes: [\n                {\n                    label: t('Move the selection to the next cell'),\n                    keystroke: 'Tab'\n                },\n                {\n                    label: t('Move the selection to the previous cell'),\n                    keystroke: 'Shift+Tab'\n                },\n                {\n                    label: t('Insert a new table row (when in the last cell of a table)'),\n                    keystroke: 'Tab'\n                },\n                {\n                    label: t('Navigate through the table'),\n                    keystroke: [\n                        [\n                            'arrowup'\n                        ],\n                        [\n                            'arrowright'\n                        ],\n                        [\n                            'arrowdown'\n                        ],\n                        [\n                            'arrowleft'\n                        ]\n                    ]\n                }\n            ]\n        });\n    }\n    /**\n\t * Handles {@link module:engine/view/document~Document#event:tab tab} events for the <kbd>Tab</kbd> key executed\n\t * when the table widget is selected.\n\t */ _handleTabOnSelectedTable(bubblingEventInfo, domEventData) {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const selectedElement = selection.getSelectedElement();\n        if (!selectedElement || !selectedElement.is('element', 'table')) {\n            return;\n        }\n        domEventData.preventDefault();\n        domEventData.stopPropagation();\n        bubblingEventInfo.stop();\n        editor.model.change((writer)=>{\n            writer.setSelection(writer.createRangeIn(selectedElement.getChild(0).getChild(0)));\n        });\n    }\n    /**\n\t * Handles {@link module:engine/view/document~Document#event:tab tab} events for the <kbd>Tab</kbd> key executed\n\t * inside table cells.\n\t */ _handleTab(bubblingEventInfo, domEventData) {\n        const editor = this.editor;\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const tableSelection = this.editor.plugins.get('TableSelection');\n        const selection = editor.model.document.selection;\n        const isForward = !domEventData.shiftKey;\n        let tableCell = tableUtils.getTableCellsContainingSelection(selection)[0];\n        if (!tableCell) {\n            tableCell = tableSelection.getFocusCell();\n        }\n        if (!tableCell) {\n            return;\n        }\n        domEventData.preventDefault();\n        domEventData.stopPropagation();\n        bubblingEventInfo.stop();\n        const tableRow = tableCell.parent;\n        const table = tableRow.parent;\n        const currentRowIndex = table.getChildIndex(tableRow);\n        const currentCellIndex = tableRow.getChildIndex(tableCell);\n        const isFirstCellInRow = currentCellIndex === 0;\n        if (!isForward && isFirstCellInRow && currentRowIndex === 0) {\n            // Set the selection over the whole table if the selection was in the first table cell.\n            editor.model.change((writer)=>{\n                writer.setSelection(writer.createRangeOn(table));\n            });\n            return;\n        }\n        const isLastCellInRow = currentCellIndex === tableRow.childCount - 1;\n        const isLastRow = currentRowIndex === tableUtils.getRows(table) - 1;\n        if (isForward && isLastRow && isLastCellInRow) {\n            editor.execute('insertTableRowBelow');\n            // Check if the command actually added a row. If `insertTableRowBelow` execution didn't add a row (because it was disabled\n            // or it got overwritten) set the selection over the whole table to mirror the first cell case.\n            if (currentRowIndex === tableUtils.getRows(table) - 1) {\n                editor.model.change((writer)=>{\n                    writer.setSelection(writer.createRangeOn(table));\n                });\n                return;\n            }\n        }\n        let cellToFocus;\n        // Move to the first cell in the next row.\n        if (isForward && isLastCellInRow) {\n            const nextRow = table.getChild(currentRowIndex + 1);\n            cellToFocus = nextRow.getChild(0);\n        } else if (!isForward && isFirstCellInRow) {\n            const previousRow = table.getChild(currentRowIndex - 1);\n            cellToFocus = previousRow.getChild(previousRow.childCount - 1);\n        } else {\n            cellToFocus = tableRow.getChild(currentCellIndex + (isForward ? 1 : -1));\n        }\n        editor.model.change((writer)=>{\n            writer.setSelection(writer.createRangeIn(cellToFocus));\n        });\n    }\n    /**\n\t * Handles {@link module:engine/view/document~Document#event:keydown keydown} events.\n\t */ _onArrowKey(eventInfo, domEventData) {\n        const editor = this.editor;\n        const keyCode = domEventData.keyCode;\n        const direction = getLocalizedArrowKeyCodeDirection(keyCode, editor.locale.contentLanguageDirection);\n        const wasHandled = this._handleArrowKeys(direction, domEventData.shiftKey);\n        if (wasHandled) {\n            domEventData.preventDefault();\n            domEventData.stopPropagation();\n            eventInfo.stop();\n        }\n    }\n    /**\n\t * Handles arrow keys to move the selection around the table.\n\t *\n\t * @param direction The direction of the arrow key.\n\t * @param expandSelection If the current selection should be expanded.\n\t * @returns Returns `true` if key was handled.\n\t */ _handleArrowKeys(direction, expandSelection) {\n        const tableUtils = this.editor.plugins.get(TableUtils);\n        const tableSelection = this.editor.plugins.get('TableSelection');\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const isForward = [\n            'right',\n            'down'\n        ].includes(direction);\n        // In case one or more table cells are selected (from outside),\n        // move the selection to a cell adjacent to the selected table fragment.\n        const selectedCells = tableUtils.getSelectedTableCells(selection);\n        if (selectedCells.length) {\n            let focusCell;\n            if (expandSelection) {\n                focusCell = tableSelection.getFocusCell();\n            } else {\n                focusCell = isForward ? selectedCells[selectedCells.length - 1] : selectedCells[0];\n            }\n            this._navigateFromCellInDirection(focusCell, direction, expandSelection);\n            return true;\n        }\n        // Abort if we're not in a table cell.\n        const tableCell = selection.focus.findAncestor('tableCell');\n        /* istanbul ignore if: paranoid check -- @preserve */ if (!tableCell) {\n            return false;\n        }\n        // When the selection is not collapsed.\n        if (!selection.isCollapsed) {\n            if (expandSelection) {\n                // Navigation is in the opposite direction than the selection direction so this is shrinking of the selection.\n                // Selection for sure will not approach cell edge.\n                //\n                // With a special case when all cell content is selected - then selection should expand to the other cell.\n                // Note: When the entire cell gets selected using CTRL+A, the selection is always forward.\n                if (selection.isBackward == isForward && !selection.containsEntireContent(tableCell)) {\n                    return false;\n                }\n            } else {\n                const selectedElement = selection.getSelectedElement();\n                // It will collapse for non-object selected so it's not going to move to other cell.\n                if (!selectedElement || !model.schema.isObject(selectedElement)) {\n                    return false;\n                }\n            }\n        }\n        // Let's check if the selection is at the beginning/end of the cell.\n        if (this._isSelectionAtCellEdge(selection, tableCell, isForward)) {\n            this._navigateFromCellInDirection(tableCell, direction, expandSelection);\n            return true;\n        }\n        return false;\n    }\n    /**\n\t * Returns `true` if the selection is at the boundary of a table cell according to the navigation direction.\n\t *\n\t * @param selection The current selection.\n\t * @param tableCell The current table cell element.\n\t * @param isForward The expected navigation direction.\n\t */ _isSelectionAtCellEdge(selection, tableCell, isForward) {\n        const model = this.editor.model;\n        const schema = this.editor.model.schema;\n        const focus = isForward ? selection.getLastPosition() : selection.getFirstPosition();\n        // If the current limit element is not table cell we are for sure not at the cell edge.\n        // Also `modifySelection` will not let us out of it.\n        if (!schema.getLimitElement(focus).is('element', 'tableCell')) {\n            const boundaryPosition = model.createPositionAt(tableCell, isForward ? 'end' : 0);\n            return boundaryPosition.isTouching(focus);\n        }\n        const probe = model.createSelection(focus);\n        model.modifySelection(probe, {\n            direction: isForward ? 'forward' : 'backward'\n        });\n        // If there was no change in the focus position, then it's not possible to move the selection there.\n        return focus.isEqual(probe.focus);\n    }\n    /**\n\t * Moves the selection from the given table cell in the specified direction.\n\t *\n\t * @param focusCell The table cell that is current multi-cell selection focus.\n\t * @param direction Direction in which selection should move.\n\t * @param expandSelection If the current selection should be expanded. Default value is false.\n\t */ _navigateFromCellInDirection(focusCell, direction, expandSelection = false) {\n        const model = this.editor.model;\n        const table = focusCell.findAncestor('table');\n        const tableMap = [\n            ...new TableWalker(table, {\n                includeAllSlots: true\n            })\n        ];\n        const { row: lastRow, column: lastColumn } = tableMap[tableMap.length - 1];\n        const currentCellInfo = tableMap.find(({ cell })=>cell == focusCell);\n        let { row, column } = currentCellInfo;\n        switch(direction){\n            case 'left':\n                column--;\n                break;\n            case 'up':\n                row--;\n                break;\n            case 'right':\n                column += currentCellInfo.cellWidth;\n                break;\n            case 'down':\n                row += currentCellInfo.cellHeight;\n                break;\n        }\n        const isOutsideVertically = row < 0 || row > lastRow;\n        const isBeforeFirstCell = column < 0 && row <= 0;\n        const isAfterLastCell = column > lastColumn && row >= lastRow;\n        // Note that if the table cell at the end of a row is row-spanned then isAfterLastCell will never be true.\n        // However, we don't know if user was navigating on the last row or not, so let's stay in the table.\n        if (isOutsideVertically || isBeforeFirstCell || isAfterLastCell) {\n            model.change((writer)=>{\n                writer.setSelection(writer.createRangeOn(table));\n            });\n            return;\n        }\n        if (column < 0) {\n            column = expandSelection ? 0 : lastColumn;\n            row--;\n        } else if (column > lastColumn) {\n            column = expandSelection ? lastColumn : 0;\n            row++;\n        }\n        const cellToSelect = tableMap.find((cellInfo)=>cellInfo.row == row && cellInfo.column == column).cell;\n        const isForward = [\n            'right',\n            'down'\n        ].includes(direction);\n        const tableSelection = this.editor.plugins.get('TableSelection');\n        if (expandSelection && tableSelection.isEnabled) {\n            const anchorCell = tableSelection.getAnchorCell() || focusCell;\n            tableSelection.setCellSelection(anchorCell, cellToSelect);\n        } else {\n            const positionToSelect = model.createPositionAt(cellToSelect, isForward ? 0 : 'end');\n            model.change((writer)=>{\n                writer.setSelection(positionToSelect);\n            });\n        }\n    }\n}\n\n/**\n * The mouse selection event observer.\n *\n * It registers listeners for the following DOM events:\n *\n * - `'mousemove'`\n * - `'mouseleave'`\n *\n * Note that this observer is disabled by default. To enable this observer, it needs to be added to\n * {@link module:engine/view/view~View} using the {@link module:engine/view/view~View#addObserver} method.\n *\n * The observer is registered by the {@link module:table/tableselection~TableSelection} plugin.\n */ class MouseEventsObserver extends DomEventObserver {\n    domEventType = [\n        'mousemove',\n        'mouseleave'\n    ];\n    /**\n\t * @inheritDoc\n\t */ onDomEvent(domEvent) {\n        this.fire(domEvent.type, domEvent);\n    }\n}\n\n/**\n * This plugin enables a table cells' selection with the mouse.\n * It is loaded automatically by the {@link module:table/table~Table} plugin.\n */ class TableMouse extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableMouse';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableSelection,\n            TableUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Currently the MouseObserver only handles `mousedown` and `mouseup` events.\n        // TODO move to the engine?\n        editor.editing.view.addObserver(MouseEventsObserver);\n        this._enableShiftClickSelection();\n        this._enableMouseDragSelection();\n    }\n    /**\n\t * Enables making cells selection by <kbd>Shift</kbd>+click. Creates a selection from the cell which previously held\n\t * the selection to the cell which was clicked. It can be the same cell, in which case it selects a single cell.\n\t */ _enableShiftClickSelection() {\n        const editor = this.editor;\n        const tableUtils = editor.plugins.get(TableUtils);\n        let blockSelectionChange = false;\n        const tableSelection = editor.plugins.get(TableSelection);\n        this.listenTo(editor.editing.view.document, 'mousedown', (evt, domEventData)=>{\n            const selection = editor.model.document.selection;\n            if (!this.isEnabled || !tableSelection.isEnabled) {\n                return;\n            }\n            if (!domEventData.domEvent.shiftKey) {\n                return;\n            }\n            const anchorCell = tableSelection.getAnchorCell() || tableUtils.getTableCellsContainingSelection(selection)[0];\n            if (!anchorCell) {\n                return;\n            }\n            const targetCell = this._getModelTableCellFromDomEvent(domEventData);\n            if (targetCell && haveSameTableParent(anchorCell, targetCell)) {\n                blockSelectionChange = true;\n                tableSelection.setCellSelection(anchorCell, targetCell);\n                domEventData.preventDefault();\n            }\n        });\n        this.listenTo(editor.editing.view.document, 'mouseup', ()=>{\n            blockSelectionChange = false;\n        });\n        // We need to ignore a `selectionChange` event that is fired after we render our new table cells selection.\n        // When downcasting table cells selection to the view, we put the view selection in the last selected cell\n        // in a place that may not be natively a \"correct\" location. This is – we put it directly in the `<td>` element.\n        // All browsers fire the native `selectionchange` event.\n        // However, all browsers except Safari return the selection in the exact place where we put it\n        // (even though it's visually normalized). Safari returns `<td><p>^foo` that makes our selection observer\n        // fire our `selectionChange` event (because the view selection that we set in the first step differs from the DOM selection).\n        // Since `selectionChange` is fired, we automatically update the model selection that moves it that paragraph.\n        // This breaks our dear cells selection.\n        //\n        // Theoretically this issue concerns only Safari that is the only browser that do normalize the selection.\n        // However, to avoid code branching and to have a good coverage for this event blocker, I enabled it for all browsers.\n        //\n        // Note: I'm keeping the `blockSelectionChange` state separately for shift+click and mouse drag (exact same logic)\n        // so I don't have to try to analyze whether they don't overlap in some weird cases. Probably they don't.\n        // But I have other things to do, like writing this comment.\n        this.listenTo(editor.editing.view.document, 'selectionChange', (evt)=>{\n            if (blockSelectionChange) {\n                // @if CK_DEBUG // console.log( 'Blocked selectionChange to avoid breaking table cells selection.' );\n                evt.stop();\n            }\n        }, {\n            priority: 'highest'\n        });\n    }\n    /**\n\t * Enables making cells selection by dragging.\n\t *\n\t * The selection is made only on mousemove. Mouse tracking is started on mousedown.\n\t * However, the cells selection is enabled only after the mouse cursor left the anchor cell.\n\t * Thanks to that normal text selection within one cell works just fine. However, you can still select\n\t * just one cell by leaving the anchor cell and moving back to it.\n\t */ _enableMouseDragSelection() {\n        const editor = this.editor;\n        let anchorCell, targetCell;\n        let beganCellSelection = false;\n        let blockSelectionChange = false;\n        const tableSelection = editor.plugins.get(TableSelection);\n        this.listenTo(editor.editing.view.document, 'mousedown', (evt, domEventData)=>{\n            if (!this.isEnabled || !tableSelection.isEnabled) {\n                return;\n            }\n            // Make sure to not conflict with the shift+click listener and any other possible handler.\n            if (domEventData.domEvent.shiftKey || domEventData.domEvent.ctrlKey || domEventData.domEvent.altKey) {\n                return;\n            }\n            anchorCell = this._getModelTableCellFromDomEvent(domEventData);\n        });\n        this.listenTo(editor.editing.view.document, 'mousemove', (evt, domEventData)=>{\n            if (!domEventData.domEvent.buttons) {\n                return;\n            }\n            if (!anchorCell) {\n                return;\n            }\n            const newTargetCell = this._getModelTableCellFromDomEvent(domEventData);\n            if (newTargetCell && haveSameTableParent(anchorCell, newTargetCell)) {\n                targetCell = newTargetCell;\n                // Switch to the cell selection mode after the mouse cursor left the anchor cell.\n                // Switch off only on mouseup (makes selecting a single cell possible).\n                if (!beganCellSelection && targetCell != anchorCell) {\n                    beganCellSelection = true;\n                }\n            }\n            // Yep, not making a cell selection yet. See method docs.\n            if (!beganCellSelection) {\n                return;\n            }\n            blockSelectionChange = true;\n            tableSelection.setCellSelection(anchorCell, targetCell);\n            domEventData.preventDefault();\n        });\n        this.listenTo(editor.editing.view.document, 'mouseup', ()=>{\n            beganCellSelection = false;\n            blockSelectionChange = false;\n            anchorCell = null;\n            targetCell = null;\n        });\n        // See the explanation in `_enableShiftClickSelection()`.\n        this.listenTo(editor.editing.view.document, 'selectionChange', (evt)=>{\n            if (blockSelectionChange) {\n                // @if CK_DEBUG // console.log( 'Blocked selectionChange to avoid breaking table cells selection.' );\n                evt.stop();\n            }\n        }, {\n            priority: 'highest'\n        });\n    }\n    /**\n\t * Returns the model table cell element based on the target element of the passed DOM event.\n\t *\n\t * @returns Returns the table cell or `undefined`.\n\t */ _getModelTableCellFromDomEvent(domEventData) {\n        // Note: Work with positions (not element mapping) because the target element can be an attribute or other non-mapped element.\n        const viewTargetElement = domEventData.target;\n        const viewPosition = this.editor.editing.view.createPositionAt(viewTargetElement, 0);\n        const modelPosition = this.editor.editing.mapper.toModelPosition(viewPosition);\n        const modelElement = modelPosition.parent;\n        return modelElement.findAncestor('tableCell', {\n            includeSelf: true\n        });\n    }\n}\nfunction haveSameTableParent(cellA, cellB) {\n    return cellA.parent.parent == cellB.parent.parent;\n}\n\n/**\n * The table plugin.\n *\n * For a detailed overview, check the {@glink features/tables/tables Table feature documentation}.\n *\n * This is a \"glue\" plugin that loads the following table features:\n *\n * * {@link module:table/tableediting~TableEditing editing feature},\n * * {@link module:table/tableselection~TableSelection selection feature},\n * * {@link module:table/tablekeyboard~TableKeyboard keyboard navigation feature},\n * * {@link module:table/tablemouse~TableMouse mouse selection feature},\n * * {@link module:table/tableclipboard~TableClipboard clipboard feature},\n * * {@link module:table/tableui~TableUI UI feature}.\n */ class Table extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableEditing,\n            TableUI,\n            TableSelection,\n            TableMouse,\n            TableKeyboard,\n            TableClipboard,\n            Widget\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Table';\n    }\n}\n\n/**\n * The plain table output feature.\n */ class PlainTableOutput extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'PlainTableOutput';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            Table\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        // Override default table data downcast converter.\n        editor.conversion.for('dataDowncast').elementToStructure({\n            model: 'table',\n            view: downcastTableElement,\n            converterPriority: 'high'\n        });\n        // Make sure table <caption> is downcasted into <caption> in the data pipeline when necessary.\n        if (editor.plugins.has('TableCaption')) {\n            editor.conversion.for('dataDowncast').elementToElement({\n                model: 'caption',\n                view: (modelElement, { writer })=>{\n                    if (modelElement.parent.name === 'table') {\n                        return writer.createContainerElement('caption');\n                    }\n                },\n                converterPriority: 'high'\n            });\n        }\n        // Handle border-style, border-color, border-width and background-color table attributes.\n        if (editor.plugins.has('TableProperties')) {\n            downcastTableBorderAndBackgroundAttributes(editor);\n        }\n    }\n}\n/**\n * The plain table downcast converter callback.\n *\n * @param table Table model element.\n * @param conversionApi The conversion API object.\n * @returns Created element.\n */ function downcastTableElement(table, { writer }) {\n    const headingRows = table.getAttribute('headingRows') || 0;\n    // Table head rows slot.\n    const headRowsSlot = writer.createSlot((element)=>element.is('element', 'tableRow') && element.index < headingRows);\n    // Table body rows slot.\n    const bodyRowsSlot = writer.createSlot((element)=>element.is('element', 'tableRow') && element.index >= headingRows);\n    // Table children slot.\n    const childrenSlot = writer.createSlot((element)=>!element.is('element', 'tableRow'));\n    // Table <thead> element with all the heading rows.\n    const theadElement = writer.createContainerElement('thead', null, headRowsSlot);\n    // Table <tbody> element with all the body rows.\n    const tbodyElement = writer.createContainerElement('tbody', null, bodyRowsSlot);\n    // Table contents element containing <thead> and <tbody> when necessary.\n    const tableContentElements = [];\n    if (headingRows) {\n        tableContentElements.push(theadElement);\n    }\n    if (headingRows < table.childCount) {\n        tableContentElements.push(tbodyElement);\n    }\n    // Create table structure.\n    //\n    // <table>\n    //    {children-slot-like-caption}\n    //    <thead>\n    //        {table-head-rows-slot}\n    //    </thead>\n    //    <tbody>\n    //        {table-body-rows-slot}\n    //    </tbody>\n    // </table>\n    return writer.createContainerElement('table', null, [\n        childrenSlot,\n        ...tableContentElements\n    ]);\n}\n/**\n * Register table border and background attributes converters.\n */ function downcastTableBorderAndBackgroundAttributes(editor) {\n    const modelAttributes = {\n        'border-width': 'tableBorderWidth',\n        'border-color': 'tableBorderColor',\n        'border-style': 'tableBorderStyle',\n        'background-color': 'tableBackgroundColor'\n    };\n    for (const [styleName, modelAttribute] of Object.entries(modelAttributes)){\n        editor.conversion.for('dataDowncast').add((dispatcher)=>{\n            return dispatcher.on(`attribute:${modelAttribute}:table`, (evt, data, conversionApi)=>{\n                const { item, attributeNewValue } = data;\n                const { mapper, writer } = conversionApi;\n                if (!conversionApi.consumable.consume(item, evt.name)) {\n                    return;\n                }\n                const table = mapper.toViewElement(item);\n                if (attributeNewValue) {\n                    writer.setStyle(styleName, attributeNewValue, table);\n                } else {\n                    writer.removeStyle(styleName, table);\n                }\n            }, {\n                priority: 'high'\n            });\n        });\n    }\n}\n\n/**\n * Depending on the position of the selection either return the selected table or the table higher in the hierarchy.\n */ function getSelectionAffectedTableWidget(selection) {\n    const selectedTable = getSelectedTableWidget(selection);\n    if (selectedTable) {\n        return selectedTable;\n    }\n    return getTableWidgetAncestor(selection);\n}\n/**\n * Returns a table widget editing view element if one is selected.\n */ function getSelectedTableWidget(selection) {\n    const viewElement = selection.getSelectedElement();\n    if (viewElement && isTableWidget(viewElement)) {\n        return viewElement;\n    }\n    return null;\n}\n/**\n * Returns a table widget editing view element if one is among the selection's ancestors.\n */ function getTableWidgetAncestor(selection) {\n    const selectionPosition = selection.getFirstPosition();\n    if (!selectionPosition) {\n        return null;\n    }\n    let parent = selectionPosition.parent;\n    while(parent){\n        if (parent.is('element') && isTableWidget(parent)) {\n            return parent;\n        }\n        parent = parent.parent;\n    }\n    return null;\n}\n/**\n * Checks if a given view element is a table widget.\n */ function isTableWidget(viewElement) {\n    return !!viewElement.getCustomProperty('table') && isWidget(viewElement);\n}\n\n/**\n * The table toolbar class. It creates toolbars for the table feature and its content (for now only for the table cell content).\n *\n * The table toolbar shows up when a table widget is selected. Its components (e.g. buttons) are created based on the\n * {@link module:table/tableconfig~TableConfig#tableToolbar `table.tableToolbar` configuration option}.\n *\n * Table content toolbar shows up when the selection is inside the content of a table. It creates its component based on the\n * {@link module:table/tableconfig~TableConfig#contentToolbar `table.contentToolbar` configuration option}.\n */ class TableToolbar extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            WidgetToolbarRepository\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableToolbar';\n    }\n    /**\n\t * @inheritDoc\n\t */ afterInit() {\n        const editor = this.editor;\n        const t = editor.t;\n        const widgetToolbarRepository = editor.plugins.get(WidgetToolbarRepository);\n        const tableContentToolbarItems = editor.config.get('table.contentToolbar');\n        const tableToolbarItems = editor.config.get('table.tableToolbar');\n        if (tableContentToolbarItems) {\n            widgetToolbarRepository.register('tableContent', {\n                ariaLabel: t('Table toolbar'),\n                items: tableContentToolbarItems,\n                getRelatedElement: getTableWidgetAncestor\n            });\n        }\n        if (tableToolbarItems) {\n            widgetToolbarRepository.register('table', {\n                ariaLabel: t('Table toolbar'),\n                items: tableToolbarItems,\n                getRelatedElement: getSelectedTableWidget\n            });\n        }\n    }\n}\n\n/**\n * The color input view class. It allows the user to type in a color (hex, rgb, etc.)\n * or choose it from the configurable color palette with a preview.\n *\n * @internal\n */ class ColorInputView extends View {\n    /**\n\t * A cached reference to the options passed to the constructor.\n\t */ options;\n    /**\n\t * Tracks information about the DOM focus in the view.\n\t */ focusTracker;\n    /**\n\t * Helps cycling over focusable children in the input view.\n\t */ focusCycler;\n    /**\n\t * A collection of views that can be focused in the view.\n\t */ _focusables;\n    /**\n\t * An instance of the dropdown allowing to select a color from a grid.\n\t */ dropdownView;\n    /**\n\t * An instance of the input allowing the user to type a color value.\n\t */ inputView;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * The flag that indicates whether the user is still typing.\n\t * If set to true, it means that the text input field ({@link #inputView}) still has the focus.\n\t * So, we should interrupt the user by replacing the input's value.\n\t */ _stillTyping;\n    /**\n\t * Creates an instance of the color input view.\n\t *\n\t * @param locale The locale instance.\n\t * @param options The input options.\n\t * @param options.colorDefinitions The colors to be displayed in the palette inside the input's dropdown.\n\t * @param options.columns The number of columns in which the colors will be displayed.\n\t * @param options.defaultColorValue If specified, the color input view will replace the \"Remove color\" button with\n\t * the \"Restore default\" button. Instead of clearing the input field, the default color value will be set.\n\t */ constructor(locale, options){\n        super(locale);\n        this.set('value', '');\n        this.set('isReadOnly', false);\n        this.set('isFocused', false);\n        this.set('isEmpty', true);\n        this.options = options;\n        this.focusTracker = new FocusTracker();\n        this._focusables = new ViewCollection();\n        this.dropdownView = this._createDropdownView();\n        this.inputView = this._createInputTextView();\n        this.keystrokes = new KeystrokeHandler();\n        this._stillTyping = false;\n        this.focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate items backwards using the <kbd>Shift</kbd> + <kbd>Tab</kbd> keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate items forwards using the <kbd>Tab</kbd> key.\n                focusNext: 'tab'\n            }\n        });\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-input-color'\n                ]\n            },\n            children: [\n                this.dropdownView,\n                this.inputView\n            ]\n        });\n        this.on('change:value', (evt, name, inputValue)=>this._setInputValue(inputValue));\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        [\n            this.inputView,\n            this.dropdownView.buttonView\n        ].forEach((view)=>{\n            this.focusTracker.add(view.element);\n            this._focusables.add(view);\n        });\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * Focuses the view.\n\t */ focus(direction) {\n        if (direction === -1) {\n            this.focusCycler.focusLast();\n        } else {\n            this.focusCycler.focusFirst();\n        }\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Creates and configures the {@link #dropdownView}.\n\t */ _createDropdownView() {\n        const locale = this.locale;\n        const t = locale.t;\n        const bind = this.bindTemplate;\n        const colorSelector = this._createColorSelector(locale);\n        const dropdown = createDropdown(locale);\n        const colorPreview = new View();\n        colorPreview.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-input-color__button__preview'\n                ],\n                style: {\n                    backgroundColor: bind.to('value')\n                }\n            },\n            children: [\n                {\n                    tag: 'span',\n                    attributes: {\n                        class: [\n                            'ck',\n                            'ck-input-color__button__preview__no-color-indicator',\n                            bind.if('value', 'ck-hidden', (value)=>value != '')\n                        ]\n                    }\n                }\n            ]\n        });\n        dropdown.buttonView.extendTemplate({\n            attributes: {\n                class: 'ck-input-color__button'\n            }\n        });\n        dropdown.buttonView.children.add(colorPreview);\n        dropdown.buttonView.label = t('Color picker');\n        dropdown.buttonView.tooltip = true;\n        dropdown.panelPosition = locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';\n        dropdown.panelView.children.add(colorSelector);\n        dropdown.bind('isEnabled').to(this, 'isReadOnly', (value)=>!value);\n        dropdown.on('change:isOpen', (evt, name, isVisible)=>{\n            if (isVisible) {\n                colorSelector.updateSelectedColors();\n                colorSelector.showColorGridsFragment();\n            }\n        });\n        return dropdown;\n    }\n    /**\n\t * Creates and configures an instance of {@link module:ui/inputtext/inputtextview~InputTextView}.\n\t *\n\t * @returns A configured instance to be set as {@link #inputView}.\n\t */ _createInputTextView() {\n        const locale = this.locale;\n        const inputView = new InputTextView(locale);\n        inputView.extendTemplate({\n            on: {\n                blur: inputView.bindTemplate.to('blur')\n            }\n        });\n        inputView.value = this.value;\n        inputView.bind('isReadOnly', 'hasError').to(this);\n        this.bind('isFocused', 'isEmpty').to(inputView);\n        inputView.on('input', ()=>{\n            const inputValue = inputView.element.value;\n            // Check if the value matches one of our defined colors' label.\n            const mappedColor = this.options.colorDefinitions.find((def)=>inputValue === def.label);\n            this._stillTyping = true;\n            this.value = mappedColor && mappedColor.color || inputValue;\n        });\n        inputView.on('blur', ()=>{\n            this._stillTyping = false;\n            this._setInputValue(inputView.element.value);\n        });\n        inputView.delegate('input').to(this);\n        return inputView;\n    }\n    /**\n\t * Creates and configures the panel with \"color grid\" and \"color picker\" inside the {@link #dropdownView}.\n\t */ _createColorSelector(locale) {\n        const t = locale.t;\n        const defaultColor = this.options.defaultColorValue || '';\n        const removeColorButtonLabel = defaultColor ? t('Restore default') : t('Remove color');\n        const colorSelector = new ColorSelectorView(locale, {\n            colors: this.options.colorDefinitions,\n            columns: this.options.columns,\n            removeButtonLabel: removeColorButtonLabel,\n            colorPickerLabel: t('Color picker'),\n            colorPickerViewConfig: this.options.colorPickerConfig === false ? false : {\n                ...this.options.colorPickerConfig,\n                hideInput: true\n            }\n        });\n        colorSelector.appendUI();\n        colorSelector.on('execute', (evt, data)=>{\n            if (data.source === 'colorPickerSaveButton') {\n                this.dropdownView.isOpen = false;\n                return;\n            }\n            this.value = data.value || defaultColor;\n            // Trigger the listener that actually applies the set value.\n            this.fire('input');\n            if (data.source !== 'colorPicker') {\n                this.dropdownView.isOpen = false;\n            }\n        });\n        /**\n\t\t * Color is saved before changes in color picker. In case \"cancel button\" is pressed\n\t\t * this color will be applied.\n\t\t */ let backupColor = this.value;\n        colorSelector.on('colorPicker:cancel', ()=>{\n            /**\n\t\t\t * Revert color to previous value before changes in color picker.\n\t\t\t */ this.value = backupColor;\n            this.fire('input');\n            this.dropdownView.isOpen = false;\n        });\n        colorSelector.colorGridsFragmentView.colorPickerButtonView.on('execute', ()=>{\n            /**\n\t\t\t * Save color value before changes in color picker.\n\t\t\t */ backupColor = this.value;\n        });\n        colorSelector.bind('selectedColor').to(this, 'value');\n        return colorSelector;\n    }\n    /**\n\t * Sets {@link #inputView}'s value property to the color value or color label,\n\t * if there is one and the user is not typing.\n\t *\n\t * Handles cases like:\n\t *\n\t * * Someone picks the color in the grid.\n\t * * The color is set from the plugin level.\n\t *\n\t * @param inputValue Color value to be set.\n\t */ _setInputValue(inputValue) {\n        if (!this._stillTyping) {\n            const normalizedInputValue = normalizeColor(inputValue);\n            // Check if the value matches one of our defined colors.\n            const mappedColor = this.options.colorDefinitions.find((def)=>normalizedInputValue === normalizeColor(def.color));\n            if (mappedColor) {\n                this.inputView.value = mappedColor.label;\n            } else {\n                this.inputView.value = inputValue || '';\n            }\n        }\n    }\n}\n/**\n * Normalizes color value, by stripping extensive whitespace.\n * For example., transforms:\n * * `   rgb(  25 50    0 )` to `rgb(25 50 0)`,\n * * \"\\t  rgb(  25 ,  50,0 )\t\t\" to `rgb(25 50 0)`.\n *\n * @param colorString The value to be normalized.\n */ function normalizeColor(colorString) {\n    return colorString// Remove any whitespace right after `(` or `,`.\n    .replace(/([(,])\\s+/g, '$1')// Remove any whitespace at the beginning or right before the end, `)`, `,`, or another whitespace.\n    .replace(/^\\s+|\\s+(?=[),\\s]|$)/g, '')// Then, replace `,` or whitespace with a single space.\n    .replace(/,|\\s/g, ' ');\n}\n\nconst isEmpty = (val)=>val === '';\n/**\n * Returns an object containing pairs of CSS border style values and their localized UI\n * labels. Used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}\n * and {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView}.\n *\n * @param t The \"t\" function provided by the editor that is used to localize strings.\n */ function getBorderStyleLabels(t) {\n    return {\n        none: t('None'),\n        solid: t('Solid'),\n        dotted: t('Dotted'),\n        dashed: t('Dashed'),\n        double: t('Double'),\n        groove: t('Groove'),\n        ridge: t('Ridge'),\n        inset: t('Inset'),\n        outset: t('Outset')\n    };\n}\n/**\n * Returns a localized error string that can be displayed next to color (background, border)\n * fields that have an invalid value.\n *\n * @param t The \"t\" function provided by the editor that is used to localize strings.\n */ function getLocalizedColorErrorText(t) {\n    return t('The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".');\n}\n/**\n * Returns a localized error string that can be displayed next to length (padding, border width)\n * fields that have an invalid value.\n *\n * @param t The \"t\" function provided by the editor that is used to localize strings.\n */ function getLocalizedLengthErrorText(t) {\n    return t('The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".');\n}\n/**\n * Returns `true` when the passed value is an empty string or a valid CSS color expression.\n * Otherwise, `false` is returned.\n *\n * See {@link module:engine/view/styles/utils~isColor}.\n */ function colorFieldValidator(value) {\n    value = value.trim().toLowerCase();\n    return isEmpty(value) || isColor(value);\n}\n/**\n * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.\n * Otherwise, `false` is returned.\n *\n * See {@link module:engine/view/styles/utils~isLength}.\n * See {@link module:engine/view/styles/utils~isPercentage}.\n */ function lengthFieldValidator(value) {\n    value = value.trim();\n    return isEmpty(value) || isNumberString(value) || isLength(value) || isPercentage(value);\n}\n/**\n * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.\n * Otherwise, `false` is returned.\n *\n * See {@link module:engine/view/styles/utils~isLength}.\n */ function lineWidthFieldValidator(value) {\n    value = value.trim();\n    return isEmpty(value) || isNumberString(value) || isLength(value);\n}\n/**\n * Generates item definitions for a UI dropdown that allows changing the border style of a table or a table cell.\n *\n * @param defaultStyle The default border.\n */ function getBorderStyleDefinitions(view, defaultStyle) {\n    const itemDefinitions = new Collection();\n    const styleLabels = getBorderStyleLabels(view.t);\n    for(const style in styleLabels){\n        const definition = {\n            type: 'button',\n            model: new ViewModel({\n                _borderStyleValue: style,\n                label: styleLabels[style],\n                role: 'menuitemradio',\n                withText: true\n            })\n        };\n        if (style === 'none') {\n            definition.model.bind('isOn').to(view, 'borderStyle', (value)=>{\n                if (defaultStyle === 'none') {\n                    return !value;\n                }\n                return value === style;\n            });\n        } else {\n            definition.model.bind('isOn').to(view, 'borderStyle', (value)=>{\n                return value === style;\n            });\n        }\n        itemDefinitions.add(definition);\n    }\n    return itemDefinitions;\n}\n/**\n * A helper that fills a toolbar with buttons that:\n *\n * * have some labels,\n * * have some icons,\n * * set a certain UI view property value upon execution.\n *\n * @param nameToValue A function that maps a button name to a value. By default names are the same as values.\n */ function fillToolbar(options) {\n    const { view, icons, toolbar, labels, propertyName, nameToValue, defaultValue } = options;\n    for(const name in labels){\n        const button = new ButtonView(view.locale);\n        button.set({\n            label: labels[name],\n            icon: icons[name],\n            tooltip: labels[name]\n        });\n        // If specified the `nameToValue()` callback, map the value based on the option's name.\n        const buttonValue = nameToValue ? nameToValue(name) : name;\n        button.bind('isOn').to(view, propertyName, (value)=>{\n            // `value` comes from `view[ propertyName ]`.\n            let valueToCompare = value;\n            // If it's empty, and the `defaultValue` is specified, use it instead.\n            if (value === '' && defaultValue) {\n                valueToCompare = defaultValue;\n            }\n            return buttonValue === valueToCompare;\n        });\n        button.on('execute', ()=>{\n            view[propertyName] = buttonValue;\n        });\n        toolbar.items.add(button);\n    }\n}\n/**\n * A default color palette used by various user interfaces related to tables, for instance,\n * by {@link module:table/tablecellproperties/tablecellpropertiesui~TableCellPropertiesUI} or\n * {@link module:table/tableproperties/tablepropertiesui~TablePropertiesUI}.\n *\n * The color palette follows the {@link module:table/tableconfig~TableColorConfig table color configuration format}\n * and contains the following color definitions:\n *\n * ```ts\n * const defaultColors = [\n *   {\n *     color: 'hsl(0, 0%, 0%)',\n *     label: 'Black'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 30%)',\n *     label: 'Dim grey'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 60%)',\n *     label: 'Grey'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 90%)',\n *     label: 'Light grey'\n *   },\n *   {\n *     color: 'hsl(0, 0%, 100%)',\n *     label: 'White',\n *     hasBorder: true\n *   },\n *   {\n *     color: 'hsl(0, 75%, 60%)',\n *     label: 'Red'\n *   },\n *   {\n *     color: 'hsl(30, 75%, 60%)',\n *     label: 'Orange'\n *   },\n *   {\n *     color: 'hsl(60, 75%, 60%)',\n *     label: 'Yellow'\n *   },\n *   {\n *     color: 'hsl(90, 75%, 60%)',\n *     label: 'Light green'\n *   },\n *   {\n *     color: 'hsl(120, 75%, 60%)',\n *     label: 'Green'\n *   },\n *   {\n *     color: 'hsl(150, 75%, 60%)',\n *     label: 'Aquamarine'\n *   },\n *   {\n *     color: 'hsl(180, 75%, 60%)',\n *     label: 'Turquoise'\n *   },\n *   {\n *     color: 'hsl(210, 75%, 60%)',\n *     label: 'Light blue'\n *   },\n *   {\n *     color: 'hsl(240, 75%, 60%)',\n *     label: 'Blue'\n *   },\n *   {\n *     color: 'hsl(270, 75%, 60%)',\n *     label: 'Purple'\n *   }\n * ];\n * ```\n */ const defaultColors = [\n    {\n        color: 'hsl(0, 0%, 0%)',\n        label: 'Black'\n    },\n    {\n        color: 'hsl(0, 0%, 30%)',\n        label: 'Dim grey'\n    },\n    {\n        color: 'hsl(0, 0%, 60%)',\n        label: 'Grey'\n    },\n    {\n        color: 'hsl(0, 0%, 90%)',\n        label: 'Light grey'\n    },\n    {\n        color: 'hsl(0, 0%, 100%)',\n        label: 'White',\n        hasBorder: true\n    },\n    {\n        color: 'hsl(0, 75%, 60%)',\n        label: 'Red'\n    },\n    {\n        color: 'hsl(30, 75%, 60%)',\n        label: 'Orange'\n    },\n    {\n        color: 'hsl(60, 75%, 60%)',\n        label: 'Yellow'\n    },\n    {\n        color: 'hsl(90, 75%, 60%)',\n        label: 'Light green'\n    },\n    {\n        color: 'hsl(120, 75%, 60%)',\n        label: 'Green'\n    },\n    {\n        color: 'hsl(150, 75%, 60%)',\n        label: 'Aquamarine'\n    },\n    {\n        color: 'hsl(180, 75%, 60%)',\n        label: 'Turquoise'\n    },\n    {\n        color: 'hsl(210, 75%, 60%)',\n        label: 'Light blue'\n    },\n    {\n        color: 'hsl(240, 75%, 60%)',\n        label: 'Blue'\n    },\n    {\n        color: 'hsl(270, 75%, 60%)',\n        label: 'Purple'\n    }\n];\n/**\n * Returns a creator for a color input with a label.\n *\n * For given options, it returns a function that creates an instance of a\n * {@link module:table/ui/colorinputview~ColorInputView color input} logically related to\n * a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in the DOM.\n *\n * The helper does the following:\n *\n * * It sets the color input `id` and `ariaDescribedById` attributes.\n * * It binds the color input `isReadOnly` to the labeled view.\n * * It binds the color input `hasError` to the labeled view.\n * * It enables a logic that cleans up the error when the user starts typing in the color input.\n *\n * Usage:\n *\n * ```ts\n * const colorInputCreator = getLabeledColorInputCreator( {\n *   colorConfig: [ ... ],\n *   columns: 3,\n * } );\n *\n * const labeledInputView = new LabeledFieldView( locale, colorInputCreator );\n * console.log( labeledInputView.view ); // A color input instance.\n * ```\n *\n * @internal\n * @param options Color input options.\n * @param options.colorConfig The configuration of the color palette displayed in the input's dropdown.\n * @param options.columns The configuration of the number of columns the color palette consists of in the input's dropdown.\n * @param options.defaultColorValue If specified, the color input view will replace the \"Remove color\" button with\n * the \"Restore default\" button. Instead of clearing the input field, the default color value will be set.\n * @param options.colorPickerConfig The configuration of the color picker. You could disable it or define your output format.\n */ function getLabeledColorInputCreator(options) {\n    return (labeledFieldView, viewUid, statusUid)=>{\n        const colorInputView = new ColorInputView(labeledFieldView.locale, {\n            colorDefinitions: colorConfigToColorGridDefinitions(options.colorConfig),\n            columns: options.columns,\n            defaultColorValue: options.defaultColorValue,\n            colorPickerConfig: options.colorPickerConfig\n        });\n        colorInputView.inputView.set({\n            id: viewUid,\n            ariaDescribedById: statusUid\n        });\n        colorInputView.bind('isReadOnly').to(labeledFieldView, 'isEnabled', (value)=>!value);\n        colorInputView.bind('hasError').to(labeledFieldView, 'errorText', (value)=>!!value);\n        colorInputView.on('input', ()=>{\n            // UX: Make the error text disappear and disable the error indicator as the user\n            // starts fixing the errors.\n            labeledFieldView.errorText = null;\n        });\n        labeledFieldView.bind('isEmpty', 'isFocused').to(colorInputView);\n        return colorInputView;\n    };\n}\n/**\n * A simple helper method to detect number strings.\n * I allows full number notation, so omitting 0 is not allowed:\n */ function isNumberString(value) {\n    const parsedValue = parseFloat(value);\n    return !Number.isNaN(parsedValue) && value === String(parsedValue);\n}\nfunction colorConfigToColorGridDefinitions(colorConfig) {\n    return colorConfig.map((item)=>({\n            color: item.model,\n            label: item.label,\n            options: {\n                hasBorder: item.hasBorder\n            }\n        }));\n}\n\n/**\n * The class representing a single row in a complex form,\n * used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.\n *\n * **Note**: For now this class is private. When more use cases arrive (beyond ckeditor5-table),\n * it will become a component in ckeditor5-ui.\n *\n * @internal\n */ class FormRowView extends View {\n    /**\n\t * A collection of row items (buttons, dropdowns, etc.).\n\t */ children;\n    /**\n\t * Creates an instance of the form row class.\n\t *\n\t * @param locale The locale instance.\n\t * @param options.labelView When passed, the row gets the `group` and `aria-labelledby`\n\t * DOM attributes and gets described by the label.\n\t */ constructor(locale, options = {}){\n        super(locale);\n        const bind = this.bindTemplate;\n        this.set('class', options.class || null);\n        this.children = this.createCollection();\n        if (options.children) {\n            options.children.forEach((child)=>this.children.add(child));\n        }\n        this.set('_role', null);\n        this.set('_ariaLabelledBy', null);\n        if (options.labelView) {\n            this.set({\n                _role: 'group',\n                _ariaLabelledBy: options.labelView.id\n            });\n        }\n        this.setTemplate({\n            tag: 'div',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-form__row',\n                    bind.to('class')\n                ],\n                role: bind.to('_role'),\n                'aria-labelledby': bind.to('_ariaLabelledBy')\n            },\n            children: this.children\n        });\n    }\n}\n\n/**\n * The class representing a table cell properties form, allowing users to customize\n * certain style aspects of a table cell, for instance, border, padding, text alignment, etc..\n */ class TableCellPropertiesView extends View {\n    /**\n\t * Options passed to the view. See {@link #constructor} to learn more.\n\t */ options;\n    /**\n\t * Tracks information about the DOM focus in the form.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * A collection of child views in the form.\n\t */ children;\n    /**\n\t * A dropdown that allows selecting the style of the table cell border.\n\t */ borderStyleDropdown;\n    /**\n\t * An input that allows specifying the width of the table cell border.\n\t */ borderWidthInput;\n    /**\n\t * An input that allows specifying the color of the table cell border.\n\t */ borderColorInput;\n    /**\n\t * An input that allows specifying the table cell background color.\n\t */ backgroundInput;\n    /**\n\t * An input that allows specifying the table cell padding.\n\t */ paddingInput;\n    /**\n\t * An input that allows specifying the table cell width.\n\t */ widthInput;\n    /**\n\t * An input that allows specifying the table cell height.\n\t */ heightInput;\n    /**\n\t * A toolbar with buttons that allow changing the horizontal text alignment in a table cell.\n\t */ horizontalAlignmentToolbar;\n    /**\n\t * A toolbar with buttons that allow changing the vertical text alignment in a table cell.\n\t */ verticalAlignmentToolbar;\n    /**\n\t * The \"Save\" button view.\n\t */ saveButtonView;\n    /**\n\t * The \"Cancel\" button view.\n\t */ cancelButtonView;\n    /**\n\t * A collection of views that can be focused in the form.\n\t */ _focusables;\n    /**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */ _focusCycler;\n    /**\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options Additional configuration of the view.\n\t * @param options.borderColors A configuration of the border color palette used by the\n\t * {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#borderColorInput}.\n\t * @param options.backgroundColors A configuration of the background color palette used by the\n\t * {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView#backgroundInput}.\n\t * @param options.defaultTableCellProperties The default table cell properties.\n\t */ constructor(locale, options){\n        super(locale);\n        this.set({\n            borderStyle: '',\n            borderWidth: '',\n            borderColor: '',\n            padding: '',\n            backgroundColor: '',\n            width: '',\n            height: '',\n            horizontalAlignment: '',\n            verticalAlignment: ''\n        });\n        this.options = options;\n        const { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();\n        const { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();\n        const { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();\n        const { horizontalAlignmentToolbar, verticalAlignmentToolbar, alignmentLabel } = this._createAlignmentFields();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this.children = this.createCollection();\n        this.borderStyleDropdown = borderStyleDropdown;\n        this.borderWidthInput = borderWidthInput;\n        this.borderColorInput = borderColorInput;\n        this.backgroundInput = backgroundInput;\n        this.paddingInput = this._createPaddingField();\n        this.widthInput = widthInput;\n        this.heightInput = heightInput;\n        this.horizontalAlignmentToolbar = horizontalAlignmentToolbar;\n        this.verticalAlignmentToolbar = verticalAlignmentToolbar;\n        // Defer creating to make sure other fields are present and the Save button can\n        // bind its #isEnabled to their error messages so there's no way to save unless all\n        // fields are valid.\n        const { saveButtonView, cancelButtonView } = this._createActionButtons();\n        this.saveButtonView = saveButtonView;\n        this.cancelButtonView = cancelButtonView;\n        this._focusables = new ViewCollection();\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        // Form header.\n        this.children.add(new FormHeaderView(locale, {\n            label: this.t('Cell properties')\n        }));\n        // Border row.\n        this.children.add(new FormRowView(locale, {\n            labelView: borderRowLabel,\n            children: [\n                borderRowLabel,\n                borderStyleDropdown,\n                borderColorInput,\n                borderWidthInput\n            ],\n            class: 'ck-table-form__border-row'\n        }));\n        // Background.\n        this.children.add(new FormRowView(locale, {\n            labelView: backgroundRowLabel,\n            children: [\n                backgroundRowLabel,\n                backgroundInput\n            ],\n            class: 'ck-table-form__background-row'\n        }));\n        // Dimensions row and padding.\n        this.children.add(new FormRowView(locale, {\n            children: [\n                // Dimensions row.\n                new FormRowView(locale, {\n                    labelView: dimensionsLabel,\n                    children: [\n                        dimensionsLabel,\n                        widthInput,\n                        operatorLabel,\n                        heightInput\n                    ],\n                    class: 'ck-table-form__dimensions-row'\n                }),\n                // Padding row.\n                new FormRowView(locale, {\n                    children: [\n                        this.paddingInput\n                    ],\n                    class: 'ck-table-cell-properties-form__padding-row'\n                })\n            ]\n        }));\n        // Text alignment row.\n        this.children.add(new FormRowView(locale, {\n            labelView: alignmentLabel,\n            children: [\n                alignmentLabel,\n                horizontalAlignmentToolbar,\n                verticalAlignmentToolbar\n            ],\n            class: 'ck-table-cell-properties-form__alignment-row'\n        }));\n        // Action row.\n        this.children.add(new FormRowView(locale, {\n            children: [\n                this.saveButtonView,\n                this.cancelButtonView\n            ],\n            class: 'ck-table-form__action-row'\n        }));\n        this.setTemplate({\n            tag: 'form',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-form',\n                    'ck-table-form',\n                    'ck-table-cell-properties-form'\n                ],\n                // https://github.com/ckeditor/ckeditor5-link/issues/90\n                tabindex: '-1'\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        // Enable the \"submit\" event for this view. It can be triggered by the #saveButtonView\n        // which is of the \"submit\" DOM \"type\".\n        submitHandler({\n            view: this\n        });\n        // Maintain continuous focus cycling over views that have focusable children and focus cyclers themselves.\n        [\n            this.borderColorInput,\n            this.backgroundInput\n        ].forEach((view)=>{\n            this._focusCycler.chain(view.fieldView.focusCycler);\n        });\n        [\n            this.borderStyleDropdown,\n            this.borderColorInput,\n            this.borderWidthInput,\n            this.backgroundInput,\n            this.widthInput,\n            this.heightInput,\n            this.paddingInput,\n            this.horizontalAlignmentToolbar,\n            this.verticalAlignmentToolbar,\n            this.saveButtonView,\n            this.cancelButtonView\n        ].forEach((view)=>{\n            // Register the view as focusable.\n            this._focusables.add(view);\n            // Register the view in the focus tracker.\n            this.focusTracker.add(view.element);\n        });\n        // Mainly for closing using \"Esc\" and navigation using \"Tab\".\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the fist focusable field in the form.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #borderStyleDropdown},\n\t * * {@link #borderWidthInput},\n\t * * {@link #borderColorInput}.\n\t */ _createBorderFields() {\n        const defaultTableCellProperties = this.options.defaultTableCellProperties;\n        const defaultBorder = {\n            style: defaultTableCellProperties.borderStyle,\n            width: defaultTableCellProperties.borderWidth,\n            color: defaultTableCellProperties.borderColor\n        };\n        const colorInputCreator = getLabeledColorInputCreator({\n            colorConfig: this.options.borderColors,\n            columns: 5,\n            defaultColorValue: defaultBorder.color,\n            colorPickerConfig: this.options.colorPickerConfig\n        });\n        const locale = this.locale;\n        const t = this.t;\n        const accessibleLabel = t('Style');\n        // -- Group label ---------------------------------------------\n        const borderRowLabel = new LabelView(locale);\n        borderRowLabel.text = t('Border');\n        // -- Style ---------------------------------------------------\n        const styleLabels = getBorderStyleLabels(t);\n        const borderStyleDropdown = new LabeledFieldView(locale, createLabeledDropdown);\n        borderStyleDropdown.set({\n            label: accessibleLabel,\n            class: 'ck-table-form__border-style'\n        });\n        borderStyleDropdown.fieldView.buttonView.set({\n            ariaLabel: accessibleLabel,\n            ariaLabelledBy: undefined,\n            isOn: false,\n            withText: true,\n            tooltip: accessibleLabel\n        });\n        borderStyleDropdown.fieldView.buttonView.bind('label').to(this, 'borderStyle', (value)=>{\n            return styleLabels[value ? value : 'none'];\n        });\n        borderStyleDropdown.fieldView.on('execute', (evt)=>{\n            this.borderStyle = evt.source._borderStyleValue;\n        });\n        borderStyleDropdown.bind('isEmpty').to(this, 'borderStyle', (value)=>!value);\n        addListToDropdown(borderStyleDropdown.fieldView, getBorderStyleDefinitions(this, defaultBorder.style), {\n            role: 'menu',\n            ariaLabel: accessibleLabel\n        });\n        // -- Width ---------------------------------------------------\n        const borderWidthInput = new LabeledFieldView(locale, createLabeledInputText);\n        borderWidthInput.set({\n            label: t('Width'),\n            class: 'ck-table-form__border-width'\n        });\n        borderWidthInput.fieldView.bind('value').to(this, 'borderWidth');\n        borderWidthInput.bind('isEnabled').to(this, 'borderStyle', isBorderStyleSet$1);\n        borderWidthInput.fieldView.on('input', ()=>{\n            this.borderWidth = borderWidthInput.fieldView.element.value;\n        });\n        // -- Color ---------------------------------------------------\n        const borderColorInput = new LabeledFieldView(locale, colorInputCreator);\n        borderColorInput.set({\n            label: t('Color'),\n            class: 'ck-table-form__border-color'\n        });\n        borderColorInput.fieldView.bind('value').to(this, 'borderColor');\n        borderColorInput.bind('isEnabled').to(this, 'borderStyle', isBorderStyleSet$1);\n        borderColorInput.fieldView.on('input', ()=>{\n            this.borderColor = borderColorInput.fieldView.value;\n        });\n        // Reset the border color and width fields depending on the `border-style` value.\n        this.on('change:borderStyle', (evt, name, newValue, oldValue)=>{\n            // When removing the border (`border-style:none`), clear the remaining `border-*` properties.\n            // See: https://github.com/ckeditor/ckeditor5/issues/6227.\n            if (!isBorderStyleSet$1(newValue)) {\n                this.borderColor = '';\n                this.borderWidth = '';\n            }\n            // When setting the `border-style` from `none`, set the default `border-color` and `border-width` properties.\n            if (!isBorderStyleSet$1(oldValue)) {\n                this.borderColor = defaultBorder.color;\n                this.borderWidth = defaultBorder.width;\n            }\n        });\n        return {\n            borderRowLabel,\n            borderStyleDropdown,\n            borderColorInput,\n            borderWidthInput\n        };\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #backgroundInput}.\n\t */ _createBackgroundFields() {\n        const locale = this.locale;\n        const t = this.t;\n        // -- Group label ---------------------------------------------\n        const backgroundRowLabel = new LabelView(locale);\n        backgroundRowLabel.text = t('Background');\n        // -- Background color input -----------------------------------\n        const colorInputCreator = getLabeledColorInputCreator({\n            colorConfig: this.options.backgroundColors,\n            columns: 5,\n            defaultColorValue: this.options.defaultTableCellProperties.backgroundColor,\n            colorPickerConfig: this.options.colorPickerConfig\n        });\n        const backgroundInput = new LabeledFieldView(locale, colorInputCreator);\n        backgroundInput.set({\n            label: t('Color'),\n            class: 'ck-table-cell-properties-form__background'\n        });\n        backgroundInput.fieldView.bind('value').to(this, 'backgroundColor');\n        backgroundInput.fieldView.on('input', ()=>{\n            this.backgroundColor = backgroundInput.fieldView.value;\n        });\n        return {\n            backgroundRowLabel,\n            backgroundInput\n        };\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #widthInput}.\n\t * * {@link #heightInput}.\n\t */ _createDimensionFields() {\n        const locale = this.locale;\n        const t = this.t;\n        // -- Label ---------------------------------------------------\n        const dimensionsLabel = new LabelView(locale);\n        dimensionsLabel.text = t('Dimensions');\n        // -- Width ---------------------------------------------------\n        const widthInput = new LabeledFieldView(locale, createLabeledInputText);\n        widthInput.set({\n            label: t('Width'),\n            class: 'ck-table-form__dimensions-row__width'\n        });\n        widthInput.fieldView.bind('value').to(this, 'width');\n        widthInput.fieldView.on('input', ()=>{\n            this.width = widthInput.fieldView.element.value;\n        });\n        // -- Operator ---------------------------------------------------\n        const operatorLabel = new View(locale);\n        operatorLabel.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck-table-form__dimension-operator'\n                ]\n            },\n            children: [\n                {\n                    text: '×'\n                }\n            ]\n        });\n        // -- Height ---------------------------------------------------\n        const heightInput = new LabeledFieldView(locale, createLabeledInputText);\n        heightInput.set({\n            label: t('Height'),\n            class: 'ck-table-form__dimensions-row__height'\n        });\n        heightInput.fieldView.bind('value').to(this, 'height');\n        heightInput.fieldView.on('input', ()=>{\n            this.height = heightInput.fieldView.element.value;\n        });\n        return {\n            dimensionsLabel,\n            widthInput,\n            operatorLabel,\n            heightInput\n        };\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #paddingInput}.\n\t */ _createPaddingField() {\n        const locale = this.locale;\n        const t = this.t;\n        const paddingInput = new LabeledFieldView(locale, createLabeledInputText);\n        paddingInput.set({\n            label: t('Padding'),\n            class: 'ck-table-cell-properties-form__padding'\n        });\n        paddingInput.fieldView.bind('value').to(this, 'padding');\n        paddingInput.fieldView.on('input', ()=>{\n            this.padding = paddingInput.fieldView.element.value;\n        });\n        return paddingInput;\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #horizontalAlignmentToolbar},\n\t * * {@link #verticalAlignmentToolbar}.\n\t */ _createAlignmentFields() {\n        const locale = this.locale;\n        const t = this.t;\n        const alignmentLabel = new LabelView(locale);\n        const ALIGNMENT_ICONS = {\n            left: icons.alignLeft,\n            center: icons.alignCenter,\n            right: icons.alignRight,\n            justify: icons.alignJustify,\n            top: icons.alignTop,\n            middle: icons.alignMiddle,\n            bottom: icons.alignBottom\n        };\n        alignmentLabel.text = t('Table cell text alignment');\n        // -- Horizontal ---------------------------------------------------\n        const horizontalAlignmentToolbar = new ToolbarView(locale);\n        const isContentRTL = locale.contentLanguageDirection === 'rtl';\n        horizontalAlignmentToolbar.set({\n            isCompact: true,\n            ariaLabel: t('Horizontal text alignment toolbar')\n        });\n        fillToolbar({\n            view: this,\n            icons: ALIGNMENT_ICONS,\n            toolbar: horizontalAlignmentToolbar,\n            labels: this._horizontalAlignmentLabels,\n            propertyName: 'horizontalAlignment',\n            nameToValue: (name)=>{\n                // For the RTL content, we want to swap the buttons \"align to the left\" and \"align to the right\".\n                if (isContentRTL) {\n                    if (name === 'left') {\n                        return 'right';\n                    } else if (name === 'right') {\n                        return 'left';\n                    }\n                }\n                return name;\n            },\n            defaultValue: this.options.defaultTableCellProperties.horizontalAlignment\n        });\n        // -- Vertical -----------------------------------------------------\n        const verticalAlignmentToolbar = new ToolbarView(locale);\n        verticalAlignmentToolbar.set({\n            isCompact: true,\n            ariaLabel: t('Vertical text alignment toolbar')\n        });\n        fillToolbar({\n            view: this,\n            icons: ALIGNMENT_ICONS,\n            toolbar: verticalAlignmentToolbar,\n            labels: this._verticalAlignmentLabels,\n            propertyName: 'verticalAlignment',\n            defaultValue: this.options.defaultTableCellProperties.verticalAlignment\n        });\n        return {\n            horizontalAlignmentToolbar,\n            verticalAlignmentToolbar,\n            alignmentLabel\n        };\n    }\n    /**\n\t * Creates the following form controls:\n\t *\n\t * * {@link #saveButtonView},\n\t * * {@link #cancelButtonView}.\n\t */ _createActionButtons() {\n        const locale = this.locale;\n        const t = this.t;\n        const saveButtonView = new ButtonView(locale);\n        const cancelButtonView = new ButtonView(locale);\n        const fieldsThatShouldValidateToSave = [\n            this.borderWidthInput,\n            this.borderColorInput,\n            this.backgroundInput,\n            this.paddingInput\n        ];\n        saveButtonView.set({\n            label: t('Save'),\n            icon: icons.check,\n            class: 'ck-button-save',\n            type: 'submit',\n            withText: true\n        });\n        saveButtonView.bind('isEnabled').toMany(fieldsThatShouldValidateToSave, 'errorText', (...errorTexts)=>{\n            return errorTexts.every((errorText)=>!errorText);\n        });\n        cancelButtonView.set({\n            label: t('Cancel'),\n            icon: icons.cancel,\n            class: 'ck-button-cancel',\n            withText: true\n        });\n        cancelButtonView.delegate('execute').to(this, 'cancel');\n        return {\n            saveButtonView,\n            cancelButtonView\n        };\n    }\n    /**\n\t * Provides localized labels for {@link #horizontalAlignmentToolbar} buttons.\n\t */ get _horizontalAlignmentLabels() {\n        const locale = this.locale;\n        const t = this.t;\n        const left = t('Align cell text to the left');\n        const center = t('Align cell text to the center');\n        const right = t('Align cell text to the right');\n        const justify = t('Justify cell text');\n        // Returns object with a proper order of labels.\n        if (locale.uiLanguageDirection === 'rtl') {\n            return {\n                right,\n                center,\n                left,\n                justify\n            };\n        } else {\n            return {\n                left,\n                center,\n                right,\n                justify\n            };\n        }\n    }\n    /**\n\t * Provides localized labels for {@link #verticalAlignmentToolbar} buttons.\n\t */ get _verticalAlignmentLabels() {\n        const t = this.t;\n        return {\n            top: t('Align cell text to the top'),\n            middle: t('Align cell text to the middle'),\n            bottom: t('Align cell text to the bottom')\n        };\n    }\n}\nfunction isBorderStyleSet$1(value) {\n    return value !== 'none';\n}\n\nconst BALLOON_POSITIONS = /* #__PURE__ */ (()=>[\n        BalloonPanelView.defaultPositions.northArrowSouth,\n        BalloonPanelView.defaultPositions.northArrowSouthWest,\n        BalloonPanelView.defaultPositions.northArrowSouthEast,\n        BalloonPanelView.defaultPositions.southArrowNorth,\n        BalloonPanelView.defaultPositions.southArrowNorthWest,\n        BalloonPanelView.defaultPositions.southArrowNorthEast,\n        BalloonPanelView.defaultPositions.viewportStickyNorth\n    ])();\n/**\n * A helper utility that positions the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance\n * with respect to the table in the editor content, if one is selected.\n *\n * @param editor The editor instance.\n * @param target Either \"cell\" or \"table\". Determines the target the balloon will be attached to.\n */ function repositionContextualBalloon(editor, target) {\n    const balloon = editor.plugins.get('ContextualBalloon');\n    const selection = editor.editing.view.document.selection;\n    let position;\n    if (target === 'cell') {\n        if (getTableWidgetAncestor(selection)) {\n            position = getBalloonCellPositionData(editor);\n        }\n    } else if (getSelectionAffectedTableWidget(selection)) {\n        position = getBalloonTablePositionData(editor);\n    }\n    if (position) {\n        balloon.updatePosition(position);\n    }\n}\n/**\n * Returns the positioning options that control the geometry of the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n * to the selected table in the editor content.\n *\n * @param editor The editor instance.\n */ function getBalloonTablePositionData(editor) {\n    const selection = editor.model.document.selection;\n    const modelTable = getSelectionAffectedTable(selection);\n    const viewTable = editor.editing.mapper.toViewElement(modelTable);\n    return {\n        target: editor.editing.view.domConverter.mapViewToDom(viewTable),\n        positions: BALLOON_POSITIONS\n    };\n}\n/**\n * Returns the positioning options that control the geometry of the\n * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect\n * to the selected table cell in the editor content.\n *\n * @param editor The editor instance.\n */ function getBalloonCellPositionData(editor) {\n    const mapper = editor.editing.mapper;\n    const domConverter = editor.editing.view.domConverter;\n    const selection = editor.model.document.selection;\n    if (selection.rangeCount > 1) {\n        return {\n            target: ()=>createBoundingRect(selection.getRanges(), editor),\n            positions: BALLOON_POSITIONS\n        };\n    }\n    const modelTableCell = getTableCellAtPosition(selection.getFirstPosition());\n    const viewTableCell = mapper.toViewElement(modelTableCell);\n    return {\n        target: domConverter.mapViewToDom(viewTableCell),\n        positions: BALLOON_POSITIONS\n    };\n}\n/**\n * Returns the first selected table cell from a multi-cell or in-cell selection.\n *\n * @param position Document position.\n */ function getTableCellAtPosition(position) {\n    const isTableCellSelected = position.nodeAfter && position.nodeAfter.is('element', 'tableCell');\n    return isTableCellSelected ? position.nodeAfter : position.findAncestor('tableCell');\n}\n/**\n * Returns bounding rectangle for given model ranges.\n *\n * @param ranges Model ranges that the bounding rect should be returned for.\n * @param editor The editor instance.\n */ function createBoundingRect(ranges, editor) {\n    const mapper = editor.editing.mapper;\n    const domConverter = editor.editing.view.domConverter;\n    const rects = Array.from(ranges).map((range)=>{\n        const modelTableCell = getTableCellAtPosition(range.start);\n        const viewTableCell = mapper.toViewElement(modelTableCell);\n        return new Rect(domConverter.mapViewToDom(viewTableCell));\n    });\n    return Rect.getBoundingRect(rects);\n}\n\nvar tableCellProperties = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z\\\" opacity=\\\".6\\\"/><path d=\\\"m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z\\\"/></svg>\";\n\n/**\n * Returns a string if all four values of box sides are equal.\n *\n * If a string is passed, it is treated as a single value (pass-through).\n *\n * ```ts\n * // Returns 'foo':\n * getSingleValue( { top: 'foo', right: 'foo', bottom: 'foo', left: 'foo' } );\n * getSingleValue( 'foo' );\n *\n * // Returns undefined:\n * getSingleValue( { top: 'foo', right: 'foo', bottom: 'bar', left: 'foo' } );\n * getSingleValue( { top: 'foo', right: 'foo' } );\n * ```\n */ function getSingleValue(objectOrString) {\n    if (!objectOrString || !isObject(objectOrString)) {\n        return objectOrString;\n    }\n    const { top, right, bottom, left } = objectOrString;\n    if (top == right && right == bottom && bottom == left) {\n        return top;\n    }\n}\n/**\n * Adds a unit to a value if the value is a number or a string representing a number.\n *\n * **Note**: It does nothing to non-numeric values.\n *\n * ```ts\n * getSingleValue( 25, 'px' ); // '25px'\n * getSingleValue( 25, 'em' ); // '25em'\n * getSingleValue( '25em', 'px' ); // '25em'\n * getSingleValue( 'foo', 'px' ); // 'foo'\n * ```\n *\n * @param defaultUnit A default unit added to a numeric value.\n */ function addDefaultUnitToNumericValue(value, defaultUnit) {\n    const numericValue = parseFloat(value);\n    if (Number.isNaN(numericValue)) {\n        return value;\n    }\n    if (String(numericValue) !== String(value)) {\n        return value;\n    }\n    return `${numericValue}${defaultUnit}`;\n}\n/**\n * Returns the normalized configuration.\n *\n * @param config The configuration to normalize.\n * @param options Options used to determine which properties should be added.\n */ function getNormalizedDefaultProperties(config, options = {}) {\n    const normalizedConfig = {\n        borderStyle: 'none',\n        borderWidth: '',\n        borderColor: '',\n        backgroundColor: '',\n        width: '',\n        height: '',\n        ...config\n    };\n    if (options.includeAlignmentProperty && !normalizedConfig.alignment) {\n        normalizedConfig.alignment = 'center';\n    }\n    if (options.includePaddingProperty && !normalizedConfig.padding) {\n        normalizedConfig.padding = '';\n    }\n    if (options.includeVerticalAlignmentProperty && !normalizedConfig.verticalAlignment) {\n        normalizedConfig.verticalAlignment = 'middle';\n    }\n    if (options.includeHorizontalAlignmentProperty && !normalizedConfig.horizontalAlignment) {\n        normalizedConfig.horizontalAlignment = options.isRightToLeftContent ? 'right' : 'left';\n    }\n    return normalizedConfig;\n}\n/**\n * Returns the normalized default table properties.\n *\n * @param config The configuration to normalize.\n * @param options Options used to determine which properties should be added.\n */ function getNormalizedDefaultTableProperties(config, options) {\n    return getNormalizedDefaultProperties({\n        // It adds support for border none in the table element, keep it in sync with the content styles\n        // See more: https://github.com/ckeditor/ckeditor5/issues/6841#issuecomment-1959195608\n        borderStyle: 'double',\n        borderColor: 'hsl(0, 0%, 70%)',\n        borderWidth: '1px',\n        ...config\n    }, options);\n}\n/**\n * Returns the normalized default cell properties.\n *\n * @param config The configuration to normalize.\n * @param options Options used to determine which properties should be added.\n */ function getNormalizedDefaultCellProperties(config, options) {\n    return getNormalizedDefaultProperties({\n        // It adds support for border none in the table element, keep it in sync with the content styles\n        // See more: https://github.com/ckeditor/ckeditor5/issues/6841#issuecomment-1959195608\n        borderStyle: 'solid',\n        borderColor: 'hsl(0, 0%, 75%)',\n        borderWidth: '1px',\n        ...config\n    }, options);\n}\n\nconst ERROR_TEXT_TIMEOUT$1 = 500;\n// Map of view properties and related commands.\nconst propertyToCommandMap$1 = {\n    borderStyle: 'tableCellBorderStyle',\n    borderColor: 'tableCellBorderColor',\n    borderWidth: 'tableCellBorderWidth',\n    height: 'tableCellHeight',\n    width: 'tableCellWidth',\n    padding: 'tableCellPadding',\n    backgroundColor: 'tableCellBackgroundColor',\n    horizontalAlignment: 'tableCellHorizontalAlignment',\n    verticalAlignment: 'tableCellVerticalAlignment'\n};\n/**\n * The table cell properties UI plugin. It introduces the `'tableCellProperties'` button\n * that opens a form allowing to specify the visual styling of a table cell.\n *\n * It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */ class TableCellPropertiesUI extends Plugin {\n    /**\n\t * The default table cell properties.\n\t */ _defaultTableCellProperties;\n    /**\n\t * The contextual balloon plugin instance.\n\t */ _balloon;\n    /**\n\t * The cell properties form view displayed inside the balloon.\n\t */ view;\n    /**\n\t * The batch used to undo all changes made by the form (which are live, as the user types)\n\t * when \"Cancel\" was pressed. Each time the view is shown, a new batch is created.\n\t */ _undoStepBatch;\n    /**\n\t * Flag used to indicate whether view is ready to execute update commands\n\t * (it finished loading initial data).\n\t */ _isReady;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableCellPropertiesUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('table.tableCellProperties', {\n            borderColors: defaultColors,\n            backgroundColors: defaultColors\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        this._defaultTableCellProperties = getNormalizedDefaultCellProperties(editor.config.get('table.tableCellProperties.defaultProperties'), {\n            includeVerticalAlignmentProperty: true,\n            includeHorizontalAlignmentProperty: true,\n            includePaddingProperty: true,\n            isRightToLeftContent: editor.locale.contentLanguageDirection === 'rtl'\n        });\n        this._balloon = editor.plugins.get(ContextualBalloon);\n        this.view = null;\n        this._isReady = false;\n        editor.ui.componentFactory.add('tableCellProperties', (locale)=>{\n            const view = new ButtonView(locale);\n            view.set({\n                label: t('Cell properties'),\n                icon: tableCellProperties,\n                tooltip: true\n            });\n            this.listenTo(view, 'execute', ()=>this._showView());\n            const commands = Object.values(propertyToCommandMap$1).map((commandName)=>editor.commands.get(commandName));\n            view.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled)=>areEnabled.some((isCommandEnabled)=>isCommandEnabled));\n            return view;\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        // Destroy created UI components as they are not automatically destroyed.\n        // See https://github.com/ckeditor/ckeditor5/issues/1341.\n        if (this.view) {\n            this.view.destroy();\n        }\n    }\n    /**\n\t * Creates the {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView} instance.\n\t *\n\t * @returns The cell properties form view instance.\n\t */ _createPropertiesView() {\n        const editor = this.editor;\n        const config = editor.config.get('table.tableCellProperties');\n        const borderColorsConfig = normalizeColorOptions(config.borderColors);\n        const localizedBorderColors = getLocalizedColorOptions(editor.locale, borderColorsConfig);\n        const backgroundColorsConfig = normalizeColorOptions(config.backgroundColors);\n        const localizedBackgroundColors = getLocalizedColorOptions(editor.locale, backgroundColorsConfig);\n        const hasColorPicker = config.colorPicker !== false;\n        const view = new TableCellPropertiesView(editor.locale, {\n            borderColors: localizedBorderColors,\n            backgroundColors: localizedBackgroundColors,\n            defaultTableCellProperties: this._defaultTableCellProperties,\n            colorPickerConfig: hasColorPicker ? config.colorPicker || {} : false\n        });\n        const t = editor.t;\n        // Render the view so its #element is available for the clickOutsideHandler.\n        view.render();\n        this.listenTo(view, 'submit', ()=>{\n            this._hideView();\n        });\n        this.listenTo(view, 'cancel', ()=>{\n            // https://github.com/ckeditor/ckeditor5/issues/6180\n            if (this._undoStepBatch.operations.length) {\n                editor.execute('undo', this._undoStepBatch);\n            }\n            this._hideView();\n        });\n        // Close the balloon on Esc key press.\n        view.keystrokes.set('Esc', (data, cancel)=>{\n            this._hideView();\n            cancel();\n        });\n        // Close on click outside of balloon panel element.\n        clickOutsideHandler({\n            emitter: view,\n            activator: ()=>this._isViewInBalloon,\n            contextElements: [\n                this._balloon.view.element\n            ],\n            callback: ()=>this._hideView()\n        });\n        const colorErrorText = getLocalizedColorErrorText(t);\n        const lengthErrorText = getLocalizedLengthErrorText(t);\n        // Create the \"UI -> editor data\" binding.\n        // These listeners update the editor data (via table commands) when any observable\n        // property of the view has changed. They also validate the value and display errors in the UI\n        // when necessary. This makes the view live, which means the changes are\n        // visible in the editing as soon as the user types or changes fields' values.\n        view.on('change:borderStyle', this._getPropertyChangeCallback('tableCellBorderStyle'));\n        view.on('change:borderColor', this._getValidatedPropertyChangeCallback({\n            viewField: view.borderColorInput,\n            commandName: 'tableCellBorderColor',\n            errorText: colorErrorText,\n            validator: colorFieldValidator\n        }));\n        view.on('change:borderWidth', this._getValidatedPropertyChangeCallback({\n            viewField: view.borderWidthInput,\n            commandName: 'tableCellBorderWidth',\n            errorText: lengthErrorText,\n            validator: lineWidthFieldValidator\n        }));\n        view.on('change:padding', this._getValidatedPropertyChangeCallback({\n            viewField: view.paddingInput,\n            commandName: 'tableCellPadding',\n            errorText: lengthErrorText,\n            validator: lengthFieldValidator\n        }));\n        view.on('change:width', this._getValidatedPropertyChangeCallback({\n            viewField: view.widthInput,\n            commandName: 'tableCellWidth',\n            errorText: lengthErrorText,\n            validator: lengthFieldValidator\n        }));\n        view.on('change:height', this._getValidatedPropertyChangeCallback({\n            viewField: view.heightInput,\n            commandName: 'tableCellHeight',\n            errorText: lengthErrorText,\n            validator: lengthFieldValidator\n        }));\n        view.on('change:backgroundColor', this._getValidatedPropertyChangeCallback({\n            viewField: view.backgroundInput,\n            commandName: 'tableCellBackgroundColor',\n            errorText: colorErrorText,\n            validator: colorFieldValidator\n        }));\n        view.on('change:horizontalAlignment', this._getPropertyChangeCallback('tableCellHorizontalAlignment'));\n        view.on('change:verticalAlignment', this._getPropertyChangeCallback('tableCellVerticalAlignment'));\n        return view;\n    }\n    /**\n\t * In this method the \"editor data -> UI\" binding is happening.\n\t *\n\t * When executed, this method obtains selected cell property values from various table commands\n\t * and passes them to the {@link #view}.\n\t *\n\t * This way, the UI stays up–to–date with the editor data.\n\t */ _fillViewFormFromCommandValues() {\n        const commands = this.editor.commands;\n        const borderStyleCommand = commands.get('tableCellBorderStyle');\n        Object.entries(propertyToCommandMap$1).map(([property, commandName])=>{\n            const defaultValue = this._defaultTableCellProperties[property] || '';\n            return [\n                property,\n                commands.get(commandName).value || defaultValue\n            ];\n        }).forEach(([property, value])=>{\n            // Do not set the `border-color` and `border-width` fields if `border-style:none`.\n            if ((property === 'borderColor' || property === 'borderWidth') && borderStyleCommand.value === 'none') {\n                return;\n            }\n            this.view.set(property, value);\n        });\n        this._isReady = true;\n    }\n    /**\n\t * Shows the {@link #view} in the {@link #_balloon}.\n\t *\n\t * **Note**: Each time a view is shown, a new {@link #_undoStepBatch} is created. It contains\n\t * all changes made to the document when the view is visible, allowing a single undo step\n\t * for all of them.\n\t */ _showView() {\n        const editor = this.editor;\n        if (!this.view) {\n            this.view = this._createPropertiesView();\n        }\n        this.listenTo(editor.ui, 'update', ()=>{\n            this._updateView();\n        });\n        // Update the view with the model values.\n        this._fillViewFormFromCommandValues();\n        this._balloon.add({\n            view: this.view,\n            position: getBalloonCellPositionData(editor)\n        });\n        // Create a new batch. Clicking \"Cancel\" will undo this batch.\n        this._undoStepBatch = editor.model.createBatch();\n        // Basic a11y.\n        this.view.focus();\n    }\n    /**\n\t * Removes the {@link #view} from the {@link #_balloon}.\n\t */ _hideView() {\n        const editor = this.editor;\n        this.stopListening(editor.ui, 'update');\n        this._isReady = false;\n        // Blur any input element before removing it from DOM to prevent issues in some browsers.\n        // See https://github.com/ckeditor/ckeditor5/issues/1501.\n        this.view.saveButtonView.focus();\n        this._balloon.remove(this.view);\n        // Make sure the focus is not lost in the process by putting it directly\n        // into the editing view.\n        this.editor.editing.view.focus();\n    }\n    /**\n\t * Repositions the {@link #_balloon} or hides the {@link #view} if a table cell is no longer selected.\n\t */ _updateView() {\n        const editor = this.editor;\n        const viewDocument = editor.editing.view.document;\n        if (!getTableWidgetAncestor(viewDocument.selection)) {\n            this._hideView();\n        } else if (this._isViewVisible) {\n            repositionContextualBalloon(editor, 'cell');\n        }\n    }\n    /**\n\t * Returns `true` when the {@link #view} is visible in the {@link #_balloon}.\n\t */ get _isViewVisible() {\n        return !!this.view && this._balloon.visibleView === this.view;\n    }\n    /**\n\t * Returns `true` when the {@link #view} is in the {@link #_balloon}.\n\t */ get _isViewInBalloon() {\n        return !!this.view && this._balloon.hasView(this.view);\n    }\n    /**\n\t * Creates a callback that when executed upon the {@link #view view's} property change\n\t * executes a related editor command with the new property value.\n\t *\n\t * @param defaultValue The default value of the command.\n\t */ _getPropertyChangeCallback(commandName) {\n        return (evt, propertyName, newValue)=>{\n            if (!this._isReady) {\n                return;\n            }\n            this.editor.execute(commandName, {\n                value: newValue,\n                batch: this._undoStepBatch\n            });\n        };\n    }\n    /**\n\t * Creates a callback that when executed upon the {@link #view view's} property change:\n\t * * Executes a related editor command with the new property value if the value is valid,\n\t * * Or sets the error text next to the invalid field, if the value did not pass the validation.\n\t */ _getValidatedPropertyChangeCallback(options) {\n        const { commandName, viewField, validator, errorText } = options;\n        const setErrorTextDebounced = debounce(()=>{\n            viewField.errorText = errorText;\n        }, ERROR_TEXT_TIMEOUT$1);\n        return (evt, propertyName, newValue)=>{\n            setErrorTextDebounced.cancel();\n            // Do not execute the command on initial call (opening the table properties view).\n            if (!this._isReady) {\n                return;\n            }\n            if (validator(newValue)) {\n                this.editor.execute(commandName, {\n                    value: newValue,\n                    batch: this._undoStepBatch\n                });\n                viewField.errorText = null;\n            } else {\n                setErrorTextDebounced();\n            }\n        };\n    }\n}\n\n/**\n * The table cell attribute command.\n *\n * The command is a base command for other table cell property commands.\n */ class TableCellPropertyCommand extends Command {\n    /**\n\t * The attribute that will be set by the command.\n\t */ attributeName;\n    /**\n\t * The default value for the attribute.\n\t */ _defaultValue;\n    /**\n\t * Creates a new `TableCellPropertyCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param attributeName Table cell attribute name.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, attributeName, defaultValue){\n        super(editor);\n        this.attributeName = attributeName;\n        this._defaultValue = defaultValue;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const selectedTableCells = tableUtils.getSelectionAffectedTableCells(editor.model.document.selection);\n        this.isEnabled = !!selectedTableCells.length;\n        this.value = this._getSingleValue(selectedTableCells);\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.value If set, the command will set the attribute on selected table cells.\n\t * If it is not set, the command will remove the attribute from the selected table cells.\n\t * @param options.batch Pass the model batch instance to the command to aggregate changes,\n\t * for example to allow a single undo step for multiple executions.\n\t */ execute(options = {}) {\n        const { value, batch } = options;\n        const model = this.editor.model;\n        const tableUtils = this.editor.plugins.get('TableUtils');\n        const tableCells = tableUtils.getSelectionAffectedTableCells(model.document.selection);\n        const valueToSet = this._getValueToSet(value);\n        model.enqueueChange(batch, (writer)=>{\n            if (valueToSet) {\n                tableCells.forEach((tableCell)=>writer.setAttribute(this.attributeName, valueToSet, tableCell));\n            } else {\n                tableCells.forEach((tableCell)=>writer.removeAttribute(this.attributeName, tableCell));\n            }\n        });\n    }\n    /**\n\t * Returns the attribute value for a table cell.\n\t */ _getAttribute(tableCell) {\n        if (!tableCell) {\n            return;\n        }\n        const value = tableCell.getAttribute(this.attributeName);\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n    /**\n\t * Returns the proper model value. It can be used to add a default unit to numeric values.\n\t */ _getValueToSet(value) {\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n    /**\n\t * Returns a single value for all selected table cells. If the value is the same for all cells,\n\t * it will be returned (`undefined` otherwise).\n\t */ _getSingleValue(tableCells) {\n        const firstCellValue = this._getAttribute(tableCells[0]);\n        const everyCellHasAttribute = tableCells.every((tableCells)=>this._getAttribute(tableCells) === firstCellValue);\n        return everyCellHasAttribute ? firstCellValue : undefined;\n    }\n}\n\n/**\n * The table cell width command.\n *\n * The command is registered by the {@link module:table/tablecellwidth/tablecellwidthediting~TableCellWidthEditing} as\n * the `'tableCellWidth'` editor command.\n *\n * To change the width of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellWidth', {\n *   value: '50px'\n * } );\n * ```\n *\n * **Note**: This command adds a default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellWidth', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `width` attribute to `'50px'` in the model.\n */ class TableCellWidthCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellWidth', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValueToSet(value) {\n        value = addDefaultUnitToNumericValue(value, 'px');\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table cell width editing feature.\n *\n * Introduces `tableCellWidth` table cell model attribute alongside with its converters\n * and a command.\n */ class TableCellWidthEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableCellWidthEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const defaultTableCellProperties = getNormalizedDefaultCellProperties(editor.config.get('table.tableCellProperties.defaultProperties'));\n        enableProperty$1(editor.model.schema, editor.conversion, {\n            modelAttribute: 'tableCellWidth',\n            styleName: 'width',\n            defaultValue: defaultTableCellProperties.width\n        });\n        editor.commands.add('tableCellWidth', new TableCellWidthCommand(editor, defaultTableCellProperties.width));\n    }\n}\n\n/**\n * The table cell padding command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellPadding'` editor command.\n *\n * To change the padding of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellPadding', {\n *   value: '5px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellPadding', {\n *   value: '5'\n * } );\n * ```\n *\n * will set the `padding` attribute to `'5px'` in the model.\n */ class TableCellPaddingCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellPaddingCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellPadding', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getAttribute(tableCell) {\n        if (!tableCell) {\n            return;\n        }\n        const value = getSingleValue(tableCell.getAttribute(this.attributeName));\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValueToSet(value) {\n        const newValue = addDefaultUnitToNumericValue(value, 'px');\n        if (newValue === this._defaultValue) {\n            return;\n        }\n        return newValue;\n    }\n}\n\n/**\n * The table cell height command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellHeight'` editor command.\n *\n * To change the height of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellHeight', {\n *   value: '50px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellHeight', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `height` attribute to `'50px'` in the model.\n */ class TableCellHeightCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellHeightCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellHeight', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValueToSet(value) {\n        const newValue = addDefaultUnitToNumericValue(value, 'px');\n        if (newValue === this._defaultValue) {\n            return;\n        }\n        return newValue;\n    }\n}\n\n/**\n * The table cell background color command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBackgroundColor'` editor command.\n *\n * To change the background color of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBackgroundColor', {\n *   value: '#f00'\n * } );\n * ```\n */ class TableCellBackgroundColorCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellBackgroundColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellBackgroundColor', defaultValue);\n    }\n}\n\n/**\n * The table cell vertical alignment command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellVerticalAlignment'` editor command.\n *\n * To change the vertical text alignment of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellVerticalAlignment', {\n *   value: 'top'\n * } );\n * ```\n *\n * The following values, corresponding to the\n * [`vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align), are allowed:\n *\n * * `'top'`\n * * `'bottom'`\n *\n * The `'middle'` value is the default one so there is no need to set it.\n */ class TableCellVerticalAlignmentCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellVerticalAlignmentCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value for the \"alignment\" attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellVerticalAlignment', defaultValue);\n    }\n}\n\n/**\n * The table cell horizontal alignment command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellHorizontalAlignment'` editor command.\n *\n * To change the horizontal text alignment of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellHorizontalAlignment', {\n *  value: 'right'\n * } );\n * ```\n */ class TableCellHorizontalAlignmentCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellHorizontalAlignmentCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value for the \"alignment\" attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellHorizontalAlignment', defaultValue);\n    }\n}\n\n/**\n * The table cell border style command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBorderStyle'` editor command.\n *\n * To change the border style of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBorderStyle', {\n *   value: 'dashed'\n * } );\n * ```\n */ class TableCellBorderStyleCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellBorderStyleCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellBorderStyle', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getAttribute(tableCell) {\n        if (!tableCell) {\n            return;\n        }\n        const value = getSingleValue(tableCell.getAttribute(this.attributeName));\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table cell border color command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBorderColor'` editor command.\n *\n * To change the border color of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBorderColor', {\n *   value: '#f00'\n * } );\n * ```\n */ class TableCellBorderColorCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellBorderColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellBorderColor', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getAttribute(tableCell) {\n        if (!tableCell) {\n            return;\n        }\n        const value = getSingleValue(tableCell.getAttribute(this.attributeName));\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table cell border width command.\n *\n * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as\n * the `'tableCellBorderWidth'` editor command.\n *\n * To change the border width of selected cells, execute the command:\n *\n * ```ts\n * editor.execute( 'tableCellBorderWidth', {\n *   value: '5px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableCellBorderWidth', {\n *   value: '5'\n * } );\n * ```\n *\n * will set the `borderWidth` attribute to `'5px'` in the model.\n */ class TableCellBorderWidthCommand extends TableCellPropertyCommand {\n    /**\n\t * Creates a new `TableCellBorderWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableCellBorderWidth', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getAttribute(tableCell) {\n        if (!tableCell) {\n            return;\n        }\n        const value = getSingleValue(tableCell.getAttribute(this.attributeName));\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValueToSet(value) {\n        const newValue = addDefaultUnitToNumericValue(value, 'px');\n        if (newValue === this._defaultValue) {\n            return;\n        }\n        return newValue;\n    }\n}\n\nconst VALIGN_VALUES_REG_EXP = /^(top|middle|bottom)$/;\nconst ALIGN_VALUES_REG_EXP$1 = /^(left|center|right|justify)$/;\n/**\n * The table cell properties editing feature.\n *\n * Introduces table cell model attributes and their conversion:\n *\n * - border: `tableCellBorderStyle`, `tableCellBorderColor` and `tableCellBorderWidth`\n * - background color: `tableCellBackgroundColor`\n * - cell padding: `tableCellPadding`\n * - horizontal and vertical alignment: `tableCellHorizontalAlignment`, `tableCellVerticalAlignment`\n * - cell width and height: `tableCellWidth`, `tableCellHeight`\n *\n * It also registers commands used to manipulate the above attributes:\n *\n * - border: the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` commands\n * - background color: the `'tableCellBackgroundColor'` command\n * - cell padding: the `'tableCellPadding'` command\n * - horizontal and vertical alignment: the `'tableCellHorizontalAlignment'` and `'tableCellVerticalAlignment'` commands\n * - width and height: the `'tableCellWidth'` and `'tableCellHeight'` commands\n */ class TableCellPropertiesEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableCellPropertiesEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableEditing,\n            TableCellWidthEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const conversion = editor.conversion;\n        editor.config.define('table.tableCellProperties.defaultProperties', {});\n        const defaultTableCellProperties = getNormalizedDefaultCellProperties(editor.config.get('table.tableCellProperties.defaultProperties'), {\n            includeVerticalAlignmentProperty: true,\n            includeHorizontalAlignmentProperty: true,\n            includePaddingProperty: true,\n            isRightToLeftContent: editor.locale.contentLanguageDirection === 'rtl'\n        });\n        editor.data.addStyleProcessorRules(addBorderRules);\n        enableBorderProperties$1(schema, conversion, {\n            color: defaultTableCellProperties.borderColor,\n            style: defaultTableCellProperties.borderStyle,\n            width: defaultTableCellProperties.borderWidth\n        });\n        editor.commands.add('tableCellBorderStyle', new TableCellBorderStyleCommand(editor, defaultTableCellProperties.borderStyle));\n        editor.commands.add('tableCellBorderColor', new TableCellBorderColorCommand(editor, defaultTableCellProperties.borderColor));\n        editor.commands.add('tableCellBorderWidth', new TableCellBorderWidthCommand(editor, defaultTableCellProperties.borderWidth));\n        enableProperty$1(schema, conversion, {\n            modelAttribute: 'tableCellHeight',\n            styleName: 'height',\n            defaultValue: defaultTableCellProperties.height\n        });\n        editor.commands.add('tableCellHeight', new TableCellHeightCommand(editor, defaultTableCellProperties.height));\n        editor.data.addStyleProcessorRules(addPaddingRules);\n        enableProperty$1(schema, conversion, {\n            modelAttribute: 'tableCellPadding',\n            styleName: 'padding',\n            reduceBoxSides: true,\n            defaultValue: defaultTableCellProperties.padding\n        });\n        editor.commands.add('tableCellPadding', new TableCellPaddingCommand(editor, defaultTableCellProperties.padding));\n        editor.data.addStyleProcessorRules(addBackgroundRules);\n        enableProperty$1(schema, conversion, {\n            modelAttribute: 'tableCellBackgroundColor',\n            styleName: 'background-color',\n            defaultValue: defaultTableCellProperties.backgroundColor\n        });\n        editor.commands.add('tableCellBackgroundColor', new TableCellBackgroundColorCommand(editor, defaultTableCellProperties.backgroundColor));\n        enableHorizontalAlignmentProperty(schema, conversion, defaultTableCellProperties.horizontalAlignment);\n        editor.commands.add('tableCellHorizontalAlignment', new TableCellHorizontalAlignmentCommand(editor, defaultTableCellProperties.horizontalAlignment));\n        enableVerticalAlignmentProperty(schema, conversion, defaultTableCellProperties.verticalAlignment);\n        editor.commands.add('tableCellVerticalAlignment', new TableCellVerticalAlignmentCommand(editor, defaultTableCellProperties.verticalAlignment));\n    }\n}\n/**\n * Enables the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` attributes for table cells.\n *\n * @param defaultBorder The default border values.\n * @param defaultBorder.color The default `tableCellBorderColor` value.\n * @param defaultBorder.style The default `tableCellBorderStyle` value.\n * @param defaultBorder.width The default `tableCellBorderWidth` value.\n */ function enableBorderProperties$1(schema, conversion, defaultBorder) {\n    const modelAttributes = {\n        width: 'tableCellBorderWidth',\n        color: 'tableCellBorderColor',\n        style: 'tableCellBorderStyle'\n    };\n    schema.extend('tableCell', {\n        allowAttributes: Object.values(modelAttributes)\n    });\n    upcastBorderStyles(conversion, 'td', modelAttributes, defaultBorder);\n    upcastBorderStyles(conversion, 'th', modelAttributes, defaultBorder);\n    downcastAttributeToStyle(conversion, {\n        modelElement: 'tableCell',\n        modelAttribute: modelAttributes.style,\n        styleName: 'border-style'\n    });\n    downcastAttributeToStyle(conversion, {\n        modelElement: 'tableCell',\n        modelAttribute: modelAttributes.color,\n        styleName: 'border-color'\n    });\n    downcastAttributeToStyle(conversion, {\n        modelElement: 'tableCell',\n        modelAttribute: modelAttributes.width,\n        styleName: 'border-width'\n    });\n}\n/**\n * Enables the `'tableCellHorizontalAlignment'` attribute for table cells.\n *\n * @param defaultValue The default horizontal alignment value.\n */ function enableHorizontalAlignmentProperty(schema, conversion, defaultValue) {\n    schema.extend('tableCell', {\n        allowAttributes: [\n            'tableCellHorizontalAlignment'\n        ]\n    });\n    conversion.for('downcast').attributeToAttribute({\n        model: {\n            name: 'tableCell',\n            key: 'tableCellHorizontalAlignment'\n        },\n        view: (alignment)=>({\n                key: 'style',\n                value: {\n                    'text-align': alignment\n                }\n            })\n    });\n    conversion.for('upcast')// Support for the `text-align:*;` CSS definition for the table cell alignment.\n    .attributeToAttribute({\n        view: {\n            name: /^(td|th)$/,\n            styles: {\n                'text-align': ALIGN_VALUES_REG_EXP$1\n            }\n        },\n        model: {\n            key: 'tableCellHorizontalAlignment',\n            value: (viewElement)=>{\n                const align = viewElement.getStyle('text-align');\n                return align === defaultValue ? null : align;\n            }\n        }\n    })// Support for the `align` attribute as the backward compatibility while pasting from other sources.\n    .attributeToAttribute({\n        view: {\n            name: /^(td|th)$/,\n            attributes: {\n                align: ALIGN_VALUES_REG_EXP$1\n            }\n        },\n        model: {\n            key: 'tableCellHorizontalAlignment',\n            value: (viewElement)=>{\n                const align = viewElement.getAttribute('align');\n                return align === defaultValue ? null : align;\n            }\n        }\n    });\n}\n/**\n * Enables the `'verticalAlignment'` attribute for table cells.\n *\n * @param defaultValue The default vertical alignment value.\n */ function enableVerticalAlignmentProperty(schema, conversion, defaultValue) {\n    schema.extend('tableCell', {\n        allowAttributes: [\n            'tableCellVerticalAlignment'\n        ]\n    });\n    conversion.for('downcast').attributeToAttribute({\n        model: {\n            name: 'tableCell',\n            key: 'tableCellVerticalAlignment'\n        },\n        view: (alignment)=>({\n                key: 'style',\n                value: {\n                    'vertical-align': alignment\n                }\n            })\n    });\n    conversion.for('upcast')// Support for the `vertical-align:*;` CSS definition for the table cell alignment.\n    .attributeToAttribute({\n        view: {\n            name: /^(td|th)$/,\n            styles: {\n                'vertical-align': VALIGN_VALUES_REG_EXP\n            }\n        },\n        model: {\n            key: 'tableCellVerticalAlignment',\n            value: (viewElement)=>{\n                const align = viewElement.getStyle('vertical-align');\n                return align === defaultValue ? null : align;\n            }\n        }\n    })// Support for the `align` attribute as the backward compatibility while pasting from other sources.\n    .attributeToAttribute({\n        view: {\n            name: /^(td|th)$/,\n            attributes: {\n                valign: VALIGN_VALUES_REG_EXP\n            }\n        },\n        model: {\n            key: 'tableCellVerticalAlignment',\n            value: (viewElement)=>{\n                const valign = viewElement.getAttribute('valign');\n                return valign === defaultValue ? null : valign;\n            }\n        }\n    });\n}\n\n/**\n * The table cell properties feature. Enables support for setting properties of table cells (size, border, background, etc.).\n *\n * Read more in the {@glink features/tables/tables-styling Table and cell styling tools} section.\n * See also the {@link module:table/tableproperties~TableProperties} plugin.\n *\n * This is a \"glue\" plugin that loads the\n * {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing table cell properties editing feature} and\n * the {@link module:table/tablecellproperties/tablecellpropertiesui~TableCellPropertiesUI table cell properties UI feature}.\n */ class TableCellProperties extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableCellProperties';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableCellPropertiesEditing,\n            TableCellPropertiesUI\n        ];\n    }\n}\n\n/**\n * The table cell attribute command.\n *\n * This command is a base command for other table property commands.\n */ class TablePropertyCommand extends Command {\n    /**\n\t * The attribute that will be set by the command.\n\t */ attributeName;\n    /**\n\t * The default value for the attribute.\n\t */ _defaultValue;\n    /**\n\t * Creates a new `TablePropertyCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param attributeName Table cell attribute name.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, attributeName, defaultValue){\n        super(editor);\n        this.attributeName = attributeName;\n        this._defaultValue = defaultValue;\n    }\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const selection = editor.model.document.selection;\n        const table = getSelectionAffectedTable(selection);\n        this.isEnabled = !!table;\n        this.value = this._getValue(table);\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t * @param options.value If set, the command will set the attribute on the selected table.\n\t * If not set, the command will remove the attribute from the selected table.\n\t * @param options.batch Pass the model batch instance to the command to aggregate changes,\n\t * for example, to allow a single undo step for multiple executions.\n\t */ execute(options = {}) {\n        const model = this.editor.model;\n        const selection = model.document.selection;\n        const { value, batch } = options;\n        const table = getSelectionAffectedTable(selection);\n        const valueToSet = this._getValueToSet(value);\n        model.enqueueChange(batch, (writer)=>{\n            if (valueToSet) {\n                writer.setAttribute(this.attributeName, valueToSet, table);\n            } else {\n                writer.removeAttribute(this.attributeName, table);\n            }\n        });\n    }\n    /**\n\t * Returns the attribute value for a table.\n\t */ _getValue(table) {\n        if (!table) {\n            return;\n        }\n        const value = table.getAttribute(this.attributeName);\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n    /**\n\t * Returns the proper model value. It can be used to add a default unit to numeric values.\n\t */ _getValueToSet(value) {\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table background color command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBackgroundColor'` editor command.\n *\n * To change the background color of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBackgroundColor', {\n *   value: '#f00'\n * } );\n * ```\n */ class TableBackgroundColorCommand extends TablePropertyCommand {\n    /**\n\t * Creates a new `TableBackgroundColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableBackgroundColor', defaultValue);\n    }\n}\n\n/**\n * The table border color command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBorderColor'` editor command.\n *\n * To change the border color of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBorderColor', {\n *   value: '#f00'\n * } );\n * ```\n */ class TableBorderColorCommand extends TablePropertyCommand {\n    /**\n\t * Creates a new `TableBorderColorCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableBorderColor', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValue(table) {\n        if (!table) {\n            return;\n        }\n        const value = getSingleValue(table.getAttribute(this.attributeName));\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table style border command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBorderStyle'` editor command.\n *\n * To change the border style of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBorderStyle', {\n *   value: 'dashed'\n * } );\n * ```\n */ class TableBorderStyleCommand extends TablePropertyCommand {\n    /**\n\t * Creates a new `TableBorderStyleCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableBorderStyle', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValue(table) {\n        if (!table) {\n            return;\n        }\n        const value = getSingleValue(table.getAttribute(this.attributeName));\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table width border command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableBorderWidth'` editor command.\n *\n * To change the border width of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableBorderWidth', {\n *   value: '5px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableBorderWidth', {\n *   value: '5'\n * } );\n * ```\n *\n * will set the `borderWidth` attribute to `'5px'` in the model.\n */ class TableBorderWidthCommand extends TablePropertyCommand {\n    /**\n\t * Creates a new `TableBorderWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableBorderWidth', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValue(table) {\n        if (!table) {\n            return;\n        }\n        const value = getSingleValue(table.getAttribute(this.attributeName));\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValueToSet(value) {\n        const newValue = addDefaultUnitToNumericValue(value, 'px');\n        if (newValue === this._defaultValue) {\n            return;\n        }\n        return newValue;\n    }\n}\n\n/**\n * The table width command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableWidth'` editor command.\n *\n * To change the width of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableWidth', {\n *   value: '400px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableWidth', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `width` attribute to `'50px'` in the model.\n */ class TableWidthCommand extends TablePropertyCommand {\n    /**\n\t * Creates a new `TableWidthCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableWidth', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValueToSet(value) {\n        value = addDefaultUnitToNumericValue(value, 'px');\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table height command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableHeight'` editor command.\n *\n * To change the height of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableHeight', {\n *   value: '500px'\n * } );\n * ```\n *\n * **Note**: This command adds the default `'px'` unit to numeric values. Executing:\n *\n * ```ts\n * editor.execute( 'tableHeight', {\n *   value: '50'\n * } );\n * ```\n *\n * will set the `height` attribute to `'50px'` in the model.\n */ class TableHeightCommand extends TablePropertyCommand {\n    /**\n\t * Creates a new `TableHeightCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value of the attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableHeight', defaultValue);\n    }\n    /**\n\t * @inheritDoc\n\t */ _getValueToSet(value) {\n        value = addDefaultUnitToNumericValue(value, 'px');\n        if (value === this._defaultValue) {\n            return;\n        }\n        return value;\n    }\n}\n\n/**\n * The table alignment command.\n *\n * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as\n * the `'tableAlignment'` editor command.\n *\n * To change the alignment of the selected table, execute the command:\n *\n * ```ts\n * editor.execute( 'tableAlignment', {\n *   value: 'right'\n * } );\n * ```\n */ class TableAlignmentCommand extends TablePropertyCommand {\n    /**\n\t * Creates a new `TableAlignmentCommand` instance.\n\t *\n\t * @param editor An editor in which this command will be used.\n\t * @param defaultValue The default value for the \"alignment\" attribute.\n\t */ constructor(editor, defaultValue){\n        super(editor, 'tableAlignment', defaultValue);\n    }\n}\n\nconst ALIGN_VALUES_REG_EXP = /^(left|center|right)$/;\nconst FLOAT_VALUES_REG_EXP = /^(left|none|right)$/;\n/**\n * The table properties editing feature.\n *\n * Introduces table's model attributes and their conversion:\n *\n * - border: `tableBorderStyle`, `tableBorderColor` and `tableBorderWidth`\n * - background color: `tableBackgroundColor`\n * - horizontal alignment: `tableAlignment`\n * - width & height: `tableWidth` & `tableHeight`\n *\n * It also registers commands used to manipulate the above attributes:\n *\n * - border: `'tableBorderStyle'`, `'tableBorderColor'` and `'tableBorderWidth'` commands\n * - background color: `'tableBackgroundColor'`\n * - horizontal alignment: `'tableAlignment'`\n * - width & height: `'tableWidth'` & `'tableHeight'`\n */ class TablePropertiesEditing extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TablePropertiesEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const conversion = editor.conversion;\n        editor.config.define('table.tableProperties.defaultProperties', {});\n        const defaultTableProperties = getNormalizedDefaultTableProperties(editor.config.get('table.tableProperties.defaultProperties'), {\n            includeAlignmentProperty: true\n        });\n        editor.data.addStyleProcessorRules(addBorderRules);\n        enableBorderProperties(schema, conversion, {\n            color: defaultTableProperties.borderColor,\n            style: defaultTableProperties.borderStyle,\n            width: defaultTableProperties.borderWidth\n        });\n        editor.commands.add('tableBorderColor', new TableBorderColorCommand(editor, defaultTableProperties.borderColor));\n        editor.commands.add('tableBorderStyle', new TableBorderStyleCommand(editor, defaultTableProperties.borderStyle));\n        editor.commands.add('tableBorderWidth', new TableBorderWidthCommand(editor, defaultTableProperties.borderWidth));\n        enableAlignmentProperty(schema, conversion, defaultTableProperties.alignment);\n        editor.commands.add('tableAlignment', new TableAlignmentCommand(editor, defaultTableProperties.alignment));\n        enableTableToFigureProperty(schema, conversion, {\n            modelAttribute: 'tableWidth',\n            styleName: 'width',\n            defaultValue: defaultTableProperties.width\n        });\n        editor.commands.add('tableWidth', new TableWidthCommand(editor, defaultTableProperties.width));\n        enableTableToFigureProperty(schema, conversion, {\n            modelAttribute: 'tableHeight',\n            styleName: 'height',\n            defaultValue: defaultTableProperties.height\n        });\n        editor.commands.add('tableHeight', new TableHeightCommand(editor, defaultTableProperties.height));\n        editor.data.addStyleProcessorRules(addBackgroundRules);\n        enableProperty(schema, conversion, {\n            modelAttribute: 'tableBackgroundColor',\n            styleName: 'background-color',\n            defaultValue: defaultTableProperties.backgroundColor\n        });\n        editor.commands.add('tableBackgroundColor', new TableBackgroundColorCommand(editor, defaultTableProperties.backgroundColor));\n    }\n}\n/**\n * Enables `tableBorderStyle'`, `tableBorderColor'` and `tableBorderWidth'` attributes for table.\n *\n * @param defaultBorder The default border values.\n * @param defaultBorder.color The default `tableBorderColor` value.\n * @param defaultBorder.style The default `tableBorderStyle` value.\n * @param defaultBorder.width The default `tableBorderWidth` value.\n */ function enableBorderProperties(schema, conversion, defaultBorder) {\n    const modelAttributes = {\n        width: 'tableBorderWidth',\n        color: 'tableBorderColor',\n        style: 'tableBorderStyle'\n    };\n    schema.extend('table', {\n        allowAttributes: Object.values(modelAttributes)\n    });\n    upcastBorderStyles(conversion, 'table', modelAttributes, defaultBorder);\n    downcastTableAttribute(conversion, {\n        modelAttribute: modelAttributes.color,\n        styleName: 'border-color'\n    });\n    downcastTableAttribute(conversion, {\n        modelAttribute: modelAttributes.style,\n        styleName: 'border-style'\n    });\n    downcastTableAttribute(conversion, {\n        modelAttribute: modelAttributes.width,\n        styleName: 'border-width'\n    });\n}\n/**\n * Enables the `'alignment'` attribute for table.\n *\n * @param defaultValue The default alignment value.\n */ function enableAlignmentProperty(schema, conversion, defaultValue) {\n    schema.extend('table', {\n        allowAttributes: [\n            'tableAlignment'\n        ]\n    });\n    conversion.for('downcast').attributeToAttribute({\n        model: {\n            name: 'table',\n            key: 'tableAlignment'\n        },\n        view: (alignment)=>({\n                key: 'style',\n                value: {\n                    // Model: `alignment:center` => CSS: `float:none`.\n                    float: alignment === 'center' ? 'none' : alignment\n                }\n            }),\n        converterPriority: 'high'\n    });\n    conversion.for('upcast')// Support for the `float:*;` CSS definition for the table alignment.\n    .attributeToAttribute({\n        view: {\n            name: /^(table|figure)$/,\n            styles: {\n                float: FLOAT_VALUES_REG_EXP\n            }\n        },\n        model: {\n            key: 'tableAlignment',\n            value: (viewElement)=>{\n                let align = viewElement.getStyle('float');\n                // CSS: `float:none` => Model: `alignment:center`.\n                if (align === 'none') {\n                    align = 'center';\n                }\n                return align === defaultValue ? null : align;\n            }\n        }\n    })// Support for the `align` attribute as the backward compatibility while pasting from other sources.\n    .attributeToAttribute({\n        view: {\n            attributes: {\n                align: ALIGN_VALUES_REG_EXP\n            }\n        },\n        model: {\n            name: 'table',\n            key: 'tableAlignment',\n            value: (viewElement)=>{\n                const align = viewElement.getAttribute('align');\n                return align === defaultValue ? null : align;\n            }\n        }\n    });\n}\n/**\n * Enables conversion for an attribute for simple view-model mappings.\n *\n * @param options.defaultValue The default value for the specified `modelAttribute`.\n */ function enableProperty(schema, conversion, options) {\n    const { modelAttribute } = options;\n    schema.extend('table', {\n        allowAttributes: [\n            modelAttribute\n        ]\n    });\n    upcastStyleToAttribute(conversion, {\n        viewElement: 'table',\n        ...options\n    });\n    downcastTableAttribute(conversion, options);\n}\n/**\n * Enables conversion for an attribute for simple view (figure) to model (table) mappings.\n */ function enableTableToFigureProperty(schema, conversion, options) {\n    const { modelAttribute } = options;\n    schema.extend('table', {\n        allowAttributes: [\n            modelAttribute\n        ]\n    });\n    upcastStyleToAttribute(conversion, {\n        viewElement: /^(table|figure)$/,\n        shouldUpcast: (element)=>!(element.name == 'table' && element.parent.name == 'figure'),\n        ...options\n    });\n    downcastAttributeToStyle(conversion, {\n        modelElement: 'table',\n        ...options\n    });\n}\n\n/**\n * The class representing a table properties form, allowing users to customize\n * certain style aspects of a table, for instance, border, background color, alignment, etc..\n */ class TablePropertiesView extends View {\n    /**\n\t * Options passed to the view. See {@link #constructor} to learn more.\n\t */ options;\n    /**\n\t * Tracks information about the DOM focus in the form.\n\t */ focusTracker;\n    /**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */ keystrokes;\n    /**\n\t * A collection of child views in the form.\n\t */ children;\n    /**\n\t * A dropdown that allows selecting the style of the table border.\n\t */ borderStyleDropdown;\n    /**\n\t * An input that allows specifying the width of the table border.\n\t */ borderWidthInput;\n    /**\n\t * An input that allows specifying the color of the table border.\n\t */ borderColorInput;\n    /**\n\t * An input that allows specifying the table background color.\n\t */ backgroundInput;\n    /**\n\t * An input that allows specifying the table width.\n\t */ widthInput;\n    /**\n\t * An input that allows specifying the table height.\n\t */ heightInput;\n    /**\n\t * A toolbar with buttons that allow changing the alignment of an entire table.\n\t */ alignmentToolbar;\n    /**\n\t * The \"Save\" button view.\n\t */ saveButtonView;\n    /**\n\t * The \"Cancel\" button view.\n\t */ cancelButtonView;\n    /**\n\t * A collection of views that can be focused in the form.\n\t */ _focusables;\n    /**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */ _focusCycler;\n    /**\n\t * @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t * @param options Additional configuration of the view.\n\t */ constructor(locale, options){\n        super(locale);\n        this.set({\n            borderStyle: '',\n            borderWidth: '',\n            borderColor: '',\n            backgroundColor: '',\n            width: '',\n            height: '',\n            alignment: ''\n        });\n        this.options = options;\n        const { borderStyleDropdown, borderWidthInput, borderColorInput, borderRowLabel } = this._createBorderFields();\n        const { backgroundRowLabel, backgroundInput } = this._createBackgroundFields();\n        const { widthInput, operatorLabel, heightInput, dimensionsLabel } = this._createDimensionFields();\n        const { alignmentToolbar, alignmentLabel } = this._createAlignmentFields();\n        this.focusTracker = new FocusTracker();\n        this.keystrokes = new KeystrokeHandler();\n        this.children = this.createCollection();\n        this.borderStyleDropdown = borderStyleDropdown;\n        this.borderWidthInput = borderWidthInput;\n        this.borderColorInput = borderColorInput;\n        this.backgroundInput = backgroundInput;\n        this.widthInput = widthInput;\n        this.heightInput = heightInput;\n        this.alignmentToolbar = alignmentToolbar;\n        // Defer creating to make sure other fields are present and the Save button can\n        // bind its #isEnabled to their error messages so there's no way to save unless all\n        // fields are valid.\n        const { saveButtonView, cancelButtonView } = this._createActionButtons();\n        this.saveButtonView = saveButtonView;\n        this.cancelButtonView = cancelButtonView;\n        this._focusables = new ViewCollection();\n        this._focusCycler = new FocusCycler({\n            focusables: this._focusables,\n            focusTracker: this.focusTracker,\n            keystrokeHandler: this.keystrokes,\n            actions: {\n                // Navigate form fields backwards using the Shift + Tab keystroke.\n                focusPrevious: 'shift + tab',\n                // Navigate form fields forwards using the Tab key.\n                focusNext: 'tab'\n            }\n        });\n        // Form header.\n        this.children.add(new FormHeaderView(locale, {\n            label: this.t('Table properties')\n        }));\n        // Border row.\n        this.children.add(new FormRowView(locale, {\n            labelView: borderRowLabel,\n            children: [\n                borderRowLabel,\n                borderStyleDropdown,\n                borderColorInput,\n                borderWidthInput\n            ],\n            class: 'ck-table-form__border-row'\n        }));\n        // Background row.\n        this.children.add(new FormRowView(locale, {\n            labelView: backgroundRowLabel,\n            children: [\n                backgroundRowLabel,\n                backgroundInput\n            ],\n            class: 'ck-table-form__background-row'\n        }));\n        this.children.add(new FormRowView(locale, {\n            children: [\n                // Dimensions row.\n                new FormRowView(locale, {\n                    labelView: dimensionsLabel,\n                    children: [\n                        dimensionsLabel,\n                        widthInput,\n                        operatorLabel,\n                        heightInput\n                    ],\n                    class: 'ck-table-form__dimensions-row'\n                }),\n                // Alignment row.\n                new FormRowView(locale, {\n                    labelView: alignmentLabel,\n                    children: [\n                        alignmentLabel,\n                        alignmentToolbar\n                    ],\n                    class: 'ck-table-properties-form__alignment-row'\n                })\n            ]\n        }));\n        // Action row.\n        this.children.add(new FormRowView(locale, {\n            children: [\n                this.saveButtonView,\n                this.cancelButtonView\n            ],\n            class: 'ck-table-form__action-row'\n        }));\n        this.setTemplate({\n            tag: 'form',\n            attributes: {\n                class: [\n                    'ck',\n                    'ck-form',\n                    'ck-table-form',\n                    'ck-table-properties-form'\n                ],\n                // https://github.com/ckeditor/ckeditor5-link/issues/90\n                tabindex: '-1'\n            },\n            children: this.children\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ render() {\n        super.render();\n        // Enable the \"submit\" event for this view. It can be triggered by the #saveButtonView\n        // which is of the \"submit\" DOM \"type\".\n        submitHandler({\n            view: this\n        });\n        // Maintain continuous focus cycling over views that have focusable children and focus cyclers themselves.\n        [\n            this.borderColorInput,\n            this.backgroundInput\n        ].forEach((view)=>{\n            this._focusCycler.chain(view.fieldView.focusCycler);\n        });\n        [\n            this.borderStyleDropdown,\n            this.borderColorInput,\n            this.borderWidthInput,\n            this.backgroundInput,\n            this.widthInput,\n            this.heightInput,\n            this.alignmentToolbar,\n            this.saveButtonView,\n            this.cancelButtonView\n        ].forEach((view)=>{\n            // Register the view as focusable.\n            this._focusables.add(view);\n            // Register the view in the focus tracker.\n            this.focusTracker.add(view.element);\n        });\n        // Mainly for closing using \"Esc\" and navigation using \"Tab\".\n        this.keystrokes.listenTo(this.element);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        this.focusTracker.destroy();\n        this.keystrokes.destroy();\n    }\n    /**\n\t * Focuses the fist focusable field in the form.\n\t */ focus() {\n        this._focusCycler.focusFirst();\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #borderStyleDropdown},\n\t * * {@link #borderWidthInput},\n\t * * {@link #borderColorInput}.\n\t */ _createBorderFields() {\n        const defaultTableProperties = this.options.defaultTableProperties;\n        const defaultBorder = {\n            style: defaultTableProperties.borderStyle,\n            width: defaultTableProperties.borderWidth,\n            color: defaultTableProperties.borderColor\n        };\n        const colorInputCreator = getLabeledColorInputCreator({\n            colorConfig: this.options.borderColors,\n            columns: 5,\n            defaultColorValue: defaultBorder.color,\n            colorPickerConfig: this.options.colorPickerConfig\n        });\n        const locale = this.locale;\n        const t = this.t;\n        const accessibleLabel = t('Style');\n        // -- Group label ---------------------------------------------\n        const borderRowLabel = new LabelView(locale);\n        borderRowLabel.text = t('Border');\n        // -- Style ---------------------------------------------------\n        const styleLabels = getBorderStyleLabels(t);\n        const borderStyleDropdown = new LabeledFieldView(locale, createLabeledDropdown);\n        borderStyleDropdown.set({\n            label: accessibleLabel,\n            class: 'ck-table-form__border-style'\n        });\n        borderStyleDropdown.fieldView.buttonView.set({\n            ariaLabel: accessibleLabel,\n            ariaLabelledBy: undefined,\n            isOn: false,\n            withText: true,\n            tooltip: accessibleLabel\n        });\n        borderStyleDropdown.fieldView.buttonView.bind('label').to(this, 'borderStyle', (value)=>{\n            return styleLabels[value ? value : 'none'];\n        });\n        borderStyleDropdown.fieldView.on('execute', (evt)=>{\n            this.borderStyle = evt.source._borderStyleValue;\n        });\n        borderStyleDropdown.bind('isEmpty').to(this, 'borderStyle', (value)=>!value);\n        addListToDropdown(borderStyleDropdown.fieldView, getBorderStyleDefinitions(this, defaultBorder.style), {\n            role: 'menu',\n            ariaLabel: accessibleLabel\n        });\n        // -- Width ---------------------------------------------------\n        const borderWidthInput = new LabeledFieldView(locale, createLabeledInputText);\n        borderWidthInput.set({\n            label: t('Width'),\n            class: 'ck-table-form__border-width'\n        });\n        borderWidthInput.fieldView.bind('value').to(this, 'borderWidth');\n        borderWidthInput.bind('isEnabled').to(this, 'borderStyle', isBorderStyleSet);\n        borderWidthInput.fieldView.on('input', ()=>{\n            this.borderWidth = borderWidthInput.fieldView.element.value;\n        });\n        // -- Color ---------------------------------------------------\n        const borderColorInput = new LabeledFieldView(locale, colorInputCreator);\n        borderColorInput.set({\n            label: t('Color'),\n            class: 'ck-table-form__border-color'\n        });\n        borderColorInput.fieldView.bind('value').to(this, 'borderColor');\n        borderColorInput.bind('isEnabled').to(this, 'borderStyle', isBorderStyleSet);\n        borderColorInput.fieldView.on('input', ()=>{\n            this.borderColor = borderColorInput.fieldView.value;\n        });\n        // Reset the border color and width fields depending on the `border-style` value.\n        this.on('change:borderStyle', (evt, name, newValue, oldValue)=>{\n            // When removing the border (`border-style:none`), clear the remaining `border-*` properties.\n            // See: https://github.com/ckeditor/ckeditor5/issues/6227.\n            if (!isBorderStyleSet(newValue)) {\n                this.borderColor = '';\n                this.borderWidth = '';\n            }\n            // When setting the `border-style` from `none`, set the default `border-color` and `border-width` properties.\n            if (!isBorderStyleSet(oldValue)) {\n                this.borderColor = defaultBorder.color;\n                this.borderWidth = defaultBorder.width;\n            }\n        });\n        return {\n            borderRowLabel,\n            borderStyleDropdown,\n            borderColorInput,\n            borderWidthInput\n        };\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #backgroundInput}.\n\t */ _createBackgroundFields() {\n        const locale = this.locale;\n        const t = this.t;\n        // -- Group label ---------------------------------------------\n        const backgroundRowLabel = new LabelView(locale);\n        backgroundRowLabel.text = t('Background');\n        // -- Background color input -----------------------------------\n        const backgroundInputCreator = getLabeledColorInputCreator({\n            colorConfig: this.options.backgroundColors,\n            columns: 5,\n            defaultColorValue: this.options.defaultTableProperties.backgroundColor,\n            colorPickerConfig: this.options.colorPickerConfig\n        });\n        const backgroundInput = new LabeledFieldView(locale, backgroundInputCreator);\n        backgroundInput.set({\n            label: t('Color'),\n            class: 'ck-table-properties-form__background'\n        });\n        backgroundInput.fieldView.bind('value').to(this, 'backgroundColor');\n        backgroundInput.fieldView.on('input', ()=>{\n            this.backgroundColor = backgroundInput.fieldView.value;\n        });\n        return {\n            backgroundRowLabel,\n            backgroundInput\n        };\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #widthInput},\n\t * * {@link #heightInput}.\n\t */ _createDimensionFields() {\n        const locale = this.locale;\n        const t = this.t;\n        // -- Label ---------------------------------------------------\n        const dimensionsLabel = new LabelView(locale);\n        dimensionsLabel.text = t('Dimensions');\n        // -- Width ---------------------------------------------------\n        const widthInput = new LabeledFieldView(locale, createLabeledInputText);\n        widthInput.set({\n            label: t('Width'),\n            class: 'ck-table-form__dimensions-row__width'\n        });\n        widthInput.fieldView.bind('value').to(this, 'width');\n        widthInput.fieldView.on('input', ()=>{\n            this.width = widthInput.fieldView.element.value;\n        });\n        // -- Operator ---------------------------------------------------\n        const operatorLabel = new View(locale);\n        operatorLabel.setTemplate({\n            tag: 'span',\n            attributes: {\n                class: [\n                    'ck-table-form__dimension-operator'\n                ]\n            },\n            children: [\n                {\n                    text: '×'\n                }\n            ]\n        });\n        // -- Height ---------------------------------------------------\n        const heightInput = new LabeledFieldView(locale, createLabeledInputText);\n        heightInput.set({\n            label: t('Height'),\n            class: 'ck-table-form__dimensions-row__height'\n        });\n        heightInput.fieldView.bind('value').to(this, 'height');\n        heightInput.fieldView.on('input', ()=>{\n            this.height = heightInput.fieldView.element.value;\n        });\n        return {\n            dimensionsLabel,\n            widthInput,\n            operatorLabel,\n            heightInput\n        };\n    }\n    /**\n\t * Creates the following form fields:\n\t *\n\t * * {@link #alignmentToolbar}.\n\t */ _createAlignmentFields() {\n        const locale = this.locale;\n        const t = this.t;\n        // -- Label ---------------------------------------------------\n        const alignmentLabel = new LabelView(locale);\n        alignmentLabel.text = t('Alignment');\n        // -- Toolbar ---------------------------------------------------\n        const alignmentToolbar = new ToolbarView(locale);\n        alignmentToolbar.set({\n            isCompact: true,\n            ariaLabel: t('Table alignment toolbar')\n        });\n        fillToolbar({\n            view: this,\n            icons: {\n                left: icons.objectLeft,\n                center: icons.objectCenter,\n                right: icons.objectRight\n            },\n            toolbar: alignmentToolbar,\n            labels: this._alignmentLabels,\n            propertyName: 'alignment',\n            defaultValue: this.options.defaultTableProperties.alignment\n        });\n        return {\n            alignmentLabel,\n            alignmentToolbar\n        };\n    }\n    /**\n\t * Creates the following form controls:\n\t *\n\t * * {@link #saveButtonView},\n\t * * {@link #cancelButtonView}.\n\t */ _createActionButtons() {\n        const locale = this.locale;\n        const t = this.t;\n        const saveButtonView = new ButtonView(locale);\n        const cancelButtonView = new ButtonView(locale);\n        const fieldsThatShouldValidateToSave = [\n            this.borderWidthInput,\n            this.borderColorInput,\n            this.backgroundInput,\n            this.widthInput,\n            this.heightInput\n        ];\n        saveButtonView.set({\n            label: t('Save'),\n            icon: icons.check,\n            class: 'ck-button-save',\n            type: 'submit',\n            withText: true\n        });\n        saveButtonView.bind('isEnabled').toMany(fieldsThatShouldValidateToSave, 'errorText', (...errorTexts)=>{\n            return errorTexts.every((errorText)=>!errorText);\n        });\n        cancelButtonView.set({\n            label: t('Cancel'),\n            icon: icons.cancel,\n            class: 'ck-button-cancel',\n            withText: true\n        });\n        cancelButtonView.delegate('execute').to(this, 'cancel');\n        return {\n            saveButtonView,\n            cancelButtonView\n        };\n    }\n    /**\n\t * Provides localized labels for {@link #alignmentToolbar} buttons.\n\t */ get _alignmentLabels() {\n        const locale = this.locale;\n        const t = this.t;\n        const left = t('Align table to the left');\n        const center = t('Center table');\n        const right = t('Align table to the right');\n        // Returns object with a proper order of labels.\n        if (locale.uiLanguageDirection === 'rtl') {\n            return {\n                right,\n                center,\n                left\n            };\n        } else {\n            return {\n                left,\n                center,\n                right\n            };\n        }\n    }\n}\nfunction isBorderStyleSet(value) {\n    return value !== 'none';\n}\n\nvar tableProperties = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z\\\" opacity=\\\".6\\\"/><path d=\\\"m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z\\\"/></svg>\";\n\nconst ERROR_TEXT_TIMEOUT = 500;\n// Map of view properties and related commands.\nconst propertyToCommandMap = {\n    borderStyle: 'tableBorderStyle',\n    borderColor: 'tableBorderColor',\n    borderWidth: 'tableBorderWidth',\n    backgroundColor: 'tableBackgroundColor',\n    width: 'tableWidth',\n    height: 'tableHeight',\n    alignment: 'tableAlignment'\n};\n/**\n * The table properties UI plugin. It introduces the `'tableProperties'` button\n * that opens a form allowing to specify visual styling of an entire table.\n *\n * It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n */ class TablePropertiesUI extends Plugin {\n    /**\n\t * The default table properties.\n\t */ _defaultTableProperties;\n    /**\n\t * The contextual balloon plugin instance.\n\t */ _balloon;\n    /**\n\t * The properties form view displayed inside the balloon.\n\t */ view = null;\n    /**\n\t * The batch used to undo all changes made by the form (which are live, as the user types)\n\t * when \"Cancel\" was pressed. Each time the view is shown, a new batch is created.\n\t */ _undoStepBatch;\n    /**\n\t * Flag used to indicate whether view is ready to execute update commands\n\t * (it finished loading initial data).\n\t */ _isReady;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            ContextualBalloon\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TablePropertiesUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        editor.config.define('table.tableProperties', {\n            borderColors: defaultColors,\n            backgroundColors: defaultColors\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const t = editor.t;\n        this._defaultTableProperties = getNormalizedDefaultTableProperties(editor.config.get('table.tableProperties.defaultProperties'), {\n            includeAlignmentProperty: true\n        });\n        this._balloon = editor.plugins.get(ContextualBalloon);\n        editor.ui.componentFactory.add('tableProperties', (locale)=>{\n            const view = new ButtonView(locale);\n            view.set({\n                label: t('Table properties'),\n                icon: tableProperties,\n                tooltip: true\n            });\n            this.listenTo(view, 'execute', ()=>this._showView());\n            const commands = Object.values(propertyToCommandMap).map((commandName)=>editor.commands.get(commandName));\n            view.bind('isEnabled').toMany(commands, 'isEnabled', (...areEnabled)=>areEnabled.some((isCommandEnabled)=>isCommandEnabled));\n            return view;\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        super.destroy();\n        // Destroy created UI components as they are not automatically destroyed.\n        // See https://github.com/ckeditor/ckeditor5/issues/1341.\n        if (this.view) {\n            this.view.destroy();\n        }\n    }\n    /**\n\t * Creates the {@link module:table/tableproperties/ui/tablepropertiesview~TablePropertiesView} instance.\n\t *\n\t * @returns The table properties form view instance.\n\t */ _createPropertiesView() {\n        const editor = this.editor;\n        const config = editor.config.get('table.tableProperties');\n        const borderColorsConfig = normalizeColorOptions(config.borderColors);\n        const localizedBorderColors = getLocalizedColorOptions(editor.locale, borderColorsConfig);\n        const backgroundColorsConfig = normalizeColorOptions(config.backgroundColors);\n        const localizedBackgroundColors = getLocalizedColorOptions(editor.locale, backgroundColorsConfig);\n        const hasColorPicker = config.colorPicker !== false;\n        const view = new TablePropertiesView(editor.locale, {\n            borderColors: localizedBorderColors,\n            backgroundColors: localizedBackgroundColors,\n            defaultTableProperties: this._defaultTableProperties,\n            colorPickerConfig: hasColorPicker ? config.colorPicker || {} : false\n        });\n        const t = editor.t;\n        // Render the view so its #element is available for the clickOutsideHandler.\n        view.render();\n        this.listenTo(view, 'submit', ()=>{\n            this._hideView();\n        });\n        this.listenTo(view, 'cancel', ()=>{\n            // https://github.com/ckeditor/ckeditor5/issues/6180\n            if (this._undoStepBatch.operations.length) {\n                editor.execute('undo', this._undoStepBatch);\n            }\n            this._hideView();\n        });\n        // Close the balloon on Esc key press.\n        view.keystrokes.set('Esc', (data, cancel)=>{\n            this._hideView();\n            cancel();\n        });\n        // Close on click outside of balloon panel element.\n        clickOutsideHandler({\n            emitter: view,\n            activator: ()=>this._isViewInBalloon,\n            contextElements: [\n                this._balloon.view.element\n            ],\n            callback: ()=>this._hideView()\n        });\n        const colorErrorText = getLocalizedColorErrorText(t);\n        const lengthErrorText = getLocalizedLengthErrorText(t);\n        // Create the \"UI -> editor data\" binding.\n        // These listeners update the editor data (via table commands) when any observable\n        // property of the view has changed. They also validate the value and display errors in the UI\n        // when necessary. This makes the view live, which means the changes are\n        // visible in the editing as soon as the user types or changes fields' values.\n        view.on('change:borderStyle', this._getPropertyChangeCallback('tableBorderStyle'));\n        view.on('change:borderColor', this._getValidatedPropertyChangeCallback({\n            viewField: view.borderColorInput,\n            commandName: 'tableBorderColor',\n            errorText: colorErrorText,\n            validator: colorFieldValidator\n        }));\n        view.on('change:borderWidth', this._getValidatedPropertyChangeCallback({\n            viewField: view.borderWidthInput,\n            commandName: 'tableBorderWidth',\n            errorText: lengthErrorText,\n            validator: lineWidthFieldValidator\n        }));\n        view.on('change:backgroundColor', this._getValidatedPropertyChangeCallback({\n            viewField: view.backgroundInput,\n            commandName: 'tableBackgroundColor',\n            errorText: colorErrorText,\n            validator: colorFieldValidator\n        }));\n        view.on('change:width', this._getValidatedPropertyChangeCallback({\n            viewField: view.widthInput,\n            commandName: 'tableWidth',\n            errorText: lengthErrorText,\n            validator: lengthFieldValidator\n        }));\n        view.on('change:height', this._getValidatedPropertyChangeCallback({\n            viewField: view.heightInput,\n            commandName: 'tableHeight',\n            errorText: lengthErrorText,\n            validator: lengthFieldValidator\n        }));\n        view.on('change:alignment', this._getPropertyChangeCallback('tableAlignment'));\n        return view;\n    }\n    /**\n\t * In this method the \"editor data -> UI\" binding is happening.\n\t *\n\t * When executed, this method obtains selected table property values from various table commands\n\t * and passes them to the {@link #view}.\n\t *\n\t * This way, the UI stays up–to–date with the editor data.\n\t */ _fillViewFormFromCommandValues() {\n        const commands = this.editor.commands;\n        const borderStyleCommand = commands.get('tableBorderStyle');\n        Object.entries(propertyToCommandMap).map(([property, commandName])=>{\n            const propertyKey = property;\n            const defaultValue = this._defaultTableProperties[propertyKey] || '';\n            return [\n                propertyKey,\n                commands.get(commandName).value || defaultValue\n            ];\n        }).forEach(([property, value])=>{\n            // Do not set the `border-color` and `border-width` fields if `border-style:none`.\n            if ((property === 'borderColor' || property === 'borderWidth') && borderStyleCommand.value === 'none') {\n                return;\n            }\n            this.view.set(property, value);\n        });\n        this._isReady = true;\n    }\n    /**\n\t * Shows the {@link #view} in the {@link #_balloon}.\n\t *\n\t * **Note**: Each time a view is shown, the new {@link #_undoStepBatch} is created that contains\n\t * all changes made to the document when the view is visible, allowing a single undo step\n\t * for all of them.\n\t */ _showView() {\n        const editor = this.editor;\n        if (!this.view) {\n            this.view = this._createPropertiesView();\n        }\n        this.listenTo(editor.ui, 'update', ()=>{\n            this._updateView();\n        });\n        // Update the view with the model values.\n        this._fillViewFormFromCommandValues();\n        this._balloon.add({\n            view: this.view,\n            position: getBalloonTablePositionData(editor)\n        });\n        // Create a new batch. Clicking \"Cancel\" will undo this batch.\n        this._undoStepBatch = editor.model.createBatch();\n        // Basic a11y.\n        this.view.focus();\n    }\n    /**\n\t * Removes the {@link #view} from the {@link #_balloon}.\n\t */ _hideView() {\n        const editor = this.editor;\n        this.stopListening(editor.ui, 'update');\n        this._isReady = false;\n        // Blur any input element before removing it from DOM to prevent issues in some browsers.\n        // See https://github.com/ckeditor/ckeditor5/issues/1501.\n        this.view.saveButtonView.focus();\n        this._balloon.remove(this.view);\n        // Make sure the focus is not lost in the process by putting it directly\n        // into the editing view.\n        this.editor.editing.view.focus();\n    }\n    /**\n\t * Repositions the {@link #_balloon} or hides the {@link #view} if a table is no longer selected.\n\t */ _updateView() {\n        const editor = this.editor;\n        const viewDocument = editor.editing.view.document;\n        if (!getSelectionAffectedTableWidget(viewDocument.selection)) {\n            this._hideView();\n        } else if (this._isViewVisible) {\n            repositionContextualBalloon(editor, 'table');\n        }\n    }\n    /**\n\t * Returns `true` when the {@link #view} is the visible in the {@link #_balloon}.\n\t */ get _isViewVisible() {\n        return !!this.view && this._balloon.visibleView === this.view;\n    }\n    /**\n\t * Returns `true` when the {@link #view} is in the {@link #_balloon}.\n\t */ get _isViewInBalloon() {\n        return !!this.view && this._balloon.hasView(this.view);\n    }\n    /**\n\t * Creates a callback that when executed upon {@link #view view's} property change\n\t * executes a related editor command with the new property value.\n\t *\n\t * If new value will be set to the default value, the command will not be executed.\n\t *\n\t * @param commandName The command that will be executed.\n\t */ _getPropertyChangeCallback(commandName) {\n        return (evt, propertyName, newValue)=>{\n            // Do not execute the command on initial call (opening the table properties view).\n            if (!this._isReady) {\n                return;\n            }\n            this.editor.execute(commandName, {\n                value: newValue,\n                batch: this._undoStepBatch\n            });\n        };\n    }\n    /**\n\t * Creates a callback that when executed upon {@link #view view's} property change:\n\t * * executes a related editor command with the new property value if the value is valid,\n\t * * or sets the error text next to the invalid field, if the value did not pass the validation.\n\t */ _getValidatedPropertyChangeCallback(options) {\n        const { commandName, viewField, validator, errorText } = options;\n        const setErrorTextDebounced = debounce(()=>{\n            viewField.errorText = errorText;\n        }, ERROR_TEXT_TIMEOUT);\n        return (evt, propertyName, newValue)=>{\n            setErrorTextDebounced.cancel();\n            // Do not execute the command on initial call (opening the table properties view).\n            if (!this._isReady) {\n                return;\n            }\n            if (validator(newValue)) {\n                this.editor.execute(commandName, {\n                    value: newValue,\n                    batch: this._undoStepBatch\n                });\n                viewField.errorText = null;\n            } else {\n                setErrorTextDebounced();\n            }\n        };\n    }\n}\n\n/**\n * The table properties feature. Enables support for setting properties of tables (size, border, background, etc.).\n *\n * Read more in the {@glink features/tables/tables-styling Table and cell styling tools} section.\n * See also the {@link module:table/tablecellproperties~TableCellProperties} plugin.\n *\n * This is a \"glue\" plugin that loads the\n * {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing table properties editing feature} and\n * the {@link module:table/tableproperties/tablepropertiesui~TablePropertiesUI table properties UI feature}.\n */ class TableProperties extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableProperties';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TablePropertiesEditing,\n            TablePropertiesUI\n        ];\n    }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module table/converters/table-caption-post-fixer\n */ /**\n * Injects a table caption post-fixer into the model.\n *\n * The role of the table caption post-fixer is to ensure that the table with caption have the correct structure\n * after a {@link module:engine/model/model~Model#change `change()`} block was executed.\n *\n * The correct structure means that:\n *\n * * If there are many caption model element, they are merged into one model.\n * * A final, merged caption model is placed at the end of the table.\n */ function injectTableCaptionPostFixer(model) {\n    model.document.registerPostFixer((writer)=>tableCaptionPostFixer(writer, model));\n}\n/**\n * The table caption post-fixer.\n */ function tableCaptionPostFixer(writer, model) {\n    const changes = model.document.differ.getChanges();\n    let wasFixed = false;\n    for (const entry of changes){\n        if (entry.type != 'insert') {\n            continue;\n        }\n        const positionParent = entry.position.parent;\n        if (positionParent.is('element', 'table') || entry.name == 'table') {\n            const table = entry.name == 'table' ? entry.position.nodeAfter : positionParent;\n            const captionsToMerge = Array.from(table.getChildren()).filter((child)=>child.is('element', 'caption'));\n            const firstCaption = captionsToMerge.shift();\n            if (!firstCaption) {\n                continue;\n            }\n            // Move all the contents of the captions to the first one.\n            for (const caption of captionsToMerge){\n                writer.move(writer.createRangeIn(caption), firstCaption, 'end');\n                writer.remove(caption);\n            }\n            // Make sure the final caption is at the end of the table.\n            if (firstCaption.nextSibling) {\n                writer.move(writer.createRangeOn(firstCaption), table, 'end');\n                wasFixed = true;\n            }\n            // Do we merged captions and/or moved the single caption to the end of the table?\n            wasFixed = !!captionsToMerge.length || wasFixed;\n        }\n    }\n    return wasFixed;\n}\n\n/**\n * Checks if the provided model element is a `table`.\n *\n * @param modelElement Element to check if it is a table.\n */ function isTable(modelElement) {\n    return !!modelElement && modelElement.is('element', 'table');\n}\n/**\n * Returns the caption model element from a given table element. Returns `null` if no caption is found.\n *\n * @param tableModelElement Table element in which we will try to find a caption element.\n */ function getCaptionFromTableModelElement(tableModelElement) {\n    for (const node of tableModelElement.getChildren()){\n        if (node.is('element', 'caption')) {\n            return node;\n        }\n    }\n    return null;\n}\n/**\n * Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.\n *\n * @param selection The selection checked for caption presence.\n */ function getCaptionFromModelSelection(selection) {\n    const tableElement = getSelectionAffectedTable(selection);\n    if (!tableElement) {\n        return null;\n    }\n    return getCaptionFromTableModelElement(tableElement);\n}\n/**\n * {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a caption.\n *\n * There are two possible forms of the valid caption:\n *  - A `<figcaption>` element inside a `<figure class=\"table\">` element.\n *  - A `<caption>` inside a <table>.\n *\n * @returns Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element cannot be matched.\n */ function matchTableCaptionViewElement(element) {\n    const parent = element.parent;\n    if (element.name == 'figcaption' && parent && parent.is('element', 'figure') && parent.hasClass('table')) {\n        return {\n            name: true\n        };\n    }\n    if (element.name == 'caption' && parent && parent.is('element', 'table')) {\n        return {\n            name: true\n        };\n    }\n    return null;\n}\n\n/**\n * The toggle table caption command.\n *\n * This command is registered by {@link module:table/tablecaption/tablecaptionediting~TableCaptionEditing} as the\n * `'toggleTableCaption'` editor command.\n *\n * Executing this command:\n *\n * * either adds or removes the table caption of a selected table (depending on whether the caption is present or not),\n * * removes the table caption if the selection is anchored in one.\n *\n * ```ts\n * // Toggle the presence of the caption.\n * editor.execute( 'toggleTableCaption' );\n * ```\n *\n * **Note**: You can move the selection to the caption right away as it shows up upon executing this command by using\n * the `focusCaptionOnShow` option:\n *\n * ```ts\n * editor.execute( 'toggleTableCaption', { focusCaptionOnShow: true } );\n * ```\n */ class ToggleTableCaptionCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        const editor = this.editor;\n        const tableElement = getSelectionAffectedTable(editor.model.document.selection);\n        this.isEnabled = !!tableElement;\n        if (!this.isEnabled) {\n            this.value = false;\n        } else {\n            this.value = !!getCaptionFromTableModelElement(tableElement);\n        }\n    }\n    /**\n\t * Executes the command.\n\t *\n\t * ```ts\n\t * editor.execute( 'toggleTableCaption' );\n\t * ```\n\t *\n\t * @param options Options for the executed command.\n\t * @param options.focusCaptionOnShow When true and the caption shows up, the selection will be moved into it straight away.\n\t * @fires execute\n\t */ execute({ focusCaptionOnShow = false } = {}) {\n        this.editor.model.change((writer)=>{\n            if (this.value) {\n                this._hideTableCaption(writer);\n            } else {\n                this._showTableCaption(writer, focusCaptionOnShow);\n            }\n        });\n    }\n    /**\n\t * Shows the table caption. Also:\n\t *\n\t * * it attempts to restore the caption content from the `TableCaptionEditing` caption registry,\n\t * * it moves the selection to the caption right away, it the `focusCaptionOnShow` option was set.\n\t *\n\t * @param focusCaptionOnShow Default focus behavior when showing the caption.\n\t */ _showTableCaption(writer, focusCaptionOnShow) {\n        const model = this.editor.model;\n        const tableElement = getSelectionAffectedTable(model.document.selection);\n        const tableCaptionEditing = this.editor.plugins.get('TableCaptionEditing');\n        const savedCaptionElement = tableCaptionEditing._getSavedCaption(tableElement);\n        // Try restoring the caption from the TableCaptionEditing plugin storage.\n        const newCaptionElement = savedCaptionElement || writer.createElement('caption');\n        model.insertContent(newCaptionElement, tableElement, 'end');\n        if (focusCaptionOnShow) {\n            writer.setSelection(newCaptionElement, 'in');\n        }\n    }\n    /**\n\t * Hides the caption of a selected table (or an table caption the selection is anchored to).\n\t *\n\t * The content of the caption is stored in the `TableCaptionEditing` caption registry to make this\n\t * a reversible action.\n\t */ _hideTableCaption(writer) {\n        const model = this.editor.model;\n        const tableElement = getSelectionAffectedTable(model.document.selection);\n        const tableCaptionEditing = this.editor.plugins.get('TableCaptionEditing');\n        const captionElement = getCaptionFromTableModelElement(tableElement);\n        // Store the caption content so it can be restored quickly if the user changes their mind.\n        tableCaptionEditing._saveCaption(tableElement, captionElement);\n        model.deleteContent(writer.createSelection(captionElement, 'on'));\n    }\n}\n\n/**\n * The table caption editing plugin.\n */ class TableCaptionEditing extends Plugin {\n    /**\n\t * A map that keeps saved JSONified table captions and table model elements they are\n\t * associated with.\n\t *\n\t * To learn more about this system, see {@link #_saveCaption}.\n\t */ _savedCaptionsMap;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableCaptionEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._savedCaptionsMap = new WeakMap();\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const schema = editor.model.schema;\n        const view = editor.editing.view;\n        const t = editor.t;\n        if (!schema.isRegistered('caption')) {\n            schema.register('caption', {\n                allowIn: 'table',\n                allowContentOf: '$block',\n                isLimit: true\n            });\n        } else {\n            schema.extend('caption', {\n                allowIn: 'table'\n            });\n        }\n        editor.commands.add('toggleTableCaption', new ToggleTableCaptionCommand(this.editor));\n        // View -> model converter for the data pipeline.\n        editor.conversion.for('upcast').elementToElement({\n            view: matchTableCaptionViewElement,\n            model: 'caption'\n        });\n        // Model -> view converter for the data pipeline.\n        editor.conversion.for('dataDowncast').elementToElement({\n            model: 'caption',\n            view: (modelElement, { writer })=>{\n                if (!isTable(modelElement.parent)) {\n                    return null;\n                }\n                return writer.createContainerElement('figcaption');\n            }\n        });\n        // Model -> view converter for the editing pipeline.\n        editor.conversion.for('editingDowncast').elementToElement({\n            model: 'caption',\n            view: (modelElement, { writer })=>{\n                if (!isTable(modelElement.parent)) {\n                    return null;\n                }\n                const figcaptionElement = writer.createEditableElement('figcaption');\n                writer.setCustomProperty('tableCaption', true, figcaptionElement);\n                figcaptionElement.placeholder = t('Enter table caption');\n                enablePlaceholder({\n                    view,\n                    element: figcaptionElement,\n                    keepOnFocus: true\n                });\n                return toWidgetEditable(figcaptionElement, writer);\n            }\n        });\n        injectTableCaptionPostFixer(editor.model);\n    }\n    /**\n\t * Returns the saved {@link module:engine/model/element~Element#toJSON JSONified} caption\n\t * of a table model element.\n\t *\n\t * See {@link #_saveCaption}.\n\t *\n\t * @internal\n\t * @param tableModelElement The model element the caption should be returned for.\n\t * @returns The model caption element or `null` if there is none.\n\t */ _getSavedCaption(tableModelElement) {\n        const jsonObject = this._savedCaptionsMap.get(tableModelElement);\n        return jsonObject ? Element.fromJSON(jsonObject) : null;\n    }\n    /**\n\t * Saves a {@link module:engine/model/element~Element#toJSON JSONified} caption for\n\t * a table element to allow restoring it in the future.\n\t *\n\t * A caption is saved every time it gets hidden. The\n\t * user should be able to restore it on demand.\n\t *\n\t * **Note**: The caption cannot be stored in the table model element attribute because,\n\t * for instance, when the model state propagates to collaborators, the attribute would get\n\t * lost (mainly because it does not convert to anything when the caption is hidden) and\n\t * the states of collaborators' models would de-synchronize causing numerous issues.\n\t *\n\t * See {@link #_getSavedCaption}.\n\t *\n\t * @internal\n\t * @param tableModelElement The model element the caption is saved for.\n\t * @param caption The caption model element to be saved.\n\t */ _saveCaption(tableModelElement, caption) {\n        this._savedCaptionsMap.set(tableModelElement, caption.toJSON());\n    }\n}\n\n/**\n  * The table caption UI plugin. It introduces the `'toggleTableCaption'` UI button.\n  */ class TableCaptionUI extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableCaptionUI';\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const t = editor.t;\n        editor.ui.componentFactory.add('toggleTableCaption', (locale)=>{\n            const command = editor.commands.get('toggleTableCaption');\n            const view = new ButtonView(locale);\n            view.set({\n                icon: icons.caption,\n                tooltip: true,\n                isToggleable: true\n            });\n            view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');\n            view.bind('label').to(command, 'value', (value)=>value ? t('Toggle caption off') : t('Toggle caption on'));\n            this.listenTo(view, 'execute', ()=>{\n                editor.execute('toggleTableCaption', {\n                    focusCaptionOnShow: true\n                });\n                // Scroll to the selection and highlight the caption if the caption showed up.\n                if (command.value) {\n                    const modelCaptionElement = getCaptionFromModelSelection(editor.model.document.selection);\n                    const figcaptionElement = editor.editing.mapper.toViewElement(modelCaptionElement);\n                    if (!figcaptionElement) {\n                        return;\n                    }\n                    editingView.scrollToTheSelection();\n                    editingView.change((writer)=>{\n                        writer.addClass('table__caption_highlighted', figcaptionElement);\n                    });\n                }\n                editor.editing.view.focus();\n            });\n            return view;\n        });\n    }\n}\n\n/**\n * The table caption plugin.\n */ class TableCaption extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableCaption';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableCaptionEditing,\n            TableCaptionUI\n        ];\n    }\n}\n\n/**\n * Command used by the {@link module:table/tablecolumnresize~TableColumnResize Table column resize feature} that\n * updates the width of the whole table as well as its individual columns.\n */ class TableWidthsCommand extends Command {\n    /**\n\t * @inheritDoc\n\t */ refresh() {\n        // The command is always enabled as it doesn't care about the actual selection - table can be resized\n        // even if the selection is elsewhere.\n        this.isEnabled = true;\n    }\n    /**\n\t * Updated the `tableWidth` attribute of the table and the `columnWidth` attribute of the columns of that table.\n\t */ execute(options = {}) {\n        const { model, plugins } = this.editor;\n        let { table = model.document.selection.getSelectedElement(), columnWidths, tableWidth } = options;\n        if (columnWidths) {\n            // For backwards compatibility, columnWidths might be an array or a string of comma-separated values.\n            columnWidths = Array.isArray(columnWidths) ? columnWidths : columnWidths.split(',');\n        }\n        model.change((writer)=>{\n            if (tableWidth) {\n                writer.setAttribute('tableWidth', tableWidth, table);\n            } else {\n                writer.removeAttribute('tableWidth', table);\n            }\n            const tableColumnGroup = plugins.get('TableColumnResizeEditing').getColumnGroupElement(table);\n            if (!columnWidths && !tableColumnGroup) {\n                return;\n            }\n            if (!columnWidths) {\n                return writer.remove(tableColumnGroup);\n            }\n            const widths = normalizeColumnWidths(columnWidths);\n            if (!tableColumnGroup) {\n                const colGroupElement = writer.createElement('tableColumnGroup');\n                widths.forEach((columnWidth)=>writer.appendElement('tableColumn', {\n                        columnWidth\n                    }, colGroupElement));\n                writer.append(colGroupElement, table);\n            } else {\n                Array.from(tableColumnGroup.getChildren()).forEach((column, index)=>writer.setAttribute('columnWidth', widths[index], column));\n            }\n        });\n    }\n}\n\n/**\n * Returns a upcast helper that ensures the number of `<tableColumn>` elements corresponds to the actual number of columns in the table,\n * because the input data might have too few or too many <col> elements.\n */ function upcastColgroupElement(tableUtilsPlugin) {\n    return (dispatcher)=>dispatcher.on('element:colgroup', (evt, data, conversionApi)=>{\n            const modelTable = data.modelCursor.findAncestor('table');\n            const tableColumnGroup = getColumnGroupElement(modelTable);\n            if (!tableColumnGroup) {\n                return;\n            }\n            const columnElements = getTableColumnElements(tableColumnGroup);\n            const columnsCount = tableUtilsPlugin.getColumns(modelTable);\n            let columnWidths = translateColSpanAttribute(tableColumnGroup, conversionApi.writer);\n            // Fill the array with 'auto' values if the number of columns is higher than number of declared values.\n            columnWidths = Array.from({\n                length: columnsCount\n            }, (_, index)=>columnWidths[index] || 'auto');\n            if (columnWidths.length != columnElements.length || columnWidths.includes('auto')) {\n                updateColumnElements(columnElements, tableColumnGroup, normalizeColumnWidths(columnWidths), conversionApi.writer);\n            }\n        }, {\n            priority: 'low'\n        });\n}\n/**\n * Returns downcast helper for adding `ck-table-resized` class if there is a `<tableColumnGroup>` element inside the table.\n */ function downcastTableResizedClass() {\n    return (dispatcher)=>dispatcher.on('insert:table', (evt, data, conversionApi)=>{\n            const viewWriter = conversionApi.writer;\n            const modelTable = data.item;\n            const viewElement = conversionApi.mapper.toViewElement(modelTable);\n            const viewTable = viewElement.is('element', 'table') ? viewElement : Array.from(viewElement.getChildren()).find((viewChild)=>viewChild.is('element', 'table'));\n            const tableColumnGroup = getColumnGroupElement(modelTable);\n            if (tableColumnGroup) {\n                viewWriter.addClass('ck-table-resized', viewTable);\n            } else {\n                viewWriter.removeClass('ck-table-resized', viewTable);\n            }\n        }, {\n            priority: 'low'\n        });\n}\n\n/**\n * The table column resize editing plugin.\n */ class TableColumnResizeEditing extends Plugin {\n    /**\n\t * A flag indicating if the column resizing is in progress.\n\t */ _isResizingActive;\n    /**\n\t * A temporary storage for the required data needed to correctly calculate the widths of the resized columns. This storage is\n\t * initialized when column resizing begins, and is purged upon completion.\n\t */ _resizingData;\n    /**\n\t * DOM emitter.\n\t */ _domEmitter;\n    /**\n\t * A local reference to the {@link module:table/tableutils~TableUtils} plugin.\n\t */ _tableUtilsPlugin;\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            TableEditing,\n            TableUtils\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'TableColumnResizeEditing';\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        this._isResizingActive = false;\n        this.set('_isResizingAllowed', true);\n        this._resizingData = null;\n        this._domEmitter = new (DomEmitterMixin())();\n        this._tableUtilsPlugin = editor.plugins.get('TableUtils');\n        this.on('change:_isResizingAllowed', (evt, name, value)=>{\n            // Toggling the `ck-column-resize_disabled` class shows and hides the resizers through CSS.\n            const classAction = value ? 'removeClass' : 'addClass';\n            editor.editing.view.change((writer)=>{\n                for (const root of editor.editing.view.document.roots){\n                    writer[classAction]('ck-column-resize_disabled', editor.editing.view.document.getRoot(root.rootName));\n                }\n            });\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        this._extendSchema();\n        this._registerPostFixer();\n        this._registerConverters();\n        this._registerResizingListeners();\n        this._registerResizerInserter();\n        const editor = this.editor;\n        const columnResizePlugin = editor.plugins.get('TableColumnResize');\n        const tableEditing = editor.plugins.get('TableEditing');\n        tableEditing.registerAdditionalSlot({\n            filter: (element)=>element.is('element', 'tableColumnGroup'),\n            positionOffset: 0\n        });\n        const tableWidthsCommand = new TableWidthsCommand(editor);\n        // For backwards compatibility we have two commands that perform exactly the same operation.\n        editor.commands.add('resizeTableWidth', tableWidthsCommand);\n        editor.commands.add('resizeColumnWidths', tableWidthsCommand);\n        // Currently the states of column resize and table resize (which is actually the last column resize) features\n        // are bound together. They can be separated in the future by adding distinct listeners and applying\n        // different CSS classes (e.g. `ck-column-resize_disabled` and `ck-table-resize_disabled`) to the editor root.\n        // See #12148 for the details.\n        this.bind('_isResizingAllowed').to(editor, 'isReadOnly', columnResizePlugin, 'isEnabled', tableWidthsCommand, 'isEnabled', (isEditorReadOnly, isPluginEnabled, isTableWidthsCommandCommandEnabled)=>!isEditorReadOnly && isPluginEnabled && isTableWidthsCommandCommandEnabled);\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        this._domEmitter.stopListening();\n        super.destroy();\n    }\n    /**\n\t * Returns a 'tableColumnGroup' element from the 'table'.\n\t *\n\t * @param element A 'table' or 'tableColumnGroup' element.\n\t * @returns A 'tableColumnGroup' element.\n\t */ getColumnGroupElement(element) {\n        return getColumnGroupElement(element);\n    }\n    /**\n\t * Returns an array of 'tableColumn' elements.\n\t *\n\t * @param element A 'table' or 'tableColumnGroup' element.\n\t * @returns An array of 'tableColumn' elements.\n\t */ getTableColumnElements(element) {\n        return getTableColumnElements(element);\n    }\n    /**\n\t * Returns an array of table column widths.\n\t *\n\t * @param element A 'table' or 'tableColumnGroup' element.\n\t * @returns An array of table column widths.\n\t */ getTableColumnsWidths(element) {\n        return getTableColumnsWidths(element);\n    }\n    /**\n\t * Registers new attributes for a table model element.\n\t */ _extendSchema() {\n        this.editor.model.schema.extend('table', {\n            allowAttributes: [\n                'tableWidth'\n            ]\n        });\n        this.editor.model.schema.register('tableColumnGroup', {\n            allowIn: 'table',\n            isLimit: true\n        });\n        this.editor.model.schema.register('tableColumn', {\n            allowIn: 'tableColumnGroup',\n            allowAttributes: [\n                'columnWidth',\n                'colSpan'\n            ],\n            isLimit: true\n        });\n    }\n    /**\n\t * Registers table column resize post-fixer.\n\t *\n\t * It checks if the change from the differ concerns a table-related element or attribute. For detected changes it:\n\t *  * Adjusts the `columnWidths` attribute to guarantee that the sum of the widths from all columns is 100%.\n\t *  * Checks if the `columnWidths` attribute gets updated accordingly after columns have been added or removed.\n\t */ _registerPostFixer() {\n        const editor = this.editor;\n        const model = editor.model;\n        model.document.registerPostFixer((writer)=>{\n            let changed = false;\n            for (const table of getChangedResizedTables(model)){\n                const tableColumnGroup = this.getColumnGroupElement(table);\n                const columns = this.getTableColumnElements(tableColumnGroup);\n                const columnWidths = this.getTableColumnsWidths(tableColumnGroup);\n                // Adjust the `columnWidths` attribute to guarantee that the sum of the widths from all columns is 100%.\n                let normalizedWidths = normalizeColumnWidths(columnWidths);\n                // If the number of columns has changed, then we need to adjust the widths of the affected columns.\n                normalizedWidths = adjustColumnWidths(normalizedWidths, table, this);\n                if (isEqual(columnWidths, normalizedWidths)) {\n                    continue;\n                }\n                updateColumnElements(columns, tableColumnGroup, normalizedWidths, writer);\n                changed = true;\n            }\n            return changed;\n        });\n        /**\n\t\t * Adjusts if necessary the `columnWidths` in case if the number of column has changed.\n\t\t *\n\t\t * @param columnWidths Note: this array **may be modified** by the function.\n\t\t * @param table Table to be checked.\n\t\t */ function adjustColumnWidths(columnWidths, table, plugin) {\n            const newTableColumnsCount = plugin._tableUtilsPlugin.getColumns(table);\n            const columnsCountDelta = newTableColumnsCount - columnWidths.length;\n            if (columnsCountDelta === 0) {\n                return columnWidths;\n            }\n            const widths = columnWidths.map((width)=>Number(width.replace('%', '')));\n            // Collect all cells that are affected by the change.\n            const cellSet = getAffectedCells(plugin.editor.model.document.differ, table);\n            for (const cell of cellSet){\n                const currentColumnsDelta = newTableColumnsCount - widths.length;\n                if (currentColumnsDelta === 0) {\n                    continue;\n                }\n                // If the column count in the table changed, adjust the widths of the affected columns.\n                const hasMoreColumns = currentColumnsDelta > 0;\n                const currentColumnIndex = plugin._tableUtilsPlugin.getCellLocation(cell).column;\n                if (hasMoreColumns) {\n                    const columnMinWidthAsPercentage = getColumnMinWidthAsPercentage(table, plugin.editor);\n                    const columnWidthsToInsert = createFilledArray(currentColumnsDelta, columnMinWidthAsPercentage);\n                    widths.splice(currentColumnIndex, 0, ...columnWidthsToInsert);\n                } else {\n                    // Moves the widths of the removed columns to the preceding one.\n                    // Other editors either reduce the width of the whole table or adjust the widths\n                    // proportionally, so change of this behavior can be considered in the future.\n                    const removedColumnWidths = widths.splice(currentColumnIndex, Math.abs(currentColumnsDelta));\n                    widths[currentColumnIndex] += sumArray(removedColumnWidths);\n                }\n            }\n            return widths.map((width)=>width + '%');\n        }\n        /**\n\t\t * Returns a set of cells that have been changed in a given table.\n\t\t */ function getAffectedCells(differ, table) {\n            const cellSet = new Set();\n            for (const change of differ.getChanges()){\n                if (change.type == 'insert' && change.position.nodeAfter && change.position.nodeAfter.name == 'tableCell' && change.position.nodeAfter.getAncestors().includes(table)) {\n                    cellSet.add(change.position.nodeAfter);\n                } else if (change.type == 'remove') {\n                    // If the first cell was removed, use the node after the change position instead.\n                    const referenceNode = change.position.nodeBefore || change.position.nodeAfter;\n                    if (referenceNode.name == 'tableCell' && referenceNode.getAncestors().includes(table)) {\n                        cellSet.add(referenceNode);\n                    }\n                }\n            }\n            return cellSet;\n        }\n    }\n    /**\n\t * Registers table column resize converters.\n\t */ _registerConverters() {\n        const editor = this.editor;\n        const conversion = editor.conversion;\n        // Table width style\n        conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: 'figure',\n                key: 'style',\n                value: {\n                    width: /[\\s\\S]+/\n                }\n            },\n            model: {\n                name: 'table',\n                key: 'tableWidth',\n                value: (viewElement)=>viewElement.getStyle('width')\n            }\n        });\n        conversion.for('downcast').attributeToAttribute({\n            model: {\n                name: 'table',\n                key: 'tableWidth'\n            },\n            view: (width)=>({\n                    name: 'figure',\n                    key: 'style',\n                    value: {\n                        width\n                    }\n                })\n        });\n        conversion.elementToElement({\n            model: 'tableColumnGroup',\n            view: 'colgroup'\n        });\n        conversion.elementToElement({\n            model: 'tableColumn',\n            view: 'col'\n        });\n        conversion.for('downcast').add(downcastTableResizedClass());\n        conversion.for('upcast').add(upcastColgroupElement(this._tableUtilsPlugin));\n        conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: 'col',\n                styles: {\n                    width: /.*/\n                }\n            },\n            model: {\n                key: 'columnWidth',\n                value: (viewElement)=>{\n                    const viewColWidth = viewElement.getStyle('width');\n                    // 'pt' is the default unit for table column width pasted from MS Office.\n                    // See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for more details.\n                    if (!viewColWidth || !viewColWidth.endsWith('%') && !viewColWidth.endsWith('pt')) {\n                        return 'auto';\n                    }\n                    return viewColWidth;\n                }\n            }\n        });\n        // The `col[span]` attribute is present in tables pasted from MS Excel. We use it to set the temporary `colSpan` model attribute,\n        // which is consumed during the `colgroup` element upcast.\n        // See https://github.com/ckeditor/ckeditor5/issues/14521#issuecomment-1662102889 for more details.\n        conversion.for('upcast').attributeToAttribute({\n            view: {\n                name: 'col',\n                key: 'span'\n            },\n            model: 'colSpan'\n        });\n        conversion.for('downcast').attributeToAttribute({\n            model: {\n                name: 'tableColumn',\n                key: 'columnWidth'\n            },\n            view: (width)=>({\n                    key: 'style',\n                    value: {\n                        width\n                    }\n                })\n        });\n    }\n    /**\n\t * Registers listeners to handle resizing process.\n\t */ _registerResizingListeners() {\n        const editingView = this.editor.editing.view;\n        editingView.addObserver(MouseEventsObserver);\n        editingView.document.on('mousedown', this._onMouseDownHandler.bind(this), {\n            priority: 'high'\n        });\n        this._domEmitter.listenTo(global.window.document, 'mousemove', throttle(this._onMouseMoveHandler.bind(this), 50));\n        this._domEmitter.listenTo(global.window.document, 'mouseup', this._onMouseUpHandler.bind(this));\n    }\n    /**\n\t * Handles the `mousedown` event on column resizer element:\n\t *  * calculates the initial column pixel widths,\n\t *  * inserts the `<colgroup>` element if it is not present in the `<table>`,\n\t *  * puts the necessary data in the temporary storage,\n\t *  * applies the attributes to the `<table>` view element.\n\t *\n\t * @param eventInfo An object containing information about the fired event.\n\t * @param domEventData The data related to the DOM event.\n\t */ _onMouseDownHandler(eventInfo, domEventData) {\n        const target = domEventData.target;\n        if (!target.hasClass('ck-table-column-resizer')) {\n            return;\n        }\n        if (!this._isResizingAllowed) {\n            return;\n        }\n        const editor = this.editor;\n        const modelTable = editor.editing.mapper.toModelElement(target.findAncestor('figure'));\n        // Do not resize if table model is in non-editable place.\n        if (!editor.model.canEditAt(modelTable)) {\n            return;\n        }\n        domEventData.preventDefault();\n        eventInfo.stop();\n        // The column widths are calculated upon mousedown to allow lazy applying the `columnWidths` attribute on the table.\n        const columnWidthsInPx = _calculateDomColumnWidths(modelTable, this._tableUtilsPlugin, editor);\n        const viewTable = target.findAncestor('table');\n        const editingView = editor.editing.view;\n        // Insert colgroup for the table that is resized for the first time.\n        if (!Array.from(viewTable.getChildren()).find((viewCol)=>viewCol.is('element', 'colgroup'))) {\n            editingView.change((viewWriter)=>{\n                _insertColgroupElement(viewWriter, columnWidthsInPx, viewTable);\n            });\n        }\n        this._isResizingActive = true;\n        this._resizingData = this._getResizingData(domEventData, columnWidthsInPx);\n        // At this point we change only the editor view - we don't want other users to see our changes yet,\n        // so we can't apply them in the model.\n        editingView.change((writer)=>_applyResizingAttributesToTable(writer, viewTable, this._resizingData));\n        /**\n\t\t * Calculates the DOM columns' widths. It is done by taking the width of the widest cell\n\t\t * from each table column (we rely on the  {@link module:table/tablewalker~TableWalker}\n\t\t * to determine which column the cell belongs to).\n\t\t *\n\t\t * @param modelTable A table which columns should be measured.\n\t\t * @param tableUtils The Table Utils plugin instance.\n\t\t * @param editor The editor instance.\n\t\t * @returns Columns' widths expressed in pixels (without unit).\n\t\t */ function _calculateDomColumnWidths(modelTable, tableUtilsPlugin, editor) {\n            const columnWidthsInPx = Array(tableUtilsPlugin.getColumns(modelTable));\n            const tableWalker = new TableWalker(modelTable);\n            for (const cellSlot of tableWalker){\n                const viewCell = editor.editing.mapper.toViewElement(cellSlot.cell);\n                const domCell = editor.editing.view.domConverter.mapViewToDom(viewCell);\n                const domCellWidth = getDomCellOuterWidth(domCell);\n                if (!columnWidthsInPx[cellSlot.column] || domCellWidth < columnWidthsInPx[cellSlot.column]) {\n                    columnWidthsInPx[cellSlot.column] = toPrecision(domCellWidth);\n                }\n            }\n            return columnWidthsInPx;\n        }\n        /**\n\t\t * Creates a `<colgroup>` element with `<col>`s and inserts it into a given view table.\n\t\t *\n\t\t * @param viewWriter A writer instance.\n\t\t * @param columnWidthsInPx Column widths.\n\t\t * @param viewTable A table view element.\n\t\t */ function _insertColgroupElement(viewWriter, columnWidthsInPx, viewTable) {\n            const colgroup = viewWriter.createContainerElement('colgroup');\n            for(let i = 0; i < columnWidthsInPx.length; i++){\n                const viewColElement = viewWriter.createEmptyElement('col');\n                const columnWidthInPc = `${toPrecision(columnWidthsInPx[i] / sumArray(columnWidthsInPx) * 100)}%`;\n                viewWriter.setStyle('width', columnWidthInPc, viewColElement);\n                viewWriter.insert(viewWriter.createPositionAt(colgroup, 'end'), viewColElement);\n            }\n            viewWriter.insert(viewWriter.createPositionAt(viewTable, 0), colgroup);\n        }\n        /**\n\t\t * Applies the style and classes to the view table as the resizing begun.\n\t\t *\n\t\t * @param viewWriter A writer instance.\n\t\t * @param viewTable A table containing the clicked resizer.\n\t\t * @param resizingData Data related to the resizing.\n\t\t */ function _applyResizingAttributesToTable(viewWriter, viewTable, resizingData) {\n            const figureInitialPcWidth = resizingData.widths.viewFigureWidth / resizingData.widths.viewFigureParentWidth;\n            viewWriter.addClass('ck-table-resized', viewTable);\n            viewWriter.addClass('ck-table-column-resizer__active', resizingData.elements.viewResizer);\n            viewWriter.setStyle('width', `${toPrecision(figureInitialPcWidth * 100)}%`, viewTable.findAncestor('figure'));\n        }\n    }\n    /**\n\t * Handles the `mousemove` event.\n\t *  * If resizing process is not in progress, it does nothing.\n\t *  * If resizing is active but not allowed, it stops the resizing process instantly calling the `mousedown` event handler.\n\t *  * Otherwise it dynamically updates the widths of the resized columns.\n\t *\n\t * @param eventInfo An object containing information about the fired event.\n\t * @param mouseEventData The native DOM event.\n\t */ _onMouseMoveHandler(eventInfo, mouseEventData) {\n        if (!this._isResizingActive) {\n            return;\n        }\n        if (!this._isResizingAllowed) {\n            this._onMouseUpHandler();\n            return;\n        }\n        const { columnPosition, flags: { isRightEdge, isTableCentered, isLtrContent }, elements: { viewFigure, viewLeftColumn, viewRightColumn }, widths: { viewFigureParentWidth, tableWidth, leftColumnWidth, rightColumnWidth } } = this._resizingData;\n        const dxLowerBound = -leftColumnWidth + COLUMN_MIN_WIDTH_IN_PIXELS;\n        const dxUpperBound = isRightEdge ? viewFigureParentWidth - tableWidth : rightColumnWidth - COLUMN_MIN_WIDTH_IN_PIXELS;\n        // The multiplier is needed for calculating the proper movement offset:\n        // - it should negate the sign if content language direction is right-to-left,\n        // - it should double the offset if the table edge is resized and table is centered.\n        const multiplier = (isLtrContent ? 1 : -1) * (isRightEdge && isTableCentered ? 2 : 1);\n        const dx = clamp((mouseEventData.clientX - columnPosition) * multiplier, Math.min(dxLowerBound, 0), Math.max(dxUpperBound, 0));\n        if (dx === 0) {\n            return;\n        }\n        this.editor.editing.view.change((writer)=>{\n            const leftColumnWidthAsPercentage = toPrecision((leftColumnWidth + dx) * 100 / tableWidth);\n            writer.setStyle('width', `${leftColumnWidthAsPercentage}%`, viewLeftColumn);\n            if (isRightEdge) {\n                const tableWidthAsPercentage = toPrecision((tableWidth + dx) * 100 / viewFigureParentWidth);\n                writer.setStyle('width', `${tableWidthAsPercentage}%`, viewFigure);\n            } else {\n                const rightColumnWidthAsPercentage = toPrecision((rightColumnWidth - dx) * 100 / tableWidth);\n                writer.setStyle('width', `${rightColumnWidthAsPercentage}%`, viewRightColumn);\n            }\n        });\n    }\n    /**\n\t * Handles the `mouseup` event.\n\t *  * If resizing process is not in progress, it does nothing.\n\t *  * If resizing is active but not allowed, it cancels the resizing process restoring the original widths.\n\t *  * Otherwise it propagates the changes from view to the model by executing the adequate commands.\n\t */ _onMouseUpHandler() {\n        if (!this._isResizingActive) {\n            return;\n        }\n        const { viewResizer, modelTable, viewFigure, viewColgroup } = this._resizingData.elements;\n        const editor = this.editor;\n        const editingView = editor.editing.view;\n        const tableColumnGroup = this.getColumnGroupElement(modelTable);\n        const viewColumns = Array.from(viewColgroup.getChildren()).filter((column)=>column.is('view:element'));\n        const columnWidthsAttributeOld = tableColumnGroup ? this.getTableColumnsWidths(tableColumnGroup) : null;\n        const columnWidthsAttributeNew = viewColumns.map((column)=>column.getStyle('width'));\n        const isColumnWidthsAttributeChanged = !isEqual(columnWidthsAttributeOld, columnWidthsAttributeNew);\n        const tableWidthAttributeOld = modelTable.getAttribute('tableWidth');\n        const tableWidthAttributeNew = viewFigure.getStyle('width');\n        const isTableWidthAttributeChanged = tableWidthAttributeOld !== tableWidthAttributeNew;\n        if (isColumnWidthsAttributeChanged || isTableWidthAttributeChanged) {\n            if (this._isResizingAllowed) {\n                editor.execute('resizeTableWidth', {\n                    table: modelTable,\n                    tableWidth: `${toPrecision(tableWidthAttributeNew)}%`,\n                    columnWidths: columnWidthsAttributeNew\n                });\n            } else {\n                // In read-only mode revert all changes in the editing view. The model is not touched so it does not need to be restored.\n                // This case can occur if the read-only mode kicks in during the resizing process.\n                editingView.change((writer)=>{\n                    // If table had resized columns before, restore the previous column widths.\n                    // Otherwise clean up the view from the temporary column resizing markup.\n                    if (columnWidthsAttributeOld) {\n                        for (const viewCol of viewColumns){\n                            writer.setStyle('width', columnWidthsAttributeOld.shift(), viewCol);\n                        }\n                    } else {\n                        writer.remove(viewColgroup);\n                    }\n                    if (isTableWidthAttributeChanged) {\n                        // If the whole table was already resized before, restore the previous table width.\n                        // Otherwise clean up the view from the temporary table resizing markup.\n                        if (tableWidthAttributeOld) {\n                            writer.setStyle('width', tableWidthAttributeOld, viewFigure);\n                        } else {\n                            writer.removeStyle('width', viewFigure);\n                        }\n                    }\n                    // If a table and its columns weren't resized before,\n                    // prune the remaining common resizing markup.\n                    if (!columnWidthsAttributeOld && !tableWidthAttributeOld) {\n                        writer.removeClass('ck-table-resized', [\n                            ...viewFigure.getChildren()\n                        ].find((element)=>element.name === 'table'));\n                    }\n                });\n            }\n        }\n        editingView.change((writer)=>{\n            writer.removeClass('ck-table-column-resizer__active', viewResizer);\n        });\n        this._isResizingActive = false;\n        this._resizingData = null;\n    }\n    /**\n\t * Retrieves and returns required data needed for the resizing process.\n\t *\n\t * @param domEventData The data of the `mousedown` event.\n\t * @param columnWidths The current widths of the columns.\n\t * @returns The data needed for the resizing process.\n\t */ _getResizingData(domEventData, columnWidths) {\n        const editor = this.editor;\n        const columnPosition = domEventData.domEvent.clientX;\n        const viewResizer = domEventData.target;\n        const viewLeftCell = viewResizer.findAncestor('td') || viewResizer.findAncestor('th');\n        const modelLeftCell = editor.editing.mapper.toModelElement(viewLeftCell);\n        const modelTable = modelLeftCell.findAncestor('table');\n        const leftColumnIndex = getColumnEdgesIndexes(modelLeftCell, this._tableUtilsPlugin).rightEdge;\n        const lastColumnIndex = this._tableUtilsPlugin.getColumns(modelTable) - 1;\n        const isRightEdge = leftColumnIndex === lastColumnIndex;\n        const isTableCentered = !modelTable.hasAttribute('tableAlignment');\n        const isLtrContent = editor.locale.contentLanguageDirection !== 'rtl';\n        const viewTable = viewLeftCell.findAncestor('table');\n        const viewFigure = viewTable.findAncestor('figure');\n        const viewColgroup = [\n            ...viewTable.getChildren()\n        ].find((viewCol)=>viewCol.is('element', 'colgroup'));\n        const viewLeftColumn = viewColgroup.getChild(leftColumnIndex);\n        const viewRightColumn = isRightEdge ? undefined : viewColgroup.getChild(leftColumnIndex + 1);\n        const viewFigureParentWidth = getElementWidthInPixels(editor.editing.view.domConverter.mapViewToDom(viewFigure.parent));\n        const viewFigureWidth = getElementWidthInPixels(editor.editing.view.domConverter.mapViewToDom(viewFigure));\n        const tableWidth = getTableWidthInPixels(modelTable, editor);\n        const leftColumnWidth = columnWidths[leftColumnIndex];\n        const rightColumnWidth = isRightEdge ? undefined : columnWidths[leftColumnIndex + 1];\n        return {\n            columnPosition,\n            flags: {\n                isRightEdge,\n                isTableCentered,\n                isLtrContent\n            },\n            elements: {\n                viewResizer,\n                modelTable,\n                viewFigure,\n                viewColgroup,\n                viewLeftColumn,\n                viewRightColumn\n            },\n            widths: {\n                viewFigureParentWidth,\n                viewFigureWidth,\n                tableWidth,\n                leftColumnWidth,\n                rightColumnWidth\n            }\n        };\n    }\n    /**\n\t * Registers a listener ensuring that each resizable cell have a resizer handle.\n\t */ _registerResizerInserter() {\n        this.editor.conversion.for('editingDowncast').add((dispatcher)=>{\n            dispatcher.on('insert:tableCell', (evt, data, conversionApi)=>{\n                const modelElement = data.item;\n                const viewElement = conversionApi.mapper.toViewElement(modelElement);\n                const viewWriter = conversionApi.writer;\n                viewWriter.insert(viewWriter.createPositionAt(viewElement, 'end'), viewWriter.createUIElement('div', {\n                    class: 'ck-table-column-resizer'\n                }));\n            }, {\n                priority: 'lowest'\n            });\n        });\n    }\n}\n\n/**\n * The table column resize feature.\n *\n * It provides the possibility to set the width of each column in a table using a resize handler.\n */ class TableColumnResize extends Plugin {\n    /**\n\t * @inheritDoc\n \t */ static get requires() {\n        return [\n            TableColumnResizeEditing,\n            TableCellWidthEditing\n        ];\n    }\n    /**\n\t * @inheritDoc\n \t */ static get pluginName() {\n        return 'TableColumnResize';\n    }\n}\n\nexport { PlainTableOutput, Table, TableCaption, TableCaptionEditing, TableCaptionUI, TableCellProperties, TableCellPropertiesEditing, TableCellPropertiesUI, TableCellWidthEditing, TableClipboard, TableColumnResize, TableColumnResizeEditing, TableEditing, TableKeyboard, TableMouse, TableProperties, TablePropertiesEditing, TablePropertiesUI, TableSelection, TableToolbar, TableUI, TableUtils };\n//# sourceMappingURL=index.js.map\n","// the `import` and `editorConfig` come from CKEditor's \"builder\" tool.\n// https://ckeditor.com/ckeditor-5/builder/\n\nimport {\n  ClassicEditor,\n  AccessibilityHelp,\n  Alignment,\n  AutoLink,\n  Autosave,\n  BlockQuote,\n  Bold,\n  Essentials,\n  FontBackgroundColor,\n  FontColor,\n  FontFamily,\n  FontSize,\n  Highlight,\n  HorizontalLine,\n  Indent,\n  IndentBlock,\n  Italic,\n  Link,\n  List,\n  Paragraph,\n  PasteFromOffice,\n  RemoveFormat,\n  SelectAll,\n  SpecialCharacters,\n  SpecialCharactersArrows,\n  SpecialCharactersCurrency,\n  SpecialCharactersEssentials,\n  SpecialCharactersLatin,\n  SpecialCharactersMathematical,\n  SpecialCharactersText,\n  Strikethrough,\n  Subscript,\n  Superscript,\n  Table,\n  TableToolbar,\n  Underline,\n  Undo\n} from 'ckeditor5';\n\nconst editorConfig = {\n  toolbar: {\n    items: [\n      'undo',\n      'redo',\n      '|',\n      'bold',\n      'italic',\n      'strikethrough',\n      '|',\n      'numberedList',\n      'bulletedList',\n      '|',\n      'outdent',\n      'indent',\n      '|',\n      'alignment',\n      '|',\n      'link'\n    ],\n    shouldNotGroupWhenFull: false\n  },\n  plugins: [\n    AccessibilityHelp,\n    Alignment,\n    AutoLink,\n    Autosave,\n    BlockQuote,\n    Bold,\n    Essentials,\n    FontBackgroundColor,\n    FontColor,\n    FontFamily,\n    FontSize,\n    Highlight,\n    HorizontalLine,\n    Indent,\n    IndentBlock,\n    Italic,\n    Link,\n    List,\n    Paragraph,\n    PasteFromOffice,\n    RemoveFormat,\n    SelectAll,\n    SpecialCharacters,\n    SpecialCharactersArrows,\n    SpecialCharactersCurrency,\n    SpecialCharactersEssentials,\n    SpecialCharactersLatin,\n    SpecialCharactersMathematical,\n    SpecialCharactersText,\n    Strikethrough,\n    Subscript,\n    Superscript,\n    Table,\n    TableToolbar,\n    Underline,\n    Undo\n  ],\n  fontFamily: {\n    supportAllValues: true\n  },\n  fontSize: {\n    options: [10, 12, 14, 'default', 18, 20, 22],\n    supportAllValues: true\n  },\n  link: {\n    addTargetToExternalLinks: true,\n    defaultProtocol: 'https://',\n    decorators: {\n      toggleDownloadable: {\n        mode: 'manual',\n        label: 'Downloadable',\n        attributes: {\n          download: 'file'\n        }\n      }\n    }\n  }\n};\n\n// responsible for creating and managing a CKEditor instance that is used to\n// edit the content of a textarea element.\nexport default class CkeditorManager {\n  /**\n   * @param {Element} textarea - the textarea HTML element that will be used to\n   *   create the CKEditor instance.\n   */\n  constructor(textarea) {\n    this.textarea = textarea;\n  }\n\n  createCkeditor() {\n    ClassicEditor.create(this.textarea, editorConfig)\n      .then((editor) => this.disableTextArea(editor))\n      .catch((error) => console.error(error));\n  }\n\n  /* CkEditor5 no longer respects the disabled tag. This will set it to read\n   * only if necessary.\n   */\n  disableTextArea(editor) {\n    if ($(this.textarea).is(':disabled')) {\n      editor.enableReadOnlyMode('disabled-field');\n      editor.ui.view.toolbar.element.style.display = 'none';\n    }\n  }\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin, PendingActions } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { DomEmitterMixin } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { debounce } from 'lodash-es';\n\n/* globals window */ /**\n * The {@link module:autosave/autosave~Autosave} plugin allows you to automatically save the data (e.g. send it to the server)\n * when needed (when the user changed the content).\n *\n * It listens to the {@link module:engine/model/document~Document#event:change:data `editor.model.document#change:data`}\n * and `window#beforeunload` events and calls the\n * {@link module:autosave/autosave~AutosaveAdapter#save `config.autosave.save()`} function.\n *\n * ```ts\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ), {\n * \t\tplugins: [ ArticlePluginSet, Autosave ],\n * \t\ttoolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],\n * \t\timage: {\n * \t\t\ttoolbar: [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ],\n * \t\t},\n * \t\tautosave: {\n * \t\t\tsave( editor: Editor ) {\n * \t\t\t\t// The saveData() function must return a promise\n * \t\t\t\t// which should be resolved when the data is successfully saved.\n * \t\t\t\treturn saveData( editor.getData() );\n * \t\t\t}\n * \t\t}\n * \t} );\n * ```\n *\n * Read more about this feature in the {@glink features/autosave Autosave} feature guide.\n */ class Autosave extends Plugin {\n    /**\n\t * The adapter is an object with a `save()` method. That method will be called whenever\n\t * the data changes. It might be called some time after the change,\n\t * since the event is throttled for performance reasons.\n\t */ adapter;\n    /**\n\t * Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,\n\t * unless a new action happens in the meantime.\n\t */ _debouncedSave;\n    /**\n\t * The last saved document version.\n\t */ _lastDocumentVersion;\n    /**\n\t * Promise used for asynchronous save calls.\n\t *\n\t * Created to handle the autosave call to an external data source. It resolves when that call is finished. It is re-used if\n\t * save is called before the promise has been resolved. It is set to `null` if there is no call in progress.\n\t */ _savePromise;\n    /**\n\t * DOM emitter.\n\t */ _domEmitter;\n    /**\n\t * The configuration of this plugins.\n\t */ _config;\n    /**\n\t * Editor's pending actions manager.\n\t */ _pendingActions;\n    /**\n\t * Informs whether there should be another autosave callback performed, immediately after current autosave callback finishes.\n\t *\n\t * This is set to `true` when there is a save request while autosave callback is already being processed\n\t * and the model has changed since the last save.\n\t */ _makeImmediateSave;\n    /**\n\t * An action that will be added to the pending action manager for actions happening in that plugin.\n\t */ _action = null;\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Autosave';\n    }\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            PendingActions\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ constructor(editor){\n        super(editor);\n        const config = editor.config.get('autosave') || {};\n        // A minimum amount of time that needs to pass after the last action.\n        // After that time the provided save callbacks are being called.\n        const waitingTime = config.waitingTime || 1000;\n        this.set('state', 'synchronized');\n        this._debouncedSave = debounce(this._save.bind(this), waitingTime);\n        this._lastDocumentVersion = editor.model.document.version;\n        this._savePromise = null;\n        this._domEmitter = new (DomEmitterMixin())();\n        this._config = config;\n        this._pendingActions = editor.plugins.get(PendingActions);\n        this._makeImmediateSave = false;\n    }\n    /**\n\t * @inheritDoc\n\t */ init() {\n        const editor = this.editor;\n        const doc = editor.model.document;\n        // Add the listener only after the editor is initialized to prevent firing save callback on data init.\n        this.listenTo(editor, 'ready', ()=>{\n            this.listenTo(doc, 'change:data', (evt, batch)=>{\n                if (!this._saveCallbacks.length) {\n                    return;\n                }\n                if (!batch.isLocal) {\n                    return;\n                }\n                if (this.state === 'synchronized') {\n                    this.state = 'waiting';\n                    // Set pending action already when we are waiting for the autosave callback.\n                    this._setPendingAction();\n                }\n                if (this.state === 'waiting') {\n                    this._debouncedSave();\n                }\n            // If the plugin is in `saving` state, it will change its state later basing on the `document.version`.\n            // If the `document.version` will be higher than stored `#_lastDocumentVersion`, then it means, that some `change:data`\n            // event has fired in the meantime.\n            });\n        });\n        // Flush on the editor's destroy listener with the highest priority to ensure that\n        // `editor.getData()` will be called before plugins are destroyed.\n        this.listenTo(editor, 'destroy', ()=>this._flush(), {\n            priority: 'highest'\n        });\n        // It's not possible to easy test it because karma uses `beforeunload` event\n        // to warn before full page reload and this event cannot be dispatched manually.\n        /* istanbul ignore next -- @preserve */ this._domEmitter.listenTo(window, 'beforeunload', (evtInfo, domEvt)=>{\n            if (this._pendingActions.hasAny) {\n                domEvt.returnValue = this._pendingActions.first.message;\n            }\n        });\n    }\n    /**\n\t * @inheritDoc\n\t */ destroy() {\n        // There's no need for canceling or flushing the throttled save, as\n        // it's done on the editor's destroy event with the highest priority.\n        this._domEmitter.stopListening();\n        super.destroy();\n    }\n    /**\n\t * Immediately calls autosave callback. All previously queued (debounced) callbacks are cleared. If there is already an autosave\n\t * callback in progress, then the requested save will be performed immediately after the current callback finishes.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */ save() {\n        this._debouncedSave.cancel();\n        return this._save();\n    }\n    /**\n\t * Invokes the remaining `_save()` method call.\n\t */ _flush() {\n        this._debouncedSave.flush();\n    }\n    /**\n\t * If the adapter is set and a new document version exists,\n\t * the `_save()` method creates a pending action and calls the `adapter.save()` method.\n\t * It waits for the result and then removes the created pending action.\n\t *\n\t * @returns A promise that will be resolved when the autosave callback is finished.\n\t */ _save() {\n        if (this._savePromise) {\n            this._makeImmediateSave = this.editor.model.document.version > this._lastDocumentVersion;\n            return this._savePromise;\n        }\n        // Make sure there is a pending action (in case if `_save()` was called through manual `save()` call).\n        this._setPendingAction();\n        this.state = 'saving';\n        this._lastDocumentVersion = this.editor.model.document.version;\n        // Wait one promise cycle to be sure that save callbacks are not called inside a conversion or when the editor's state changes.\n        this._savePromise = Promise.resolve()// Make autosave callback.\n        .then(()=>Promise.all(this._saveCallbacks.map((cb)=>cb(this.editor))))// When the autosave callback is finished, always clear `this._savePromise`, no matter if it was successful or not.\n        .finally(()=>{\n            this._savePromise = null;\n        })// If the save was successful, we have three scenarios:\n        //\n        // 1. If a save was requested when an autosave callback was already processed, we need to immediately call\n        // another autosave callback. In this case, `this._savePromise` will not be resolved until the next callback is done.\n        // 2. Otherwise, if changes happened to the model, make a delayed autosave callback (like the change just happened).\n        // 3. If no changes happened to the model, return to the `synchronized` state.\n        .then(()=>{\n            if (this._makeImmediateSave) {\n                this._makeImmediateSave = false;\n                // Start another autosave callback. Return a promise that will be resolved after the new autosave callback.\n                // This way promises returned by `_save()` will not be resolved until all changes are saved.\n                //\n                // If `save()` was called when another (most often automatic) autosave callback was already processed,\n                // the promise returned by `save()` call will be resolved only after new changes have been saved.\n                //\n                // Note that it would not work correctly if `this._savePromise` is not cleared.\n                return this._save();\n            } else {\n                if (this.editor.model.document.version > this._lastDocumentVersion) {\n                    this.state = 'waiting';\n                    this._debouncedSave();\n                } else {\n                    this.state = 'synchronized';\n                    this._pendingActions.remove(this._action);\n                    this._action = null;\n                }\n            }\n        })// In case of an error, retry the autosave callback after a delay (and also throw the original error).\n        .catch((err)=>{\n            // Change state to `error` so that listeners handling autosave error can be called.\n            this.state = 'error';\n            // Then, immediately change to the `saving` state as described above.\n            // Being in the `saving` state ensures that the autosave callback won't be delayed further by the `change:data` listener.\n            this.state = 'saving';\n            this._debouncedSave();\n            throw err;\n        });\n        return this._savePromise;\n    }\n    /**\n\t * Creates a pending action if it is not set already.\n\t */ _setPendingAction() {\n        const t = this.editor.t;\n        if (!this._action) {\n            this._action = this._pendingActions.add(t('Saving changes'));\n        }\n    }\n    /**\n\t * Saves callbacks.\n\t */ get _saveCallbacks() {\n        const saveCallbacks = [];\n        if (this.adapter && this.adapter.save) {\n            saveCallbacks.push(this.adapter.save);\n        }\n        if (this._config.save) {\n            saveCallbacks.push(this._config.save);\n        }\n        return saveCallbacks;\n    }\n}\n\nexport { Autosave };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Clipboard } from '@ckeditor/ckeditor5-clipboard/dist/index.js';\nimport { Enter, ShiftEnter } from '@ckeditor/ckeditor5-enter/dist/index.js';\nimport { SelectAll } from '@ckeditor/ckeditor5-select-all/dist/index.js';\nimport { Typing } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { Undo } from '@ckeditor/ckeditor5-undo/dist/index.js';\nimport { AccessibilityHelp } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * A plugin including all essential editing features. It represents a set of features that enables similar functionalities\n * to a `<textarea>` element.\n *\n * It includes:\n *\n * * {@link module:clipboard/clipboard~Clipboard},\n * * {@link module:enter/enter~Enter},\n * * {@link module:select-all/selectall~SelectAll},\n * * {@link module:enter/shiftenter~ShiftEnter},\n * * {@link module:typing/typing~Typing},\n * * {@link module:undo/undo~Undo}.\n *\n * This plugin set does not define any block-level containers (such as {@link module:paragraph/paragraph~Paragraph}).\n * If your editor is supposed to handle block content, make sure to include it.\n */ class Essentials extends Plugin {\n    /**\n\t * @inheritDoc\n\t */ static get requires() {\n        return [\n            AccessibilityHelp,\n            Clipboard,\n            Enter,\n            SelectAll,\n            ShiftEnter,\n            Typing,\n            Undo\n        ];\n    }\n    /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n        return 'Essentials';\n    }\n}\n\nexport { Essentials };\n//# sourceMappingURL=index.js.map\n","import CkeditorManager from './CkeditorManager';\n\nexport default class Initializer {\n  constructor($scope) {\n    this.$scope = $scope;\n  }\n\n  initialize() {\n    this.initializeCkeditors();\n  }\n\n  initializeCkeditors() {\n    const $ckeditorTextareas = this.elementsMatching('textarea[data-ckeditor]');\n    $ckeditorTextareas.each((_index, element) => {\n      new CkeditorManager(element).createCkeditor();\n    });\n  }\n  // jQuery's `find` will NOT match the root element (this.$scope) itself; it\n  // will only return child elements matching the selector. the method below\n  // ensures the root element will also be returned if it matches the selector.\n  elementsMatching(selector) {\n    return this.$scope.find(selector).addBack(selector);\n  }\n}\n","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_include_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\nimport Initializer from '../src/Initializer';\nimport jquery from 'jquery';\nwindow.jQuery = jquery;\nwindow.$ = jquery;\n\n$(function() {\n  $.fn.size = function() {\n      return this.length;\n  }\n});\n\nimport Rails from \"@rails/ujs\";\nRails.start();\n\nimport '../../../vendor/assets/javascripts/autocomplete-rails.js'\nimport '../../../vendor/assets/javascripts/jquery.dropdown.js';\nimport '../../../vendor/assets/javascripts/jquery.limitmaxlength.js';\nimport '../../../vendor/assets/javascripts/jquery.table.drag.select/jquery.table.drag.select.js';\nimport '../../../vendor/assets/javascripts/jrowclick.js';\nimport handlebars from '../../../vendor/assets/javascripts/handlebars';\nwindow.Handlebars = handlebars;\n\nrequire('../../assets/javascripts/application.coffee');\n\n$(document).ready(() => {\n  new Initializer($('body')).initialize();\n});\n"],"names":["leafPrototypes","getProto","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","this","Rails","linkClickSelector","buttonClickSelector","selector","exclude","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","call","nonce","loadCSPNonce","ref","document","querySelector","content","cspNonce","expando","m","Element","prototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","element","getData","key","setData","value","$","Array","slice","querySelectorAll","csrfParam","csrfToken","meta","CSRFProtection","xhr","token","setRequestHeader","refreshCSRFTokens","param","forEach","input","CustomEvent","fire","preventDefault","window","event","params","evt","createEvent","initCustomEvent","bubbles","cancelable","detail","Event","result","defaultPrevented","defineProperty","get","obj","name","data","dispatchEvent","stopEverything","target","stopPropagation","stopImmediatePropagation","delegate","eventType","handler","addEventListener","parentNode","AcceptHeaders","createXHR","prepareOptions","processResponse","text","html","xml","json","script","ajax","options","response","responseText","getResponseHeader","Math","floor","status","success","statusText","error","complete","beforeSend","readyState","XMLHttpRequest","OPENED","send","url","location","href","type","toUpperCase","indexOf","dataType","accept","done","open","crossDomain","withCredentials","onreadystatechange","DONE","parser","match","JSON","parse","createElement","setAttribute","head","appendChild","removeChild","DOMParser","replace","parseFromString","isCrossDomain","originAnchor","urlAnchor","protocol","host","toArray","serializeElement","additionalParam","inputs","elements","disabled","option","selected","push","checked","encodeURIComponent","join","formElements","form","filter","el","allowAction","handleConfirm","confirm","message","answer","callback","getAttribute","disableFormElement","disableFormElements","disableLinkElement","enableFormElement","enableFormElements","enableLinkElement","isXhrRedirect","handleDisabledElement","enableElement","disableElement","replacement","innerHTML","originalText","removeEventListener","handleMethod","formContent","link","method","action","style","display","body","click","isRemote","handleRemote","button","enctype","FormData","append","args","arguments","length","formSubmitButtonClick","formNoValidate","preventInsignificantClick","insignificantMetaClick","metaKey","ctrlKey","jQuery","rails","ajaxPrefilter","originalOptions","start","_rails_loaded","setTimeout","t","fn","railsAutocomplete","a","railsAutoCompleter","on","live","init","showNoMatches","noMatchesLabel","extend","split","delimiter","i","pop","attr","min_length","append_to","autoFocus","autocomplete","appendTo","delay","source","r","n","term","each","parseJSON","val","getJSON","hasOwnProperty","inArray","label","apply","trigger","change","is","item","toString","prop","search","focus","select","toLowerCase","l","u","s","removeAttr","c","bind","trim","unbind","ready","__module4__","SafeString","string","__module3__","__dependency1__","__exports__","escape","badChars","possible","escapeChar","chr","isFunction","isArray","escapeExpression","test","isEmpty","appendContextPath","contextPath","__module5__","errorProps","Exception","node","line","firstLine","firstColumn","tmp","constructor","idx","lineNumber","column","__module2__","__dependency2__","Utils","VERSION","COMPILER_REVISION","REVISION_CHANGES","objectType","HandlebarsEnvironment","helpers","partials","instance","registerHelper","context","inverse","ids","createFrame","ret","j","index","first","last","conditional","hash","includeZero","level","parseInt","log","field","logger","unregisterHelper","registerPartial","partial","unregisterPartial","methodMap","DEBUG","INFO","WARN","ERROR","console","object","frame","_parent","__module1__","__dependency3__","__dependency4__","__dependency5__","base","runtime","create","hb","VM","template","spec","Handlebars","program","container","depths","prog","concat","depth","checkRevision","compilerInfo","compilerRevision","runtimeVersions","compilerVersions","templateSpec","env","main","compiler","lookup","len","lambda","current","invokePartial","indent","compile","undefined","compat","lines","programs","programWrapper","merge","common","noop","_setup","useData","root","initData","useDepths","isTop","usePartial","_child","Function","__module7__","LocationInfo","locInfo","first_line","first_column","lastColumn","last_column","lastLine","last_line","AST","ProgramNode","statements","strip","MustacheNode","rawParams","charAt","escapeFlag","escaped","SexprNode","sexpr","eligibleHelper","isHelper","isSimple","PartialNode","partialName","inlineStandalone","BlockNode","mustache","isInverse","RawBlockNode","close","original","ContentNode","HashNode","pairs","IdNode","parts","dig","depthString","part","separator","isScoped","idName","stringModeValue","PartialNameNode","DataNode","StringNode","NumberNode","number","Number","BooleanNode","bool","CommentNode","comment","__module8__","Helpers","yy","trace","symbols_","terminals_","productions_","performAction","yytext","yyleng","yylineno","yystate","$$","_$","$0","prepareProgram","prepareBlock","stripFlags","path","table","defaultActions","parseError","str","self","stack","vstack","lstack","recovering","lexer","setInput","yylloc","yyloc","ranges","symbol","preErrorSymbol","state","p","newState","expected","yyval","lex","errStr","showPosition","loc","range","EOF","_input","_more","_less","matched","conditionStack","offset","ch","unput","substr","oldLines","more","less","pastInput","past","upcomingInput","next","pre","tempMatch","rules","_currentRules","flex","begin","condition","popState","conditions","topState","pushState","yy_","$avoiding_name_collisions","YY_START","end","Parser","isPrevWhitespace","isRoot","prev","sibling","isNextWhitespace","omitRight","multiple","rightStripped","omitLeft","leftStripped","left","right","inverseAndProgram","inverted","openStandalone","closeStandalone","inverseStrip","_isPrevWhitespace","_isNextWhitespace","exec","RegExp","$1","__module11__","Compiler","argEquals","b","equals","other","opcodes","opcode","otherOpcode","children","guid","list","stringParams","trackIds","knownHelpers","sort","compileProgram","addDepth","block","classifySexpr","helperSexpr","simpleSexpr","ambiguousSexpr","pushParam","noEscape","isBlock","ID","DATA","setupFullMustacheParams","knownHelpersOnly","falsy","STRING","NUMBER","BOOLEAN","isEligible","pushParams","precompile","ast","environment","JavaScriptCompiler","compiled","compileInput","_create","Literal","nameLookup","parent","isValidJavaScriptVariableName","depthedLookup","aliases","appendToBuffer","initializeBuffer","quotedString","namespace","asObject","isChild","environments","preamble","stackSlot","stackVars","registers","hashes","compileStack","inlineStack","compileChildren","pushSource","createFunctionContext","stringify","objectLiteral","lastContext","varDeclarations","locals","alias","mergeSource","buffer","appendFirst","appendOnly","forceBuffer","substring","blockValue","blockHelperMissing","contextName","setupParams","blockName","popStack","splice","ambiguousBlockValue","flushInline","topStack","lastHelper","appendContent","pendingContent","local","appendEscaped","getContext","pushContext","pushStackLiteral","lookupOnContext","scoped","replaceStack","lookupData","resolvePossibleLambda","pushStringParam","pushString","emptyHash","pushHash","values","types","contexts","popHash","expr","pushLiteral","pushProgram","programExpression","invokeHelper","paramSize","helperMissing","nonHelper","helper","setupHelper","callParams","invokeKnownHelper","invokeAmbiguous","helperCall","functionType","useRegister","helperName","paramsInit","assignToHash","pushId","child","matchExistingProgram","programParams","pushStack","incrStack","createdStack","usedLiteral","prefix","isInline","top","topStackName","entry","wrapped","inline","blockHelper","setupOptions","hashIds","hashTypes","hashContexts","reservedWords","compilerWords","RESERVED_WORDS","dropdown","hover","clearTimeout","addClass","css","_this","removeClass","limitMaxlength","settings","attribute","onLimit","onEdit","textarea","maxlength","proxy","keyup","keydown","remaining","siblings","drag_select","select_color","on_row_select","table_row_selector","table_selector","row","closest","end_row","start_row","the_table","DragSelect","selectRowRange","start_table","end_table","all_rows","find","start_index","end_index","swap_temp","preSelectRowRange","Rowclick","defaults","on_click","row_click","link_class","hide_links","allow_links","hide","that","nodeName","click_link","cancelled","initMouseEvent","fireEvent","jrowclick","c3_chart_fn","c3_chart_internal_fn","c3","version","API","owner","Chart","config","internal","ChartInternal","loadConfig","beforeInit","afterInit","bindThis","argThis","api","d3","getDefaultConfig","cache","axes","Axis","generate","chart","axis","initParams","data_url","convertUrlToData","data_mimeType","data_headers","data_keys","initWithData","data_json","convertJsonToData","data_rows","convertRowsToData","data_columns","convertColumnsToData","clipId","Date","clipIdForXAxis","clipIdForYAxis","clipIdForGrid","clipIdForSubchart","clipPath","getClipPath","clipPathForXAxis","clipPathForYAxis","clipPathForGrid","clipPathForSubchart","dragStart","dragging","flowing","cancelClick","mouseover","transiting","color","generateColor","levelColor","generateLevelColor","dataTimeFormat","data_xLocaltime","time","format","utc","axisTimeFormat","axis_x_localtime","defaultAxisTimeFormat","multi","d","getMilliseconds","getSeconds","getMinutes","getHours","getDay","getDate","getMonth","hiddenTargetIds","hiddenLegendIds","focusedTargetIds","defocusedTargetIds","xOrient","axis_rotated","yOrient","axis_y_inner","y2Orient","axis_y2_inner","subXOrient","isLegendRight","legend_position","isLegendInset","isLegendTop","legend_inset_anchor","isLegendLeft","legendStep","legendItemWidth","legendItemHeight","currentMaxTickWidths","x","y","y2","rotated_padding_left","rotated_padding_right","axis_x_show","rotated_padding_top","withoutFadeIn","intervalForObserveInserted","subx","selectAll","initChartElements","initBar","initLine","initArc","initGauge","initText","defs","binding","initPie","initBrush","initZoom","bindto","selectChart","empty","observeInserted","classed","xs","targets","convertDataToTargets","data_filter","data_hide","addHiddenTargetIds","mapToIds","legend_hide","addHiddenLegendIds","hasType","legend_show","updateSizes","updateScales","domain","extent","getXDomain","getYDomain","subX","subY","subY2","orgXDomain","brush","scale","zoom_enabled","zoom","svg","onmouseover","onmouseout","svg_classname","clipChart","appendClip","clipXAxis","clipYAxis","clipGrid","clipSubchart","updateSvgSize","getTranslate","initSubchart","initTooltip","initLegend","initTitle","CLASS","initRegion","initGrid","grid_lines_front","initGridLines","initEventRect","insert","zoom_privileged","regions","zoomRect","width","height","axis_x_extent","getDefaultExtent","updateTargets","updateDimension","oninit","redraw","withTransition","withTransform","withUpdateXDomain","withUpdateOrgXDomain","withTransitionForAxis","bindResize","smoothLines","g","x1","x2","y1","ceil","legendHeight","legend","getLegendHeight","legendWidth","getLegendWidth","legendHeightForBottom","hasArc","hasArcType","xAxisHeight","getHorizontalAxisHeight","subchartHeight","subchart_show","subchart_size_height","currentWidth","getCurrentWidth","currentHeight","getCurrentHeight","margin","getCurrentPaddingTop","getCurrentPaddingRight","bottom","getCurrentPaddingBottom","getCurrentPaddingLeft","margin2","NaN","margin3","updateSizeForLegend","width2","height2","arcWidth","arcHeight","gauge_fullCircle","getGaugeLabelHeight","updateRadius","radiusExpanded","updateTargetsForText","updateTargetsForBar","updateTargetsForLine","updateTargetsForArc","updateTargetsForSubchart","showTargets","isTargetToShow","transition","duration","transition_duration","transitions","withY","withSubchart","withTransitionForExit","withTrimXDomain","withLegend","withEventRect","withDimension","withUpdateXAxis","drawArea","drawBar","drawLine","xForText","yForText","durationForExit","durationForAxis","waitForDraw","flow","tickValues","intervalForCulling","xDomainForZoom","cx","cy","areaIndices","getShapeIndices","isAreaType","barIndices","isBarType","lineIndices","isLineType","hideAxis","targetsToShow","filterTargetsToShow","xv","getOption","generateTransitions","updateLegend","isCategorized","size","updateXDomain","axis_x_tick_values","updateXAxisTickValues","xAxis","subXAxis","zoom_rescale","orgDomain","axis_y_tick_values","axis_y_tick_count","yAxis","generateTickValues","axis_y2_tick_values","axis_y2_tick_count","y2Axis","updateLabels","axis_x_tick_culling","axis_x_tick_culling_max","axisX","generateDrawArea","generateDrawBar","generateDrawLine","generateXYForText","updateXgridFocus","data_empty_label_text","updateGrid","updateRegion","updateBar","updateLine","updateArea","updateCircle","hasDataLabel","updateText","redrawTitle","redrawArc","redrawSubchart","selectedCircles","remove","interaction_enabled","redrawEventRect","updateZoom","updateCircleY","circleY","circleX","generateFlow","isTabVisible","transitionsToWait","redrawBar","redrawLine","redrawArea","redrawCircle","redrawText","redrawRegion","redrawGrid","generateWait","add","onrendered","updateAndRedraw","withTransitionForTransform","transformAll","redrawWithoutRescale","isTimeSeries","axis_x_type","isCustomX","data_x","notEmpty","data_xs","isTimeSeriesY","axis_y_type","asHalfPixel","initialOpacity","initialOpacityForCircle","opacityForCircle","opacity","point_show","isValue","isScatterType","opacityForText","xx","parseDate","axis_x_categories","yv","yScale","subxx","transformMain","axisY","axisY2","chartArcs","transformContext","transformLegend","getXAxisClipX","getXAxisClipY","getXAxisClipWidth","getXAxisClipHeight","getYAxisClipX","getYAxisClipY","getYAxisClipWidth","getYAxisClipHeight","withoutAxis","selection","observer","MutationObserver","mutations","mutation","previousSibling","disconnect","setInterval","clearInterval","update","observe","attributes","childList","characterData","resizeFunction","generateResize","onresize","resize_auto","resizeTimeout","flush","onresized","attachEvent","wrapper","resizeFunctions","callResizeFunctions","f","endall","timer","date","parsedDate","data_xFormat","isNaN","hidden","mozHidden","msHidden","webkitHidden","size_width","size_height","padding_left","padding_right","padding_top","padding_bottom","zoom_extent","zoom_onzoom","zoom_onzoomstart","zoom_onzoomend","zoom_x_min","zoom_x_max","interaction_brighten","data_xSort","data_idConverter","data_names","data_classes","data_groups","data_axes","data_type","data_types","data_labels","data_order","data_regions","data_color","data_colors","data_selection_enabled","data_selection_grouped","data_selection_isselectable","data_selection_multiple","data_selection_draggable","data_onclick","data_onmouseover","data_onmouseout","data_onselected","data_onunselected","subchart_axis_x_show","subchart_onbrush","color_pattern","color_threshold","legend_inset_x","legend_inset_y","legend_inset_step","legend_item_onclick","legend_item_onmouseover","legend_item_onmouseout","legend_equally","legend_padding","legend_item_tile_width","legend_item_tile_height","axis_x_tick_centered","axis_x_tick_format","axis_x_tick_count","axis_x_tick_fit","axis_x_tick_rotate","axis_x_tick_outer","axis_x_tick_multiline","axis_x_tick_width","axis_x_max","axis_x_min","axis_x_padding","axis_x_height","axis_x_label","axis_y_show","axis_y_max","axis_y_min","axis_y_inverted","axis_y_center","axis_y_label","axis_y_tick_format","axis_y_tick_outer","axis_y_tick_rotate","axis_y_tick_time_value","axis_y_tick_time_interval","axis_y_padding","axis_y_default","axis_y2_show","axis_y2_max","axis_y2_min","axis_y2_inverted","axis_y2_center","axis_y2_label","axis_y2_tick_format","axis_y2_tick_outer","axis_y2_padding","axis_y2_default","grid_x_show","grid_x_type","grid_x_lines","grid_y_show","grid_y_lines","grid_y_ticks","grid_focus_show","point_r","point_sensitivity","point_focus_expand_enabled","point_focus_expand_r","point_select_r","line_connectNull","line_step_type","bar_width","bar_width_ratio","bar_width_max","bar_zerobased","area_zerobased","area_above","pie_label_show","pie_label_format","pie_label_threshold","pie_label_ratio","pie_expand","pie_expand_duration","gauge_label_show","gauge_label_format","gauge_min","gauge_max","gauge_startingAngle","PI","gauge_units","gauge_width","gauge_expand","gauge_expand_duration","donut_label_show","donut_label_format","donut_label_threshold","donut_label_ratio","donut_width","donut_title","donut_expand","donut_expand_duration","spline_interpolation_type","tooltip_show","tooltip_grouped","tooltip_format_title","tooltip_format_name","tooltip_format_value","tooltip_position","tooltip_contents","defaultTitleFormat","defaultValueFormat","getTooltipContent","tooltip_init_show","tooltip_init_x","tooltip_init_position","tooltip_onshow","tooltip_onhide","title_text","title_padding","title_position","additionalConfig","read","this_config","shift","isDefined","getScale","min","max","forTimeseries","linear","getX","_scale","raw","v","getY","getYScale","getId","getSubYScale","forInit","xMin","xMax","yMin","yMax","subXMin","subXMax","subYMin","subYMax","tickOffset","xAxisTickFormat","getXAxisTickFormat","xAxisTickValues","getXAxisTickValues","yAxisTickValues","getYAxisTickValues","y2AxisTickValues","getY2AxisTickValues","getXAxis","getYAxis","updateArc","getYDomainMin","k","baseId","idsInGroup","hasNegativeValue","ys","getValuesAsIdKeyed","hasNegativeValueInTargets","getYDomainMax","hasPositiveValue","hasPositiveValueInTargets","axisId","xDomain","domainLength","yDomainAbs","lengths","diff","ratio","isAllPositive","isAllNegative","targetsByAxisId","yTargets","filterByXDomain","yDomainMin","yDomainMax","center","isZeroBased","isInverted","showHorizontalDataLabel","showVerticalDataLabel","abs","getDataLabelLength","diffDomain","convertPixelsToAxisPadding","getPadding","reverse","getXDomainMin","getXDomainMax","getXDomainPadding","maxDataCount","padding","paddingLeft","paddingRight","getMaxDataCount","firstX","lastX","getTime","withTrim","updateScaleExtent","trimXDomain","zoomDomain","getZoomDomain","isX","hasValue","isNotX","getXKey","getXValuesOfXKey","xValues","getIndexByX","filterByX","getXValue","getOtherTargetXs","idsForX","getOtherTargetX","addXs","hasMultipleX","set","isMultipleX","addName","getValueOnIndex","valueOnIndex","updateTargetX","generateTargetX","updateTargetXs","rawX","cloneTarget","id_org","updateXs","getPrevX","getNextX","getMaxDataCountTarget","maxTarget","getEdgeX","mapToTargetIds","hasTarget","targetId","isLegendToShow","mapTargetsToUniqueXs","targetIds","removeHiddenTargetIds","removeHiddenLegendIds","checkValueInTargets","checker","isOrderDesc","isOrderAsc","orderTargets","orderAsc","orderDesc","t1","t2","reducer","t1Sum","reduce","t2Sum","filterRemoveNull","enter","dataLabelFormat","getBoundingClientRect","isNoneArc","isArc","findSameXOfValues","targetX","sames","findClosestFromTargets","pos","candidates","findClosest","minDist","shape","bars","getTargetSelectorSuffix","bar","isWithinBar","dist","xIndex","yIndex","sqrt","pow","convertValuesToStep","converted","updateDataAttributes","attrs","mimeType","headers","header","responseURL","convertTsvToData","convertCsvToData","convertXsvToData","xsv","rows","parseRows","csv","tsv","targetKeys","new_rows","new_row","findValueInJson","isUndefined","pathArray","columns","appendXs","xKey","convertedId","v1","v2","Infinity","setTargetType","addCache","load","loadFromArgs","unload","selectorTarget","legendItem","categoryName","eventRects","eventRectUpdate","maxDataCountTarget","eventRectsMultiple","eventRectsSingle","eventRect","generateEventRectsForMultipleXs","updateEventRect","datum","generateEventRectsForSingleX","exit","w","h","rectW","rectX","getEventRectWidth","prevX","nextX","thisX","classEvent","eventRectEnter","expandCircles","expandBars","hideXGridFocus","hideTooltip","unexpandCircles","unexpandBars","selectedData","isStepType","mouse","showTooltip","showXGridFocus","EXPANDED","isWithinShape","toggleShape","drag","behavior","origin","dragstart","dragend","mouseout","shapes","box","getParentWidth","getParentHeight","title","getTitlePadding","withoutRecompute","ceil10","getAxisWidthByAxisId","getYAxisLabelPosition","isOuter","legendWidthOnRight","getY2AxisLabelPosition","getParentRectValue","tagName","offsetWidth","getSvgLeft","hasLeftAxisRect","leftAxisClass","leftAxis","svgRect","chartRect","svgLeft","position","getLabelPositionById","getMaxTickWidth","isInner","cos","tickInterval","typeFilter","indices","__max__","getShapeX","targetsNum","isSub","getShapeY","getShapeOffset","y0","isWithin","isWithinStep","isWithinCircle","pointSelectR","getInterpolate","interpolation","isInterpolationType","isSplineType","chartLines","mainLineEnter","classChartLine","classLines","classAreas","classCircles","classFocus","chartLine","generateClass","selectedCircle","mainLine","lineData","classLine","random","getPoints","generateGetLinePoints","yScaleGetter","xValue","yValue","defined","x0","lineWithRegions","interpolate","lineTargetsNum","lineOffset","posX","posY","_regions","sWithRegion","xp","yp","dx","dy","diffx2","xOffset","isWithinRegions","generateM","points","d0","d1","x_diff","xv0","xv1","mainArea","areas","area","classArea","orgAreaOpacity","generateGetAreaPoints","value0","getAreaBaseValue","value1","areaTargetsNum","areaOffset","mainCircle","circles","circle","lineOrScatterData","classCircle","pointR","getCircles","reset","pointExpandedR","d3_this","chartBars","classChartBar","classBars","chartBar","barData","classBar","mainBar","getBarW","barTargetsNum","getBars","generateGetBarPoints","indexX","indexY","barW","barX","barY","barOffset","seg0","pathSegList","getItem","seg1","ex","sy","ey","chartTexts","mainText","classChartText","classTexts","chartText","barOrLineData","classText","texts","forFlow","getTextRect","cls","rect","dummy","font","forX","getAreaPoints","getBarPoints","getLinePoints","getter","getXForText","getYForText","textElement","xPos","yPos","isSafari","isChrome","has","isString","isPieType","isGaugeType","isDonutType","isArcType","arcData","grid","xgrids","ygrids","xgridFocus","xgrid","gridLines","xgridLines","ygridLines","updateXGrid","withoutUpdate","xgridData","generateGridData","xgridAttr","updateYGrid","gridValues","ticks","ygrid","gridTextAnchor","gridTextDx","xGridTextX","yGridTextX","xgridLine","ygridLine","dataToShow","focusEl","firstYear","lastYear","gridData","tickNum","getFullYear","getGridFilterToRemove","found","removeGridLines","toRemove","toShow","tooltip","tooltipContainer","getYFormat","bgcolor","titleFormat","nameFormat","valueFormat","sanitise","tooltipName","tooltipPosition","tWidth","tHeight","tooltipLeft","tooltipRight","tooltipTop","chartRight","forArc","positionFunction","property","legendItemTextBox","legendHasRendered","updateLegendWithDefaults","insetLegendPosition","updateLegendStep","step","updateLegendItemWidth","updateLegendItemHeight","opacityForLegend","legendItemHidden","opacityForUnfocusedLegend","toggleFocusLegend","legendItemFocused","revertLegend","showLegend","selectorLegends","hideLegend","clearLegendItemTextBoxCache","xForLegend","xForLegendText","xForLegendRect","yForLegend","yForLegendText","yForLegendRect","x1ForLegendTile","x2ForLegendTile","yForLegendTile","rects","tiles","background","maxWidth","maxHeight","tileWidth","totalLength","offsets","widths","heights","margins","steps","updatePositions","maxLength","isLast","textContent","getTextBox","itemWidth","itemHeight","itemLength","areaLength","updateValues","withoutStep","altKey","show","toggle","revert","legendItemEvent","legendItemTile","legendBackground","xForTitle","yForTitle","derived","inherit","axisXLabel","textAnchorForXAxisLabel","axisYLabel","textAnchorForYAxisLabel","axisY2Label","textAnchorForY2AxisLabel","orient","tickFormat","withOuterTick","withoutTransition","withoutRotateTickText","axisParams","isCategory","tickMultiline","tickWidth","tickTextRotate","c3_axis","tickCentered","toFixed","getTickValues","getLabelOptionByAxisId","getLabelText","setLabelText","getLabelPosition","defaultPosition","isLeft","isCenter","isRight","isMiddle","isBottom","getXAxisLabelPosition","textForXAxisLabel","textForYAxisLabel","textForY2AxisLabel","xForAxisLabel","forHorizontal","dxForAxisLabel","textAnchorForAxisLabel","xForXAxisLabel","xForYAxisLabel","xForY2AxisLabel","dxForXAxisLabel","dxForYAxisLabel","dxForY2AxisLabel","dyForXAxisLabel","dyForYAxisLabel","dyForY2AxisLabel","copy","defaultValue","unit","pixels","tickCount","forTimeSeries","targetCount","count","interval","tickValue","axisSubX","isHidden","navigator","appVersion","URL","getAxisClipX","getAxisClipY","getAxisClipWidth","getAxisClipHeight","pie","layout","radius","innerRadiusRatio","innerRadius","svgArc","getSvgArc","svgArcExpanded","getSvgArcExpanded","svgArcExpandedSub","updateAngle","gMin","gMax","gTic","gValue","startAngle","endAngle","arc","outerRadius","newArc","updated","centroid","rate","getArc","force","transformForArcLabel","translate","getArcRatio","whole","convertToArcData","textForArcLabel","shouldShowArcLabel","meetsArcLabelThreshold","getArcLabelFormat","defaultArcValueFormat","expandArc","selectorTargets","chartArc","shouldExpand","expandDuration","unexpandArc","shouldShow","getArcTitle","mainPieEnter","classChartArc","classArcs","arcs","chartArcsTitle","mainArc","classArc","_current","attrTween","interpolated","gaugeValue","round","chartArcsBackground","chartArcsGaugeUnit","chartArcsGaugeMin","chartArcsGaugeMax","region","mainRegion","classRegion","parentData","regionX","regionY","regionWidth","regionHeight","isRegionOnX","sx","mx","my","minX","maxX","minY","maxY","altDomain","dragarea","_x","_y","_w","_h","isSelected","SELECTED","isIncluded","INCLUDED","togglePoint","getPathBox","togglePath","selectPoint","unselectPoint","selectPath","rgb","brighter","unselectPath","getToggle","redrawForBrush","visibility","contextLineEnter","updateBarForSubchart","contextBar","redrawBarForSubchart","drawBarOnSub","updateLineForSubchart","contextLine","redrawLineForSubchart","drawLineOnSub","updateAreaForSubchart","contextArea","redrawAreaForSubchart","drawAreaOnSub","startEvent","sourceEvent","redrawForZoom","clientX","clientY","orgScaleExtent","scaleExtent","z","colors","pattern","category10","threshold","asValue","formatForY","yFormat","formatForY2","y2Format","defaultFormat","hasCaches","getCaches","focused","defocused","classShape","classShapes","classTarget","additionalClassSuffix","additionalClass","classFocused","classDefocused","selectorLegend","tickTextCharSize","dict","items","outerTickSize","tickArguments","tickCulling","textFormatted","formatted","transitionise","newScale","tickTransform","tickX","tickY","scale0","__chart__","scale1","unshift","generateTicks","tick","tickEnter","tickExit","tickUpdate","rangeExtent","stop","pathUpdate","lineEnter","lineUpdate","textEnter","textUpdate","tspan","sizeFor1Char","getSizeFor1Char","counts","tickLength","isVertical","tspanDy","splitted","subtext","spaceIndex","textWidth","tickText","splitTickText","rotate","tickPosition","textAnchorForText","textTransform","sin","dxForText","rangeBand","isCentered","getTotalLength","culling","defocus","enable","enabled","unzoom","clear","names","classes","categories","cacheIds","baseTarget","baseValue","to","notfoundIds","orgDataCount","tail","missing","translateX","scaleX","transform","flowIndex","flowLength","flowStart","flowEnd","durationForFlow","wait","ease","__data__","resetOther","isTargetId","isTargetIndex","unselect","transformTo","optionsForRedraw","groups","grids","shown","category","labels","resize","destroy","detachEvent","ua","userAgent","oThis","TypeError","aArgs","fToBind","fNOP","fBound","SVGPathSeg","typeAsLetter","owningPathSegList","pathSegType","pathSegTypeAsLetter","_owningPathSegList","PATHSEG_UNKNOWN","PATHSEG_CLOSEPATH","PATHSEG_MOVETO_ABS","PATHSEG_MOVETO_REL","PATHSEG_LINETO_ABS","PATHSEG_LINETO_REL","PATHSEG_CURVETO_CUBIC_ABS","PATHSEG_CURVETO_CUBIC_REL","PATHSEG_CURVETO_QUADRATIC_ABS","PATHSEG_CURVETO_QUADRATIC_REL","PATHSEG_ARC_ABS","PATHSEG_ARC_REL","PATHSEG_LINETO_HORIZONTAL_ABS","PATHSEG_LINETO_HORIZONTAL_REL","PATHSEG_LINETO_VERTICAL_ABS","PATHSEG_LINETO_VERTICAL_REL","PATHSEG_CURVETO_CUBIC_SMOOTH_ABS","PATHSEG_CURVETO_CUBIC_SMOOTH_REL","PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS","PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL","_segmentChanged","segmentChanged","SVGPathSegClosePath","_asPathString","clone","SVGPathSegMovetoAbs","enumerable","SVGPathSegMovetoRel","SVGPathSegLinetoAbs","SVGPathSegLinetoRel","SVGPathSegCurvetoCubicAbs","_x1","_y1","_x2","_y2","SVGPathSegCurvetoCubicRel","SVGPathSegCurvetoQuadraticAbs","SVGPathSegCurvetoQuadraticRel","SVGPathSegArcAbs","r1","r2","angle","largeArcFlag","sweepFlag","_r1","_r2","_angle","_largeArcFlag","_sweepFlag","SVGPathSegArcRel","SVGPathSegLinetoHorizontalAbs","SVGPathSegLinetoHorizontalRel","SVGPathSegLinetoVerticalAbs","SVGPathSegLinetoVerticalRel","SVGPathSegCurvetoCubicSmoothAbs","SVGPathSegCurvetoCubicSmoothRel","SVGPathSegCurvetoQuadraticSmoothAbs","SVGPathSegCurvetoQuadraticSmoothRel","SVGPathElement","createSVGPathSegClosePath","createSVGPathSegMovetoAbs","createSVGPathSegMovetoRel","createSVGPathSegLinetoAbs","createSVGPathSegLinetoRel","createSVGPathSegCurvetoCubicAbs","createSVGPathSegCurvetoCubicRel","createSVGPathSegCurvetoQuadraticAbs","createSVGPathSegCurvetoQuadraticRel","createSVGPathSegArcAbs","createSVGPathSegArcRel","createSVGPathSegLinetoHorizontalAbs","createSVGPathSegLinetoHorizontalRel","createSVGPathSegLinetoVerticalAbs","createSVGPathSegLinetoVerticalRel","createSVGPathSegCurvetoCubicSmoothAbs","createSVGPathSegCurvetoCubicSmoothRel","createSVGPathSegCurvetoQuadraticSmoothAbs","createSVGPathSegCurvetoQuadraticSmoothRel","SVGPathSegList","pathElement","_pathElement","_list","_parsePath","_mutationObserverConfig","_pathElementMutationObserver","_updateListFromPathMutations","_checkPathSynchronizedToList","_pathSegList","takeRecords","mutationRecords","hasPathMutations","record","attributeName","_writeListToPath","_pathSegArrayAsString","pathSeg","initialize","newItem","_checkValidIndex","numberOfItems","insertItemBefore","replaceItem","removeItem","appendItem","pathSegArray","Builder","appendSegment","Source","_string","_currentIndex","_endIndex","_previousCommand","_skipOptionalSpaces","_isCurrentSpace","character","_skipOptionalSpacesOrDelimiter","hasMoreData","peekSegmentType","lookahead","_pathSegTypeFromChar","_nextCommandHelper","previousCommand","initialCommandIsMoveTo","command","_parseNumber","exponent","integer","frac","decimal","sign","expsign","startIndex","startIntPartIndex","scanIntPartIndex","multiplier","_parseArcFlag","flag","flagChar","parseSegment","arcAngle","arcLarge","arcSweep","builder","AbstractChosen","Chosen","SelectParser","hasProp","options_index","parsed","add_node","add_group","add_option","group","group_position","results1","array_index","className","childNodes","group_disabled","group_array_index","group_label","cssText","select_to_array","form_field","options1","me","label_click_handler","browser_is_supported","is_multiple","set_default_text","set_default_values","setup","set_up_html","register_observers","on_ready","click_test_action","test_active_click","activate_action","activate_field","active_field","mouse_on_container","results_showing","result_highlighted","is_rtl","rtl","allow_single_deselect","disable_search_threshold","disable_search","enable_split_word_search","group_search","search_contains","single_backstroke_delete","max_selected_options","inherit_select_classes","display_selected_options","display_disabled_options","include_group_label_in_selected","max_shown_results","POSITIVE_INFINITY","case_sensitive_search","hide_results_on_select","default_text","placeholder_text_multiple","placeholder_text","default_multiple_text","placeholder_text_single","default_single_text","escape_html","results_none_found","no_results_text","default_no_result_text","choice_label","mouse_enter","mouse_leave","input_focus","container_mousedown","input_blur","blur_test","results_option_build","data_content","shown_results","results_data","result_add_group","result_add_option","choice_build","single_set_selected_text","option_el","search_match","include_option_in_results","highlighted_html","outerHTML","group_el","group_match","active_options","results_update_field","results_reset_cleanup","result_clear_highlight","results_build","winnow_results","reset_single_select_options","results_toggle","results_hide","results_show","results_search","escapedQuery","fix","query","regex","results","results_group","startpos","suffix","no_results_clear","get_search_text","get_search_regex","search_string_match","update_results_content","no_results","skip_highlight","winnow_results_set_highlight","escaped_search_string","regex_flag","regex_string","search_string","choices_count","selected_option_count","choices_click","is_disabled","keydown_checker","stroke","which","keyCode","search_field_scale","pending_backstroke","clear_backstroke","backstroke_length","get_search_field_value","result_select","keyup_arrow","keydown_arrow","keyup_checker","keydown_backstroke","clipboard_event_checker","container_width","search_results_touchstart","touch_started","search_results_mouseover","search_results_touchmove","search_results_mouseout","search_results_touchend","search_results_mouseup","get_single_html","get_multi_html","get_no_results_html","terms","appName","documentMode","chosen","input_field","$this","superClass","__super__","ctor","form_field_jq","current_selectedIndex","selectedIndex","container_classes","container_props","after","search_field","search_results","search_no_results","search_choices","search_container","selected_item","set_tab_index","set_label_behavior","container_mouseup","search_results_mousewheel","close_field","ownerDocument","off","form_field_label","tabIndex","removeData","search_field_disabled","parents","toggleClass","hasClass","results_reset","delta","originalEvent","deltaY","wheelDelta","scrollTop","show_search_field_default","blur","active_container","parsing","readOnly","result_do_highlight","high_bottom","high_top","visible_bottom","visible_top","result_highlight","outerHeight","ti","choice","close_link","choice_destroy_link_click","before","choice_destroy","result_deselect","trigger_form_field_change","high","single_deselect_control_build","result_data","deselected","do_high","selected_results","no_results_html","next_sib","nextAll","prev_sibs","prevAll","next_available_destroy","div","style_block","styles","whiteSpace","outerWidth","extra","$a3r5_components","recalculateAllSortableLists","recalculateDisplayOrder","A3R5","disableResultField","resultField","tipsy","enableResultField","validate","errors_fields","_","alert","before_validation","numericOption","numericResultField","validations","a3_r5_result","digits_after_decimal","minimum","require_value_in_group_on_submit","allow_blank","A3R5Components","disableComponentOption","componentSelects","enableComponentOption","componentSelectsExcept","componentSelect","not","updateComponentSelectOptions","disabledOption","sortable","ui","addNewUser","new_user","adjust_rails_form_fields","addAddress","new_address","addPhoneNumber","new_phone","addIqaDonor","new_index","new_iqa_donor","maxNumberOfDonors","iqaDonorName","hideAddIqaDonorButton","$aliquots","Aliquots","aliquots","simpleCheck","showRemoveButtonForMultipleAliquots","selectedLocation","selectedShelf","createNewAliquotFields","initial_amount","total_to_aliquot","calculateUnaliquoted","total","unaliquoted","unaliquotedAmount","unaliquotedQuantity","unaliquotedTotal","unaliquotedUnits","_parseUnaliquoted2","_slicedToArray","parseUnaliquoted","is_container","parseFloat","convertToMilli","removeFromUnaliquoted","amount","difference","quantity","units","_calculateUnaliquoted2","OverAliquotedError","_composeUnaliquoted2","composeUnaliquoted","setValues","amount_per_unit","calculateRemainder","unitAmount","showPartialUnaliquoted","calculateTotal","aliquot","aliquotList","_getValues8","getValues","NegativeError","remainder","convertFromMilli","section","amountField","quantityField","unitsField","_$$children$children4","unitType","factor","handleExceptions","retval","fadeOut","error1","fadeIn","EmptyFieldError","remove_button","is_valid","valid","updateTotal","removeInvalidFields","_getValues2","_getValues4","_getValues6","submit","requireAll","require","opts","attributeIndex","attributeIndexPattern","clearRegex","idRegex","nameRegex","elementId","newFor","newId","newName","digits","cladeCodeObserver","original_spiked_plasma_name","original_supernatant_name","spiked_plasma_name_field","supernatant_name_field","addFormlet","what","currentBands","newBand","role_type","slideToggle","elt","orderId","add_datepickers","multipleFileUploader","print","add_quantification_select_trigger","evtHandler","addNewFiebigBand","sgaFormCreator","add_polymorphic_event_type_trigger","evHdlr","cond","feedersSelector","_event","merge_cb","confirmPrompt","post","widget","urlWithoutStreamNumber","history","back","emptyEntries","entries","filteredEntries","allEmptyEntries","selectors","filters","filterString","selectorString","unique","arr","newArray","msg","debug","con","methods","properties","Assays","templates","selectedWellContents","selectedWellUsage","concentrationTO","wellTooltipTO","initializeTabs","initializeTooltipster","compileTemplates","bindEvents","tabs","tooltipster","updateAnimation","$item","sizePlateManager","inventoryPalette","manager","plateList","newHeight","sizeSidebar","initialHeight","$document","$inventoryPalette","$plateList","$sidebar","initializeSelect2","handleUnsavedChanges","enablePlateTools","bindAddNewPlate","selectCell","selectColumn","selectRow","deselectAllWells","controlButton","showInventoryAddPanel","hideInventoryAddPanel","addInventorySelectPanel","removeInventorySelectPanel","showAddInventoryToSelectorModal","addReagentToInventory","addSpecimenToInventory","addItemFromOrderToInventory","addItemFromKitToInventory","addNewItemToInventory","addNewPlateToUI","inventoryItemSelected","uncheckAllSelected","addSelectedItemsToWells","uncheckSelectedItem","removeWellContents","removeItemFromSelectedWells","concentrationUpdated","itemStudyTypeUpdated","addItemConcentration","removeNewItem","addPlateInfo","PlateTools","duplicatePlate","removeAddDuplicatePlate","checkForComment","addComment","inventoryItemOptions","inventoryItemDeleteOption","inventoryItemAddConcentrationOption","sidebarPanelHeaderClick","sidebarWellContentDisplay","wellMouseover","wellMouseout","$well","tmpl","tooltipHtml","currentTarget","$row","gid","concentration","itemType","control","assays_well_tooltip_content","_commentAlreadyEntered","Modals","showEditAssayCommentModal","hideEditAssayCommentModal","$target","$checkbox","refreshWellContentDisplay","$container","wellDetailIdentifier","wellDetailSelector","$concentration","itemId","sendConcentrationUpdate","dataToSend","concentration_units","$cell","$dialog","animate","$select","item_study_type","$plate","$plateContainer","plateContainerFor","setNewPlatePlateToolsDisabledMessage","showPlateInfoModal","plate","addInventoryItemToSelected","removeInventoryItemFromSelected","$inventoryItem","$inventory","$selectedInventory","concentrationUnits","lotGid","inventory","buildSelectedInventoryItem","selectedItem","selected_inventory_item","keyfield","cell","well","addWellContentsToSelectedDisplay","itemIndex","removeWellItem","$button","refreshSelectedWellContentList","$start","$table","endColumn","endRow","ref1","ref2","ref3","selecting","startColumn","startRow","shiftKey","removeWellContentsFromSelectedDisplay","wasSelected","$wasSelected","$column","cellIndex","toAdd","itemPos","$allList","$allLists","$someList","itemData","len1","numSelected","alreadyNegativeCells","alreadyPositiveCells","controlType","$control","$field","$selected","$selectorsList","keyFieldId","numSelectors","selectorHtml","removable","assays_inventory_selector","addKeyFieldToPlatesSidebar","$wellDetailsKeyField","$selector","removeItemsFromSystem","removeKeyFieldFromPlatesSidebar","lotNumer","resultId","sectionType","resultName","itemStudyType","lotNumber","numberIdentifier","addItemToInventory","$form","formValid","templateForNewItem","clearNewItemModalFields","hideItemConcentrationModal","assay_inventory_item","item_id","item_type","key_field_name_id","assay_id","id1_name","gid_lot_number","new_assay_item_attributes","number_identifier","uniqueId","_Assays$getPlateInfoF2","getPlateInfoFormData","setPlateInfo","hidePlateInfoModal","resetPlateInfoForm","assay","lot_number","unique_id","error_messages","wells","well_row","well_column","enablePlateToolsMenuInContainer","clearPlateToolsMessage","$originalPlate","resetPlateInfoData","addNewItemButton","newItemForm","_index","$fields","resultType","$newRow","newRow","assays_inventory_item","dialog","showItemConcentrationModal","$keyFieldSelectTags","activateSelect2","selectField","$selectField","select2Options","placeholder","allowClear","select2","_markChangedFields","_cleanupMarkedFieldsOnFormSubmit","_warnUnsavedChanges","toggle_inputs_starting_with","input_base_name","focus_on_field","label_base_for","toggleOrderableOptions","currentStep","hide_selector","triggerHandler","checkbox","resizable","modal","buttons","Cancel","regexp","$anchor","fromTop","chunk","hiddenComments","nextUntil","dateTimeFormatter","moment","isValid","toDate","formatDate","dateTimeFormat","datetimepicker","setDateFormatter","timepicker","defaultSelect","scrollInput","scrollMonth","scrollTime","closeOnDateSelect","formatTime","onClose","_currentTime","toggle_dhe_id","changeDeferredReason","checkAdverseReaction","checkDeferred","checkOtherVisit","showDonorARTMedicines","$donorSearch","Eqapol","getTabIndex","currentTabName","hrefs","links","DonorSearch","bindProtocols","$terminated","effect","autoOpen","Submit","medicineField","selectList","textField","textArea","checkBox","submitHandler","disableSelection","select_aliquots","specimen_id","EndotoxinTestResults","changeEndotoxinTestResultType","clearNonselectedTestTypeValue","$resultField","resultFields","$radioButton","buttonSelected","radioButton","testTypeResultFieldFor","buttonTestType","PerformanceReportForm","programId","kit_url","ep_url","disableSubmitButton","bindSelectProgram","bindSelectKit","bindSelectEps","bindSubmitEpReport","highlightFieldsOnSelect","backfillFormFromUrlParameters","setProgramId","fetchKitOptions","clearField","$kitTypeFields","fetchEpOptions","$epFields","updateFormAction","paramName","paramVal","parameters","eps","ep","epName","kitType","kitTypes","kitParams","parameterizeKitTypes","kit","formParams","submitUrl","serialize","decodeURI","decodeURIComponent","backfill","adjustSelected","deselectFeeder","eventFunction","selectFeeder","selectedTable","eventHandler","deleteTrigger","deselectEventHandler","doppelgangerRow","DisabledFieldToggler","FieldToggler","RequiredFieldToggler","classToToggle","bindToggle","fieldAttribute","toggleAttribute","$checkBox","fieldName","required","disable_form","_gon","gon","exclude_forms","GenerateReportForm","program_url","$programDropdown","$epsDropdown","$kitDropdown","checkProgramType","hideButtons","program_name","showGenerateReportButton","showGenerateGraphButton","urlParameters","kits","$siteGraph","colorFor","epAverageScoresUrl","legendTextMap","setupGradingLevels","siteScoresUrl","gradingLevels","score","averageColor","excellentColor","fairColor","goodColor","poorColor","point","grouped","newColor","backgroundColor","checkIfOtherExplanationTextfieldNeedsToBeShown","iqa_web_form","enable_other","disable_iqa_form","show_optional_antigen_fields","iqa_form_validate","validate_one_decimal_place_field","validate_integer_field","hide_iqa_validation_messages","show_iqa_validation_message","iqa_form_tab_selected","validate_unreported_phenotype","explanation_select","other_explanation_field","parameter_select","sample_select","propagate_row_selects","isTopRow","otherSelectsInRow","selectsInRowWithDefaultValue","thisSelectsCssClass","thisSelectsValue","checkForChangesPresentVisibility","changeIcon","$explanationSelectDropdown","$otherExplantionField","other_field","new_option","fade","fallback","ruleset","valid_codes","validation_rules_for_field","error_str","tab_id","tab_index","itemsInRow","white_cell_count","standard_float","lymphocyte_percent","cd45_bright_cd14","bright","cd3_percent","cd3_abs","standard_integer","cd3_cd4_percent","cd3_cd4_abs","cd3_cd8_percent","cd3_cd8_abs","tot_cd19_percent","tot_cd19_abs","cd3_cd19_percent","cd3_cd19_abs","cd3_cd1656_percent","cd3_cd1656_abs","opt_antigen_percent","opt_antigen_abs","KeyFields","createKeyFieldNameUrl","deleteKeyFieldUrl","showRemoveKeyFieldNewValueButton","addKeyFieldNewValue","removeKeyFieldNewValue","removeKeyFieldRow","addKeyFieldRow","addKeyFieldName","lastNewValueField","newValues","_multipleNewValuesPresentForKeyField","$newKeyFieldRow","$selectFields","_addOldValueField","_addNewValueField","_hideRemoveNewValueFieldButton","_removeRemoveNewKeyFieldCheckbox","_showRemoveNewKeyFieldButton","_markKeyFieldRowAsNewRecord","keyFieldRow","newKeyFieldRow","keyFieldName","keyFieldNameField","_disableAddNewKeyFieldSection","createNewKeyField","keyFieldNameAttributes","key_field_name_attributes","_sendRequestToCreateKeyFieldName","textStatus","jqXHR","newData","newOptionTag","_enableAddNewKeyFieldSection","fail","errorThrown","$lag_components","Lag","lag_result","maximum","LagComponents","LagBiostatisticianView","activateAnchorTab","activateTab","bindChangeTab","initialized","panelResults","calibratorTestResults","$tabLinks","$panelResultsLink","$calibratorTestResultsLink","$sections","$link","$section","sectionId","hrefAnchor","LagSubmissionForm","attachBehaviors","bindCheckNa","bindCheckNaAll","bindPasteCalibratorColumns","disableAffectedByNa","disableConfirmatoryResults","setInitialState","$pasteColumns","$naAllConfirmatory","$naConfirmatory","$input","targetContainerId","$masterCheckbox","$affectedFields","readonly","showOption","unwrap","wrap","remove_selected_options_from_siblings","previous","siblingSelects","invalidateCheckbox","toggleSelectionWhenChecked","formatPercentages","warnOfEmptyFields","warnOfInvalidData","toggleOtherSelects","toggleCheckboxesInRow","resultsTabs","checkboxElement","otherCheckboxes","thisRowType","selectElement","selectedValue","hideSections","showSections","all_mapped_elements","elementsToShow","platform","platform_mapping","siteId","submitType","anyEmptyFields","emptyFields","fieldCount","tabs_missing_data","convert_number_to_float","enable_form","percentage","extended_float","absolute","medium_string","getShelf","getShelves","populateShelves","locationShelves","locationId","shelves","shelf","clearBridgingResults","filterMatch","insertReagentIntoForm","populateBridgingResults","resultMatches","resultRowHtml","modals","defaultModalSettings","newItemModalSettings","initReagentModal","reagentModal","initItemFromKitModal","itemFromKitModal","initOrdersModal","ordersModal","initSpecimenModal","specimenModalSettings","specimenModal","initNewItemModal","newItemModal","initItemConcentrationModal","itemConcentrationModal","initPlateInfoModal","plateInfoModal","initEditAssayCommentModal","editAssayCommentModal","showReagentModal","ev","searchFields","showItemFromKitModal","showOrdersModal","showSpecimenModal","showNewItemModal","$modal","EditAssayCommentModal","reagentId","reagentName","reagentType","reagentSection","hiddenResults","resultRow","searchField","buttonClasses","rowHtml","kit_name","part_type","part_name","part_number_identifier","objString","ReagentVolumes","reagent_volumes","getAvailableQuantity","setAvailableQuantity","availableQuantity","setId","getRequestedQuantity","checkForOverOrder","reagents","overOrderWarning","updateQuantity","updateId","PerformanceReport","createExportToCsvLinks","createGoBackLinks","$csvExportLink","csvExportLink","csvExportUrl","reportParams","reportType","reportUrl","$goBackLink","goBackLink","goBackUrl","report_type","performance_url","site_url","bindSelectPerformance","bindSelectSites","bindSiteDetailSwitch","bindSubmitPerformanceReport","disableFieldsWithDependencies","fetchPerformanceOptions","fetchSiteOptions","backfillSwitchFromUrlParameters","$detailCheckbox","criteria","allPerformanceCriteria","criterion","ep_id","sites","site","site_number","importWellResultsUrl","removePlateUrlPrefix","duplicatePlateUrlPattern","bindPlateToolsMenu","showPlate","$plateToolsMenu","actionName","disablePlateToolsMenu","_handlePlateToolsAction","_resetPlateToolsMenu","_plateContainer","subcontainer","plateContainer","_handleImportResultsFile","_handleRemoveResults","_handleRemovePlate","_handlePlateDuplication","enablePlateToolsMenu","plateToolsMenu","plateToolsMenuContainer","disablePlateToolsMenuInContainer","_setPlateToolsMessage","_plateToolsMessageContainer","_setPlateResultsFileMessage","_plateResultsFileContainer","supercontainer","_setRemovingPlateMessage","_setSuccessfulImportResultsMessage","_setDuplicatingPlateMessage","_setSuccessfulPlateDuplicationMessage","_setSuccessfulRemoveResultsMessage","$clonePlateContainer","_warnUnsavedWellChanges","_duplicatePlateInUi","duplicatePlateUrl","_duplicatePlateUrlForPlate","_updateDuplicatedFieldsWithDatabaseIds","_updateAssayInventoryItemsForWells","_updateNameAndIdAttributesForDuplicatedFields","index2","keyFieldNameId","plateId","wellContainer","wellId","wellItemTemplate","assay_inventory_items","jsonData","plateHtml","plate_id","_updateDuplicatedFieldsWithPlateId","_updateDuplicatedFieldsWithWellIds","jsonPlateData","jsonWellsData","$originalPlateContainer","clonePlateContainer","_clonePlate","_addNewPlateButton","originalPlateContainer","_clearPlateFields","_clearPlateWellFields","_clearDisplayedWellResults","_clearPlateResultsFileMessage","_removeAssayInventoryItemFields","_clearFieldsFor","_clearResultsFields","_clearWellIdFields","fieldSelector","removePlateUrl","_removePlateUrlForPlate","$fileField","_uploadSelectedImportResultsFile","file","fileData","files","processData","contentType","data_import_successful","_handleImportResultsJsonResponse","_updateSpotFormingCellFields","column_number","row_number","spot_forming_cells_data","spot_forming_cells","_noResultsToRemove","processingEventId","toggleExpansionClass","addEolSiteClass","toggleEolBackground","availableSiteCheckboxes","selectAllCheckbox","checkbox_exists","new_value","previous_value","siteIdNumber","QualifyingStudiesReport","bindResetSearchFieldsButton","$searchForm","display_register_fields","fileInput","resourceTypeRadioButton","urlInput","buttonValue","ScorecardCreateForm","createEvents","displayPopulatedDescriptions","createDescriptionEvent","$eval_description_input","colHeight","refresh_upper_bounds","set_upper_bound","ScorecardEditForm","createPublishEvent","createRecalculatePointsEvent","createNoDataEvent","validateSiteScores","recalculatePoints","toggleNoData","earnedEvaluations","evaluation_field","evaluations","maximumPoints","error_fields","maxEvaluations","$numberOfEvals","$points","$scorecardTable","columnIndex","offsetParent","scroll","scrollLeft","fieldset","maxPoints","numberOfEvaluations","pointValue","sum","this_value","lower_bound","lower_bound_field","previous_row","cancelSga","openSgaForm","saveSga","newSga","sgaForm","sgaRow","tempGroupStates","parent_id","desiredTemperature","selected_program_names","toggleLinearityPlatformPermissions","section_key","site_platform_checkboxes","disable_test_form","enable_test_form","chznAddAliquots","enableSelectedTestType","set_testing_outsourced","current_tab","newAction","newActionQuery","Save","test_type","currentTab","orders","visit_id","visit_type","characterization_test_section","outsourced_present_checkbox","order_select","currentAliquots","newAliquotList","testing_outsourced","testing_outsourced_input","adjust_not_applicable_text","all_qa_approved","append_option","cancel_button_selector","change_group_select_options","change_subtype_select_options","clear_select_options","disable_field","disable_fields","edit_button_selector","enable_field","enable_fields","form_with_fields","hide_select","no_signature_warning","qa_form_inputs","qa_status_input_selectors","selected_virus_subtype","selected_virus_type","selected_virus_type_group","set_label_text","show_select","status_reducer","update_button_text","virus_subtype_label","virus_subtype_select","virus_type_group_label","virus_type_group_select","virus_type_select","checkYearOfSampling","select_field","hide_subtypes","virus_type_id","selected_option","request_url","virus_type_group_id","file_field","hidden_destroy_field","persisted_doc_field","remove_field","field_selectors","inputs_to_enable","inputs_to_disable","accumulator","submit_button","submit_button_text","removeAttribute","Tabs","heightStyle","beforeLoad","panel","endpoint","showModal","baseURL","tab","endsWith","modalTitle","closeText","forms","change_virus_type_select_options","specimen_type_select","specimen_type","pathname","$filters","addTestResultFilter","testResultOptionToggle","testResultComparatorToggle","new_child","_i","show_trial_group_dissociation_warning","addUploader","uploaderContainer","fileUploaderAttributeName","formletsContainer","countContainer","triggerContainer","attribute_name","countAttributeName","newUploader","formlet","theInput","thisI","countContainerParentSelector","ValidationTools","max_length","places","decimals","zeros_needed","css_class","decimal_places","validate_with_rules","errors","any","String","cssKeywords","reverseKeywords","convert","channels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","keyword","ansi16","ansi256","hcg","apple","gray","model","rdif","gdif","bdif","diffc","reversed","currentClosestKeyword","currentClosestDistance","distance","t3","smin","lmin","hi","q","vmin","sl","wh","bl","z2","atan2","hr","saturation","ansi","mult","rem","colorString","char","chroma","grayscale","hue","pure","mg","conversions","route","fromModel","routes","toModel","wrappedFn","arg0","conversion","wrapRounded","wrapRaw","from","wrapConversion","graph","cur","models","buildGraph","queue","adjacents","adjacent","deriveBFS","d3_arraySlice","d3_array","d3_document","d3_documentElement","documentElement","d3_window","defaultView","nodeType","array","now","setProperty","d3_element_prototype","d3_element_setAttribute","d3_element_setAttributeNS","setAttributeNS","d3_style_prototype","CSSStyleDeclaration","d3_style_setProperty","space","priority","d3_ascending","d3_number","d3_numeric","d3_bisector","compare","lo","mid","ascending","descending","mean","quantile","H","median","numbers","variance","deviation","d3_bisect","d3_transposeLength","bisectLeft","bisect","bisectRight","bisector","shuffle","i0","i1","permute","indexes","permutes","p1","transpose","matrix","zip","arrays","merged","d3_class","d3_Map","d3_range_integerScale","d3_map_proto","d3_map_zero","d3_map_escape","d3_map_unescape","d3_map_has","d3_map_remove","d3_map_keys","d3_map_size","d3_map_empty","d3_Set","d3_identity","d3_rebind","d3_vendorSymbol","d3_vendorPrefixes","prefixName","nest","sortValues","rollup","sortKeys","mapType","keyValue","setter","valuesByKey","sortKey","keyMap","order","rebind","d3_noop","d3_dispatch","d3_dispatch_event","dispatch","listeners","listenerByName","listener","d3_eventPreventDefault","d3_eventSource","d3_eventDispatch","of","thiz","argumentz","e1","e0","requote","d3_requote_re","d3_subclass","__proto__","d3_selection","d3_selectionPrototype","d3_select","d3_selectAll","d3_selectMatches","d3_selectMatcher","Sizzle","d3_selection_selector","d3_selection_selectorAll","subgroup","subnode","subgroups","d3_nsXhtml","d3_nsPrefix","xhtml","xlink","xmlns","d3_selection_attr","ns","qualify","removeAttributeNS","d3_collapse","d3_selection_classedRe","d3_selection_classes","d3_selection_classed","d3_selection_classedName","re","classList","lastIndex","d3_selection_style","removeProperty","d3_selection_property","d3_selection_creator","createElementNS","namespaceURI","d3_selectionRemove","d3_selection_dataNode","d3_selection_filter","d3_selection_sortComparator","comparator","d3_selection_each","d3_selection_enter","d3_selection_enterPrototype","getAttributeNS","contains","getComputedStyle","getPropertyValue","insertBefore","groupData","nodeData","n0","updateNodes","enterNodes","exitNodes","nodeByKeyValue","keyValues","nextSibling","d3_selection_on","capture","d3_selection_onListener","d3_selection_onFilters","onRemove","d3_selection_onFilter","upgroup","j0","nodes","mouseenter","mouseleave","related","relatedTarget","compareDocumentPosition","d3_event_dragSelect","d3_event_dragId","d3_event_dragSuppress","suppressClick","d3_mousePoint","d3_mouse_bug44083","changedTouches","ownerSVGElement","createSVGPoint","scrollX","scrollY","ctm","border","getScreenCTM","pageX","pageY","matrixTransform","clientLeft","clientTop","d3_behavior_dragTouchId","identifier","touch","touches","mousedown","touchstart","subject","move","dragOffset","correspondingElement","dragged","dragId","dragName","dragSubject","position1","position0","dragRestore","d3_radians","d3_degrees","d3_sgn","d3_cross2d","d3_acos","acos","d3_asin","asin","d3_cosh","exp","d3_haversin","SQRT2","interpolateZoom","p0","S","ux0","uy0","w0","ux1","uy1","w1","d2","b0","b1","r0","coshr0","d3_sinh","translate0","center0","mousewheelTimer","touchtime","view","d3_behavior_zoomInfinity","zooming","mousemove","mouseup","mousedowned","d3_behavior_zoomWheel","mousewheeled","dblclicked","touchstarted","scaleTo","translateTo","zoomTo","rescale","invert","zoomstarted","zoomed","zoomended","location0","d3_selection_interrupt","locations0","distance0","zoomName","touchmove","touchend","relocate","started","moved","ended","changed","LN2","l0","l1","distance1","d3_behavior_zoomDelta","deltaMode","view1","d3_transitionInheritId","tween","d3_color","d3_hsl","d3_rgb_parse","d3_rgb_hsl","d3_hslPrototype","d3_hsl_rgb","m1","m2","vv","d3_rgb","d3_hcl","d3_lab_hcl","d3_lab","d3_rgb_lab","darker","hcl","d3_hclPrototype","d3_hcl_lab","d3_lab_K","d3_lab_X","d3_lab_Y","d3_lab_Z","d3_labPrototype","d3_lab_rgb","d3_xyz_rgb","d3_lab_xyz","d3_xyz_lab","d3_rgbNumber","d3_rgbString","d3_rgbPrototype","d3_rgb_hex","d3_rgb_parseNumber","d3_rgb_names","d3_rgb_xyz","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","d3_functor","d3_xhrType","d3_xhr","request","responseType","respond","d3_xhrHasResponse","XDomainRequest","onload","onerror","onprogress","progress","overrideMimeType","beforesend","abort","d3_xhr_fixCallback","functor","dsv","reFormat","delimiterCode","charCodeAt","typedResponse","formatRow","formatValue","eol","EOL","N","I","formatRows","fieldSet","fields","d3_timer_queueHead","d3_timer_queueTail","d3_timer_interval","d3_timer_timeout","d3_timer_frame","d3_timer","then","d3_timer_step","d3_timer_mark","d3_timer_sweep","isFinite","t0","d3_format_precision","LN10","d3_formatPrefixes","d3_locale_numberFormat","locale","locale_decimal","locale_thousands","thousands","locale_grouping","grouping","locale_currency","currency","formatGroup","specifier","d3_format_re","fill","align","zfill","comma","precision","d3_format_types","d3_format_typeDefault","zcomma","fullSuffix","negative","formatPrefix","lastIndexOf","fromCharCode","X","toPrecision","toExponential","d3_time","d3_date","d3_date_utc","UTC","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getTimezoneOffset","valueOf","setDate","d3_time_prototype","setUTCDate","setDay","setUTCDay","setFullYear","setUTCFullYear","setHours","setUTCHours","setMilliseconds","setUTCMilliseconds","setMinutes","setUTCMinutes","setMonth","setUTCMonth","setSeconds","setUTCSeconds","setTime","d3_time_interval","dt","times","d3_time_interval_utc","d3_locale_timeFormat","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_days","days","locale_shortDays","shortDays","locale_months","months","locale_shortMonths","shortMonths","d3_time_format","d3_time_formatPads","d3_time_formats","M","L","Z","d3_time_parse","localZ","W","U","d3_time_parsers","d3_time_formatMulti","d3_time_periodLookup","d3_time_dayRe","d3_time_formatRe","d3_time_dayLookup","d3_time_formatLookup","d3_time_dayAbbrevRe","d3_time_dayAbbrevLookup","d3_time_monthRe","d3_time_monthLookup","d3_time_monthAbbrevRe","d3_time_monthAbbrevLookup","A","B","d3_time_formatPad","dayOfYear","sundayOfYear","mondayOfYear","Y","d3_time_zone","d3_time_parseDay","d3_time_parseHour24","d3_time_parseDayOfYear","d3_time_parseMilliseconds","d3_time_parseMonthNumber","d3_time_parseMinutes","d3_time_parseSeconds","d3_time_parseWeekNumberSunday","d3_time_parseWeekdayNumber","d3_time_parseWeekNumberMonday","d3_time_parseYear","d3_time_parseFullYear","d3_time_parseZone","d3_time_parseLiteralPercent","year","day","years","week","sunday","weeks","weekOfYear","d3_time_numberRe","d3_time_percentRe","zs","zh","zm","formats","numberFormat","timeFormat","d3_locale_enUS","d3_adder","geo","d3_adderSum","d3_adderTemp","bv","av","d3_geo_streamGeometry","geometry","d3_geo_streamGeometryType","stream","d3_geo_streamObjectType","Feature","feature","FeatureCollection","features","Sphere","sphere","Point","coordinates","MultiPoint","LineString","d3_geo_streamLine","MultiLineString","Polygon","d3_geo_streamPolygon","MultiPolygon","GeometryCollection","geometries","closed","coordinate","lineStart","lineEnd","polygonStart","polygonEnd","d3_geo_areaSum","d3_geo_area","d3_geo_centroidW0","d3_geo_centroidW1","d3_geo_centroidX0","d3_geo_centroidY0","d3_geo_centroidZ0","d3_geo_centroidX1","d3_geo_centroidY1","d3_geo_centroidZ1","d3_geo_centroidX2","d3_geo_centroidY2","d3_geo_centroidZ2","d3_geo_areaRingSum","d3_geo_areaRingStart","nextPoint","d3_geo_cartesian","spherical","d3_geo_cartesianDot","d3_geo_cartesianCross","d3_geo_cartesianAdd","d3_geo_cartesianScale","vector","d3_geo_cartesianNormalize","d3_geo_spherical","cartesian","d3_geo_sphericalEqual","bounds","bound","ringPoint","ringStart","ringEnd","linePoint","normal","inflection","antimeridian","compareRanges","withinRange","best","d3_geo_centroid","d3_geo_centroidPoint","d3_geo_centroidLineStart","d3_geo_centroidLineEnd","d3_geo_centroidRingStart","d3_geo_centroidPointXYZ","z0","cz","d3_geo_compose","compose","d3_true","d3_geo_clipPolygon","segments","clipStartInside","clip","segment","d3_geo_clipPolygonIntersection","d3_geo_clipPolygonLinkCircular","isSubject","d3_geo_clip","pointVisible","clipLine","clipStart","rotatedClipStart","pointRing","polygon","meridian","parallel","meridianNormal","polarAngle","winding","ring","point0","intersection","d3_geo_pointInPolygon","polygonStarted","d3_geo_clipSort","pointLine","d3_geo_clipBufferListener","ringListener","clean","ringSegments","d3_geo_clipSegmentLength1","rejoin","d3_geo_clipAntimeridian","atan","d3_geo_clipAntimeridianIntersect","direction","d3_geom_clipLine","ax","ay","d3_geo_clipExtentMAX","d3_geo_clipExtent","x__","y__","v__","x_","y_","v_","listener_","bufferListener","wn","insidePolygon","inside","visible","a1","corner","comparePoints","ca","cb","d3_geo_conic","projectAt","d3_geo_projectionMutator","parallels","d3_geo_conicEqualArea","C","forward","clipExtent","output","conicEqualArea","albers","albersUsa","lower48Point","alaskaPoint","hawaiiPoint","lower48","alaska","hawaii","pointStream","lower48Stream","alaskaStream","hawaiiStream","d3_geo_pathAreaSum","d3_geo_pathAreaPolygon","d3_geo_pathBoundsX0","d3_geo_pathBoundsY0","d3_geo_pathBoundsX1","d3_geo_pathBoundsY1","d3_geo_pathArea","d3_geo_pathAreaRingStart","x00","y00","d3_geo_pathBounds","d3_geo_pathBuffer","pointCircle","d3_geo_pathBufferCircle","pointLineStart","lineEndPolygon","pointRadius","d3_geo_lengthSum","d3_geo_pathCentroid","d3_geo_pathCentroidPoint","d3_geo_pathCentroidLineStart","d3_geo_pathCentroidLineEnd","d3_geo_pathCentroidRingStart","d3_geo_pathContext","moveTo","lineTo","closePath","d3_geo_resample","project","cosMinDistance","maxDepth","resample","resampleRecursive","resampleNone","d3_geo_transformPoint","a00","b00","c00","a0","c0","resampleLineTo","c1","dx2","dy2","dz","d3_geo_transform","d3_geo_projection","projectRotate","projectResample","preclip","postclip","clipAngle","projection","d3_geo_rotation","invalidate","d3_geo_projectionRadians","cr","smallRadius","notHemisphere","v0","v00","point2","point1","intersect","d3_geo_circleInterpolate","two","n1","n2","n2n2","n1n2","determinant","c2","n1xn2","uu","polar","q1","d3_geo_clipCircle","d3_geo_equirectangular","d3_geo_identityRotation","rotation","sr","d3_geo_circleAngle","d3_geo_graticuleX","d3_geo_graticuleY","d3_source","d3_target","projectStream","contextStream","cacheStream","projectionMutator","equirectangular","graticule","X1","X0","Y1","Y0","DX","DY","outline","majorExtent","minorExtent","majorStep","minorStep","greatArc","source_","target_","cy0","sy0","cy1","sy1","kx0","ky0","kx1","ky1","d3_geo_length","d3_geo_azimuthal","azimuthal","sinc","cosc","d3_geo_azimuthalEqualArea","azimuthalEqualArea","d3_geo_azimuthalEquidistant","d3_geo_conicConformal","F","d3_geo_mercator","d3_geo_conicEquidistant","G","azimuthalEquidistant","conicConformal","conicEquidistant","d3_geo_gnomonic","d3_geo_mercatorProjection","clipAuto","gnomonic","mercator","d3_geo_orthographic","orthographic","d3_geo_stereographic","d3_geo_transverseMercator","d3_geom_pointX","d3_geom_pointY","d3_geom_hullUpper","hull","hs","d3_geom_hullOrder","stereographic","transverseMercator","geom","vertices","fx","fy","flippedPoints","upper","lower","skipLeft","skipRight","d3_geom_polygonPrototype","d3_geom_polygonInside","d3_geom_polygonIntersect","x3","x21","x43","y3","y21","y43","d3_geom_polygonClosed","d3_geom_voronoiEdges","d3_geom_voronoiCells","d3_geom_voronoiBeaches","d3_geom_voronoiFirstCircle","d3_geom_voronoiCircles","d3_geom_voronoiBeachPool","d3_geom_voronoiCirclePool","d3_geom_voronoiBeach","d3_geom_voronoiRedBlackNode","edge","d3_geom_voronoiCreateBeach","beach","d3_geom_voronoiDetachBeach","d3_geom_voronoiDetachCircle","d3_geom_voronoiRemoveBeach","vertex","P","disappearing","lArc","rArc","iArc","nArcs","d3_geom_voronoiSetEdgeEnd","d3_geom_voronoiCreateEdge","d3_geom_voronoiAttachCircle","d3_geom_voronoiAddBeach","dxl","dxr","directrix","d3_geom_voronoiLeftBreakPoint","d3_geom_voronoiRightBreakPoint","R","lSite","bx","by","rSite","hc","rfocx","rfocy","pby2","lfocx","lfocy","plby2","hl","aby2","d3_geom_voronoiCell","edges","d3_geom_voronoiHalfEdgeOrder","d3_geom_voronoiCircle","cSite","ha","d3_geom_voronoiConnectEdge","vb","fm","fb","va","lx","ly","rx","ry","d3_geom_voronoiEdge","d3_geom_voronoiHalfEdge","d3_geom_voronoiRedBlackTree","d3_geom_voronoiRedBlackRotateLeft","tree","d3_geom_voronoiRedBlackRotateRight","d3_geom_voronoiRedBlackFirst","d3_geom_voronoi","bbox","d3_geom_voronoiVertexOrder","d3_geom_voronoiClipEdges","iHalfEdge","halfEdges","nHalfEdges","cells","iCell","prepare","d3_geom_voronoiCloseCells","diagram","grandpa","uncle","voronoi","d3_geom_voronoiClipExtent","polygons","triangles","s0","s1","d3_geom_quadtreeCompatX","d3_geom_quadtreeCompatY","d3_geom_quadtreeVisit","d3_interpolateRgb","ar","ag","ab","br","bg","bb","d3_interpolateObject","d3_interpolate","d3_interpolateNumber","d3_interpolateString","am","bm","bs","bi","d3_interpolate_numberA","d3_interpolate_numberB","delaunay","quadtree","x1_","y1_","x2_","y2_","leaf","nx","ny","insertChild","nPoint","xm","ym","below","visit","closestPoint","minDistance2","distance2","d3_geom_quadtreeFind","interpolateRgb","interpolateObject","interpolateNumber","interpolateString","interpolators","d3_interpolateArray","na","nb","interpolateArray","d3_ease_default","d3_ease","poly","quad","d3_ease_quad","cubic","d3_ease_cubic","d3_ease_sin","d3_ease_exp","d3_ease_circle","elastic","bounce","d3_ease_bounce","d3_ease_mode","out","d3_ease_reverse","d3_ease_reflect","d3_ease_cubicInOut","d3_interpolateRound","d3_transform","kx","d3_transformNormalize","kz","d3_transformDot","ky","skew","interpolateHcl","ah","ac","al","bh","bc","interpolateHsl","as","interpolateLab","aa","ba","interpolateRound","baseVal","consolidate","d3_transformIdentity","d3_interpolateTransformPop","d3_interpolateTransform","ta","tb","d3_interpolateTranslate","ra","rb","d3_interpolateRotate","wa","wb","d3_interpolateSkew","ka","kb","d3_interpolateScale","d3_uninterpolateNumber","d3_uninterpolateClamp","d3_layout_bundlePath","lca","aNodes","d3_layout_bundleAncestors","bNodes","aNode","bNode","sharedNode","d3_layout_bundleLeastCommonAncestor","ancestors","d3_layout_forceDragstart","fixed","d3_layout_forceDragend","d3_layout_forceMouseover","px","py","d3_layout_forceMouseout","d3_layout_forceAccumulate","alpha","charges","charge","pointCharge","interpolateTransform","bundle","paths","chord","chords","sortGroups","sortSubgroups","sortChords","relayout","groupSums","groupIndex","subgroupIndex","di","dj","subindex","resort","distances","strengths","friction","linkDistance","d3_layout_forceLinkDistance","linkStrength","d3_layout_forceLinkStrength","chargeDistance2","d3_layout_forceChargeDistance2","gravity","theta2","repulse","dw","dn","dragmove","resume","weight","chargeDistance","theta","neighbors","dimension","d3_layout_hierarchyRebind","hierarchy","d3_layout_hierarchyLinks","d3_layout_hierarchyVisitBefore","d3_layout_hierarchyVisitAfter","nodes2","d3_layout_hierarchyChildren","d3_layout_hierarchyValue","d3_layout_hierarchySort","childs","revalue","partition","d3_layout_pieSortByValue","padAngle","da","pa","d3_layout_stackX","d3_layout_stackY","d3_layout_stackOut","d3_layout_stackOrderDefault","d3_layout_stackOffsetZero","series","d3_layout_stackOrders","d3_layout_stackOffsets","d3_layout_stackMaxIndex","sums","d3_layout_stackReduceSum","tops","bottoms","silhouette","wiggle","s2","s3","o0","expand","zero","d3_layout_stackSum","d3_layout_histogramBinSturges","d3_layout_histogramBinFixed","d3_layout_histogramRange","d3_layout_packSort","d3_layout_packInsert","_pack_next","_pack_prev","d3_layout_packSplice","d3_layout_packIntersects","dr","d3_layout_packSiblings","d3_layout_packLink","d3_layout_packPlace","isect","d3_layout_packUnlink","d3_layout_packTransform","db","dc","d3_layout_treeSeparation","d3_layout_treeLeft","d3_layout_treeRight","d3_layout_treeMove","wm","wp","d3_layout_treeAncestor","vim","ancestor","d3_layout_clusterLeft","d3_layout_clusterRight","d3_layout_treemapPadNull","d3_layout_treemapPad","d3_scaleExtent","d3_scaleRange","d3_scale_bilinear","uninterpolate","d3_scale_nice","nice","d3_scale_niceStep","d3_scale_niceIdentity","histogram","frequency","valuer","ranger","binner","bin","bins","thresholds","pack","separation","nodeSize","root0","root1","node1","wrapTree","firstWalk","secondWalk","sizeNode","tx","d3_layout_treeShift","midpoint","vip","vop","vom","sip","sop","sim","som","apportion","cluster","previousNode","d3_layout_clusterX","d3_layout_clusterY","treemap","stickies","pad","sticky","mode","squarify","worst","stickify","rmax","rmin","padConstant","logNormal","bates","irwinHall","d3_scale_polylinear","d3_scale_linear","clamp","rangeRound","d3_scale_linearTicks","d3_scale_linearTickFormat","d3_scale_linearNice","d3_scale_linearRebind","d3_scale_linearTickRange","span","err","d3_scale_linearPrecision","d3_scale_linearFormatSignificant","d3_scale_linearFormatPrecision","d3_scale_log","positive","niced","d3_scale_logNiceNegative","d3_scale_logFormat","d3_scale_pow","powp","d3_scale_powPow","powb","d3_scale_ordinal","xi","rangePoints","rangeRoundPoints","rangeBands","outerPadding","rangeRoundBands","ordinal","d3_category10","category20","d3_category20","category20b","d3_category20b","category20c","d3_category20c","d3_scale_quantile","quantiles","invertExtent","d3_scale_quantize","d3_scale_threshold","d3_scale_identity","identity","d3_zero","quantize","d3_svg_arcInnerRadius","d3_svg_arcOuterRadius","cornerRadius","padRadius","d3_svg_arcAuto","d3_svg_arcStartAngle","d3_svg_arcEndAngle","d3_svg_arcPadAngle","cw","rc","circleSegment","rp","ap","d3_svg_arcSweep","h1","h0","rc1","rc0","oc","kc","lc","t30","d3_svg_arcCornerTangents","t12","t03","t21","x01","y01","ox","oy","D","cx0","cx1","dx0","dy0","dx1","dy1","d3_svg_line","d3_svg_lineLinear","interpolateKey","tension","d3_svg_lineInterpolators","d3_svg_lineLinearClosed","d3_svg_lineStepBefore","d3_svg_lineStepAfter","basis","d3_svg_lineBasis","pi","d3_svg_lineDot4","d3_svg_lineBasisBezier3","d3_svg_lineBasisBezier","cardinal","d3_svg_lineHermite","d3_svg_lineCardinalTangents","monotone","tangents","d3_svg_lineSlope","d3_svg_lineFiniteDifferences","d3_svg_lineMonotoneTangents","lp","p2","d3_svg_lineBasisBezier1","d3_svg_lineBasisBezier2","d3_svg_lineRadial","d3_svg_area","interpolateReverse","points0","points1","fx0","fy0","fx1","fy1","d3_svg_chordRadius","d3_svg_diagonalProjection","d3_svg_symbolSize","d3_svg_symbolType","d3_svg_symbolCircle","radial","curve","diagonal","p3","projection_","d3_svg_diagonalRadialProjection","d3_svg_symbols","cross","diamond","d3_svg_symbolTan30","square","d3_svg_symbolSqrt3","symbolTypes","d3_transitionId","d3_transitionNamespace","d3_transitionInherit","d3_transitionNode","d3_transition","interrupt","d3_selection_interruptNS","lock","activeId","active","d3_transitionPrototype","d3_transition_tween","d3_transition_text","tweens","elapsed","cancelId","cancel","subnodes","nameNS","attrNull","attrNullNS","styleNull","styleTween","inheritId","id0","id1","tickFormat_","d3_svg_axisDefaultOrient","innerTickSize","tickPadding","tickArguments_","tickSpacing","d3_svg_axisX","d3_svg_axisY","d3_svg_axisOrients","tickSize","tickSubdivide","xExtentDomain","yExtentDomain","xExtent","yExtent","xClamp","yClamp","resizes","d3_svg_brushResizes","brushstart","d3_svg_brushCursor","gUpdate","backgroundUpdate","redrawX","redrawY","eventTarget","event_","resizing","resizingX","resizingY","brushmove","brushend","move1","extent1","extent0","yi","nw","ne","se","sw","d3_time_formatUtc","d3_time_formatIso","d3_time_formatIsoNative","toISOString","d3_time_scale","tickMethod","d3_time_scaleSteps","d3_time_scaleMilliseconds","d3_time_scaleDate","skip","skipped","iso","second","seconds","minute","minutes","hour","timezone","hours","month","d3_time_scaleLocalMethods","d3_time_scaleLocalFormat","d3_time_scaleUtcMethods","d3_time_scaleUtcFormat","d3_json","d3_html","createRange","selectNode","createContextualFragment","responseXML","dateSettings","daysShort","monthsShort","meridiem","separators","validParts","intParts","tzParts","tzClip","DateFormatter","sec","guessDate","parseFormat","O","T","i18n","dayOfWeekShort","dayOfWeek","ro","fa","ru","uk","en","de","nl","tr","fr","es","th","pl","pt","km","kr","it","no","ja","vi","cs","hu","az","et","eu","fi","gl","ko","lt","lv","mk","mn","sk","sq","sv","ug","he","hy","kg","rm","contentWindow","startDate","monthChangeSpinner","closeOnTimeSelect","closeOnWithoutClick","closeOnInputClick","openOnFocus","datepicker","defaultTime","defaultDate","minDate","maxDate","minTime","maxTime","minDateTime","maxDateTime","allowTimes","opened","initTime","theme","touchMovedThreshold","onSelectDate","onSelectTime","onChangeMonth","onGetWeekOfYear","onChangeYear","onChangeDateTime","onShow","onGenerate","withoutCopyright","inverseButton","hours12","dayOfWeekStart","parentID","timeHeightInTimePicker","timepickerScrollbar","todayButton","prevButton","nextButton","lazyInit","mask","validateOnBlur","allowBlank","yearStart","yearEnd","monthStart","monthEnd","roundTime","weekends","highlightedDates","highlightedPeriods","allowDates","allowDateRe","disabledDates","disabledWeekDays","yearOffset","beforeShowDay","enterLikeTab","showApplyButton","insideParent","E","default_options","formatter","formatMask","setLocale","RFC_2822","ATOM","ISO_8601","RFC_822","RFC_850","RFC_1036","RFC_1123","RSS","W3C","desc","currentStyle","countDaysInMonth","xdsoftScroller","eq","clientHeight","offsetHeight","J","isPlainObject","currentTime","touchStartPosition","touchMoved","strToDate","strToDateTime","strtotime","isValidDate","getElementById","createTextRange","collapse","moveEnd","moveStart","setSelectionRange","clipboardData","selectionStart","selectionEnd","getValue","getCurrentTime","setOptions","setCurrentTime","dateFormat","dayOfWeekStartPrev","nextMonth","prevMonth","getWeekOfYear","marginTop","deltaX","clientWidth","offsetLeft","offsetTop","unmousewheel","fixHooks","mouseHooks","special","mousewheel","onmousewheel","getLineHeight","getPageHeight","teardown","adjustOldDeltas","normalizeOffset","wheelDeltaY","wheelDeltaX","HORIZONTAL_AXIS","deltaFactor","offsetX","offsetY","handle","nullLowestDeltaTimeout","lowestDelta","toFix","toBind","elem","$elem","$parent","orgEvent","absDelta","lineHeight","pageHeight","shouldAdjustOldDeltas","boundingRect","nullLowestDelta","$separator","$spaces","spaces","$hash","$numbers","tokens","temp","queryObject","SET","parseNew","GET","REMOVE","tval","COMPACT","EMPTY","build","orig","compact","queryString","chunks","encode","newKey","addFields","bodyOverflowX","callbacks","checkInterval","Content","$el","$elProxy","elProxyPosition","mouseIsOverProxy","Status","timerHide","timerShow","$tooltip","iconTheme","_init","animation","arrow","arrowColor","autoClose","contentAsHTML","contentCloning","minWidth","functionInit","functionBefore","functionReady","functionAfter","hideOnClick","icon","iconCloning","iconDesktop","iconTouch","interactive","interactiveTolerance","onlyOne","positionTracker","positionTrackerCallback","restoration","speed","touchDevices","_content_set","insertAfter","_show","_showNow","clearQueue","_content_insert","reposition","_interval_set","_interval_cancel","_repositionInfo","_update","fadeTo","detach","innerWidth","V","K","disable","grep","elementIcon","elementTooltip","one","factory","pseudos","createPseudo","dataName","enableSelection","focusable","hasTabindex","mapName","img","focusableIfVisible","formResetMixin","_formResetHandler","instances","refresh","_bindFormResetHandler","_form","_unbindFormResetHandler","ie","BACKSPACE","COMMA","DELETE","DOWN","END","ENTER","ESCAPE","HOME","LEFT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","SPACE","TAB","UP","escapeSelector","addBack","plugin","proto","plugins","allowDisconnected","cachedScrollbarWidth","rhorizontal","rvertical","roffset","rposition","rpercent","_position","getOffsets","parseCss","isWindow","scrollbarWidth","w2","innerDiv","getScrollInfo","within","overflowX","isDocument","overflowY","hasOverflowX","scrollWidth","scrollHeight","getWithinInfo","withinElement","isElemWindow","atOffset","targetWidth","targetHeight","targetOffset","basePosition","dimensions","scrollInfo","collision","at","horizontalOffset","verticalOffset","collisionPosition","using","elemWidth","elemHeight","marginLeft","collisionWidth","collisionHeight","myOffset","dir","props","feedback","horizontal","vertical","important","fit","newOverRight","withinOffset","collisionPosLeft","overLeft","overRight","newOverBottom","collisionPosTop","overTop","overBottom","flip","newOverLeft","newOverTop","flipfit","safeActiveElement","activeElement","safeBlur","scrollParent","includeHidden","excludeStaticParent","overflowRegex","tabbable","uuid","removeUniqueId","widgetUuid","widgetHasOwnProperty","widgetSlice","cleanData","elems","events","_data","existingConstructor","basePrototype","proxiedPrototype","fullName","Widget","_createWidget","_proto","_childConstructors","_super","_superApply","returnValue","__super","__superApply","widgetEventPrefix","widgetName","widgetFullName","childPrototype","bridge","inputIndex","inputLength","isMethodCall","methodValue","jquery","defaultElement","eventNamespace","bindings","hoverable","classesElementLookup","_on","parentWindow","_getCreateOptions","_setOptionDisabled","_trigger","_getCreateEventData","_destroy","_removeClass","curOption","_setOptions","_setOption","_setOptionClasses","classKey","currentElements","_classes","_toggleClass","full","bindRemoveEvent","nodesToBind","some","processClassString","checkOption","uniqueSort","_untrackClassesElement","_off","_addClass","suppressDisabledCheck","handlers","delegateElement","handlerProxy","eventName","_delay","_hoverable","_focusable","focusin","focusout","isDefaultPrevented","defaultEffect","hasOptions","effectName","isEmptyObject","effects","easing","minLength","requestIndex","pending","liveRegionTimer","suppressKeyPress","suppressKeyPressRepeat","suppressInput","isTextarea","isInput","isMultiLine","_isContentEditable","valueMethod","isNewMenu","_move","_keyEvent","menu","_value","_searchTimeout","keypress","searching","_change","_initSource","_appendTo","role","menufocus","liveRegion","menuselect","beforeunload","_isEventTargetInWidget","menuElement","_closeOnClickOutside","equalValues","menuVisible","modifierKey","_search","cancelSearch","_response","__response","_normalize","_suggest","_close","ul","_renderMenu","_resizeMenu","_renderItemData","_renderItem","isFirstItem","isLastItem","keyEvent","editable","escapeRegex","matcher","messages","noResults","iconPosition","showLabel","originalLabel","hasTitle","_enhance","_updateIcon","_updateTooltip","displayBlock","_attachIcon","iconSpace","_attachIconSpace","newShowLabel","newIcon","isDisabled","uiBackCompat","icons","primary","secondary","checkboxradio","buttonset","controlgroup","labelContents","_readType","contents","wrapAll","_updateLabel","_getRadioGroup","nameSelector","_toggleClasses","prependTo","controlgroupCornerRegex","onlyVisible","_callChildMethod","childWidgets","controlgroupLabel","_initWidgets","instanceOptions","_resolveClassesValues","widgetElement","_updateCornerClass","_buildSimpleOptions","_spinnerOptions","_buttonOptions","_checkboxradioOptions","_selectmenuOptions","middle","only","closeOnEscape","draggable","minHeight","topOffset","beforeClose","dragStop","resizeStart","resizeStop","sizeRelatedOptions","resizableRelatedOptions","originalCss","originalPosition","originalTitle","_createWrapper","uiDialog","_createTitlebar","_createButtonPane","_makeDraggable","_makeResizable","_isOpen","_trackFocus","_untrackInstance","_destroyOverlay","_focusedElement","opener","_hide","isOpen","moveToTop","_moveToTop","silent","zIndices","zIndexMax","_focusTabbable","_size","_createOverlay","overlay","_makeFocusTarget","hasFocus","uiDialogButtonPane","uiDialogTitlebarClose","_restoreTabbableFocus","_keepFocus","tabbables","uiDialogTitle","uiDialogTitlebar","_title","uiButtonSet","_createButtons","buttonOptions","filteredUi","containment","_blockFrames","_unblockFrames","handles","resizeHandles","originalSize","alsoResize","_minHeight","_trackingInstances","exists","isVisible","resizableOptions","isDraggable","isResizable","nonContentHeight","minContentHeight","maxContentHeight","iframeBlocks","iframe","_allowInteraction","jqMinor","isOpening","overlays","dialogClass","addClasses","connectToSortable","cursor","cursorAt","iframeFix","refreshPositions","revertDuration","scope","scrollSensitivity","scrollSpeed","snap","snapMode","snapTolerance","zIndex","_setPositionRelative","_setHandleClassName","_mouseInit","_removeHandleClassName","destroyOnClear","_mouseDestroy","_mouseCapture","_getHandle","_blurActiveElement","_mouseStart","_createHelper","_cacheHelperProportions","ddmanager","_cacheMargins","cssPosition","hasFixedAncestor","positionAbs","_refreshOffsets","_generatePosition","originalPageX","originalPageY","_adjustOffsetFromHelper","_setContainment","_clear","dropBehaviour","prepareOffsets","_mouseDrag","_getParentOffset","relative","_getRelativeOffset","noPropagation","_convertPositionTo","_uiHash","_mouseUp","_mouseStop","dropped","drop","handleElement","helperIsFunction","helperProportions","_isRootNode","po","scrollIsRootNode","isUserScrollable","ce","relativeContainer","mod","constrainPosition","co","cancelHelperRemoval","uiSortable","sortables","isOver","_storedCSS","_helper","innermostIntersecting","_intersectsWith","containerCache","currentItem","fromOutside","_revert","_cursor","_opacity","scrollParentNotHidden","overflowOffset","scrolled","snapElements","$t","$o","inst","ts","ls","rs","snapping","release","snapItem","makeArray","_zIndex","submenu","menus","activeMenu","mouseHandled","lastMousePosition","_activateItem","isPropagationStopped","keepActiveItem","_menuItems","collapseAll","_closeOnDocumentClick","previousFilter","actualTarget","submenus","_keydown","previousPage","nextPage","_activate","filterTimer","_filterMenuItems","newSubmenus","newItems","newWrappers","submenuCaret","prepend","_isDivider","_itemRole","listbox","nested","activeParent","_scrollIntoView","_startOpening","borderTop","paddingTop","elementHeight","_hasScroll","fromFocus","_open","all","currentMenu","startMenu","innerHeight","escapedCharacter","_mouseDown","_mouseMoveDelegate","_mouseUpDelegate","_mouseMoved","_mouseStarted","_mouseDownEvent","btnIsLeft","elIsCancel","mouseDelayMet","_mouseDelayTimer","_mouseDistanceMet","_mouseDelayMet","_mouseMove","ignoreMissingWhich","animateDuration","animateEasing","aspectRatio","autoHide","ghost","_num","_isNumber","_aspectRatio","originalElement","_proportionallyResizeElements","overflow","elementIsWrapper","marginRight","marginBottom","originalResizeStyle","_proportionallyResize","_setupHandles","_handles","_addedHandles","_removeHandles","hname","_renderAxis","padPos","padWrapper","curleft","curtop","_renderProxy","sizeDiff","originalMousePosition","_propagate","smp","_updatePrevProperties","_updateVirtualBoundaries","_updateRatio","_respectSize","_updateCache","_applyChanges","pr","ista","soffseth","soffsetw","prevPosition","prevSize","forceAspectRatio","pMinWidth","pMaxWidth","pMinHeight","pMaxHeight","_vBoundaries","cpos","csize","ismaxw","ismaxh","isminw","isminh","dh","_getPaddingPlusBorderDimensions","borders","paddings","prel","outerDimensions","elementOffset","containerElement","containerOffset","containerPosition","containerSize","woset","hoset","isParent","isOffsetRelative","cp","pRatio","cop","continueResize","ho","os","op","gridX","gridY","newWidth","isMaxWidth","isMaxHeight","isMinWidth","isMinHeight","connectWith","dropOnEmpty","forcePlaceholderSize","forceHelperSize","tolerance","activate","beforeStop","deactivate","over","receive","_isOverAxis","reference","_isFloating","overrideHandle","validHandle","reverting","_refreshItems","_removeCurrentsFromItems","noActivation","currentContainer","domPosition","_createPlaceholder","storedCursor","storedStylesheet","_storedZIndex","_storedOpacity","_preserveHelperProportions","containers","lastPositionAbs","_scroll","itemElement","_refreshItemPositions","dragDirection","_getDragVerticalDirection","_getDragHorizontalDirection","_intersectsWithPointer","_intersectsWithSides","_rearrange","_contactContainers","_noFinalSort","_getItemsAsjQuery","connected","res","expression","dyClick","dxClick","isOverElementHeight","isOverElementWidth","isOverElement","forcePointerForContainers","floating","verticalDirection","horizontalDirection","isOverBottomHalf","isOverRightHalf","_connectWith","queries","addItems","targetData","_queries","queriesLength","fast","toleranceElement","custom","refreshContainers","_createTrPlaceholder","sourceTr","targetTr","itemWithLeastDistance","posProperty","sizeProperty","nearBottom","innermostContainer","innermostIndex","hardRefresh","counter","delayedTriggers","delayEvent","_inst","sender","rhash","collapsible","beforeActivate","_isLocal","anchor","anchorUrl","locationUrl","running","_processTabs","_initialActive","li","anchors","_findActive","_refresh","locationHash","_getPanelForTab","_tabKeydown","focusedTab","goingForward","_handlePageNav","activating","_focusNextTab","_panelKeydown","_findNextTab","lastTabIndex","_setupEvents","_setupHeightStyle","_sanitizeSelector","lis","tablist","panels","prevTabs","prevAnchors","prevPanels","_getList","panelId","anchorId","originalAriaControls","_createPanel","_eventHandler","clickedIsActive","collapsing","toHide","eventData","oldTab","oldPanel","newTab","newPanel","_toggle","_getIndex","num","_ajaxSettings","ajaxSettings","validator","onsubmit","submitButton","cancelSubmit","formSubmitted","currentForm","pendingRequest","focusInvalid","warn","errorList","argument","staticRules","existingRules","filtered","isContentEditable","normalizeRule","normalizeRules","classRules","attributeRules","dataRules","remote","called","blank","filled","unchecked","errorClass","pendingClass","validClass","errorElement","focusCleanup","errorContainer","errorLabelContainer","ignore","ignoreTitle","onfocusin","lastActive","unhighlight","hideThese","errorsFor","onfocusout","checkable","submitted","optional","onkeyup","elementValue","invalid","onclick","highlight","findByName","setDefaults","email","dateISO","equalTo","minlength","rangelength","autoCreateRanges","labelContainer","errorContext","valueCache","invalidHandler","checkForm","errorMap","showErrors","prepareForm","check","cleanElement","checkElement","validationTargetFor","prepareElement","testgroup","numberOfInvalids","successList","defaultShowErrors","resetForm","hideErrors","resetElements","objectLength","addWrapper","findLastActive","rulesCache","resetInternals","$element","validity","badInput","rule","normalizer","rulesCount","dependencyMismatch","formatAndAdd","customDataMessage","customMessage","findDefined","defaultMessage","theregex","toToggle","validElements","invalidElements","place","errorID","elementID","idOrName","describedBy","errorPlacement","escapeCssMeta","describer","getLength","depend","dependTypes","startRequest","stopRequest","previousValue","old","classRuleSettings","creditcard","addClassRules","normalizeAttributeRule","depends","keepRule","parameter","transformed","addMethod","errorMessage","decimalPlaces","toInt","optionDataString","originalMessage","port","pendingRequests","uaMatch","platform_match","browser","versionNumber","android","blackberry","ipad","iphone","ipod","kindle","playbook","silk","mobile","cros","mac","linux","win","desktop","chrome","opr","safari","webkit","rv","iemobile","msedge","opera","jQBrowser","arg","$event","$special","datakey","noBubble","def","dontstart","textselect","touched","dd","propagates","interactions","interaction","hijack","flatten","droppable","ia","startX","startY","originalX","originalY","available","member","unselectable","locate","$dispatch","touchHooks","touchcancel","draginit","origadd","origteardown","livekey","origType","origHandler","maybeCall","thing","ctx","isElementInDOM","ele","tipsyIDcounter","Tipsy","fixTitle","HTMLElement","getTitle","$tip","tip","getBBox","tp","actualWidth","actualHeight","shadow","shadowBlur","shadowSpread","shadowOpacity","fadeInTime","aria","$tipID","fadeOutTime","$e","toggleEnabled","elementOptions","hoverState","delayIn","leave","delayOut","binder","revalidate","pointee","metadata","autoNS","autoWE","autoNWNE","autoSWSE","autoBounds","marginNorth","marginEast","prefer","ew","boundTop","boundLeft","autoBounds2","global","noGlobal","getPrototypeOf","flat","class2type","hasOwn","fnToString","ObjectFunctionString","support","preservedScriptAttributes","src","noModule","DOMEval","doc","toType","rhtmlSuffix","isArrayLike","prevObject","even","_elem","odd","copyIsArray","deep","isReady","Ctor","globalEval","nodeValue","isXMLDoc","docElem","callbackExpect","Symbol","iterator","whitespace","rtrimCSS","bup","rcssescape","fcssescape","asCodePoint","sel","preferredDoc","pushNative","Expr","outermostContext","sortInput","hasDuplicate","documentIsHTML","rbuggyQSA","dirruns","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","booleans","rwhitespace","rcomma","rleadingCombinator","rdescend","rpseudo","ridentifier","matchExpr","TAG","ATTR","PSEUDO","CHILD","needsContext","rinputs","rheader","rquickExpr","rsibling","runescape","funescape","nonHex","unloadHandler","setDocument","inDisabledFieldset","addCombinator","els","seed","nid","newSelector","newContext","getElementsByTagName","getElementsByClassName","testContext","tokenize","toSelector","qsaError","cacheLength","markFunction","assert","createInputPseudo","createButtonPseudo","createDisabledPseudo","createPositionalPseudo","matchIndexes","subWindow","getById","getElementsByName","disconnectedMatch","cssHas","attrId","getAttributeNode","tag","sortDetached","attrHandle","duplicates","sortStable","preFilter","excess","unquoted","nodeNameSelector","expectedNodeName","operator","_argument","simple","ofType","_context","outerCache","nodeIndex","useCache","firstChild","lastChild","pseudo","setFilters","unmatched","lang","elemLang","_matchIndexes","gt","nth","radio","password","image","parseOnly","soFar","preFilters","cached","combinator","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","matcherOut","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","getText","isXML","until","truncate","rneedsContext","rsingleTag","winnow","qualifier","rootjQuery","parseHTML","rparentsprev","guaranteedUnique","parentsUntil","prevUntil","contentDocument","rnothtmlwhite","Identity","Thrower","adoptValue","reject","noValue","promise","Callbacks","createOptions","firing","memory","fired","locked","firingIndex","once","stopOnFalse","fireWith","Deferred","func","tuples","always","deferred","pipe","fns","newDefer","tuple","returned","notify","onFulfilled","onRejected","onProgress","mightThrow","notifyWith","resolveWith","process","exceptionHook","rejectWith","getErrorHook","getStackHook","stateString","when","singleValue","resolveContexts","resolveValues","updateFunc","rerrorNames","asyncError","readyException","readyList","completed","catch","readyWait","doScroll","access","chainable","emptyGet","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","acceptData","Data","uid","configurable","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","_removeData","dequeue","startLength","hooks","_queueHooks","defer","pnum","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","adjustCSS","valueParts","adjusted","maxIterations","currentValue","initial","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","wrapMap","thead","col","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","optgroup","rhtml","buildFragment","scripts","ignored","attached","fragment","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","origFn","leverageNative","isSetup","saved","isTrigger","delegateType","isImmediatePropagationStopped","handleObjIn","eventHandle","handleObj","namespaces","elemData","triggered","bindType","delegateCount","mappedTypes","origCount","removeEvent","nativeEvent","handlerQueue","delegateTarget","preDispatch","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","writable","timeStamp","isSimulated","eventPhase","charCode","pointerId","pointerType","screenX","screenY","targetTouches","toElement","focusMappedHandler","simulate","attaches","dataHolder","pointerenter","pointerleave","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","replaceWith","replaceChild","replaceAll","rnumnonpx","rcustomProp","getStyles","swap","rboxStyle","curCSS","computed","isCustomProp","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","cssShow","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","boxModelAdjustment","isBorderBox","computedVal","marginDelta","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","cssHooks","animationIterationCount","borderImageSlice","columnCount","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","orphans","widows","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity","origName","scrollboxSizeBuggy","expanded","propHooks","run","percent","eased","swing","fxNow","inProgress","rfxtypes","rrun","schedule","requestAnimationFrame","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","stopped","prefilters","startTime","specialEasing","originalProperties","gotoEnd","propFilter","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","prefilter","opt","speeds","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","fadeToggle","slow","timeout","checkOn","optSelected","radioValue","boolHook","nType","attrHooks","attrNames","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","classNames","curValue","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","rquery","parseXML","parserErrorElem","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","valueOrFunction","serializeArray","r20","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","lastModified","etag","isLocal","async","accepts","responseFields","converters","ajaxSetup","ajaxTransport","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","finalText","hasContent","ifModified","nativeStatusText","responses","isSuccess","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","conv","dataFilter","throws","ajaxConvert","getScript","firstElementChild","wrapInner","htmlIsFunction","xhrSuccessStatus","xhrSupported","cors","errorCallback","username","xhrFields","onabort","ontimeout","binary","scriptAttrs","charset","scriptCharset","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","animated","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","pageYOffset","pageXOffset","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","undelegate","fnOver","fnOut","rtrim","holdReady","hold","isNumeric","_jQuery","noConflict","NestedFormEvents","removeFields","assoc","closestChild","parentNames","parentIds","new_id","insertFields","wrapperSelector","nestedFormEvents","FUNC_ERROR_TEXT","HASH_UNDEFINED","PLACEHOLDER","WRAP_PARTIAL_FLAG","WRAP_ARY_FLAG","INFINITY","MAX_SAFE_INTEGER","NAN","MAX_ARRAY_LENGTH","wrapFlags","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","objectTag","promiseTag","regexpTag","setTag","stringTag","symbolTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reEmptyStringLeading","reEmptyStringMiddle","reEmptyStringTrailing","reEscapedHtml","reUnescapedHtml","reHasEscapedHtml","reHasUnescapedHtml","reEscape","reEvaluate","reInterpolate","reIsDeepProp","reIsPlainProp","rePropName","reRegExpChar","reHasRegExpChar","reTrimStart","reWhitespace","reWrapComment","reWrapDetails","reSplitDetails","reAsciiWord","reForbiddenIdentifierChars","reEscapeChar","reEsTemplate","reFlags","reIsBadHex","reIsBinary","reIsHostCtor","reIsOctal","reIsUint","reLatin","reNoMatch","reUnescapedString","rsAstralRange","rsComboRange","rsComboMarksRange","rsDingbatRange","rsLowerRange","rsUpperRange","rsVarRange","rsBreakRange","rsMathOpRange","rsAstral","rsBreak","rsCombo","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsZWJ","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsModifier","rsOptVar","rsSeq","rsEmoji","rsSymbol","reApos","reComboMark","reUnicode","reUnicodeWord","reHasUnicode","reHasUnicodeWord","contextProps","templateCounter","typedArrayTags","cloneableTags","stringEscapes","freeParseFloat","freeParseInt","freeGlobal","freeSelf","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","nodeIsArrayBuffer","isArrayBuffer","nodeIsDate","isDate","nodeIsMap","isMap","nodeIsRegExp","isRegExp","nodeIsSet","isSet","nodeIsTypedArray","isTypedArray","thisArg","arrayAggregator","iteratee","arrayEach","arrayEachRight","arrayEvery","predicate","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","arrayMap","arrayPush","arrayReduce","initAccum","arrayReduceRight","arraySome","asciiSize","baseProperty","baseFindKey","eachFunc","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseIndexOfWith","baseMean","baseSum","basePropertyOf","baseReduce","baseTimes","baseTrim","trimmedEndIndex","baseUnary","baseValues","cacheHas","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","deburrLetter","escapeHtmlChar","escapeStringChar","hasUnicode","mapToArray","overArg","replaceHolders","setToArray","setToPairs","stringSize","unicodeSize","stringToArray","unicodeToArray","asciiToArray","unescapeHtmlChar","runInContext","pick","arrayProto","funcProto","objectProto","coreJsData","funcToString","idCounter","maskSrcKey","IE_PROTO","nativeObjectToString","objectCtorString","oldDash","reIsNative","Buffer","Uint8Array","allocUnsafe","getPrototype","objectCreate","propertyIsEnumerable","spreadableSymbol","isConcatSpreadable","symIterator","symToStringTag","toStringTag","getNative","ctxClearTimeout","ctxNow","ctxSetTimeout","nativeCeil","nativeFloor","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","isBuffer","nativeIsFinite","nativeJoin","nativeKeys","nativeMax","nativeMin","nativeNow","nativeParseInt","nativeRandom","nativeReverse","DataView","Map","Promise","Set","WeakMap","nativeCreate","metaMap","realNames","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","symbolToString","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseCreate","isObject","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","__views__","Hash","ListCache","MapCache","SetCache","Stack","arrayLikeKeys","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","isIndex","arraySample","baseRandom","arraySampleSize","shuffleSelf","copyArray","baseClamp","arrayShuffle","assignMergeValue","baseAssignValue","assignValue","objValue","assocIndexOf","baseAggregator","baseEach","baseAssign","copyObject","baseAt","baseClone","bitmask","customizer","isDeep","isFlat","isFull","initCloneArray","getTag","isFunc","cloneBuffer","initCloneObject","getSymbolsIn","copySymbolsIn","keysIn","baseAssignIn","getSymbols","copySymbols","cloneArrayBuffer","dataView","byteOffset","byteLength","cloneDataView","cloneTypedArray","cloneRegExp","initCloneByTag","stacked","subValue","getAllKeysIn","getAllKeys","baseConformsTo","baseDelay","baseDifference","includes","isCommon","valuesLength","outer","valuesIndex","templateSettings","getMapData","LARGE_ARRAY_SIZE","createBaseEach","baseForOwn","baseEachRight","baseForOwnRight","baseEvery","baseExtremum","isSymbol","baseFilter","baseFlatten","isStrict","isFlattenable","baseFor","createBaseFor","baseForRight","baseFunctions","baseGet","castPath","toKey","baseGetAllKeys","keysFunc","symbolsFunc","baseGetTag","isOwn","unmasked","getRawTag","objectToString","baseGt","baseHas","baseHasIn","baseIntersection","othLength","othIndex","caches","seen","baseInvoke","baseIsArguments","baseIsEqual","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","isPartial","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","objLength","objStacked","othStacked","skipCtor","othValue","compared","objCtor","othCtor","equalObjects","baseIsEqualDeep","baseIsMatch","matchData","noCustomizer","srcValue","COMPARE_PARTIAL_FLAG","baseIsNative","baseIteratee","baseMatchesProperty","baseMatches","baseKeys","isPrototype","baseLt","baseMap","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","mergeFunc","safeGet","newValue","isTyped","isArrayLikeObject","toPlainObject","baseMergeDeep","baseNth","baseOrderBy","iteratees","getIteratee","comparer","objCriteria","othCriteria","ordersLength","compareAscending","compareMultiple","baseSortBy","basePickBy","baseSet","basePullAll","basePullAt","baseUnset","baseRepeat","baseRest","setToString","overRest","baseSample","baseSampleSize","baseSetData","baseSetToString","constant","baseShuffle","baseSlice","baseSome","baseSortedIndex","retHighest","low","baseSortedIndexBy","valIsNaN","valIsNull","valIsSymbol","valIsUndefined","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","setLow","baseSortedUniq","baseToNumber","baseToString","baseUniq","createSet","seenIndex","baseUpdate","updater","baseWhile","isDrop","baseWrapperValue","actions","baseXor","baseZipObject","assignFunc","valsLength","castArrayLikeObject","castFunction","stringToPath","castRest","castSlice","arrayBuffer","typedArray","valIsDefined","valIsReflexive","composeArgs","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","iterable","createCaseFirst","methodName","trailing","createCompounder","words","deburr","createCtor","thisBinding","createFind","findIndexFunc","createFlow","flatRest","funcs","prereq","thru","getFuncName","isLaziable","plant","createHybrid","partialsRight","holdersRight","argPos","ary","arity","isAry","isBind","isBindKey","isFlip","getHolder","holdersCount","countHolders","newHolders","createRecurry","arrLength","oldArray","reorder","createInverter","toIteratee","baseInverter","createMathOperation","createOver","arrayFunc","createPadding","chars","charsLength","toFinite","baseRange","createRelationalOperation","toNumber","wrapFunc","isCurry","setWrapToString","createRound","toInteger","pair","createToPairs","baseToPairs","createWrap","srcBitmask","newBitmask","isCombo","mergeData","createCurry","createPartial","createBind","customDefaultsAssignIn","customDefaultsMerge","customOmitClone","arrStacked","arrValue","otherFunc","stubArray","hasPath","hasFunc","isLength","ArrayBuffer","ctorString","isMaskable","stubFalse","otherArgs","shortOut","details","insertWrapDetails","updateWrapDetails","getWrapDetails","lastCalled","stamp","rand","memoize","quote","subString","differenceBy","differenceWith","findIndex","findLastIndex","intersectionBy","intersectionWith","pull","pullAll","pullAt","union","unionBy","unionWith","unzip","unzipWith","without","xor","xorBy","xorWith","zipWith","chain","interceptor","wrapperAt","countBy","findLast","forEachRight","groupBy","invokeMap","keyBy","sortBy","bindKey","WRAP_BIND_FLAG","debounce","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","invokeFunc","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","leadingEdge","resolver","memoized","Cache","negate","overArgs","transforms","funcsLength","partialRight","rearg","gte","isError","isInteger","isNumber","lte","iteratorToArray","toLength","isBinary","assign","assignIn","assignInWith","assignWith","propsIndex","propsLength","defaultsDeep","mergeWith","invertBy","invoke","nativeKeysIn","isProto","baseKeysIn","omit","CLONE_DEEP_FLAG","basePick","pickBy","toPairs","toPairsIn","word","capitalize","upperFirst","kebabCase","lowerCase","lowerFirst","snakeCase","startCase","upperCase","hasUnicodeWord","unicodeWords","asciiWords","attempt","bindAll","methodNames","flowRight","methodOf","mixin","overEvery","overSome","basePropertyDeep","rangeRight","augend","addend","divide","dividend","divisor","multiply","multiplicand","minuend","subtrahend","castArray","conforms","baseConforms","curry","curryRight","dropRight","dropRightWhile","dropWhile","baseFill","flatMap","flatMapDeep","flatMapDepth","flattenDeep","flattenDepth","fromPairs","functions","functionsIn","mapKeys","mapValues","matchesProperty","nthArg","omitBy","orderBy","propertyOf","pullAllBy","pullAllWith","rest","sampleSize","setWith","sortedUniq","sortedUniqBy","limit","spread","take","takeRight","takeRightWhile","takeWhile","tap","throttle","toPath","isArrLike","unary","uniq","uniqBy","uniqWith","unset","updateWith","valuesIn","zipObject","zipObjectDeep","entriesIn","extendWith","cloneDeep","cloneDeepWith","cloneWith","conformsTo","defaultTo","escapeRegExp","every","findKey","findLastKey","forIn","forInRight","forOwn","forOwnRight","inRange","baseInRange","isBoolean","isElement","isEqual","isEqualWith","isMatch","isMatchWith","isNative","isNil","isNull","isSafeInteger","isWeakMap","isWeakSet","strictLastIndexOf","maxBy","meanBy","minBy","stubObject","stubString","stubTrue","strLength","padEnd","padStart","radix","reduceRight","repeat","sample","sortedIndex","sortedIndexBy","sortedIndexOf","sortedLastIndex","sortedLastIndexBy","sortedLastIndexOf","startsWith","sumBy","isEscaping","isEvaluating","imports","importsKeys","importsValues","reDelimiters","evaluate","sourceURL","escapeValue","interpolateValue","esTemplateValue","evaluateValue","variable","toLower","toSafeInteger","toUpper","trimEnd","trimStart","omission","newEnd","unescape","eachRight","isFilter","takeName","dropName","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","getView","iterLength","takeCount","iterIndex","commit","toJSON","defineLocale","weekdays","weekdaysShort","weekdaysMin","meridiemParse","isPM","isLower","longDateFormat","LT","LTS","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","mm","hh","MM","ordinalParse","dow","doy","symbolMap","pluralForm","plurals","pluralize","withoutSuffix","isFuture","weekdaysParseExact","preparse","postformat","numberMap","suffixes","relativeTimeWithPlural","standalone","isFormat","period","lastDigit","last2Digits","meridiemHour","relativeTimeWithMutation","mutationTable","softMutation","lastNumber","monthsParseExact","plural","monthsParse","_monthsParse","shortMonthsParse","_shortMonthsParse","longMonthsParse","_longMonthsParse","processRelativeTime","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","_monthsNominativeEl","calendarEl","mom","_calendarEl","monthsShortDot","ll","lll","llll","numbersPast","numbersFuture","verbalNumber","monthsShortWithDots","monthsShortWithoutDots","weekEndings","ss","isUpper","eifelerRegelAppliesToNumber","translateSingular","relativeTimeWithSingular","translator","correctGrammaticalCase","wordKey","monthsRegex","monthsStrictRegex","monthsShortRegex","monthsShortStrictRegex","relativeTimeMr","monthsNominative","monthsSubjective","numbersNouns","numberNoun","hundred","ten","numberAsNoun","processHoursFunction","hm","startOfWeek","startOf","unix","hookCallback","utils_hooks__hooks","hasOwnProp","create_utc__createUTC","strict","createLocalOrUTC","getParsingFlags","_pf","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","parsedDateParts","valid__isValid","_isValid","flags","parsedParts","isNowValid","_d","invalidWeekday","_strict","bigHour","isFrozen","valid__createInvalid","fun","momentProperties","copyConfig","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","updateInProgress","Moment","updateOffset","isMoment","absFloor","argumentForCoercion","coercedNumber","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","deprecations","deprecateSimple","mergeConfigs","parentConfig","childConfig","Locale","addUnitAlias","shorthand","normalizeUnits","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","makeGetSet","keepTime","get_set__set","get_set__get","zeroFill","targetLength","forceSign","absNumber","zerosToFill","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","localeData","formatMoment","expandFormat","makeFormatFunction","invalidDate","replaceLongDateFormatTokens","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","regexes","addRegexToken","strictRegex","getParseRegexForToken","regexEscape","p4","addParseToken","addWeekParseToken","addTimeToArrayFromToken","_a","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInMonth","MONTHS_IN_FORMAT","defaultLocaleMonths","defaultLocaleMonthsShort","units_month__handleStrictParse","monthName","ii","llc","toLocaleLowerCase","dayOfMonth","getSetMonth","defaultMonthsShortRegex","defaultMonthsRegex","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","daysInYear","isLeapYear","parseTwoDigitYear","getSetYear","createDate","ms","createUTCDate","firstWeekOffset","fwd","dayOfYearFromWeeks","weekday","resYear","resDayOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","day_of_week__handleStrictParse","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","lowercase","matchMeridiem","_meridiemParse","_isPm","_meridiem","pos1","pos2","globalLocale","getSetHour","baseConfig","locales","normalizeLocale","loadLocale","oldLocale","_abbr","locale_locales__getSetGlobalLocale","locale_locales__getLocale","abbr","_config","parentLocale","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","configFromISO","allowTime","tzFormat","configFromStringAndFormat","configFromArray","currentDate","yearToUse","nowValue","_useUTC","currentDateArray","weekYear","weekdayOverflow","GG","local__createLocal","_week","gg","_dayOfYear","dayOfYearFromWeekInfo","_nextDay","parsedInput","stringLength","totalParsedInputLength","isPm","meridiemFixWrap","prepareConfig","tempConfig","bestMoment","scoreToBeat","currentScore","configFromStringAndArray","createFromInputFallback","configFromString","millisecond","configFromObject","configFromInput","isUTC","isObjectEmpty","prototypeMin","prototypeMax","moments","Duration","quarters","quarter","milliseconds","_milliseconds","_days","_months","_bubble","isDuration","absRound","utcOffset","offsetFromString","chunkOffset","cloneWithOffset","getDateOffset","isUtc","aspNetRegex","isoRegex","create__createDuration","diffRes","parseIso","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","add_subtract__addSubtract","isAdding","add_subtract__add","add_subtract__subtract","newLocaleData","defaultFormatUtc","addWeekYearFormatToken","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","isoWeekYear","_ordinalParse","_ordinalParseLenient","getSetDayOfMonth","getSetMinute","getSetSecond","parseMs","getSetMillisecond","momentPrototype__proto","sod","calendarFormat","asFloat","zoneDelta","wholeMonthDiff","endOf","inputString","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","getPrioritizedUnits","isoWeekday","toObject","creationData","isoWeek","isoWeeks","weekInfo","isoWeeksInYear","parseWeekday","parseIsoWeekday","keepLocalTime","localAdjust","_changeInProgress","parseZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","zone","isDSTShifted","_isDSTShifted","momentPrototype","preParsePostFormat","prototype__proto","lists__get","listMonthsImpl","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","_invalidDate","_ordinal","_relativeTime","pastFuture","_monthsShort","_monthsParseExact","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","langData","mathAbs","duration_add_subtract__addSubtract","absCeil","daysToMonths","monthsToDays","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","makeGetter","substituteTimeAgo","iso_string__abs","iso_string__toISOString","duration_prototype__proto","monthsFromDays","withSuffix","posNegDuration","duration_humanize__relativeTime","toIsoString","updateLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","myMoment","each2","Select2","AbstractSelect2","SingleSelect2","MultiSelect2","nextUid","sizer","scrollBarDimensions","KEY","ESC","SHIFT","CTRL","ALT","isArrow","isControl","isFunctionKey","DIACRITICS","clazz","resultsSelector","prepareOpts","createContainer","containerId","containerEventName","syncCssClasses","adaptContainerCssClass","containerCss","containerCssClass","elementTabIndex","killEvent","adaptDropdownCssClass","dropdownCssClass","queryCount","resultsPage","initContainer","lastpos","highlightUnderEvent","_touchEvent","clearTouchMoved","selectHighlighted","loadMoreIfNeeded","installKeyUpChangeEvent","updateResults","nextSearchTerm","initSelection","monitorSource","maximumInputLength","$template","dim","measureScrollbar","autofocus","searchInputPlaceholder","_sync","propertyObserver","cleanupJQueryElements","optionToData","equal","idKey","ajaxUrl","populateResults","populate","selectable","compound","innerContainer","sortResults","formatResultCssClass","formatResult","escapeMarkup","formatMatches","tags","placeholderOption","elm","getPlaceholder","getPlaceholderOption","createSearchChoice","splitVal","transformVal","createSearchChoicePosition","WebKitMutationObserver","MozMutationObserver","subtree","triggerSelect","triggerChange","blurOnChange","isInterfaceEnabled","enabledInterface","enableInterface","_enabled","_readonly","positionDropdown","bodyOffset","above","changeDirection","resultsListNode","$dropdown","dropHeight","$window","windowWidth","windowHeight","viewPortRight","viewportBottom","dropTop","dropLeft","enoughRoomBelow","enoughRoomAbove","dropWidth","focusSearch","dropdownAutoWidth","dropdownCss","shouldOpen","clearDropdownAlignmentPreference","opening","cid","reinsertElement","selectOnBlur","noFocus","clearSearch","externalSearch","getMaximumSelectionSize","maximumSelectionSize","ensureHighlightVisible","findHighlightableChoices","moveHighlight","choices","removeHighlight","_touchMoved","countSelectableResults","page","loadMorePadding","postprocessResults","formatLoadMore","queryNumber","lastTerm","showSearchInput","maxSelSize","checkFormatter","formatSelectionTooBig","minimumInputLength","formatInputTooShort","render","showSearch","formatInputTooLong","formatSearching","hasError","formatAjaxError","formatNoMatches","postRender","onSelect","firstOption","initContainerWidth","focusser","minimumResultsForSearch","shouldFocusInput","isFocused","elementLabel","idSuffix","openOnEnter","killEventImmediately","setPlaceholder","removed","isPlaceholderOptionSelected","updateSelection","is_match","noHighlightUpdate","countResults","oldData","added","cssClass","formatSelection","formatSelectionCssClass","ordered","selectChoice","searchContainer","keydowns","getCursorInfo","selectedChoice","resizeSearch","clearPlaceholder","getMaxSearchWidth","getVal","addSelectedChoice","tokenizer","closeOnSelect","enableChoice","enabledItem","disabledItem","setVal","getSideBorderPadding","minimumWidth","searchWidth","sideBorderPadding","fontSize","fontFamily","fontStyle","measureTextWidth","buildChangeDetails","onSortStart","onSortEnd","allowedMethods","valueMethods","propertyMethods","methodsMap","single","markup","markMatch","stripDiacritics","tokenSeparators","selectCallback","dupe","defaultEscapeMarkup","selectedObject","currentSearchTerm","msMaxTouchPoints","pageNumber","ajaxDefaults","util","quietMillis","adapter","adapted","replacements","tl","replace_map","deprecated","dataText","dataItem","childDatum","formatterName","SuperClass","previousUnderscore","breaker","ArrayProto","ObjProto","FuncProto","nativeForEach","nativeMap","nativeReduce","nativeReduceRight","nativeFilter","nativeEvery","nativeSome","nativeIndexOf","nativeLastIndexOf","nativeIsArray","nativeBind","_wrapped","collect","reduceError","foldl","inject","memo","foldr","detect","include","pluck","where","findWhere","shuffled","lookupIterator","shallow","isSorted","hasIndex","hasher","later","immediate","callNow","ran","aStack","bStack","multiline","ignoreCase","aCtor","bCtor","accum","entityMap","entityRegexes","noMatch","escapes","escaper","_chain","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","__esModule","getOwnPropertyNames","definition","globalThis","nmd","globalVar","getUserAgent","isMac","isWindows","isGecko","isiOS","isAndroid","isBlink","isMediaForcedColors","matchMedia","isMotionReduced","isRegExpUnicodePropertySupported","maxTouchPoints","isSupported","fastDiff","cmp","atomicChanges","arrayA","arrayB","changeIndexes","arr1","arr2","firstIndex","findFirstDifferenceIndex","lastIndexOld","lastIndexNew","cutAndReverse","findChangeBoundaryIndexes","newLength","changeIndexesToAtomicChanges","howMany","changeIndexesToChanges","aLength","bLength","_insert","_delete","fp","snake","EventInfo","return","spy","HEX_NUMBERS","r3","r4","crypto","getRandomValues","Uint32Array","highest","lowest","insertToPriorityArray","objects","objectToInsert","DOCUMENTATION_URL","errorName","super","processedObjects","WeakSet","getLinkToDocumentationMessage","getErrorMessage","static","documentationMessage","formatConsoleArguments","releaseDate","CKEDITOR_VERSION","_listeningTo","_emitterId","_delegations","defaultEmitterClass$1","listenTo","wasFired","stopListening","emitter","emitterInfo","eventCallbacks","emitters","_getEmitterId","_setEmitterId","emitterId","_addEventListener","eventOrInfo","eventInfo","getCallbacksForEvent","callbackArgs","_removeEventListener","delegations","destinations","passAllDestinations","fireDelegatedEvents","rethrowUnexpectedError","nameOrFunction","stopDelegating","delete","getEvents","childEventName","newEventNodes","childEvents","createEventNamespace","lists","getCallbacksListsForNamespace","callbackDefinition","_events","eventNode","callbacksLists","childCallbacksLists","fireArgs","delegatedInfo","observablePropertiesSymbol","boundObservablesSymbol","boundPropertiesSymbol","decoratedMethods","decoratedOriginal","defaultObservableClass","initObservable","oldValue","bindProperties","isStringArray","boundProperties","propertyName","bindTo","toMany","bindToMany","_observable","_bindProperties","_to","_bindings","unbindProperties","boundObservables","toObservable","toProperty","toProperties","toPropertyBindings","boundObservable","decorate","originalMethod","observable","parsedArgs","lastObservable","parseBindToArgs","bindingsKeys","numberOfBindings","updateBoundObservableProperty","toPropertyName","bindingsToObservable","updateBoundObservables","updateBindToBound","observables","observableAndAttributePairs","getBindingTargets","propertyValue","_replacedElements","newElement","restore","minLen","isIterable","Config","configurations","defaultConfigurations","define","cloneConfig","_setObjectToTarget","_setToTarget","_getFromSource","isDefine","configuration","leaveItemReferences","isNode","Document","Node","stringifiedObject","defaultEmitterClass","proxyOptions","useCapture","passive","usePassive","proxyEmitter","_getProxyEmitter","ProxyEmitter","proxyEmitters","_getAllProxyEmitters","listeningEmitter","listenedToEmitterId","listeningTo","_getEmitterListenedTo","getProxyEmitterId","_domNode","_options","_domListeners","attach","domListener","_createDomListener","removeListener","domEvt","getNodeUID","borderRightWidth","borderLeftWidth","getRangeFromMouseEvent","domEvent","domDoc","domRange","caretRangeFromPoint","rangeParent","setStart","rangeOffset","isText","isRange","getPositionedAncestor","rectProperties","_source","isSourceRange","isDomElement","rangeRects","getDomRangeRects","copyRectProperties","getBoundingRect","moveBy","getIntersection","anotherRect","newRect","getIntersectionArea","getArea","getVisible","visibleRect","isBody","absolutelyPositionedChildElement","commonAncestorContainer","isParentOverflowVisible","getElementPosition","parentElementPosition","parentRect","intersectionRect","intersectRect","toAbsoluteRect","absoluteRect","positionedAncestor","positionedElementAncestor","ancestorPosition","ancestorBorderWidths","moveX","moveY","shiftRectToCompensatePositionedAncestor","excludeScrollbarsAndBorders","scrollBarWidth","scrollBarHeight","borderWidths","clientRects","startContainer","boundingRectData","NEGATIVE_INFINITY","rectangleCount","_element","_callback","_observerInstance","_createObserver","_addElementCallback","_deleteElementCallback","_elementCallbacks","_getElementCallbacks","unobserve","ResizeObserver","HTMLTextAreaElement","insertAt","parentElement","nodeToInsert","isComment","COMMENT_NODE","getOptimalPosition","positions","limiter","fitInViewport","viewportOffsetConfig","constrainedViewportRect","viewportRect","getConstrainedViewportRect","elementRect","visibleTargetRect","getVisibleViewportIntersectionRect","bestPosition","positionOptions","targetRect","visibleLimiterRect","limiterRect","elementRectArea","positionInstances","positioningFunction","PositionObject","maxFitFactor","limiterIntersectionArea","viewportIntersectionArea","fitFactor","getBestPosition","visibleSourceRect","_positioningFunctionCoordinates","_cachedRect","_cachedAbsoluteRect","positioningFunctionOutput","_absoluteRect","_rect","scrollWindowToShowRect","alignToTop","forceScroll","viewportOffset","targetShiftedDownRect","targetShiftedUpRect","forceScrollToTop","allRectsFitInViewport","initialScrollX","initialScrollY","isAbove","isBelow","isLeftOf","isRightOf","scrollAncestorsToShowRect","getRect","ancestorOffset","limiterElement","getWindow","targetFitsInTarget","firstRect","secondRect","elementOrRange","getParentElement","getRectRelativeToWindow","relativeWindow","targetWindow","currentWindow","frameElement","frameRect","modifiersToGlyphsMac","ctrl","cmd","alt","modifiersToGlyphsNonMac","keyCodesToGlyphs","generateKnownKeyCodes","keyCodeNames","fromEntries","prettyKeyName","keystroke","splitKeystrokeText","getEnvKeyCode","getEnvKeystrokeText","keystrokeCode","modifiers","glyph","contentLanguageDirection","isLtrContent","arrowleft","arrowright","arrowup","arrowdown","keyCodes","pageup","pagedown","backspace","esc","RTL_LANGUAGE_CODES","languageCode","CKEDITOR_TRANSLATIONS","uiLanguage","uiLanguageDirection","contentLanguage","translations","acc","translation","_unifyTranslations","_t","language","normalizedTranslations","numberOfLanguages","getNumberOfLanguages","messageId","dictionary","hasTranslation","getPluralForm","_translate","_items","_itemMap","_idProperty","_bindToCollection","_bindToExternalToInternalMap","_bindToInternalToExternalMap","_skippedIndexesFromExternal","initialItemsOrOptions","hasInitialItems","idProperty","_getItemIdBeforeAdding","addMany","currentItemIndex","idOrIndex","itemOrId","getIndex","_remove","removedItems","externalCollection","Class","_setUpBindToBinding","callbackOrProperty","addItem","externalItem","isExternalBoundToThis","externalItemBound","finalIndex","itemDoesNotExist","iteratorItem","_elements","_nextEventLoopTimeout","_focus","_blur","focusedElement","_listener","keyEvtData","press","objectToMap","delayed","isInsideSurrogatePair","isLowSurrogateHalf","isInsideCombinedSymbol","EMOJI_PATTERN","buildEmojiRegexp","isInsideEmojiSequence","matchAll","flagSequence","emoji","documentPlaceholders","hasDisplayedPlaceholderDeprecationWarning","updateDocumentPlaceholders","writer","placeholders","directHostElements","wasViewModified","isDirectHost","updatePlaceholder","hostElement","getChildPlaceholderHostSubstitute","childCount","keepOnFocus","getChildren","selectionAnchor","isComposing","getChild","TypeCheckable$1","Node$2","getChildIndex","getPath","getAncestors","includeSelf","parentFirst","getCommonAncestor","ancestorsA","ancestorsB","thisPath","nodePath","_removeChildren","_fireChange","Text$1","Text","_textData","isSimilar","otherNode","_clone","TextProxy$1","textNode","offsetInText","offsetSize","_patterns","singleElement","isElementMatching","getElementName","matchName","patterns","attributeKeys","getAttributeKeys","class","matchPatterns","matchAttributes","getClassNames","matchClasses","getStyleNames","getStyle","matchStyles","valueGetter","normalizedPatterns","normalizePatterns","normalizedItems","patternKey","patternValue","itemKey","isKeyMatched","itemValue","isValueMatched","_styles","_styleProcessor","styleProcessor","setTo","inlineStyle","parsedStyles","stylesString","quoteType","propertyNameStart","propertyValueStart","stylesMap","parseInlineStyles","toNormalizedForm","propertyDescriptor","getReducedForm","nameOrObject","valueOrObject","_cleanEmptyObjectsOnPath","getNormalized","getStylesEntries","getAsString","pathParts","parentPath","parentObject","StylesProcessor","_normalizers","_extractors","_reducers","_consumables","appendStyleValue","extractor","normalizedValue","expandedStyleNames","styleNamesKeysSet","getRelatedStyles","setNormalizer","setExtractor","callbackOrPath","setReducer","setStyleRelation","shorthandName","styleNames","_mapStyleNames","alsoName","stylesObject","nameOrPath","valueToSet","Element$1","_unsafeAttributesToRender","_attrs","_children","_customProperties","attrsMap","parseAttributes","_insertChild","classString","parseClasses","stylesProcessor","hasAttribute","otherElement","getNormalizedStyle","hasStyle","findAncestor","getCustomProperty","getIdentity","shouldRenderUnsafeAttribute","childrenClone","cloned","getFillerOffset","_appendChild","normalize$3","_setAttribute","stringValue","_removeAttribute","_setStyle","_removeStyle","_setCustomProperty","_removeCustomProperty","classesSet","classesString","classArray","ContainerElement","getFillerOffset$4","EditableElement","editableElement","rootNameSymbol","RootEditableElement","rootName","_name","TreeWalker$1","boundaries","singleCharacters","ignoreElementEnd","_boundaryStartParent","_boundaryEndParent","startPosition","Position$1","_createAt","nextResult","_next","_previous","previousPosition","isAtEnd","_createAfter","_formatReturnValue","charactersCount","textLength","textProxy","isAtStart","_createBefore","startOffset","nextPosition","Position","nodeAfter","nodeBefore","endOffset","getShiftedBy","shifted","getLastMatchingPosition","treeWalker","otherPosition","compareWith","otherPath","getWalker","itemOrPosition","Range$1","Range","isCollapsed","getEnlarged","enlargeTrimSkip","getTrimmed","nodeAfterStart","nodeBeforeEnd","otherRange","containsPosition","containsRange","loose","containsStart","containsEnd","getDifference","isIntersecting","commonRangeStart","commonRangeEnd","getContainedElement","startElement","endElement","_createFromParentsAndOffsets","_createFromPositionAndShift","Selection$1","Selection","_ranges","_lastRangeBackward","_isFake","_fakeSelectionLabel","isFake","fakeSelectionLabel","rangeCount","isBackward","getFirstRange","getLastRange","getFirstPosition","firstRange","getLastPosition","lastRange","otherSelection","thisRange","numOfRangesA","getRanges","rangeA","rangeB","getSelectedElement","placeOrOffset","_setRanges","_setFakeOptions","DocumentSelection$1","fake","backward","_createIn","_createOn","setFocus","newFocus","_addRange","newRanges","isLastBackward","_pushRange","storedRange","addedRange","intersectingRange","_selection","_setTo","_setFocus","BubblingEventInfo","startRange","_eventPhase","_currentTarget","contextsSymbol","BubblingEmitterMixin","eventArgs","eventContexts","getBubblingContexts","updateEventInfo","fireListenerFor","selectedElement","isCustomContext","Boolean","getCustomContext","startParent","endParent","startPath","endPath","getDeeperRangeParent","Document$1","roots","_postFixers","getRoot","registerPostFixer","postFixer","_callPostFixers","wasFixed","AttributeElement","_priority","_id","_clonesGroup","getFillerOffset$3","getElementsWithSameId","nonUiChildrenCount","EmptyElement","getFillerOffset$2","UIElement","getFillerOffset$1","domDocument","domConverter","toDomElement","domElement","RawElement","DocumentFragment$1","normalize$2","_cloneGroups","_slotFactory","setSelection","setSelectionFocus","createText","createAttributeElement","attributeElement","renderUnsafeAttributes","createContainerElement","childrenOrOptions","createEditableElement","createEmptyElement","emptyElement","createUIElement","renderFunction","uiElement","createRawElement","rawElement","setStyle","removeStyle","setCustomProperty","removeCustomProperty","breakAttributes","positionOrRange","_breakAttributes","_breakAttributesRange","breakContainer","sourceRange","targetPosition","mergeAttributes","positionOffset","positionParent","_removeFromClonedElementsGroup","mergeTextNodes","mergeContainers","newPosition","validateNodesToInsert","nodeGroups","lastGroup","_insertNodes","rangeOrItem","validateRangeContainer","breakStart","breakEnd","parentContainer","mergePosition","walker","rangeToRemove","countBefore","_wrapPosition","viewSelection","_wrapRange","newRange","_unwrapChildren","rename","viewElement","getAttributes","clearClonedElementsGroup","groupName","createPositionAt","createPositionAfter","createPositionBefore","createRangeOn","createRangeIn","createSelection","createSlot","modeOrFilter","_registerSlotFactory","slotFactory","_clearSlotFactory","insertionPosition","getParentContainer","breakTextNode","_addToClonedElementsGroup","endPosition","_wrapChildren","wrapElement","wrapPositions","isAttribute","_wrapAttributeElement","newAttribute","offsetChange","unwrapElement","unwrapPositions","unwrapped","_unwrapAttributeElement","movePositionToTextNode","fakeElement","wrapRange","toWrap","canBeJoined","toUnwrap","forceSplitText","rangeStart","rangeEnd","isContainerOrFragment","offsetAfter","clonedNode","nodesToMove","textToMove","nodeBeforeLength","validNodesToInsert","validNode","endContainer","NBSP_FILLER","MARKED_NBSP_FILLER","dataset","ckeFiller","innerText","BR_FILLER","fillerBr","INLINE_FILLER_LENGTH","INLINE_FILLER","startsWithFiller","domNode","isInlineFiller","domText","getDataWithoutFiller","jumpOverInlineFiller","domSelection","domTarget","getSelection","getRangeAt","collapsed","domParent","domOffset","domDocuments","markedAttributes","markedChildren","markedTexts","_inlineFiller","_fakeSelectionContainer","isSelecting","markToSync","mapViewToDom","inlineFillerPosition","isInlineFillerRenderingPossible","_updateChildrenMappings","_isSelectionInInlineFiller","_removeInlineFiller","_getInlineFillerPosition","_needsInlineFillerAtSelection","domPositionToView","_updateAttrs","_updateChildren","_updateText","fillerDomPosition","viewPositionToDom","addInlineFiller","_updateFocus","_updateSelection","_clearTemporaryCustomProperties","actualDomChildren","expectedDomChildren","viewChildrenToDom","withChildren","_diffNodeLists","_findUpdateActions","areSimilarElements","insertIndex","deleteIndex","viewChild","_updateElementMappings","unbindDomElement","bindElements","firstPos","selectionPosition","domFillerNode","selectionParent","selectionOffset","isEditable","viewText","findCorrespondingDomText","expectedText","viewToDom","filler","_updateTextNode","domAttrKeys","viewAttrKeys","setDomElementAttribute","removeDomElementAttribute","previousDomNode","normalize","areTextNodes","nodesToUnbind","_markDescendantTextToSync","domToView","domChildList","fakeSelectionContainer","filterOutFakeSelectionContainer","sameNodes$1","actualDom","expectedDom","newActions","actualSlice","expectedSlice","actualText","_updateTextNodeInternal","insertData","deleteData","viewNode","_removeDomSelection","_removeFakeSelection","domRoot","_updateFakeSelection","isConnected","_updateDomSelection","createFakeSelectionContainer","bindFakeSelection","_fakeSelectionNeedsUpdate","removeAllRanges","selectNodeContents","addRange","_domSelectionNeedsUpdate","setBaseAndExtent","ELEMENT_NODE","childAtOffset","fixGeckoSelectionAfterBr","isDomSelectionCorrect","oldViewSelection","domSelectionToView","anchorNode","activeDomElement","mapDomToView","domParentOrArray","nodeAfterFiller","fillerNode","node2","actualDomChild","expectedDomChild","isBlockFiller","BR_FILLER_REF","NBSP_FILLER_REF","MARKED_NBSP_FILLER_REF","UNSAFE_ATTRIBUTE_NAME_PREFIX","UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE","renderingMode","blockFillerMode","preElements","blockElements","inlineObjectElements","unsafeElements","_domDocument","_domToViewMapping","_viewToDomMapping","_fakeSelectionMapping","_rawContentElementMatcher","_inlineObjectElementMatcher","_elementsWithTemporaryCustomProperties","viewDocumentSelection","fakeSelectionToView","bindDocumentFragments","domFragment","viewFragment","shouldRenderAttribute","attributeKey","attributeValue","elementName","setContentOf","bodyChildNodes","createTreeWalker","NodeFilter","SHOW_ELEMENT","currentNode","nextNode","getAttributeNames","_shouldRenameElement","_logUnsafeElement","_createReplacementDomElement","textData","_processDataFromViewText","viewElementOrFragment","createComment","HTMLTemplateElement","relatedViewElement","createAttribute","fillerPositionOffset","childView","_getBlockFiller","transparentRendering","tempElement","viewRangeToDom","viewRange","domStart","domEnd","setEnd","viewPosition","viewParent","domBefore","domAfter","inlineNodes","generator","_domToView","_processDomInlineNodes","domChild","_isBlockViewElement","isGeckoRestrictedDomSelection","isDomSelectionBackward","viewRanges","domRangeToView","viewStart","viewEnd","findCorrespondingViewText","viewBefore","domElementOrDocumentFragment","getHostViewElement","documentFragmentOrElement","viewEditable","domEditable","scrollPositions","forEachDomElementAncestor","_clearDomSelection","newViewSelection","isDocumentFragment","DOCUMENT_FRAGMENT_NODE","isEqualNode","hasBlockParent","isNbspBlockFiller","anchorOffset","focusNode","focusOffset","DOCUMENT_NODE","_isDomSelectionPositionCorrect","registerRawContentMatcher","registerInlineObjectMatcher","skipComments","_isInlineObjectElement","_createViewElement","_isViewElementWithRawContent","nestedInlineNodes","domChildrenToView","inlineNode","_isBlockDomElement","prevNodeEndsWithSpace","nodeEndsWithSpace","_isPreFormatted","prevNode","shouldLeftTrim","shouldRightTrim","isNextNodeInlineObjectElement","isNextNodeStartingWithSpace","_getTouchingInlineViewNode","_nodeEndsWithSpace","nextStartsWithSpace","_hasViewParentOfType","getNext","viewName","keepOriginalCase","originalDomElement","newDomElement","_isEnabled","isEnabled","checkShouldIgnoreEventFromTarget","DomEventData","additionalData","domEventType","onDomEvent","stopObserving","KeyObserver","FakeSelectionObserver","_fireSelectionChangeDoneDebounced","_handleSelectionMove","newSelection","oldSelection","_domElements","_mutationObserver","_onMutations","domMutations","mutatedTextNodes","elementsWithMutatedChildren","_isBogusBrMutation","viewChildren","newViewChildren","sameNodes","addedNode","removedNodes","addedNodes","child1","child2","FocusObserver","_renderTimeoutId","_isFocusChanging","_handleFocus","_handleBlur","_clearTimeout","selectedEditable","SelectionObserver","mutationObserver","focusObserver","_documents","_clearInfiniteLoopInterval","_documentIsSelectingInactivityTimeoutDebounced","_loopbackCounter","getObserver","_clearInfiniteLoop","endDocumentIsSelecting","_handleSelectionChange","_reportInfiniteLoop","hasDomSelection","forceRender","CompositionObserver","DataTransfer","_files","_native","nativeDataTransfer","cacheFiles","getFiles","effectAllowed","dropEffect","setDragImage","isCanceled","mozUserCancelled","kind","getAsFile","InputObserver","domTargetRanges","getTargetRanges","viewDocument","dataTransfer","targetRanges","inputType","partTargetRanges","dataPart","ArrowKeysObserver","TabObserver","domRoots","_renderer","_initialDomRootAttributes","_observers","_writer","_ongoingChange","_postFixersInProgress","_renderingDisabled","_hasChangedSinceTheLastRendering","addObserver","domSelectionCollapsed","jumpedOverAnyUiElement","nextViewPosition","newDomPosition","jumpOverUiElement","_render","attachDomRoot","viewRoot","initialDomRootAttributes","updateContenteditableAttribute","isReadOnly","detachDomRoot","getDomRoot","ObserverConstructor","disableObservers","enableObservers","scrollToTheSelection","originalArgs","currentFrame","normalizeViewportOffset","firstAncestorToScroll","isRenderingInProgress","callbackResult","_disableRendering","TypeCheckable","Node$1","getChildStartOffset","_deep","_setAttributesTo","_clearAttributes","NodeList","_nodes","maxOffset","getNode","getNodeIndex","getNodeStartOffset","indexToOffset","offsetToIndex","totalOffset","nodeList","newTarget","spliceArray","_removeNodes","indexStart","TextProxy","getNodeByPath","relativePath","parentName","normalize$1","fromJSON","_visitedParent","stickiness","prevVisitedParent","textNodeAtPosition","getTextNodeAtPosition","getNodeAfterPosition","formatReturnValue","offsetInTextNode","getNodeBeforePosition","newOffset","getParentPath","getCommonPath","diffAt","isTouching","commonLevel","checkTouchingBranch","checkOnlyZeroes","hasSameParentAs","getTransformedByOperation","operation","_getTransformedByInsertOperation","_getTransformedByMoveOperation","_getTransformedBySplitOperation","_getTransformedByMergeOperation","_getTransformedByInsertion","_getTransformedByMove","sourcePosition","movedRange","_getCombined","splitPosition","moveTargetPosition","graveyardPosition","_getTransformedByDeletion","deletionPosition","deletePosition","insertPosition","combined","graveyard","checkOnlyMaxOffset","containsItem","getJoined","shouldJoin","getMinimalFlatRanges","posParent","getTransformedByOperations","operations","newPos","moveRange","differenceSet","transformedCommon","newStart","refIndex","Mapper","_modelToViewMapping","_viewToModelMapping","_viewToModelLengthCallbacks","_markerNameToElements","_elementToMarkerNames","_deferredBindingRemovals","_unboundMarkerNames","viewContainer","modelPosition","findPositionIn","viewBlock","findMappedViewAncestor","modelParent","modelOffset","_toModelOffset","modelElement","unbindViewElement","toModelElement","markerName","unbindModelElement","toViewElement","bindElementToMarker","unbindElementFromMarkerName","nameToElements","elementToNames","flushUnboundMarkerNames","markerNames","flushDeferredBindings","clearBindings","toModelRange","toModelPosition","toViewRange","modelRange","toViewPosition","mapper","isPhantom","markerNameToElements","boundElements","registerViewToModelLength","viewElementName","lengthCallback","viewOffset","getModelLength","expectedOffset","lastLength","_moveViewPositionToTextNode","ModelConsumable","_consumable","_textProxyRegistry","_normalizeConsumableType","_getSymbolForTextProxy","consume","itemConsumables","verifyAllConsumed","eventGroup","consumables","canConsume","eventPrefix","description","startMap","endMap","_addSymbolForTextProxy","DowncastDispatcher","_conversionApi","_firedEventsMap","conversionApi","dispatcher","convertChanges","differ","markers","_createConversionApi","getRefreshedItems","getMarkersToRemove","_convertMarkerRemove","changes","_reduceChanges","getChanges","_convertInsert","_convertReinsert","_convertRemove","_convertAttribute","attributeOldValue","attributeNewValue","markerRange","getRange","_convertMarkerAdd","getMarkersToAdd","consumable","convertSelection","modelRoot","markersAtSelection","getMarkersAtPosition","_addConsumablesForSelection","marker","shouldMarkerChangeBeConverted","doNotAddConsumables","_addConsumablesForInsert","walkerValueToEventData","_testAndFire","_addConsumablesForRange","walkerValues","reconversion","getItems","getEventName","eventsFiredForConversion","eventsFiredForItem","_testAndFireAddAttributes","refreshedItems","convertItem","convertChildren","convertAttributes","canReuseView","anyNewRange","oldRange","_replaceAllRanges","directChange","_popRange","visited","startBlock","getParentBlock$1","isStartBlockSelected","isUnvisitedTopBlock","endBlock","isEndBlockSelected","containsEntireContent","limitStartPosition","limitEndPosition","_checkRange","_removeAllRanges","isUnvisitedBlock","schema","isTopBlockInRange","hasParentLimit","isLimit","parentBlock","findAncestorBlock","bindWithDocument$1","toRange","isDocumentOperation","transform$2","_createFromRanges","boundariesChanged","contentChanged","doesOperationChangeRangeContent","storePrefix","DocumentSelection","LiveSelection","hasOwnRange","isGravityOverridden","getSelectedBlocks","updateMarkers","_updateAttributes","observeMarkers","prefixOrName","_getStoredAttributes","getStoredAttributes","_overrideGravity","overrideGravity","_restoreGravity","restoreGravity","_model","_document","_attributePriority","_selectionRestorePosition","_hasChangedRange","_overriddenGravityRegister","_observedMarkers","_fixGraveyardSelection","_validateSelectionRanges","_updateMarker","batch","changeParent","enqueueChange","storedAttributes","clearAttributesStoredInElement","_getDefaultRange","overrideUid","liveRange","_prepareRange","_validateSelectionRange","fromRange","markerGroup","selectionRange","oldMarkers","hasMarker","contained","clearAll","newAttributes","_getSurroundingAttributes","oldAttributes","oldKey","realKey","getTextAttributes","getNearestSelectionRange","checkAttribute","getAttributeProperties","copyFromObject","ConversionHelpers","_dispatchers","dispatchers","conversionHelper","DowncastHelpers","elementToElement","normalizeModelElementConfig","normalizeToElementConfig","elementCreator","consumer","defaultConsumer","preflight","reinsertOrConvertNodes","insertElement","createConsumer","converterPriority","createChangeReducer","downcastElementToElement","elementToStructure","checkChild","slotsMap","slot","createSlotFactory","childrenInSlots","uniqueChildrenInSlots","validateSlotsChildren","toViewPositionMapping","currentSlot","currentSlotNodes","fillSlots","downcastElementToStructure","attributeToElement","modelValue","getFromAttributeCreator","oldViewElement","newViewElement","viewWriter","downcastAttributeToElement","attributeToAttribute","normalizeToAttributeConfig","attributeCreator","oldAttribute","downcastAttributeToAttribute","markerToElement","viewStartElement","viewEndElement","downcastMarkerToElement","markerToHighlight","highlightDescriptor","descriptor","prepareDescriptor","createViewElementFromHighlightDescriptor","rangeAfterWrap","addHighlightCallback","highlightElement","viewHighlightElement","removeHighlightCallback","downcastMarkerToHighlight","markerToData","viewCreator","viewMarkerData","handleMarkerBoundary","viewData","removeMarkerFromAttribute","removeMarkerData","downcastMarkerToData","isStart","elementAfter","elementBefore","insertMarkerAsAttribute","insertMarkerAsElement","viewElementType","modelData","viewElementDefinition","DEFAULT_PRIORITY","createViewElementFromDefinition","modelAttributeValue","shouldReplace","createChangeReducerCallback","reducedChanges","reconvertedElements","changeIndex","positionRelation","modelNodes","modelChildNode","reinsertNode","modelNode","viewChildNode","autoParagraphEmptyRoots","getRoots","isParagraphable","nodeOrType","createContext","wrapInParagraph","paragraph","UpcastHelpers","upcastElementToElement","elementToAttribute","normalizeModelAttributeConfig","converter","prepareToAttributeConverter","getViewElementNameFromConfig","upcastElementToAttribute","viewKey","normalized","normalizeViewAttributeKeyValueConfig","upcastAttributeToAttribute","elementToMarker","normalizeElementToMarkerModelConfig","upcastElementToMarker","dataToMarker","normalizedConfig","converterStart","prepareToElementConverter","normalizeDataToMarkerConfig","converterEnd","basePriority","maxPriority","priorityFactor","attrName","addMarkerElements","markerViewNames","markerViewName","modelCursor","viewItem","upcastAttributeToMarker","upcastDataToMarker","viewConfig","matcherResult","getModelElement","safeInsert","updateConversionResult","viewAttributeKeyToCopy","defaultModelValue","configToTest","onlyViewNameIsDefined","modelKey","attributeWasSet","modelAttribute","setAttributeOn","tryFixingRange","nearestSelectionRange","ancestorObject","fixedPosition","tryFixingCollapsedRange","isTextAllowedOnStart","isTextAllowedOnEnd","startLimitElement","getLimitElement","endLimitElement","startIsOnBlock","endIsOnBlock","checkSelectionOnNonLimitElements","fixedStart","isSelectable","fixedEnd","isStartInLimit","isEndInLimit","bothInSameParent","expandStart","expandEnd","findOutermostLimitAncestor","tryFixingNonCollapsedRage","startingNode","isLimitNode","EditingController","downcastDispatcher","modelSelection","convertSelectionChange","correctedRange","modelEnd","brokenPosition","reconvertMarker","markerOrName","currentMarker","reconvertItem","_refreshItem","ViewConsumable","elementConsumables","ViewElementConsumables","consumablesFromElement","createFrom","CONSUMABLE_TYPES","_canConsumeName","_add","_test","_consume","consumableName","toConsume","Schema","_sourceDefinitions","_attributeProperties","_customChildChecks","_customAttributeChecks","_genericCheckSymbol","_compiledDefinitions","SchemaContext","getDefinition","register","itemName","_clearCache","getDefinitions","_compile","isRegistered","isContent","_checkContextMatch","isAllowed","_evaluateAttributeChecks","allowAttributes","checkMerge","positionOrBaseElement","elementToMerge","addChildCheck","checks","addAttributeCheck","setAttributeProperties","selectionOrRangeOrPosition","rangeCommonAncestor","checkAttributeInSelection","convertToMinimalFlatRanges","_getValidRangesForRange","backwardWalker","forwardWalker","limitElement","combineWalkers","findAllowedParent","setAllowedAttributes","removeDisallowedAttributes","removeDisallowedAttributeFromNode","positionsInRange","getPositions","getAttributesWithProperty","attributeProperties","definitions","sourceRules","itemNames","compileBaseItemRule","propagateAllowIn","propagateAllowChildren","propagateDisallowIn","propagateDisallowChildren","resolveDisallows","compileAllowContentOf","compileAllowWhere","compileAllowAttributesOf","compileInheritPropertiesFrom","finalDefinitions","allowIn","allowChildren","compileDefinitions","parentItem","_evaluateChildChecks","parentItemDefinition","parentContext","trimLast","genericChecks","childChecks","findOptimalInsertionRange","firstBlock","positionAfter","mapContextItem","getNames","sourceItemRules","itemRule","disallowIn","disallowChildren","allowContentOf","allowWhere","disallowAttributes","allowAttributesOf","inheritTypesFrom","sourceItemRule","typeNames","copyTypes","copyProperty","inheritFrom","inheritAllFrom","resolveInheritAll","childName","childItem","allowContentOfItemName","baseItem","allowWhereItemName","allowAttributeOfItemName","inheritPropertiesOfItemName","ctxItem","UpcastDispatcher","_splitParts","_cursorParents","_modelCursor","_emptyElementsToKeep","store","_convertItem","positionOrElement","_convertChildren","_safeInsert","_updateConversionResult","splitToAllowedParent","_splitToAllowedParent","getSplitParts","_getSplitParts","keepEmptyElement","_keepEmptyElement","contextDefinition","createContextTree","documentFragment","_removeEmptyElements","modelItem","markerElements","markerElement","currentPosition","extractMarkersFromModelFragment","elementOrModelCursor","nextModelCursor","splitResult","savedCursorParent","allowedParent","treeWalkerValue","originalPart","splitPart","_registerSplitPair","cursorParent","anyRemoved","BasicHtmlWriter","getHtml","domParser","htmlWriter","toData","toView","_toDom","useFillerType","DataController","upcastDispatcher","htmlProcessor","processor","_viewWriter","isUndoable","_checkIfRootsExists","ignoreWhitespaces","modelElementOrFragment","viewDocumentFragment","elementRange","isMarkerCollapsed","isMarkerAtElementBoundary","updatedMarkerRange","localeCompare","_getMarkersRelativeToElement","initialData","batchType","removeSelectionAttribute","addStyleProcessorRules","rootNames","Conversion","_helpers","_downcast","_upcast","downcastDispatchers","upcastDispatchers","_createConversionHelpers","isDowncast","addAlias","for","_getAllUpcastDefinitions","upcastAlso","_getUpcastDefinition","upcastAlsoItem","Operation","baseVersion","_validate","__className","normalizedNodes","_normalizeNodes","_splitNodeAtPosition","_mergeNodesAtIndex","_haveSameAttributes","mergedNode","offsetDiff","firstPart","secondPart","nodeA","nodeB","iteratorA","iteratorB","MoveOperation","affectedSelectable","getMovedRangeStart","getReversed","newTargetPosition","sourceElement","targetElement","sourceOffset","_execute","InsertOperation","shouldReceiveAttributes","gyPosition","originalNodes","SplitOperation","MergeOperation","splitElement","mergedElement","MarkerOperation","affectsData","_markers","_set","AttributeOperation","NoOperation","RenameOperation","oldName","RootAttributeOperation","RootOperation","isAdd","createRoot","_isAttached","OperationFactory","transformations","setTransformation","OperationA","OperationB","transformationFunction","aGroup","noUpdateTransformation","transform$1","getTransformation","transformSets","operationsA","operationsB","contextFactory","ContextFactory","useRelations","forceWeakRemove","setOriginalOperations","originalOperations","nextTransformIndex","nextBaseVersionA","nextBaseVersionB","originalOperationsACount","originalOperationsBCount","opA","indexB","opB","newOpsA","newOpsB","updateRelation","newOpA","padWithNoOps","brokenOperationsACount","brokenOperationsBCount","updateBaseVersions","_history","_useRelations","_forceWeakRemove","_relations","takeFrom","originalOperation","_setRelation","affectedLeft","affectedRight","side","wasInLeftElement","wasStartBeforeMergedElement","wasEndBeforeMergedElement","wasInRightElement","aIsStrong","aWasUndone","_wasUndone","bWasUndone","abRelation","_getRelation","baRelation","originalOp","wasUndone","isUndoneOperation","origB","undoneB","getUndoneOperation","origA","relationsA","relation","_getComplementaryAttributeOperations","insertOperation","insertValue","_moveTargetIntoMovedRange","_makeMoveOperationsFromRanges","moveOp","_breakRangeByMoveOperation","aNewRange","aToGraveyard","bToGraveyard","removedRange","mergeInside","mergeSplittingElement","aCompB","shouldSpread","rightRange","movesGraveyardElement","gyMoveSource","splitNodesMoveSource","gyMoveTarget","gyMove","splitNodesMoveTargetPath","splitNodesMoveTarget","splitNodesMove","extraRename","splitPath","getInsertionPosition","additionalSplit","rangeToMove","gyElementMoved","newParentPosition","newTargetPath","splitAtTarget","howManyRemoved","aInGraveyard","bInGraveyard","newPositionPath","bindWithDocument","toPosition","oldPosition","Batch","isUndo","isTyping","addOperation","Differ","_markerCollection","_changesInElement","_elementsSnapshots","_elementChildrenSnapshots","_elementState","_changedMarkers","_changedRoots","_changeCount","_cachedChanges","_cachedChangesWithGraveyard","_refreshedItems","markerCollection","bufferOperation","operationToBuffer","_isInInsertedElement","_markInsert","_markAttribute","sourceParentInserted","targetParentInserted","_markRemove","_setElementState","getMarkersIntersectingRange","markerData","bufferMarkerChange","graveyardParent","mergedIntoElement","_isLoaded","_bufferRootStateChange","_bufferRootAttributeChange","oldMarkerData","newMarkerData","buffered","getChangedMarkers","hasDataChanges","markerAdded","markerRemoved","markerChanged","includeChangesInGraveyard","diffSet","childrenBefore","childrenAfter","_getChildrenSnapshots","diffInstructions","_generateDiffInstructionsFromChanges","instruction","_getDiffActionForNode","childSnapshotBefore","diffItem","_getInsertDiff","_getRemoveDiff","beforeAttributes","afterAttributes","diffItems","_getAttributesDiff","changeCount","prevIndex","prevDiff","thisDiff","isConsecutiveTextRemove","isConsecutiveTextAdd","isConsecutiveAttributeChange","_changesInGraveyardFilter","getChangedRoots","_bufferRootLoad","attrEntry","changeItem","_markChange","_removeAllNestedChanges","_makeSnapshots","_getChangesForElement","_handleChange","currentStatePriority","_statesPriority","diffItemType","childrenSnapshots","snapshot","inc","nodesToHandle","incEnd","oldEnd","intersectionLength","howManyAfter","attributePart","elementSnapshot","elementSnapshotBefore","_getSingleNodeSnapshot","snapshots","oldChildrenLength","oldChildrenHandled","posInGy","rangeInGy","History","_operations","_undoPairs","_undoneOperations","_baseVersionToOperationIndex","_version","_gaps","lastOperation","historyVersion","getOperations","fromBaseVersion","toBaseVersion","firstOperation","inclusiveTo","gapFrom","gapTo","toIndex","getOperation","operationIndex","setOperationAsUndone","undoneOperation","undoingOperation","isUndoingOperation","RootElement","graveyardName","_hasSelectionChangedFromTheLastChangeBlock","removeMarker","getRootNames","includeDetached","_handleChangeBlock","_hasDocumentChangedFromTheLastChangeBlock","_getDefaultRoot","defaultRoot","createPositionFromPath","validateTextNodePosition","rangeBoundary","MarkerCollection","Marker","managedUsingOperations","oldMarker","hasChanged","_attachLiveRange","_managedUsingOperations","_affectsData","_destroyMarker","_detachLiveRange","_liveRange","getStart","getEnd","DetachOperation","DocumentFragment","Writer","cloneElement","_assertWriterUsedCorrectly","isSameTree","applyOperation","rangeRootPosition","usingOperation","updateMarker","addMarker","insertText","itemOrPositionOrOffset","appendText","appendElement","itemOrRange","setAttributeOnRange","setAttributeOnItem","setAttributes","clearAttributes","removeAttributesFromItem","_addOperationForAffectedMarkers","applyRemoveOperation","_merge","_mergeDetached","renameOperation","firstSplitElement","firstCopyElement","elementOrString","shiftedRange","applyMarkerOperation","hasUsingOperationDefined","affectsDataDefined","currentRange","updatedRange","addRoot","detachRoot","rootOrName","setSelectionAttribute","keyOrObjectOrIterable","_setSelectionAttribute","keyOrIterableOfKeys","_removeSelectionAttribute","overrideSelectionGravity","restoreSelectionGravity","storeKey","_getStoreAttributeKey","_currentWriter","isAffected","affectedInLeftElement","affectedInRightElement","affectedAfterLeftElement","affectedBeforeRightElement","valueBefore","valueAfter","lastSplitPosition","rootA","rootB","deleteContent","selRange","doNotResetEntireContent","shouldEntireContentBeReplacedWithParagraph","insertParagraph","replaceEntireContentWithParagraph","attributesForAutoparagraph","doNotAutoparagraph","ignoreMarkers","getParentBlock","modifySelection","newEndPosition","skippedRange","fromPosition","getLivePositionsForSelectedBlocks","leaveUnmerged","checkShouldMerge","startAncestor","endAncestor","positionA","positionB","getAncestorsJustBelowCommonAncestor","mergeBranchesRight","mergeBranchesLeft","mergeBranches","collapseSelectionAt","isTextAllowed","isParagraphAllowed","shouldAutoparagraph","commonAncestor","parentToRemove","mergeRight","leftPos","rightPos","rangeToCheck","isCrossingLimitElement","removeRangeContent","parentsToCheck","itemRange","parentToCheck","removeRange","Insertion","canMergeWith","_documentFragment","_documentFragmentPosition","_firstNode","_lastNode","_lastAutoParagraph","_filterAttributesOf","_affectedStart","_affectedEnd","_nodeToSelect","handleNodes","_handleNode","_insertPartialFragment","_updateLastNodeFromAutoParagraph","_mergeOnRight","positionAfterLastNode","positionAfterNode","_setAffectedBoundaries","getSelectionRange","getAffectedRange","_checkAndSplitToAllowedPosition","_appendToFragment","_handleDisallowedNode","livePosition","_mergeOnLeft","_canMergeLeft","mergePosLeft","_canMergeRight","mergePosRight","_insertAutoParagraph","allowedIn","_getAllowedIn","tempPos","contextElement","childNode","wordBoundaryCharacters","tryExtendingTo","isForward","treatEmojiAsSingleUnit","isAtNodeBoundary","isAtWordBoundary","getCorrectWordBreakPosition","getCorrectPosition","getSearchRange","searchEnd","offsetToCheck","Model","_pendingChanges","rangesToMerge","rangeIndexesToRemove","currentRangeIndex","previousRanges","previousRangeIndex","previousRange","mergedRange","mergeIntersectingRanges","selectionPostFixer","insertion","fakeMarkerElements","nodesToInsert","markersPosition","posA","posB","isAtBeginning","selectionLiveRange","markersData","isStartBoundary","elementPosition","rangeOnInsertion","affectedRange","insertContent","originalSelection","insertionSelection","findOptimalPosition","firstSelectedBlock","attributesToCopy","elementToInsert","insertionPositionParent","paragraphAttributes","nextElement","insertObject","canEditAt","_runPendingChanges","batchOrType","normalizeSelectable","getSelectedContent","frag","commonPath","commonParent","flatSubtreeRange","leftExcessRange","rangeOrElement","intersectingMarker","createBatch","createOperationFromJSON","currentBatch","callbackReturnValue","ClickObserver","removeChildren","oldElement","valueOrElement","HEX_COLOR_REGEXP","RGB_COLOR_REGEXP","RGBA_COLOR_REGEXP","HSL_COLOR_REGEXP","HSLA_COLOR_REGEXP","CSS_SHORTHAND_VALUE_REGEXP","COLOR_NAMES","lengthRegExp","PERCENTAGE_VALUE_REGEXP","repeatValues","positionValues","isPosition","attachmentValues","isAttachment","urlRegExp","isURL","getBoxSidesValues","getShorthandValues","getBoxSidesShorthandValue","attachment","addMarginRules","styleShorthand","reduced","Watchdog","crashes","_crashNumberLimit","_now","_minimumNonErrorTimePeriod","_boundErrorHandler","_listeners","crashNumberLimit","minimumNonErrorTimePeriod","reason","_handleError","_restart","_stopErrorHandling","_fire","_startErrorHandling","_shouldReactToError","filename","ErrorEvent","lineno","colno","causesRestart","_shouldRestart","_isErrorComingFromThisItem","getSubNodes","excludedProperties","subNodes","shouldNodeBeIncluded","typeOfNode","_watchdogExcluded","EventTarget","areConnectedThroughProperties","target1","target2","excludedNodes","subNodes1","subNodes2","EditorWatchdog","_editor","_lifecyclePromise","_throttledSave","_lastDocumentVersion","_elementOrData","_initUsingData","_editables","_excludedProps","Editor","watchdogConfig","_save","saveInterval","_creator","elementOrData","_destructor","editor","_item","setCreator","creator","setDestructor","destructor","existingRoots","lazyRoots","oldRootsAttributes","rootsAttributes","rootData","isLoaded","updatedConfig","extraPlugins","_watchdogInitialData","EditorWatchdogInitPlugin","_cloneEditorConfiguration","_getData","_getEditables","finally","_setExcludedProperties","commentsRepository","trackChanges","commentThreads","suggestions","rangeJSON","getCommentThreads","skipNotAttached","getSuggestions","editables","getEditableElement","_restoreCollaborationData","_restoreEditorData","_createNode","jsonNode","parsedNodes","parsedAttributes","rootElement","markerOptions","parsedCommentThreads","parsedSuggestions","commentThreadData","channelId","hasCommentThread","threadId","getCommentThread","addCommentThread","suggestionData","trackChangesEditing","hasSuggestion","getSuggestion","addSuggestionData","mainQueueId","ContextWatchdog","_watchdogs","_watchdogConfig","_contextProps","_actionQueues","ActionQueues","_contextConfig","Context","contextConfig","onEmpty","enqueue","_getWatchdog","getItemState","itemConfigurationOrItemConfigurations","itemConfigurations","watchdog","rethrowRestartEventOnce","sourceElementOrData","itemIdOrItemIds","itemIds","_onEmptyCallbacks","_queues","_activeActions","onEmptyCallback","queueId","isMainAction","queueWithAction","nonErrorQueue","elementOrArray","_disableStack","forceDisabled","forceDisable$1","clearForceDisabled","isContextPlugin","_isEnabledBasedOnSelection","canEditAtSelection","forceDisable","execute","MultiCommand","_childCommandsDefinitions","_getFirstEnabledCommand","registerChildCommand","_checkEnabled","commandDefinition","PluginCollection","_plugins","_availablePlugins","_contextPlugins","availablePlugins","contextPlugins","PluginConstructor","pluginName","pluginInstance","pluginsToRemove","pluginsSubstitutions","findAvailablePluginConstructors","processed","isPluginConstructor","requires","validatePlugins","pluginConstructors","getPluginConstructors","isPluginRemoved","pluginItem","pluginToReplace","indexInPluginConstructors","substitutePlugins","pluginInstances","loadPlugins","initPlugins","removedPlugin","getPluginName","parentPluginConstructor","missingPlugin","requiredBy","checkMissingPlugin","checkContextPlugin","checkRemovedPlugin","promises","plugin1","plugin2","editors","_contextOwner","defaultConfig","builtinPlugins","languageConfig","Plugin","_addEditor","isContextOwner","_removeEditor","_getEditorConfig","CommandCollection","_commands","commandName","commandParams","commands","EditingKeystrokeHandler","evtData","DEFAULT_CATEGORY_ID","DEFAULT_GROUP_ID","Accessibility","keystrokeInfos","isMenuBarVisible","addKeystrokeInfoCategory","navigationKeystrokes","mayRequireFn","keystrokes","addKeystrokeInfoGroup","categoryId","groupId","addKeystrokeInfos","accessibility","editing","_readOnlyLocks","defaultTranslations","enableReadOnlyMode","lockId","disableReadOnlyMode","removePlugins","readyPromise","updateSourceElement","shouldUpdateSourceElement","isSourceElementTextArea","dataToSet","_actions","hasAny","cstr","isRGB","baseHues","lightness","brightness","hexToRgba","hsvaToHslString","hsva","hsvaToHsla","equalColorObjects","tpl","hasTouched","isTouch","pointerMove","pointer","getMove","Slider","xy","toggleEvent","handleEvent","keyMove","Hue","Saturation","$isSame","$color","$hsva","$update","$parts","$css","$sliders","ColorPicker","observedAttributes","newHsva","colorModel","toHsva","attachShadow","slider","connectedCallback","defaultColor","attributeChangedCallback","_attr","_oldVal","newVal","fromAttr","oldHsva","fromHsva","rgbaToHsva","alphaHex","rgbaToHex","hsvaToRgba","HexBase","_parentElement","initialItems","_renderViewIntoCollectionParent","setParent","elementOrDocFragment","evtName","isRendered","eventListeners","_isRendered","_revertData","_renderNode","intoFragment","isApplying","revertData","_revertTemplateFromNode","isView","isTemplate","eventNameOrFunctionOrAttribute","TemplateToBinding","eventNameOrFunction","if","valueIfTrue","TemplateIfBinding","extendTemplate","isInvalid","_renderText","_renderElement","_renderAttributes","_renderElementChildren","_setUpListeners","hasTemplateBinding","_bindToObservable","getTextUpdater","domAttrValue","attrValue","attrNs","isNamespaced","valueToBind","shouldExtend","getAttributeUpdater","_renderStyleAttribute","arrayValueReducer","isFalsy","styleName","styleValue","getStyleUpdater","childIndex","isViewCollection","childRevertData","revertBindings","schemaItem","domEvtName","domSelector","activateDomEventListener","syncValueSchemaValue","templateBinding","activateAttributeListener","revertBinding","TemplateBinding","getValueSchemaValue","normalizePlainTextDefinition","normalizeTextDefinition","arrayify","normalizeListeners","normalizeAttributes","extendObjectValueArray","ext","childDef","_viewCollections","_unboundChildren","_bindTemplate","createCollection","bindTemplate","views","registerChild","deregisterChild","setTemplate","getViews","activator","contextElements","listenerOptions","composedPath","contextElementsList","keystrokeHandler","focusTracker","gridItems","numberOfColumns","getNumberOfColumns","getGridItemFocuser","getIndexToFocus","focusedElementIndex","nextIndexToFocus","getRightElementIndex","elementIndex","collectionLength","getLeftElementIndex","nextIndex","viewBox","_updateXMLContent","_colorFillPaths","presentationalAttributeNames","fillColor","ButtonLabelView","labelView","iconView","keystrokeView","_focusDelayed","ariaLabelUid","_setupLabelView","_createKeystrokeView","_getTooltipString","isOn","isToggleable","isCheckableRole","withKeystroke","focusables","keystrokeHandlerOptions","focusFirst","focusLast","isDomFocusable","_getDomFocusableItem","viewIndex","focusNext","focusPrevious","chainedFocusCycler","getCurrentFocusedView","oldCurrent","unchain","otherFocusCycler","focusableItem","focusableItemCandidate","isFocusable","DraggableViewMixin","_onDragBound","_onDrag","_onDragEndBound","_onDragEnd","_lastDraggingCoordinates","_attachListeners","_onDragStart","_attachDragListeners","_detachDragListeners","_isHandleElementPressed","MouseEvent","isDragging","newX","newY","dragHandleElement","DialogActionsView","focusCycler","_focusTracker","_focusables","setButtons","onExecute","onCreate","_updateFocusCyclableItems","DialogContentView","toPx$6","DialogView","headerView","closeButtonView","actionsView","contentView","wasMoved","_getCurrentDomRoot","_getViewportOffset","_focusCycler","getCurrentDomRoot","getViewportOffset","isModal","_isVisible","updatePosition","_isTransparent","setupParts","hasCloseButton","actionButtons","_createCloseButton","ariaLabel","_getViewportRect","dialogRect","_getDialogRect","_moveTo","_left","_top","_moveOffScreen","domRootRect","configuredPosition","_getVisibleDomRootRect","defaultOffset","leftCoordinate","visibleDomRootRect","buttonView","_onHide","_initShowHideListeners","_initFocusToggler","_initMultiRootIntegration","_visibleDialogPlugin","changedRoots","dialogDefinition","onHide","ListItemButtonView","_checkIconHolderView","CheckIconHolderView","hasCheckSpace","_hasCheck","_watchCheckIconHolderMount","hasCheck","_checkIconView","_createCheckIconView","_watchCheckIconMount","withText","AccessibilityHelpContentView","helpLabel","_createCategories","categoryDefinition","groupDefinition","_createGroup","definitionAndDescriptionElements","keystrokeDefinition","_createGroupRow","normalizedKeystrokeDefinition","keystrokeAlternativeHTMLs","keystrokeAlternative","keystrokeToEnvKbd","accessibilityIcon","AccessibilityHelp","componentFactory","_createButton","_toggleDialog","_setupRootLabels","ButtonClass","editingView","addAriaLabelTextToRoot","newAriaLabel","BodyCollection","_bodyCollectionContainer","bodyCollectionContainer","attachToDom","detachFromDom","childElementCount","toggleSwitchView","_createToggleView","FileDialogListItemButtonView","FileDialogViewMixin","_fileInputView","FileInputView","dropdownArrowIcon","normalizeSingleColorDefinition","hasBorder","ColorTileView","ColorGridView","colorDefinitions","viewStyleAttribute","gridTemplateColumns","colorTile","selectedColor","convertColor","outputFormat","colorObject","parseColorString","parsedColor","toColorSpace","formatColorOutput","hexValue","parsedHex","fieldView","statusView","fieldWrapperChildren","viewUid","statusUid","_createLabelView","_createStatusView","errorText","infoText","InputBase","_updateIsEmpty","_setDomElementValue","InputView","inputmode","DropdownPanelView","selectstart","dropdownPanel","panelView","listView","toolbarView","menuView","panelPosition","optimalPanelPosition","_getOptimalPosition","_panelPositions","closeDropdown","south","north","southEast","southWest","northEast","northWest","southMiddleEast","southMiddleWest","northMiddleEast","northMiddleWest","defaultPanelPositions","buttonRect","panelRect","arrowView","_createArrowView","ListItemGroupView","nestedList","ariaLabelledBy","firstListItem","_listItemGroupToChangeListeners","_registerFocusableItemsGroup","_registerFocusableListItem","_deregisterFocusableItemsGroup","_deregisterFocusableListItem","_getOnGroupItemsChangeCallback","groupView","registeredChildIndex","groupItemsChangeCallback","toPx$5","POSITION_OFF_SCREEN","withArrow","_pinWhenIsVisibleCallback","_resizeObserver","attachTo","getDomElement","defaultPositions","southArrowNorth","southArrowNorthMiddleWest","southArrowNorthMiddleEast","southArrowNorthWest","southArrowNorthEast","northArrowSouth","northArrowSouthMiddleWest","northArrowSouthMiddleEast","northArrowSouthWest","northArrowSouthEast","viewportStickyNorth","optimalPosition","pin","unpin","_startPinning","_stopPinning","scrollTarget","isWithinScrollTarget","isLimiterWithinScrollTarget","checkVisibility","sideOffset","arrowSideOffset","heightOffset","arrowHeightOffset","stickyVerticalOffset","northWestArrowSouthWest","balloonRect","getNorthTop","northWestArrowSouthMiddleWest","northWestArrowSouth","northWestArrowSouthMiddleEast","northWestArrowSouthEast","northEastArrowSouthWest","northEastArrowSouthMiddleWest","northEastArrowSouth","northEastArrowSouthMiddleEast","northEastArrowSouthEast","southWestArrowNorthWest","getSouthTop","southWestArrowNorthMiddleWest","southWestArrowNorth","southWestArrowNorthMiddleEast","southWestArrowNorthEast","southEastArrowNorthWest","southEastArrowNorthMiddleWest","southEastArrowNorth","southEastArrowNorthMiddleEast","southEastArrowNorthEast","westArrowEast","eastArrowWest","boundaryRect","generatePositions","ToolbarSeparatorView","ToolbarLineBreakView","removeItems","predefinedConfigOptions","NESTED_TOOLBAR_ICONS","alignLeft","bold","importExport","plus","threeVerticalDots","pilcrow","dragIndicator","itemsView","_behavior","ItemsView","isRtl","shouldGroupWhenFull","isFloating","DynamicGrouping","StaticLayout","fillFromConfig","itemsOrConfig","_buildItemsFromConfig","normalizedRemoveItems","_cleanItemsConfiguration","_createNestedToolbarDropdown","filteredItems","_cleanSeparatorsAndLineBreaks","nonSeparatorPredicate","firstCommandItemIndex","lastCommandItemIndex","dropdownView","viewFocusables","viewItemsView","viewFocusTracker","viewLocale","ungroupedItems","groupedItems","groupedItemsDropdown","resizeObserver","cachedPadding","shouldUpdateGroupingOnNextResize","_createGroupedItemsDropdown","changeData","removedItem","currentIndex","addedItem","_updateGrouping","_enableGroupingOnResize","_enableGroupingOnMaxWidthChange","initialGroupedItemsCount","wereItemsGrouped","_areItemsOverflowing","_groupLastItem","_ungroupFirstItem","lastChildRect","toolbarRect","computedStyle","paddingProperty","previousWidth","contentRect","actionView","actionButton","_createActionView","ButtonClassOrInstance","closeDropdownOnClickOutside","closeDropdownOnExecute","closeDropdownOnBlur","focusDropdownContentsOnArrows","focusDropdownButtonOnClose","focusDropdownPanelOnOpen","addDefaultBehaviors","buttonsOrCallback","addToolbarToOpenDropdown","enableActiveItemFocusOnDropdownOpen","isCompact","itemsOrCallback","addListToOpenDropdown","bindViewCollectionItemsToDefinitions","childSelectorCallback","childToFocus","listItems","listItemButtons","hasAnyCheckboxOnList","listItemView","labeledFieldView","inputView","ariaDescribedById","ColorPickerView","hexInputRow","_debounceColorPickerEvent","_hexColor","_createInputRow","hideInput","convertColorToCommonHexFormat","picker","customElements","_createSlidersView","styleSheetForFocusedColorPicker","shadowRoot","slidersView","SliderView","colorInput","_createColorInput","ColorPickerInputRowView","labeledInput","pickerColor","inputValue","maybeHexColor","tryParseHexColor","resetValidationStatus","getParsedColor","inputColor","convertToHex","HashView","hashLessColor","DocumentColorCollection","hasColor","ColorGridsFragmentView","documentColors","documentColorsCount","staticColorsGrid","documentColorsGrid","colorPickerButtonView","removeColorButtonView","_documentColorsLabel","_removeButtonLabel","_colorPickerLabel","removeButtonLabel","documentColorsLabel","colorPickerLabel","_createRemoveColorButton","updateDocumentColors","maxCount","_addColorToDocumentColors","updateSelectedColors","_createStaticColorsGrid","_createDocumentColorsGrid","_createColorPickerButton","_addColorSelectorElementsToFocusTracker","addColorPickerButton","colorGrid","colorObj","predefinedColor","ColorPickerFragmentView","colorPickerView","saveButtonView","cancelButtonView","actionBarView","_colorPickerViewConfig","colorPickerViewConfig","_createActionButtons","_createActionBarView","_addColorPickersElementsToFocusTracker","_stopPropagationOnArrowsKeys","_executeOnEnterPress","_executeUponColorChange","actionBarRow","colorGridsFragmentView","colorPickerFragmentView","appendUI","_appendColorGridsFragment","_appendColorPickerFragment","showColorPickerFragment","_isColorPickerFragmentVisible","_isColorGridsFragmentVisible","showColorGridsFragment","ComponentFactory","_components","originalName","BALLOON_CLASS","TooltipManager","tooltipTextView","balloonPanelView","_currentElementWithTooltip","_currentTooltipPosition","_pinTooltipDebounced","_unpinTooltipDebounced","_editors","_instance","attributeFilter","createMutationObserver","_updateTooltipPosition","_pinTooltip","_unpinTooltip","_onKeyDown","_onEnterOrFocus","_onLeaveOrBlur","_onScroll","editorBodyViewCollection","defaultBalloonPositions","elementWithTooltipAttribute","getDescendantWithTooltip","getTooltipData","balloonElement","isEnteringBalloon","isLeavingBalloon","descendantWithTooltip","relatedDescendantWithTooltip","targetDomElement","bodyViewCollection","getPositioningFunctions","tooltipData","ckeTooltipText","ckeTooltipPosition","ckeTooltipClass","PoweredBy","_balloonView","_showBalloonThrottled","_lastFocusedEditableElement","_showBalloon","_handleEditorReady","balloon","oldTokenCheck","decryptedData","atob","splittedDecryptedData","firstElement","secondElement","decryptedSecondElement","monthIndex","verifyLicense","_updateLastFocusedEditableElement","_hideBalloon","_createBalloonView","poweredByConfig","getNormalizedConfig","PoweredByView","attachOptions","focusedEditableElement","getLowerCornerPosition","rootRect","getLowerRightCornerPosition","getLowerLeftCornerPosition","getBalloonAttachOptions","editableEditorElements","getEditableElementsNames","isColorInherited","ICON_WIDTH","ICON_HEIGHT","getBalloonLeft","visibleEditableElementRect","editableElementRect","balloonTop","balloonLeft","newBalloonPositionVisibleRect","userConfig","AriaLiveAnnouncerPoliteness","POLITE","ASSERTIVE","AriaLiveAnnouncer","politeness","announce","announcement","AriaLiveAnnouncerView","isUnsafeHTML","politenessRegionView","regionViews","AriaLiveAnnouncerRegionView","_domConverter","_pruneAnnouncementsInterval","_listElement","messageListItem","parentMenuView","MenuBarBehaviors","toggleMenusAndFocusItemsOnHover","menuBarView","isFocusBorderEnabled","pathLeaf","isListItemContainingMenu","focusCycleMenusOnArrows","isContentRTL","cycleTopLevelMenus","currentMenuView","isCurrentMenuViewOpen","menusCount","menuViewToOpen","closeMenusWhenTheBarCloses","closeMenuWhenAnotherOnTheSameLevelOpens","closeOnClickOutside","enableFocusHighlightOnInteraction","isKeyPressed","MenuBarMenuBehaviors","openAndFocusPanelOnArrowDownKey","openOnArrowRightKey","openOnButtonClick","toggleOnButtonClick","openAndFocusOnEnterKeyPress","closeOnArrowLeftKey","closeOnEscKey","closeOnParentClose","MenuBarMenuViewPanelPositioningFunctions","eastSouth","eastNorth","westSouth","westNorth","DefaultMenuBarItems","menuId","processMenuBarConfig","extraItems","configClone","handleAdditions","originalConfig","itemsToBeRemoved","successfullyRemovedItems","walkConfigMenus","menuDefinition","getIdFromGroupItem","menuBarConfig","handleRemovals","isItemUnavailable","isUsingDefaultConfig","parentMenuConfig","componentName","purgeUnavailableComponents","purgeEmptyMenus","localizedCategoryLabels","localizeMenuLabels","successFullyAddedItems","itemToAdd","relativeId","getRelativeIdFromPosition","topLevelMenuDefinitionIndex","addMenuOrItemToGroup","isMenuBarMenuGroupAddition","relativeGroupIndex","addedItemConfig","itemOrMenuToAdd","wasAdded","groupItems","relativeItemIndex","groupItem","wasSubMenuPurged","warnAboutEmptyMenu","isMenuDefinition","emptyMenuConfig","topLevelMenuDefinition","walk","tooltipManager","poweredBy","ariaLiveAnnouncer","_editableElementsMap","_focusableToolbarDefinitions","_extraMenuBarElements","_lastFocusedForeignElement","_readViewportOffsetFromConfig","_bindBodyCollectionWithFocusTracker","_handleScrollToTheSelection","_initFocusTracking","ckeditorInstance","setEditableElement","setUpKeystrokeHandler","removeEditableElement","addToolbar","extendMenuBar","_editableElements","editorUI","_initMenuBar","menuBarViewElement","normalizedMenuBarConfig","configObject","normalizeMenuBarConfig","_saveLastFocusedForeignElement","legacyOffsetConfig","candidateDefinitions","currentFocusedToolbarDefinition","_getCurrentFocusedToolbarDefinition","_getFocusableCandidateToolbarDefinitions","candidateDefinition","_focusFocusableCandidateToolbar","afterBlur","focusedToolbarDef","toolbarDef","beforeFocus","defA","defB","getToolbarDefinitionWeight","candidateToolbarDefinition","configuredViewportOffset","isContextual","BoxedEditorUIView","_voiceLabelView","_createVoiceLabel","voiceLabel","EditableUIView","_editingView","_editableElement","_hasExternalElement","_updateIsFocusedClasses","hasExternalElement","updateAfterRender","getEditableAriaLabel","editableName","existingLabel","toPx$4","positionLimiter","visibleStack","_viewToStack","_idToStack","_view","_rotatorView","_fakePanelsView","_createPanelView","hasView","stackId","_numberOfStacks","_visibleStack","singleViewMode","showStack","_showView","_singleViewMode","visibleView","_showNextStack","hideView","_getStackId","getPositionOptions","_createRotatorView","_createFakePanelsView","stacks","_showPrevStack","RotatorView","isSingleViewMode","numberOfStacks","buttonNextView","buttonPrevView","FakePanelsView","balloonClassName","showView","_createButtonView","_balloonPanelView","_addPanels","_removePanels","numberOfPanels","toPx$3","StickyPanelView","contentPanelElement","_contentPanelPlaceholder","isSticky","_contentPanelRect","checkIfShouldBeSticky","isActive","_unstick","windowRect","viewportTopOffset","visibleLimiterTop","limiterBottomOffset","stickyBottomOffset","_stickToBottomOfLimiter","_stickToTopOfAncestors","_isStickyToTheBottomOfLimiter","_stickyTopOffset","_stickyBottomOffset","_marginLeft","MenuBarMenuButtonView","MenuBarMenuPanelView","_repositionPanelOnOpen","_attachBehaviors","_propagateArrowKeystrokeEvents","_setItemsCheckSpace","hasAnyToggleableItem","listButtonView","pickListButtonMenuViewIfPresent","isNestedMenuLikeView","EVENT_NAME_DELEGATES","_setupIsOpenUpdater","topLevelCategoryMenuViews","_createMenu","topLevelCategoryMenuView","registerMenu","_createMenuItems","menuGroupDefinition","itemDefinition","menuItemView","componentView","_createMenuItemContentFromFactory","_registerMenuTree","menuBarItemsList","nonSeparatorItems","closeTimeout","supportedOptions","isDefault","alignment","normalizeAlignmentOptions","configuredOptions","normalizedOptions","isNameValid","classNameCount","allOptions","succeedingOptions","ALIGNMENT","AlignmentCommand","_canBeAligned","blocks","currentAlignment","removeAlignmentFromSelection","setAlignmentOnSelection","AlignmentEditing","optionsToConvert","shouldUseClasses","isFormatting","buildClassDefinition","buildDowncastInlineDefinition","upcastInlineDefinitions","buildUpcastInlineDefinitions","upcastCompatibilityDefinitions","buildUpcastCompatibilityDefinitions","iconsMap","AlignmentUI","localizedOptionTitles","_addButton","_addToolbarDropdown","_addMenuBarMenu","buttonAttrs","defaultIcon","ChangeBuffer","_isLocked","_batch","_changeCallback","_selectionChangeCallback","_reset","isLocked","unlock","ignoreLock","InsertTextCommand","_buffer","undoStepSize","textInsertions","resultRange","selectionAttributes","TYPING_INPUT_TYPES","TYPING_INPUT_TYPES_ANDROID","InsertTextObserver","typingInputTypes","Input","_compositionQueue","CompositionQueue","insertTextCommand","modelRanges","selectedText","rangeText","commandData","deleteSelectionContent","isComposedElement","flushComposedElements","flushDebounced","_queue","_compositionElements","commandLiveData","selectionRanges","detachLiveRange","DeleteCommand","sequence","_shouldEntireContentBeReplacedWithParagraph","_replaceEntireContentWithParagraph","_shouldReplaceFirstBlockWithParagraph","limitElementFirstChild","DELETE_WORD","DELETE_SELECTION","DELETE_BACKWARD","DELETE_FORWARD","DELETE_EVENT_TYPES","deleteContentBackward","deleteWordBackward","deleteHardLineBackward","deleteSoftLineBackward","deleteContentForward","deleteWordForward","deleteHardLineForward","deleteSoftLineForward","DeleteObserver","deleteEventSpec","selectionToRemove","shouldUseTargetRanges","pressedKeyCode","beforeInputReceived","isDeleteKeyCode","getDeleteDirection","shouldFireDeleteEvent","targetRange","enableChromeWorkaround","_undoOnBackspace","modelDocument","deleteForwardCommand","requestUndoOnBackspace","Typing","getLastTextLine","testCallback","_hasMatch","_startListening","hasMatch","_evaluateTextBeforeSelection","rangeBeforeSelection","testResult","_overrideUid","_isNextGravityRestorationSkipped","arrowRightPressed","arrowLeftPressed","contentDirection","isMovementHandled","_handleForwardMovement","_handleBackwardMovement","_isGravityOverridden","isBetweenDifferentAttributes","_enableClickingAfterNode","_enableInsertContentSelectionAttributesFixer","_handleDeleteContentAfterNode","registerAttribute","hasAnyAttribute","preventCaretMovement","clearSelectionAttributes","setSelectionAttributesFromTheNodeBefore","isStepAfterAnyAttributeBoundary","clicked","isBackspace","shouldPreserveAttributes","observedAttribute","isInlineObject","attrBefore","attrAfter","buildQuotesRegExp","quoteCharacter","lookBack","lastNode","AttributeCommand","_getValueFromFirstAllowedNode","forceValue","getValidRanges","BOLD$1","BoldEditing","copyOnEnter","getButtonCreator","BOLD","BoldUI","createButton","ITALIC$1","ItalicEditing","ITALIC","ItalicUI","STRIKETHROUGH$1","StrikethroughEditing","STRIKETHROUGH","StrikethroughUI","SUBSCRIPT$1","SubscriptEditing","SUBSCRIPT","SubscriptUI","SUPERSCRIPT$1","SuperscriptEditing","SUPERSCRIPT","SuperscriptUI","UNDERLINE$1","UnderlineEditing","UNDERLINE","UnderlineUI","getCopyOnEnterAttributes","allAttributes","EnterCommand","enterBlock","isSelectionEmpty","splitBlock","isContainedWithinOneElement","splitPos","ENTER_EVENT_TYPES","isSoft","insertLineBreak","EnterObserver","shiftPressed","enterEventSpec","ShiftEnterCommand","insertBreak","softBreakAction","anchorPos","isInsideLimitElement","breakLineElement","BlockQuoteCommand","_getValue","blocksToQuote","findQuote","checkCanBeQuoted","_applyQuote","_removeQuote","getRangesOfBlockGroups","groupRange","positionBefore","quotesToMerge","currentQuote","nextQuote","elementOrPosition","nextBlock","isBQAllowed","isBlockAllowedInBQ","BlockQuoteEditing","blockQuoteCommand","BlockQuoteUI","HighlightStack","_stack","oldTop","_insertDescriptor","newTop","compareDescriptors","oldDescriptor","newDescriptor","_removeDescriptor","classesToString","dragHandleIcon","WIDGET_CLASS_NAME","WIDGET_SELECTED_CLASS_NAME","labelOrCreator","setLabel","hasSelectionHandle","selectionHandle","addSelectionHandle","setHighlightHandling","addHighlight","TYPE_AROUND_SELECTION_ATTRIBUTE","isTypeAroundWidget","getTypeAroundFakeCaretPosition","POSSIBLE_INSERTION_POSITIONS","RETURN_ARROW_ICON_ELEMENT","PLUGIN_DISABLED_EDITING_ROOT_CLASS","WidgetTypeAround","_currentFakeCaretModelElement","_enableTypeAroundUIInjection","_enableInsertingParagraphsOnButtonClick","_enableInsertingParagraphsOnEnterKeypress","_enableInsertingParagraphsOnTypingKeystroke","_enableTypeAroundFakeCaretActivationUsingKeyboardArrows","_enableDeleteIntegration","_enableInsertContentIntegration","_enableInsertObjectIntegration","_enableDeleteContentIntegration","_insertParagraph","widgetModelElement","_listenToIfEnabled","_insertParagraphAccordingToFakeCaretPosition","typeAroundFakeCaretPosition","selectedModelElement","buttonTitles","widgetViewElement","typeAroundWrapper","wrapperDomElement","buttonTemplate","importNode","injectButtons","caretTemplate","injectFakeCaret","injectUIIntoWidget","positionToWidgetCssClass","domEventData","_handleArrowKeyPress","selectedViewElement","localizedKeyCodeDirection","isForwardArrowKeyCode","shouldStopAndPreventDefault","_handleArrowKeyPressOnSelectedWidget","_handleArrowKeyPressWhenSelectionNextToAWidget","_handleArrowKeyPressWhenNonCollapsedSelection","widgetPlugin","modelElementNextToSelection","_getObjectElementNextToSelection","_setSelectionOverElement","selectedModelNode","buttonPosition","widgetDomElement","getClosestWidgetViewElement","wasHandled","selectedModelWidget","isDeleteForward","probe","deepestEmptyRangeAncestor","deepestEmptyAncestor","getDeepestEmptyElementAncestor","documentSelection","getNearestNonInlineLimit","walkerValueType","getNearestTextPosition","_previouslySelected","_clearPreviouslySelectedWidgets","lastMarked","_onMousedown","_handleSelectionChangeOnArrowKeyPress","_preventDefaultOnArrowKeyPress","arrowUpPressed","arrowDownPressed","expandSelection","selectionWillShrink","lastRangePosition","firstRangePosition","findTextRangeFromSelection","boundaryVerticalPosition","isSingleLineRange","verticalNavigationHandler","_handleDelete","_selectFirstNestedEditable","_selectAncestorWidget","_selectBlockContent","editableOrWidgetElement","currentElement","findClosestEditableOrWidgetAncestor","clickTargetFromPoint","getElementFromMouseEvent","findTextBlockAncestor","nextTextBlock","findNextTextBlock","objectElement","isVerticalNavigation","firstPosition","lastPosition","firstSelectedNode","lastSelectedNode","objectElementNextToSelection","nodeToRemove","_toolbarDefinitions","_balloon","balloonToolbar","isWidgetSelected","_updateToolbarsVisibility","toolbarConfig","toolbarId","getRelatedElement","toolbarDefinition","itemsConfig","relatedElement","_showToolbar","_hideToolbar","maxRelatedElementDepth","deepestRelatedElement","deepestToolbarDefinition","relatedElementDepth","_isToolbarVisible","_isToolbarInBalloon","repositionContextualBalloon","getBalloonPositionData","toolbar","ClipboardObserver","handleInput","dropRange","smallPaddingElements","listElements","viewToPlainText","ClipboardMarkersUtils","_markersToCopy","_registerMarkerToCopy","_copySelectedFragmentWithMarkers","getCopiedFragment","sourceSelectionInsertedMarkers","_insertFakeMarkersIntoSelection","fakeMarkersRangesInsideRange","_removeFakeMarkersInsideElement","_pasteMarkersIntoTransformedElement","getPastedDocumentElement","pasteMarkers","_getPasteMarkersFromRangeMap","sourceFragmentFakeMarkers","_insertFakeMarkersElements","transformedElement","removedFakeMarkers","_pasteFragmentWithMarkers","copyableMarker","_forceMarkersCopy","executor","allowedActions","copyPartiallySelected","duplicateOnPaste","_isMarkerCopyable","_getMarkerClipboardConfig","_hasMarkerConfiguration","markerNamePrefix","copyableMarkers","_getCopyableMarkersFromSelection","markersInRanges","_getUniqueMarkerName","copyMarkerConfig","isInGraveyard","mappedMarkers","sortedMarkers","fakeMarker","fakeMarkersRanges","_getAllFakeMarkersFromElement","prevFakeMarker","skipAssign","foundFakeMarkers","prependFakeMarkers","appendFakeMarkers","otherFakeMarker","_setupPasteDrop","_setupCopyCut","_fireOutputTransformationEvent","clipboardMarkersUtils","contentData","fullMatch","normalizeClipboardData","modelFragment","onCopyCut","LineView","DragDropTarget","removeDropMarkerDelayed","removeDropMarker","_updateDropMarkerThrottled","_updateDropMarker","_reconvertMarkerThrottled","_dropTargetLineView","_domEmitter","_scrollables","_setupDropMarker","updateDropMarker","targetViewElement","targetViewRanges","blockMode","draggedRange","findDropTargetRange","getFinalDropRange","_createDropTargetPosition","_updateDropTargetLine","nodeParent","viewElementBefore","domElementBefore","viewElementAfter","domElementAfter","viewElementParent","domElementParent","domScrollableRect","_getScrollableRect","rectBefore","rectAfter","rectParent","parentStyle","leftClamped","rightClamped","domScrollable","findScrollableElement","getClosestMappedModelElement","targetViewPosition","targetModelPosition","findDropTargetRangeForElement","shouldIgnoreElement","endIndex","middleIndex","findElementSide","float","targetModelElement","DragDropBlockToolbar","_isBlockDragging","_handleBlockDragStart","_handleBlockDragging","_handleBlockDragEnd","elementFromPoint","DragDrop","_draggedRange","_draggingUid","_draggableElement","_clearDraggableAttributesDelayed","_clearDraggableAttributes","_blockMode","_previewContainer","_setupDragging","_setupContentInsertionIntegration","_setupClipboardInputIntegration","_setupDraggableAttributeHandling","_finalizeDragging","dragDropTarget","_prepareDraggedRange","draggedSelection","_updatePreview","getFinalDropEffect","clipboardPipeline","isMove","draggableElement","findDraggableWidget","draggableWidget","blockRange","getRangeIncludingFullySelectedParents","touchesBlockEdges","domRect","domEditablePaddingLeft","preview","parentRange","touchesStart","touchesEnd","PastePlainText","isUnformattedInlineContent","textAttributes","ClassicEditorUI","_toolbarConfig","_elementReplacer","_handleScrollToTheSelectionWithStickyPanel","replacementElement","editingRoot","_initPlaceholder","_initToolbar","_initDialogPluginIntegration","_initContextualBalloonIntegration","stickyPanel","placeholderText","evtInfo","contextualBalloon","stickyPanelHeight","newTopViewportOffset","updateBalloonPosition","scrollViewportOnPanelGettingSticky","dialogPlugin","dialogView","stickyPanelContentRect","ClassicEditorUIView","shouldToolbarGroupWhenFull","useMenuBar","ClassicEditor","isTextArea","originalSubmit","onSubmit","SelectAllCommand","scopeElement","isSelectAllScope","SELECT_ALL_KEYSTROKE","SelectAllEditing","SelectAllUI","SelectAll","BaseCommand","_createdBatches","clearStack","createdBatches","addBatch","docSelection","_restoreSelection","transformedRangeGroups","allRanges","rangeGroup","isRangeContainedByAnyOtherRange","normalizeRanges","_undo","batchToUndo","undoingBatch","operationsToUndo","operationToUndo","nextBaseVersion","historyOperations","reversedOperations","joinedRange","UndoCommand","batchIndex","RedoCommand","redoingBatch","UndoEditing","_undoCommand","_redoCommand","_batchRegistry","isRedoBatch","isUndoBatch","undoneBatch","UndoUI","localizedUndoIcon","localizedRedoIcon","_addButtonsToFactory","Icon","FontCommand","updateAttribute","FONT_SIZE","FONT_FAMILY","FONT_COLOR","FONT_BACKGROUND_COLOR","buildDefinition","modelAttributeKey","renderUpcastAttribute","styleAttr","renderDowncastElement","FontFamilyCommand","normalizeOptions$1","getOptionDefinition$1","fontDefinition","fontNames","firstFontName","cssFontNames","normalizeFontNameForCSS","generateFontPreset","fontName","FontFamilyEditing","supportAllValues","_prepareAnyValueConverters","_prepareCompatibilityConverter","fontFamilyIcon","FontFamilyUI","_getLocalizedOptions","accessibleLabel","listOptions","itemDefinitions","commandParam","_prepareListOptions$1","FontSizeCommand","normalizeOptions","attachPriority","preset","namedPresets","findPreset","numberValue","isNumericalDefinition","generatePixelPreset","getOptionDefinition","tiny","small","big","huge","styleFontSize","FontSizeEditing","presets","isRelative","maxSize","clampedSize","fontSizeIcon","FontSizeUI","_prepareListOptions","localizedTitles","Default","Tiny","Small","Big","Huge","FontColorCommand","FontColorEditing","ColorUI","dropdownLabel","componentConfig","localizedColors","localizedColorNames","Black","Grey","White","Red","Orange","Yellow","Green","Aquamarine","Turquoise","Blue","Purple","colorOption","hasColorPicker","colorPicker","dropdownContentRendered","colorSelectorView","addColorSelectorToDropdown","_undoStepBatch","contentRendered","FontColorUI","FontBackgroundColorCommand","FontBackgroundColorEditing","FontBackgroundColorUI","ParagraphCommand","checkCanBecomeParagraph","InsertParagraphCommand","_findPositionToInsertParagraph","paragraphLikeElements","HighlightCommand","highlighter","isSameHighlight","highlightStart","highlightEnd","highlightRange","HighlightEditing","_buildDefinition","HighlightUI","_addHighlighterButton","_addRemoveHighlightButton","_addDropdown","_addMenuBarButton","getIconForType","decorateButton","localized","startingHighlighter","optionsMap","retVal","splitButtonView","getActiveOption","whichHighlighter","lastExecuted","commandValue","bindToolbarIconStyleToActiveColor","HorizontalLineCommand","insertionRange","getInsertHorizontalLineParent","isHorizontalLineAllowedInParent","horizontalElement","HorizontalLineEditing","viewWrapper","toHorizontalLineWidget","HorizontalLineUI","IndentEditing","IndentUI","localizedIndentIcon","localizedOutdentIcon","_defineButton","IndentBlockCommand","_indentBehavior","indentBehavior","_isIndentationChangeAllowed","checkEnabled","blocksToChange","_getBlocksToChange","currentIndent","nextIndent","getNextIndent","isListItemBlock","IndentUsingOffset","indentAttributeValue","currentOffset","offsetToSet","IndentUsingClasses","indexStep","DEFAULT_ELEMENTS","AutomaticDecorators","_definitions","getDispatcher","getDispatcherForLinkedImage","viewFigure","linkInImage","ATTRIBUTE_WHITESPACES","EMAIL_REG_EXP","PROTOCOL_REG_EXP","DEFAULT_LINK_PROTOCOLS","LINK_KEYSTROKE","linkElement","ensureSafeUrl","allowedProtocols","urlString","protocolsList","customRegexp","isSafeUrl","isLinkableElement","addLinkProtocolIfApplicable","defaultProtocol","isProtocolNeeded","linkHasProtocol","openLink","LinkCommand","manualDecorators","automaticDecorators","restoreManualDecoratorStates","manualDecorator","_getDecoratorStateFromModel","manualDecoratorIds","truthyManualDecorators","falsyManualDecorators","linkText","extractTextFromSelection","linkRange","_updateLinkContent","allowedRanges","rangesToUpdate","_isRangeToUpdate","decoratorName","allowedRange","linkHref","rangeItems","firstNode","UnlinkCommand","linkCommand","rangesToUnlink","ManualDecorator","_createPattern","DECORATOR_AUTOMATIC","EXTERNAL_LINKS_REGEXP","LinkEditing","allowCreatingEmptyLinks","addTargetToExternalLinks","linkDecorators","decorators","localizedDecoratorsLabels","decorator","getLocalizedDecorators","retArray","normalizeDecorators","_enableAutomaticDecorators","_enableManualDecorators","highlightedElements","_enableLinkOpen","_enableSelectionAttributesFixer","_enableClipboardIntegration","automaticDecoratorDefinitions","rel","manualDecoratorDefinitions","decoratorDefinition","manualDecoratorValue","clickedElement","linkAttributes","removeLinkAttributesFromSelection","newLink","LinkFormView","urlInputView","_manualDecoratorSwitches","_validators","validators","_createUrlInput","_createManualDecoratorSwitches","_createFormChildren","getDecoratorSwitchesState","switchButton","resetFormStatus","inputMode","switches","decoratorValue","additionalButtonsView","LinkActionsView","previewButtonView","unlinkButtonView","editButtonView","_linkConfig","linkConfig","_createPreviewButton","VISUAL_SELECTION_MARKER_NAME","LinkUI","formView","_createToolbarLinkButton","_enableBalloonActivators","_createViews","_createActionsView","_createFormView","_enableUserBalloonInteractions","unlinkCommand","_addFormView","_hideUI","disableCssTransitions","_isCssTransitionsDisabled","enableCssTransitions","initializeCssTransitionDisablerMixin","parsedUrl","_closeFormView","_showUI","_getSelectedLinkElement","_areActionsVisible","_isUIVisible","_isUIInPanel","_addActionsView","_areActionsInPanel","_getBalloonPositionData","_isFormInPanel","_removeFormView","_hideFakeVisualSelection","forceVisible","_showFakeVisualSelection","_startUpdatingUI","prevSelectedLink","prevSelectionParent","getSelectionParent","selectedLink","markerViewElements","targetLink","findLinkElementAncestor","startLink","endLink","isLinkElement","URL_REG_EXP","AutoLink","_enableTypingHandling","_enableEnterHandling","_enableShiftEnterHandling","_enablePasteLinking","_expandLinkRange","_selectEntireLinks","selectedRange","selStart","selEnd","updatedSelection","watcher","isSingleSpaceAtTheEnd","getUrlAtTextEnd","linkEnd","linkStart","_applyAutoLink","enterCommand","_checkAndApplyAutoLinkOnRange","shiftEnterCommand","fullUrl","isLinkAllowedOnRange","linkIsAlreadySet","_persistAutoLink","deletePlugin","ListWalker","_startElement","_referenceIndent","_isForward","_includeSelf","_sameAttributes","_sameIndent","_lowerIndent","_higherIndent","sameAttributes","sameIndent","lowerIndent","higherIndent","nestedItems","iterateSiblingListBlocks","_getStartNode","previousNodesByIndent","previousNodeInList","nodeIndent","previousNodeIndent","ListBlocksIterable","_listHead","listHead","ListItemUid","getAllListItemBlocks","listItem","getListItemBlocks","getListItems","backwardBlocks","forwardBlocks","isFirstBlockOfListItem","listBlock","isLastBlockOfListItem","expandListBlocksToCompleteItems","withNested","allBlocks","itemBlock","sortBlocks","splitListItemBefore","mergeListItemBefore","indentBlocks","indentBy","blockIndent","removeListAttributes","isSingleListItem","firstItemId","getSelectedBlockObject","canBecomeSimpleListItem","mergeListItemIfNotLast","ListIndentCommand","_direction","indentDirection","getSelectedListBlocks","changedBlocks","referenceIndent","parentBlocks","mergedBlocks","mergedBlock","outdentBlocksWithMerge","previousItemBlock","_fireAfterExecute","siblingItem","firstNonListBlockIndex","ListCommand","_listWalkerOptions","multiLevel","selectedBlockObject","turnOff","lastBlock","itemBlocks","newIndent","outdentFollowingItems","additionalAttributes","listType","listIndent","listItemId","ListMergeCommand","shouldMergeOnBlocksContentLevel","_getMergeSubjectElements","firstIndent","lastIndent","lastElementId","nestedLastElementBlocks","lastElementAfterDelete","siblingNode","isFirstBlock","ListSplitCommand","_getStartBlock","ListUtils","expandListBlocksToCompleteList","isNumberedListType","isListView","isListItemView","createListElement","getViewElementIdForListType","getViewElementNameForListType","createListItemElement","findAndAddListHeadToMap","itemToListHead","listItemDowncastConverter","attributeNames","strategies","dataPipeline","createAttributesConsumer","findMappedViewElement","removeCustomMarkerElements","unwrapListItemBlock","strategy","canInjectMarkerIntoElement","createWrapperElement","canWrapElement","insertCustomMarkerElements","listItemIndent","currentListItem","listItemViewElement","listViewElement","setAttributeOnDowncast","wrapListItemBlock","bogusParagraphCreator","shouldUseBogusParagraph","markersToRemove","collectMarkersToRemove","viewWalker","LIST_BASE_ATTRIBUTES","ListEditing","_downcastStrategies","multiBlock","conflictPlugin","copyOnReplace","_setupDeleteIntegration","_setupEnterIntegration","_setupTabIntegration","_setupClipboardIntegration","_setupAccessibilityIntegration","outdent","_setupModelPostFixing","_setupConversion","registerDowncastStrategy","getListAttributeNames","mergeBackwardCommand","mergeForwardCommand","isLastBlock","splitCommand","getIndent$1","firstItemListType","modelToViewPositionMapper","positionAfterLastMarker","listEditing","itemsToRefresh","changedItems","doesItemBlockRequiresRefresh","collectListItemsToRefresh","itemIndent","doesItemWrappingRequiresRefresh","useBogus","isListItemElement","isListElement","modelAttributes","reconvertItemsOnDataChange","applied","innerItem","seenIds","listNodes","modelChangePostFixer$1","maxIndent","prevIndent","fixBy","fixListIndents","fixListItemIds","refItem","refType","refIndent","firstElementIndent","indentDiff","isListItem","createModelIndentPasteFixer","allContentChildren","lastItem","allChildren","createUIComponents","ListUI","LIST_STYLE_TO_LIST_TYPE","LIST_STYLE_TO_TYPE_ATTRIBUTE","TYPE_ATTRIBUTE_TO_LIST_STYLE","LIST_STYLE_TYPES","listStyle","typeAttribute","baseUrl","breaks","extensions","gfm","headerIds","headerPrefix","langPrefix","mangle","pedantic","renderer","sanitize","sanitizer","smartLists","smartypants","walkTokens","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","unescapeTest","caret","edit","getRegex","nonWordAndColonTest","originIndependentUrl","cleanUrl","prot","baseUrls","justDomain","relativeBase","resolveUrl","encodeURI","noopTest","splitCells","tableRow","curr","suffLen","currChar","checkSanitizeDeprecation","repeatString","outputLink","cap","inLink","inlineTokens","Tokenizer","newline","codeBlockStyle","fences","matchIndentToCode","indentToCode","matchIndentInNode","indentInNode","indentCodeCompensation","heading","trimmed","blockquote","blockTokens","istask","ischecked","blankLine","endsWithBlankLine","nextLine","rawLine","itemContents","endEarly","bull","isordered","itemRegex","trimLeft","nextBulletRegex","task","trimRight","spacers","hasMultipleLineBreaks","lineBreaks","lheading","inRawBlock","trimmedUrl","rtrimSlash","lastParenIndex","findClosingBracket","linkLen","_escapes","reflink","nolink","emStrong","maskedSrc","prevChar","lDelim","nextChar","punctuation","lLength","rDelim","rLength","delimTotal","midDelimTotal","endReg","rDelimAst","rDelimUnd","codespan","hasNonSpaceChars","hasSpaceCharsOnBothEnds","del","autolink","prevCapZero","_backpedal","inlineText","_paragraph","_label","bullet","listItemStart","_tag","_comment","reflinkSearch","_punctuation","blockSkip","escapedEmSt","_scheme","_email","_attribute","_href","strong","endAst","endUnd","em","_extended_email","Lexer","inlineQueue","lastToken","cutSrc","lastParagraphClipped","extTokenizer","tempSrc","tempStart","getStartIndex","errMsg","keepPrevChar","startInline","infostring","slugger","slug","listitem","tablerow","tablecell","TextRenderer","Slugger","getNextSafeSlug","originalSlug","isDryRun","occurenceAccumulator","dryrun","textRenderer","parseInline","l2","l3","itemBody","renderers","newDefaults","getDefaults","use","childTokens","hasExtensions","prevRenderer","prevTokenizer","lexInline","Renderer","cleanAttribute","Rules","_keep","blankRule","blankReplacement","keepReplacement","defaultRule","defaultReplacement","findRule","filterValue","lineBreak","hLevel","headingStyle","lastElementChild","bulletListMarker","indentedCodeBlock","fencedCodeBlock","fenceChar","fence","fenceSize","fenceInCodeRegex","horizontalRule","inlineLink","linkStyle","referenceLink","linkReferenceStyle","references","emphasis","emDelimiter","strongDelimiter","hasSiblings","isCodeBlock","extraSpace","keep","forNode","isBlank","canParse","canParseHTMLNatively","useActiveX","ActiveXObject","shouldUseActiveX","designMode","write","createHTMLParser","isHeadingRow","isPx","isListContinuation","detectListStyle","listLikeItem","listStyleRegexp","listStyleTypeRegex","listStartIndexRegex","legalStyleListRegex","multiLevelNumberFormatTypeRegex","legalStyleListMatch","multiLevelNumberFormatMatch","islegalStyleList","listStyleMatch","listStyleType","listStyleTypeMatch","bulletedStyle","listMarkerElement","textNodeOrElement","findListMarkerNode","listMarker","findBulletedListStyle","listStartIndexMatch","mapListStyleDefinition","isLegalStyleList","createNewEmptyList","hasMultiLevelListPlugin","getListItemData","idMatch","orderMatch","indentMatch","removeBulletElement","bulletMatcher","getMarginLeftNormalized","numericValue","convertCssLengthToPx","tableCell","borderCells","alignMap","tableSection","msWordMatch1","msWordMatch2","MSWordNormalizer","htmlString","_parsedData","itemLikeElements","foundMargins","findAllItemLikeElements","encounteredLists","itemLikeElement","originalListId","listElement","parentListItems","listItemElements","stackItem","transformListItemLikeElementsIntoLists","rtfData","upcastWriter","shapesIds","shapeElementsMatcher","prevSiblingName","exceptionIds","isElementAShape","hasElementGfxdataAttribute","isPreviousSiblingAShapeType","isElementIdInExceptionsArray","findAllShapesIds","imageElementsMatcher","imgs","removeAllImgElementsRepresentingShapes","shapeIds","containsMatchingImg","findSrc","insertMissingImgs","removeAllShapeElements","images","findAllImageElementsWithLocalSource","imageElements","imagesHexSources","newSrc","hexString","btoa","replaceImagesFileSourceWithInlineRepresentation","regexPictureHeader","regexPicture","imageType","extractImageDataFromRtf","replaceImagesSourceWithBase64","elementsToUnwrap","itemParent","removeMSAttributes","findSibling","isBlockViewElement","googleDocsMatch","GoogleDocsNormalizer","removeBoldWrapper","unwrapParagraphInListItem","elementsToReplace","nextSiblingIsBlock","transformBlockBrsToParagraphs","googleSheetsMatch","GoogleSheetsNormalizer","removeGoogleSheetsTag","removeXmlns","removeInvalidTableWidth","removeStyleBlock","normalizeSafariSpaceSpans","REMOVE_FORMAT","RemoveFormatUI","RemoveFormatCommand","_getFormattingItems","_getFormattingAttributes","itemHasRemovableFormatting","curRange","RemoveFormatEditing","CharacterGridView","createTile","tile","CharacterInfoView","characterToUnicodeString","codePointAt","SpecialCharactersView","categoriesView","gridView","infoView","SpecialCharactersCategoriesView","_groupNames","_dropdownView","groupNames","_setupDropdown","currentGroupName","ALL_SPECIAL_CHARACTERS_GROUP","SpecialCharactersArrows","SpecialCharactersText","SpecialCharactersMathematical","SpecialCharactersLatin","SpecialCharactersCurrency","updateNumericAttribute","createEmptyTableCell","isHeadingColumnCell","tableUtils","headingColumns","getCellLocation","ensureParagraphInTableCell","scanRowForHeadingColumns","TableWalker","_table","_startRow","_endRow","_startColumn","_endColumn","_includeAllSlots","_skipRows","_row","_rowIndex","_column","_cellIndex","_spannedCells","_nextCellAtColumn","_jumpedToStartRow","includeAllSlots","_canJumpToStartRow","_jumpToNonSpannedRowClosestToStartRow","_isOverEndRow","_isOverEndColumn","_advanceToNextRow","outValue","spanData","_getSpanned","_shouldSkipSlot","_formatOutValue","colspan","rowspan","_recordSpans","skipRow","anchorRow","anchorColumn","TableSlot","rowIsMarkedAsSkipped","rowIsBeforeStartRow","columnIsBeforeStartColumn","columnIsAfterEndColumn","rowMap","rowToUpdate","columnToUpdate","_markSpannedCell","firstRowLength","_getRowLength","rowIndex","cols","cellAnchorRow","cellAnchorColumn","tableWalker","isAnchor","cellWidth","cellHeight","getPositionBefore","downcastTable","headingRows","tableElement","figureElement","getRows","additionalSlots","asWidget","toTableWidget","downcastCell","tableSlot","cellElementName","convertParagraphInTableCell","isSingleParagraphWithoutAttributes","InsertTableCommand","validParent","defaultRows","defaultColumns","createTable","InsertRowCommand","isAnyCellSelected","getSelectionAffectedTableCells","insertAbove","affectedTableCells","rowIndexes","getRowIndexes","insertRows","copyStructureFromAbove","InsertColumnCommand","columnIndexes","getColumnIndexes","insertColumns","SplitCellCommand","selectedCells","splitCellHorizontally","splitCellVertically","cropTableToDimensions","sourceTable","cropDimensions","croppedTable","cropHeight","tableMap","sourceRow","sourceColumn","rowInCroppedTable","tableCellCopy","trimTableCellIfNeeded","addHeadingsToCroppedTable","getVerticallyOverlappingCells","overlapRow","slotInfo","splitHorizontally","splitRow","newRowspan","newCellAttributes","newCellRowSpan","newCell","getHorizontallyOverlappingCells","overlapColumn","cellsToSplit","splitVertically","splitColumn","newColspan","newCellColSpan","cellRow","cellColumn","limitRow","limitColumn","removeEmptyColumns","getColumns","columnsMap","emptyColumns","cellsCount","emptyColumn","removeColumns","removeEmptyRows","emptyRows","tableRowCount","emptyRow","removeRows","removeEmptyRowsColumns","adjustLastRowIndex","lastRowMap","lastRow","rowspanAdjustment","adjustLastColumnIndex","lastColumnMap","firstRow","colspanAdjustment","MergeCellCommand","isHorizontal","cellToMerge","_getMergeableCell","getTableCellsContainingSelection","isMergeNext","cellToExpand","cellToRemove","removedTableCellRow","isEmpty$2","mergeTableCells$1","spanAttribute","cellSpan","cellToMergeSpan","horizontalCell","hasHeadingColumns","cellOnLeft","cellOnRight","leftCellColumn","rightCellColumn","leftCellSpan","isCellOnLeftInHeadingColumn","isCellOnRightInHeadingColumn","getHorizontalCell","currentCellRowSpan","rowOfCellToMerge","mergeColumn","cellToMergeData","getVerticalCell","firstTableChild","RemoveRowCommand","firstCell","lastRowIndex","selectedRowIndexes","areAllRowsSelected","referenceCells","removedRowIndexes","columnIndexToFocus","rowsToRemove","cellToFocus","removedRowIndex","columnToFocus","getCellToFocus$1","RemoveColumnCommand","tableColumnCount","lastCell","getBoundaryCells","removedColumnIndexes","getCellToFocus","columnsToRemove","SetHeaderRowCommand","isInTable","_isInHeading","headingRowsToSet","currentHeadingRows","overlappingCells","SetHeaderColumnCommand","headingColumnsToSet","getTableColumnElements","columnGroupElement","getColumnGroupElement","TableUtils","createEmptyRows","rowsToInsert","isCopyStructure","copyStructureFrom","walkerEndRow","tableIterator","rowColSpansMap","lastCellRow","isReferenceRow","columnsToInsert","tableColumns","createCells","rowCount","indexesObject","cellsToMove","cellsToTrim","lastRowOfCell","rowSpanToSet","getCellsToMoveAndTrimOnRemoveRow","targetRowIndex","tableRowMap","previousCell","cellToMove","moveCellsToRow","updateHeadingRows","headingsRemoved","adjustHeadingColumns","removedColumnIndex","adjacentColumn","removedColumnWidth","adjacentColumnWidth","numberOfCells","newCellsSpan","updatedSpan","breakSpanEvenly","newCellsAttributes","cellsToInsert","splitCellColumn","cellsToUpdate","splitCellRow","distanceFromLastCellSpan","isOnSameColumn","rowspanToSet","createTableWalker","getSelectedTableCells","sortRanges","cellWithSelection","tableCells","_getFirstLastIndexesObject","isSelectionRectangular","selectedTableCells","_areCellInTheSameTableSection","areaOfSelectedCells","areaOfValidSelection","rowsIndexes","getBiggestRectangleArea","compareRangeOrder","allIndexesSorted","indexA","_areIndexesInSameSection","headingSectionSize","tableCellToInsert","MergeCellsCommand","firstTableCell","mergeWidth","mergeHeight","maxWidthOffset","maxHeightOffset","getMaxOffset","firstCellRow","firstCellColumn","getMergeDimensions","mergeTableCells","cellBeingMerged","targetCell","isEmpty$1","currentMaxOffset","dimensionValue","SelectRowCommand","rangesToSelect","SelectColumnCommand","startLocation","endLocation","cellInfo","fixTableCellsRowspan","maxRows","rowLimit","findCellsToTrim","fixTableRowsSizes","childrenLengths","getChildrenLengths","rowsLengths","tableSize","maxColumns","isTableAttributeEntry","fixTable","fixTableRow","fixTableCellContent","textNodes","checkTableCellChange","shouldRefresh","TableEditing","_additionalSlots","viewTable","figureView","figureChild","getViewTableFromFigure","modelTable","headRows","bodyRows","firstTheadElement","tableChild","trs","headingCols","scanTable","upcastCellSpan","analyzedTables","tableLayoutPostFixer","injectTableLayoutPostFixer","tableCellContentsPostFixer","injectTableCellParagraphPostFixer","isRowChange","expectedElementName","tableHeadingsRefreshHandler","cellsToCheck","paragraphsToRefresh","tableCellRefreshHandler","registerAdditionalSlot","slotHandler","InsertTableView","_createGridCollection","_highlightGridBoxes","boxView","_createGridButton","boxes","TableUI","isContentLtr","insertTableView","bindIsOn","_prepareDropdown","_prepareMergeSplitButtonDropdown","_fillDropdownWithListOptions","areEnabled","mergeCommandName","mergeCommand","addListOption","TableSelection","_handleDeleteContent","_handleInsertTextEvent","_defineSelectionConverter","_enablePluginDisabling","getSelectionAsFragment","adjustedLastRow","adjustedLastColumn","setCellSelection","anchorCell","cellsToSelect","_getCellsToSelect","getFocusCell","getAnchorCell","highlighted","previouslyHighlighted","clearHighlightedTableCells","lastViewCell","tableCellToSelect","rangeToSelect","selectionMap","walkerOptions","flipVertically","flipHorizontally","TableClipboard","_onCopyCut","_onInsertContent","tableSelection","pastedTable","getTableIfOnlyTableInContent","_replaceSelectedCells","pastedDimensions","shouldExpandSelection","expectedHeight","expectedWidth","tableWidth","tableHeight","expandTableSize","doVerticalSplit","doHorizontalSplit","splitCellsToRectangularSelection","prepareTableForPasting","selectionHeight","selectionWidth","_replaceSelectedCellsWithPasted","pastedWidth","pastedHeight","pastedTableLocationMap","createLocationMap","selectedTableMap","pastedRow","pastedColumn","pastedCell","cellToInsert","newTableCell","_replaceTableSlotCell","areHeadingRowsIntersectingSelection","areHeadingColumnsIntersectingSelection","newCells","contentRange","rangeBefore","rangeAfter","limitColumns","isAffectedBySelection","limitRows","TableKeyboard","_onArrowKey","_handleTabOnSelectedTable","_handleTab","bubblingEventInfo","currentRowIndex","currentCellIndex","isFirstCellInRow","isLastCellInRow","isLastRow","nextRow","previousRow","_handleArrowKeys","focusCell","_navigateFromCellInDirection","_isSelectionAtCellEdge","currentCellInfo","cellToSelect","positionToSelect","MouseEventsObserver","TableMouse","_enableShiftClickSelection","_enableMouseDragSelection","blockSelectionChange","_getModelTableCellFromDomEvent","haveSameTableParent","beganCellSelection","newTargetCell","viewTargetElement","cellA","cellB","getSelectedTableWidget","isTableWidget","getTableWidgetAncestor","editorConfig","shouldNotGroupWhenFull","_debouncedSave","_savePromise","_pendingActions","_makeImmediateSave","_action","waitingTime","_saveCallbacks","_setPendingAction","_flush","save","saveCallbacks","normalizeSizeOptions","_setupConversionUsingClasses","_setupConversionUsingOffset","indentCommand","outdentCommand","marginProperty","Paragraph","normalizers","_isTransformedWithPasteFromOffice","activeNormalizer","normalizedHtml","normalizeSpacing","bodyCloseTag","bodyCloseIndex","htmlCloseIndex","cleanContentAfterBody","htmlDocument","htmlElement","innerTextLength","normalizeSpacerunSpans","bodyString","bodyView","documentToView","styleTags","sheet","cssRules","extractStyles","parseHtml","_characters","_groups","_allSpecialCharactersGroupLabel","_createDialogButton","_getGroup","getGroups","invalidGroup","getCharactersForGroup","getCharacter","_updateGrid","characterTitles","_createDropdownPanelContent","groupEntries","specialCharsGroups","_showDialog","widgetToolbarRepository","tableContentToolbarItems","tableToolbarItems","Undo","toggleDownloadable","download","CkeditorManager","createCkeditor","disableTextArea","Initializer","$scope","initializeCkeditors","elementsMatching","handlebars"],"sourceRoot":""}